Skip to content

fix(bin): start no-mistakes validation from worker after commit - #3

Open
BohnBawerick wants to merge 2 commits into
mainfrom
fm/fm-validation-self-start
Open

fix(bin): start no-mistakes validation from worker after commit#3
BohnBawerick wants to merge 2 commits into
mainfrom
fm/fm-validation-self-start

Conversation

@BohnBawerick

Copy link
Copy Markdown
Owner

Intent

Remove the intermediate validation handoff from firstmate's task lifecycle, so a worker starts its own validation run the moment its implementation is committed and only reports done when there is a PR. This is option (b) from fm-brief-no-mistakes-cli, approved by the captain on 2026-08-18.

Change AGENTS.md section 7 and the generated brief text in bin/fm-brief.sh that mirrors that handoff. Keep the change to the handoff itself. Do not reopen the option (a) wording that shipped separately in fm-brief-no-mistakes-cli, and do not redesign the status protocol.

Firstmate must still learn when validation starts and when it fails, without the handoff line: a nonterminal working: append at the moment the run starts, and a failed: or blocked: if the run dies mid-pipeline.

The gate contract is unchanged: the worker still stops at an ask-user finding, prints every finding verbatim, waits for one instruction naming the finding ids, never calls no-mistakes axi respond on a finding it was not told to answer, and never passes --yes. Phrase worker-facing text in terms of what the worker must do, never in terms of what firstmate will do for it.

The working path is the no-mistakes CLI (no-mistakes axi run --intent "..."); /no-mistakes is a firstmate skill and is absent in a crewmate worktree.

Cover the generated brief's new contract with a test that goes RED if the handoff text comes back or the start-your-own-run instruction disappears, and prove both directions. Keep bin/ shellcheck-clean. Report any sabotage that stays green.

Push to fork and validate against the PR there, where CI is real. Leave any upstream PR against origin alone. There is no direct-PR fallback. If the fork's main is stale as a PR base, report that as evidence, not a failure of this task.

What Changed

  • Updated AGENTS.md and bin/fm-brief.sh to remove the intermediate firstmate handoff, instructing workers to start the no-mistakes CLI validation pipeline immediately after committing implementation changes.
  • Updated brief templates and task lifecycle rules to append a nonterminal working: status line when validation begins, report failed: or blocked: on errors, and require a green PR before appending done:.
  • Replaced /no-mistakes skill references with direct no-mistakes CLI invocations across generated briefs and added contract tests in tests/fm-brief.test.sh to verify self-started validation.

Risk Assessment

✅ Low: The change cleanly removes the intermediate validation handoff in AGENTS.md and bin/fm-brief.sh in favor of worker self-start via the no-mistakes CLI, accompanied by comprehensive contract tests for the generated brief.

Testing

Exercised end-to-end brief generation across ship (no-mistakes, direct-PR, local-only), scout, and secondmate modes, verified that no-mistakes briefs instruct the worker to start its own validation immediately via the no-mistakes CLI without intermediate pre-PR done: handoffs, verified mid-pipeline failure reporting via blocked:/failed:, confirmed absence of /no-mistakes skill references, and proved test sensitivity in both directions via mutation testing.

Evidence: Validation Report

Source: Validation Report

# Validation Report: fm/fm-validation-self-start

## Executive Summary
This validation confirms Option (b) implementation from `fm-brief-no-mistakes-cli` removing the intermediate validation handoff from Firstmate's task lifecycle.

A worker agent now:
1. Immediately starts its own validation run after its implementation commit using the `no-mistakes` CLI on PATH (`no-mistakes axi run --intent "<...>"`).
2. Appends a nonterminal `working: starting no-mistakes validation` line to the status file when the run starts.
3. Does NOT append `done:` until there is a PR whose checks are green (`done: PR {url} checks green`).
4. Appends `blocked: {the exact error}` or `failed: {the exact error}` if the run dies mid-pipeline.
5. Handles ask-user findings via `needs-decision` escalation, never answers findings itself, and avoids `--yes`.
6. Uses `no-mistakes axi` CLI commands; references to the `/no-mistakes` skill (absent in crewmate worktrees) are removed.

