Use when starting significant features, epics, or complex tasks. Creates multi-phase implementation plans with parallelizable phases, poker estimates, TDD-first acceptance criteria, and quality gates. Detects tech stack from CLAUDE.md/AGENTS.md (bypassing internet research if complete) or via codeba
npx playbooks add skill adamos486/skills --skill superplan
Superplan creates detailed, executable implementation plans that enable parallel agent execution. Each plan includes everything needed to implement a feature: requirements, architecture, code changes, tests, and acceptance criteria.
┌─────────────────────────────────────────────────────────────────────┐
│ SUPERPLAN WORKFLOW │
├─────────────────────────────────────────────────────────────────────┤
│ 1. INTAKE → Gather story/requirements from user │
│ 2. DETECT → Check CLAUDE.md/AGENTS.md first, then scan │
│ (BYPASS codebase scan if docs complete) │
│ 3. INTERVIEW → Ask clarifying questions │
│ 4. RESEARCH → Look up best practices for DETECTED STACK │
│ (BYPASS if CLAUDE.md/AGENTS.md was complete) │
│ 5. EXPLORE → Understand existing codebase patterns │
│ (ALWAYS runs - never bypassed) │
│ 6. REFACTOR ASSESS → Evaluate if refactoring should precede work │
│ 7. ARCHITECT → Design solution with diagrams │
│ 8. PHASE → Break into parallelizable phases + ESTIMATES │
│ 9. DETAIL → Specify code deltas per phase │
│ 10. TEST → Define failing tests per phase (TDD) │
│ 11. DOCUMENT → Write plan to docs/<feature>-plan.md │
└─────────────────────────────────────────────────────────────────────┘
---
YOU MUST USE SUB-AGENTS OR PARALLEL TASKS for every parallelizable operation:
| Operation | How to Execute |
|-----------|---------------|
| Independent file reads | Launch multiple Read tasks in single message |
| Code searches | Use Task tool with multiple Explore agents in parallel |
| Parallel phases (1A, 1B, 1C) | Execute using parallel sub-agents |
| Independent test suites | Run unit/integration/e2e concurrently |
Example: "Launch 3 sub-agents in parallel to implement Phases 1A, 1B, and 1C"
IMPORTANT: Each sub-agent MUST return its conventional commit message upon completion. The main agent MUST output all commit messages to the user. See [Phase Completion: Conventional Commit Message](#phase-completion-conventional-commit-message---required-per-phase).
---
All tasks and phases MUST include Fibonacci estimates: 1, 2, 3, 5, 8, 13, 21
| Size | Meaning | Example |
|------|---------|---------|
| 1 | Trivial | Config value, typo fix |
| 2 | Small | Single file, simple function |
| 3 | Medium | Multi-file, new component |
| 5 | Large | Feature module, API endpoint |
| 8 | X-Large | Complex feature with dependencies |
| 13 | Epic chunk | Major subsystem change |
| 21 | Too big | Split into smaller tasks |
---
Collecting the feature requirements from the user through story input.
As a <role>, I want <capability>, so that <benefit>)Document: Source, Type, Raw Requirements, Initial Understanding (1-2 sentences).
---
Identifying the technology, programming language, and major frameworks to inform best practices research and quality gate setup.
┌─────────────────────────────────────────────────────────────────────────────┐
│ DETECT PHASE FLOW │
├─────────────────────────────────────────────────────────────────────────────┤
│ 1. CHECK for CLAUDE.md or AGENTS.md in project root │
│ ├─ Found & Complete? → BYPASS codebase scanning for tech stack │
│ │ → BYPASS internet research (Phase 4) │
│ │ → Proceed directly to INTERVIEW (Phase 3) │
│ └─ Not Found or Incomplete? → Continue with Detection Actions below │
│ │
│ NOTE: This does NOT bypass EXPLORE phase (Phase 5) - always scan codebase │
│ for patterns and integration points regardless of CLAUDE.md presence │
└─────────────────────────────────────────────────────────────────────────────┘
FIRST, check for CLAUDE.md or AGENTS.md at project root:
# Check for these files (in priority order):
1. CLAUDE.md # Claude Code's project documentation
2. AGENTS.md # Codex's project documentation
If found, parse for these tech stack elements:
| Element | What to Look For |
|---------|-----------------|
| Languages | "TypeScript", "Python", "Go", etc. in project description |
| Frameworks | Framework mentions: React, Next.js, FastAPI, Django, etc. |
| Build Tools | Package manager, bundler references: npm, pnpm, vite, etc. |
| Quality Tools | Linter/formatter/type checker config mentions |
| Testing Tools | Test framework references: jest, pytest, vitest, etc. |
| Dependencies | Key libraries and their versions |
A project documentation file is COMPLETE for tech stack if it answers ALL of:
If ALL boxes can be checked from the file → Skip to Step 3 (output) and mark RESEARCH phase (Phase 4) as BYPASSED
If ANY box is missing → Continue with Step 2 (codebase detection)
Only execute if CLAUDE.md/AGENTS.md is missing or incomplete.
Launch parallel Explore agents to detect:
| Tool Type | If Present | If Missing |
|-----------|------------|------------|
| Linter | Note config path | Add to Phase 0 Bootstrap |
| Formatter | Note config path | Add to Phase 0 Bootstrap |
| Type Checker | Note config path | Add to Phase 0 Bootstrap |
| Test Framework | Note config path | Add to Phase 0 Bootstrap |
Document:
---
Asking targeted questions to fill gaps in requirements before planning.
Ask questions in these categories (select relevant ones):
Ask 3-5 most relevant questions, then wait for answers before proceeding.
See [Interview Guide](references/INTERVIEW-GUIDE.md) for comprehensive question templates and strategies by feature size.
---
Researching current best practices as of TODAY'S DATE for the DETECTED technology stack.
If DETECT phase found complete tech stack info in CLAUDE.md or AGENTS.md, this phase is BYPASSED.
Skip directly to EXPLORE (Phase 5). The project documentation provides authoritative tech stack information.
Otherwise, proceed with research actions below.
Launch parallel web searches targeting the detected stack:
Document: Sources consulted, key findings by topic, specific recommendations for this feature.
---
Understanding existing patterns, conventions, and integration points in the codebase.
Document: Relevant files table, patterns to follow, integration points, technical debt notes.
---
Evaluating whether the feature/fix would benefit from refactoring or rewriting existing code BEFORE implementation. This phase synthesizes your research on best practices with your exploration of the codebase to make a data-driven refactoring decision.
This phase empowers you to proactively recommend refactoring. Don't be timid—if the code needs work, say so. Use the Q&A system to discuss major refactoring opportunities with the user.
Step 1: Research Refactoring for Detected Stack
Launch parallel web searches for stack-specific refactoring:
Step 2: Apply Code Smell Detection
Using your exploration results, check for these smells in affected areas:
| Category | Smells to Check |
|----------|-----------------|
| Bloaters | Long methods, large classes, primitive obsession, data clumps |
| OO Abusers | Switch statements on types, parallel inheritance hierarchies |
| Change Preventers | Divergent change, shotgun surgery |
| Dispensables | Duplicate code, dead code, speculative generality |
| Couplers | Feature envy, inappropriate intimacy, message chains |
Step 3: AI Slop Analysis (Optional Enhancement)
Check if the slop-or-not skill is available to enhance refactor detection:
/slop-or-not> "The slop-or-not skill can enhance refactor assessment by detecting
> AI-generated code anti-patterns (hallucinations, cross-language contamination,
> security vulnerabilities). Install from: https://github.com/asteroid-belt/skills
>
> Would you like to pause to install it? (y/n)"
/slop-or-not targeting: RRF_score(file) = 1/(60 + modification_rank) + 1/(60 + slop_rank)
Files appearing in BOTH lists (need modification AND contain AI slop) score highest.
Step 4: Architecture Assessment
Evaluate:
Step 5: Future Roadmap Interview
ASK THE USER about upcoming features that might tip the scales toward refactoring:
> "Before I finalize the plan, I want to understand your roadmap:
> 1. What other features are planned for this area in the next 6 months?
> 2. How often does this part of the codebase change?
> 3. Are there pain points here that slow down development?
> 4. What's your risk tolerance for refactoring vs. shipping fast?"
This information is CRITICAL for making the right refactoring decision.
| Scenario | Recommendation |
|----------|----------------|
| Feature adds code to messy area | Refactor first |
| Modification path has HIGH/CRITICAL AI slop | Refactor first |
| Feature touches well-structured code | Implement directly |
| Multiple upcoming features need same area | Refactor first |
| Team struggles to understand the code | Refactor first |
| One-off change to stable code | Implement directly |
| Tight deadline, low complexity | Implement, document debt |
| Tight deadline, high complexity | Discuss trade-offs with user |
Based on your assessment, declare a confidence level:
| Level | Description | Action |
|-------|-------------|--------|
| LOW | Code is clean, feature fits naturally | Proceed to ARCHITECT |
| MEDIUM | Some smells present, feature workable | Note debt, ask user preference |
| HIGH | Significant issues, feature will worsen debt | Recommend refactor phases |
| CRITICAL | Major rewrite needed, current approach unsustainable | Propose rewrite with Mikado/Strangler Fig |
If you determine refactoring should precede the feature work:
> "Based on my analysis, I recommend refactoring [specific area] BEFORE implementing [feature]. This would involve:
> - [Refactoring task 1]
> - [Refactoring task 2]
>
> Benefits: [list benefits]
> Risks of NOT refactoring: [list risks]
>
> Do you want me to add refactoring phases to the plan?"
Document:
See [Refactoring Research](references/REFACTORING-RESEARCH.md) for comprehensive methodology details, code smell catalogs, and technology-specific patterns.
---
Designing the technical solution with diagrams.
Use ASCII/text diagrams for portability. See [Plan Template](references/PLAN-TEMPLATE.md) for diagram examples.
---
Breaking work into phases with poker estimates that can be executed in parallel where possible.
Create a phase dependency diagram showing:
Include dependency table with estimates:
| Phase | Name | Depends On | Parallel With | Estimate | Status |
|-------|------|------------|---------------|----------|--------|
---
Specifying exact code changes for each phase.
For each file, specify:
(CREATE) or (MODIFY)See [Plan Template](references/PLAN-TEMPLATE.md) for full code delta examples.
---
Defining failing tests for each phase BEFORE implementation.
Follow the pyramid - more unit tests, fewer integration, even fewer E2E:
For each phase:
Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.