* fix(#373): replace unquoted $GSD_SDK with space-safe gsd_run launcher Workflow bash blocks resolved the runtime as GSD_SDK="node $GSD_TOOLS" and invoked it unquoted ($GSD_SDK query ...). On install paths containing spaces (e.g. /Volumes/Mini Me/...) the unquoted expansion word-split into `node /Volumes/Mini gsd-tools.cjs ...`, failing with "Cannot find module '/Volumes/Mini'" and getting masked by `2>/dev/null || echo "{}"` into a silent empty state. Replace the string variable with a single-line shell launcher that defines a gsd_run function, invokes the runtime with a fully-quoted path and "$@", and preserves the local-cjs / installed-gsd-tools-on-PATH fallback (#3668) plus the loud not-found error and install hint. The launcher uses _GSD_SHIM_NAME indirection so no workflow emits the /gsd-tools substring that the do.md dispatcher-parity scanner would misread, and is single-line to stay within the per-file progressive-disclosure line budgets (#2551). The canonical launcher lives in get-shit-done/workflows/_runtime-launcher.snippet.sh, is propagated once per file by scripts/sync-runtime-launcher.cjs, and is locked by tests/runtime-launcher-parity.test.cjs (fails CI on drift, on a reappearing $GSD_SDK token, or on a /gsd-tools substring). Dependent workflow-assertion tests are updated from $GSD_SDK to gsd_run, and the runtime launcher is registered in CONTEXT.md. Fixes #373 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * ci(#373): add changeset fragment and allow-test-rule for parity guard The runtime-launcher parity test is a structural drift guard that reads workflow markdown to assert the canonical launcher is present and the retired $GSD_SDK / /gsd-tools tokens are absent; annotate it with allow-test-rule per the no-source-grep lint escape hatch. Add the required .changeset fragment for this user-facing fix. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * test(#373): make parity PATH-fallback assertion cross-platform (Windows) Subtest (E) compared GSD_TOOLS against the Node-side absolute temp path, but the value originates from git-bash which reports the POSIX form, so the prefix comparison failed on windows-latest while the launcher itself worked (the installed stub was invoked). Assert the resolved binary by normalized suffix (/bin/gsd-tools, not .cjs) instead of the absolute prefix; the behavioral stub-invocation assertion is unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -48,19 +48,8 @@ When `--interactive` is set, discuss runs inline with questions (not auto-answer
|
||||
Bootstrap via milestone-level init:
|
||||
|
||||
```bash
|
||||
# SDK resolution: prefer local gsd-tools.cjs, fall back to installed gsd-tools (#3668)
|
||||
GSD_TOOLS="${RUNTIME_DIR:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}/get-shit-done/bin/gsd-tools.cjs"
|
||||
if [ -f "$GSD_TOOLS" ]; then
|
||||
GSD_SDK="node $GSD_TOOLS"
|
||||
elif command -v gsd-tools >/dev/null 2>&1; then
|
||||
GSD_TOOLS="$(command -v gsd-tools)"
|
||||
GSD_SDK="$GSD_TOOLS"
|
||||
else
|
||||
echo "ERROR: gsd-tools.cjs not found at $GSD_TOOLS and gsd-tools is not on PATH." >&2
|
||||
echo "Run: npx -y @opengsd/get-shit-done-redux@latest --claude --local" >&2
|
||||
exit 1
|
||||
fi
|
||||
INIT=$($GSD_SDK query init.milestone-op)
|
||||
_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" "$@"; }; 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
|
||||
INIT=$(gsd_run query init.milestone-op)
|
||||
if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
||||
```
|
||||
|
||||
@@ -94,7 +83,7 @@ If `INTERACTIVE` is set, display: `Mode: Interactive (discuss inline, plan+execu
|
||||
Run phase discovery:
|
||||
|
||||
```bash
|
||||
ROADMAP=$($GSD_SDK query roadmap.analyze)
|
||||
ROADMAP=$(gsd_run query roadmap.analyze)
|
||||
```
|
||||
|
||||
Parse the JSON `phases` array.
|
||||
@@ -153,7 +142,7 @@ Exit cleanly.
|
||||
**Fetch details for each phase:**
|
||||
|
||||
```bash
|
||||
DETAIL=$($GSD_SDK query roadmap.get-phase ${PHASE_NUM})
|
||||
DETAIL=$(gsd_run query roadmap.get-phase ${PHASE_NUM})
|
||||
```
|
||||
|
||||
Extract `phase_name`, `goal`, `success_criteria` from each. Store for use in execute_phase and transition messages.
|
||||
@@ -181,7 +170,7 @@ Where N = current phase number (from the ROADMAP, e.g., 63), T = total milestone
|
||||
Check if CONTEXT.md already exists for this phase:
|
||||
|
||||
```bash
|
||||
PHASE_STATE=$($GSD_SDK query init.phase-op ${PHASE_NUM})
|
||||
PHASE_STATE=$(gsd_run query init.phase-op ${PHASE_NUM})
|
||||
```
|
||||
|
||||
Parse `has_context` from JSON.
|
||||
@@ -197,7 +186,7 @@ Proceed to 3b.
|
||||
**If has_context is false:** Check if discuss is disabled via settings:
|
||||
|
||||
```bash
|
||||
SKIP_DISCUSS=$($GSD_SDK query config-get workflow.skip_discuss 2>/dev/null || echo "false")
|
||||
SKIP_DISCUSS=$(gsd_run query config-get workflow.skip_discuss 2>/dev/null || echo "false")
|
||||
```
|
||||
|
||||
**If SKIP_DISCUSS is `true`:** Skip discuss entirely — the ROADMAP phase description is the spec. Display:
|
||||
@@ -209,7 +198,7 @@ Phase ${PHASE_NUM}: Discuss skipped (workflow.skip_discuss=true) — using ROADM
|
||||
Write a minimal CONTEXT.md so downstream plan-phase has valid input. Get phase details:
|
||||
|
||||
```bash
|
||||
DETAIL=$($GSD_SDK query roadmap.get-phase ${PHASE_NUM})
|
||||
DETAIL=$(gsd_run query roadmap.get-phase ${PHASE_NUM})
|
||||
```
|
||||
|
||||
Extract `goal` and `requirements` from JSON. Write `${phase_dir}/${padded_phase}-CONTEXT.md` with:
|
||||
@@ -261,7 +250,7 @@ None — discuss phase skipped.
|
||||
Commit the minimal context:
|
||||
|
||||
```bash
|
||||
$GSD_SDK query commit "docs(${PADDED_PHASE}): auto-generated context (discuss skipped)" --files "${phase_dir}/${padded_phase}-CONTEXT.md"
|
||||
gsd_run query commit "docs(${PADDED_PHASE}): auto-generated context (discuss skipped)" --files "${phase_dir}/${padded_phase}-CONTEXT.md"
|
||||
```
|
||||
|
||||
Proceed to 3b.
|
||||
@@ -282,7 +271,7 @@ Skill(skill="gsd-discuss-phase", args="${PHASE_NUM}")
|
||||
After discuss completes (either mode), verify context was written:
|
||||
|
||||
```bash
|
||||
PHASE_STATE=$($GSD_SDK query init.phase-op ${PHASE_NUM})
|
||||
PHASE_STATE=$(gsd_run query init.phase-op ${PHASE_NUM})
|
||||
```
|
||||
|
||||
Check `has_context`. If false → go to handle_blocker: "Discuss for phase ${PHASE_NUM} did not produce CONTEXT.md."
|
||||
@@ -292,7 +281,7 @@ Check `has_context`. If false → go to handle_blocker: "Discuss for phase ${PHA
|
||||
Check if this phase has frontend indicators and whether a UI-SPEC already exists:
|
||||
|
||||
```bash
|
||||
PHASE_SECTION=$($GSD_SDK query roadmap.get-phase ${PHASE_NUM} 2>/dev/null)
|
||||
PHASE_SECTION=$(gsd_run query roadmap.get-phase ${PHASE_NUM} 2>/dev/null)
|
||||
# Shell-free word-boundary gate (#3718): Node.js helper — no locale env-var dependency.
|
||||
# Reads via stdin to avoid OS ARG_MAX limits on large phase text.
|
||||
# Path anchored to repo root; falls back to CWD if git is unavailable
|
||||
@@ -306,7 +295,7 @@ UI_SPEC_FILE=$(ls "${PHASE_DIR}"/*-UI-SPEC.md 2>/dev/null | head -1)
|
||||
Check if UI phase workflow is enabled:
|
||||
|
||||
```bash
|
||||
UI_PHASE_CFG=$($GSD_SDK query config-get workflow.ui_phase 2>/dev/null || echo "true")
|
||||
UI_PHASE_CFG=$(gsd_run query config-get workflow.ui_phase 2>/dev/null || echo "true")
|
||||
```
|
||||
|
||||
**If `HAS_UI` is 0 (frontend indicators found) AND `UI_SPEC_FILE` is empty (no UI-SPEC exists) AND `UI_PHASE_CFG` is not `false`:**
|
||||
@@ -379,7 +368,7 @@ Auto-invoke code review and fix chain. Autonomous mode chains both review and fi
|
||||
|
||||
**Config gate:**
|
||||
```bash
|
||||
CODE_REVIEW_ENABLED=$($GSD_SDK query config-get workflow.code_review 2>/dev/null || echo "true")
|
||||
CODE_REVIEW_ENABLED=$(gsd_run query config-get workflow.code_review 2>/dev/null || echo "true")
|
||||
```
|
||||
If `"false"`: display "Code review skipped (workflow.code_review=false)" and proceed to 3d.
|
||||
|
||||
@@ -407,7 +396,7 @@ VERIFY_STATUS=$(grep "^status:" "${PHASE_DIR}"/*-VERIFICATION.md 2>/dev/null | h
|
||||
Where `PHASE_DIR` comes from the `init phase-op` call already made in step 3a. If the variable is not in scope, re-fetch:
|
||||
|
||||
```bash
|
||||
PHASE_STATE=$($GSD_SDK query init.phase-op ${PHASE_NUM})
|
||||
PHASE_STATE=$(gsd_run query init.phase-op ${PHASE_NUM})
|
||||
```
|
||||
|
||||
Parse `phase_dir` from the JSON.
|
||||
@@ -503,7 +492,7 @@ UI_SPEC_FILE=$(ls "${PHASE_DIR}"/*-UI-SPEC.md 2>/dev/null | head -1)
|
||||
Check if UI review is enabled:
|
||||
|
||||
```bash
|
||||
UI_REVIEW_CFG=$($GSD_SDK query config-get workflow.ui_review 2>/dev/null || echo "true")
|
||||
UI_REVIEW_CFG=$(gsd_run query config-get workflow.ui_review 2>/dev/null || echo "true")
|
||||
```
|
||||
|
||||
**If `UI_SPEC_FILE` is not empty AND `UI_REVIEW_CFG` is not `false`:**
|
||||
@@ -562,7 +551,7 @@ Proceed directly to lifecycle step (which handles partial completion — skips a
|
||||
**Otherwise:** After each phase completes, re-read ROADMAP.md to catch phases inserted mid-execution (decimal phases like 5.1):
|
||||
|
||||
```bash
|
||||
ROADMAP=$($GSD_SDK query roadmap.analyze)
|
||||
ROADMAP=$(gsd_run query roadmap.analyze)
|
||||
```
|
||||
|
||||
Re-filter incomplete phases using the same logic as discover_phases:
|
||||
|
||||
Reference in New Issue
Block a user