docs(git-master): generalize language profile guidance
This commit is contained in:
@@ -35,18 +35,18 @@ git log --oneline $(git merge-base HEAD main 2>/dev/null || git merge-base HEAD
|
||||
<style_detection>
|
||||
**THIS PHASE HAS MANDATORY OUTPUT** - You MUST print the analysis result before moving to Phase 2.
|
||||
|
||||
### 1.1 Language Detection
|
||||
### 1.1 Language Profile Detection
|
||||
|
||||
\`\`\`
|
||||
Count from git log -30:
|
||||
- Korean characters: N commits
|
||||
- English only: M commits
|
||||
- Mixed: K commits
|
||||
- Dominant language/script patterns: N commits
|
||||
- Secondary language/script patterns: M commits
|
||||
- Mixed/ambiguous: K commits
|
||||
|
||||
DECISION:
|
||||
- If Korean >= 50% -> KOREAN
|
||||
- If English >= 50% -> ENGLISH
|
||||
- If Mixed -> Use MAJORITY language
|
||||
- Preserve the dominant repository language pattern in commit messages
|
||||
- If multiple languages are common, follow the nearest recent examples for the same module
|
||||
- Never restrict output to specific languages; support any language used by the repo (e.g., Japanese, Korean, English, etc.)
|
||||
\`\`\`
|
||||
|
||||
### 1.2 Commit Style Classification
|
||||
@@ -79,9 +79,9 @@ STYLE DETECTION RESULT
|
||||
======================
|
||||
Analyzed: 30 commits from git log
|
||||
|
||||
Language: [KOREAN | ENGLISH]
|
||||
- Korean commits: N (X%)
|
||||
- English commits: M (Y%)
|
||||
Language profile: [DOMINANT_LANGUAGE_OR_SCRIPT]
|
||||
- Dominant pattern: N (X%)
|
||||
- Secondary pattern: M (Y%)
|
||||
|
||||
Style: [SEMANTIC | PLAIN | SENTENCE | SHORT]
|
||||
- Semantic (feat:, fix:, etc): N (X%)
|
||||
@@ -93,7 +93,7 @@ Reference examples from repo:
|
||||
2. "actual commit message from log"
|
||||
3. "actual commit message from log"
|
||||
|
||||
All commits will follow: [LANGUAGE] + [STYLE]
|
||||
All commits will follow: [DOMINANT_LANGUAGE_OR_SCRIPT] + [STYLE]
|
||||
\`\`\`
|
||||
|
||||
**IF YOU SKIP THIS OUTPUT, YOUR COMMITS WILL BE WRONG. STOP AND REDO.**
|
||||
@@ -435,17 +435,19 @@ git log -1 --oneline
|
||||
**Based on COMMIT_CONFIG from Phase 1:**
|
||||
|
||||
\`\`\`
|
||||
IF style == SEMANTIC AND language == KOREAN:
|
||||
-> "feat: 로그인 기능 추가"
|
||||
|
||||
IF style == SEMANTIC AND language == ENGLISH:
|
||||
-> "feat: add login feature"
|
||||
|
||||
IF style == PLAIN AND language == KOREAN:
|
||||
-> "로그인 기능 추가"
|
||||
|
||||
IF style == PLAIN AND language == ENGLISH:
|
||||
-> "Add login feature"
|
||||
IF style == SEMANTIC:
|
||||
-> Use a semantic prefix + repository language message
|
||||
-> Examples:
|
||||
- "feat: add login feature"
|
||||
- "feat: ログイン機能を追加"
|
||||
- "feat: 로그인 기능 추가"
|
||||
|
||||
IF style == PLAIN:
|
||||
-> Use plain repository language message without semantic prefix
|
||||
-> Examples:
|
||||
- "Add login feature"
|
||||
- "ログイン機能を追加"
|
||||
- "로그인 기능 추가"
|
||||
|
||||
IF style == SHORT:
|
||||
-> "format" / "type fix" / "lint"
|
||||
|
||||
@@ -7,12 +7,12 @@ export const GIT_MASTER_HISTORY_SEARCH_WORKFLOW_SECTION = `## HISTORY SEARCH MOD
|
||||
|
||||
| User Request | Search Type | Tool |
|
||||
|--------------|-------------|------|
|
||||
| "when was X added" / "X가 언제 추가됐어" | PICKAXE | \`git log -S\` |
|
||||
| "when was X added" in any language (e.g., "X가 언제 추가됐어", "Xはいつ追加された") | PICKAXE | \`git log -S\` |
|
||||
| "find commits changing X pattern" | REGEX | \`git log -G\` |
|
||||
| "who wrote this line" / "이 줄 누가 썼어" | BLAME | \`git blame\` |
|
||||
| "when did bug start" / "버그 언제 생겼어" | BISECT | \`git bisect\` |
|
||||
| "history of file" / "파일 히스토리" | FILE_LOG | \`git log -- path\` |
|
||||
| "find deleted code" / "삭제된 코드 찾기" | PICKAXE_ALL | \`git log -S --all\` |
|
||||
| "who wrote this line" in any language (e.g., "이 줄 누가 썼어", "この行を書いたのは誰") | BLAME | \`git blame\` |
|
||||
| "when did bug start" in any language (e.g., "버그 언제 생겼어", "バグはいつ入った") | BISECT | \`git bisect\` |
|
||||
| "history of file" in any language (e.g., "파일 히스토리", "ファイル履歴") | FILE_LOG | \`git log -- path\` |
|
||||
| "find deleted code" in any language (e.g., "삭제된 코드 찾기", "削除されたコードを探す") | PICKAXE_ALL | \`git log -S --all\` |
|
||||
|
||||
### H1.2 Extract Search Parameters
|
||||
|
||||
|
||||
@@ -30,19 +30,19 @@ git stash list
|
||||
\`\`\`
|
||||
USER REQUEST -> STRATEGY:
|
||||
|
||||
"squash commits" / "cleanup" / "정리"
|
||||
"squash commits" intent in any language (e.g., "cleanup", "정리", "履歴整理")
|
||||
-> INTERACTIVE_SQUASH
|
||||
|
||||
"rebase on main" / "update branch" / "메인에 리베이스"
|
||||
"rebase on main" intent in any language (e.g., "update branch", "메인에 리베이스", "mainにリベース")
|
||||
-> REBASE_ONTO_BASE
|
||||
|
||||
"autosquash" / "apply fixups"
|
||||
-> AUTOSQUASH
|
||||
|
||||
"reorder commits" / "커밋 순서"
|
||||
"reorder commits" intent in any language (e.g., "커밋 순서", "コミット順を並べ替え")
|
||||
-> INTERACTIVE_REORDER
|
||||
|
||||
"split commit" / "커밋 분리"
|
||||
"split commit" intent in any language (e.g., "커밋 분리", "コミット分割")
|
||||
-> INTERACTIVE_EDIT
|
||||
\`\`\`
|
||||
</rebase_context>
|
||||
|
||||
Reference in New Issue
Block a user