The role experiment — does adding roles pay?¶
Note
Mirrored from docs/ROLE-EXPERIMENT.md — edit the source, then run python3 bin/docs_build.py build.
The question¶
The kit execution loop's trio (implementer / verifier / reviewer) can grow to ten roles (the role-roster kit added scout, test-author, second-verifier, red-team, security-auditor, docs-editor, synthesizer as OPTIONAL, per-kit declared roles). Adding a role costs real dispatches. The question this protocol answers, kit by kit, is: does each extra role catch anything a cheaper roster would have missed, for a cost you'd pay again? Never answered by vibes — answered by measurement.
The method: marginal-catch on real kits¶
The unit of evidence is a marginal catch: when a role's findings are adjudicated,
the orchestrator also decides how many CONFIRMED findings were NEW — caught by no
earlier layer of the pipeline on that task (or phase, for phase-scoped roles). That
adjudication rides the existing agent: ledger line as an optional marginal= field,
alongside the existing findings=/confirmed=.
The canonical pipeline order (a finding raised by an earlier layer is never marginal for a later one that raises it too):
scout → implementer → test-author → verifier → second-verifier → red-team → reviewer →
security-auditor → docs-editor → synthesizer
Two parallel pairs get a stated tiebreak: a finding raised by both verifier and second-verifier belongs to the verifier (not marginal for second-verifier); one raised by both reviewer and security-auditor belongs to the reviewer (not marginal for security-auditor). A finding is never counted marginal twice.
Why marginal-catch on real kits, not a cross-kit A/B¶
The alternative this repo considered and rejected is a paid A/B: run the same kit twice, once at a smaller roster and once at a larger one, and compare outcomes. Marginal-catch wins for this repo on two grounds:
- Self-controlled, no duplicate spend. Each task or phase is compared against itself — the same implementer output, the same verifier pass, judged by whether the NEXT role added anything. An A/B would need to run every kit twice to hold the task constant, doubling spend on every kit forever just to keep measuring.
- It rides the ledger that already exists.
agent:lines,findings=/confirmed=, and (now)marginal=are recorded as part of normal kit execution — the experiment is a read of data every kit run already produces, not a separate harness.
Its honest limits¶
- Kits differ in difficulty. A kit with subtle contract edits will show different marginal rates than a mechanical wiring kit — the comparison is never apples-to-apples across kits, only within a kit's own pipeline order.
- Adjudication is human.
marginal=is only as honest as the orchestrator deciding it at review time. There is no automated ground truth for "would an earlier layer have caught this." - Sample accrues slowly. One kit run yields a handful of dispatches per role. Reading a role's marginal rate as settled before it clears the sample floor is exactly the mistake the honesty labels below exist to prevent.
Three workflows, one role contract¶
Since roadmap step 20 a kit's roster is a stated WORKFLOW, and each role is a stated
CONTRACT, both in bin/kit_contract.py and both read by the interactive skill and every
headless driver through the same grammar:
python3 bin/kit_contract.py roster --kit <dir> [--executor EXECUTOR] [--json]
--executor chooses who would run it, out of interactive | claude-code | copilot |
codex | cursor | stub (--help prints the set; the default is the interactive
execute skill). --json returns the roster, the support verdict, and every role's
contract.
| Workflow | PLAN.md | Roles | Assurance it carries |
|---|---|---|---|
direct |
workflow: direct (must be named) |
implementer | the task's own deterministic check |
reviewed |
nothing (the default) | implementer, verifier, reviewer | + independent verification, independent review |
extended |
roles: <tokens> |
the trio + the declared roles | + each declared role's own kind |
A role's contract names its responsibility, scope (task / phase / run), hook, assurance
kind (deterministic-check, independent-verification, independent-review,
adversarial-test, fence-audit, grounding, documentation, synthesis), required
artifacts, allowed capabilities (read / search / shell / write-code / write-tests /
write-docs / write-notes), whether it produces adjudicable findings, and its result
fields — separately from whether another agent is spawned to provide it. That
separation is the point: direct exists so a small task can complete under a
deterministic check without a mandatory trio, and it must be asked for by name because
it drops independent review; reviewed is every kit ever written; a declared role runs
because the kit stated it for a purpose, never because its name exists.
What a headless driver can run. ROLE_SUPPORT states it per executor and the
drivers check it before previewing or claiming anything. It carries six executors:
the four headless drivers, plus interactive (the execute skill's own loop, which
sequences every role) and stub (the scheduler's conformance executor — a throwaway
process standing in for a harness so batching, isolation, integration and
cancellation can be proven without a model; it sequences the implementer and runs the
deterministic check, and its reviewer is unsupported because it has no review at
all).
All four drivers run the implementer and the phase-end independent review, each through its own argv:
| Driver | Implementer | Reviewer | Per-task verifier (partial) |
|---|---|---|---|
claude-code |
run |
review |
run executes the verify command; no verifier agent per task |
copilot |
run |
review |
same |
codex |
run |
review, then accept |
run executes the verify command; review dispatches an independent verifier per phase, not per task |
cursor |
run (agent -p --force) |
review (agent -p --mode ask) |
run executes the verify command under the execution boundary; no verifier agent per task |
The per-task verifier's assurance is partial everywhere and is disclosed, never
refused, because that has always been the headless shape; the seven optional roles
are unsupported on every driver today (the drivers sequence no hook) and a kit that
declares one is refused before dispatch with the supported alternatives named — run
it interactively, drop the role, or --roster-gap disclose to proceed with the gap
printed and recorded in the attempt ledger as roster.checked. Nothing is skipped in
silence. The seven templates the architect instantiates are consumer-neutral: they
name the kit's GUARDRAILS.md and the target repo's own conventions through a
<repo-root> placeholder, never this plugin's fences.
Test plan: is the baseline trio worth it?¶
The marginal-catch method above measures roles ADDED to the trio. It does not establish
that the trio beats direct. The plan for that, with no live A/B spend:
- Run the next small, low-risk kits at
workflow: direct— mechanical or single-file work whose verify command is a real red-to-green check. The scorecard labels an observed roster by its size (adirectkit readsR1), so its outcomes group separately fromR3kits under--rolesand--history. - Measure what
directwould have missed, after the fact, not in parallel. At the next phase boundary (or the kit's end) dispatch the reviewer once over thedirect-completed work and adjudicate its findings exactly as a phase review's: every confirmed finding is a catch the trio would have made anddirectdid not, recorded on thereviewer:line as usual. One review per kit, not one per task, is the whole cost of the measurement. - Compare on the same terms as the roles card: confirmed catches per kit against
the dispatches the trio would have spent (one verifier dispatch per task plus one
review per phase, at their pinned models), with the same evidence floor
(
MIN_ROLE_DISPATCHES) before reading anything as settled, and with the same order-dependent caveat — a review run afterdirectsees the finished work, which is a different vantage from a verifier that runs per task. - Decide between kits, by hand, and write the decision into the next PLAN.md as
workflow:; never let a run promote or demote its own workflow.
Until that sample exists, reviewed stays the default for the reason it always was:
an implementer's claim of success is not evidence.
The tier ladder¶
Roster size is DERIVED from the role tokens actually observed in a kit's ledger (which
roles actually ran), never from a declaration promise. The scorecard labels a kit R<n>
for <n> distinct roles observed. Four tiers make "3 to 10 and everything in between"
comparable across kits:
| Tier | Roles | Adds over the previous tier |
|---|---|---|
| R3 | implementer, verifier, reviewer | — (today's default; absent roles: line) |
| R5 | + test-author, red-team | test-author, red-team |
| R7 | + scout, second-verifier | scout, second-verifier |
| R10 | + security-auditor, docs-editor, synthesizer | security-auditor, docs-editor, synthesizer |
A kit may declare any subset of the seven optional roles via its PLAN.md roles: line —
tiers are the recommended comparison ladder, not a constraint. Absent roles: is R3,
today's behavior, on every kit ever written; nothing about running this experiment
changes that default.
Suggested cadence¶
Run the next few kits at ascending tiers — an R3 kit, then an R5 kit, then an R7 kit, then an R10 kit — so each tier accrues its own dispatch sample under real work, not a synthetic one. After each kit (or after a few), read the aggregate card:
python3 bin/routing_scorecard.py --roles
Add --session <id> and a kit slug for one kit's dollar figures (routed through the
same --by-task transcript-pricing machinery --roles already reuses); bare --roles
or --roles --kits-dir <dir> gives the cross-kit aggregate with dollars n/a.
How to read the card, column by column¶
Run it yourself before trusting a summary of it — python3 bin/routing_scorecard.py
--demo --roles renders the same columns against a synthetic kit, safe to explore.
- Dispatches. How many times the role ran. Below
MIN_ROLE_DISPATCHES(5) the row is tagged "insufficient sample" — its other columns are printed but should not be read as a settled verdict yet. A role with zero dispatches anywhere does not appear as a zero row at all; it is simply absent from the card. - Findings / Confirmed. Summed only over dispatches that recorded a precision pair.
- Precision. Confirmed ÷ findings. Renders
n/a, never a fabricated0%, when no dispatch recorded findings — None-not-zero: absence of data is not evidence of zero. - Marginal. The summed
marginal=count. Rendersn/a(never a fabricated0) when zero dispatches carried a measuredmarginal=field at all. When at least one dispatch WAS measured, this can legitimately read0— that is a real, measured finding (every confirmed catch was something an earlier layer already caught), not a missing-data gap. Legacy ledger lines written before this kit landed carry nomarginal=field; those dispatches count as "marginal unmeasured," never asmarginal=0. - Marginal unmeasured. The count of dispatches beside the Marginal cell that carried
no
marginal=at all — read it next to Marginal rate as a coverage figure: a role with a high measured rate but a high unmeasured count has thinner evidence than the rate alone suggests. - Marginal rate.
marginal ÷ marginal-measured— the MEASURED-dispatch denominator only, never divided by every dispatch. Dividing by every dispatch would dilute the rate with dispatches that recorded nomarginal=at all and understate a role whose measured sample is small but consistent. - Dollars.
n/aeverywhere unless a kit is priced with--session. Bases are never summed across kits: an aggregate row's dollars render only when every kit contributing to that role's aggregate is priced on the same basis; otherwise it isn/awith a note, never a blended figure. - Reviewer marginal: unmeasured. The
reviewer:family (phase-end review, its own NOTES.md line family) carries nomarginal=field at all — every reviewer row reads "marginal unmeasured" structurally, not as a gap that will fill in with more runs. Reviewer catches are real evidence (see the worked example below); they are just not yet wired into themarginal=field the wayagent:role dispatches are. - Escalation is excluded from every row. It delivers fixes, not verdicts (existing law from the routing-history kit) — it never counts toward roster size and never appears in the value table.
Four structural limits (read these before drawing any conclusion)¶
These were pinned during this kit's own P1 review and are load-bearing, not incidental:
- Phase/run-scoped roles can never carry per-task dollars.
security-auditor,docs-editor, andsynthesizerrun at phase or run boundaries, not per task — the never-split law (an orchestrator's or a shared agent's cost is never divided across the tasks or phases it touched) means their cost side is structurally unmeasurable today, by design, not by omission. "Does it pay?" for these three rests on marginal catches weighed against a cost YOU estimate from dispatch counts (how many times the role ran, at roughly what a dispatch on its pinned model costs) — never a number the card itself invents. - The marginal rate's denominator is MEASURED dispatches only. Read the Marginal
rate cell beside the Marginal-unmeasured count, always together — a rate is only as
trustworthy as the fraction of dispatches that actually recorded a
marginal=adjudication. The rate is catches per measured dispatch, not a share of dispatches that caught something — a single measured dispatch can carrymarginal=2(two confirmed findings on that one dispatch, each caught by no earlier layer), so the rate can legitimately read over 100% (4 marginal catches over 2 measured dispatches renders 200%). Read an over-100% rate as "this role is a prolific catcher — several of its dispatches each turned up more than one marginal finding," never as a rendering error or a sign the card is miscounting. - Marginal is ORDER-DEPENDENT, not role-intrinsic. The pipeline order above means earlier layers are structurally advantaged: they see the work first and get first claim on every catch. A late role's low (or zero) marginal rate never proves the role is worthless — it proves the earlier layers caught things first. Do not read a reviewer's low marginal rate as "drop the verifier," and do not read a security-auditor's low marginal rate as "drop the reviewer." Reordering the pipeline would change which role gets credit for the same catches.
- Some roles produce no adjudicable findings by design.
scout,docs-editor, andsynthesizerdo grounding, docs-freshness, and distilled-learnings work respectively — none of it is a "finding" in the confirmed/marginal sense. Their rows are dispatch-cost with indirect value, judged qualitatively (did the scout's grounding brief save the implementer a wrong turn? did the docs stay current? did the synthesized NOTES prose actually get reused?), never by precision or marginal rate. The card's own legend states this in words so a blank cell there reads as "by design," not "missing data."
Decision guidance (judgment, not law)¶
This is where the card informs a human call — it does not automate one:
- A role earns a standing place in future kits'
roles:lines when its marginal rate is materially non-zero over at leastMIN_ROLE_DISPATCHESdispatches, at a cost per marginal catch you would pay again. - Drop roles that measure zero-marginal over a real sample (past the insufficient- sample floor, not on one or two dispatches).
- Re-test after model-generation changes — a role's marginal rate is a property of the model doing the work as much as the role's mission; a generation upgrade can move it.
Worked example: this week's three reviewer marginal catches¶
Three reviewer catches this week are the closest thing to a worked example the ledger currently has, each one a finding the phase reviewer confirmed over a verifier pass that had already reported clean:
- harness-update, P2 review. The task's own verifier had reported
findings=0andresult=accepted(clean). The phase reviewer caught thatinstall_codex's prompts loop was an unconditional overwrite — the verifier's probe only exercised one file class and never saw the write path. NOTES.md records the lesson directly: "an adversarial verifier inherits the brief's blind spots — the reviewer's value was reading the REUSED module's write loop, not the new code." - graphify-skill, P1 review. Verifier passes for the covered tasks read clean; the
phase reviewer's findings included a
UnicodeDecodeErrorescape path reachable through graph linkcontextfields that no verifier probe exercised. Mutation-testing the guard on a copy afterward confirmed it fired. (.claude/kits/graphify-skill/NOTES.md) - graphify-skill, P2 review. A second, later-phase reviewer catch: a deny-list
surface claim named a phantom command that does not exist in the tool's measured
--help, while omitting the three largest real surfaces — caught only at phase review, not by the task-level verifier passes that preceded it. (.claude/kits/graphify-skill/NOTES.md)
No dollars are invented for these three — the harness-update and graphify-skill kits
predate marginal= and were not priced with --session for this purpose, so they are
cited as qualitative proof-of-concept for the METHOD, not as rows on a priced card. Kits
executed from here on carry marginal= on their agent: lines directly, so future
worked examples come straight off python3 bin/routing_scorecard.py --roles.
Where the facts live¶
This doc describes how to read the card, not what today's numbers are — those change every time a kit runs. For the current numbers, run the engine:
python3 bin/routing_scorecard.py --roles # cross-kit aggregate, dollars n/a
python3 bin/routing_scorecard.py <kit> --session ID --roles # one kit's dollars
python3 bin/routing_scorecard.py --demo --roles # synthetic smoke, safe to explore
The tier ladder, the honesty rules, and the seven role templates themselves live in
.claude/kits/role-roster/PLAN.md and skills/architect/references/roles/; the ledger
grammar (agent: line fields, including marginal=) is specified in the execute
skill. This doc is a reading guide to the measurement, not a second source of truth for
either.