# Dynamic Composition Rules

## Principle

Only relevant specialists participate. A Go Pro doesn't sit in on a TypeScript project.

## Cross-Cutting Agents — ALWAYS PRESENT

Contrarian + Moonshot participate in EVERY debate at EVERY level. No exceptions.
They are the two extremes that push the boundaries of thinking.

## Board — ALWAYS STATIC

CEO, CTO, CFO, COO + Contrarian + Moonshot. Every brief. No exceptions.

## Planning 1 — Selected by Brief Analyzer (NOT the Board)

After Board approval, the Brief Analyzer (Sonnet) determines technical composition.

### Selection Heuristics

| Signal in Brief                             | Include                                                                                               |
| ------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| Any brief (always)                          | Software Architect                                                                                    |
| Any brief (always)                          | Security Architect — security is cross-cutting; implicit requirements are the norm, not the exception |
| Deploy, infrastructure, scaling, monitoring | Infrastructure Lead                                                                                   |
| Database, data models, migrations, queries  | Data Architect                                                                                        |
| UI, frontend, user-facing changes           | UX Strategist                                                                                         |

### Minimum Composition

Planning 1 always has at least: Software Architect + Security Architect + Contrarian + Moonshot.
The Brief Analyzer adds others as needed.

## Planning 2 — Selected by Planning 1

The ADR specifies which specialists participate.

### Selection Heuristics

Parse the ADR for:

| Signal in ADR                             | Include          |
| ----------------------------------------- | ---------------- |
| TypeScript / .ts files                    | TypeScript Pro   |
| JavaScript / .js / Node.js                | JavaScript Pro   |
| Go / .go files                            | Go Pro           |
| Rust / .rs / Cargo                        | Rust Pro         |
| Solidity / .sol / EVM                     | Solidity Pro     |
| Python / .py                              | Python Pro       |
| SQL / Prisma / database queries           | SQL Pro          |
| LangChain / RAG / embeddings / agents     | LangChain/AI Pro |
| NestJS / @nestjs                          | NestJS Expert    |
| React / JSX / components                  | React Specialist |
| React Native / Expo                       | React Native Pro |
| HTML / CSS / responsive                   | Web Design       |
| Design system / components / interactions | UX/UI Design     |
| Blockchain / DeFi / smart contracts       | Blockchain/DeFi  |
| Docker / Compose / Swarm                  | Docker/Swarm     |
| CI / pipeline / Woodpecker                | CI/CD            |

## Planning 3 — ALWAYS FIXED

Task Distributor + Context Manager. Every brief.

## Planning 2 — ALWAYS includes Contrarian + Moonshot alongside selected specialists

## Planning 3 — ALWAYS FIXED

Task Distributor + Context Manager + Contrarian + Moonshot.

## Review — Selected by task language

Code Reviewer (always) + Security Auditor (always) + the Language Specialist that matches the task's primary language.
(Contrarian and Moonshot do NOT participate in Review — that's evidence-based, not debate.)

If PR changes API endpoints → API Documentation Specialist also reviews.

## Documentation — Selected by change type

After Test passes, before Deploy:

| Signal                                     | Include                            |
| ------------------------------------------ | ---------------------------------- |
| API endpoint changes                       | API Documentation Specialist       |
| New architecture, setup steps, or patterns | Developer Documentation Specialist |
| User-facing feature changes                | User Documentation Specialist      |

Documentation completeness is enforced at the Deploy gate.
