Files
msd-core/commands/gsd/add-backlog.md
Tom Boucher 762b8ed25b fix(add-backlog): write ROADMAP entry before directory creation to prevent false duplicate detection (#2286)
Swaps steps 3 and 4 in add-backlog.md so ROADMAP.md is updated before
the phase directory is created. Directory existence is now a reliable
indicator that a phase is already registered, preventing false duplicate
detection in hooks that check for existing 999.x directories (Closes #2280).

Also fixes renameDecimalPhases to preserve zero-padded directory prefixes
(e.g. "06.3-slug" → "06.2-slug" instead of "6.2-slug").

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 16:46:13 -04:00

2.4 KiB

name, description, argument-hint, allowed-tools
name description argument-hint allowed-tools
gsd:add-backlog Add an idea to the backlog parking lot (999.x numbering) <description>
Read
Write
Bash
Add a backlog item to the roadmap using 999.x numbering. Backlog items are unsequenced ideas that aren't ready for active planning — they live outside the normal phase sequence and accumulate context over time.
  1. Read ROADMAP.md to find existing backlog entries:

    cat .planning/ROADMAP.md
    
  2. Find next backlog number:

    NEXT=$(node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" phase next-decimal 999 --raw)
    

    If no 999.x phases exist, start at 999.1.

  3. Add to ROADMAP.md under a ## Backlog section. If the section doesn't exist, create it at the end. Write the ROADMAP entry BEFORE creating the directory — this ensures directory existence is always a reliable indicator that the phase is already registered, which prevents false duplicate detection in any hook that checks for existing 999.x directories (#2280):

    ## Backlog
    
    ### Phase {NEXT}: {description} (BACKLOG)
    
    **Goal:** [Captured for future planning]
    **Requirements:** TBD
    **Plans:** 0 plans
    
    Plans:
    - [ ] TBD (promote with /gsd-review-backlog when ready)
    
  4. Create the phase directory:

    SLUG=$(node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" generate-slug "$ARGUMENTS" --raw)
    mkdir -p ".planning/phases/${NEXT}-${SLUG}"
    touch ".planning/phases/${NEXT}-${SLUG}/.gitkeep"
    
  5. Commit:

    node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" commit "docs: add backlog item ${NEXT} — ${ARGUMENTS}" --files .planning/ROADMAP.md ".planning/phases/${NEXT}-${SLUG}/.gitkeep"
    
  6. Report:

    ## 📋 Backlog Item Added
    
    Phase {NEXT}: {description}
    Directory: .planning/phases/{NEXT}-{slug}/
    
    This item lives in the backlog parking lot.
    Use /gsd-discuss-phase {NEXT} to explore it further.
    Use /gsd-review-backlog to promote items to active milestone.
    
- 999.x numbering keeps backlog items out of the active phase sequence - Phase directories are created immediately, so /gsd-discuss-phase and /gsd-plan-phase work on them - No `Depends on:` field — backlog items are unsequenced by definition - Sparse numbering is fine (999.1, 999.3) — always uses next-decimal