Consumer repos install these skills, so they must not carry this repo's attribution policy, slug, ADR paths, or issue references. git-commits trailer examples now show only neutral trailers, and commit-template.md defers AI-attribution and co-author trailers to the consumer repo's AGENTS.md, CONTRIBUTING, or session instructions. The gitea sources notes state the live-verification rule plainly instead of citing an ADR, and labels.md drops the repo slug. Refs: #177 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi
2.1 KiB
2.1 KiB
source_keys
| source_keys | |||
|---|---|---|---|
|
Creating a new commit
- Gather context — what changed and why, from the staged diff, the PR description, or the issue. Confirm the staged diff is one logical, independently reviewable and reversible change that leaves the repository buildable and testable. If it bundles unrelated work, suggest splitting it before going further.
- Determine the type — read it off the change itself: a new user-visible feature is
feat, a bug fix isfix. For the full 11-type set and each type's SemVer impact, readreferences/conventional-commits-spec.md. - Determine the scope — infer it from the files changed (
api,db,cli,config). Scope is optional, but it identifies which part of the system moved and is worth setting. - Write the description — imperative mood, no trailing period: "add user authentication", "fix race condition in cache". Neither source spec sets a target below the 100-character header maximum, but convention favours roughly 50 characters so
git log --onelinestays readable. - Add a body when the change is non-trivial — blank line first, wrapped at 100 characters. Explain why, not what: the diff already shows what changed, and the message's job is the context the diff cannot carry — motivation, root cause, tradeoffs. Follow the Why / Implementation Notes / Impact structure in
references/commit-template.md. - Add footers where they apply —
Fixes: #123,Refs: #123,ADR: 0012,Signed-off-by: Name <email>,BREAKING CHANGE: description. For the full trailer list, readreferences/commit-template.md. - Signal a breaking change with
!before the colon —feat!: drop Node 6is visible ingit log --oneline, where theBREAKING CHANGE:footer alone is machine-readable but hidden. Use both when the break needs describing. - Validate, confirm, execute — check header length, type, lowercase subject and trailing period against commitlint, show the message, and commit only once the caller has approved. Never add
--no-verify.