Loading...
Loading...
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.
npx skill4agent add gannonh/kata-skills kata-add-phase/kata-add-phase--issue/kata-add-phase --issue .planning/issues/open/2026-02-06-phase-lookup.mddescriptionISSUE_FILEISSUE_PROVENANCEgithub:owner/repo#102ISSUE_NUMBER102if echo "$ARGUMENTS" | grep -q "^--issue "; then
ISSUE_FILE=$(echo "$ARGUMENTS" | sed 's/^--issue //')
if [ ! -f "$ISSUE_FILE" ]; then
echo "ERROR: Issue file not found: $ISSUE_FILE"
exit 1
fi
description=$(grep "^title:" "$ISSUE_FILE" | cut -d':' -f2- | xargs)
ISSUE_PROVENANCE=$(grep "^provenance:" "$ISSUE_FILE" | cut -d' ' -f2)
ISSUE_NUMBER=""
if echo "$ISSUE_PROVENANCE" | grep -q "^github:"; then
ISSUE_NUMBER=$(echo "$ISSUE_PROVENANCE" | grep -oE '#[0-9]+' | tr -d '#')
fi
fi--issue/kata-add-phase Add authenticationISSUE_FILEISSUE_PROVENANCEISSUE_NUMBERERROR: Phase description required
Usage: /kata-add-phase <description>
/kata-add-phase --issue <issue-file-path>
Example: /kata-add-phase Add authentication systemif [ -f .planning/ROADMAP.md ]; then
ROADMAP=".planning/ROADMAP.md"
else
echo "ERROR: No roadmap found (.planning/ROADMAP.md)"
exit 1
fi## Current Milestone: v1.0 Foundation
### Phase 4: Focused Command System
### Phase 5: Path Routing & Validation
### Phase 6: Documentation & Distributionprintf "%02d" $next_phase# Example transformation:
# "Add authentication" → "add-authentication"
# "Fix critical performance issues" → "fix-critical-performance-issues"
slug=$(echo "$description" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g' | sed 's/--*/-/g' | sed 's/^-//;s/-$//'){two-digit-phase}-{slug}07-add-authenticationphase_dir=".planning/phases/pending/${phase_num}-${slug}"
mkdir -p "$phase_dir"### Phase {N}: {Description}
**Goal:** [To be planned]
**Depends on:** Phase {N-1}
{if ISSUE_NUMBER: **Issue:** Closes #{ISSUE_NUMBER}}
**Plans:** 0 plans
Plans:
- [ ] TBD (run /kata-plan-phase {N} to break down)
**Details:**
[To be added during planning]ISSUE_NUMBER--issue**Issue:** Closes #{N}.planning/STATE.md- Phase {N} added: {description}Phase {N} added to current milestone:
- Description: {description}
- Directory: .planning/phases/{phase-num}-{slug}/
- Status: Not planned yet
{if ISSUE_NUMBER: - Issue: Closes #${ISSUE_NUMBER} (linked from ${ISSUE_FILE})}
Roadmap updated: {roadmap-path}
Project state updated: .planning/STATE.md
---
## ▶ Next Up
**Phase {N}: {description}**
`/kata-plan-phase {N}`
<sub>`/clear` first → fresh context window</sub>
---
**Also available:**
- `/kata-add-phase <description>` — add another phase
- Review roadmap
---.planning/phases/pending/{NN}-{slug}/