Skip to content

feat(bin): require a checked: part on every captain call and needs-decision - #23

Merged
max-metaplanet merged 2 commits into
mainfrom
fm/checked-convention
Oct 6, 2026
Merged

max-metaplanet merged 2 commits into
mainfrom
fm/checked-convention

Conversation

@max-metaplanet

Copy link
Copy Markdown
Owner

Intent

Add a required 'checked:' convention.
Every captain hold (the reasons passed to bin/fm-captain-hold.sh hold), every worker needs-decision status line, and every 'questions for the captain/owner' list in scout reports must carry a checked: part naming the read-only check that was run and its result, or 'checked: none possible - '.
Put the convention in its owners - the captain-hold-lifecycle skill, ask-user-authority where it formats escalations, the brief scaffold status-protocol text in bin/fm-brief.sh, and the scout report contract - not as AGENTS.md bloat.
Do not make the scripts refuse a missing checked: line yet; convention plus guidance only.

Context, from the jev-lab report that proposed it (data/jev-escalation-check/report.md in the jev-lab home, sections 6-8):
Of 53 unique escalation questions in the local status logs, about 9% were answerable by a read-only check with no judgement and about 11% more contained a checkable fact inside a judgement.
A classifier or rule to catch these was not worth building; the cheap intervention is a required line on every captain hold and needs-decision naming the check already run and its result, or why none exists, so an answer that was never checked cannot pass as settled.
The motivating case was a hold recorded as "confirmed" by a read-only query with no query, output or date recorded anywhere, while other records contradicted it.
The report's own section 8 models the shape: each open question for the captain is preceded by "Checked: ..." stating what was read and what it showed, before the question and recommendation.
Constraint noted in the report: a captain-hold reason is a single line and cannot contain parentheses (bin/fm-captain-hold.sh around lines 830-831).

What Changed

  • Generated briefs from bin/fm-brief.sh now require a checked: part, which names the read-only check that was run and what it showed, or checked: none possible - <why>. The rule covers needs-decision lines in ship and scout briefs, decisions escalated by a secondmate, and every question for the captain in a scout report, where it opens as Checked:. A new test in tests/fm-brief.test.sh scaffolds each kind of brief and checks that the rule appears.
  • The captain-hold-lifecycle skill has a new "checked: requirement" section that covers hold reasons, needs-decision lines and scout question lists. It applies to new entries only, keeps the part on one line with no parentheses so it fits a hold reason, and gives examples. The operating sequence now runs the check before a hold and includes it in the hold reason. ask-user-authority escalations now open with the same part.
  • This is guidance only. The header of bin/fm-captain-hold.sh now documents the checked: part in a hold reason and says the script does not refuse a reason that lacks it yet.

🤖 Generated with Claude Code

Risk Assessment

✅ Low: This change only adds guidance text, in the skill docs, the generated brief prompts and one script comment, plus a test that checks the generated brief output. It changes no script behaviour, and the round-1 fix that narrows the secondmate wording to decisions only is in place.

Testing

I ran the real brief scaffolder and the captain-hold CLI against a throwaway FM_HOME and markdown backlog, saving the transcript as evidence. Every generated ship and scout brief tells workers to open needs-decision lines with checked: or 'checked: none possible - <why>'. The scout report contract asks for a Checked: line before each question for the captain. The secondmate charter limits the rule to decisions, with no blocker wording and nothing added to blocked lines. Captain holds with the documented checked: reason forms are stored intact. A hold with no checked: is still accepted, as the intent requires for now. A checked: reason with parentheses is refused by the existing one-line rule for hold reasons, which matches the skill's guidance. The brief test file, including its new checked-convention test, passed. No Herdr lab was needed: Herdr lifecycle is untouched by this change. No UI surface was involved.

  • Live validation: ✅ go - 7 of 8 scenarios driven live against the product
