Skip to content

fix(bin): carry no-mistakes ships into validation - #3135

Open
o2themar wants to merge 5 commits into
kunchenguid:mainfrom
o2themar:fm/firstmate-brief-done-without-validation
Open

fix(bin): carry no-mistakes ships into validation#3135
o2themar wants to merge 5 commits into
kunchenguid:mainfrom
o2themar:fm/firstmate-brief-done-without-validation

Conversation

@o2themar

@o2themar o2themar commented Aug 26, 2026

Copy link
Copy Markdown

Intent

Captain: "Rebase 3135" (ruled 2026-09-12, alongside closing #3318 and #3724).

Context for reading that ask: #3135 "fix(bin): carry no-mistakes ships into validation" is the captain's own open PR on the upstream firstmate repo (head ea2610a on the fork o2themar/firstmate, branch fm/firstmate-brief-done-without-validation). Its intent, from the PR body: a no-mistakes ship worker used to append a mid-task done: after committing and stop, waiting for firstmate to say "run /no-mistakes"; that burned one supervision round-trip per ship task and put a terminal done: in the status log on an unvalidated commit with no PR. The fix has the worker append working: implemented, starting validation and invoke /no-mistakes immediately, so the only done: is the terminal done: PR {url} checks green; AGENTS.md section 7 loses the handoff pause; tests/fm-brief.test.sh asserts each ship mode instructs exactly one done: line. A scout confirmed on 2026-09-12 that the defect is still verbatim on main (the no-mistakes definition-of-done block, now rendered from bin/fm-dod-lib.sh for both ordinary ship briefs and promoted scouts, still tells the worker to append done: {summary} and stop and that "Firstmate will then instruct you to run /no-mistakes"), so the PR is still needed and the captain wants it rebased onto current main and revalidated.

What Changed

  • Update no-mistakes ship definitions of done to record the implementation milestone as working: and immediately start /no-mistakes, leaving only the terminal PR-success done: report.
  • Align Firstmate validation guidance with the uninterrupted worker handoff, reserving manual validation startup for workers that stopped before starting it.
  • Add ship-brief coverage for the continuous validation flow and single done: instruction across delivery modes, and bound watcher-test teardown.

Risk Assessment

✅ Low: The generated no-mistakes contract now consistently carries workers into validation, including the promoted-scout path through its shared helper, while preserving the single CI-green terminal report.

Testing

Focused brief and watcher validation completed. The generated worker-facing Markdown confirms an implementation milestone of working: implemented, starting validation, immediate no-mistakes invocation, and only the CI-green PR report as terminal done:; the same contract was verified through scout promotion. No UI applies because this change’s end-user surface is CLI-generated worker instructions, captured as reviewer-visible artifacts.

Evidence: Generated no-mistakes worker Definition of done

Source: Generated no-mistakes worker Definition of done

Generated user-facing Definition of done
Source command: bin/fm-brief.sh evidence-no-mistakes demo-project --mode no-mistakes

# Definition of done
Delivery contract: mode=no-mistakes
This task ships **no-mistakes**: you validate and raise the PR yourself, in one continuous pass.
When the implementation is committed on your branch, append `working: implemented, starting validation` to the status file and invoke /no-mistakes right away - do not stop and do not wait to be told to start it.
The terminal report below is the only `done:` line this task ever gets.

You drive no-mistakes by responding to its gates, not by implementing fixes.
Follow the guidance no-mistakes itself provides for the mechanics: it loads when you invoke /no-mistakes, and `no-mistakes axi run --help` plus the `help` lines in each `axi` response are authoritative and version-matched to the installed binary.
When starting no-mistakes, pass `--intent` as only this brief's `## Captain's intent` subsection plus any later words the captain actually said.
For a legacy brief with no such subsection, include only words explicitly labeled `Captain:`, `Captain's words:`, `Captain's ask:`, or `Captain's intent:`; never copy its mixed `# Task` wholesale. If it has no provenance-marked captain words, stop and ask firstmate instead of starting no-mistakes.
Do not include `## Firstmate spec`, later Firstmate build constraints, or your own decisions and tradeoffs.
The `--intent` string you pass must be self-sufficient: that string plus the codebase must let a reader reconstruct roughly the same specification, without depending on a separate report, a PR, or context that lives only in this conversation.
When the captain's intent refers to a report, decision, or PR ("do items 1, 2, 3, and 7 of the report"), write the substance of the referenced items into `--intent` in the captain's terms, not only the pointer; that substance is the captain's ask by reference, while Firstmate's build instructions and your own decisions still stay out.
This replaces the no-mistakes skill's advice to enrich `--intent` with decisions and tradeoffs; that advice does not apply to Firstmate-dispatched work.
Do not hand-edit, commit, or fix findings yourself while a run is active - the pipeline applies every fix.

One drive call blocks until the next gate or outcome, which routinely outlives what your harness lets a single command run: Claude Code kills a command at ten minutes maximum, while one fix round is capped around thirty minutes and up to three rounds chain.
So background the drive call and poll `no-mistakes axi status` from a separate call instead of sitting in one blocking hold your harness will kill.
Where a harness's own command limit is not established, assume it bounds commands and use that same background-and-poll shape.
A killed or timed-out call is never evidence the daemon died: the daemon accepts your response immediately and runs the round in the background, so the call was only ever waiting for a read while the run kept working.
Reattach and keep going rather than reporting the pipeline blocked; rule 7 owns the checks that decide when a pipeline block is real.

Two firstmate-specific rules layer on top of that guidance:
- ask-user findings are never yours to answer: escalate to firstmate using rule 6's ask-user format and stop.
  Firstmate applies `ask-user-authority` and obtains any required captain decision.
  When the decision comes back, feed it to the gate with `no-mistakes axi respond` and let the pipeline apply it - do not route the question to "the user" or implement the fix yourself.
- NEVER pass `--yes` (or `-y`) to `no-mistakes axi run` or `no-mistakes axi respond`. It is banned fleet-wide.
  It auto-resolves every gate including ask-user findings with no escalation, and answering your own ask-user finding is a hard rule violation.

After /no-mistakes reports CI green (the CI-ready return point - do not wait for it to keep monitoring in the background until merge), append `done: PR {url} checks green` and stop. You are finished.
Evidence: Generated promoted-scout no-mistakes Definition of done

Source: Generated promoted-scout no-mistakes Definition of done

# Definition of done
Delivery contract: mode=no-mistakes
This task ships **no-mistakes**: you validate and raise the PR yourself, in one continuous pass.
When the implementation is committed on your branch, append `working: implemented, starting validation` to the status file and invoke /no-mistakes right away - do not stop and do not wait to be told to start it.
The terminal report below is the only `done:` line this task ever gets.

You drive no-mistakes by responding to its gates, not by implementing fixes.
Follow the guidance no-mistakes itself provides for the mechanics: it loads when you invoke /no-mistakes, and `no-mistakes axi run --help` plus the `help` lines in each `axi` response are authoritative and version-matched to the installed binary.
When starting no-mistakes, pass `--intent` as only this brief's `## Captain's intent` subsection plus any later words the captain actually said.
For a legacy brief with no such subsection, include only words explicitly labeled `Captain:`, `Captain's words:`, `Captain's ask:`, or `Captain's intent:`; never copy its mixed `# Task` wholesale. If it has no provenance-marked captain words, stop and ask firstmate instead of starting no-mistakes.
Do not include `## Firstmate spec`, later Firstmate build constraints, or your own decisions and tradeoffs.
The `--intent` string you pass must be self-sufficient: that string plus the codebase must let a reader reconstruct roughly the same specification, without depending on a separate report, a PR, or context that lives only in this conversation.
When the captain's intent refers to a report, decision, or PR ("do items 1, 2, 3, and 7 of the report"), write the substance of the referenced items into `--intent` in the captain's terms, not only the pointer; that substance is the captain's ask by reference, while Firstmate's build instructions and your own decisions still stay out.
This replaces the no-mistakes skill's advice to enrich `--intent` with decisions and tradeoffs; that advice does not apply to Firstmate-dispatched work.
Do not hand-edit, commit, or fix findings yourself while a run is active - the pipeline applies every fix.

One drive call blocks until the next gate or outcome, which routinely outlives what your harness lets a single command run: Claude Code kills a command at ten minutes maximum, while one fix round is capped around thirty minutes and up to three rounds chain.
So background the drive call and poll `no-mistakes axi status` from a separate call instead of sitting in one blocking hold your harness will kill.
Where a harness's own command limit is not established, assume it bounds commands and use that same background-and-poll shape.
A killed or timed-out call is never evidence the daemon died: the daemon accepts your response immediately and runs the round in the background, so the call was only ever waiting for a read while the run kept working.
Reattach and keep going rather than reporting the pipeline blocked; rule 7 owns the checks that decide when a pipeline block is real.

Two firstmate-specific rules layer on top of that guidance:
- ask-user findings are never yours to answer: escalate to firstmate using rule 6's ask-user format and stop.
  Firstmate applies `ask-user-authority` and obtains any required captain decision.
  When the decision comes back, feed it to the gate with `no-mistakes axi respond` and let the pipeline apply it - do not route the question to "the user" or implement the fix yourself.
- NEVER pass `--yes` (or `-y`) to `no-mistakes axi run` or `no-mistakes axi respond`. It is banned fleet-wide.
  It auto-resolves every gate including ask-user findings with no escalation, and answering your own ask-user finding is a hard rule violation.

After /no-mistakes reports CI green (the CI-ready return point - do not wait for it to keep monitoring in the background until merge), append `done: PR {url} checks green` and stop. You are finished.

Pipeline

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.

  • bin/fm-test-run.sh tests/fm-brief.test.sh tests/fm-watch-triage.test.sh
  • Generated no-mistakes, direct-PR, and local-only worker briefs via bin/fm-brief.sh under an isolated evidence home; each emitted Definition of done has exactly one done: instruction.
  • Promoted a scaffolded scout through bin/fm-promote.sh ... --mode no-mistakes --yolo off and captured the generated ship instructions; the promoted contract also has exactly one terminal done: instruction.
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

@greptile-apps

greptile-apps Bot commented Aug 26, 2026

Copy link
Copy Markdown

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Reviews (5): Last reviewed commit: "no-mistakes: apply CI fixes" | Re-trigger Greptile

@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: triage for #3135 (o2themar, fix(bin): carry ship briefs directly into validation).

Classification: corrective (within an already-chosen no-mistakes ship contract: removes a mid-task done: / firstmate handoff that burns a useless round-trip and misuses terminal done:).

VISION (per-rule, inspected evidence):

  • One captain, one interface — aligns. Diff removes a firstmate wake that only says “now run /no-mistakes” with no review; evidence: bin/fm-brief.sh DOD block + AGENTS.md Validate wording + tests/fm-brief.test.sh (test_ship_briefs_never_instruct_a_mid_task_stop).
  • Authority explicit / never inferred — aligns. No-mistakes delivery mode is already the captain’s contract; this does not invent a new autonomy grant. Evidence: only the no-mistakes DOD branch changes; direct-PR / local-only unchanged; tests require exactly one done: per ship mode.
  • Scripts own mechanics — aligns. Brief text + tests only; no agent-judgment script mix. Evidence: files touched AGENTS.md, bin/fm-brief.sh, tests/fm-brief.test.sh.
  • Restart is a non-event / Delegation with a spine / Fleet outlives vendor / Scope — aligns / n/a. No durability, vendor, or workshop-boundary change. Evidence: full diff reviewed (113 lines); no .github/workflows/*.

Security / fishy: none. Not a blocked author. No workflow RCE / pin / gate weakening.

Gates: mergeable=MERGEABLE. Cross-fork PR — approved first-time fork CI: runs 33018868161 (CI), 33018868136 (Require no-mistakes). After approval: PR must be raised via no-mistakes = fail (body has pipeline section but no no-mistakes-pipeline-attestation:v1 matching HEAD b9ec94712f8c…; review/test/document/lint were skipped in the body). Behavior CI still pending. No auto-merge.

ready-for-pr close? Body does not claim Fixes/Closes a ready-for-pr issue; treat as unstamped defect fix only.

Decision: waiting-ci / waiting-author for a pipeline re-push that stamps a matching attestation for current HEAD (and green CI). Not pinging; not escalating.

@o2themar o2themar changed the title fix(bin): carry ship briefs directly into validation fix(bin): carry no-mistakes briefs straight into validation Aug 26, 2026
@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate:

Recirc after newer-activity vs stamp 2026-08-26T22:20:00Z. VISION.md read in full from current main 22fa6ed90b0585280db8a87501c5d093ee40830a. HEAD moved to f1ec9cfc8b067fd20df167b9de84e7b1561014ee (last stamp was b9ec947). Whole thread read. Full diff re-reviewed: AGENTS.md Validate, bin/fm-brief.sh no-mistakes DOD, tests/fm-brief.test.sh (test_ship_briefs_never_instruct_a_mid_task_stop), plus CI-fix tests/fm-watch-triage.test.sh (reap now TERM-then-KILL bounded). No .github/workflows/*. Not disguised security. o2themar is not blocked.

Class: corrective. Removes a mid-task done: / firstmate handoff inside an already-chosen no-mistakes ship contract. Direct-PR and local-only unchanged. Inspected the DOD block and the generated-brief assertions (exactly one done: per ship mode).

VISION (per rule, inspected evidence):

  • One captain, one interface — aligns. Removes a firstmate wake that only said "now run /no-mistakes" with no review. Evidence: bin/fm-brief.sh DOD + AGENTS.md Validate + test_ship_briefs_never_instruct_a_mid_task_stop.
  • Authority is explicit — aligns. No new autonomy grant; no-mistakes mode is already the contract. Evidence: only the no-mistakes DOD branch changes.
  • Scripts own the mechanics — aligns. Brief text + tests only.
  • A restart is a non-event — aligns. Uses existing nonterminal working: rather than a new verb.
  • Delegation with a spine — aligns. Ship contract stays explicit; validation is no longer a guessed extra hop.
  • The fleet outlives any vendor — aligns.
  • Scope — aligns. Command-layer brief/Validate wording, not workshop.

#3141: body does not say Fixes/Closes #3141. Body + code is the help for #3141 (same defect: mid-task done: after commit; same fix: working: implemented, starting validation then /no-mistakes; fm-brief.sh hunk + AGENTS.md Validate). Not closing #3141 from this stamp.

First-time fork CI: already approved on the prior pass; current-HEAD CI is run 33023835966 (in_progress). Require-no-mistakes run 33023835998 failed.

Not merging. Attestation no-mistakes-pipeline-attestation:v1 still names b9ec94712f8c4fb03fd241283e229031f4984e6b, not this HEAD f1ec9cfc. Portable serial 1–4 still pending.

This is waiting on the author, not the captain. Re-run git push no-mistakes so the structured attestation matches current HEAD.

Merge-eligible: NO.

@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate:

Re-triage of newer activity. HEAD is now f1ec9cfc8b067fd20df167b9de84e7b1561014ee (CI-fix commits after last pass b9ec94712f8c). Whole thread + full diff reviewed. No .github/workflows/*. Not disguised security. o2themar is not blocked.

Class: corrective. The no-mistakes ship brief no longer asks for a mid-task terminal done: after the implementation commit; it reports working: and carries straight into /no-mistakes. Direct-PR and local-only still have exactly one done:. Extra CI-fix in tests/fm-watch-triage.test.sh bounds reap() teardown with a TERM-then-KILL grace so portable-serial cannot hang for ~17 minutes.

VISION (per rule, inspected evidence):

  • One captain, one interface — aligns. Removes a firstmate wake that only said "now run /no-mistakes" with no review. Evidence: bin/fm-brief.sh DOD block; AGENTS.md Validate; tests/fm-brief.test.sh test_ship_briefs_never_instruct_a_mid_task_stop.
  • Authority is explicit — aligns. No-mistakes delivery mode is already the captain's contract; this does not invent a new autonomy grant. Evidence: only the no-mistakes DOD branch changes; tests require exactly one done: per ship mode.
  • Scripts own the mechanics — aligns. Brief text + tests only.
  • A restart is a non-event / Delegation with a spine / Fleet outlives vendor / Scope — aligns. No durability, vendor, or workshop-boundary change. Evidence: files AGENTS.md, bin/fm-brief.sh, tests/fm-brief.test.sh, plus bounded reap() in tests/fm-watch-triage.test.sh.

Does not close #3141. Body has no Fixes/Closes keyword; #3141 is unlabeled and describes the same done: overload, naming this PR as the implementation. Adjacent file overlap with now-merged #3147 is tests/fm-watch-triage.test.sh (different hunk: reap() vs new afk tests) — rebase if GitHub reports a conflict.

First-time fork CI for this HEAD: approved runs 33023835966 (CI, now green) and 33023835998 (Require no-mistakes, failed).

Not merging. Waiting on the author, not the captain: body no-mistakes-pipeline-attestation:v1 is still b9ec94712f8c4fb03fd241283e229031f4984e6b and does not match HEAD f1ec9cfc. Re-run git push no-mistakes so the structured stamp lands on the current HEAD.

Merge-eligible: NO.

@pedro-hellohippo

Copy link
Copy Markdown

The only red check here is PR must be raised via no-mistakes, and it looks mechanical rather than a defect in the change.

The body's no-mistakes-pipeline-attestation:v1 names b9ec94712f8c4fb03fd241283e229031f4984e6b, but the branch head is now f1ec9cfc8b067fd20df167b9de84e7b1561014ee. That sha is a real ancestor, with three commits stacked on top of it after the stamp was written:

$ git merge-base --is-ancestor b9ec947 <pr-head> && echo ancestor
ancestor
$ git log --oneline b9ec947..<pr-head>
f1ec9cf no-mistakes: apply CI fixes
ffe084e no-mistakes: apply CI fixes
63e3f45 no-mistakes: apply CI fixes

So the attestation is valid for the commit it was written at and simply predates the CI fixes. A re-push through the pipeline (git push no-mistakes) so the stamp lands on the current head should turn that check green; nothing in the diff appears to need changing. This needs the fork's own pipeline, which is why it cannot be resolved from outside.

Corroborating evidence for the underlying defect, in case it is useful for prioritisation: another fleet independently hit this on 2026-08-27, seven times across six separate ship tasks in a single day. In each case the worker committed, reported done:, and stopped, then resumed correctly on a one-line nudge - the workers were following the generated brief exactly as written, which matches the read in #3141. The scaffold on main still emits two done: gates today:

$ ./bin/fm-brief.sh <id> <proj> --mode no-mistakes
$ sed -n '/^# Definition of done$/,$p' brief.md | grep -F 'append `done:'
When you believe it is complete, append `done: {summary}` to the status file and stop.
After /no-mistakes reports CI green (...), append `done: PR {url} checks green` and stop. You are finished.

Reproduced at 524994c. Posting as evidence only - this PR's shape already covers it, so we are not opening a competing change.

@o2themar
o2themar force-pushed the fm/firstmate-brief-done-without-validation branch from f1ec9cf to ea2610a Compare August 27, 2026 22:46
@o2themar o2themar changed the title fix(bin): carry no-mistakes briefs straight into validation fix(bin): carry no-mistakes ships into validation Aug 27, 2026
@tiago-peixoto

Copy link
Copy Markdown
Contributor

Rechecked the original defect on September 4 main: bin/fm-dod-lib.sh:205 still contains committed/intermediate done: and final green-PR completion within the no-mistakes instructions. This supports the corrective scope described by the maintainer for this PR and #3141: continue the already-selected validation path without an intermediate terminal handoff.

We can help with a bounded generated-brief regression that exercises that behavior while preserving direct-PR and local-only stopping rules. We will coordinate here rather than opening a competing implementation. This is evidence about current main, not a fresh review or readiness verdict on the PR's branch; the author's current-head validation and the maintainer's requested corrections still govern.

…pping

The generated no-mistakes definition of done told the worker to append a
`done:` line and stop after its implementation commit, then wait for
firstmate to say "now run the pipeline". Firstmate performs no review at
that point, so the pause bought nothing and cost a supervision
round-trip on every ship task.

It also asked for two `done:` lines for one task. `done:` is a terminal
state, and a ship task's `done:` means "ready to verify and tear down",
so a mid-task `done:` was indistinguishable from a finished task at the
exact moment the distinction matters: an unvalidated commit with no PR.

The worker now reports the implementation milestone with the existing
nonterminal `working:` state and invokes the pipeline immediately, so
the only `done:` on a no-mistakes ship task is the terminal CI-green
report. Every other rule in the block is unchanged.

AGENTS.md's Validate step is updated to match, since it was the one
cross-reference stating that firstmate triggers validation after the
implementation commit.
@o2themar
o2themar force-pushed the fm/firstmate-brief-done-without-validation branch from ea2610a to 6775fac Compare September 12, 2026 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants