# Rat P1p3 Spec Uarch Team

> Phase 1-3 pipeline running each phase's team skill with parallel workers. Use for 'spec to uarch team', 'Phase 1-3 team', 'parallel design pipeline'.

- Skill: `babyworm/rat-p1p3-spec-uarch-team` (Agent Skill)
- Install (CLI): `npx skillmds@latest add babyworm/rat-p1p3-spec-uarch-team`
- Raw SKILL.md: https://api.skillmd.com/api/skills/babyworm/rat-p1p3-spec-uarch-team/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: DevOps & Infra
- Author: babyworm (https://skillmd.com/u/babyworm)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/babyworm/rat-p1p3-spec-uarch-team

---


<Purpose>
Execute the Phase 1-3 design pipeline using Claude Code native team infrastructure
within each phase. The skill directly sequences phases, invoking each phase's team skill
for parallel execution. Inter-phase quality gates are enforced between phases.
</Purpose>

<Use_When>
- Starting complete design document pipeline from spec to uArch
- User says "spec to uarch team", "Phase 1-3 team", "parallel design pipeline"
- Want maximum parallelism within each design phase
</Use_When>

<Do_Not_Use_When>
- Only need a single phase (use the phase-specific team skill)
- Want sequential execution (use rat-p1p3-spec-uarch)
- Want to proceed through Phase 4-5 as well (use rat-auto-design)
</Do_Not_Use_When>

## Prerequisites

No phase prerequisites (starts from Phase 1).
Specification documents should be available in `specs/` directory.

## Execution

```python
# Legacy migration: rename pre-0.6.10 state file ONLY if new file does not exist
legacy = Read(".rat/state/rtl-spec-to-uarch-state.json")  # may not exist
if legacy:
    new_exists = Read(".rat/state/rat-p1p3-spec-uarch-state.json")  # check new file
    if not new_exists:
        Bash("mv .rat/state/rtl-spec-to-uarch-state.json .rat/state/rat-p1p3-spec-uarch-state.json")

# Initialize or resume state
state = Read(".rat/state/rat-p1p3-spec-uarch-state.json")  # may not exist

if state and state.current_phase > 1:
    # Resume: skip completed phases
    pass
else:
    # Fresh start
    Write(".rat/state/rat-p1p3-spec-uarch-state.json",
      { "schema_version": "3.0", "current_phase": 1, "pipeline_scope": "phase-1-to-3",
        "execution_mode": "team",
        "phases": {
          "1": { "status": "pending" },
          "2": { "status": "pending" },
          "3": { "status": "pending" }
        }
      })

# ── Phase 1: Research (team) ──────────────────────────────────
if phases["1"]["status"] != "completed":
    Skill(skill="rtl-agent-team:rtl-p1-research-team", args="$ARGUMENTS")

    # Phase 1→2 artifact gate (iron-requirements is the settled SSOT;
    # open-requirements is optional — absent if Phase 1 had no deferred research)
    Glob("docs/phase-1-research/iron-requirements.json")
    Glob("docs/phase-1-research/io_definition.json")
    Glob("docs/phase-1-research/timing_constraints.json")
    Glob("docs/phase-1-research/domain-analysis.md")
    # All four required artifacts must exist. If missing: FAIL.

    # Update state
    # phases["1"]["status"] = "completed"

# ── Phase 2: Architecture + RefC (team) ───────────────────────
if phases["2"]["status"] != "completed":
    Skill(skill="rtl-agent-team:rtl-p2-arch-team", args="Phase 1 artifacts complete")

    # Phase 2→3 artifact gate
    Glob("docs/phase-2-architecture/architecture.md")
    Glob("refc/**/*.c")
    # Must exist. If missing: FAIL.

    # Update state
    # phases["2"]["status"] = "completed"

# ── Phase 3: uArch + BFM (team) ──────────────────────────────
if phases["3"]["status"] != "completed":
    Skill(skill="rtl-agent-team:rtl-p3-uarch-team", args="Phase 2 artifacts complete")

    # Phase 3 artifact gate
    Glob("docs/phase-3-uarch/*.md")
    Glob("bfm/")
    # Must exist. If missing: FAIL.

    # Update state
    # phases["3"]["status"] = "completed"

# ── Completion ────────────────────────────────────────────────
# Report: Phase 1-3 artifacts, reviews, ADR count
# Suggest: "Run /rtl-agent-team:rat-p4p5-impl-verify to begin RTL implementation"
# Do NOT proceed to Phase 4
```

Each phase's team skill handles its own TeamCreate/TeamDelete lifecycle.
This skill sequences phases and enforces inter-phase quality gates.