Scenario Result Live Evidence
Ship worker brief (no-mistakes, direct-PR and local-only modes) tells the worker to open a needs-decision summary with checked: or 'checked: none possible - <why>' ✅ pass live checked-convention-transcript.txt section S1: lines 48-51 of each generated brief.md
Scout brief requires checked: on needs-decision lines and a 'Checked:' line before every question for the captain in report.md ✅ pass live checked-convention-transcript.txt section S2: brief.md lines 43-46 and line 70
Secondmate charter applies the checked: rule to escalated decisions only, not to blockers ✅ pass live checked-convention-transcript.txt section S3: line 58 reads 'When you escalate a decision, carry the checked: part'; 0 matches for 'decision or blocker'; the blocked rule has no checked: wording
Captain hold with the skill's documented checked: example reason is accepted and stored word for word in the backlog ✅ pass live checked-convention-transcript.txt section S4: exit=0, and backlog.md stores the full checked: reason
Captain hold with 'checked: none possible - <why>' is accepted and stored ✅ pass live checked-convention-transcript.txt section S5: exit=0 and the stored reason
Adversarial: a captain hold with no checked: part is still accepted, since the scripts must not refuse it yet ✅ pass live checked-convention-transcript.txt section S6: exit=0 and the bare reason stored
Adversarial: a checked: reason with parentheses is refused by the existing one-line rule for hold reasons, matching the skill's 'no parentheses' guidance ✅ pass live checked-convention-transcript.txt section S7: 'reason must not contain parentheses', exit=1
ask-user-authority and captain-hold-lifecycle skill text actually changes agent escalation behaviour ⏸️ untested no This is natural-language policy read by a model. Showing that it changes behaviour would need a live agent writing escalations, i.e. a model evaluation, which this test phase does not run. A developme…
Evidence: Transcript of the live run (generated briefs + captain holds)

Source: Transcript of the live run (generated briefs + captain holds)

=== S1: ship briefs (needs-decision rule) ===
--- no-mistakes: /tmp/fm-checked-vdBu/home/data/ship-no-mistakes/brief.md
48:   append `needs-decision [at=<epoch>]: {summary of options}` and stop. Firstmate will reply with the decision.
49-   Open that summary with `checked: <what you read and what it showed>` - the read-only check
50-   behind the facts in your question - or `checked: none possible - <why>` when no such check
51-   exists, so an unchecked claim never reads as settled.
52-   For a no-mistakes ask-user gate specifically, escalate all ask-user findings as one event plus one snapshot file, using that same shape even when the gate holds only a single ask-user finding: write only the ask-user findings, verbatim and unparaphrased (id, severity, file, line, description, authority), to `/tmp/fm-checked-vdBu/home/data/ship-no-mistakes/nm-<run>-findings.txt`, then report the gate with
--- direct-PR: /tmp/fm-checked-vdBu/home/data/ship-direct-PR/brief.md
47:   append `needs-decision [at=<epoch>]: {summary of options}` and stop. Firstmate will reply with the decision.
48-   Open that summary with `checked: <what you read and what it showed>` - the read-only check
49-   behind the facts in your question - or `checked: none possible - <why>` when no such check
50-   exists, so an unchecked claim never reads as settled.
51-
--- local-only: /tmp/fm-checked-vdBu/home/data/ship-local-only/brief.md
47:   append `needs-decision [at=<epoch>]: {summary of options}` and stop. Firstmate will reply with the decision.
48-   Open that summary with `checked: <what you read and what it showed>` - the read-only check
49-   behind the facts in your question - or `checked: none possible - <why>` when no such check
50-   exists, so an unchecked claim never reads as settled.
51-

