| description | Use when staged changes exist requiring qlty checks, logical split detection, or HXSK phase-scoped conventional commit creation. |
| name | commit |
| trigger | ์ปค๋ฐ ์์ฑ, git commit, ์ปค๋ฐ ๋ฉ์์ง ์์ฑ, ๋ณ๊ฒฝ์ฌํญ ์ปค๋ฐ, conventional commit, ์ปค๋ฐ ๋ถํ , ์ปค๋ฐ ๋๋๊ธฐ, ๋ณ๊ฒฝ์ฌํญ ๋ถ๋ฆฌ, pre-commit check, ์ปค๋ฐ ์ ๊ฒ์ฌ, git diff ๋ถ์, ๋ณ๊ฒฝ์ฌํญ ๋ถ์, conventional commit ์์ฑ, emoji ์ปค๋ฐ, HXSK ์ปค๋ฐ, phase ์ปค๋ฐ, commit message format, split commits, run pre-commit, analyze diff, qlty check ์คํ, shellcheck ๊ฒ์ฌ, feat ์ปค๋ฐ, fix ์ปค๋ฐ, docs ์ปค๋ฐ, refactor ์ปค๋ฐ, test ์ปค๋ฐ, chore ์ปค๋ฐ, phase-1.2 ์ปค๋ฐ, phase scope ์ ์ฉ, git add all, staged changes ๋ถ์, ๋
ผ๋ฆฌ์ ๋ถํ ์ ์, ์ปค๋ฐ ๋ฉ์์ง ๋ณด์ , imperitive mood ์ ์ฉ, ์ด์ ๋งํฌ ์ถ๊ฐ, resolved #N, commit types |
Quick Reference
- Diff Analysis: ์ปค๋ฐ ์ ๋ฐ๋์
git diff --cached ๋ก ๋ณ๊ฒฝ ์ฌํญ ๋ถ์
- Pre-check:
.qlty/qlty.toml ์กด์ฌ ์ qlty check ์คํ ํ ์งํ
- Split Logic: ๋ชจ๋/์ ํ/ํ์ผ ํผํฉ ์ ๋
ผ๋ฆฌ์ ๋ถ๋ฆฌ (Separate Commits)
- Format:
<emoji> <type>(<scope>): <description> (Imperative mood)
- HXSK Body:
phase-N.M ์ค์ฝํ ํ์, ๋ณธ๋ฌธ์ WHAT ์๋ตํ๊ณ WHY(์ด์ ) ๋ง 72 ์ ๋ด
Iron Laws
NO COMMIT WITHOUT PRE-COMMIT CHECKS FIRST
NO COMMIT WITHOUT DIFF ANALYSIS FIRST
NO COMMIT WITHOUT CONVENTIONAL FORMAT FIRST
NO MERGED CHANGES WITHOUT LOGICAL SPLIT FIRST
NO HXSK COMMIT WITHOUT PHASE SCOPE FIRST
NO COMMIT BODY WITHOUT WHY EXPLANATION FIRST
Workflow
Step 1: Pre-Commit Checks
Run quality checks before committing:
Qlty ๊ฒฝ๋ก (.qlty/qlty.toml ์กด์ฌ ์):
qlty check
Shell ์คํฌ๋ฆฝํธ ๊ฒ์ฌ:
shellcheck *.sh
If checks fail, report failures and ask whether to:
- Fix issues first (recommended)
- Proceed anyway (
--no-verify flag)
Step 2: Analyze Staged Changes
git status
git diff --cached --stat
git diff --cached
If no files are staged, stage all modified files:
git add -A
Step 3: Detect Logical Splits
Analyze the diff for multiple distinct concerns:
Split signals:
- Changes to unrelated modules (e.g.,
src/auth/ + src/billing/)
- Mixed change types (feature code + test code + config)
- Different file categories (source vs docs vs config)
- Independent bug fixes bundled with features
If multiple concerns detected, suggest splitting:
Detected 3 logical changes:
1. feat: add user validation in src/auth/
2. test: add validation tests
3. chore: update pyproject.toml dependencies
Split into separate commits? [Y/n]
Step 4: Create Commit
Use conventional commit format with emoji:
git commit -m "$(cat <<'EOF'
<emoji> <type>(<scope>): <description>
<optional body>
Co-Authored-By: Claude <noreply@anthropic.com>
EOF
)"
Commit Types
| Emoji | Type | Description |
|---|
feat | New feature or capability | |
fix | Bug fix | |
docs | Documentation changes | |
style | Formatting, no logic change | |
refactor | Code restructuring | |
perf | Performance improvement | |
test | Adding or fixing tests | |
chore | Tooling, config, dependencies | |
ci | CI/CD changes | |
HXSK-Specific Scopes
When executing HXSK plans, use phase-plan scope:
feat(phase-1.2): implement login endpoint with JWT
fix(phase-2.1): resolve bcrypt comparison error
test(phase-1.3): add integration tests for auth flow
Commit Message Rules
- Imperative mood: "add feature" not "added feature"
- First line: max 72 characters (์ ๋ชฉ 50์ ์ด๋ด ๊ถ์ฅ)
- Scope: module or phase-plan reference
- Body: explain WHY, not WHAT (the diff shows WHAT). ๋ณธ๋ฌธ์ 72์ ์ค๋ฐ๊ฟ
- No period at the end of the subject line
- Issue linking: ์ด์๋ฅผ ๋ซ๋ ์ปค๋ฐ์๋
Resolved #N ํฌํจ
์์ธ ์ปจ๋ฒค์
: .hxsk/docs/CONVENTIONS.md ์น์
4 ์ฐธ์กฐ
Examples
Single Commit
feat(auth): add JWT-based login endpoint
Implements POST /api/auth/login with bcrypt password verification
and httpOnly cookie response. Uses jose library for Edge runtime
compatibility.
Split Commits (from single diff)
git add src/auth/
git commit -m "feat(auth): add JWT-based login endpoint"
git add tests/auth/
git commit -m "test(auth): add login endpoint integration tests"
git add pyproject.toml uv.lock
git commit -m "chore(deps): add jose and bcrypt dependencies"
๋ค์ดํฐ๋ธ ๋๊ตฌ ํ์ฉ
Diff ๋ถ์๊ณผ ์ปค๋ฐ ๋ถํ ์ git ๋ช
๋ น๊ณผ ๋ค์ดํฐ๋ธ ๋๊ตฌ๋ก ์ํ:
git diff --name-only HEAD~1
git diff --stat
git diff --name-only | xargs -I{} dirname {} | sort -u