9thlevelsoftware/legion/phase-decomposer
- community
Checking that the SKILL.md file is still in the repository.
Breaks down a roadmap phase into phased implementation plans grouped by dependency order, assigns specialist agents to each plan, and generates PLAN.md files. Core engine for /legion:plan. Use when the user wants to plan a project phase, create implementation plans, organize work into waves, or assign agents to tasks.
Install
npx vskill@latest install 9thlevelsoftware/legion/phase-decomposerSKILL.md
Phase Decomposer
Engine for /legion:plan. Takes a ROADMAP.md phase entry and transforms it into decision-complete implementation contracts with per-plan agent recommendations. The full flow: analyze phase, resolve design decisions, decompose into independently verifiable plans, recommend agents, present for confirmation, generate plan files.
Section 1: Decomposition Principles
- Per-plan task cap comes from settings — read
settings.jsonkeyplanning.max_tasks_per_plan(default: 3). This only limits how many tasks go inside one plan; it does not limit how many plans a phase may contain. If a phase needs more work than that per-plan task cap, split it into as many additional plans as dependency, ownership, verification, and traceability boundaries require. - Wave-structured execution — Wave 1 plans have no internal dependencies. Wave 2 plans depend on Wave 1 outputs. Parallel within waves, sequential between waves.
- Per-plan agent assignment — different plans in the same phase may use different agents. A frontend plan gets a frontend agent; a testing plan gets a testing agent.
- Self-contained plans — each plan must be executable with only its
<context>and<execution_contract>references. An agent should never need to read a file not listed in the contract. - Concrete verification — every task has BOTH:
> verification:inline lines after the task description — machine-checkable commands that can be extracted and run automatically by the wave-executor- A
<verify>block with the same commands in executable form
No "manually check" or "visually inspect" instructions. If you cannot script the check, the task is too vague.
- Smallest independently verifiable plan — choose the smallest plan that can be executed and verified on its own.
planning.max_tasks_per_planis a per-plan task cap, not a phase plan-count cap or compression goal; do not combine work just to reduce plan count when it leaves the executor making design decisions. - No planned-work deferrals — every planned task must be written so execution ends in one of three states: completed, blocked with evidence, or escalated through the blocker escalation protocol. Do not tell executors to leave planned work for later, move it to a future phase, or mark it deferred unless the task itself is to create a user-approved follow-up artifact.
- Decision-complete implementation contracts — every plan must name exact read targets, write targets, implementation sequence, required interfaces or content structure, edge/error cases, forbidden files, verification commands, and
BLOCKEDconditions. If a planner cannot decide an API, path, validation behavior, helper, or test location, planning is not done.
Section 1.5: Settings Input
Before decomposition, resolve the per-plan task cap from settings.json:
- Try Read
settings.json - If present, use
planning.max_tasks_per_planas the hard cap for tasks inside each plan - If missing or invalid, default to
3 - This value never caps the total number of plans in a phase
- Carry this value as
{max_tasks_per_plan}for all rules and templates below
Extended Thinking Mode
If settings.json models.planning_reasoning is true AND the active adapter's supports_extended_thinking is true:
- Use
adapter.model_planning(e.g.,opus) for the decomposition agent - Extended thinking provides deeper analysis of:
- Requirement dependencies and implicit constraints
- Wave ordering rationale (why plan A must precede plan B)
- Agent selection justification (why this agent over alternatives)
- The decomposition output is identical in format; only the reasoning depth changes
If models.planning_reasoning is false: use adapter.model_execution as normal
Section 2: Phase Analysis
How to extract and analyze phase information before decomposition.
Step-by-Step Extraction
What to Look For
| Source | Extract | Used For | |
|---|---|---|---|
| ROADMAP.md Phase Details | Goal, requirements, success criteria | Scope boundaries | |
| ROADMAP.md Progress Table | Completed plans in prior phases | Dependency context | |
| REQUIREMENTS.md | Full requirement descriptions | Task-level detail | |
| PROJECT.md | Vision, constraints, architecture | Design decisions | |
| STATE.md | Phase results, decisions, issues | Build-on context |
Phase Slug Convention
Derive the phase directory slug from the phase name:
- Lowercase the name
- Replace spaces with hyphens
- Remove special characters
- Example: "Plugin Foundation" becomes
plugin-foundation - Full path:
.planning/phases/{NN}-{slug}/(e.g.,.planning/phases/03-phase-planning/)
Marketing Domain Detection
After reading phase details, check if this is a marketing-focused phase:
- Requirement check: Any MKT-* requirement IDs in the phase requirements?
- Keyword check: Phase description contains marketing keywords?
Keywords: "campaign", "content calendar", "social media", "cross-channel", "marketing", "brand awareness", "audience", "engagement strategy", "content strategy", "channel strategy"
- Agent signal: Does agent-registry recommend majority marketing-division agents?
If ANY signal is positive: → Flag phase as marketing-focused → Read marketing-workflows skill for domain-specific patterns → Use marketing wave pattern in Section 3 decomposition → Trigger campaign questioning (marketing-workflows Section 2.1) → Generate campaign document (marketing-workflows Section 2.2)
If no signals: → Standard decomposition (no impact)
Design Domain Detection
After reading phase details (and after marketing detection), check if this is a design-focused phase:
- Requirement check: Any DSN-* requirement IDs in the phase requirements?
- Keyword check: Phase description contains design keywords?
Keywords: "design system", "component library", "UX research", "usability testing", "accessibility audit", "brand guidelines", "design tokens", "wireframes", "prototypes", "user testing", "design review", "user persona", "user journey", "information architecture", "visual design"
- Agent signal: Does agent-registry recommend majority design-division agents?
If ANY signal is positive: → Flag phase as design-focused → Read design-workflows skill for domain-specific patterns → Use design wave pattern in Section 3 decomposition → Trigger design brief questioning (design-workflows Section 2.1) → Generate design documents (design-workflows Section 2.2)
If no signals: → Standard decomposition (no impact)
Section 2.5: Competing Architecture Proposals
Before decomposing into plans, optionally generate competing architecture proposals. This ensures the planning approach isn't biased by a single perspective. Adapted from Feature-dev's 2-3 competing designs pattern.
When to Generate Proposals
Philosophy Archetypes
Define 3 labeled approaches that agents adopt:
| Philosophy | Bias | Strengths | Risks | |
|---|---|---|---|---|
| Minimal | Least changes, smallest footprint | Low risk, easy to review, fast execution | May miss optimization opportunities, can accumulate tech debt | |
| Clean Architecture | Proper patterns, separation of concerns, future-proof | Maintainable, extensible, well-structured | Over-engineering risk, more files to modify, longer execution | |
| Pragmatic | Balanced trade-offs, ship fast but don't cut corners | Good enough for now, adaptable later | May not satisfy purists in either direction |
Proposal Generation Process
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 93 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/phase-decomposer/SKILL.md
Popularity
- Repository stars
- 62
- Repository forks
- 7
- 7-day trend score
- 21
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/9thlevelsoftware/legion/phase-decomposer)