一键导入
recursive-development
Core principles for recursive multi-agent development -- nesting, scope ownership, TDD, context flow, token economics.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Core principles for recursive multi-agent development -- nesting, scope ownership, TDD, context flow, token economics.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
How agents, skills, and commands work in Claude Code projects.
GitHub conventions -- branch naming, commit format, issue/PR templates, and safe issue/PR referencing in comments.
API error response format -- machine-readable codes, human-readable reasons, status code rules.
Language-agnostic code hygiene -- honest comments, no dead/reinvented/duplicated code, truthful names, real implementations, and scoped (never blanket) diagnostic suppressions.
Language-agnostic structural craft -- decompose on responsibility not size, prefer deep modules over shallow piles, and shape cohesion, coupling, interfaces, error contracts, and data invariants. Sibling to code-hygiene and readable-code.
Documentation writing conventions -- style, structure, tone, and quality standards.
| name | recursive-development |
| description | Core principles for recursive multi-agent development -- nesting, scope ownership, TDD, context flow, token economics. |
| when_to_use | Any work involving recursive subagent orchestration. |
Decompose work into waves of parallel nested subagents. Works for greenfield and existing codebases. Each wave completes before the next starts. Within a wave, independent modules run in parallel. No depth limit on nesting.
For existing projects, Wave 0 extends established patterns rather than creating from scratch.
Default to nesting. Each nested agent has smaller context -- faster and cheaper per-agent. A flat agent juggling 7 files costs more than 3 focused agents each handling 2-3 files.
Nest when a module contains distinct algorithms or domains. Stop when atomic (single concern, single file). Split by algorithm or domain, not by testability alone.
The same principle applies at every level of recursion:
Split (distinct algorithms or domains):
Don't split (steps in one operation, or trivial wrappers):
| Role | Scope | Spawns when... |
|---|---|---|
| Orchestrator | Shared files + wave sequencing | Always |
| Module agent | Directory scope | 2+ testable concerns |
| Component agent | File set scope | Separable sub-concerns |
| Leaf agent | Single file pair | Never -- implements directly |
| Level | Recommended model |
|---|---|
| Orchestrator | opus -- decomposition, contract design |
| Module/component | sonnet -- focused, contract-constrained |
No two parallel subagents may touch the same file.
| Level | Typical scope |
|---|---|
| Wave | Directory (src/config/) |
| Module | Directory or file set |
| Sub-component | File set (['parser.ts', 'parser.test.ts']) |
Directory scope: agent creates any files under it. File set scope: agent touches only listed files. Shared files (types, index) owned by parent wave, read-only after.
Before dispatching: assign scopes, verify zero overlap, create shared files first.
At levels with multiple concerns, delegate steps 2-4 to child agents.
Down: contracts, ownership scope, dependency interfaces. Up: pass/fail, interface change requests, files created. Never down: full plan, other modules' code. Never up: internal decisions.
More agents with less context each > fewer agents with large context. Pass minimal context -- contract and ownership only. The orchestrator is the most expensive agent; keep it thin.
Spawn recursive-implementer for all module agents. Children use the same type. Style contract propagates down the tree. Prompts stay minimal -- the agent definition carries the rest.