Repository navigation
feat(bin): add Haiku subagent delegation directive to ship and scout briefs - #66
Merged
Merged
Conversation
…briefs Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
alandomio
pushed a commit
that referenced
this pull request
Oct 20, 2026
Conflicts resolved keeping both sides: - bin/fm-brief.sh: upstream's shared infra rule, wait block and inbox section kept; the Haiku subagent section from #66 added after them. - bin/fm-spawn.sh: --teleport from #65 ported onto upstream's record-backed launch brief; the arrival note is published as the launch record and the Claude launch resumes the teleported session. - bin/fm-supervise-daemon.sh: wedge alarm helpers live in bin/fm-alert-lib.sh (#65); they were unchanged on our side since the merge base, so nothing is lost. Upstream's delivery-failure fields kept. - tests/fm-teleport.test.sh: covers the teleported Claude launch on the record-backed brief path. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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
Add a standing directive to the standard ship and scout briefs generated by bin/fm-brief.sh (tests updated). It applies only when the worker runs on the claude harness (fm-brief does not know the harness, so the text is conditional). Captain-decided content: the worker may delegate mechanical work to Haiku subagents (Agent tool, model haiku): code search, running tests/build/lint and summarising, executing already-decided command sequences (env setup, fixture regeneration, log gathering), small mechanical edits (rename, formatting, typo, one-parameter change). The worker keeps diagnosis, non-mechanical changes, every commit, validation-pipeline interaction, PR/MR delivery and status lines. Subagents quote error lines verbatim. The main worker supervises: reads the actual diff (not the subagent summary) and approves before committing; never runs a Haiku subagent in parallel with itself on the same files. Skip delegation when Claude weekly quota is >=95% used. Addendum: each Haiku subagent gets ONE narrow self-contained task with a short brief and small input (paths/patterns, not pasted content), runs briefly and ends; spawn a fresh one per task, never reuse a long-lived one; if a task grows large or needs judgment, stop it and take it back. Keep the added text short.
What Changed
bin/fm-brief.shnow adds a "Haiku subagents (claude harness only)" section to both ship and scout briefs. The section says it applies only when the worker runs on the claude harness. It lists the mechanical work that can go to Haiku subagents: search, running tests, build or lint, already-decided command sequences, and small mechanical edits. It also lists the work the worker keeps: diagnosis, non-mechanical changes, commits, pipeline interaction, PR/MR delivery and status lines.tests/fm-brief.test.shnow asserts that ship and scout briefs both include the directive heading and the diff-supervision rule.Risk Assessment
✅ Low: The change adds a static, quoted-heredoc text section to the ship and scout briefs. It covers every directive the intent requires, including the narrow-task addendum, and the tests assert on the generated brief output, which is a legitimate contract.
Testing
I ran the focused fm-brief test file and every test passed. I then generated a real ship brief and a real scout brief with bin/fm-brief.sh. In both, the emitted 'Haiku subagents (claude harness only)' section is conditional on the claude harness and lists all of these: what work may be delegated, what the worker keeps, error lines quoted verbatim, reading the real diff before committing, no parallel subagent on the same files, the 95% weekly-quota skip, and the addendum (one narrow task per subagent, a fresh one each time, take the task back if it grows). The generated briefs are saved as evidence.
Evidence: Haiku section as emitted in generated ship and scout briefs
Source: Haiku section as emitted in generated ship and scout briefs
Evidence: Generated ship brief
Source: Generated ship brief
Evidence: Generated scout brief
Source: Generated scout brief
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(all 39 tests passed, including the updated ship/scout Herdr-gate test that checks for the Haiku section)FM_HOME=$tmp bin/fm-brief.sh ev-ship firstmate --mode no-mistakesandFM_HOME=$tmp bin/fm-brief.sh ev-scout firstmate --scout, then checked the emitted Haiku section in each brief.md against every item in the intent✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.