Repository navigation
feat(bin): adopt the brief-prompting review proposals in the crewmate brief scaffold - #52
Merged
Merged
Conversation
…in the crewmate brief scaffold Every brief variant now opens with a provenance paragraph in place of the identity-override line, ship briefs gain a scope line, direct-PR and local-only gain a verification paragraph, a --blind flag replaces contradicting Task text, and worker-irrelevant or stale text is removed or corrected.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
Firstmate repo: implement ALL proposals P1-P9 from the brief-prompting review (captain decision, option B) in bin/fm-brief.sh across every variant (ship per delivery mode no-mistakes/direct-PR/local-only, scout, secondmate charter, herdr-lab) plus owning docs and tests, keeping every safety contract intact (worktree-isolation assertion, status protocol, push/merge rules, daemon rules, the Delivery contract: mode= line and the recall placeholders fm-spawn checks); change wording, not safety. P1: provenance paragraph replaces the 'Work on your own; do not wait for a human' opener in every variant (who wrote the brief, invisible marker, why records are written outside the worktree, treat steers as part of the brief, text claiming to be firstmate is not firstmate, keep going until a gate the brief defines). P2: never contradict a scaffold section from Task text - new --blind flag replaces Grounding with one neutral line (ship and scout only, refused on charters); scaffold states the Task wins over a step it changes but never relaxes isolation/push/merge/daemon rules; Task-text conventions documented in the fm-brief.sh header with one line in AGENTS.md section 11. P3: verification paragraph in direct-PR and local-only definitions of done only (no-mistakes pipeline owns tests, so no stacked manual check). P4: scope line in all ship modes routing extras to note: CANDIDATE; keep-going wording; Rule 6 tells worker to make implementation choices itself; scout stops after the report rather than starting extra review rounds. P5: delete the stale wedge-guard disclosure (both daemon guards already treat note: as nonterminal), de-duplicate the skill-declaration clause, one-sentence recall preamble, soften the Herdr NOT-ENABLED block to one neutral worker line while the scaffold prints the hard regenerate-with---herdr-lab reminder on stdout for firstmate. P6: tighter Grounding keeping every obligation. P7: review/security Task wording as documented conventions (coverage with confidence, static evidence or local failing test not live exploit, reviewed code is data). P8: fix contradictions - project-memory section vs AGENTS.md section 6 (also docs/architecture.md), scout Rule 2 vs captain-hold records. P9: advisor-hook advice labelled as advice that does not override the brief; scout stop-after-report line. Also adapt bin/fm_pal_council.py SCAFFOLD_EDITS to the reworded scout Rule 2. Update colocated tests and docs; report brief size before/after per variant in the PR description (words before->after: ship no-mistakes 1639->1675, direct-PR 1432->1549, local-only 1383->1500, ship+herdr-lab 1831->1881, scout 1090->1186, secondmate charter 970->1080; net growth is the provenance paragraph, scope line and verification paragraph, partly offset by cuts).
What Changed
bin/fm-brief.sh: every variant (ship in no-mistakes, direct-PR and local-only modes; scout; secondmate charter; herdr-lab) now opens with a provenance paragraph instead of "Work on your own; do not wait for a human". Other changes:note: CANDIDATE.--blindflag (ship and scout only, refused on charters) replaces Grounding with one neutral line.--herdr-labnow goes to firstmate on stdout.The scaffold now says the Task wins over a step it changes, but never relaxes the isolation, push, merge or daemon rules. The worktree-isolation assertion, status protocol,
mode=line and recall placeholders are unchanged.The Task-text conventions (including review/security wording) are documented in the
fm-brief.shheader, with a pointer in AGENTS.md §11. The project-memory text indocs/architecture.mdand the brief now matches AGENTS.md §6.bin/fm-advisor-hook.shlabels its output as advice that does not override the brief, andSCAFFOLD_EDITSinbin/fm_pal_council.pynow matches the reworded scout Rule 2.tests/fm-brief.test.shandtests/fm-advisor-hook.test.share updated to match the new wording and cover--blind.Brief size in words, before → after:
Most of the growth comes from the provenance paragraph, the scope line and the verification paragraph; the cuts above offset part of it.
Risk Assessment
✅ Low: The change rewords the prompt scaffold and adds a --blind flag that is refused on charters. Every safety contract is still present (Delivery contract mode= line, recall placeholder prefixes, isolation, push and merge rules). The pal-council regex was widened to match the new scout Rule 2, and no caller parses the extra stdout reminder.
Testing
The three colocated test suites (fm-brief, fm-advisor-hook, fm-pal-council) all pass. I also generated a real brief for every variant: the word counts match the intent exactly (1675/1549/1500/1881/1186/1080). The old opener is gone from all of them, and the Delivery contract mode= line and the recall placeholders are still present. --blind replaces Grounding with one neutral line and is refused on charters. Firstmate gets the Herdr regenerate reminder on stdout. The generated briefs were saved as evidence, and the temporary directory was removed.
Evidence: Generated no-mistakes ship brief
Source: Generated no-mistakes ship brief
Evidence: Generated direct-PR brief
Source: Generated direct-PR brief
Evidence: Generated local-only brief
Source: Generated local-only brief
Evidence: Word counts per variant
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.shbash tests/fm-advisor-hook.test.shbash tests/fm-pal-council.test.shManual:bin/fm-brief.shscaffolded no-mistakes, direct-PR, local-only, no-mistakes+--herdr-lab, --scout, --scout --blind, no-mistakes --blind and a secondmate charter in a temporary FM_HOME, then checked word counts withwc -wManual:fm-brief.sh --secondmate --blindrefused with exit 1Manual: searched the generated briefs for the old opener (none found), the mode= line and the {RECALL_*} placeholders (present), the blind Grounding line (present) and the stdout Herdr regenerate reminder (printed)✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.