Repository navigation
fix(bin): stop no-mistakes briefs from inviting a premature done - #3957
AgardnerAU wants to merge 26 commits into
Conversation
Three of three no-mistakes ship workers reported `done:` on a local commit
with nothing pushed and no PR. The generated brief licensed it: the
no-mistakes Definition of done opened with "The task is complete only when
committed on your branch" and "append `done: {summary}` ... and stop", while
the real terminal line sat far below the setup, --intent, and gate prose.
Reserve `done:` for the delivered outcome. Every ship mode and the scout
scaffold now lead their Definition of done with one "Terminal condition:"
line naming that mode's single legal `done:` form, and a no-mistakes worker
hands off its implementation commit with the nonterminal
`working: implemented, ready for the pipeline` instead. That handoff still
reaches firstmate, which surfaces any crew that stopped its turn without
positive evidence it is still executing.
Rule 4 now defers its stop gates to the Definition of done rather than
requiring each to be a `done:` line, so it no longer contradicts the handoff.
No brief grows: the no-mistakes brief loses a line and the other three hold
their line count.
[Medium impact] The PR appears safe to merge; no actionable issues were found. Reviews (3) · Last reviewed commit: "no-mistakes(review): Align pr=manual DOD..." · Reviewed by Greptile |
Three of three no-mistakes ship workers reported `done:` on a local commit
with nothing pushed and no PR. The generated brief licensed it: the
no-mistakes Definition of done opened with "The task is complete only when
committed on your branch" and "append `done: {summary}` ... and stop", while
the real terminal line sat far below the setup, --intent, and gate prose.
Reserve `done:` for the delivered outcome. Every ship mode and the scout
scaffold now lead their Definition of done with one "Terminal condition:"
line naming that mode's single legal `done:` form, and a no-mistakes worker
hands off its implementation commit with the nonterminal
`working: implemented, ready for the pipeline` instead. That handoff still
reaches firstmate, which surfaces any crew that stopped its turn without
positive evidence it is still executing.
Rule 4 now defers its stop gates to the Definition of done rather than
requiring each to be a `done:` line, so it no longer contradicts the handoff.
No brief grows: the no-mistakes brief loses a line and the other three hold
their line count.
be0f4e1 to
5bc4d70
Compare
This commit carries no content change. Its tree is byte-identical to its first parent 5bc4d70: it adds no file, removes no file, and edits no file. It exists solely so the validation pipeline can re-bind its attestation. The 2026-09-13 rebase moved this branch off the head the pipeline had recorded, so the pipeline could no longer advance its own gate and its attestation stayed bound to the abandoned pre-rebase head be0f4e1. Recording be0f4e1 as a second parent makes that gate update a fast-forward, so the pipeline can bind the attestation to the current head as CONTRIBUTING.md requires.
…eption, inline terminal lines
…takes DOD; harden brief tests
|
Speaking as Kun's firstmate: First triage on HEAD VISION per-rule:
contract-class: restore — unconfigured briefs were licensing premature CI/NM: tip runs were Stamp waiting-ci. Do not escalate while CI/NM pending. Re-check for auto-merge when green. |
Reconcile the Definition of done terminal-condition change with upstream's status-line and draft-PR work. Three files conflicted, all in the Definition of done contract: - bin/fm-dod-lib.sh: keep the leading "Terminal condition:" line for every mode and drop the trailing restatement, while preserving upstream's non-draft read-back, its paused alternative for a deliberately held draft, and the `[at=<epoch>]` status form. Upstream's "The task is complete only when committed on your branch" line stays removed for the PR-based modes: it is the wording this branch exists to fix, and tests assert its absence. - bin/fm-brief.sh: keep the scout Definition of done led by its terminal condition, without upstream's trailing duplicate. - tests/fm-brief.test.sh: keep all three test registrations; the branch's two and upstream's non-draft test are independent and all pass together. Every terminal condition now carries the `[at=<epoch>]` form upstream adopted, so the line naming the only legal done form matches the form the rest of the brief instructs, rather than teaching a stale one.
|
Speaking as Kun's firstmate: stamped waiting-author (was waiting-ci at HEAD contract-class: restore — generated ship/scout Definition of done now leads with mode-specific VISION: One captain/interface aligns (trustworthy Diff re-reviewed at tip (no workflows). Approved fork runs this pass: CI Related open (leave on their queues): #3135, #3683. No GitHub Fixes/Closes on this PR. |
|
The workflow runs on this pull request are held at Could a maintainer release the held runs when convenient? Happy to rebase first if the base has moved far enough to matter. |
…ture-done # Conflicts: # tests/fm-brief.test.sh
|
Branch updated: the head is now f3df714. |
Upstream moved the Validate and PR-ready sections of AGENTS.md into the validation-supervision and ship-landing skills. Take upstream AGENTS.md and carry this branch's no-mistakes working: handoff wording into those skills.
|
Updated this branch with current main. The PR is mergeable and ready for CI; the fork workflow runs await maintainer approval. |
…ture-done # Conflicts: # bin/fm-brief.sh
|
Merged current upstream main into this branch (head 5bc9ba8); no-mistakes attestation is bound to this head. Up to date with main and ready for CI - the CI and Require no-mistakes runs are awaiting maintainer approval. |
…ture-done # Conflicts: # bin/fm-dod-lib.sh
|
Merged current main (conflict in bin/fm-dod-lib.sh resolved, keeping main's base-branch text); head cf5080e is up to date and mergeable, with the attestation bound to it. Ready for CI - the workflow runs are waiting for maintainer approval. |
|
Speaking as Kun's firstmate (OSS triage, not the captain). Thanks @AgardnerAU. My 09-22 stamp was waiting-author because of an attestation mismatch. You've since rebound the attestation and merged main. The new head is I re-reviewed the tip diff. There are no workflow or secret changes, so I approved the fork runs: CI I'm correcting my earlier class: this is new-default, not restore. Main's specified default for a no-mistakes ship hands off with the pre-validation VISION:
Outcome: waiting-ci. Once CI and no-mistakes are green, this goes to the captain to merge or leave. It won't auto-merge. Nothing is needed from you right now. |
…ture-done # Conflicts: # bin/fm-dod-lib.sh
|
Speaking as Kun's firstmate: thanks @AgardnerAU for keeping this current. What changed since my 10 Oct stamp ( I approved the held fork runs on this head: CI Contract-class: new-default (unchanged). It replaces the specified Heads-up: main is currently red on unrelated Pi type drift. If this run fails only on those same shards, that's not on you, and nothing is needed from you. Also, #7218 adds lines to the same no-mistakes Definition of done block in Status: waiting-ci. Once CI and no-mistakes are green on a green main, this goes to Kun to merge or leave. It won't auto-merge. |
|
Merged current main (6407052) into this branch; the only conflict, in bin/fm-dod-lib.sh, combined the new Forgejo forge support with this PR's terminal-condition lines. It is up to date and ready for CI. The one red check, Behavior portable parallel 1 (tests/fm-pi-primary-types.test.sh: Property 'prompt' does not exist on type 'BeforeAgentStartEvent'), fails identically on main at 6407052 and is not caused by this change. |
|
Speaking as Kun's firstmate: thanks @AgardnerAU. What changed since my stamp earlier today: the code hasn't changed. The head is still Contract-class: new-default, same as before: it replaces the specified Status: waiting for main to go green. Once main is green, this goes to Kun to merge or leave. It won't auto-merge, and nothing is waiting on you. |
…ture-done # Conflicts: # .agents/skills/afk/SKILL.md # bin/fm-dod-lib.sh
|
Merged current main into this branch (head 746f8bc) and resolved the conflicts in bin/fm-dod-lib.sh and the afk skill. Upstream's new external-review Definition of done now also leads with its terminal condition, with a test. It is up to date with current main and ready for CI; the workflow runs are waiting for maintainer approval. |
|
Speaking as Kun's firstmate: thanks @AgardnerAU for keeping this current. Changes since my 13 Oct stamp ( I approved the held fork runs on this head: CI Contract-class: new-default (unchanged). It replaces the specified no-mistakes Status: waiting-ci. Once CI and no-mistakes are green, this goes to Kun to merge or leave. It won't auto-merge, and nothing is waiting on you right now. Main's last run has Behavior portable serial 2 cancelled at the 30-minute ceiling (#7255). If that shard is the only red here, it mirrors main and isn't on you. |
…ture-done # Conflicts: # bin/fm-brief.sh
|
Speaking as Kun's firstmate: thank you @AgardnerAU for keeping this current. Since my 18 Oct note you merged main again (head |
|
Speaking as Kun's firstmate: @kunchenguid this one is ready for your merge-or-leave call. It's new-default: every generated Definition of done now leads with a @AgardnerAU nothing is needed from you; this is waiting on Kun, not you, and any merge conflict is ours to fix. |
Intent
start the upstream fixes now. we have capacity with codex.
Context: a read-only check on 2026-11-04 of our open upstream PRs found #3957 needs fleet work: GitHub reports it CONFLICTING with main at head 746f8bc although all 19 checks were green; the last maintainer note predates the conflict. The approved update is to merge current upstream main into the PR, fix the conflicts, run the tests, and push through the pipeline. Upstream kunchenguid/firstmate closes a PR after 14 days of author silence. Merging upstream is the maintainer's call, never ours. The PR is on branch
fm/fm-brief-dod-premature-donefrom the fork AgardnerAU/firstmate into kunchenguid:main; reuse that branch and that PR, never replace them.What Changed
bin/fm-dod-lib.shandbin/fm-brief.shnow opens with aTerminal condition:line. This line names the only legaldone:form for the task (for exampledone: PR {url} checks greenfor no-mistakes). The no-mistakes,pr=manual, and Gerrit no-mistakes briefs now hand off the implementation commit with the nonterminalworking [at=<epoch>]: implemented, ready for the pipelineline, not a pre-validationdone: {summary}. The removed "The task is complete only when committed on your branch" lines no longer let a local commit read as delivery. The rule 4 brief text also lets a Definition of done name aworking:line as its stop gate.status_is_captain_relevantinbin/fm-classify-lib.shnow treats that exactworking:handoff as captain-relevant, so the watcher and the away daemon both wake firstmate for it. A customFM_CAPTAIN_REcannot suppress this wake, and otherworking:lines (including near matches) stay nonterminal. A pre-validationdone:from an older brief is still accepted and not gated.docs/architecture.md,docs/configuration.md, and thefm-inactive-reconcile.shheader now describe the new handoff. New tests intests/fm-brief.test.shcover the brief changes. New tests intests/fm-daemon.test.shcheck that the handoff escalates under a customFM_CAPTAIN_REand that a non-exactworking:line does not.🤖 Generated with Claude Code
Risk Assessment
✅ Low: The round-1 fix brings the merged pr=manual no-mistakes block in line with the working-handoff contract (terminal condition line, nonterminal working handoff, no bare-commit done). No other scaffold in bin/, the skills or the docs still permits a pre-validation done, and the changed tests exercise the generated brief output for the manual row as well.
Testing
I ran the real brief scaffolder in a disposable FM_HOME for all seven ship and scout shapes, including the pr=manual block that review round 1 fixed. Every Definition of done opens with its mode-specific terminal condition. The three no-mistakes variants hand off with the
working:line, and no brief licenses a prematuredone: {summary}. I also drove the status classifier directly. The exact handoff wakes firstmate even under a restrictive FM_CAPTAIN_RE, while a near-match and normal progress lines are absorbed. The targeted brief and daemon test suites both passed with zero failures. There is no UI surface, so the evidence is CLI transcripts. The scratch directory /tmp/fm-brief-lab.Rq17WE was not removed because the sandbox did not permit therm. The worktree is clean.done: PR {url} checks greenas the only legal done and hands off with the working: lineworking [at=..]: implemented, ready for the pipeline: classifier wakes firstmate, even with a restrictive FM_CAPTAIN_REEvidence: Generated Definition of done per ship mode
Source: Generated Definition of done per ship mode
Evidence: Classifier decisions on worker status lines
Source: Classifier decisions on worker status lines
Evidence: Targeted brief and daemon test results
Source: Targeted brief and daemon test results
Pipeline
Updates from git push no-mistakes
✅ **Intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
bin/fm-dod-lib.sh:520- The merge brought in upstream's no-mistakespr=manualDefinition of done (fm_dod_manual_pr_block, added in feat(bin): add per-project pr=manual registry token for worker-written PR text #7937), but that block was not updated to this PR's completion contract. It still says "The task is complete only when committed on your branch." and "appenddone [at=<epoch>]: {summary}... and stop". It still has noTerminal condition:line and still calls that firstdone:the pipeline handoff (lines 518-524). So the premature-done failure this PR fixes can still happen: a no-mistakes ship on a project registeredpr=manual(fm_dod_block at bin/fm-dod-lib.sh:680) tells the worker to reportdone:on a bare local commit. This now also contradicts.agents/skills/validation-supervision/SKILL.md:11and.agents/skills/ship-landing/SKILL.md:19, which say every no-mistakes handoff isworking: implemented, ready for the pipeline. Fix: in the manual block, addTerminal condition: \done [at=<epoch>]: PR {url} checks green`. That is this task's ONLY legal `done:` line: a commit with no PR is not done.after the Ship branch line. Replace the three handoff lines with the sameCommit the finished implementation, then append `working [at=<epoch>]: implemented, ready for the pipeline` ...wording the auto and gerrit no-mistakes blocks use. Add a pr=manual row totest_definition_of_done_leads_with_its_terminal_condition` and to the no-done-handoff loop in tests/fm-brief.test.sh, because those tests claim to cover every scaffold but skip this one.bin/fm-classify-lib.sh:308- The handoff counts only when the note matchesimplemented, ready for the pipelineexactly.status_line_notetrims leading whitespace only, so a worker line with a trailing period, trailing space or CR, or extra words does not count as captain-relevant on the signal path. The worker then waits idle until stale or turn-end supervision surfaces it, instead of getting the intended immediate wake. This exact match is a deliberate choice (the daemon test pins that a near-match is rejected), so this is noted only as a tradeoff. Trimming trailing whitespace before the comparison would make it more robust without widening what matches.🔧 Fix applied.
1 info still open:
bin/fm-classify-lib.sh:308- The handoff counts only when the note matchesimplemented, ready for the pipelineexactly.status_line_notetrims leading whitespace only, so a worker line with a trailing period, trailing space or CR, or extra words does not count as captain-relevant on the signal path. The worker then waits idle until stale or turn-end supervision surfaces it, instead of getting the intended immediate wake. This exact match is a deliberate choice (the daemon test pins that a near-match is rejected), so this is noted only as a tradeoff. Trimming trailing whitespace before the comparison would make it more robust without widening what matches.✅ **Test** - passed
✅ No issues found.
done: PR {url} checks greenas the only legal done and hands off with the working: lineworking [at=..]: implemented, ready for the pipeline: classifier wakes firstmate, even with a restrictive FM_CAPTAIN_REbin/fm-brief.sh <id> some-proj --mode no-mistakes | --mode no-mistakes --pr manual | --mode no-mistakes --forge gerrit | --mode direct-PR | --mode direct-PR --forge gerrit | --mode local-only | --scoutin a disposable FM_HOME, Definition of done capturedgrep counts on every generated brief:done [at=<epoch>]: {summary},complete only when committed on your branch.,implemented, ready for the pipelinestatus_is_captain_relevantfrom sourced bin/fm-classify-lib.sh on handoff, stamped handoff, near-match, progress, and done lines, with and without FM_CAPTAIN_RE='^(blocked):'bash tests/fm-brief.test.sh(rc=0)bash tests/fm-daemon.test.sh(rc=0, includes the handle_wake pipeline-handoff routing test)✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.