=== S2: scout brief (needs-decision + report contract) ===
43:   append `needs-decision [at=<epoch>]: {summary of options}` and stop. Firstmate will reply with the decision.
44-   Open that summary with `checked: <what you read and what it showed>` - the read-only check
45-   behind the facts in your question - or `checked: none possible - <why>` when no such check
46-   exists, so an unchecked claim never reads as settled.
47-   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.
69-The report must stand alone: what you did, what you found, the evidence (commands run, output, file:line references), and what you recommend.
70:Precede every question you leave for the captain with `Checked: <what you read and what it showed>`, or `Checked: none possible - <why>`, before the question and your recommendation, so an unverified premise never reads as a settled fact.
71-If your deliverable is a visual artifact the captain will review and iterate on, use the lavish-axi rule: arm your board with bin/fm-procevent-lavish.sh arm <artifact.html> --for <task-id>; never run lavish-axi poll yourself. Re-arm with the reply after each nonterminal round to acknowledge it, route the board feedback through your steering inbox, write needs-decision [key=board-review] with the live board URL when the captain owes a decision, and stop at session_ended or an empty End without re-arming - acknowledge that final round with bin/fm-procevent.sh handled <source-id> <sequence> to conclude and retire your board.

=== S3: secondmate charter (decision only, not blocker) ===
58:When you escalate a decision, carry the `checked:` part the shared captain-call policy requires: the read-only check behind the facts you state, or `checked: none possible - <why>`.
count of 'decision or blocker, carry': 0
blocked line requires checked?: 0

=== S4: hold with the skill's documented checked: example reason ===
checked-call
exit=0
4:- [ ] checked-call - Choose column meaning (repo: sample) (kind: captain) (since 2026-10-06) (hold: checked: tasks-axi show eng-2531 records the ruling as confirmed but files no query or date, and two reports read the column the other way. Rule on which meaning holds) (hold-kind: captain)
5-  Captain hold set: 2026-10-06T07:58:19Z
6-## Done