## Test Proofs

### 1. Behavioral Test Suite
`./tests/fm-brief.test.sh` executes end-to-end scaffolding across modes (`no-mistakes`, `direct-PR`, `local-only`, `--scout`, `--secondmate`) and validates exact behavioral contracts via `test_no_mistakes_worker_starts_own_validation`.

All 21 test assertions pass cleanly.

### 2. Mutation / Sabotage Verification (Proving Both Directions)
- **Direction 1 (Old handoff text returns):**
  When the legacy handoff text (`Firstmate will then instruct you to run /no-mistakes`) was reintroduced, `tests/fm-brief.test.sh` went RED immediately (`not ok - explicit no-mistakes brief did not render the pipeline definition of done`).
- **Direction 2 (Self-start instruction missing):**
  When the self-start instruction (`When implementation is committed on your branch, start the no-mistakes pipeline yourself immediately.`) was removed, `tests/fm-brief.test.sh` went RED immediately (`not ok - explicit no-mistakes brief did not render the pipeline definition of done`).

### 3. Generated Brief Inspection
Generated brief output for `no-mistakes` mode confirms the exact Definition of Done:
`` `markdown
# Definition of done
Delivery contract: mode=no-mistakes
This mode is complete only when the no-mistakes pipeline has shipped a PR whose checks are green.
When implementation is committed on your branch, start the no-mistakes pipeline yourself immediately.
Append `working: starting no-mistakes validation` to the status file, then run the `no-mistakes` CLI on your `PATH`: `no-mistakes axi run --intent "<...>"` to start, and `no-mistakes axi respond` for each gate.
Do not append `done:` until there is a PR.

You drive no-mistakes by responding to its gates, not by implementing fixes.
Follow the guidance no-mistakes itself provides for the mechanics: `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, make `--intent` preserve all relevant content from this brief's `# Task` section plus every later accepted Firstmate requirement, clarification, constraint, exclusion, and supersession, carrying only each requirement's current accepted form; retain direct requirements instead of substituting a diff summary, and exclude generic operational, status, delivery, and other scaffold boilerplate unless it is task-specific.
Do not hand-edit, commit, or fix findings yourself while a run is active - the pipeline applies every fix.

Two firstmate-specific rules layer on top of that guidance:
- ask-user findings are never yours to answer: escalate to firstmate (rule 6) and stop.
  Firstmate applies the authority contract in its `AGENTS.md` 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.
- Avoid `--yes`: it would silently bypass firstmate's authority check and any required captain escalation.

If you cannot start or continue the run, append `blocked: {the exact error}` and stop, never `done:`.
If the run dies mid-pipeline, append `failed: {the exact error}` and stop, never stay silent.
After the run 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 Brief - no-mistakes Mode

Source: Generated Brief - no-mistakes Mode

You are a crewmate: an autonomous worker agent managed by firstmate. Work on your own; do not wait for a human.

# Task
{TASK}

# Herdr lifecycle declaration - NOT ENABLED
**HARD SAFETY GATE:** this scaffold cannot inspect the task text that replaces `{TASK}` later.
If the task will start, stop, delete, restart, profile, or otherwise drive Herdr lifecycle behavior, stop and regenerate the brief with `--herdr-lab` before dispatch.
Do not add Herdr lifecycle commands to this unguarded brief by hand.

# Setup
You are in a disposable git worktree of demo-project, at a detached HEAD on a clean default branch.

**Verify isolation before anything else.** Run `pwd -P` and `git rev-parse --show-toplevel`; both must resolve to the disposable task worktree you were launched in, such as a treehouse pool path or an Orca-managed worktree, not the primary checkout firstmate operates from.
The path check is authoritative: `git rev-parse --git-dir` and `git rev-parse --git-common-dir` can help inspect the repo, but they do not prove you are outside the primary checkout.
If the top-level path is the primary checkout or not the worktree you were launched in, STOP - do not branch or commit here - append `blocked: launched in primary checkout, not an isolated worktree` to the status file and stop.

