Skip to content

fix(bin): keep operator-address labels out of no-mistakes intent - #4445

Merged
kunchenguid merged 3 commits into
kunchenguid:mainfrom
tiago-peixoto:fm/fm-3882-intent-operator-address
Sep 14, 2026
Merged

kunchenguid merged 3 commits into
kunchenguid:mainfrom
tiago-peixoto:fm/fm-3882-intent-operator-address

Conversation

@tiago-peixoto

@tiago-peixoto tiago-peixoto commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Intent

Fix #3882, which the maintainer confirmed on main and labeled ready-for-pr (contract class restore).

The problem: firstmate composes operator-address spellings into the text it sends into the no-mistakes pipeline as --intent, and no-mistakes publishes --intent verbatim in the generated pull request body's ## Intent section, so internal operator-address reaches public pull request bodies on merged PRs.
The spellings are Captain:, Captain's words:, Captain's ask:, Captain's intent: and Captain, ....
On one path firstmate requires them: for a legacy brief, fm_brief_marked_captain_words in bin/fm-dod-lib.sh selects the captain's words by exactly those labels, the Definition-of-done contract text names the four labels, and bin/fm-spawn.sh refuses a brief that lacks one, telling the operator to add Captain: lines.
The always-on downstream scrub that would have masked this in no-mistakes was closed unmerged on the judgement that the emission should stop upstream in firstmate, so this is firstmate's to fix and not a matter of scrubbing generated output.

The maintainer's accepted scope: stop emitting those spellings into pipeline input while keeping the captain's words and machine-readable provenance.
From the issue, a fix must satisfy all of these:
no operator-address spellings in any text firstmate composes into no-mistakes pipeline input, which is the ## Captain's intent body, the launch-brief intent overlay, the Definition-of-done contract text, and the mid-task relay path AGENTS.md describes;
captain provenance stays machine-readable, so a replacement marker or selector contract lands coherently with the legacy selector in bin/fm-dod-lib.sh and the spawn refusal in bin/fm-spawn.sh;
the Definition-of-done text naming the four labels changes in the same pass;
the captain's actual words still reach --intent intact, because no-mistakes review uses the intent to separate deliberate decisions from mistakes, so only the operator-address spellings are the defect;
existing coverage moves with the change, including the tests/fm-task-delivery.test.sh fixtures that use labeled lines and assert the authorized-intent overlay section.

Firstmate's chat-facing address style in AGENTS.md is out of scope.
The change is bounded to what firstmate writes into pipeline input.

Follow the repository's CONTRIBUTING.md and AGENTS.md.

What Changed

  • bin/fm-spawn.sh and bin/fm-promote.sh now stop with an error if any line under ## Captain's intent starts with Captain:, Captain's words:, Captain's ask:, Captain's intent: or Captain,. The error names the offending line, and the brief file is left unchanged. A label that appears mid-line is still accepted. The check lives in a new helper, fm_brief_intent_address_line, in bin/fm-dod-lib.sh.
  • Legacy mixed # Task briefs now mark captain lines with a neutral [captain] prefix. fm_brief_marked_captain_words strips that prefix and returns only the words, and it can still read the old Captain:-style labels. The spawn error for a brief with no marked lines now says to add [captain] lines instead of Captain: lines.
  • The Definition-of-done text no longer lists the four labels. Along with the launch-brief intent overlay, it tells workers to pass the subsection's words (not its heading) and not to add speaker labels or direct address; the overlay's contract prose now sits above the authorized-intent heading. The AGENTS.md mid-task relay rule and the ownership comments in fm-brief.sh, fm-dod-lib.sh, fm-spawn.sh and fm-promote.sh say the same. Test fixtures in tests/fm-task-delivery.test.sh now use [captain], and new tests check that authorized intent matches the captain's words exactly and that addressed lines are refused. tests/fm-brief.test.sh checks that the rendered contract no longer contains any of the address spellings.

Risk Assessment

✅ Low: The change stays within its intent: guidance and DoD wording no longer name the labels, and legacy briefs use a neutral [captain] marker while old labels still get stripped. The only new mechanics are a fail-closed, non-rewriting refusal at the shared spawn/promote boundary and an overlay reorder. Tests cover the labeled-body refusal, mid-line mentions, promotion, and legacy selectors, and I traced them to the outcomes they assert.

