원클릭으로
kata-remove-phase
Remove a future phase from roadmap and renumber subsequent phases. Triggers include "remove phase", "remove phase".
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Remove a future phase from roadmap and renumber subsequent phases. Triggers include "remove phase", "remove phase".
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Capture an idea, task, or issue that surfaces during a Kata session as a structured issue for later work. This skill creates markdown issue files in the .planning/issues/open directory with relevant metadata and content extracted from the conversation. Triggers include "add issue", "capture issue", "new issue", "create issue", "log issue", "file issue", "add todo" (deprecated), "capture todo" (deprecated), "new todo" (deprecated).
Add a milestone to an existing project, starting a new milestone cycle, creating the first milestone after project init, or defining what's next after completing work. Triggers include "add milestone", "new milestone", "start milestone", "create milestone", "first milestone", "next milestone", and "milestone cycle".
Add planned work discovered during execution to the end of the current milestone in the roadmap. This skill appends sequential phases to the current milestone's phase list, automatically calculating the next phase number. Triggers include "add phase", "append phase", "new phase", and "create phase". This skill updates ROADMAP.md and STATE.md accordingly.
Verify milestone achievement against its definition of done, checking requirements coverage, cross-phase integration, and end-to-end flows. Triggers include "audit milestone", "verify milestone", "check milestone", and "milestone audit". This skill reads existing phase verification files, aggregates technical debt and gaps, and spawns an integration checker for cross-phase wiring.
Review open issues, selecting an issue to work on, filtering issues by area, pulling GitHub issues, or deciding what to work on next. Triggers include "check issues", "list issues", "what issues", "open issues", "show issues", "view issues", "select issue to work on", "github issues", "backlog issues", "pull issues", "check todos" (deprecated), "list todos" (deprecated), "pending todos" (deprecated).
Archive a completed milestone, preparing for the next version, marking a milestone complete, shipping a version, or wrapping up milestone work. Triggers include "complete milestone", "finish milestone", "archive milestone", "ship version", "mark milestone done", "milestone complete", "release version", "create release", and "ship milestone".
| 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"} |
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.1If 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 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
If exit code 1 (old format):
Invoke kata-doctor in auto mode:
Skill("kata-doctor", "--auto")
Continue after migration completes.
If exit code 0 or 2: Continue silently.
Load project state:cat .planning/STATE.md 2>/dev/null
cat .planning/ROADMAP.md 2>/dev/null
Parse current phase number from STATE.md "Current Position" section.
Verify the target phase exists in ROADMAP.md:Search for ### Phase {target}: heading
If not found:
ERROR: Phase {target} not found in roadmap
Available phases: [list phase numbers]
Exit.
If target <= current phase:
ERROR: Cannot remove Phase {target}
Only future phases can be removed:
- Current phase: {current}
- Phase {target} is current or completed
To abandon current work, use /kata-pause-work instead.
Exit.
# Universal phase discovery for target phase
PADDED_TARGET=$(printf "%02d" "$TARGET" 2>/dev/null || echo "$TARGET")
PHASE_DIR=""
for state in active pending completed; do
PHASE_DIR=$(find .planning/phases/${state} -maxdepth 1 -type d -name "${PADDED_TARGET}-*" 2>/dev/null | head -1)
[ -z "$PHASE_DIR" ] && PHASE_DIR=$(find .planning/phases/${state} -maxdepth 1 -type d -name "${TARGET}-*" 2>/dev/null | head -1)
[ -n "$PHASE_DIR" ] && break
done
# Fallback: flat directory (backward compatibility)
if [ -z "$PHASE_DIR" ]; then
PHASE_DIR=$(find .planning/phases -maxdepth 1 -type d -name "${PADDED_TARGET}-*" 2>/dev/null | head -1)
[ -z "$PHASE_DIR" ] && PHASE_DIR=$(find .planning/phases -maxdepth 1 -type d -name "${TARGET}-*" 2>/dev/null | head -1)
fi
find "${PHASE_DIR}" -maxdepth 1 -name "*-SUMMARY.md" 2>/dev/null
If any SUMMARY.md files exist:
ERROR: Phase {target} has completed work
Found executed plans:
- {list of SUMMARY.md files}
Cannot remove phases with completed work.
Exit.
Collect information about the phase being removed:### Phase {target}: {Name}${PHASE_DIR}Subsequent phase detection:
For integer phase removal (e.g., 17):
For decimal phase removal (e.g., 17.1):
List all phases that will be renumbered.
Present removal summary and confirm:Removing Phase {target}: {Name}
This will:
- Delete: ${PHASE_DIR}
- Renumber {N} subsequent phases:
- Phase 18 → Phase 17
- Phase 18.1 → Phase 17.1
- Phase 19 → Phase 18
[etc.]
Proceed? (y/n)
Wait for confirmation.
Delete the target phase directory if it exists:if [ -d "${PHASE_DIR}" ]; then
rm -rf "${PHASE_DIR}"
echo "Deleted: ${PHASE_DIR}"
fi
If directory doesn't exist, note: "No directory to delete (phase not yet created)"
Rename all subsequent phase directories:For each phase directory that needs renumbering (in reverse order to avoid conflicts):
Find each subsequent phase using universal discovery, then rename within the same state subdirectory:
# For each subsequent phase, find it across state subdirectories
for state in active pending completed; do
# Example: renaming 18-dashboard to 17-dashboard within the same state dir
SRC=$(find .planning/phases/${state} -maxdepth 1 -type d -name "18-dashboard" 2>/dev/null | head -1)
[ -n "$SRC" ] && mv "$SRC" ".planning/phases/${state}/17-dashboard"
done
# Fallback: flat directory
SRC=$(find .planning/phases -maxdepth 1 -type d -name "18-dashboard" 2>/dev/null | head -1)
[ -n "$SRC" ] && mv "$SRC" ".planning/phases/17-dashboard"
Process in descending order (20→19, then 19→18, then 18→17) to avoid overwriting.
Also rename decimal phase directories:
17.1-fix-bug → 16.1-fix-bug (if removing integer 17)17.2-hotfix → 17.1-hotfix (if removing decimal 17.1)
For each renumbered directory, rename files that contain the phase number:
# Inside 17-dashboard (was 18-dashboard):
mv "18-01-PLAN.md" "17-01-PLAN.md"
mv "18-02-PLAN.md" "17-02-PLAN.md"
mv "18-01-SUMMARY.md" "17-01-SUMMARY.md" # if exists
# etc.
Also handle CONTEXT.md and DISCOVERY.md (these don't have phase prefixes, so no rename needed).
Update ROADMAP.md:Remove the phase section entirely:
### Phase {target}: to the next phase heading (or section end)Remove from phase list:
- [ ] **Phase {target}: {Name}** or similarRemove from Progress table:
Renumber all subsequent phases:
### Phase 18: → ### Phase 17:- [ ] **Phase 18: → - [ ] **Phase 17:| 18. Dashboard | → | 17. Dashboard |18-01: → 17-01:Update dependency references:
**Depends on:** Phase 18 → **Depends on:** Phase 17**Depends on:** Phase 17 (removed) → **Depends on:** Phase 16Renumber decimal phases:
### Phase 17.1: → ### Phase 16.1: (if integer 17 removed)Write updated ROADMAP.md.
Update STATE.md:Update total phase count:
Phase: 16 of 20 → Phase: 16 of 19Recalculate progress percentage:
Do NOT add a "Roadmap Evolution" note - the git commit is the record.
Write updated STATE.md.
Search for and update phase references inside plan files:# Find files that reference the old phase numbers (search across state subdirectories)
for state in active pending completed; do
grep -r "Phase 18" .planning/phases/${state}/17-*/ 2>/dev/null
grep -r "Phase 19" .planning/phases/${state}/18-*/ 2>/dev/null
done
# Fallback: flat directories
grep -r "Phase 18" .planning/phases/17-*/ 2>/dev/null
grep -r "Phase 19" .planning/phases/18-*/ 2>/dev/null
# etc.
Update any internal references to reflect new numbering.
Stage and commit the removal:Check planning config:
COMMIT_PLANNING_DOCS=$(node scripts/kata-lib.cjs read-config "commit_docs" "true")
git check-ignore -q .planning 2>/dev/null && COMMIT_PLANNING_DOCS=false
If COMMIT_PLANNING_DOCS=false: Skip git operations
If COMMIT_PLANNING_DOCS=true (default):
git add .planning/
git commit -m "chore: remove phase {target} ({original-phase-name})"
The commit message preserves the historical record of what was removed.
Present completion summary:Phase {target} ({original-name}) removed.
Changes:
- Deleted: ${PHASE_DIR}
- Renumbered: Phases {first-renumbered}-{last-old} → {first-renumbered-1}-{last-new}
- Updated: ROADMAP.md, STATE.md
- Committed: chore: remove phase {target} ({original-name})
Current roadmap: {total-remaining} phases
Current position: Phase {current} of {new-total}
---
## What's Next
Would you like to:
- `/kata-track-progress` — see updated roadmap status
- Continue with current phase
- Review roadmap
---
<anti_patterns>
<edge_cases>
Removing a decimal phase (e.g., 17.1):
No subsequent phases to renumber:
Phase directory doesn't exist:
Decimal phases under removed integer:
</edge_cases>
<success_criteria> Phase removal is complete when: