Skip to main content
TRW
LATTICE // TEAMS
FOR ENTERPRISE TEAMSTEAM SCALE — TALK TO SALES

Multiple agents, one coherent output

Role-specialized agents with enforced file ownership, four coordination formations, and structured handoffs — so parallel work doesn't become parallel chaos.

Sequential stages with clean handoffs — each agent completes before the next begins.

trw-researcherread-onlytrw-implementersrc/**trw-testertests/**trw-reviewerread-only difftrw-adversarial-auditorread-only auditstep 1/5

nodes light as active · dashed boundary = file ownership scope · packet = handoff

LEDGER // PROBLEM

One agent trying to do everything produces worse output

Split attention across research, implementation, and review degrades everything. A focused specialist with narrow context outperforms a generalist with wide context. This is empirically true for humans — focused engineers working in tight file scopes produce fewer defects than engineers switching contexts constantly. The same holds for LLMs: the researcher reading five files finds more relevant signal than the implementer reading five hundred files while also writing code. Specialization is the lever.

Looking for why teams choose TRW? see /for/teams — this page covers the mechanics.

LEDGER // ROSTER

The 12 specialists

Full agent definitions live in the agent roster docs.

AGENTROLEFILE SCOPE
trw-leadOrchestrator, no file writes of its ownplan / delegate
trw-implementerProduction code authorsrc/**
trw-testerTest authoring onlytests/**
trw-reviewerRead-only diff reviewread-only
trw-researcherContext gathering, read-onlyread-only
trw-adversarial-auditorSpec-vs-code audit, read-onlyread-only
trw-prd-groomerPRD drafting and groomingdocs/requirements/**
trw-requirement-writerFunctional requirement authoringdocs/requirements/**
trw-requirement-reviewerFR review and quality gateread-only
trw-traceability-checkergrep-verify FR ↔ code ↔ test linksread-only
trw-code-simplifierRefactoring only, no net-new featuressrc/**
trw-auditorPost-hoc compliance auditread-only
LATTICE // OWNERSHIP

File ownership, enforced

Each spawned agent declares its file scope at startup. Writes outside that scope are rejected at the hook layer before the filesystem is touched. Silent overlap between parallel agents is structurally impossible — not a convention, not a guideline, not something you have to remember. The trw-implementer owns src/module.*; the trw-tester owns tests/test_module.*. Both run in the same wave. Neither can write to the other's scope. The same pattern applies whether your repo is Python, TypeScript, Go, or anything else — scopes are glob patterns, not language rules.

SCOPE DECLARATIONper agent, at spawn time
OVERLAP DETECTIONhook layer, pre-write
CONFLICT RESOLUTIONtwo waves, not two shards
LATTICE // FORMATIONS

Four coordination formations

TRW lets you choose the topology that matches the work — not just whether to use multiple agents, but how they relate to each other. Toggle between formations in the graph above; explanations below.

PIPELINE

Sequential stages with clean handoffs.

Use when each stage depends on the previous output and cannot start until the predecessor is complete. Default for most feature implementations.

MAP-REDUCE

Parallelizable research → single merge.

Use when the same task can be split into independent axes (e.g., read three separate modules) and the outputs merge into one implementer. Reduces wall-clock time for large codebases.

PLANNER-EXECUTOR-REFLECTOR

Single synthesis from diverse inputs.

Use when a plan needs execution feedback to improve. The reflector reads the executor's diff and feeds back to the planner before the next wave. Good for iterative design.

DEBATE-CRITIC-JUDGE

Quality-critical decisions via adversarial evaluation.

Use when correctness matters more than speed. Two implementers propose competing approaches; the adversarial auditor probes both; the reviewer delivers a verdict. High cost, high confidence.

TRACE // WAVES

Wave/shard execution

Work decomposes into parallel SHARDS within sequential WAVES. Wave 1 (foundation) must complete before Wave 2 (integration) begins. Shards within a wave run concurrently. This model is defined in FRAMEWORK.md, not implemented as MCP tool overhead — which reduces context per agent by 77% compared to the v0.2.0 tool-based approach. The orchestrator writes shards/wave_manifest.yaml before spawning agents; each shard writes its findings to scratch/shard-{id}/findings.yaml before returning.

wave_manifest.yaml
WAVE 1 — FOUNDATION3 shards, parallel, blocking
WAVE 2 — INTEGRATION2 shards, after wave 1 exits
WAVE 3 — SYNTHESIS1 shard, serial (do not parallelize)
SHARD OUTPUT FORMATfindings.yaml → summary + evidence
CONTEXT REDUCTION77% vs v0.2.0 tool-based model
TERMINAL // HOOKS

Subagent hooks

subagent-start.sh injects phase-specific guidance and the ceremony protocol into every spawned agent at startup. No agent operates outside the ceremony envelope, regardless of which formation it runs in. The hook fires before the agent receives its task, so every agent starts with consistent context: current phase, active run ID, and required tool lifecycle.

HOOKsubagent-start.sh
FIRESbefore first task message
INJECTSphase guidance + ceremony protocol
SCOPEevery spawned agent, all formations
LEDGER // FAQ

Common questions

Do I need to run agents in parallel to use TRW?

No. Single-agent workflows work fine and are the right starting point. Agent teams unlock when work decomposes into independent axes — research, implementation, testing — that benefit from dedicated context windows.

How does file ownership work if I need the same file edited twice?

Use two sequential waves, not two shards in the same wave. Wave 1 produces the initial edit; Wave 2 produces the refinement. Same-file concurrent writes create races that are rejected at the hook layer.

Is agent spawning experimental?

Yes. Spawning multi-agent teams is behind a feature flag in every supported client while the orchestration hardens. Claude Code requires `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` in your `settings.json` env block; other clients enable it through their respective agent-teams configs. Without the flag set, team-creation calls silently fail.
TERMINAL // ORCHESTRATE

Stop running one agent. Run the right ones.

Twelve specialists, four formations, enforced file ownership, and structured handoffs. Access is currently limited while onboarding hardens.