Testing

I drove the real firstmate CLI end to end in a throwaway home on both the target and base commits. On the target commit, every scenario passed: the scaffolded contract, spawn serialization of plain words with nested subheadings, refusal of the five address spellings (including indented lines, lines under a nested subheading, and a scout spawn), acceptance of labels mentioned mid-line, promote refusal and clean promotion, and the legacy [captain] path with compatibility for stored labels. On the base commit, labeled bodies leaked into the authorized-intent section and into promoted ship instructions. A fake tmux stopped each spawn only at backend creation, after launch-brief.md was already written; its logged has-session call shows where each spawn stopped. The targeted fm-task-delivery and fm-brief subjects pass, and the new delivery test fails against the base scripts. Two scenarios were not driven. The downstream no-mistakes PR ## Intent rendering needs a real pipeline run, which this phase may not start. The mid-task relay is text the firstmate model writes in a live session. There is no UI surface, so the evidence is CLI transcripts, not screenshots.

  • Live validation: ✅ go - 6 of 8 scenarios driven live against the product
Scenario Result Live Evidence
Scaffolding a no-mistakes ship brief with fm-brief.sh gives a Definition-of-done --intent contract that names no Captain labels and uses the neutral [captain] marker for legacy briefs ✅ pass live cli-transcript-head.txt S1: 0 lines with operator-address spellings, contract names [captain] marker; cli-transcript-base-036fec0.txt S1 still lists Captain:, Captain's words:, Captain's ask:…
A brief with plain captain words (lead-in, nested ### Item subheadings, code, quotes) spawned as a no-mistakes ship yields a launch-brief whose ## Captain intent authorized for --intent section is b… ✅ pass live cli-transcript-head.txt S2: IDENTICAL, 0 label lines, overlay prose 'Use everything under ## Captain intent authorized for --intent through the end of this brief, including any nested subheadings'
Adversarial: a Captain's intent body line starting with Captain:, Captain's words:, Captain's ask:, Captain's intent:, Captain, (also indented, under a nested ### subheading, and on a scout spawn) mak… ✅ pass live cli-transcript-head.txt S3: all 8 cases exit=1 with the operator-address refusal, backend not reached, launch-brief absent, brief sha unchanged; cli-transcript-base-036fec0.txt S3: same inputs were PU…
Captain's words that mention the labels mid-line are accepted and serialized verbatim (not scrubbed), and a Captain: line under ## Firstmate spec is neither scanned nor copied into intent ✅ pass live cli-transcript-head.txt S4: 0 refusals, spawn reached backend, authorized section IDENTICAL to body
Promoting a scout whose Captain's intent starts with Captain's ask: is refused with the task record left as kind=scout and no ship-instructions; a clean scout promotes and its ship-instructions carr… ✅ pass live cli-transcript-head.txt S5 (refused, meta kind=scout, ship-instructions absent; clean promote exit=0, 0 label lines); cli-transcript-base-036fec0.txt S5 shows the labeled scout promoted to kind=ship
Legacy mixed # Task briefs: [captain] lines reach --intent without the prefix or spec lines, previously stored Captain labels are still read with labels stripped, and an unmarked brief's refusal tel… ✅ pass live cli-transcript-head.txt S6; base transcript shows [captain] rejected and the refusal saying 'add Captain: lines'
A dispatched worker passes the authorized intent to no-mistakes and the generated PR body's ## Intent section contains the captain's words with no operator-address spellings ⏸️ untested no Needs a live worker agent to run no-mistakes axi run against a GitHub remote and open a PR. This gate phase is forbidden from starting axi run or another pipeline. To cover it, dispatch a real first…
When the captain adds an ask mid-task, firstmate appends the words to ## Captain's intent without speaker labels and relays them to the worker ⏸️ untested no The relay text is written by the firstmate model in a live captain session. Driving it needs a running firstmate session with a spawned worker in a real tmux/herdr endpoint and a captain message. The…
Evidence: CLI driver script (fm-brief/fm-spawn/fm-promote scenarios S1-S6)

Source: CLI driver script (fm-brief/fm-spawn/fm-promote scenarios S1-S6)

#!/usr/bin/env bash
# Drives firstmate's real CLI (fm-brief.sh, fm-spawn.sh, fm-promote.sh) against an
# isolated FM_HOME to show what text reaches no-mistakes pipeline input.
# Usage: drive-intent-cli.sh <firstmate-root> <label>
# Spawn runs the real script end to end through validation and launch-brief.md
# publication; a refusing `tmux` on PATH stops it only at backend creation so no
# real agent window or worktree is created.
set -u
ROOT=$1 LABEL=$2
W=$(mktemp -d "${TMPDIR:-/tmp}/fm-intent-drive.XXXXXX")
trap 'rm -rf "$W"' EXIT
HOME_DIR="$W/home" PROJ="$W/projects/proj" FAKEBIN="$W/bin"
mkdir -p "$HOME_DIR/data" "$HOME_DIR/state" "$HOME_DIR/config" "$PROJ" "$FAKEBIN"
export GIT_CONFIG_GLOBAL=/dev/null GIT_CONFIG_NOSYSTEM=1 FM_GATE_REFUSE_BYPASS=1
unset FM_TASK_ID TASKS_AXI_FILE TASKS_AXI_BACKEND
git -C "$PROJ" init -q
printf '#!/bin/sh\necho "tmux $*" >> "%s/tmux.log"\nexit 1\n' "$W" > "$FAKEBIN/tmux"; chmod +x "$FAKEBIN/tmux"
umask 022

hr() { printf '\n==================== [%s] %s ====================\n' "$LABEL" "$*"; }
spawn() {
  FM_ROOT_OVERRIDE='' FM_HOME="$HOME_DIR" FM_STATE_OVERRIDE="$HOME_DIR/state" FM_DATA_OVERRIDE="$HOME_DIR/data" \
    FM_PROJECTS_OVERRIDE="$W/projects-unused" FM_CONFIG_OVERRIDE="$HOME_DIR/config" \
    FM_SPAWN_NO_GUARD=1 FM_BACKEND=tmux PATH="$FAKEBIN:$PATH" "$ROOT/bin/fm-spawn.sh" "$@" 2>&1
}
promote() {
  FM_HOME="$HOME_DIR" FM_STATE_OVERRIDE="$HOME_DIR/state" FM_DATA_OVERRIDE="$HOME_DIR/data" \
    "$ROOT/bin/fm-promote.sh" "$@" 2>&1
}
scaffold() {  # <id> [--scout|--mode m]
  local id=$1; shift
  FM_HOME="$HOME_DIR" "$ROOT/bin/fm-brief.sh" "$id" proj "$@" >/dev/null 2>&1
}
fill() {  # <file> <intent> <spec>
  local c; c=$(cat "$1"); c=${c//'{TASK}'/$2}; c=${c//'{FIRSTMATE_SPEC}'/$3}; printf '%s\n' "$c" > "$1"
}
authorized() { awk '$0 == "## Captain intent authorized for --intent" { e=1; next } e { print }' "$1"; }
labels_in() {  # <file>: count lines carrying an operator-address spelling anywhere
  grep -cE "Captain:|Captain's (words|ask|intent):|Captain," "$1" || true
}
show_result() {  # <id> <exit>
  printf 'exit=%s\n' "$2"
  if [ -s "$W/tmux.log" ]; then echo "backend reached (spawn passed validation): $(head -1 "$W/tmux.log")"; else echo "backend reached: no (spawn stopped before backend creation)"; fi
  rm -f "$W/tmux.log"
  [ -f "$HOME_DIR/data/$1/launch-brief.md" ] && echo "launch-brief.md: PUBLISHED" || echo "launch-brief.md: absent"
  [ -f "$HOME_DIR/state/$1.meta" ] && echo "state/$1.meta: WRITTEN" || echo "state/$1.meta: absent"
}

hr "S1 scaffold no-mistakes ship brief: Definition-of-done --intent contract"
scaffold s1 --mode no-mistakes
grep -n -- "--intent\|legacy brief\|provenance" "$HOME_DIR/data/s1/brief.md"
echo "lines with operator-address spellings in scaffolded brief: $(labels_in "$HOME_DIR/data/s1/brief.md")"

hr "S2 modern brief with plain captain words incl. nested ### subheadings -> spawn"
scaffold s2 --mode no-mistakes
WORDS=$(cat <<'EOF'
Do items 1 and 7 of the report, and don't touch the watcher.
\### Item 1: session floor
The fold refuses sessions under `min_floor=3`; keep the refusal but log it.
\### Item 7: PR body
Stop the "Intent" section from leaking internal chat vocabulary.
EOF
)
fill "$HOME_DIR/data/s2/brief.md" "$WORDS" 'Build constraint: add a regression test first.'
out=$(spawn s2 "$PROJ" claude --mode no-mistakes --yolo off); st=$?
show_result s2 "$st"
echo "--- overlay contract section of launch-brief.md ---"
awk '/^# Current no-mistakes intent contract/{e=1} e' "$HOME_DIR/data/s2/launch-brief.md"
echo "--- comparison: authorized --intent section vs ## Captain's intent body ---"
if [ "$(authorized "$HOME_DIR/data/s2/launch-brief.md")" = "$WORDS" ]; then echo "IDENTICAL (words intact, nested subheadings kept, no spec, no labels)"; else echo "DIFFERENT"; fi
echo "lines with operator-address spellings in launch-brief.md: $(labels_in "$HOME_DIR/data/s2/launch-brief.md")"

hr "S3 adversarial: ## Captain's intent body line opening with each address spelling -> spawn"
n=0
for marker in 'Captain:' "Captain's words:" "Captain's ask:" "Captain's intent:" 'Captain,' '   Captain:'; do
  n=$((n + 1)); id="s3-$n"
  scaffold "$id" --mode no-mistakes
  fill "$HOME_DIR/data/$id/brief.md" "Fix the fold refusal.
$marker keep the successful session path unchanged." 'Reproduce first.'
  before=$(shasum "$HOME_DIR/data/$id/brief.md" | cut -d' ' -f1)
  echo "--- marker <$marker> ---"
  out=$(spawn "$id" "$PROJ" claude --mode no-mistakes --yolo off); st=$?
  printf '%s\n' "$out" | sed "s#$HOME_DIR#<FM_HOME>#g" | tail -1
  show_result "$id" "$st"
  [ ! -f "$HOME_DIR/data/$id/launch-brief.md" ] || { echo "LEAKED into authorized --intent:"; authorized "$HOME_DIR/data/$id/launch-brief.md" | sed -n '1,2p' | sed 's/^/  | /'; }
  [ "$before" = "$(shasum "$HOME_DIR/data/$id/brief.md" | cut -d' ' -f1)" ] && echo "brief.md: unchanged (not scrubbed)" || echo "brief.md: MODIFIED"
done
echo "--- labeled line nested under a ### subheading inside ## Captain's intent ---"
scaffold s3-nested --mode no-mistakes
fill "$HOME_DIR/data/s3-nested/brief.md" "Do item 7.
\### Item 7
Captain: stop the leak." 'Spec.'
out=$(spawn s3-nested "$PROJ" claude --mode no-mistakes --yolo off); st=$?
printf '%s\n' "$out" | sed "s#$HOME_DIR#<FM_HOME>#g" | tail -1; show_result s3-nested "$st"
echo "--- same scenario as a scout spawn (shared boundary) ---"
scaffold s3-scout --scout
fill "$HOME_DIR/data/s3-scout/brief.md" "Captain, investigate the refusal." 'Spec.'
out=$(spawn s3-scout "$PROJ" claude --scout); st=$?
printf '%s\n' "$out" | sed "s#$HOME_DIR#<FM_HOME>#g" | tail -1; show_result s3-scout "$st"

hr "S4 labels mentioned mid-line (and under ## Firstmate spec) are accepted verbatim"
scaffold s4 --mode no-mistakes
WORDS=$(cat <<'EOF'
Stop composing Captain:, Captain's words:, Captain's ask:, and Captain's intent: into PR bodies.
Keep the literal example `Captain, hello` in the docs.
EOF
)
fill "$HOME_DIR/data/s4/brief.md" "$WORDS" 'Captain: this spec line is not scanned and never becomes intent.'
out=$(spawn s4 "$PROJ" claude --mode no-mistakes --yolo off); st=$?
printf '%s\n' "$out" | grep -c "operator-address line" | sed 's/^/operator-address refusals: /'
show_result s4 "$st"
echo "--- authorized --intent section ---"; authorized "$HOME_DIR/data/s4/launch-brief.md"
[ "$(authorized "$HOME_DIR/data/s4/launch-brief.md")" = "$WORDS" ] && echo "IDENTICAL to ## Captain's intent body (not scrubbed; spec excluded)" || echo "DIFFERENT"

hr "S5 promote a scout whose ## Captain's intent opens with an address label"
id=s5-bad; scaffold "$id" --scout
fill "$HOME_DIR/data/$id/brief.md" "Captain's ask: investigate the refusal." 'Reproduce it first.'
printf 'window=fm-%s\nkind=scout\nworktree=/tmp/wt\n' "$id" > "$HOME_DIR/state/$id.meta"
out=$(promote "$id" --mode no-mistakes --yolo off); st=$?
printf '%s\n' "$out" | sed "s#$HOME_DIR#<FM_HOME>#g" | tail -1
echo "exit=$st"; cat "$HOME_DIR/state/$id.meta" | sed 's/^/meta: /'
[ -f "$HOME_DIR/data/$id/ship-instructions.md" ] && echo "ship-instructions.md: PUBLISHED" || echo "ship-instructions.md: absent"
echo "--- promote a scout with plain words ---"
id=s5-good; scaffold "$id" --scout
fill "$HOME_DIR/data/$id/brief.md" "Investigate the refusal and keep the successful path." 'Reproduce it first.'
printf 'window=fm-%s\nkind=scout\nworktree=/tmp/wt\n' "$id" > "$HOME_DIR/state/$id.meta"
out=$(promote "$id" --mode no-mistakes --yolo off); st=$?
printf '%s\n' "$out" | sed "s#$HOME_DIR#<FM_HOME>#g" | head -2
echo "exit=$st"
sed -n '/^## Captain.s intent/,/^## Firstmate spec/p' "$HOME_DIR/data/$id/ship-instructions.md"
grep -n -- "--intent\|legacy brief" "$HOME_DIR/data/$id/ship-instructions.md"
echo "lines with operator-address spellings in ship-instructions.md: $(labels_in "$HOME_DIR/data/$id/ship-instructions.md")"

rm -f "$W/tmux.log"
hr "S6 legacy mixed # Task briefs (no subsections)"
legacy() {  # <id> <task-body>
  mkdir -p "$HOME_DIR/data/$1"
  printf '# Task\n%s\n\n# Definition of done\nDelivery contract: mode=no-mistakes\n' "$2" > "$HOME_DIR/data/$1/brief.md"
}
legacy s6-marker "[captain] Fix the legacy dispatch boundary.
Do not copy this Firstmate-authored constraint into intent.
[captain] Keep existing sessions working."
out=$(spawn s6-marker "$PROJ" claude --mode no-mistakes --yolo off); st=$?
show_result s6-marker "$st"; echo "--- authorized --intent ([captain] marker) ---"; authorized "$HOME_DIR/data/s6-marker/launch-brief.md"
legacy s6-stored "Captain's words: Fix the legacy dispatch boundary.
Do not copy this constraint.
Captain: Keep existing sessions working."
out=$(spawn s6-stored "$PROJ" claude --mode no-mistakes --yolo off); st=$?
show_result s6-stored "$st"; echo "--- authorized --intent (previously stored labels, compat) ---"; authorized "$HOME_DIR/data/s6-stored/launch-brief.md"
legacy s6-none "Fix the legacy dispatch boundary with no provenance marks."
out=$(spawn s6-none "$PROJ" claude --mode no-mistakes --yolo off); st=$?
echo "--- unmarked legacy refusal ---"; printf '%s\n' "$out" | tail -1; show_result s6-none "$st"
Evidence: CLI transcript on target commit 4385a65 (fix)

Source: CLI transcript on target commit 4385a65 (fix)


==================== [HEAD-4385a65] S1 scaffold no-mistakes ship brief: Definition-of-done --intent contract ====================
86:When starting no-mistakes, pass `--intent` as only this brief's `## Captain's intent` subsection body, not its heading, plus any later words the captain actually said.
87:Preserve the actual words without adding speaker labels or direct address; the subsection heading supplies provenance outside the pipeline input.
88:For a legacy brief with no such subsection, include only words on lines marked `[captain] `, excluding that metadata prefix; never copy its mixed `# Task` wholesale.
89:If it has no provenance-marked captain words, stop and ask firstmate instead of starting no-mistakes.
91: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.
92: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.
93:This replaces the no-mistakes skill's advice to enrich `--intent` with decisions and tradeoffs; that advice does not apply to Firstmate-dispatched work.
lines with operator-address spellings in scaffolded brief: 0

==================== [HEAD-4385a65] S2 modern brief with plain captain words incl. nested ### subheadings -> spawn ====================
exit=1
backend reached (spawn passed validation): tmux has-session -t firstmate
launch-brief.md: PUBLISHED
state/s2.meta: absent
--- overlay contract section of launch-brief.md ---
# Current no-mistakes intent contract
This section supersedes every earlier brief instruction about constructing `--intent`, but not later clarifications actually supplied by the captain.
Use everything under `## Captain intent authorized for --intent` through the end of this brief, including any nested subheadings but excluding that heading, plus any later words the captain actually supplied as `--intent`; never include Firstmate specification or other mixed Task content.
Preserve those words without adding speaker labels or direct address.
Firstmate-authored constraints, acceptance criteria, implementation details, decisions, and tradeoffs are specification, not captain intent.
The Definition of done's rule that `--intent` must be self-sufficient still governs the string you pass: resolve any report, decision, or PR the intent below refers to into its substance rather than passing the pointer.

## Captain intent authorized for --intent
Do items 1 and 7 of the report, and don't touch the watcher.
\### Item 1: session floor
The fold refuses sessions under `min_floor=3`; keep the refusal but log it.
\### Item 7: PR body
Stop the "Intent" section from leaking internal chat vocabulary.
--- comparison: authorized --intent section vs ## Captain's intent body ---
IDENTICAL (words intact, nested subheadings kept, no spec, no labels)
lines with operator-address spellings in launch-brief.md: 0

==================== [HEAD-4385a65] S3 adversarial: ## Captain's intent body line opening with each address spelling -> spawn ====================
--- marker <Captain:> ---
error: <FM_HOME>/data/s3-1/brief.md ## Captain's intent has an operator-address line: Captain: keep the successful session path unchanged.; write the captain's actual words without a Captain label or address before spawn, since the heading already records provenance
exit=1
backend reached: no (spawn stopped before backend creation)
launch-brief.md: absent
state/s3-1.meta: absent
brief.md: unchanged (not scrubbed)
--- marker <Captain's words:> ---
error: <FM_HOME>/data/s3-2/brief.md ## Captain's intent has an operator-address line: Captain's words: keep the successful session path unchanged.; write the captain's actual words without a Captain label or address before spawn, since the heading already records provenance
exit=1
backend reached: no (spawn stopped before backend creation)
launch-brief.md: absent
state/s3-2.meta: absent
brief.md: unchanged (not scrubbed)
--- marker <Captain's ask:> ---
error: <FM_HOME>/data/s3-3/brief.md ## Captain's intent has an operator-address line: Captain's ask: keep the successful session path unchanged.; write the captain's actual words without a Captain label or address before spawn, since the heading already records provenance
exit=1
backend reached: no (spawn stopped before backend creation)
launch-brief.md: absent
state/s3-3.meta: absent
brief.md: unchanged (not scrubbed)
--- marker <Captain's intent:> ---
error: <FM_HOME>/data/s3-4/brief.md ## Captain's intent has an operator-address line: Captain's intent: keep the successful session path unchanged.; write the captain's actual words without a Captain label or address before spawn, since the heading already records provenance
exit=1
backend reached: no (spawn stopped before backend creation)
launch-brief.md: absent
state/s3-4.meta: absent
brief.md: unchanged (not scrubbed)
--- marker <Captain,> ---
error: <FM_HOME>/data/s3-5/brief.md ## Captain's intent has an operator-address line: Captain, keep the successful session path unchanged.; write the captain's actual words without a Captain label or address before spawn, since the heading already records provenance
exit=1
backend reached: no (spawn stopped before backend creation)
launch-brief.md: absent
state/s3-5.meta: absent
brief.md: unchanged (not scrubbed)
--- marker <   Captain:> ---
error: <FM_HOME>/data/s3-6/brief.md ## Captain's intent has an operator-address line:    Captain: keep the successful session path unchanged.; write the captain's actual words without a Captain label or address before spawn, since the heading already records provenance
exit=1
backend reached: no (spawn stopped before backend creation)
launch-brief.md: absent
state/s3-6.meta: absent
brief.md: unchanged (not scrubbed)
--- labeled line nested under a ### subheading inside ## Captain's intent ---
error: <FM_HOME>/data/s3-nested/brief.md ## Captain's intent has an operator-address line: Captain: stop the leak.; write the captain's actual words without a Captain label or address before spawn, since the heading already records provenance
exit=1
backend reached: no (spawn stopped before backend creation)
launch-brief.md: absent
state/s3-nested.meta: absent
--- same scenario as a scout spawn (shared boundary) ---
error: <FM_HOME>/data/s3-scout/brief.md ## Captain's intent has an operator-address line: Captain, investigate the refusal.; write the captain's actual words without a Captain label or address before spawn, since the heading already records provenance
exit=1
backend reached: no (spawn stopped before backend creation)
launch-brief.md: absent
state/s3-scout.meta: absent

==================== [HEAD-4385a65] S4 labels mentioned mid-line (and under ## Firstmate spec) are accepted verbatim ====================
operator-address refusals: 0
exit=1
backend reached (spawn passed validation): tmux has-session -t firstmate
launch-brief.md: PUBLISHED
state/s4.meta: absent
--- authorized --intent section ---
Stop composing Captain:, Captain's words:, Captain's ask:, and Captain's intent: into PR bodies.
Keep the literal example `Captain, hello` in the docs.
IDENTICAL to ## Captain's intent body (not scrubbed; spec excluded)

==================== [HEAD-4385a65] S5 promote a scout whose ## Captain's intent opens with an address label ====================
error: <FM_HOME>/data/s5-bad/brief.md ## Captain's intent has an operator-address line: Captain's ask: investigate the refusal.; write the captain's actual words without a Captain label or address before promotion, since the heading already records provenance
exit=1
meta: window=fm-s5-bad
meta: kind=scout
meta: worktree=/tmp/wt
ship-instructions.md: absent
--- promote a scout with plain words ---
WARNING: watcher still down (same stale episode; last beat: never, grace 300s) - full banner already printed this episode.
promoted s5-good to ship mode=no-mistakes yolo=off (teardown protection restored)
exit=0
## Captain's intent
Investigate the refusal and keep the successful path.

## Firstmate spec
27:When starting no-mistakes, pass `--intent` as only this brief's `## Captain's intent` subsection body, not its heading, plus any later words the captain actually said.
29:For a legacy brief with no such subsection, include only words on lines marked `[captain] `, excluding that metadata prefix; never copy its mixed `# Task` wholesale.
32: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.
33: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.
34:This replaces the no-mistakes skill's advice to enrich `--intent` with decisions and tradeoffs; that advice does not apply to Firstmate-dispatched work.
lines with operator-address spellings in ship-instructions.md: 0

==================== [HEAD-4385a65] S6 legacy mixed # Task briefs (no subsections) ====================
exit=1
backend reached (spawn passed validation): tmux has-session -t firstmate
launch-brief.md: PUBLISHED
state/s6-marker.meta: absent
--- authorized --intent ([captain] marker) ---
Fix the legacy dispatch boundary.
Keep existing sessions working.
exit=1
backend reached (spawn passed validation): tmux has-session -t firstmate
launch-brief.md: PUBLISHED
state/s6-stored.meta: absent
--- authorized --intent (previously stored labels, compat) ---
Fix the legacy dispatch boundary.
Keep existing sessions working.
--- unmarked legacy refusal ---
error: legacy mixed # Task brief has no provenance-marked captain words for no-mistakes --intent; add [captain] lines or migrate to ## Captain's intent and ## Firstmate spec
exit=1
backend reached: no (spawn stopped before backend creation)
launch-brief.md: absent
state/s6-none.meta: absent
Evidence: CLI transcript on base commit 036fec0 (leak reproduced)

Source: CLI transcript on base commit 036fec0 (leak reproduced)


==================== [BASE-036fec0] S1 scaffold no-mistakes ship brief: Definition-of-done --intent contract ====================
86:When starting no-mistakes, pass `--intent` as only this brief's `## Captain's intent` subsection plus any later words the captain actually said.
87: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.
89: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.
90: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.
91:This replaces the no-mistakes skill's advice to enrich `--intent` with decisions and tradeoffs; that advice does not apply to Firstmate-dispatched work.
lines with operator-address spellings in scaffolded brief: 1

==================== [BA