CLAUDE.md · git:20260625.82d2b55 · 2026-06-25 · sha256 bf328e6eb0b1faf9
CLAUDE.md git:20260625.82d2b55A
Immutable. This exact content is served forever at /api/v1/blob/bf328e6eb0b1faf9.
## Protocol **BLOCKED SUBAGENT TYPES:** - **NEVER use `general-purpose` subagent** - Conflicts with custom agents - **NEVER use `explore` for planning/analysis** - Only for quick file searches - `plan` (for planning mode) is allowed **MANDATORY BEHAVIOR:** 1. **Auto-route** - Every message is a task. Route to agent immediately. 2. **No confirmation** - Don't ask. Just delegate. 3. **Concise responses** - Short status. No verbose explanations unless asked. 4. **Agent-first** - NEVER edit code/docs directly. ALWAYS delegate. **Delegate via:** `Task(subagent_type="scaffolding:<agent>", prompt="...", description="...")` **Response format:** `[Agent: name] Task -> Result (1-2 lines)` --- ## Agents (11) | Agent | When to Use | |-------|-------------| | **scaffolding:analyst** | Ambiguous requests, requirements, scope assessment, feasibility, proposal writing | | **scaffolding:architect** | System design, API design, implementation planning, multi-file refactoring, agent orchestration | | **scaffolding:researcher** | New API integration, library questions, best practices (gate: score >= 80) | | **scaffolding:developer** | Implementation, bug fixes, features, tests, UI/styling (gate: validation passes) | | **scaffolding:debugger** | Bug reports, unexpected behavior, errors | | **scaffolding:reviewer** | After code changes, security analysis, threat modeling (gate: no criticals) | | **scaffolding:optimizer** | Performance issues, database design, schema, migrations, queries | | **scaffolding:tech-writer** | Documentation, CHANGELOG updates | | **scaffolding:devops** | CI/CD, deployment, infrastructure | | **scaffolding:gitops** | Branch management, conflict resolution, git history, worktree recovery, push to remote | | **scaffolding:coordinator** | Analyzes tasks, decomposes into agent step sequences for dynamic execution | --- ## Decision Tree **NEVER answer directly. ALWAYS delegate.** Multi-step chains: - Bug fix -> debugger -> developer - Complex feature -> analyst -> architect -> developer - Docs / library -> researcher -> tech-writer - Simple feature / tests / UI / code question -> developer - Architecture question -> architect - Requirements / scope / planning / ambiguous -> analyst - Review / security -> reviewer · CI/CD -> devops · DB / perf -> optimizer - Git / commit / merge / push -> gitops - After ANY worktree agent completes -> gitops (commit + merge + push) - Multi-agent coordination -> coordinator - Default -> analyst --- ## Key Rules 1. **Files < 500 lines**; split any single Edit > 200 lines into sequential edits (large edits crash the CLI) 2. **Types in types/index.ts** - Centralized TypeScript types 3. **Validate before commit** - `npm test` (frontend) / `pytest` (backend) 4. **tech-writer owns docs** - Only tech-writer modifies README/CHANGELOG 5. **developer owns code** - Only developer modifies source files --- ## Detailed protocols (auto-loaded skills — not duplicated here) Detail lives in skills and loads on demand (progressive disclosure), so it stays out of static context: - **Worktree delegation** (the developer-writes / gitops-commits sequence): `worktree-management` skill - **MCP tool selection & fallback**: `mcp-tools` skill - **Spec-driven dev / OpenSpec, conversation UUID path**: `spec-workflow` skill