with one click
plan-code
// Generate DRAFT.md (commit blueprint) and PLAN.md (execution roadmap) from proposals. Use when planning implementations, creating execution roadmaps, or documenting change proposals.
// Generate DRAFT.md (commit blueprint) and PLAN.md (execution roadmap) from proposals. Use when planning implementations, creating execution roadmaps, or documenting change proposals.
[HINT] Download the complete skill directory including SKILL.md and all related files
| name | plan-code |
| description | Generate DRAFT.md (commit blueprint) and PLAN.md (execution roadmap) from proposals. Use when planning implementations, creating execution roadmaps, or documenting change proposals. |
Analyzes design proposals or existing specifications, generates comprehensive DRAFT.md with copy-paste ready commit blueprints, and creates lightweight PLAN.md execution roadmap. Transforms approved designs into actionable implementation plans with atomic, testable commits.
What this command does NOT do:
When to REJECT:
ultrathink: you'd perform the following steps
Validate Environment:
Scan for Design Documents:
Scan for Proposals:
*_PROPOSED.md filesHandle Proposal Detection:
*_CHANGE.md)Commit Requirements Checklist (every commit in DRAFT.md must satisfy):
type(scope): descriptionAsk Clarifying Questions via AskUserQuestion:
--change is proposed or design is ambiguousUpdate DRAFT.md Based on Answers — adjust commit structure if architectural decisions change; document rationale in commit descriptions.
User Review Cycle — repeat follow-up questions via AskUserQuestion until the user is satisfied with the draft.
Spawn Review Subagent via the Task tool, passing DRAFT.md, PLAN.md, and all design documents.
Review Checklist — the subagent must verify:
Action on Issues: if issues found, update DRAFT.md / PLAN.md and re-run the checklist; otherwise proceed to Step 8.
Output Format:
[OK] Command: plan-code $ARGUMENTS
## Summary
- Design source: [path]
- Proposals processed: [count]
- DRAFT.md: Created with [X] commits
- PLAN.md: Created with [Y] phases
- Quality Review: [PASSED]
## Files Created
- DRAFT.md: Implementation blueprint
- PLAN.md: Execution roadmap
- [*_CHANGE.md files]
## Commit Summary
1. `type(scope): description` - [X files]
2. `type(scope): description` - [Y files]
## Phases Overview
- Phase 1 (Foundation): [X] commits
- Phase 2 (Core): [Y] commits
## Next Steps
1. Review DRAFT.md for code accuracy
2. Review PLAN.md for execution order
3. Run `/takeover` to begin implementation
/plan-code
# Scans for design documents
# Generates DRAFT.md with atomic commits
# Creates PLAN.md with phases
/plan-code --design=docs/DESIGN.md
# Uses specific design file
/plan-code --change="add authentication"
# Focuses on authentication-related changes
/plan-code
# Finds DESIGN_PROPOSED.md
# Asks for approval
# If approved: Creates DRAFT.md, PLAN.md, DESIGN_CHANGE.md
/plan-code
# Error: No design specification found
# Suggestion: Run '/spec-code' first
/plan-code --design=docs/DESIGN.md
# Error: Design too vague
# Suggestion: Add required sections