| name | kata-insert-phase |
| description | Insert urgent work as a decimal phase between existing phases, adding mid-milestone work, or creating intermediate phases. Triggers include "insert phase", "add urgent phase", "create decimal phase", "insert between phases", and "urgent work". |
| metadata | {"version":"1.6.1"} |
Insert a decimal phase for urgent work discovered mid-milestone that must be completed between existing integer phases.
Uses decimal numbering (72.1, 72.2, etc.) to preserve the logical sequence of planned phases while accommodating urgent insertions.
Purpose: Handle urgent work discovered during execution without renumbering entire roadmap.
<execution_context>
@.planning/ROADMAP.md
@.planning/STATE.md
</execution_context>
Parse the command arguments:
- First argument: integer phase number to insert after
- Remaining arguments: phase description
Example: /kata-insert-phase 72 Fix critical auth bug
→ after = 72
→ description = "Fix critical auth bug"
Validation:
if [ $# -lt 2 ]; then
echo "ERROR: Both phase number and description required"
echo "Usage: /kata-insert-phase <after> <description>"
echo "Example: /kata-insert-phase 72 Fix critical auth bug"
exit 1
fi
Parse first argument as integer:
after_phase=
description=
! [[ =~ ^[0-9]+$ ]];
1
**Pre-flight: Check roadmap format (auto-migration)**
Load the roadmap file:
Verify that the target phase exists in the roadmap:
Find existing decimal phases after the target phase:
Convert the phase description to a kebab-case slug:
Create the phase directory structure:
Insert the new phase entry into the roadmap:
Update STATE.md to reflect the inserted phase:
Present completion summary: