Skip to content

feat(bin): brief every crewmate to gather context first - #6

Merged
knowttl merged 2 commits into
mainfrom
fm/fm-brief-context-first-clause
Jul 27, 2026
Merged

knowttl merged 2 commits into
mainfrom
fm/fm-brief-context-first-clause

Conversation

@knowttl

@knowttl knowttl commented Jul 26, 2026

Copy link
Copy Markdown
Owner

What

Every crewmate brief - ship and scout - now carries one context-first rule, so the standard is baked into the scaffold instead of depending on which supervisor wrote the brief.

The generated rule 8 says: gather the full relevant context before deciding or writing code (read the code path that DECIDES the outcome end to end, not just the path that supports it, plus the project's AGENTS.md, applicable specs or design docs, and recent related changes); confirm every load-bearing premise with a second, differently shaped check rather than a single grep; and report only what has been verified against the real artifact.

The text lives once in a CONTEXT_RULE variable and is interpolated into both crewmate scaffolds, following the existing HERDR_SECTION pattern, so the two variants cannot drift. It is stated only in bin/fm-brief.sh - not restated in AGENTS.md or docs.

The secondmate charter is deliberately untouched: it has no Rules section, and a secondmate's own crewmates receive the rule from the same scaffold.

Second commit (unrelated, pre-existing)

ba5a352 classifies .agents/skills/codev-session/SKILL.md as agent-runtime in docs/documentation-audiences.json. That skill landed in 1c4c172 without an audience entry, so bin/fm-doc-audience-check.sh and tests/fm-documentation-audiences.test.sh were red on every branch. It is fixed here because it blocks a shared gate; it is not part of the brief change.

Verification (local - GitHub Actions is off under the billing-outage posture, so expect zero checks)

  • bin/fm-lint.sh - passes, pinned ShellCheck 0.11.0.
  • bin/fm-doc-audience-check.sh - ok surfaces=56 local_links=150 (was failing before the second commit).
  • tests/fm-brief.test.sh - 16/16 pass, including the new test_context_first_rule_in_ship_and_scout, which asserts all three clauses in both the ship and scout briefs and that the rule appears exactly once in each.
  • bin/fm-test-run.sh --all - 99 scripts, 6 failing.

E2E: generated a real ship brief and a real scout brief and read them as a crew would; the rule renders correctly, reads clearly, and is not duplicated.

The 6 suite failures

All are pre-existing and unrelated to this branch, which touches only bin/fm-brief.sh, tests/fm-brief.test.sh, and one JSON entry.

  • tests/fm-documentation-audiences.test.sh - fixed by the second commit above.
  • tests/fm-daemon.test.sh (2) and tests/fm-session-start.test.sh (1) - reproduced identically on the base commit c4ec3b2 in a clean clone.
  • tests/fm-pi-watch-extension.test.sh (1, OpenCode fleet-lock arming) - reproduced identically on c4ec3b2.
  • tests/fm-backend-herdr-presentation-e2e.test.sh (1, live-Herdr concurrency) - NOT re-run: this branch's brief was scaffolded without --herdr-lab, so driving Herdr lifecycle is off limits. It never references fm-brief, so it is outside this change's blast radius, and unlike the others it was not re-confirmed against the base commit.

knowttl added 2 commits July 26, 2026 12:34
Ship and scout scaffolds now carry one shared rule: read the deciding code
path end to end plus AGENTS.md, specs, and recent related changes before
deciding or writing code; confirm load-bearing premises with a second,
differently shaped check instead of a single grep; and report only what has
been verified against the real artifact.

The text lives once in CONTEXT_RULE and is interpolated into both crewmate
scaffolds so the two variants cannot drift.
The codev-session skill landed without an audience entry, so
bin/fm-doc-audience-check.sh (and tests/fm-documentation-audiences.test.sh)
fail on every branch. Classify it agent-runtime like every other skill
surface. Unrelated to this branch's brief change; fixed because it blocks
the shared gate.
@knowttl

knowttl commented Jul 26, 2026

Copy link
Copy Markdown
Owner Author

Closed unmerged on the captain's word - shelved for now. Branch fm/fm-brief-context-first-clause preserved on origin.

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