1. First action: create your branch: `git checkout -b fm/test-nomistakes`
2. Run `no-mistakes doctor`; if it reports the repo is not initialized here, run `no-mistakes init`.

# Rules
1. Never push to the default branch. Never merge a PR.
2. Stay inside this worktree; modify nothing outside it.
3. Use gh-axi for GitHub operations and chrome-devtools-axi for browser operations.
4. Report status by appending one line:
   `echo "{state}: {one short line}" >> '/tmp/test-fm-brief-evidence-65442/state/test-nomistakes.status'`
   States: working, needs-decision, blocked, paused, done, failed.
   Each append wakes firstmate, so report sparingly: only phase changes a supervisor
   would act on (setup done, bug reproduced, fix implemented, validation passed) and the
   needs-decision/blocked/paused/done/failed states. No step-by-step FYI progress lines;
   firstmate reads your pane for that.
   A mid-task `working:` line (including setup complete) is nonterminal: do not end the
   turn after it; continue the same stage until a defined `done:` gate under Definition of done.
   Use `paused: {why}` - distinct from `blocked:` - ONLY when you are deliberately idling on a
   known external wait you expect to clear on its own (an upstream release, a rate-limit reset,
   a scheduled window): firstmate then leaves your idle pane alone and rechecks it on a long
   cadence instead of treating it as a possible wedge. Use `blocked:` when you are stuck and need help.
5. If you hit the same obstacle twice, append `blocked: {why}` and stop; firstmate will help.
6. If a decision belongs above the implementation worker (product choices, destructive actions, ask-user findings),
   append `needs-decision: {summary of options}` and stop. Firstmate will apply the configured authority and reply with the decision.
   A decision or blocker you opened stays open until a `resolved` line carrying its exact key lands; a later `done:` or `working:` line never closes it, even when the answer is what started that work.
   Firstmate's reply normally writes that closing line at answer time; when a blocker or wait clears WITHOUT a firstmate reply, append `resolved: {how it cleared}` yourself (same `[key=<slug>]` if you opened it with one) as you resume.
7. Never stop, restart, or update the shared `no-mistakes` daemon - it is one instance serving
   every lane/home, so restarting it kills other lanes' in-flight pipeline runs. On ANY no-mistakes
   daemon error, append `blocked: {the daemon error}` and stop; only firstmate manages the daemon.

# Project memory
If `AGENTS.md` or `CLAUDE.md` already exists, or if this task produced durable project-intrinsic knowledge, run `/home/paiva/.no-mistakes/worktrees/3437026af8a8/01M0B1AVKDKZA9A5DBD12CNP84/bin/fm-ensure-agents-md.sh .` in the worktree.
Record only project knowledge useful to almost every future session.
For anything the codebase already shows, prefer a pointer to the authoritative file, command, or doc over copying the detail.
If you touch a project `AGENTS.md` that lacks `## Maintaining this file`, add that short self-governance section from `/home/paiva/.no-mistakes/worktrees/3437026af8a8/01M0B1AVKDKZA9A5DBD12CNP84/bin/fm-ensure-agents-md.sh` in the same pass.
Keep it proportionate: skip `AGENTS.md` edits for trivial tasks that produced no durable project knowledge.

# Definition of done
Delivery contract: mode=no-mistakes
This mode is complete only when the no-mistakes pipeline has shipped a PR whose checks are green.
When implementation is committed on your branch, start the no-mistakes pipeline yourself immediately.
Append `working: starting no-mistakes validation` to the status file, then run the `no-mistakes` CLI on your `PATH`: `no-mistakes axi run --intent "<...>"` to start, and `no-mistakes axi respond` for each gate.
Do not append `done:` until there is a PR.

You drive no-mistakes by responding to its gates, not by implementing fixes.
Follow the guidance no-mistakes itself provides for the mechanics: `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, make `--intent` preserve all relevant content from this brief's `# Task` section plus every later accepted Firstmate requirement, clarification, constraint, exclusion, and supersession, carrying only each requirement's current accepted form; retain direct requirements instead of substituting a diff summary, and exclude generic operational, status, delivery, and other scaffold boilerplate unless it is task-specific.
Do not hand-edit, commit, or fix findings yourself while a run is active - the pipeline applies every fix.

