Commit
The working tree usually contains work that is not yours. Staging is an explicit act.
Stage only your own edits
git status --porcelain and git diff --stat first. Read the whole list.
- Identify the files you edited this session. If unsure which those are, say so and
ask rather than guessing.
- Stage them by explicit path:
git add path/a path/b.
- Never
git add -A, git add ., git add -u, or git commit -a.
git diff --cached before committing. If anything in it is not yours, unstage it.
Untracked files are not automatically yours and are not automatically disposable.
The same rule applies when moving work into a worktree: carry over the files you
changed, not everything the tree shows as dirty.
Never stage implementation-notes-*.md. It is a local record, not part of the change.
Write the message
Conventional Commits: type(scope): intent. Types: feat, fix, refactor, test, docs,
build, ci, chore, perf, revert.
- Three sentences maximum, total.
- Say why the change exists and what outcome it achieves.
- No file-by-file summary, no filenames, no implementation narration.
- No separate "Why" section.
- No em dashes.
- No AI, agent, model, or provider attribution. No
Co-Authored-By, no session
trailers, no session links. If a tool adds one, remove it before committing.
- No employer name, personal name, or email.
Before the commit lands
- The relevant tests were run and passed. Not "should pass".
- The staged diff contains only intended changes.
- No secrets, keys, tokens, or customer data in the diff.
- Generated files in the diff are there on purpose.
Never without being asked
Amend, squash, rebase, reset --hard, force-push, or rewrite history. Each needs
explicit approval naming what will be rewritten.
1---2name: commit3description: Stage and commit work without pulling in unrelated changes. Use whenever committing, staging, amending, or moving changed files into a worktree, and when the user says "commit only what you changed".4---56# Commit78The working tree usually contains work that is not yours. Staging is an explicit act.910## Stage only your own edits11121. `git status --porcelain` and `git diff --stat` first. Read the whole list.132. Identify the files *you* edited this session. If unsure which those are, say so and14 ask rather than guessing.153. Stage them by explicit path: `git add path/a path/b`.164. Never `git add -A`, `git add .`, `git add -u`, or `git commit -a`.175. `git diff --cached` before committing. If anything in it is not yours, unstage it.1819Untracked files are not automatically yours and are not automatically disposable.2021The same rule applies when moving work into a worktree: carry over the files you22changed, not everything the tree shows as dirty.2324Never stage `implementation-notes-*.md`. It is a local record, not part of the change.2526## Write the message2728Conventional Commits: `type(scope): intent`. Types: feat, fix, refactor, test, docs,29build, ci, chore, perf, revert.3031- Three sentences maximum, total.32- Say why the change exists and what outcome it achieves.33- No file-by-file summary, no filenames, no implementation narration.34- No separate "Why" section.35- No em dashes.36- No AI, agent, model, or provider attribution. No `Co-Authored-By`, no session37 trailers, no session links. If a tool adds one, remove it before committing.38- No employer name, personal name, or email.3940## Before the commit lands4142- The relevant tests were run and passed. Not "should pass".43- The staged diff contains only intended changes.44- No secrets, keys, tokens, or customer data in the diff.45- Generated files in the diff are there on purpose.4647## Never without being asked4849Amend, squash, rebase, `reset --hard`, force-push, or rewrite history. Each needs50explicit approval naming what will be rewritten.