gsd:add-phase

gsd:add-phase is a command for Claude Code from GeoloeG-IsT/agents-reverse-engineer. It costs 14 tokens per session (1,268 once invoked), scanned A, original, MIT.

A roadmap command that appends a new phase to the current project milestone and assigns its next phase number.

In plain words
What is it for?
Use it during project execution when additional work belongs at the end of the current milestone, such as adding an authentication phase.
Why use it?
It keeps newly discovered work organized without manually editing phase numbering. It also checks that the project roadmap exists before changing it.

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/add-phase
Clone the repo
git clone --depth 1 https://github.com/GeoloeG-IsT/agents-reverse-engineer

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for gsd:add-phase

README.md
[![agentmods](https://agentmods.dev/badge/commands/geoloeg-ist/agents-reverse-engineer/add-phase.svg)](https://agentmods.dev/commands/geoloeg-ist/agents-reverse-engineer/add-phase)
Your own site
<a href="https://agentmods.dev/commands/geoloeg-ist/agents-reverse-engineer/add-phase"><img src="https://agentmods.dev/badge/commands/geoloeg-ist/agents-reverse-engineer/add-phase.svg" alt="Measured on agentmods" height="20"></a>
Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,268 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00014 $0.01268
Opus 5 $0.00007 $0.00634
Sonnet 5 $0.00003 $0.00254
Haiku 4.5 $0.00001 $0.00127

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

Security

Grade A, and why

gsd:add-phase scanned grade A with 0 findings 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 5d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

.claude/commands/gsd/add-phase.md · 208 lines

How it starts

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

This command appends sequential phases to the current milestone's phase list, automatically calculating the next phase number based on existing phases.

Purpose: Add planned work discovered during execution that belongs at the end of current milestone.

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

If no arguments provided:

ERROR: Phase description required
Usage: /gsd:add-phase <description>
Example: /gsd:add-phase Add authentication system

Exit.

if [ -f .planning/ROADMAP.md ]; then
  ROADMAP=".planning/ROADMAP.md"
else
  echo "ERROR: No roadmap found (.planning/ROADMAP.md)"
  exit 1
fi

Read roadmap content for parsing.

  1. Locate the "## Current Milestone:" heading
  2. Extract milestone name and version
  3. Identify all phases under this milestone (before next "---" separator or next milestone heading)
  4. Parse existing phase numbers (including decimals if present)

Example structure:

## Current Milestone: v1.0 Foundation

### Phase 4: Focused Command System
### Phase 5: Path Routing & Validation
### Phase 6: Documentation & Distribution
  1. Extract all phase numbers from phase headings (### Phase N:)
  2. Filter to integer phases only (ignore decimals like 4.1, 4.2)
  3. Find the maximum integer value
  4. Add 1 to get the next phase number

Example: If phases are 4, 5, 5.1, 6 → next is 7

Format as two-digit: printf "%02d" $next_phase

# Example transformation:
# "Add authentication" → "add-authentication"
# "Fix critical performance issues" → "fix-critical-performance-issues"

slug=$(echo "$description" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g' | sed 's/--*/-/g' | sed 's/^-//;s/-$//')

Phase directory name: {two-digit-phase}-{slug} Example: 07-add-authentication

phase_dir=".planning/phases/${phase_num}-${slug}"
mkdir -p "$phase_dir"

Confirm: "Created directory: $phase_dir"

  1. Find the insertion point (after last phase in current milestone, before "---" separator)

  2. Insert new phase heading:

    ### Phase {N}: {Description}
    
    **Goal:** [To be planned]
    **Depends on:** Phase {N-1}
    **Plans:** 0 plans
    
    Plans:
    - [ ] TBD (run /gsd:plan-phase {N} to break down)
    
    **Details:**
    [To be added during planning]
    
  3. Write updated roadmap back to file

Preserve all other content exactly (formatting, spacing, other phases).

  1. Read .planning/STATE.md
  2. Under "## Current Position" → "Next Phase:" add reference to new phase
  3. Under "## Accumulated Context" → "### Roadmap Evolution" add entry:
    - Phase {N} added: {description}
    

If "Roadmap Evolution" section doesn't exist, create it.

Phase {N} added to current milestone:
- Description: {description}
- Directory: .planning/phases/{phase-num}-{slug}/
- Status: Not planned yet

Roadmap updated: {roadmap-path}
Project state updated: .planning/STATE.md

---

## ▶ Next Up

**Phase {N}: {description}**

`/gsd:plan-phase {N}`

<sub>`/clear` first → fresh context window</sub>

---

**Also available:**
- `/gsd:add-phase <description>` — add another phase
- Review roadmap

---

Read the full file on GitHub · 208 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. 5d ago First seen · 208 lines · 14 tokens per session scan A 0da487cc1326

Subscribe to this mod's changes

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