This directory contains comprehensive examples and templates for implementing the Planned Implementation pattern across different AI coding tools and development scenarios.
Planned Implementation leverages the planning capabilities built into modern AI coding tools to create structured implementation approaches before writing any code. This pattern reduces iterations, improves code quality, and enables better team collaboration.
For complete pattern documentation, see: Planned Implementation
Core Principle: Generate explicit implementation plans before writing code to improve quality, reduce iterations, and enable better collaboration.
| File | Tool | Scenario | Key Features Demonstrated |
|---|---|---|---|
claude-code-example.md |
Claude Code | Node.js JWT Authentication | Plan Mode workflow, plan iteration, execution validation |
cursor-example.md |
Cursor | React Component Library | /plan command, interactive refinement, progress tracking |
| File | Purpose | Use Case |
|---|---|---|
planning-template.md |
Universal planning template | Any AI tool, any project type |
markdown-iteration-techniques.md |
Detailed iteration techniques | Plan refinement, stakeholder review cycles |
Claude Code Users:
- Activate Plan Mode before implementation
- Use the planning template for complex features
- Review and iterate on plans before execution
Cursor Users:
- Use
/plancommand for structured planning - Leverage interactive chat for plan refinement
- Track progress with inline comments
Other AI Tools:
- Adapt the planning template format
- Request structured plans before code generation
- Break complex tasks into planning phases
graph TD
A[Define Problem & Context] --> B[Analyze Implementation Options]
B --> C[Create Detailed Plan]
C --> D[Review & Refine Plan]
D --> E{Plan Ready?}
E -->|No| F[Iterate on Plan]
F --> D
E -->|Yes| G[Execute Implementation]
G --> H[Validate Against Plan]
H --> I[Document Deviations]
I --> J[Complete Implementation]
style A fill:#e1f5e1
style C fill:#e1f5e1
style G fill:#ffe6e6
style J fill:#e1f5e1
- Problem Definition: Clearly articulate what needs to be built
- Context Analysis: Identify constraints, requirements, and dependencies
- Option Evaluation: Consider multiple implementation approaches
- Plan Creation: Generate detailed, actionable implementation steps
- Plan Review: Validate approach and refine as needed
- Execution: Implement following the approved plan
- Validation: Verify implementation meets plan objectives
Scenario: Adding a search filter to an existing page Planning Time: 10-15 minutes Tools: Any AI coding tool Template: Simplified planning with 3-5 implementation steps
Scenario: Building a notification service
Planning Time: 30-45 minutes
Tools: Claude Code Plan Mode, Cursor /plan
Template: Full planning template with risk analysis
Scenario: Microservices architecture deployment Planning Time: 1-2 hours Tools: Any AI tool with extended planning capabilities Template: Extended template with multiple phases
- Start with Clear Objectives: Define specific, measurable outcomes
- Consider Multiple Options: Evaluate 2-3 implementation approaches
- Include Time Estimates: Realistic planning includes effort estimation
- Address Dependencies: Identify external systems, APIs, or data requirements
- Plan for Testing: Include validation strategy from the start
- Document Assumptions: Record decisions and rationale for future reference
- Over-Planning: Spending more time planning than implementing simple features
- Under-Planning: Jumping to code without understanding the problem scope
- Rigid Planning: Not adapting plans when new information emerges
- Isolated Planning: Not involving team members in complex planning decisions
- Implementation Drift: Not validating actual implementation against the plan
## User Story Planning
**Story**: As a user, I want to reset my password via email
**Planning Session**:
- Problem: Secure password reset without SMS dependency
- Options: Email link vs. temporary password vs. security questions
- Plan: Email-based JWT token approach with 15-minute expiration
- Acceptance: User receives email, clicks link, sets new password successfully## Plan-Based Code Review Checklist
- [ ] Implementation follows approved plan structure
- [ ] Deviations from plan are documented and justified
- [ ] All plan acceptance criteria are met
- [ ] Test coverage matches planned testing strategy
- [ ] Performance meets plan requirementsPlans become living documentation that evolves with the implementation:
- Initial plan captures decision rationale
- Implementation updates reflect actual approach
- Final documentation includes lessons learned
- Ensure you have access to Plan Mode feature
- Practice plan iteration workflow
- Use planning template for consistency
- Familiarize yourself with
/plancommand syntax - Learn interactive chat planning techniques
- Set up progress tracking workflows
- Copy planning template to your preferred format
- Adapt template sections for your tool's capabilities
- Establish team conventions for plan sharing and review
- Plan Accuracy: Percentage of implementation matching original plan
- Time Estimation: Actual vs. estimated implementation time
- Issue Prevention: Number of problems caught during planning vs. implementation
- Team Alignment: Reduced back-and-forth during implementation
- Planning Time: Time spent planning vs. total implementation time
- Iteration Reduction: Fewer code rewrite cycles
- Review Efficiency: Faster code reviews with clear plan reference
- Knowledge Sharing: Team understanding of implementation approach
For complex features requiring multiple AI agents:
## Agent Coordination Plan
- **Planning Agent**: Creates overall architecture and task breakdown
- **Implementation Agents**: Handle specific components following plan
- **Validation Agent**: Ensures implementation meets plan requirements
- **Integration Agent**: Coordinates cross-component interactionsFor high-stakes implementations:
## Risk Assessment Matrix
| Risk | Likelihood | Impact | Mitigation |
|------|------------|--------|------------|
| Database migration failure | Medium | High | Test migration on staging, prepare rollback |
| API rate limiting | Low | Medium | Implement retry logic, cache responses |
| Security vulnerability | Low | High | Security review, penetration testing |- Create
[tool-name]-example.mdfollowing the existing format - Include specific tool features and commands
- Demonstrate the complete planning workflow
- Add entry to the tool-specific examples table
- Test templates with real implementation scenarios
- Gather feedback from development teams
- Update based on tool capability changes
- Maintain tool-agnostic core structure
Document successful applications of this pattern:
- Implementation scenarios where planning saved significant time
- Team collaboration improvements
- Quality improvements measured
- Lessons learned from planning failures
This implementation demonstrates how AI Plan-First Development transforms ad-hoc coding into structured, predictable development workflows that scale across teams and project complexity levels.