taoidle/plan-cascade/mega-plan
Claude Code and agent skill by taoidle/plan-cascade
- community
Checking that the SKILL.md file is still in the repository.
Project-level multi-task orchestration system. Manages multiple hybrid:worktree features in parallel with dependency resolution, coordinated PRD generation, and unified merge workflow.
Install
npx vskill@latest install taoidle/plan-cascade/mega-planSKILL.md
Mega Plan
A project-level orchestration system that sits above hybrid-ralph to manage multiple parallel features as a unified project plan.
Auto-Recovery Protocol (CRITICAL)
At the START of any interaction, perform this check to recover context after compression/truncation:
- Check if
.mega-execution-context.mdexists in the project root - If YES:
- Read the file content using Read tool
- Display: "Detected ongoing mega-plan execution"
- Show current batch and active worktrees from the file
- CRITICAL: All feature work MUST happen in worktrees, NOT main branch
- If unsure of state, suggest:
/mega:resume --auto-prd
- If NO but
mega-plan.jsonexists:
- Run:
uv run python "${CLAUDE_PLUGIN_ROOT}/skills/mega-plan/scripts/mega-context-reminder.py" both - This will generate the context file and display current state
This ensures context recovery even after:
- Context compression (AI summarizes old messages)
- Context truncation (old messages deleted)
- New conversation session
- Claude Code restart
Architecture
Quick Start
Create a Mega Plan
Generate a mega-plan from your project description:
This will:
- Analyze your project description
- Break it into features with dependencies
- Create
mega-plan.json,mega-findings.md,.mega-status.json - Display the plan for review
Approve and Execute
After reviewing the mega-plan:
Or with automatic PRD approval for all features:
This will:
- Calculate feature batches based on dependencies
- Create worktrees for Batch 1 features
- Generate PRDs in each worktree
- Wait for PRD approvals (or auto-approve with
--auto-prd) - Execute story batches within each feature
- Progress to next feature batch when complete
Monitor Progress
Shows:
- Overall project progress percentage
- Feature status by batch
- Story progress within each feature
- Current batch details
Complete and Merge
When all features are complete:
This will:
- Verify all features are complete
- Merge features in dependency order
- Clean up worktrees and branches
- Remove mega-plan files
File Structure
Commands Reference
/mega:plan
Generate a mega-plan for project-level multi-feature orchestration. Breaks a complex project into parallel features with dependencies.
Parameters:
| Parameter | Description | |||
|---|---|---|---|---|
| `--flow <quick\ | standard\ | full>` | Execution flow depth controlling quality gate strictness | |
| `--tdd <off\ | on\ | auto>` | Test-Driven Development mode for feature execution | |
--confirm | Require confirmation before each batch | |||
--no-confirm | Disable batch confirmation | |||
| `--spec <off\ | auto\ | on>` | Spec interview before plan generation | |
--first-principles | Enable first-principles questioning in spec interview | |||
--max-questions N | Max questions in spec interview | |||
design-doc-path | Optional path to existing design document |
Parameters are saved to mega-plan.json and propagated to /mega:approve and feature-level /approve commands.
Example:
/mega:edit
Edit the mega-plan interactively. Add, remove, or modify features.
/mega:approve
Approve the mega-plan and start feature execution. Creates worktrees and generates PRDs for each feature in batch-by-batch order.
Parameters:
| Parameter | Description | |||
|---|---|---|---|---|
| `--flow <quick\ | standard\ | full>` | Execution flow depth for feature execution | |
| `--tdd <off\ | on\ | auto>` | TDD mode propagated to feature execution | |
--confirm | Require confirmation before each batch | |||
--no-confirm | Disable batch confirmation | |||
| `--spec <off\ | auto\ | on>` | Spec interview for feature PRD generation | |
--first-principles | First-principles questioning for spec interviews | |||
--max-questions N | Max questions in spec interviews | |||
--auto-prd | Auto-approve all generated PRDs (skip manual review) | |||
--agent <name> | Global agent override | |||
--prd-agent <name> | Agent for PRD generation phase | |||
--impl-agent <name> | Agent for story implementation phase |
Approval Modes:
| Mode | Trigger | Use Case | |
|---|---|---|---|
| Manual PRD Review | /mega:approve | Review each feature's PRD before execution | |
| Auto PRD Approval | /mega:approve --auto-prd | Trust PRD generation, fully automated execution |
/mega:status
Show detailed status of mega-plan execution including feature progress, story completion, and batch summary.
/mega:complete
Complete the mega-plan by cleaning up planning files. All features should already be merged via /mega:approve.
mega-plan.json Format
Feature Status Flow
| Status | Description | |
|---|---|---|
pending | Feature not yet started | |
prd_generated | Worktree created, PRD generated | |
approved | PRD approved, ready for execution | |
in_progress | Stories are being executed | |
complete | All stories complete | |
failed | Feature execution failed |
Execution Modes
Auto Mode
Features and their story batches execute automatically:
Manual Mode
Each batch waits for explicit confirmation:
Workflows
Complete Workflow
Multi-Terminal Workflow
Relationship with Hybrid Ralph
Mega Plan orchestrates multiple hybrid-ralph workflows:
| Component | Mega Plan | Hybrid Ralph | |
|---|---|---|---|
| Scope | Project-level | Feature-level | |
| Unit | Features | Stories | |
| Files | mega-plan.json | prd.json | |
| Findings | mega-findings.md (shared) | findings.md (per-feature) | |
| Worktrees | Creates for features | Works within worktree | |
| Merge | All features → target | N/A (handled by mega) |
Core Python Modules
mega_generator.py
Generates mega-plan from project descriptions.
mega_state.py
Thread-safe state management.
feature_orchestrator.py
Orchestrates feature execution.
merge_coordinator.py
Coordinates final merge.
Findings Management
Shared Findings (mega-findings.md)
- Located at project root
- Contains findings relevant to all features
- Read-only copy placed in each worktree
- Updated only from project root
Feature Findings (findings.md)
- Located in each feature worktree
- Contains feature-specific discoveries
- Tagged with story IDs
- Independent per feature
Best Practices
- Clear Feature Boundaries: Each feature should be independent enough to develop in isolation
- Minimize Dependencies: Fewer dependencies mean more parallelism
- Meaningful Names: Use descriptive feature names (they become directory names)
- Review PRDs: Take time to review generated PRDs before approving
- Monitor Progress: Use
/mega:statusregularly to track execution - Handle Failures: If a feature fails, fix it in its worktree before completing
Troubleshooting
Worktree Conflict
Solution: Remove stale worktree or use different feature name.
Merge Conflict
Solution:
- Resolve conflict in target branch
- Re-run
/mega:complete
Incomplete Features
Solution:
- Check
/mega:statusfor details - Complete stories in incomplete features
- Re-run
/mega:complete
See Also
- hybrid-ralph - Feature-level PRD execution
- planning-with-files - Base planning skill
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/mega-plan/SKILL.md
Popularity
- Repository stars
- 141
- Repository forks
- 12
- 7-day trend score
- 25
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/taoidle/plan-cascade/mega-plan)