Prerequisites
Phase 1 completion required:
docs/phase-1-research/iron-requirements.json must exist
docs/phase-1-research/open-requirements.json (optional — absent if P1 had no open items)
docs/phase-1-research/io_definition.json must exist
If prerequisites are missing: WARNING — recommend running /rtl-agent-team:p1-spec-research.
Proceed with available artifacts — orchestrator will adapt scope.
Execution
# Step 1: Team creation (main session = leader)
TeamCreate(team_name="p2-arch", description="Phase 2 architecture: dual-stream arch + RefC development")
# Step 2: Write team-config.json for hook consumption
Write(".rat/state/team-config.json", json.dumps({
"team_mode": true,
"team_name": "p2-arch",
"leader_session_id": "<current_session_id>",
"coordinator_name": "coordinator",
"worker_count": 3,
"phase": "p2",
"created_at": "<ISO_TIMESTAMP>"
}))
# Step 3: Prepare directories
Bash("mkdir -p docs/phase-2-architecture reviews/phase-2-architecture .rat/scratch/phase-2")
# Step 4: No initial tasks from skill — coordinator creates T1a-N after reading P1 artifacts
# Step 5: Spawn coordinator as teammate (orchestrator)
Agent(team_name="p2-arch", subagent_type="rtl-agent-team:p2-arch-team-orchestrator",
name="coordinator", description="P2 architecture coordination",
prompt="You are the Phase 2 architecture coordinator in team 'p2-arch'. "
"Manage the task graph using TaskCreate/TaskList/TaskUpdate. "
"Direct workers via SendMessage. "
"Create all tasks (T1a-N HW eval through T13 final consolidation), then perform "
"Step 3.7/3.8 iron/open artifact production (REQ-A-* from resolved OPEN-1-*) + open "
"resolution + ambiguity gate, then T14 compliance. "
"Signal leader ONLY after the Phase 2 Gate (Step 4) passes — including the "
"Step 3.9 compliance check, ADR generation, and the mandatory Codex cross-review. "
"User input: $ARGUMENTS")
# Step 6: Spawn workers as teammates (3 general-purpose)
Agent(team_name="p2-arch", subagent_type="rtl-agent-team:arch-designer",
name="arch-worker", description="P2 architecture design and review",
prompt="You are a Phase 2 architecture worker in team 'p2-arch'. "
"Coordinator: 'coordinator' (send results via SendMessage). "
"Phase artifacts: docs/phase-2-architecture/, reviews/phase-2-architecture/. "
"Specialty: architecture design, HW evaluation, bandwidth integration. "
"For specialist work, spawn: Task(subagent_type='rtl-agent-team:<specialist>', prompt='...'). "
"Examples: vcodec-architecture-expert for HW eval, rtl-architect for review. "
"Follow the Team Worker Protocol section of your agent definition. "
"Scratch dir: .rat/scratch/phase-2/ (for write-restricted outputs).")
Agent(team_name="p2-arch", subagent_type="rtl-agent-team:ref-model-dev",
name="refmodel-worker", description="P2 reference model development",
prompt="You are a Phase 2 ref-model worker in team 'p2-arch'. "
"Coordinator: 'coordinator' (send results via SendMessage). "
"Phase artifacts: refc/, docs/phase-2-architecture/. "
"Specialty: C reference model development, model consistency review. "
"For specialist work, spawn: Task(subagent_type='rtl-agent-team:ref-model-reviewer', prompt='...'). "
"Follow the Team Worker Protocol section of your agent definition.")
Agent(team_name="p2-arch", subagent_type="rtl-agent-team:rtl-architect",
name="review-worker", description="P2 architecture review lead",
prompt="You are a Phase 2 review worker in team 'p2-arch'. "
"Coordinator: 'coordinator' (send results via SendMessage). "
"Phase artifacts: reviews/phase-2-architecture/. "
"Specialty: spec compliance review, architecture review aggregation. "
"For specialist work, spawn: Task(subagent_type='rtl-agent-team:<specialist>', prompt='...'). "
"Follow the Team Worker Protocol section of your agent definition. "
"Scratch dir: .rat/scratch/phase-2/ (for write-restricted outputs).")
# Step 7: Leader wait — teardown is gated on the COORDINATOR SIGNAL, not on TaskList.
# "All tasks completed" is necessary but NOT sufficient: the coordinator's post-gate
# work (compliance check, ADR generation, phase summary, Codex cross-review) runs via
# direct Task() calls that never appear in the shared task graph.
while True:
if coordinator_signaled_phase_complete:
# SendMessage from 'coordinator' — sent only after the phase gate
# AND all post-gate mandatory steps pass (see coordinator prompt above)
break
tasks = TaskList()
if all(t.status == "completed" for t in tasks):
# Task graph drained but no coordinator signal yet → the coordinator is
# still running gate/post-gate steps. KEEP WAITING — do NOT TeamDelete.
pass
# Continue polling
# Step 8: Cleanup
TeamDelete()
Bash("rm -f .rat/state/team-config.json")
Bash("rm -rf .rat/scratch/phase-2/")
Workflow Notes
- Open Resolution: resolve all OPEN-1-* items from Phase 1
open-requirements.json
- Exit gate includes
open-resolved, compliance-pass (compliance-checker vs P1 iron, orchestrator Step 3.9), and ambiguity-pass
1---2name: rtl-p2-arch-team3description: Phase 2 architecture with parallel team workers: dual-stream arch + RefC development. Use for 'arch team', 'Phase 2 team', 'parallel architecture'.4---56<Purpose>7Execute Phase 2 architecture design pipeline using Claude Code native team infrastructure.8The skill (main session) handles team lifecycle: TeamCreate, coordinator + worker9spawning, task monitoring, and cleanup. The coordinator teammate manages task graphs10and directs workers via SendMessage.11</Purpose>1213<Use_When>14- Phase 1 research is complete and architecture design is needed15- User says "arch team", "Phase 2 team", "parallel architecture"16- Have multiple algorithm candidates requiring parallel HW evaluation17- Need maximum parallelism for dual-stream arch + RefC development18</Use_When>1920<Do_Not_Use_When>21- Phase 1 research not complete (run p1-spec-research first)22- Single candidate only (use p2-arch-design for simpler flow)23- Only need reference model (use ref-model)24</Do_Not_Use_When>2526## Prerequisites2728Phase 1 completion required:29- `docs/phase-1-research/iron-requirements.json` must exist30- `docs/phase-1-research/open-requirements.json` (optional — absent if P1 had no open items)31- `docs/phase-1-research/io_definition.json` must exist3233If prerequisites are missing: WARNING — recommend running `/rtl-agent-team:p1-spec-research`.34Proceed with available artifacts — orchestrator will adapt scope.3536## Execution3738```python39# Step 1: Team creation (main session = leader)40TeamCreate(team_name="p2-arch", description="Phase 2 architecture: dual-stream arch + RefC development")4142# Step 2: Write team-config.json for hook consumption43Write(".rat/state/team-config.json", json.dumps({44 "team_mode": true,45 "team_name": "p2-arch",46 "leader_session_id": "<current_session_id>",47 "coordinator_name": "coordinator",48 "worker_count": 3,49 "phase": "p2",50 "created_at": "<ISO_TIMESTAMP>"51}))5253# Step 3: Prepare directories54Bash("mkdir -p docs/phase-2-architecture reviews/phase-2-architecture .rat/scratch/phase-2")5556# Step 4: No initial tasks from skill — coordinator creates T1a-N after reading P1 artifacts5758# Step 5: Spawn coordinator as teammate (orchestrator)59Agent(team_name="p2-arch", subagent_type="rtl-agent-team:p2-arch-team-orchestrator",60 name="coordinator", description="P2 architecture coordination",61 prompt="You are the Phase 2 architecture coordinator in team 'p2-arch'. "62 "Manage the task graph using TaskCreate/TaskList/TaskUpdate. "63 "Direct workers via SendMessage. "64 "Create all tasks (T1a-N HW eval through T13 final consolidation), then perform "65 "Step 3.7/3.8 iron/open artifact production (REQ-A-* from resolved OPEN-1-*) + open "66 "resolution + ambiguity gate, then T14 compliance. "67 "Signal leader ONLY after the Phase 2 Gate (Step 4) passes — including the "68 "Step 3.9 compliance check, ADR generation, and the mandatory Codex cross-review. "69 "User input: $ARGUMENTS")7071# Step 6: Spawn workers as teammates (3 general-purpose)72Agent(team_name="p2-arch", subagent_type="rtl-agent-team:arch-designer",73 name="arch-worker", description="P2 architecture design and review",74 prompt="You are a Phase 2 architecture worker in team 'p2-arch'. "75 "Coordinator: 'coordinator' (send results via SendMessage). "76 "Phase artifacts: docs/phase-2-architecture/, reviews/phase-2-architecture/. "77 "Specialty: architecture design, HW evaluation, bandwidth integration. "78 "For specialist work, spawn: Task(subagent_type='rtl-agent-team:<specialist>', prompt='...'). "79 "Examples: vcodec-architecture-expert for HW eval, rtl-architect for review. "80 "Follow the Team Worker Protocol section of your agent definition. "81 "Scratch dir: .rat/scratch/phase-2/ (for write-restricted outputs).")82Agent(team_name="p2-arch", subagent_type="rtl-agent-team:ref-model-dev",83 name="refmodel-worker", description="P2 reference model development",84 prompt="You are a Phase 2 ref-model worker in team 'p2-arch'. "85 "Coordinator: 'coordinator' (send results via SendMessage). "86 "Phase artifacts: refc/, docs/phase-2-architecture/. "87 "Specialty: C reference model development, model consistency review. "88 "For specialist work, spawn: Task(subagent_type='rtl-agent-team:ref-model-reviewer', prompt='...'). "89 "Follow the Team Worker Protocol section of your agent definition.")90Agent(team_name="p2-arch", subagent_type="rtl-agent-team:rtl-architect",91 name="review-worker", description="P2 architecture review lead",92 prompt="You are a Phase 2 review worker in team 'p2-arch'. "93 "Coordinator: 'coordinator' (send results via SendMessage). "94 "Phase artifacts: reviews/phase-2-architecture/. "95 "Specialty: spec compliance review, architecture review aggregation. "96 "For specialist work, spawn: Task(subagent_type='rtl-agent-team:<specialist>', prompt='...'). "97 "Follow the Team Worker Protocol section of your agent definition. "98 "Scratch dir: .rat/scratch/phase-2/ (for write-restricted outputs).")99100# Step 7: Leader wait — teardown is gated on the COORDINATOR SIGNAL, not on TaskList.101# "All tasks completed" is necessary but NOT sufficient: the coordinator's post-gate102# work (compliance check, ADR generation, phase summary, Codex cross-review) runs via103# direct Task() calls that never appear in the shared task graph.104while True:105 if coordinator_signaled_phase_complete:106 # SendMessage from 'coordinator' — sent only after the phase gate107 # AND all post-gate mandatory steps pass (see coordinator prompt above)108 break109 tasks = TaskList()110 if all(t.status == "completed" for t in tasks):111 # Task graph drained but no coordinator signal yet → the coordinator is112 # still running gate/post-gate steps. KEEP WAITING — do NOT TeamDelete.113 pass114 # Continue polling115116# Step 8: Cleanup117TeamDelete()118Bash("rm -f .rat/state/team-config.json")119Bash("rm -rf .rat/scratch/phase-2/")120```121122## Workflow Notes123124- Open Resolution: resolve all OPEN-1-* items from Phase 1 `open-requirements.json`125- Exit gate includes `open-resolved`, `compliance-pass` (compliance-checker vs P1 iron, orchestrator Step 3.9), and `ambiguity-pass`