1.7 KiB
1.7 KiB
name, description
| name | description |
|---|---|
| commit-policy | Apply this skill for any git commit task in this repository. It enforces commit message format and validation flow defined in AGENTS.md and work/scripts/check-commit-message-rules.sh, including pre-commit and post-commit verification. |
Commit Policy Skill
Use this workflow whenever the task includes creating a commit.
Required References
@AGENTS.md@work/scripts/check-commit-message-rules.sh
Hard Requirements
- Use commit subject format:
<type>(scope): <description>. typemust be lowercase (for examplefeat,fix,chore,docs,refactor,test).descriptionmust include Korean text and stay concise in imperative present tone.- Optional footer must use
Refs: #123orRefs: #123, #456format. - Never commit secret files (
.env, key/token/secret credential files). - Never bypass hooks with
--no-verify.
Execution Flow
- Inspect context with:
git statusgit diff --cachedgit diffgit log -5 --oneline
- Stage commit target files only. Exclude suspicious secret-bearing files.
- Draft commit message from the change intent (focus on why, not only what).
- Run pre-commit validation with the full draft message:
./work/scripts/check-commit-message-rules.sh --message "<full message>"
- If validation fails, revise message and re-run until PASS.
- Commit using the validated message.
- Run post-commit validation:
./work/scripts/check-commit-message-rules.sh
- Report executed commands and PASS/FAIL summary.
Output Checklist
- Final commit subject.
- Whether pre-check passed.
- Whether post-check passed.
- Any excluded files and reason.