Skip to content

fix(brief): make ticket lieutenants pick a model tier for every subagent - #4

Merged
sofigern merged 1 commit into
mainfrom
fm/subagent-models
Oct 12, 2026
Merged

sofigern merged 1 commit into
mainfrom
fm/subagent-models

Conversation

@sofigern

Copy link
Copy Markdown
Owner

Intent

Captain (dictated, 2026-10-12): "I checked the rebrand window and if I am not wrong every subagent is opus. Is it not overkill? Are you distributing subagents well enough - do we really need opus for running that kind of work? Can we improve our existing approach to choosing models?" Observed: the rebrand lieutenant (opus, high effort) launched every fan-out subagent on opus for a read-only inventory (grep sweeps, listing templates, per-component scans). The scaffold already says, in the ticket section of bin/fm-brief.sh around line 578, "Size each subagent to its work - model, reasoning effort, and how much of the ticket it is handed", but that wording gives no concrete tiers, and Claude Agent tool inherits the parent model unless a model is passed, so the guidance does not change behaviour.

What Changed

  • The # Ticket section generated by bin/fm-brief.sh now tells a lieutenant to name the model explicitly on every subagent call instead of inheriting its own. It sets three tiers: haiku for search, grep, listing, and file-reading sweeps; sonnet for per-item inventories, classification, and routine implementation; the strongest model only for synthesis, design, or ambiguous judgment. The model guidance is scoped to harnesses that let you choose a subagent's model. The old "size each subagent" sentence is split in two: when to use a subagent, and how to size it.
  • .agents/skills/ticket-lieutenant/SKILL.md and docs/configuration.md state that a dispatch profile sets only the lieutenant's own model. Subagent models are the lieutenant's call under the brief's tiering rule, so steers should not restate tiers.
  • tests/fm-brief.test.sh adds assertions in test_ticket_window_contract for each tier sentence and for the harness-choice scoping.

Risk Assessment

✅ Low: The change is a prompt-text edit to the generated ticket brief plus two doc notes, and it directly supplies the concrete model tiers (haiku, sonnet, strongest) and the explicit-model-on-every-call rule the intent asks for; the new tests assert on the emitted brief, which is generated output, consistent with the existing tests.

Testing

I ran the real fm-brief.sh generator in an isolated FM_HOME and read the emitted ticket brief, which has the tiering paragraph. The targeted tests/fm-brief.test.sh suite passed in full. Whether a lieutenant model then follows the guidance is model behaviour and was not tested.

  • Live validation: ✅ go - 2 of 3 scenarios driven live against the product
Scenario Result Live Evidence
Generate a --ticket brief and see explicit per-call model tiers (haiku/sonnet/strongest) in the emitted text ✅ pass live emitted-brief-excerpt.txt
Existing brief suite still passes, including ticket window contract and non-ticket briefs unchanged ✅ pass live fm-brief-test.log
A lieutenant actually passes a model on its subagent calls instead of inheriting opus ⏸️ untested no Requires a live lieutenant agent session with an Agent tool and model spend; behaviour of the model following the prompt is not deterministically testable here.
Evidence: Emitted ticket brief excerpt

Source: Emitted ticket brief excerpt

25:Use a subagent when the work is parallel, when its raw output would crowd the context that holds this ticket, or when an independent read such as a review or a reproduction is the point; do the work yourself when it is small or needs the whole ticket in one head.
26:Size each subagent to its work - reasoning effort and how much of the ticket it is handed - and, where your harness lets you choose a subagent's model, name the model explicitly on every call instead of letting it inherit yours: the cheapest tier (haiku) for search, grep, listing, and file-reading sweeps; the middle tier (sonnet) for per-item inventories, classification, and routine implementation; the strongest model only for synthesis, design, or genuinely ambiguous judgment, which you usually keep for yourself rather than hand out.
Evidence: fm-brief test log

Source: fm-brief test log

ok - fm-brief: scaffolds leave the worker role scope to the launch boundary and keep the secondmate contract
ok - fm-brief.sh: bash -n succeeds
/private/var/folders/45/r303wlgs2gs76y4gtm3y6n3r0000gn/T/fm-brief.Pz45FP/heredoc-in-substitution.sh:2
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: no-mistakes ask-user findings use one event plus a verbatim snapshot
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} and {FIRSTMATE_SPEC} fills cannot corrupt the Herdr safety gate
ok - fm-brief.sh: Herdr lab contract covers scouts and rejects secondmate misuse
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: --ticket renders the lieutenant contract per mode and leaves plain ship briefs unchanged
ok - fm-brief.sh: --ticket misuse is refused and writes nothing
ok - fm-brief.sh: a live same-project ticket window refuses a second one unless the captain's split is passed

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.

  • Live validation: ✅ go - 2 of 3 scenarios driven live against the product
Scenario Result Live Evidence
Generate a --ticket brief and see explicit per-call model tiers (haiku/sonnet/strongest) in the emitted text ✅ pass live emitted-brief-excerpt.txt
Existing brief suite still passes, including ticket window contract and non-ticket briefs unchanged ✅ pass live fm-brief-test.log
A lieutenant actually passes a model on its subagent calls instead of inheriting opus ⏸️ untested no Requires a live lieutenant agent session with an Agent tool and model spend; behaviour of the model following the prompt is not deterministically testable here.
  • bash tests/fm-brief.test.sh (26 ok, 0 not ok)
  • FM_HOME=<tmp> bin/fm-brief.sh kd-1 tbcode --mode direct-PR --ticket KD-1 and inspected the emitted brief.md
✅ **Document** - passed

✅ No issues found.

⚠️ **Lint** - 1 warning
  • ⚠️ linter found issues (exit code 1)
✅ **Push** - passed

✅ No issues found.

The generated `# Ticket` section told a lieutenant to "size each subagent
to its work - model, reasoning effort, and how much of the ticket it is
handed", but gave no tiers, and Claude's Agent tool inherits the parent
model unless one is passed. A lieutenant running on the strongest model
therefore fanned a read-only inventory (grep sweeps, template listings,
per-component scans) out on that same model.

The section now states the tiers and requires an explicit model on every
call where the harness lets the worker choose: the cheapest tier (haiku)
for search, grep, listing, and file-reading sweeps; the middle tier
(sonnet) for per-item inventories, classification, and routine
implementation; the strongest model only for synthesis, design, or
genuinely ambiguous judgment, which the lieutenant usually keeps for
itself. The ticket section stays the single owner of that worker-side
rule; docs/configuration.md's dispatch-profile section and the
ticket-lieutenant skill gain one-line pointers saying a profile sets
only the crewmate's own model. Crewmate dispatch rules are unchanged.

tests/fm-brief.test.sh asserts the generated ticket brief carries the
explicit-model rule, each tier, and the harness scoping.

Verified: bin/fm-test-run.sh tests/fm-brief.test.sh exits 0;
bin/fm-lint.sh exits 0 with actionlint 1.7.12 on PATH;
bin/fm-doc-audience-check.sh ok; a --ticket scaffold under stock
/bin/bash 3.2.57 renders the new lines.
@sofigern
sofigern merged commit 2fdb632 into main Oct 12, 2026
14 checks passed
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