Two firstmate-specific rules layer on top of that guidance:
- ask-user findings are never yours to answer: escalate to firstmate (rule 6) and stop.
  Firstmate applies the authority contract in its `AGENTS.md` 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.
- Avoid `--yes`: it would silently bypass firstmate's authority check and any required captain escalation.

If you cannot start or continue the run, append `blocked: {the exact error}` and stop, never `done:`.
If the run dies mid-pipeline, append `failed: {the exact error}` and stop, never stay silent.
After the run 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 Brief - direct-PR Mode

Source: Generated Brief - direct-PR Mode

You are a crewmate: an autonomous worker agent managed by firstmate. Work on your own; do not wait for a human.

# Task
{TASK}

# Herdr lifecycle declaration - NOT ENABLED
**HARD SAFETY GATE:** this scaffold cannot inspect the task text that replaces `{TASK}` later.
If the task will start, stop, delete, restart, profile, or otherwise drive Herdr lifecycle behavior, stop and regenerate the brief with `--herdr-lab` before dispatch.
Do not add Herdr lifecycle commands to this unguarded brief by hand.

# Setup
You are in a disposable git worktree of demo-project, at a detached HEAD on a clean default branch.

**Verify isolation before anything else.** Run `pwd -P` and `git rev-parse --show-toplevel`; both must resolve to the disposable task worktree you were launched in, such as a treehouse pool path or an Orca-managed worktree, not the primary checkout firstmate operates from.
The path check is authoritative: `git rev-parse --git-dir` and `git rev-parse --git-common-dir` can help inspect the repo, but they do not prove you are outside the primary checkout.
If the top-level path is the primary checkout or not the worktree you were launched in, STOP - do not branch or commit here - append `blocked: launched in primary checkout, not an isolated worktree` to the status file and stop.

1. First action: create your branch: `git checkout -b fm/test-directpr`

# Rules
1. Never push to the default branch (push only your `fm/test-directpr` branch). Never merge a PR.
2. Stay inside this worktree; modify nothing outside it.
3. Use gh-axi for GitHub operations and chrome-devtools-axi for browser operations.
4. Report status by appending one line:
   `echo "{state}: {one short line}" >> '/tmp/test-fm-brief-evidence-65442/state/test-directpr.status'`
   States: working, needs-decision, blocked, paused, done, failed.
   Each append wakes firstmate, so report sparingly: only phase changes a supervisor
   would act on (setup done, bug reproduced, fix implemented, validation passed) and the
   needs-decision/blocked/paused/done/failed states. No step-by-step FYI progress lines;
   firstmate reads your pane for that.
   A mid-task `working:` line (including setup complete) is nonterminal: do not end the
   turn after it; continue the same stage until a defined `done:` gate under Definition of done.
   Use `paused: {why}` - distinct from `blocked:` - ONLY when you are deliberately idling on a
   known external wait you expect to clear on its own (an upstream release, a rate-limit reset,
   a scheduled window): firstmate then leaves your idle pane alone and rechecks it on a long
   cadence instead of treating it as a possible wedge. Use `blocked:` when you are stuck and need help.
5. If you hit the same obstacle twice, append `blocked: {why}` and stop; firstmate will help.
6. If a decision belongs above the implementation worker (product choices, destructive actions, ask-user findings),
   append `needs-decision: {summary of options}` and stop. Firstmate will apply the configured authority and reply with the decision.
   A decision or blocker you opened stays open until a `resolved` line carrying its exact key lands; a later `done:` or `working:` line never closes it, even when the answer is what started that work.
   Firstmate's reply normally writes that closing line at answer time; when a blocker or wait clears WITHOUT a firstmate reply, append `resolved: {how it cleared}` yourself (same `[key=<slug>]` if you opened it with one) as you resume.
