Skip to content

feat(brief): add crewmate identity disambiguation to ship and scout scaffolds - #1

Merged
BenWilcox8 merged 1 commit into
mainfrom
fm/brief-identity-note-b1
Aug 31, 2026
Merged

BenWilcox8 merged 1 commit into
mainfrom
fm/brief-identity-note-b1

Conversation

@BenWilcox8

Copy link
Copy Markdown
Owner

Intent

Add one sentence to the ship and scout scaffolds in bin/fm-brief.sh: if this worktree's AGENTS.md is firstmate's own, it is the supervisor job description, not yours; you are a crewmate, your brief governs. Both scaffolds carry the disambiguation sentence. Covered by a new test in tests/fm-brief.test.sh asserting the sentence appears in both ship and scout scaffolds. Acceptance: both scaffolds carry the disambiguation sentence and fm-brief tests pass.

What Changed

  • Both the ship and scout scaffolds in bin/fm-brief.sh now carry a crewmate identity disambiguation sentence.
    This sentence tells the crewmate agent that firstmate's own AGENTS.md is the supervisor job description, not the crewmate's brief.
  • A new test test_crewmate_identity_disambiguation in tests/fm-brief.test.sh checks that both scaffolds carry this sentence.

Risk Assessment

✅ Low: The change adds a single sentence to two heredocs in bin/fm-brief.sh and a corresponding behavioral test that exercises the real binary and checks its generated output file - minimal, well-scoped, and fully conformant with the stated intent.

Testing

Ran the full fm-brief.test.sh suite (23 tests). The new test exercises both the ship and scout code paths by invoking the real fm-brief.sh script and checking the generated brief.md output file for the disambiguation sentence. All 23 tests pass, including the new targeted test.

Evidence: fm-brief test run output
ok - fm-brief.sh: bash -n succeeds
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 and bans --yes outright
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: the documented {TASK} fill cannot corrupt the Herdr safety gate
ok - fm-brief.sh: Herdr lab contract covers scouts and rejects secondmate misuse
ok - fm-brief.sh: crewmate scaffolds stay signal-free and the charter points at the signal owner
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
ok - fm-brief.sh: ship and scout scaffolds carry the crewmate identity disambiguation sentence

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.

  • bash tests/fm-brief.test.sh - full suite including new test_crewmate_identity_disambiguation which invokes fm-brief.sh for both ship and scout paths and asserts the generated brief files contain the disambiguation sentence
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

…caffolds

Both scaffolds now carry a one-line note after the opening identity
sentence: if the worktree AGENTS.md is firstmate's own, it is the
supervisor job description; the crewmate's brief governs.
Mirrors the secondmate charter pattern at line 234.
Covered by a new test in tests/fm-brief.test.sh.
@BenWilcox8
BenWilcox8 merged commit 503d343 into main Aug 31, 2026
10 of 13 checks passed
BenWilcox8 pushed a commit that referenced this pull request Sep 12, 2026
…nguid#3681)

* fix(bin): recognize active pipeline fix rounds with unfetched run heads

A no-mistakes fix round advances the run head beyond the submitted head,
and the pipeline commits in its own checkout, so the task copy never
receives the new commit object. fm-crew-state's strict head rule rejected
the active row, the coarse runs-list scan skipped it and matched the
older failed row at the submitted head, and an active validation read as
failed (observed on model-routing-benchmark-hardening: active head
ac61c64 vs task copy at fb47636d).

fm_nm_runs_status_for_worktree in bin/fm-nm-run-lib.sh now owns
runs-ledger attribution: the branch's newest row alone decides, and a
newest row whose head cannot resolve locally is recognized only as a
provable pipeline-owned continuation - active (running) and anchored by
the immediately older row for the same branch having ended at exactly
this worktree's HEAD. The reader keeps the axi TOON as full detail for
that proven same-branch run. Unanchored, ancestor-anchored, and terminal
unresolvable rows stay unattributed, so branch-name coincidence and other
tasks' runs never match, and fm_nm_head_matches_worktree keeps its exact
prior semantics for teardown (verified by the full teardown suite).

Tests: reproduction regression for the unfetched active fix head (reads
working via full run-step detail), coarse-path continuation when axi
answers another branch, and negative controls for the unanchored active
row and the unresolvable terminal row with the historical fallback
preserved.

Ported onto upstream/main f4d7875, where kunchenguid#3194 independently added the
branch_sync custody exemption on the full axi-status path: both mechanisms
now coexist, each owning one surface (TOON custody on the full path, the
runs ledger on the coarse path). The port deletes the superseded coarse
scan-and-skip (nm_runs_status_for_branch) and its now caller-less helpers
(fm_nm_head_resolvable, nm_coarse_head_matches_worktree), renames the
exemption comment's "the one exemption" phrasing now that a second
complementary exemption exists, and points the stale
FM_CREW_STATE_RUNS_LIMIT comment at fm_nm_runs_status_for_worktree
(judge follow-up #1). The parent coarse-guard test's fixture is the
ledger-anchored continuation shape, so its expectation flips to the fixed
behavior (working via run-step, never the older failed row); a new
mismatched-anchor coarse negative control preserves that guard's original
no-anchor protection (pane answers, never the older row).

* no-mistakes(document): Clarify pipeline attribution documentation
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