18 specialized agents across 5 teams, orchestrated by two skills — the CEO (build pipeline) and the CPO (product quality). Every feature flows through a mandatory 8-agent sequence with hard gates, parallel execution, and zero tolerance for skipped steps.
Every feature traverses this pipeline. No exceptions. Skipping an agent is a logged pipeline deviation. The CEO orchestrates; agents execute.
Hard gates: Gatekeeper REJECT loops back to Mason (max 3). Board review is never deferred. Scribe is mandatory. "I'll do it later" is a pipeline violation.
/vitalchess-goThe CEO is the main conversation loop. It reads state, picks the next task from the backlog, and drives it through the full pipeline. It never writes code — it spawns agents, waits for results, routes fixes, and maintains bookkeeping files.
tsconfig.app.json. Then immediately: update BACKLOG.md, PROJECT_STATE.md, COMPONENT_REGISTRY.md. No deferring — stale state files caused cross-session context loss.
The CEO Never Writes Code. Not a line. Not a "quick fix." The P5-04 micro-fix exception (≤3 lines) was revoked after the CEO exceeded it on first use — a 5-line test fix + production cleanup that broke the build. All fixes route to the owning agent.
Token Budget Heuristics: After 4 features, warn. After 6, shut down. Context compression events trigger immediate warnings. 150 CEO turns = warn, 200 = forced shutdown with 20-turn reserve for clean exit.
A key pattern learned through failure. The CEO routes fixes to the agent that owns the domain, not the default Mason.
/vitalchess-cpoThe CPO is the product lens. It tests the live app as a user — not code analysis, not test suites. It spawns agents to screenshot, explore, break things, then routes findings to the CEO pipeline. Its primary deliverable is Playwright E2E tests for verified-working flows.
npm run build), test check (npx vitest run), route screenshots via Playwright MCP, playbook risk analysis. Produces a pre-scan report.
@playwright/test specs for each passing flow. Creates reusable auth fixtures. Updates tests/e2e/COVERAGE.md.
Features first, edges second. CPO must exercise core features (match submit, confirm, badges) end-to-end before probing auth and validation edges. CPO Session 1 found 5 major bugs that 7 consecutive CEO QA cycles missed because they only tested happy paths.
| CEO | Builds features through mandatory pipeline |
| CPO | Tests the product as a real user |
| CEO | Spawns Masons to fix code |
| CPO | Spawns Eye+Explorer to find bugs |
| CEO | Maintains bookkeeping state files |
| CPO | Maintains test playbook + product docs |
| CEO | Runs Board to improve pipeline |
| CPO | Runs Board to improve testing |
Scaffold, tokens, primitives. Runs once at project start.
Design, map impact, enforce reuse, write failing tests, document.
Implement, polish, review. The assembly line.
Test, validate, break things, report.
toHaveScreenshot() with 0.2% diff threshold. Design token compliance scan. Lighthouse audit on deploys.Audit the delivery process itself. Both agents always run in parallel.
5 enforcement rules, all checked by the Gatekeeper. Violations are merge blockers unless noted.
| Rule | What It Enforces | Severity | Checked By |
|---|---|---|---|
| Design Tokens | No hardcoded colors, fonts, spacing, animation timings, or inline styles. All values from tokens.css semantic layer. |
BLOCKER | Gatekeeper, Eye |
| Component Reuse | Decision tree for new vs extend. No one-off components. Shared hooks in src/lib/. Check COMPONENT_REGISTRY first. |
BLOCKER | Librarian, Gatekeeper |
| TDD | Failing tests first. No external service mocks. Auth lifecycle E2E mandatory. Behavior assertions only. Coverage >80%. | BLOCKER | Specwriter, Gatekeeper |
| Auth & Security | Server-validated auth state. No plaintext PINs. Route protection with redirects. No privilege escalation via client state. | BLOCKER | Gatekeeper, Explorer |
| Performance | Bundle <2MB gzipped. Lighthouse >80 (deploy only). 60fps animations. No UI-blocking queries >100ms. | BLOCKER / WARNING | Gatekeeper, Eye |
The specific patterns that make the pipeline work — parallel execution, gate loops, budget management, and session recovery.
When a feature has 3+ implementation files across different domains, the CEO splits work across multiple Masons in the same worktree:
All Masons share type contracts from the Specwriter as the boundary. After all finish, the CEO runs npx vitest run to catch integration issues. Max 2 integration fix rounds. If a Mason reports BLOCKED, the CEO identifies the dependency and runs it serially.
When NOT to parallelize: Features with <3 files, tightly coupled files, or the first feature establishing a new pattern.
The Gatekeeper is a hard gate with a 3-strike escalation pattern:
Fixes are routed to the owning agent based on the violation type, not always back to Mason. Visual issues go to Artisan, test issues to Specwriter, etc.
Agents die mid-task from rate limits, context exhaustion, or network issues. The recovery protocol:
PROJECT_STATE.md to determine phase + current branchgit status, branches, worktreesdocs/plans/{task-id}.md, test files, codeWorktree work persists across session deaths — the branch and changed files survive. State is persisted at every phase transition, not just feature completion.
Context compression events trigger immediate warnings. Agent spawn failures = stop immediately. The CEO reserves 20 turns minimum for the shutdown sequence (state save, push, report).
When the Architect's plan lists 10+ modified files or 3+ deletions:
Each recommendation is tagged: Impact (HIGH/MED/LOW), Effort (XS/S/M/L), Type (rule-change / agent-change / process-change / tooling-change).
The two orchestrators don't run simultaneously — they alternate. The handoff mechanism:
Key insight: CPO finds, CEO fixes. CPO prefers to only discover issues. Substantial fixes always route through the standard CEO pipeline with proper agent routing and Gatekeeper review.
15+ findings from CPO Sessions 1–3. Two were fixed in P5-04. The rest await the CEO pipeline.