7. Never stop, restart, or update the shared `no-mistakes` daemon - it is one instance serving
   every lane/home, so restarting it kills other lanes' in-flight pipeline runs. On ANY no-mistakes
   daemon error, append `blocked: {the daemon error}` and stop; only firstmate manages the daemon.

# Project memory
If `AGENTS.md` or `CLAUDE.md` already exists, or if this task produced durable project-intrinsic knowledge, run `/home/paiva/.no-mistakes/worktrees/3437026af8a8/01M0B1AVKDKZA9A5DBD12CNP84/bin/fm-ensure-agents-md.sh .` in the worktree.
Record only project knowledge useful to almost every future session.
For anything the codebase already shows, prefer a pointer to the authoritative file, command, or doc over copying the detail.
If you touch a project `AGENTS.md` that lacks `## Maintaining this file`, add that short self-governance section from `/home/paiva/.no-mistakes/worktrees/3437026af8a8/01M0B1AVKDKZA9A5DBD12CNP84/bin/fm-ensure-agents-md.sh` in the same pass.
Keep it proportionate: skip `AGENTS.md` edits for trivial tasks that produced no durable project knowledge.

# Definition of done
Delivery contract: mode=direct-PR
This task ships **direct-PR**: you raise the PR yourself, without the no-mistakes pipeline.
The task is complete only when committed on your branch.
When it is implemented and committed, push your branch and open a PR with `gh-axi`, then append `done: PR {url}` to the status file and stop.
Do NOT run the no-mistakes pipeline. The configured merge authority decides whether to merge the PR; firstmate relays the outcome.
Evidence: Generated Brief - local-only Mode

Source: Generated Brief - local-only Mode

You are a crewmate: an autonomous worker agent managed by firstmate. Work on your own; do not wait for a human.

# Task
{TASK}

# Herdr lifecycle declaration - NOT ENABLED
**HARD SAFETY GATE:** this scaffold cannot inspect the task text that replaces `{TASK}` later.
If the task will start, stop, delete, restart, profile, or otherwise drive Herdr lifecycle behavior, stop and regenerate the brief with `--herdr-lab` before dispatch.
Do not add Herdr lifecycle commands to this unguarded brief by hand.

# Setup
You are in a disposable git worktree of demo-project, at a detached HEAD on a clean default branch.

**Verify isolation before anything else.** Run `pwd -P` and `git rev-parse --show-toplevel`; both must resolve to the disposable task worktree you were launched in, such as a treehouse pool path or an Orca-managed worktree, not the primary checkout firstmate operates from.
The path check is authoritative: `git rev-parse --git-dir` and `git rev-parse --git-common-dir` can help inspect the repo, but they do not prove you are outside the primary checkout.
If the top-level path is the primary checkout or not the worktree you were launched in, STOP - do not branch or commit here - append `blocked: launched in primary checkout, not an isolated worktree` to the status file and stop.

1. First action: create your branch: `git checkout -b fm/test-localonly`

# Rules
1. Never push to any remote and never open a PR. Work only on your `fm/test-localonly` branch; firstmate handles the merge into local `main`.
2. Stay inside this worktree; modify nothing outside it.
3. Use gh-axi for GitHub operations and chrome-devtools-axi for browser operations.
4. Report status by appending one line:
   `echo "{state}: {one short line}" >> '/tmp/test-fm-brief-evidence-65442/state/test-localonly.status'`
   States: working, needs-decision, blocked, paused, done, failed.
   Each append wakes firstmate, so report sparingly: only phase changes a supervisor
   would act on (setup done, bug reproduced, fix implemented, validation passed) and the
   needs-decision/blocked/paused/done/failed states. No step-by-step FYI progress lines;
   firstmate reads your pane for that.
   A mid-task `working:` line (including setup complete) is nonterminal: do not end the
   turn after it; continue the same stage until a defined `done:` gate under Definition of done.
   Use `paused: {why}` - distinct from `blocked:` - ONLY when you are deliberately idling on a
   known external wait you expect to clear on its own (an upstream release, a rate-limit reset,
   a scheduled window): firstmate then leaves your idle pane alone and rechecks it on a long
   cadence instead of treating it as a possible wedge. Use `blocked:` when you are stuck and need help.
