Converts a PRD or requirements document into a structured, phased implementation plan with individual phase files and granular per-task files written to .context/plans/. Also restructures existing monolithic planning documents into digestible, hierarchical directory structures. Creates a root plan index summarising all phases, a numbered phase file per phase, and a numbered task file per task inside each phase directory.
92
93%
Does it follow best practices?
Impact
91%
3.25xAverage score across 5 eval scenarios
Passed
No known issues
Deep-dive reference for the restructure workflow. Read SKILL.md first.
Use when the source can be represented as structured JSON (e.g. exported from a project management tool or generated by a prior analysis step).
sh scripts/generate-structure.sh --plan plan.json
sh scripts/generate-structure.sh --example # prints the expected JSON formatExpected JSON format:
{
"outputPath": "docs/refactoring/phases",
"phases": [{
"number": 1,
"name": "bootstrap",
"description": "...",
"type": "activities",
"items": [{
"number": 1,
"name": "setup-toolchain",
"description": "...",
"subItems": [{
"number": 1,
"name": "install-deps",
"description": "...",
"checklist": ["item 1"],
"acceptanceCriteria": ["criterion 1"],
"status": "pending",
"dependencies": []
}]
}]
}]
}sh scripts/validate-structure.sh <phases-dir>Checks performed:
Exit 0 = valid. Exit 1 = one or more violations (details printed to stdout).
Three options in order of preference:
phase-1a-, phase-1b- prefixes at a natural
midpoint in the workAnti-pattern: just adding more nesting. Deep hierarchies with 50 siblings are still unusable regardless of depth.
When the source mixes step-X.Y and activity-X.Y:
steps/ for implementation phases and activities/ for
analysis phases (phase-aware dual convention)Diagnose the current state before continuing:
ls docs/refactoring/phases/*.md # flat files still in root
find docs/refactoring/phases -type d \
-exec test ! -f {}/README.md \; -print # dirs missing READMEs
git diff HEAD~5 --name-only | grep phases/ # recovery via gitRule: complete partial splits before starting new ones. Incomplete hierarchies confuse agents reading the plan.
When source documents use legacy naming (e.g. Activity 1.2.3 — Do thing):
title field for cross-referencing