Add --pick flag to gsd-tools.cjs for extracting a single field from JSON output, replacing all jq pipe usage across workflow and reference files. Since Node.js is already a hard dependency, this eliminates the need for jq on systems where it is not installed (notably Windows). Changes: - gsd-tools.cjs: add --pick <field> global flag with dot-notation and bracket syntax support (e.g., --pick section, --pick directories[-1]) - Replace 15 jq pipe patterns across 6 workflow/reference files with --pick flag or inline Node.js one-liner for variable extraction - Add regression tests for --pick flag behavior Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1.4 KiB
1.4 KiB
Decimal Phase Calculation
Calculate the next decimal phase number for urgent insertions.
Using gsd-tools
# Get next decimal phase after phase 6
node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" phase next-decimal 6
Output:
{
"found": true,
"base_phase": "06",
"next": "06.1",
"existing": []
}
With existing decimals:
{
"found": true,
"base_phase": "06",
"next": "06.3",
"existing": ["06.1", "06.2"]
}
Extract Values
DECIMAL_PHASE=$(node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" phase next-decimal "${AFTER_PHASE}" --pick next)
BASE_PHASE=$(node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" phase next-decimal "${AFTER_PHASE}" --pick base_phase)
Or with --raw flag:
DECIMAL_PHASE=$(node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" phase next-decimal "${AFTER_PHASE}" --raw)
# Returns just: 06.1
Examples
| Existing Phases | Next Phase |
|---|---|
| 06 only | 06.1 |
| 06, 06.1 | 06.2 |
| 06, 06.1, 06.2 | 06.3 |
| 06, 06.1, 06.3 (gap) | 06.4 |
Directory Naming
Decimal phase directories use the full decimal number:
SLUG=$(node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" generate-slug "$DESCRIPTION" --raw)
PHASE_DIR=".planning/phases/${DECIMAL_PHASE}-${SLUG}"
mkdir -p "$PHASE_DIR"
Example: .planning/phases/06.1-fix-critical-auth-bug/