get-shit-done/workflows/add-backlog.md
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.
<process>Check for existing backlog entries:
cat .planning/ROADMAP.md
NEXT=$(gsd-sdk 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.
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)
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-sdk query generate-slug "$ARGUMENTS" --raw)
PROJECT_CODE=$(gsd-sdk 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"
gsd-sdk query commit "docs: add backlog item ${NEXT} — ${ARGUMENTS}" --files .planning/ROADMAP.md "${PHASE_DIR}/.gitkeep"
## 📋 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.