| 1 | # Agent Orchestration |
| 2 | |
| 3 | ## Available Agents |
| 4 | |
| 5 | Located in `~/.claude/agents/`: |
| 6 | |
| 7 | | Agent | Purpose | When to Use | |
| 8 | |-------|---------|-------------| |
| 9 | | planner | Implementation planning | Complex features, refactoring | |
| 10 | | architect | System design | Architectural decisions | |
| 11 | | tdd-guide | Test-driven development | New features, bug fixes | |
| 12 | | code-reviewer | Code review | After writing code | |
| 13 | | security-reviewer | Security analysis | Before commits | |
| 14 | | build-error-resolver | Fix build errors | When build fails | |
| 15 | | e2e-runner | E2E testing | Critical user flows | |
| 16 | | refactor-cleaner | Dead code cleanup | Code maintenance | |
| 17 | | doc-updater | Documentation | Updating docs | |
| 18 | |
| 19 | ## Immediate Agent Usage |
| 20 | |
| 21 | No user prompt needed: |
| 22 | 1. Complex feature requests - Use **planner** agent |
| 23 | 2. Code just written/modified - Use **code-reviewer** agent |
| 24 | 3. Bug fix or new feature - Use **tdd-guide** agent |
| 25 | 4. Architectural decision - Use **architect** agent |
| 26 | |
| 27 | ## Parallel Task Execution |
| 28 | |
| 29 | ALWAYS use parallel Task execution for independent operations: |
| 30 | |
| 31 | ```markdown |
| 32 | # GOOD: Parallel execution |
| 33 | Launch 3 agents in parallel: |
| 34 | 1. Agent 1: Security analysis of auth.ts |
| 35 | 2. Agent 2: Performance review of cache system |
| 36 | 3. Agent 3: Type checking of utils.ts |
| 37 | |
| 38 | # BAD: Sequential when unnecessary |
| 39 | First agent 1, then agent 2, then agent 3 |
| 40 | ``` |
| 41 | |
| 42 | ## Multi-Perspective Analysis |
| 43 | |
| 44 | For complex problems, use split role sub-agents: |
| 45 | - Factual reviewer |
| 46 | - Senior engineer |
| 47 | - Security expert |
| 48 | - Consistency reviewer |
| 49 | - Redundancy checker |
| 50 |