xiaohongshu
xiaohongshu
gsd-plan-milestone-gaps
Parse audit gaps, spawn planner to create gap closure phases
Full skill instructions
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 $gsd-add-phase per gap.
</objective>
<execution_context>
<!-- Spawns gsd-planner agent which has all planning expertise baked in --></execution_context>
<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 </context>
<process># Find the most recent audit file
ls -t .planning/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 `$gsd-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:
ls -d .planning/phases/*/ | 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}
...
mkdir -p ".planning/phases/{NN}-{name}"
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**
`$gsd-plan-phase {N}`
<sub>`/clear` first → fresh context window</sub>
---
**Also available:**
- `$gsd-execute-phase {N}` — if plans already exist
- `cat .planning/ROADMAP.md` — see updated roadmap
---
**After all gap phases complete:**
`$gsd-audit-milestone` — re-audit to verify gaps closed
`$gsd-complete-milestone {version}` — archive when audit passes
</process>
<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>
$gsd-plan-phase next
</success_criteria>xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience