Planning & Orchestration
This skill helps you transform an ambiguous or messy situation into a small-steps execution plan with clear verification criteria, aligned with the repository's conventions.
When to Use
✅ DO Use:
- When the user asks for a plan/strategy instead of code
- When requirements are unclear or the scope is large
- When you need to sequence tasks (tests → refactor → security → docs)
- When coordinating multiple subagents (testing, refactor, security, documentation)
- When you must preserve constraints (architecture rules, contracts, dependencies)
❌ DON'T Use:
- Trivial tasks with 1–2 obvious steps
- When the user explicitly asked for implementation right now (skip planning and implement)
- When you already have a validated plan and only need execution
Core Concepts
1) Constraints First
Capture non-negotiables before proposing steps:
- Tech stack/runtime constraints (Node/TS, frameworks)
- Architecture rules (layer boundaries, repositories required, etc.)
- Contract-first requirements (OpenAPI, runtime validation)
- Observability/security baselines (logging, correlation id, rate limit, helmet)
2) Incremental Delivery (Micro-iterations)
Prefer small, verifiable increments over big-bang rewrites. Each iteration should have:
- A single goal
- Minimal change set
- A verification step (tests, lint, manual smoke check)
- A clear rollback story (what to revert if it fails)
3) Verification Is Part of the Plan
Every planned step must have at least one verification method:
- Automated: unit/integration tests, contract validation, linting
- Manual: curl/Postman checks for a narrow endpoint behavior
- Safety: ensure sensitive fields (e.g., passwords) never leak
Planning Patterns
Pattern 1: Situation Snapshot
In 5–10 lines, summarize:
- What exists today (endpoints, modules, structure)
- What is broken/risky (security holes, missing validation, lack of tests)
- What must not change (API contract, core behavior, compatibility)
Pattern 2: Gap-to-Goal Mapping
List goals and map each to a concrete deliverable:
- Tests → test files + scenarios + data builders + how to run
- Architecture → target folder structure + boundaries + dependency injection approach
- Security → middleware + validation + secrets/token strategy + error handling
Pattern 3: Micro-Iteration Plan (Ralph Loop)
Produce steps as small loops:
- Goal
- Changes (specific files/modules)
- Risks
- Verification
- Next-step prompt (optional) to delegate to a specialist subagent
Pattern 4: “Next Prompts” (Delegation)
When appropriate, propose copy-pastable prompts to delegate execution:
/agt-dev-test for tests
/agt-dev-refactor for layering/refactors
/agt-dev-security for hardening
Output Template
When delivering a plan, use this structure:
- Summary
- Constraints & Assumptions
- Current Risks / Findings
- Plan (small steps):
- Step name
- Goal
- Changes (files/modules)
- Verification
- Suggested Next Prompts (optional, copy/paste)
Key Principles
- Small steps beat perfect steps
- Name files and verification explicitly
- Respect architecture boundaries and contracts
- Security and observability are not “later”
1---2name: planning3description: Planning and orchestration patterns for turning messy context into an incremental, verifiable execution plan. Use when you need a step-by-step strategy before coding or delegating to subagents.4---56# Planning & Orchestration78This skill helps you transform an ambiguous or messy situation into a **small-steps execution plan** with clear verification criteria, aligned with the repository's conventions.910## When to Use1112**✅ DO Use:**13- When the user asks for a plan/strategy instead of code14- When requirements are unclear or the scope is large15- When you need to sequence tasks (tests → refactor → security → docs)16- When coordinating multiple subagents (testing, refactor, security, documentation)17- When you must preserve constraints (architecture rules, contracts, dependencies)1819**❌ DON'T Use:**20- Trivial tasks with 1–2 obvious steps21- When the user explicitly asked for implementation right now (skip planning and implement)22- When you already have a validated plan and only need execution2324## Core Concepts2526### 1) Constraints First27Capture non-negotiables before proposing steps:28- Tech stack/runtime constraints (Node/TS, frameworks)29- Architecture rules (layer boundaries, repositories required, etc.)30- Contract-first requirements (OpenAPI, runtime validation)31- Observability/security baselines (logging, correlation id, rate limit, helmet)3233### 2) Incremental Delivery (Micro-iterations)34Prefer **small, verifiable increments** over big-bang rewrites. Each iteration should have:35- A single goal36- Minimal change set37- A verification step (tests, lint, manual smoke check)38- A clear rollback story (what to revert if it fails)3940### 3) Verification Is Part of the Plan41Every planned step must have at least one verification method:42- **Automated**: unit/integration tests, contract validation, linting43- **Manual**: curl/Postman checks for a narrow endpoint behavior44- **Safety**: ensure sensitive fields (e.g., passwords) never leak4546## Planning Patterns4748### Pattern 1: Situation Snapshot49In 5–10 lines, summarize:50- What exists today (endpoints, modules, structure)51- What is broken/risky (security holes, missing validation, lack of tests)52- What must not change (API contract, core behavior, compatibility)5354### Pattern 2: Gap-to-Goal Mapping55List goals and map each to a concrete deliverable:56- **Tests** → test files + scenarios + data builders + how to run57- **Architecture** → target folder structure + boundaries + dependency injection approach58- **Security** → middleware + validation + secrets/token strategy + error handling5960### Pattern 3: Micro-Iteration Plan (Ralph Loop)61Produce steps as **small loops**:62- Goal63- Changes (specific files/modules)64- Risks65- Verification66- Next-step prompt (optional) to delegate to a specialist subagent6768### Pattern 4: “Next Prompts” (Delegation)69When appropriate, propose copy-pastable prompts to delegate execution:70- `/agt-dev-test` for tests71- `/agt-dev-refactor` for layering/refactors72- `/agt-dev-security` for hardening7374## Output Template7576When delivering a plan, use this structure:77781. **Summary**792. **Constraints & Assumptions**803. **Current Risks / Findings**814. **Plan (small steps)**:82 - Step name83 - Goal84 - Changes (files/modules)85 - Verification865. **Suggested Next Prompts** (optional, copy/paste)8788## Key Principles89901. **Small steps beat perfect steps**912. **Name files and verification explicitly**923. **Respect architecture boundaries and contracts**934. **Security and observability are not “later”**