xiaohongshu
xiaohongshu
gsd-remove-phase
Remove a future phase from roadmap and renumber subsequent phases
Full skill instructions
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. </objective>
<execution_context> @.planning/ROADMAP.md @.planning/STATE.md </execution_context>
<process> <step name="parse_arguments"> Parse the command arguments: - Argument is the phase number to remove (integer or decimal) - Example: `{{COMMAND_PREFIX}}remove-phase 17` → phase = 17 - Example: `{{COMMAND_PREFIX}}remove-phase 16.1` → phase = 16.1If no argument provided:
ERROR: Phase number required
Usage: {{COMMAND_PREFIX}}remove-phase <phase-number>
Example: {{COMMAND_PREFIX}}remove-phase 17
Exit. </step>
<step name="load_state"> 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. </step>
<step name="validate_phase_exists"> 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. </step>
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 {{COMMAND_PREFIX}}pause-work instead.
Exit.
ls .planning/phases/{target}-*/*-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. </step>
<step name="gather_phase_info"> Collect information about the phase being removed:### Phase {target}: {Name}.planning/phases/{target}-{slug}/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. </step>
<step name="confirm_removal"> Present removal summary and confirm:Removing Phase {target}: {Name}
This will:
- Delete: .planning/phases/{target}-{slug}/
- 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. </step>
<step name="delete_phase_directory"> Delete the target phase directory if it exists:if [ -d ".planning/phases/{target}-{slug}" ]; then
rm -rf ".planning/phases/{target}-{slug}"
echo "Deleted: .planning/phases/{target}-{slug}/"
fi
If directory doesn't exist, note: "No directory to delete (phase not yet created)" </step>
<step name="renumber_directories"> Rename all subsequent phase directories:For each phase directory that needs renumbering (in reverse order to avoid conflicts):
# Example: renaming 18-dashboard to 17-dashboard
mv ".planning/phases/18-dashboard" ".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)
</step>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). </step>
<step name="update_roadmap"> 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. </step>
<step name="update_state"> 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. </step>
<step name="update_file_contents"> Search for and update phase references inside plan files:# Find files that reference the old phase numbers
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. </step>
<step name="commit"> Stage and commit the removal:git add .planning/
git commit -m "chore: remove phase {target} ({original-phase-name})"
The commit message preserves the historical record of what was removed. </step>
<step name="completion"> Present completion summary:Phase {target} ({original-name}) removed.
Changes:
- Deleted: .planning/phases/{target}-{slug}/
- Renumbered: Phases {first-renumbered}-{last-old} → {first-renumbered-1}-{last-new}
- Updated: ROADMAP.md, STATE.md
- Committed: chore: remove phase {target} ({original-phase-name})
Current roadmap: {total-remaining} phases
Current position: Phase {current} of {new-total}
---
## What's Next
Would you like to:
- `{{COMMAND_PREFIX}}progress` — see updated roadmap status
- Continue with current phase
- Review roadmap
---
</step>
</process>
<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:
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