Files
msd-core/get-shit-done/workflows/add-backlog.md
Tom Boucher a5eceb1faf fix(#211): add ~/.claude/get-shit-done/bin fallback to gsd_run launcher (closes #394) (#427)
Extends the canonical runtime-launcher snippet with a third resolution arm
that probes $HOME/.claude/get-shit-done/bin/${_GSD_SHIM_NAME} between the
PATH check and the hard-error exit. Global Claude-Code installs (--claude
without --local) with no PATH wiring and no RUNTIME_DIR no longer hit the
hard-error path.

Resolution order: local/RUNTIME_DIR -> PATH -> ~/.claude/... -> hard error.

Propagated to 76 workflow .md files via sync-runtime-launcher.cjs. Parity
test (G) and bug-211 regression test (4 assertions) added.
2026-05-27 23:17:59 -04:00

3.3 KiB

Add Backlog Item Workflow

Invoked by /gsd:capture --backlog (commands/gsd/capture.md).

Adds an idea to the ROADMAP.md backlog parking lot 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.

Step 1: Read ROADMAP.md

Check for existing backlog entries:

cat .planning/ROADMAP.md

Step 2: Find next backlog number

_GSD_SHIM_NAME="gsd-tools.cjs"; GSD_TOOLS="${RUNTIME_DIR:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}/get-shit-done/bin/${_GSD_SHIM_NAME}"; if [ -f "$GSD_TOOLS" ]; then gsd_run() { node "$GSD_TOOLS" "$@"; }; elif command -v gsd-tools >/dev/null 2>&1; then GSD_TOOLS="$(command -v gsd-tools)"; gsd_run() { "$GSD_TOOLS" "$@"; }; elif [ -f "$HOME/.claude/get-shit-done/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="$HOME/.claude/get-shit-done/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; else echo "ERROR: gsd-tools.cjs not found at $GSD_TOOLS and gsd-tools is not on PATH. Run: npx -y @opengsd/get-shit-done-redux@latest --claude --local" >&2; exit 1; fi
NEXT=$(gsd_run query phase.next-decimal 999 --raw)

If no 999.x phases exist yet, phase.next-decimal returns 999.1. Sparse numbering is fine (e.g. 999.1, 999.3) — always use phase.next-decimal, never guess.

Step 3: Write ROADMAP entry

Write the ROADMAP entry BEFORE creating the directory. Directory existence is 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).

Add under a ## Backlog section. If the section doesn't exist, create it at the end of ROADMAP.md:

## Backlog

### Phase {NEXT}: {description} (BACKLOG)

**Goal:** [Captured for future planning]
**Requirements:** TBD
**Plans:** 0 plans

Plans:
- [ ] TBD (promote with /gsd:review-backlog when ready)

Step 4: Create the phase directory

Apply the project_code prefix (if set in .planning/config.json) so the backlog directory name is consistent with all other phase-creation paths:

SLUG=$(gsd_run query generate-slug "$ARGUMENTS" --raw)
PROJECT_CODE=$(gsd_run query config-get project_code --raw 2>/dev/null || echo "")
PREFIX=$([ -n "$PROJECT_CODE" ] && echo "${PROJECT_CODE}-" || echo "")
PHASE_DIR=".planning/phases/${PREFIX}${NEXT}-${SLUG}"
mkdir -p "${PHASE_DIR}"
touch "${PHASE_DIR}/.gitkeep"

Step 5: Commit

gsd_run query commit "docs: add backlog item ${NEXT} — ${ARGUMENTS}" --files .planning/ROADMAP.md "${PHASE_DIR}/.gitkeep"

Step 6: Report

## 📋 Backlog Item Added

Phase {NEXT}: {description}
Directory: {PHASE_DIR}/

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 - Promote backlog items to the active milestone with /gsd:review-backlog