Commit playbook
When a coherent verified unit is complete, use this skill before moving into distinct work; also use it when the user requests a commit or commit message.
Procedure
- Inspect current git status and diff before staging or committing.
- Do not revert, stash, or overwrite unexpected user changes.
- Check staged and unstaged diffs for secrets, credentials, tokens, private keys, and plaintext secret material.
- Stage only files relevant to the change.
- Generate a concise conventional commit message from the staged diff.
- Commit only after verification has run, concrete prior verification evidence is recorded honestly, or the user explicitly accepts the remaining risk.
- Make each checkpoint a coherent atomic unit useful for rollback or review; avoid arbitrary or frequent commit noise.
Message shape
- Use conventional commit format on the first line:
type(scope): summary. - Prefer
fix,feat,refactor,docs,test,chore, orci. - Keep the subject line 50 characters or fewer.
- Summary should describe user-visible or maintainer-visible effect, not implementation trivia.
- A commit body is allowed when it improves future archaeology.
- Separate subject and body with one blank line.
- Wrap non-blank body lines at 72 characters or fewer.
- Use body paragraphs for why, risk, migration notes, or verification context that belongs in git history.
- When useful, reference issue or commit identifiers only when established by context; use a closing keyword only when the checkpoint truly completes that issue.
PR follow-ups
- For follow-up work on an open PR, prefer a new local commit so review history remains chronological.
- Push only when explicitly requested.
- Do not amend, rebase, squash, or force-push an existing PR branch unless the user explicitly asks to rewrite history.
- If history rewriting is explicitly requested, use
--force-with-lease, explain why it is needed, and never use plain--force.
Hard stops
- Do not commit secrets.
- Do not commit unrelated changes without explicit user approval.
- Do not claim verification that was not run.