=== S5: hold with 'checked: none possible - <why>' ===
none-call
exit=0
6:- [ ] none-call - Pick vendor (repo: sample) (kind: captain) (since 2026-10-06) (hold: checked: none possible - the vendor quote exists only in the captain's email. Pick vendor A or B) (hold-kind: captain)
7-  Captain hold set: 2026-10-06T07:58:29Z
8-## Done

=== S6 adversarial: hold WITHOUT checked: is still accepted - not enforced yet ===
bare-call
exit=0
8:- [ ] bare-call - Bare call (repo: sample) (kind: captain) (since 2026-10-06) (hold: captain must pick north or south) (hold-kind: captain)
9-  Captain hold set: 2026-10-06T07:58:56Z
10-## Done

=== S7 adversarial: checked: part with parentheses is refused by the existing one-line contract ===
fm-captain-hold: reason must not contain parentheses (tasks-axi hold contract)
exit=1
Evidence: Driver script used to run the scenarios

Source: Driver script used to run the scenarios

#!/usr/bin/env bash
# Drives the real bin/fm-brief.sh and bin/fm-captain-hold.sh in an isolated FM_HOME.
set -u
ROOT=$1
T=$(mktemp -d /tmp/fm-checked-XXXX)
home="$T/home"; mkdir -p "$home/data" "$home/state" "$home/config" "$home/projects" "$home/fakebin"
cp "$ROOT/.tasks.toml" "$home/.tasks.toml"
printf '## In flight\n\n## Queued\n\n## Done\n' > "$home/data/backlog.md"
for t in tmux treehouse no-mistakes gh gh-axi; do printf '#!/usr/bin/env bash\nexit 0\n' > "$home/fakebin/$t"; chmod +x "$home/fakebin/$t"; done

echo "=== S1: ship briefs (needs-decision rule) ==="
for mode in no-mistakes direct-PR local-only; do
  FM_HOME="$home" "$ROOT/bin/fm-brief.sh" ship-$mode some-proj --mode $mode >/dev/null 2>&1 || echo "SCAFFOLD FAIL $mode"
  echo "--- $mode: $home/data/ship-$mode/brief.md"
  grep -n -A4 'append `needs-decision' "$home/data/ship-$mode/brief.md"
done

echo; echo "=== S2: scout brief (needs-decision + report contract) ==="
FM_HOME="$home" FM_ROOT_OVERRIDE="$ROOT" "$ROOT/bin/fm-brief.sh" scout-x some-proj --scout >/dev/null 2>&1 || echo "SCAFFOLD FAIL scout"
grep -n -A4 'append `needs-decision' "$home/data/scout-x/brief.md"
grep -n -B1 -A1 'Precede every question' "$home/data/scout-x/brief.md"

echo; echo "=== S3: secondmate charter (decision only, not blocker) ==="
FM_HOME="$home" FM_ROOT_OVERRIDE="$ROOT" FM_SECONDMATE_CHARTER='sample reviews' "$ROOT/bin/fm-brief.sh" mate-x --secondmate --no-projects >/dev/null 2>&1 || echo "SCAFFOLD FAIL mate"
grep -n 'checked:' "$home/data/mate-x/brief.md"
echo "count of 'decision or blocker, carry': $(grep -c 'decision or blocker, carry' "$home/data/mate-x/brief.md")"
echo "blocked line requires checked?: $(grep -n '^.*append `blocked' "$home/data/mate-x/brief.md" | grep -c checked)"

run_captain() { PATH="$home/fakebin:$PATH" FM_HOME="$home" FM_STATE_OVERRIDE="$home/state" FM_DATA_OVERRIDE="$home/data" FM_CONFIG_OVERRIDE="$home/config" "$ROOT/bin/fm-captain-hold.sh" "$@"; }

echo; echo "=== S4: hold with the skill's documented checked: example reason ==="
R='checked: tasks-axi show eng-2531 records the ruling as confirmed but files no query or date, and two reports read the column the other way. Rule on which meaning holds'
run_captain hold checked-call --title "Choose column meaning" --reason "$R" --repo sample; echo "exit=$?"
grep -n 'checked-call' -A3 "$home/data/backlog.md"

echo; echo "=== S5: hold with 'checked: none possible - <why>' ==="
run_captain hold none-call --title "Pick vendor" --reason "checked: none possible - the vendor quote exists only in the captain's email. Pick vendor A or B" --repo sample; echo "exit=$?"
grep -n 'none-call' -A3 "$home/data/backlog.md"

echo; echo "=== S6 adversarial: hold WITHOUT checked: is still accepted - not enforced yet ==="
run_captain hold bare-call --title "Bare call" --reason "captain must pick north or south" --repo sample; echo "exit=$?"
grep -n 'bare-call' -A3 "$home/data/backlog.md"

echo; echo "=== S7 adversarial: checked: part with parentheses is refused by the existing one-line contract ==="
run_captain hold paren-call --title "Paren call" --reason "checked: grep (bin/) found nothing. Rename it" --repo sample; echo "exit=$?"
rm -rf "$T"

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

🔧 **Review** - 1 issue found → auto-fixed ✅
  • ⚠️ bin/fm-brief.sh:394 - The secondmate charter text reads "When you escalate a decision or blocker, carry the checked: part". That extends the requirement to blocked lines. The intent only names captain holds, worker needs-decision lines, and scout-report captain questions. The skill this text points to also lists only those three records. Ship and scout briefs attach the rule only to needs-decision, so secondmates get a broader rule than the policy they are told to follow. Suggested fix: narrow it to "When you escalate a decision" (needs-decision), or confirm that blockers are meant to be covered and add them to captain-hold-lifecycle's list.

🔧 Fix applied.
✅ Re-checked - no issues remain.

✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 7 of 8 scenarios driven live against the product
Scenario Result Live Evidence
Ship worker brief (no-mistakes, direct-PR and local-only modes) tells the worker to open a needs-decision summary with checked: or 'checked: none possible - <why>' ✅ pass live checked-convention-transcript.txt section S1: lines 48-51 of each generated brief.md
Scout brief requires checked: on needs-decision lines and a 'Checked:' line before every question for the captain in report.md ✅ pass live checked-convention-transcript.txt section S2: brief.md lines 43-46 and line 70
Secondmate charter applies the checked: rule to escalated decisions only, not to blockers ✅ pass live checked-convention-transcript.txt section S3: line 58 reads 'When you escalate a decision, carry the checked: part'; 0 matches for 'decision or blocker'; the blocked rule has no checked: wording
Captain hold with the skill's documented checked: example reason is accepted and stored word for word in the backlog ✅ pass live checked-convention-transcript.txt section S4: exit=0, and backlog.md stores the full checked: reason
Captain hold with 'checked: none possible - <why>' is accepted and stored ✅ pass live checked-convention-transcript.txt section S5: exit=0 and the stored reason
Adversarial: a captain hold with no checked: part is still accepted, since the scripts must not refuse it yet ✅ pass live checked-convention-transcript.txt section S6: exit=0 and the bare reason stored
Adversarial: a checked: reason with parentheses is refused by the existing one-line rule for hold reasons, matching the skill's 'no parentheses' guidance ✅ pass live checked-convention-transcript.txt section S7: 'reason must not contain parentheses', exit=1
ask-user-authority and captain-hold-lifecycle skill text actually changes agent escalation behaviour ⏸️ untested no This is natural-language policy read by a model. Showing that it changes behaviour would need a live agent writing escalations, i.e. a model evaluation, which this test phase does not run. A developme…
  • bash ~/.no-mistakes/evidence/01M4836GVBBC3PX47MTT3QPZHH/drive-checked.sh &lt;worktree&gt;: ran the real bin/fm-brief.sh for the no-mistakes, direct-PR and local-only ship modes, plus --scout and --secondmate, in a throwaway FM_HOME, and searched the generated brief.md files
  • Same script: ran the real bin/fm-captain-hold.sh hold against an isolated markdown backlog with the skill's own example checked: reason, a 'checked: none possible - <why>' reason, a reason with no checked:, and a checked: reason containing parentheses; then inspected the backlog.md left behind
  • bash tests/fm-brief.test.sh: includes the new test_checked_convention_reaches_every_escalation_path, which scaffolds briefs and asserts on the generated output
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

…cision

An escalation that names no read-only check reads exactly like a verified
one. In this fleet's own status logs roughly a fifth of escalated questions
either were answerable by a read-only check outright or hid a checkable
fact inside a judgement, and the motivating case was a call recorded as
"confirmed" by a read-only query with no query, output, or date filed
anywhere while other records contradicted it.

Every captain hold reason, worker needs-decision line, and
questions-for-the-captain list in a scout report now carries a one-line
`checked:` part naming the check that was run and its result, or
`checked: none possible - <why>` so an absent check reads as absent.

captain-hold-lifecycle states the convention once; ask-user-authority,
fm-brief.sh's ship, scout, and secondmate scaffolds, and
fm-captain-hold.sh's header carry pointers to it. No script refuses a
reason or status line without the part.
@max-metaplanet
max-metaplanet merged commit 11be40d into main Oct 6, 2026
21 checks passed
max-metaplanet added a commit that referenced this pull request Oct 6, 2026
…cision (#23)

* feat(bin): require a checked: part on every captain call and needs-decision

An escalation that names no read-only check reads exactly like a verified
one. In this fleet's own status logs roughly a fifth of escalated questions
either were answerable by a read-only check outright or hid a checkable
fact inside a judgement, and the motivating case was a call recorded as
"confirmed" by a read-only query with no query, output, or date filed
anywhere while other records contradicted it.

Every captain hold reason, worker needs-decision line, and
questions-for-the-captain list in a scout report now carries a one-line
`checked:` part naming the check that was run and its result, or
`checked: none possible - <why>` so an absent check reads as absent.

captain-hold-lifecycle states the convention once; ask-user-authority,
fm-brief.sh's ship, scout, and secondmate scaffolds, and
fm-captain-hold.sh's header carry pointers to it. No script refuses a
reason or status line without the part.

* no-mistakes(review): Narrow secondmate checked: rule to escalated decisions only
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.

1 participant