The pre-commit stage runs before the commit is created, so it can't
validate the commit being made. The commit-msg stage receives the
message file as argv[1], allowing the hook to include the pending
commit in its invariant check.
Also works standalone (no args) for validating existing branch history.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- CLAUDE.md: add branch naming, commit convention, and --resume to C2 summary
- ai-assistance-guide: add docs-mikado --resume to mise tasks table
- Changelog fragment: cover all new conventions and tooling
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Validates the Mikado Branch Invariant on mikado/* branches:
- All commits must follow C2(<chain>): <verb> <description> convention
- plan commits must precede all impl/close commits
- close commits must follow impl commits
- finalize must be the last commit
- Chain stem in commit messages must match branch name
Silently passes on non-mikado branches (exit 0).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Parse branch: field from goal card frontmatter
- Goal cards without branch: shown as "not started" (planned but no branch)
- Add Branch column to chain listing table
- New --resume flag for cold-start session pickup:
- Detects current mikado/* branch and matches to active chain
- Shows branch position (planning/mid-cycle/between-cycles) by parsing
C2() commit convention from git log
- Lists ready leaf nodes for next work cycle
- With explicit chain name, validates branch consistency
- On main, lists all chains with branch status and ready leaves
- Add find_ready_leaves() helper for identifying actionable leaf nodes
- Add C2_COMMIT_RE for parsing C2(<chain>): <verb> <desc> convention
- Show branch: in walk_chain card detail output
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove "prior Mikado chains" from C1 doc search step — completed
chains are just documentation, not a special category
- Collapse the two "not allowed" bullets into a single rule: no card
may be introduced after any code or card-closing commit
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The work phase after the card layer is a repeating cycle of
(code → close leaf), not a single block of all code followed by
all closures.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>