5. If you hit the same obstacle twice, append `blocked: {why}` and stop; firstmate will help.
6. If a decision belongs above the implementation worker (product choices, destructive actions, ask-user findings),
   append `needs-decision: {summary of options}` and stop. Firstmate will apply the configured authority and reply with the decision.
   A decision or blocker you opened stays open until a `resolved` line carrying its exact key lands; a later `done:` or `working:` line never closes it, even when the answer is what started that work.
   Firstmate's reply normally writes that closing line at answer time; when a blocker or wait clears WITHOUT a firstmate reply, append `resolved: {how it cleared}` yourself (same `[key=<slug>]` if you opened it with one) as you resume.
7. Never stop, restart, or update the shared `no-mistakes` daemon - it is one instance serving
   every lane/home, so restarting it kills other lanes' in-flight pipeline runs. On ANY no-mistakes
   daemon error, append `blocked: {the daemon error}` and stop; only firstmate manages the daemon.

# Project memory
If `AGENTS.md` or `CLAUDE.md` already exists, or if this task produced durable project-intrinsic knowledge, run `/home/paiva/.no-mistakes/worktrees/3437026af8a8/01M0B1AVKDKZA9A5DBD12CNP84/bin/fm-ensure-agents-md.sh .` in the worktree.
Record only project knowledge useful to almost every future session.
For anything the codebase already shows, prefer a pointer to the authoritative file, command, or doc over copying the detail.
If you touch a project `AGENTS.md` that lacks `## Maintaining this file`, add that short self-governance section from `/home/paiva/.no-mistakes/worktrees/3437026af8a8/01M0B1AVKDKZA9A5DBD12CNP84/bin/fm-ensure-agents-md.sh` in the same pass.
Keep it proportionate: skip `AGENTS.md` edits for trivial tasks that produced no durable project knowledge.

# Definition of done
Delivery contract: mode=local-only
This task ships **local-only**: no remote, no PR, no pipeline.
The task is complete only when committed on your branch `fm/test-localonly`. Do NOT push, do NOT open a PR, do NOT merge.
Keep your branch a clean fast-forward onto the current default branch - if `main` has advanced, rebase onto it so the eventual merge stays a fast-forward.
When it is implemented and committed, append `done: ready in branch fm/test-localonly` to the status file and stop.
The configured merge authority approves the ready branch, then firstmate merges it into local `main` through the guarded fast-forward path.
Evidence: Test Suite Passing Output

Source: Test Suite Passing Output

ok - fm-brief.sh: bash -n succeeds
/tmp/fm-brief.qh5YmU/heredoc-in-substitution.sh:2
ok - fm-brief.sh: no heredoc is nested inside a command substitution (Bash 3.2 parse-safe)
ok - fm-brief.sh: --help renders the complete header
ok - fm-brief.sh: no-mistakes/direct-PR/local-only briefs generate cleanly
ok - fm-brief.sh: ship --mode is required and closed-set validated
ok - fm-brief.sh: the explicit ship mode wins over the registered posture
ok - fm-brief.sh: --yolo and scout/secondmate --mode are refused, never silently dropped
ok - fm-brief.sh: faster paths use configured authority without stacked review
ok - fm-brief.sh: no-mistakes DOD keeps its apostrophe prose, now parse-safe
ok - fm-brief.sh: no-mistakes DOD starts its own run and never emits a pre-PR done:
ok - fm-brief.sh: ship project-memory wording carries the AGENTS.md authoring bar
ok - fm-brief.sh: --herdr-lab emits the complete hard safety contract
ok - fm-brief.sh: --herdr-lab uses its quoted Firstmate-owned helper path
ok - fm-brief.sh: ship and scout scaffolds make omitted Herdr intent fail-visible
ok - fm-brief.sh: Herdr lab contract covers scouts and rejects secondmate misuse
ok - fm-brief.sh: --no-projects scaffolds a project-less charter and guards misuse
ok - fm-brief.sh: marked requests avoid generic acknowledgements and preserve material reporting
ok - fm-brief.sh: relative directory inputs ignore CDPATH, render stable absolute charter paths, or fail loudly
ok - fm-brief.sh: custom pause verb renders in every scaffold
ok - fm-brief.sh: investigation and visual-review completions load the shared decision policy
ok - fm-brief: scout and secondmate code paths still scaffold well-formed briefs
Evidence: Sabotage Direction 1 RED Output (Handoff Restored)

