--- name: project-review description: "CTO-level review of this repo — assesses vision, structure, requirements, architecture, and validation across the whole codebase. Triggers on /cla:project-review or natural language like 'review the whole project', 'CTO-level review', 'assess the codebase'." allowed-tools: Read, Bash, Grep, Glob, Agent --- # Project Review Run a comprehensive CTO-level review of this repo. Spine: **Step 0 build, lint and test (run FIRST) → Step 1 snapshot → Step 2 five parallel review agents → Step 3 aggregate, report, log.** **When to run:** After several incremental changes, before a pitch/demo, or when you want a fresh first-principles assessment. **Run thin (standing discipline — hoisted).** This skill IS an orchestrator: Step 2 dispatches five parallel review agents and Step 3 aggregates only their conclusions, never their raw reads. Follow `${CLAUDE_PLUGIN_ROOT}/skills/_shared/references/runtime-rules.md`'s standing disciplines throughout — delegate raw-material handling so only conclusions return, read file slices not whole files, batch independent tool calls into one message, and prefer terse schema'd agent output over prose. ## What the repo is (read before reviewing) **Read `cla.io/project-facts.md` before reviewing** — the repo's workspace layout, backend, dataset location, i18n layers and dev/build/test commands (run `/cla:cla-setup` when it is missing or stale) — and the repo's own root guidance doc and README for what the product is. `cla.io/overlays/project-review.md`, if present, adds review rules specific to this repo. If `cla.io/project-facts.md` lacks a fact this skill needs and this skill's overlay exists, the overlay may still hold it from before the move: tell the user "run /cla:cla-setup to move it". The agent prompts and the Step-1 Project Snapshot template take their repo facts from these sources, injected by the orchestrator at dispatch time, rather than hardcoding them. When naming a product/domain concept in the report, prefer this repo's canonical term from `cla.io/terminology.md` if it exists and covers the concept (soft — proceed on your own judgement if absent or silent on the term). ## Step 0: Build, lint and test — run FIRST, before any agent dispatch This step MUST complete before Step 2's dispatch — every agent receives its output as pre-verified input. **Read `references/baseline-checks.md` first** for the full checklist: what each check means, where its exact commands live (`cla.io/project-facts.md`), and how to interpret PASS/FAIL/SKIP. This stub carries only the ordering invariant. Print any FAIL immediately (`[Project Review] ⚠ {check}: {details}`), then collect everything into the **Baseline Facts** table (format in the reference). Announce: `[Project Review] Baseline checks complete — {n} PASS, {m} FAIL` ## Step 1: Collect project snapshot Build a compact **Project Snapshot** that, together with the Baseline Facts table, is the complete brief every agent receives — do NOT read full file contents to paste into agent prompts; agents read specific files themselves. **Read `references/aggregate-and-log.md` first** for the full snapshot template and its `cla.io/project-facts.md` sourcing. Announce: `[Project Review] Launching 5 review agents...` ## Step 2: Launch five review agents in parallel **Dispatch all FIVE agents concurrently, in a single message, via the Agent tool** (`general-purpose` unless a more specific agent fits) — this is the core dispatch invariant of this step; do not stagger or sequence them. **Read `references/review-agents.md` first** for the full prompt text (the standard instructions every agent gets, plus each of the five dimension-specific prompts) and construct each agent's prompt from it before dispatching. Read `references/review-criteria.md` for the grading rubric. Each agent receives: (1) the Project Snapshot, (2) the Baseline Facts table, (3) the relevant dimension criteria, (4) the standard instructions from the reference. **Model routing (pass an explicit `model:` per agent) — per the shared `${CLAUDE_PLUGIN_ROOT}/skills/_shared/references/model-routing.md` "Review-agent dispatch" section:** - **Agent 1 (Vision & Clarity) and Agent 4 (Architecture & Design) → `model: "opus"`** — the two premise-level dimensions (does the product story hold; is the architecture sound), where a cheaper model's miss is the expensive "the whole design is wrong" class. - **Agents 2, 3, 5 (Structure, Requirements & Specs, Validation & QA) → `model: "sonnet"`** — structured-rubric application over layout/specs/tests, where sonnet is sufficient. Effort is not dialable on `Agent`-dispatched work (it inherits the session); only the model is set here. On a session already at Opus, routing Agents 2/3/5 down to sonnet is the real economy; on a sub-Opus session, routing Agents 1/4 up to opus protects the highest-leverage judgment. Apply the routing whenever the session model differs from a dimension's target tier. ## Step 3: Aggregate, report, and log Wait for all five agents, then deduplicate/merge/extract-recommendations and print the report per the recipe in `references/aggregate-and-log.md` — **read that reference first**; this stub carries only the verdict rubric (the one correctness-gating piece of Step 3): **Compute verdict from dimension grades:** | Verdict | Criteria | |---------|----------| | **EXEMPLARY** | All dimensions A or B, none below B | | **STRONG** | Majority A/B, at most one C, no D | | **SOLID** | Majority B/C, no more than one D | | **NEEDS WORK** | Two or more D grades, or majority C/D | The report is the whole output — this skill persists no state across runs. ## References - `references/baseline-checks.md` — Step 0's full checklist: what each check verifies, exact commands, PASS/FAIL/SKIP interpretation, and the Baseline Facts table format (mandatory-read from the Step 0 stub) - `references/review-agents.md` — Step 2's full per-agent dispatch prompts: the standard instructions plus all five dimension prompts (mandatory-read from the Step 2 stub) - `references/review-criteria.md` — the portable grading rubric (signals + grade definitions) per dimension - `references/aggregate-and-log.md` — Step 1's snapshot template plus Step 3's dedup/merge/report-template recipe (mandatory-read from the Step 1 and Step 3 stubs) - `cla.io/overlays/project-review.md`, if present — review rules specific to this repo (read by the orchestrator; dispatched agents never load it themselves) - `${CLAUDE_PLUGIN_ROOT}/skills/_shared/references/model-routing.md` — the shared model/effort routing table (Step 2's "Review-agent dispatch" section is the single source of truth for this skill's per-agent model) - `${CLAUDE_PLUGIN_ROOT}/skills/_shared/references/runtime-rules.md` — the thin-orchestrator standing disciplines this skill follows (delegation, I/O hygiene, batching, structured output)