Loading...
Loading...
Create phases to close all gaps identified by milestone audit. Triggers include "plan milestone gaps", "plan gaps".
npx skill4agent add gannonh/kata-skills kata-plan-milestone-gaps/kata-add-phase# Find the most recent audit file
find .planning -maxdepth 1 -name "v*-MILESTONE-AUDIT.md" 2>/dev/null | head -1gaps.requirementsgaps.integrationgaps.flowsNo audit gaps found. Run `/kata-audit-milestone` first.| Priority | Action |
|---|---|
| Create phase, blocks milestone |
| Create phase, recommended |
| Ask user: include or defer? |
Gap: DASH-01 unsatisfied (Dashboard doesn't fetch)
Gap: Integration Phase 1→3 (Auth not passed to API calls)
Gap: Flow "View dashboard" broken at data fetch
→ Phase 6: "Wire Dashboard to API"
- Add fetch to Dashboard.tsx
- Include auth header in fetch
- Handle response, update state
- Render user data# Scan all phase directories across states
ALL_PHASE_DIRS=""
for state in active pending completed; do
[ -d ".planning/phases/${state}" ] && ALL_PHASE_DIRS="${ALL_PHASE_DIRS} $(find .planning/phases/${state} -maxdepth 1 -type d -not -name "${state}" 2>/dev/null)"
done
# Fallback: include flat directories (backward compatibility)
FLAT_DIRS=$(find .planning/phases -maxdepth 1 -type d -name "[0-9]*" 2>/dev/null)
[ -n "$FLAT_DIRS" ] && ALL_PHASE_DIRS="${ALL_PHASE_DIRS} ${FLAT_DIRS}"
echo "$ALL_PHASE_DIRS" | tr ' ' '\n' | sort -V | tail -1## Gap Closure Plan
**Milestone:** {version}
**Gaps to close:** {N} requirements, {M} integration, {K} flows
### Proposed Phases
**Phase {N}: {Name}**
Closes:
- {REQ-ID}: {description}
- Integration: {from} → {to}
Tasks: {count}
**Phase {N+1}: {Name}**
Closes:
- {REQ-ID}: {description}
- Flow: {flow name}
Tasks: {count}
{If nice-to-have gaps exist:}
### Deferred (nice-to-have)
These gaps are optional. Include them?
- {gap description}
- {gap description}
---
Create these {X} phases? (yes / adjust / defer all optional)### Phase {N}: {Name}
**Goal:** {derived from gaps being closed}
**Requirements:** {REQ-IDs being satisfied}
**Gap Closure:** Closes gaps from audit
### Phase {N+1}: {Name}
...# New gap closure phases go into pending/ subdirectory
mkdir -p ".planning/phases/pending/{NN}-{name}"COMMIT_PLANNING_DOCS=$(cat .planning/config.json 2>/dev/null | grep -o '"commit_docs"[[:space:]]*:[[:space:]]*[^,}]*' | grep -o 'true\|false' || echo "true")
git check-ignore -q .planning 2>/dev/null && COMMIT_PLANNING_DOCS=falseCOMMIT_PLANNING_DOCS=falseCOMMIT_PLANNING_DOCS=truegit add .planning/ROADMAP.md
git commit -m "docs(roadmap): add gap closure phases {N}-{M}"## ✓ Gap Closure Phases Created
**Phases added:** {N} - {M}
**Gaps addressed:** {count} requirements, {count} integration, {count} flows
---
## ▶ Next Up
**Plan first gap closure phase**
`/kata-plan-phase {N}`
<sub>`/clear` first → fresh context window</sub>
---
**Also available:**
- `/kata-execute-phase {N}` — if plans already exist
- `cat .planning/ROADMAP.md` — see updated roadmap
---
**After all gap phases complete:**
`/kata-audit-milestone` — re-audit to verify gaps closed
`/kata-complete-milestone {version}` — archive when audit passesgap:
id: DASH-01
description: "User sees their data"
reason: "Dashboard exists but doesn't fetch from API"
missing:
- "useEffect with fetch to /api/user/data"
- "State for user data"
- "Render user data in JSX"
becomes:
phase: "Wire Dashboard Data"
tasks:
- name: "Add data fetching"
files: [src/components/Dashboard.tsx]
action: "Add useEffect that fetches /api/user/data on mount"
- name: "Add state management"
files: [src/components/Dashboard.tsx]
action: "Add useState for userData, loading, error states"
- name: "Render user data"
files: [src/components/Dashboard.tsx]
action: "Replace placeholder with userData.map rendering"gap:
from_phase: 1
to_phase: 3
connection: "Auth token → API calls"
reason: "Dashboard API calls don't include auth header"
missing:
- "Auth header in fetch calls"
- "Token refresh on 401"
becomes:
phase: "Add Auth to Dashboard API Calls"
tasks:
- name: "Add auth header to fetches"
files: [src/components/Dashboard.tsx, src/lib/api.ts]
action: "Include Authorization header with token in all API calls"
- name: "Handle 401 responses"
files: [src/lib/api.ts]
action: "Add interceptor to refresh token or redirect to login on 401"gap:
name: "User views dashboard after login"
broken_at: "Dashboard data load"
reason: "No fetch call"
missing:
- "Fetch user data on mount"
- "Display loading state"
- "Render user data"
becomes:
# Usually same phase as requirement/integration gap
# Flow gaps often overlap with other gap types/kata-plan-phase