Source: Sabotage Direction 1 RED Output (Handoff Restored)

ok - fm-brief.sh: bash -n succeeds
/tmp/fm-brief.N3TMPb/heredoc-in-substitution.sh:2
ok - fm-brief.sh: no heredoc is nested inside a command substitution (Bash 3.2 parse-safe)
ok - fm-brief.sh: --help renders the complete header
ok - fm-brief.sh: no-mistakes/direct-PR/local-only briefs generate cleanly
ok - fm-brief.sh: ship --mode is required and closed-set validated
not ok - explicit no-mistakes brief did not render the pipeline definition of done
Evidence: Sabotage Direction 2 RED Output (Self-Start Missing)

Source: Sabotage Direction 2 RED Output (Self-Start Missing)

ok - fm-brief.sh: bash -n succeeds
/tmp/fm-brief.ZUkoZZ/heredoc-in-substitution.sh:2
ok - fm-brief.sh: no heredoc is nested inside a command substitution (Bash 3.2 parse-safe)
ok - fm-brief.sh: --help renders the complete header
ok - fm-brief.sh: no-mistakes/direct-PR/local-only briefs generate cleanly
ok - fm-brief.sh: ship --mode is required and closed-set validated
not ok - explicit no-mistakes brief did not render the pipeline definition of done

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.

  • ./tests/fm-brief.test.sh
  • bash tests/fm-ask-user-authority.test.sh
  • bash tests/fm-gate-refuse.test.sh
  • bash tests/fm-task-delivery.test.sh
  • bash tests/fm-ensure-agents-md.test.sh
  • ./bin/fm-brief.sh test-nomistakes demo-project --mode no-mistakes
  • ./bin/fm-brief.sh test-directpr demo-project --mode direct-PR
  • ./bin/fm-brief.sh test-localonly demo-project --mode local-only
  • ./bin/fm-brief.sh test-scout demo-project --scout
  • FM_SECONDMATE_CHARTER='...' ./bin/fm-brief.sh test-secondmate --secondmate --no-projects
  • Dual-direction mutation testing against bin/fm-brief.sh to prove RED when restoring legacy handoff text or removing self-start instructions
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

kunchenguid and others added 2 commits August 18, 2026 00:05
…chenguid#2570)

* fix(bin): report remote secondmate delivery and state truthfully

A steer to a remote secondmate crosses fm-on.sh to a host-local fm-send
leg whose unconfirmed submit read-back (verdict=pending, typically a busy
mate whose harness queues the steer) was flattened into exit 1, so the
parent printed "error: text not submitted" / "error: text not sent" and
discarded the pending-reply expectation for a steer that had actually
landed. fm-send now carries the verdict across the ssh boundary as a
documented delivered-unconfirmed exit 3: the parent reports the steer as
delivered with confirmation pending, exits 0, keeps the expectation armed
(awaiting_report), and closes --resolve-key decisions, while transport
loss (ssh 255) and real remote failures keep failing loudly with the
remote leg's stderr attached. A local unconfirmed submit now also exits 3
with an honest non-error message and still never closes a decision key.

fm-crew-state.sh and fm-peek.sh no longer read a remote mate's endpoint
through local probes (which misreported a healthy mate as "worktree gone"
/ "can't find session: remote"): both now use the true remote source over
fm-on.sh, and an unreachable or unreadable remote reads as unknown-remote,
never as gone or dead.

* no-mistakes(document): Document remote delivery and state truth

* no-mistakes: apply CI fixes
Remove the intermediate pre-PR done: handoff. The implementation worker
starts its own no-mistakes CLI run immediately after the commit, reports
working: when that run starts, and reports done: only with a PR.
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.

2 participants