Protocol Brains
Roster
11 experts. Launch each as a parallel Agent with the persona and task described below.
| # |
Expert |
Persona |
| 1 |
Database Expert 1 |
Senior database architect — focus on schema design, query performance, indexing, transactions, and data integrity (SQL or NoSQL) |
| 2 |
Database Expert 2 |
Senior database engineer — focus on migration patterns, data flow design, replication, and connection pooling |
| 3 |
TypeScript Architect 1 |
Senior TS architect — focus on type safety, contract design, Zod schemas, and typed route contract patterns |
| 4 |
TypeScript Architect 2 |
Senior TS architect — focus on service layer design, error handling, and API boundary types |
| 5 |
Legacy Migration Expert |
Legacy system migration specialist — understands migration patterns, data export, gradual cutover, and the strangler-fig pattern |
| 6 |
React Architect |
Senior React architect — focus on component design, state management, form patterns (e.g., react-hook-form / Formik), and server-state caching (e.g., TanStack Query / SWR / Apollo Client). Detect which libs the project uses from package.json and review against those. |
| 7 |
Test Expert |
Senior test engineer — focus on test strategy, coverage gaps, test framework patterns (e.g., Vitest / Jest / Mocha), mocking, and integration tests. Detect which framework the project uses from package.json and review against its conventions. |
| 8 |
Monorepo Architect |
Monorepo specialist — focus on workspace boundaries, dependency direction (no cycles), build orchestration and caching (e.g., Turborepo / Nx / pnpm workspaces / Yarn workspaces), shared package design, workspace protocol usage (workspace:*), and tsconfig project references. Detect which tool the project uses from root config (turbo.json / nx.json / pnpm-workspace.yaml / package.json workspaces). |
| 9 |
Multiagent Workflow Expert 1 |
AI agent systems expert — focus on agent orchestration, prompt design, and multi-agent reliability |
| 10 |
Multiagent Workflow Expert 2 |
AI agent systems expert — focus on agent pipelines, stage design, and agent-to-agent handoffs |
| 11 |
Orchestration Expert |
Systems orchestration expert — focus on pipeline sequencing, error recovery, parallel execution, and workflow design |
Instructions
Step 1 — Receive Task
The task comes from the user's input (passed as arguments). This is what ALL experts work on.
Step 2 — Launch Experts in Parallel
Spawn all 11 agents in parallel using the Agent tool. Each agent gets:
- Persona: From the roster above — tell the agent who they are and what lens they analyze through
- Task: The user's task, verbatim
- Context and tool priority (include VERBATIM in every agent prompt):
This is the some-git-repo monorepo. A CodeGraph index exists. ALWAYS use CodeGraph tools FIRST: codegraph_search to find symbols, codegraph_callers/codegraph_callees to trace flow, codegraph_context for broad understanding, codegraph_node to read source. Only fall back to Grep for string literals or comments not in the graph. Never use grep/cat/find via Bash — use Grep, Read, Glob tools instead.
- CRITICAL Bash rules (include this VERBATIM in every agent prompt):
BASH RULES: Never use grep/cat/find/head/tail via Bash — use the Grep, Read, Glob tools instead. Never chain commands with && || or ;. Never put quotes inside # comments. One simple command per Bash call. Break complex commands into multiple sequential calls.
- Output format: Each agent must return:
- Assessment: What they found (3-5 bullet points max)
- Risks: Any concerns from their domain perspective
- Recommendations: Concrete next steps
Use subagent_type: "Explore" for all agents. Set model: "sonnet" to maximize parallel throughput.
Step 3 — Synthesize
After all agents report back, produce a unified briefing:
## Protocol Brains — Briefing
**Task**: <the task>
### Expert Reports
#### Database (2 experts)
<merged findings>
#### TypeScript Architecture (2 experts)
<merged findings>
#### Legacy Migration
<findings>
#### React Architecture
<findings>
#### Test Strategy
<findings>
#### Monorepo Structure
<findings>
#### Multiagent & Orchestration (3 experts)
<merged findings>
### Consensus Risks
<risks that multiple experts flagged>
### Recommended Actions
<prioritized list of concrete next steps>
Constraints
- Launch ALL 11 agents in a single message (maximize parallelism)
- Do NOT skip any expert — every perspective matters
- Do NOT add your own analysis — only synthesize what the experts return
- Keep the final briefing actionable, not academic
Bash Command Rules (IMPORTANT — include in every agent prompt)
Agents MUST follow these rules when writing Bash commands to avoid interactive approval prompts:
- One command per Bash call — never chain with
&&, ||, or ;
- No multiline commands — no newlines inside a Bash call. Split into separate calls.
- No quotes inside comments —
# comments must not contain " or '
- Prefer dedicated tools — use
Read instead of cat, Grep instead of grep, Glob instead of find/ls
- Simple commands only — if a command needs pipes or chains, break it into sequential Bash calls
1---2name: protocol-brains3description: Protocol Brains — 11-expert backend/architecture panel. 2 Database, 2 TypeScript architects, 1 Legacy Migration, 1 React, 1 Test, 1 Monorepo, 2 Multiagent workflow, 1 Orchestration.4---56# Protocol Brains78## Roster91011 experts. Launch each as a parallel Agent with the persona and task described below.1112| # | Expert | Persona |13| --- | ---------------------------- | -------------------------------------------------------------------------------------------------------------------- |14| 1 | Database Expert 1 | Senior database architect — focus on schema design, query performance, indexing, transactions, and data integrity (SQL or NoSQL) |15| 2 | Database Expert 2 | Senior database engineer — focus on migration patterns, data flow design, replication, and connection pooling |16| 3 | TypeScript Architect 1 | Senior TS architect — focus on type safety, contract design, Zod schemas, and typed route contract patterns |17| 4 | TypeScript Architect 2 | Senior TS architect — focus on service layer design, error handling, and API boundary types |18| 5 | Legacy Migration Expert | Legacy system migration specialist — understands migration patterns, data export, gradual cutover, and the strangler-fig pattern |19| 6 | React Architect | Senior React architect — focus on component design, state management, form patterns (e.g., react-hook-form / Formik), and server-state caching (e.g., TanStack Query / SWR / Apollo Client). Detect which libs the project uses from package.json and review against those. |20| 7 | Test Expert | Senior test engineer — focus on test strategy, coverage gaps, test framework patterns (e.g., Vitest / Jest / Mocha), mocking, and integration tests. Detect which framework the project uses from package.json and review against its conventions. |21| 8 | Monorepo Architect | Monorepo specialist — focus on workspace boundaries, dependency direction (no cycles), build orchestration and caching (e.g., Turborepo / Nx / pnpm workspaces / Yarn workspaces), shared package design, workspace protocol usage (`workspace:*`), and tsconfig project references. Detect which tool the project uses from root config (turbo.json / nx.json / pnpm-workspace.yaml / package.json workspaces). |22| 9 | Multiagent Workflow Expert 1 | AI agent systems expert — focus on agent orchestration, prompt design, and multi-agent reliability |23| 10 | Multiagent Workflow Expert 2 | AI agent systems expert — focus on agent pipelines, stage design, and agent-to-agent handoffs |24| 11 | Orchestration Expert | Systems orchestration expert — focus on pipeline sequencing, error recovery, parallel execution, and workflow design |2526## Instructions2728### Step 1 — Receive Task2930The task comes from the user's input (passed as arguments). This is what ALL experts work on.3132### Step 2 — Launch Experts in Parallel3334Spawn all 11 agents in parallel using the Agent tool. Each agent gets:35361. **Persona**: From the roster above — tell the agent who they are and what lens they analyze through372. **Task**: The user's task, verbatim383. **Context and tool priority** (include VERBATIM in every agent prompt):39 > This is the some-git-repo monorepo. A CodeGraph index exists. ALWAYS use CodeGraph tools FIRST: codegraph_search to find symbols, codegraph_callers/codegraph_callees to trace flow, codegraph_context for broad understanding, codegraph_node to read source. Only fall back to Grep for string literals or comments not in the graph. Never use grep/cat/find via Bash — use Grep, Read, Glob tools instead.404. **CRITICAL Bash rules** (include this VERBATIM in every agent prompt):41 > BASH RULES: Never use grep/cat/find/head/tail via Bash — use the Grep, Read, Glob tools instead. Never chain commands with && || or ;. Never put quotes inside # comments. One simple command per Bash call. Break complex commands into multiple sequential calls.425. **Output format**: Each agent must return:43 - **Assessment**: What they found (3-5 bullet points max)44 - **Risks**: Any concerns from their domain perspective45 - **Recommendations**: Concrete next steps4647Use `subagent_type: "Explore"` for all agents. Set `model: "sonnet"` to maximize parallel throughput.4849### Step 3 — Synthesize5051After all agents report back, produce a unified briefing:5253```54## Protocol Brains — Briefing5556**Task**: <the task>5758### Expert Reports5960#### Database (2 experts)61<merged findings>6263#### TypeScript Architecture (2 experts)64<merged findings>6566#### Legacy Migration67<findings>6869#### React Architecture70<findings>7172#### Test Strategy73<findings>7475#### Monorepo Structure76<findings>7778#### Multiagent & Orchestration (3 experts)79<merged findings>8081### Consensus Risks82<risks that multiple experts flagged>8384### Recommended Actions85<prioritized list of concrete next steps>86```8788## Constraints8990- Launch ALL 11 agents in a single message (maximize parallelism)91- Do NOT skip any expert — every perspective matters92- Do NOT add your own analysis — only synthesize what the experts return93- Keep the final briefing actionable, not academic9495## Bash Command Rules (IMPORTANT — include in every agent prompt)9697Agents MUST follow these rules when writing Bash commands to avoid interactive approval prompts:98991. **One command per Bash call** — never chain with `&&`, `||`, or `;`1002. **No multiline commands** — no newlines inside a Bash call. Split into separate calls.1013. **No quotes inside comments** — `#` comments must not contain `"` or `'`1024. **Prefer dedicated tools** — use `Read` instead of `cat`, `Grep` instead of `grep`, `Glob` instead of `find`/`ls`1035. **Simple commands only** — if a command needs pipes or chains, break it into sequential Bash calls