원클릭으로
kata-plan-milestone-gaps
Create phases to close all gaps identified by milestone audit. Triggers include "plan milestone gaps", "plan gaps".
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Create phases to close all gaps identified by milestone audit. Triggers include "plan milestone gaps", "plan gaps".
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-plan-milestone-gaps |
| description | Create phases to close all gaps identified by milestone audit. Triggers include "plan milestone gaps", "plan gaps". |
| metadata | {"version":"1.6.1"} |
Reads MILESTONE-AUDIT.md, groups gaps into logical phases, creates phase entries in ROADMAP.md, and offers to plan each phase.
One command creates all fix phases — no manual /kata-add-phase per gap.
<execution_context>
</execution_context>
**Audit results:** Glob: .planning/v*-MILESTONE-AUDIT.md (use most recent)Original intent (for prioritization): @.planning/PROJECT.md @.planning/REQUIREMENTS.md
Current state: @.planning/ROADMAP.md @.planning/STATE.md
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.
# Find the most recent audit file
find .planning -maxdepth 1 -name "v*-MILESTONE-AUDIT.md" 2>/dev/null | head -1
Parse YAML frontmatter to extract structured gaps:
gaps.requirements — unsatisfied requirementsgaps.integration — missing cross-phase connectionsgaps.flows — broken E2E flowsIf no audit file exists or has no gaps, error:
No audit gaps found. Run `/kata-audit-milestone` first.
Group gaps by priority from REQUIREMENTS.md:
| Priority | Action |
|---|---|
must | Create phase, blocks milestone |
should | Create phase, recommended |
nice | Ask user: include or defer? |
For integration/flow gaps, infer priority from affected requirements.
Cluster related gaps into logical phases:
Grouping rules:
Example grouping:
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
Find highest existing phase:
# 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
New phases continue from there:
## 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)
Wait for user confirmation.
Add new phases to current milestone:
### 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}"
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/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 passes
<gap_to_phase_mapping>
Requirement gap → Tasks:
gap:
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"
Integration gap → Tasks:
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"
Flow gap → Tasks:
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
</gap_to_phase_mapping>
<success_criteria>
/kata-plan-phase next
</success_criteria>