Create technical implementation plan with architecture and design decisions
Creates a detailed technical implementation plan with architecture decisions, file structure, data models, API contracts, and phased rollout strategy for your feature specification. Use this when you're ready to move from spec to actionable implementation roadmap.
/plugin marketplace add retsohuang/retso-marketplace/plugin install spec-kit@retso-marketplaceclaude-opus-4-5Design the technical approach for implementing a feature. This creates a detailed plan with architectural decisions, file structure, data models, API contracts, and implementation phases.
/spec-kit:plan
Optionally specify a spec: /spec-kit:plan 001 or /spec-kit:plan user-auth
Use the get-current-spec skill to determine which spec to work with.
The skill will:
After the skill completes, you will have:
Read the feature spec and project constitution:
cat .claude/spec-kit/specs/{NNN}-{feature-name}/spec.md
cat .claude/spec-kit/memory/constitution.md
Understand existing architecture and patterns:
# Find existing similar features
fd -t f -e ts -e tsx -e js -e jsx | head -20
# Look for architectural patterns
rg "export.*class|export.*function|export default" --type ts -g "!node_modules" | head -50
# Find data models
rg "interface|type.*=" --type ts -g "*types.ts" -g "*models.ts"
# Find API patterns
rg "router\.|app\.(get|post|put|delete)" --type ts
# Check testing patterns
fd -t f test.ts$ | head -10
Understand:
node ${CLAUDE_PLUGIN_ROOT}/scripts/dist/cli.js template plan-template --plugin-root ${CLAUDE_PLUGIN_ROOT}
Create .claude/spec-kit/specs/{NNN}-{feature-name}/plan.md with:
Architecture Overview:
Architectural Decisions: For each major decision, document:
File Structure:
Data Models:
API Contracts:
Component Hierarchy:
State Management:
Dependencies:
Database Changes:
Integration Points:
Testing Strategy:
Security Considerations:
Performance Considerations:
Implementation Phases: Break work into 3-4 phases:
Each phase should have:
Rollout Strategy:
Risks and Mitigation:
Ensure the plan follows project standards:
Check that the plan answers:
✅ Implementation Plan Created!
Feature: {NNN}-{feature-name}
Location: .claude/spec-kit/specs/{NNN}-{feature-name}/plan.md
Plan Details:
- Architectural Decisions: {count}
- New Files: {count}
- Modified Files: {count}
- Data Models: {count}
- API Endpoints: {count}
- Implementation Phases: {count}
- Total Estimated Duration: {rough estimate}
Key Decisions:
1. {Decision 1}: {Chosen approach}
2. {Decision 2}: {Chosen approach}
3. {Decision 3}: {Chosen approach}
Next Steps:
1. Review plan: .claude/spec-kit/specs/{NNN}-{feature-name}/plan.md
2. Validate consistency: /spec-kit:analyze
3. Generate tasks: /spec-kit:tasks
Tip: Run /spec-kit:analyze to check consistency between spec, plan, and constitution.
#### Decision: State Management Approach
**Context**: User authentication state needs to be accessible across many components
**Options Considered:**
1. React Context - Simple, built-in, no dependencies
2. Redux - Robust, time-travel debugging, more boilerplate
3. Zustand - Minimal, hooks-based, less boilerplate than Redux
**Decision**: Use React Context
**Rationale**:
- Auth state is simple (logged in/out, user object)
- No complex state interactions that need Redux
- Avoid dependency for this simple use case
- Team is familiar with Context
**Consequences**:
- May need to refactor if state becomes complex
- No built-in dev tools for debugging state
- Good enough for current requirements
src/
├── features/
│ └── user-auth/
│ ├── components/
│ │ ├── LoginForm.tsx # Main login component
│ │ ├── RegisterForm.tsx # Registration form
│ │ └── AuthProvider.tsx # Context provider
│ ├── hooks/
│ │ └── useAuth.ts # Auth hook for consuming context
│ ├── services/
│ │ └── authService.ts # API calls for auth
│ ├── types.ts # Auth-related types
│ └── index.ts # Public API
interface User {
id: string; // UUID from database
email: string; // Validated email, used for login
name: string; // Display name
role: UserRole; // admin | user | guest
createdAt: Date; // Account creation timestamp
lastLoginAt: Date | null; // Last successful login
}
type UserRole = 'admin' | 'user' | 'guest';
/spec-kit:specify