Repository navigation
Bind personas to the queue's gates so /auto is a team, not a soloist #35
Description
Proposal
Why
/auto already runs a gate sequence per change — implement → test → verify → commit —
and the brief already ends with a vague nudge: "where this change's tasks allow parallel
work, use the task tool to delegate subtasks". In practice one model does everything,
because that sentence names no agent, gives no trigger, and costs nothing to ignore.
Meanwhile the gate names are already the role names. implement is a coder. test is a
tester. verify is a reviewer. The mapping is not a design decision anyone has to make;
it is sitting there.
Two different things are missing, and conflating them is why the nudge does nothing:
-
Opportunistic parallelism — when the fleet is idle and a change's tasks are
genuinely independent, spread them. This is a judgement call, so it belongs in the
brief. It just has to name the persona instead of gesturing at "the task tool". -
A second opinion before the work is called done. This is not a judgement call and
must not be left to the model that wrote the code. An agent grading its own homework
at theverifygate is the single weakest point in an unattended run: it is the last
step beforecommit, and it is the one place where a wrong "yes" is expensive.
The verify gate today is a shell command. A passing command proves the tests ran, not
that the change is any good. Skein had the better instinct here — a reviewer persona that
reads the work and emits LGTM or NEEDS_WORK — and it is the piece worth taking.
What Changes
1. The brief names the persona for the current gate
Where the brief nudges fan-out, it now names the agent for the gate it is at: at
implement, delegate implementation slices to coder; at test, delegate to tester.
The nudge stays conditional on idle fleet capacity — delegating onto a busy fleet is
slower than not delegating — and it now also stays conditional on the persona existing in
the registry, so a repo without these agents gets no instruction it cannot follow.
2. A review gate that a subagent decides, not a shell command
A new gate kind: agent gates. An agent gate is satisfied when a named subagent returns
a pass verdict, and failed when it returns a fail verdict — the same pass/fail contract
the existing command gates already have, so the strike counting, the repair turn, and the
quarantine path are unchanged.
verify becomes an agent gate bound to reviewer by default. The reviewer is given the
change, its tasks.md, and the diff, and is denied write/edit by its own persona, so
it cannot fix what it is complaining about. Its NEEDS_WORK text becomes the failure
detail on the next iteration's brief, which is exactly the channel a failing command gate
already uses to drive a repair turn.
Because the reviewer runs through task, it gets its own session, its own derived
permission, and LocalPlacement onto an idle fleet node — and its parts render inline in
the session the user is watching.
3. Configuration, with an off switch
{
"experimental": {
"queue_personas": {
"implement": "coder",
"test": "tester",
"verify": "reviewer"
}
}
}Defaults apply when the named agents exist. Mapping a gate to false or omitting the key
returns that gate to its current behaviour. A gate mapped to an agent that does not exist
is a configuration error reported at run start, not a silent no-op — a review gate that
quietly stops reviewing is worse than one that refuses to start.
Impact
verifybecomes a review, not a re-run of the tests. Runs get slower and better.- Depends on
repo-agent-personasfor the agents to exist. - Composes with
role-model-chains: a reviewer can be pinned to a different model than
the coder, which is most of the value of a second opinion.
Disposition (2026-09-18)
Shipped — live checks moved. Shipped; live check 4.5 moved to fleet-live-verification.
Tasks
Depends on repo-agent-personas for the agents to exist.
Phase 1: Gate-to-persona bindings
- 1.1 Add
experimental.queue_personas: Record<string, string | false>to the config schema- Defaults:
implement → coder,test → tester,verify → reviewer - Validation:
bun run typecheck - Done 2026-08-06 in
packages/core/src/v1/config/config.ts.
- Defaults:
- 1.2 Resolve bindings against the agent registry at run start
- Present → bound; absent from config and registry → gate unchanged; named but missing → error
- Validation: unit test over the three outcomes
- Done 2026-08-06:
spec-queue/personas.ts(resolvePersonas), pure and import-free
likegates.ts, so the driver supplies the registry. 6 unit tests.
Phase 2: The brief names the persona
- 2.1 Thread the resolved binding for the current gate into
buildBrief - 2.2 Replace the generic fan-out sentence with one naming the gate's agent
- Still gated on
idlePeers.length > 0, now also on the binding resolving - Validation: brief tests for named / no-agent / no-idle-peer
- Done 2026-08-06. The nudge now says
subagent_type "coder"and adds "one call per
independent slice, keep work that shares a file in one call".
- Still gated on
Phase 3: Agent gates
- 3.1 Add an agent-gate kind alongside command gates in
gates.ts- Same pass/fail shape so strike counting, repair turns and quarantine are untouched
- Done 2026-08-06 as
AgentGates+runAgentGatein the driver; the gate's result is
the same{passed, output}shape, sofail()is unchanged.
- 3.2 Run the bound subagent via the
taskpath, carrying the run's authority ceiling- Give it the change,
tasks.md, and the diff - Done 2026-08-06. Child session of the running one, so its parts render inline where
the user is already looking. Permission isderiveSubagentSessionPermission(parent
denies + external_directory + todowrite/task denies) PLUS the persona's own denies,
put on the session rather than left to agent selection alone.
- Give it the change,
- 3.3 Parse the verdict; anything unrecognisable, errored, or timed out fails the gate
- Validation: unit tests for pass, fail-with-findings, error, timeout, garbage
- Done 2026-08-06:
readVerdict. Only the last 400 characters are authoritative, so a
review that quotes its own instructions and then concludes is read by its conclusion.
- 3.4 Carry fail verdict text into the next brief as the failure detail
- 3.5 Bind
verifyto the reviewer by default- Also: agent-bound gates are excluded from the suspect-misconfigured-gate heuristic. A
reviewer that says NEEDS_WORK three times is working; only a command that never
succeeded once is suspect.
- Also: agent-bound gates are excluded from the suspect-misconfigured-gate heuristic. A
Phase 4: Verification
- 4.1 Queue-mode test: a failing review gate produces a repair turn, not an advance
- Asserts the verdict text reaches a later prompt body, and that the run is NOT
reported as a suspected misconfiguration
- Asserts the verdict text reaches a later prompt body, and that the run is NOT
- 4.2 Queue-mode test: a reviewer subagent's session denies write and edit
- 4.3 Queue-mode test: a binding to a missing agent halts at start with a clear reason
- Asserts zero LLM calls — nothing is attempted
- 4.4
bun test test/loop/ --timeout 90000andbun run typecheckclean- 135/135 loop tests pass; workspace typecheck clean
- 4.5 Live run of
/autoon a real change; confirm the reviewer's parts render inline
Unchecked items above: see Disposition in proposal.md (2026-09-18).
Plan changes
13 done
Activity
androidand commentedon Sep 17, 2026
Archived 2026-09-18 — see the change's Disposition section.