gsd:remove-phase

A command for deleting a future phase from a GSD project roadmap and renumbering the phases that follow it. A roadmap is a list of planned development stages.

In plain words
What is it for?
Use it to remove a specified future phase and record that roadmap change in version control.
Why use it?
It keeps the roadmap accurate when planned work is cancelled or deferred. It prevents removal of the current or already completed phase.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/geoloeg-ist/agents-reverse-engineer/remove-phase
Clone the repo
git clone --depth 1 https://github.com/GeoloeG-IsT/agents-reverse-engineer

Made for: Claude Code.

Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,485 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00017 $0.02485
Opus 5 $0.00009 $0.01242
Sonnet 5 $0.00003 $0.00497
Haiku 4.5 $0.00002 $0.00248

Measured 3d ago against content hash ac02a4efc7ff, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

gsd:remove-phase scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf ".planning/phases/{target}-{slug}"
Origin

Copies of this mod

1 near-identical copy found in the catalogue:

.claude/commands/gsd/remove-phase.md · 350 lines

How it starts

The opening of the file, as written. The whole thing — 350 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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.

<execution_context> @.planning/ROADMAP.md @.planning/STATE.md </execution_context>

If no argument provided:

ERROR: Phase number required
Usage: /gsd:remove-phase <phase-number>
Example: /gsd:remove-phase 17

Exit.

cat .planning/STATE.md 2>/dev/null
cat .planning/ROADMAP.md 2>/dev/null

Parse current phase number from STATE.md "Current Position" section.

  1. Search for ### Phase {target}: heading

  2. If not found:

    ERROR: Phase {target} not found in roadmap
    Available phases: [list phase numbers]
    

    Exit.

  1. Compare target phase to current phase from STATE.md
  2. Target must be > current phase number

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 /gsd:pause-work instead.

Exit.

  1. Check for SUMMARY.md files in phase directory:
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.

  1. Extract phase name from ROADMAP.md heading: ### Phase {target}: {Name}
  2. Find phase directory: .planning/phases/{target}-{slug}/
  3. Find all subsequent phases (integer and decimal) that need renumbering

Subsequent phase detection:

For integer phase removal (e.g., 17):

  • Find all phases > 17 (integers: 18, 19, 20...)
  • Find all decimal phases >= 17.0 and < 18.0 (17.1, 17.2...) → these become 16.x
  • Find all decimal phases for subsequent integers (18.1, 19.1...) → renumber with their parent

For decimal phase removal (e.g., 17.1):

  • Find all decimal phases > 17.1 and < 18 (17.2, 17.3...) → renumber down
  • Integer phases unchanged

List all phases that will be renumbered.

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.

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)"

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-bug16.1-fix-bug (if removing integer 17)
  • 17.2-hotfix17.1-hotfix (if removing decimal 17.1)

Read the full file on GitHub · 350 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 350 lines · 17 tokens per session scan C ac02a4efc7ff

Subscribe to this mod's changes

gsd:remove-phase is a command published in the GitHub repository GeoloeG-IsT/agents-reverse-engineer (20 stars, last pushed 26d ago), licensed MIT. It adds 17 tokens to every session and 2,485 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.