Skip to content

Commit 9d39094

Browse files
docs: add checkpoint commits, concern field, and merge cleanup to docs and tests
why: the contract and orchestrator skill evolved to support fast iteration with clean handoffs — docs and tests need to match Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 1355868 commit 9d39094

File tree

4 files changed

+89
-0
lines changed

4 files changed

+89
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
- Added multi-agent orchestrator support: `AGENT_ID` env var tags diary entries and findings.
1313
- Added `reconcile-branch.sh` merge-gate script for branch-scoped reconciliation.
1414
- Added `orchestrator` skill with coordination contract for multi-agent systems.
15+
- Added `concern:` field support in post-commit diary for agents to flag risky changes.
16+
- Added checkpoint commit support: `fixup!` / `squash!` commits skip format/why enforcement.
1517
- Added `bootstrap-harness.sh` to scaffold AGENTS/docs/evals for harness-engineering workflows.
1618
- Added `new-project-bootstrap.sh` for one-command skill install + repo setup.
1719
- Added `.agent/PLANS.md` execution-plan standard aligned with Codex Exec Plans.

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,17 @@ git submodule add https://github.com/hunterassembly/dev-discipline.git .dev-disc
102102
- Blocks non-conventional commit messages (must be `type(scope): description`)
103103
- Blocks missing `why:` line
104104
- Blocks `why:` lines that are too short (<10 chars), restate the subject, or use filler phrases
105+
- Allows `fixup!` / `squash!` checkpoint commits during active implementation
105106

106107
**post-commit:**
107108
- Silently appends commit metadata to `.dev/diary/YYYY-MM-DD.md`
109+
- Logs optional `concern:` lines from commit messages for reconciliation review
110+
111+
### Commit cadence (speed + clean history)
112+
113+
- During active implementation, use checkpoint commits (`fixup!` / `squash!`) when needed for speed.
114+
- Before review/merge, squash checkpoints into 1-3 concern-level commits with strong `why:` lines.
115+
- The quality bar applies at handoff, not every keystroke.
108116

109117
### At session boundaries (reconciliation)
110118

@@ -190,6 +198,7 @@ Removes hooks and bridge references from AGENTS.md/CLAUDE.md. Does not delete `.
190198
- **The diary writes itself.** Post-commit logs metadata. AI summarizes later.
191199
- **Feedback loops close.** Reconciliation findings feed into the next session automatically.
192200
- **Multi-agent is just git.** Branches isolate, merges synchronize, hooks enforce per-branch. No coordination layer needed.
201+
- **Fast while building, clean at handoff.** Checkpoint commits are fine during execution; final history should be concern-level and reviewable.
193202

194203
## License
195204

skills/orchestrator/SKILL.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@ Every agent must, before writing code:
7272

7373
Before merging an agent's branch:
7474

75+
1. Clean up commit history on that branch:
76+
- checkpoint `fixup!` / `squash!` commits are allowed during implementation,
77+
- but handoff history should be consolidated into concern-level commits with clear `why:` lines.
78+
2. Run the branch reconciliation merge gate:
79+
7580
```bash
7681
scripts/reconcile-branch.sh agent/<agent-id>/<concern> --base main
7782
```

tests/dev_discipline_integration_test.sh

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,76 @@ test_orchestrator_skill_exists() {
407407
fi
408408
}
409409

410+
test_commit_msg_allows_fixup_commits() {
411+
local tmp_repo hook_output hook_code
412+
tmp_repo=$(mktemp -d)
413+
git init "$tmp_repo" >/dev/null 2>&1
414+
415+
local hook_src="$REPO_ROOT/skills/dev-discipline/assets/commit-msg"
416+
cp "$hook_src" "$tmp_repo/.git/hooks/commit-msg"
417+
chmod +x "$tmp_repo/.git/hooks/commit-msg"
418+
419+
local msg_file="$tmp_repo/.git/COMMIT_EDITMSG"
420+
printf 'fixup! feat(auth): add rate limiting' > "$msg_file"
421+
422+
set +e
423+
hook_output=$("$tmp_repo/.git/hooks/commit-msg" "$msg_file" 2>&1)
424+
hook_code=$?
425+
set -e
426+
427+
if [ "$hook_code" -eq 0 ]; then
428+
pass "commit-msg allows fixup! checkpoint commits"
429+
else
430+
fail "commit-msg allows fixup! checkpoint commits (code=$hook_code)"
431+
fi
432+
}
433+
434+
test_commit_msg_allows_squash_commits() {
435+
local tmp_repo hook_output hook_code
436+
tmp_repo=$(mktemp -d)
437+
git init "$tmp_repo" >/dev/null 2>&1
438+
439+
local hook_src="$REPO_ROOT/skills/dev-discipline/assets/commit-msg"
440+
cp "$hook_src" "$tmp_repo/.git/hooks/commit-msg"
441+
chmod +x "$tmp_repo/.git/hooks/commit-msg"
442+
443+
local msg_file="$tmp_repo/.git/COMMIT_EDITMSG"
444+
printf 'squash! feat(auth): add rate limiting' > "$msg_file"
445+
446+
set +e
447+
hook_output=$("$tmp_repo/.git/hooks/commit-msg" "$msg_file" 2>&1)
448+
hook_code=$?
449+
set -e
450+
451+
if [ "$hook_code" -eq 0 ]; then
452+
pass "commit-msg allows squash! checkpoint commits"
453+
else
454+
fail "commit-msg allows squash! checkpoint commits (code=$hook_code)"
455+
fi
456+
}
457+
458+
test_post_commit_logs_concerns() {
459+
local tmp_home tmp_repo
460+
tmp_home=$(mktemp -d)
461+
tmp_repo=$(mktemp -d)
462+
463+
HOME="$tmp_home" "$REPO_ROOT/scripts/new-project-bootstrap.sh" --init-git "$tmp_repo" >/dev/null 2>&1
464+
465+
(
466+
cd "$tmp_repo"
467+
echo "test" > testfile.txt
468+
git add testfile.txt
469+
git commit --no-verify -m "$(printf 'feat(auth): change login flow\n\nwhy: simplifying auth reduces attack surface\nconcern: this changes session handling — verify no active sessions break')" >/dev/null 2>&1
470+
)
471+
472+
diary_file=$(ls "$tmp_repo/.dev/diary/"*.md 2>/dev/null | head -1)
473+
if [ -n "$diary_file" ] && grep -q "verify no active sessions break" "$diary_file"; then
474+
pass "post-commit logs concern: lines in diary"
475+
else
476+
fail "post-commit logs concern: lines in diary"
477+
fi
478+
}
479+
410480
test_bootstrap_installs_planner_and_scaffold
411481
test_pre_commit_blocks_large_source_change_without_plan_update
412482
test_planner_validator_checks_quality_rules
@@ -427,6 +497,9 @@ test_post_commit_tags_agent_id
427497
test_post_commit_no_tag_without_agent_id
428498
test_reconcile_branch_script_exists
429499
test_orchestrator_skill_exists
500+
test_commit_msg_allows_fixup_commits
501+
test_commit_msg_allows_squash_commits
502+
test_post_commit_logs_concerns
430503

431504
echo ""
432505
echo "Test results: $PASS_COUNT passed, $FAIL_COUNT failed"

0 commit comments

Comments
 (0)