diff --git a/CLAUDE.md b/CLAUDE.md index 13878549..6809dbb9 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -361,6 +361,17 @@ withholding the commit until it is good. Commit messages: simple lowercase, no prefixes. +**Stage and commit in ONE step, naming the paths.** `git add ` then a bare `git commit` commits the +whole **index**, not the path just named — so anything a concurrent session had staged goes into your +commit, under your message and your session trailer. Use `git commit -- ` instead, which does what +the two-step form only looks like it does. + +This is not hypothetical and it is not rare: two agents share this working tree most nights. On +2026-08-23 commit `6e092c32` says "marketplace: minesweeper in the catalogue" and contains nine files of +another session's roles work, swept up mid-`git add`. The other session was right not to amend it — +rewriting shared history to fix a message is the worse trade — so the record was corrected with a +follow-up note instead. Cheap to avoid, awkward to undo. + **An agent's commit names the session that made it.** A trailer, below `Co-Authored-By`: ```