fix(brief): require incremental commits in ship and scout briefs - #14
Merged
Aviator-Coding merged 2 commits intoAug 15, 2026
Merged
Conversation
Ship and scout scaffolds name status, branching, and done, but not when to commit. The real fm-brief.sh output fails this check before the fix.
Generated contracts named the final committed state but not when to commit. Workers then left whole deliverables uncommitted when a run stopped. Tell them to commit as work becomes coherent.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
Generated briefs should require incremental commits; uncommitted work nearly lost twice.
Twice in two days a worker's entire deliverable sat uncommitted when it stopped: about 15 files when the machine slept mid-turn (2026-08-12), and 14 files when a worker looped for hours unable to finish its write-up (2026-08-13). Both were recovered only because the worktree survived. Neither guarantee is one to rely on.
bin/fm-brief.sh's generated contract tells a worker how to report status, how to branch, and what done means, but never tells it WHEN to commit. Workers default to committing at the end of a phase, which is exactly wrong for long unattended runs.
Required addition to the generated ship and scout contracts: commit incrementally as work becomes coherent, before it feels finished; a committed draft is recoverable and an uncommitted one is not.
The instruction belongs in the brief rather than in firstmate's recovery repertoire. A brief that guarantees frequent commits also makes a later relaunch note simpler. Do not add relaunch --note mechanics to the worker brief; that remains a firstmate recovery tool.
Reproduce the defect first, in the way an operator actually hits it, before writing the fix. That reproduction becomes the regression test: it must FAIL before the change and PASS after. Verify against the real tool where possible, not only a hand-written fixture, and record what you verified against.
Accepted implementation decisions: add a shared Commit discipline section to generated ship and scout briefs only; omit it from secondmate charters because they operate the firstmate lifecycle rather than implementing in a disposable worktree; document the same contract in the fm-brief.sh header; keep wording as "Commit incrementally as work becomes coherent, before it feels finished", "A committed draft is recoverable; an uncommitted one is not", and "Do not wait for a phase, a write-up, or the definition of done to commit."
What Changed
bin/fm-brief.sh, instructing workers to commit incrementally as work becomes coherent rather than waiting for a phase, write-up, or definition of done.fm-brief.shheader comment, alongside a note on why the section is built withread -d ''(to survive apostrophes without reintroducing heredoc-in-command-substitution parsing issues).tests/fm-brief.test.shthat scaffolds ship briefs (across--mode no-mistakes,direct-PR, andlocal-only) and a scout brief via the realbin/fm-brief.sh, asserting each generated brief contains the "# Commit discipline" section and its exact wording.Risk Assessment
✅ Low: The change is a small, well-bounded addition (a shared "Commit discipline" heredoc section wired into the ship and scout brief templates plus a matching header comment) that exactly matches every required wording, placement, and exclusion constraint in the intent, and ships with a regression test that exercises the real bin/fm-brief.sh output and was verified to fail before the fix and pass after.
Testing
Ran the targeted fm-brief.sh regression test against both the target commit (passes, including the new incremental-commit test) and a real base-commit checkout with the same test overlaid (fails with the expected pre-fix message), confirming a genuine fail-before/pass-after reproduction against the real tool. Manually re-verified via direct CLI invocation that ship and scout briefs carry the exact required Commit discipline wording while secondmate charters omit it, matching all required and forbidden constraints in the stated intent. No issues found; worktree left clean and temp directories removed.
Evidence: Generated ship brief Commit discipline section
# Commit discipline Commit incrementally as work becomes coherent, before it feels finished. A committed draft is recoverable; an uncommitted one is not. Do not wait for a phase, a write-up, or the definition of done to commit.Evidence: Generated scout brief Commit discipline section
# Commit discipline Commit incrementally as work becomes coherent, before it feels finished. A committed draft is recoverable; an uncommitted one is not. Do not wait for a phase, a write-up, or the definition of done to commit.Evidence: Secondmate charter omits Commit discipline (count=0)
0Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
bash tests/fm-brief.test.sh (target commit a130a56, in-place) - all tests pass including the new incremental-commits testbash tests/fm-brief.test.sh against a git-archive checkout of base commit f991512 with the new test overlaid - fails with 'incr-ship-nomistakes: generated ship brief never names a commit-discipline contract', confirming fail-before/pass-aftermanual: FM_HOME=<tmp> ./bin/fm-brief.sh evid-ship some-proj --mode no-mistakes and evid-scout some-proj --scout - both briefs contain the exact Commit discipline sectionmanual: FM_HOME=<tmp> ./bin/fm-brief.sh evid-second proj-a --secondmate - brief.md contains 0 occurrences of 'Commit discipline', confirming secondmate charters are correctly excluded✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.