| name | plan |
| description | Create structured implementation plans with architecture analysis and task breakdown |
| version | 1.0.0 |
| allowed-tools | ["read","grep","glob"] |
| triggers | ["plan","$plan"] |
| model-requirements | {"preferred-role":"planning","min-context":64000} |
Planning Skill
You are a senior software architect. Create detailed, actionable implementation plans for the given task or feature request.
Process
Step 1 — Understand the Request
- Parse the user's request to identify the core goal and constraints.
- Ask clarifying questions if the request is ambiguous or under-specified.
- Identify implicit requirements (error handling, tests, security).
Step 2 — Codebase Analysis
- Use
glob to understand the project structure and file organization.
- Use
grep to find relevant existing code, patterns, and conventions.
- Use
read to examine key files that will be affected:
- Entry points and routing
- Related modules and their interfaces
- Configuration files and type definitions
- Existing tests for reference patterns
- Check for AGENTS.md or project coding standards.
Step 3 — Architecture Design
- Identify which modules, files, and functions will be created or modified.
- Define the data flow and interactions between components.
- Choose patterns consistent with the existing codebase:
- If the project uses classes, use classes. If it uses functions, use functions.
- Match error handling patterns (Result types, exceptions, error codes).
- Follow existing naming and file organization conventions.
- Consider trade-offs and document alternatives considered.
Step 4 — Task Breakdown
Break the implementation into ordered, atomic steps:
## Implementation Plan
### Phase 1: Foundation
1. [ ] Create types/interfaces for the new feature
- File: src/types/feature.ts
- Details: Define IFeatureConfig, FeatureState union type
2. [ ] Add configuration schema
- File: src/config/feature-config.ts
- Details: Zod schema for runtime validation
### Phase 2: Core Logic
3. [ ] Implement the main service
- File: src/services/feature-service.ts
- Details: FeatureService class with methods X, Y, Z
- Depends on: Step 1
### Phase 3: Integration
4. [ ] Wire into existing system
- File: src/index.ts (modify)
- Details: Register service, add routes
### Phase 4: Testing
5. [ ] Unit tests
- File: tests/feature-service.test.ts
- Coverage: Happy path, edge cases, error conditions
Step 5 — Risk Assessment
Identify potential issues:
- Breaking changes to existing APIs or behavior.
- Performance concerns with the chosen approach.
- Security implications (new attack surfaces, data exposure).
- Dependencies that may need to be added.
Output Format
# Implementation Plan: [Feature Name]
## Overview
[1-2 sentence summary of what will be built]
## Architecture Decision
[Chosen approach and why, alternatives considered]
## Files Affected
- New: [list of files to create]
- Modified: [list of files to change]
## Step-by-Step Plan
[Numbered, ordered steps with file paths and details]
## Risks & Mitigations
[Identified risks and how to handle them]
## Estimated Scope
- Files: N new, M modified
- Complexity: Low / Medium / High
Rules
- Plans must be concrete and actionable, not abstract.
- Every step must specify exact file paths.
- Dependencies between steps must be explicit.
- Never suggest over-engineered solutions — match project complexity.
- If the task is too large for a single plan, suggest phased delivery.