| name | kata-remove-phase |
| description | Remove a future phase from roadmap and renumber subsequent phases. Triggers include "remove phase", "remove phase". |
| metadata | {"version":"1.6.1"} |
Remove an unstarted future phase from the roadmap and renumber all subsequent phases to maintain a clean, linear sequence.
Purpose: Clean removal of work you've decided not to do, without polluting context with cancelled/deferred markers.
Output: Phase deleted, all subsequent phases renumbered, git commit as historical record.
<execution_context>
@.planning/ROADMAP.md
@.planning/STATE.md
</execution_context>
Parse the command arguments:
- Argument is the phase number to remove (integer or decimal)
- Example: `/kata-remove-phase 17` → phase = 17
- Example: `/kata-remove-phase 16.1` → phase = 16.1
If no argument provided:
ERROR: Phase number required
Usage: /kata-remove-phase <phase-number>
Example: /kata-remove-phase 17
Exit.
**Pre-flight: Check roadmap format (auto-migration)**
If ROADMAP.md exists, check format and auto-migrate if old:
if [ -f .planning/ROADMAP.md ]; then
node "${CLAUDE_PLUGIN_ROOT}/skills/kata-remove-phase/scripts/kata-lib.cjs" check-roadmap 2>/dev/null
FORMAT_EXIT=$?
if [ $FORMAT_EXIT -eq 1 ]; then
echo "Old roadmap format detected. Running auto-migration..."
fi
fi
Load project state:
Verify the target phase exists in ROADMAP.md:
Verify the phase is a future phase (not started):
Collect information about the phase being removed:
Present removal summary and confirm:
Delete the target phase directory if it exists:
Rename all subsequent phase directories:
Rename plan files inside renumbered directories:
Update ROADMAP.md:
Update STATE.md:
Search for and update phase references inside plan files:
Stage and commit the removal:
Present completion summary: