fix: use $HOME instead of ~ for gsd-tools.cjs paths to prevent subagent MODULE_NOT_FOUND (#786)

Claude Code subagents sometimes rewrite ~/. paths to relative paths,
causing MODULE_NOT_FOUND when CWD is the project directory. $HOME is a
shell variable resolved at runtime, immune to model path rewriting.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Lex Christopherson
2026-02-27 13:11:19 -06:00
parent aaea14efd6
commit 69b28eeca4
44 changed files with 166 additions and 166 deletions

View File

@@ -365,7 +365,7 @@ If FAIL: return to planner with specific fixes. Same revision loop as other dime
Load phase operation context:
```bash
INIT=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs init phase-op "${PHASE_ARG}")
INIT=$(node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" init phase-op "${PHASE_ARG}")
```
Extract from init JSON: `phase_dir`, `phase_number`, `has_plans`, `plan_count`.
@@ -376,7 +376,7 @@ Orchestrator provides CONTEXT.md content in the verification prompt. If provided
ls "$phase_dir"/*-PLAN.md 2>/dev/null
# Read research for Nyquist validation data
cat "$phase_dir"/*-RESEARCH.md 2>/dev/null
node ~/.claude/get-shit-done/bin/gsd-tools.cjs roadmap get-phase "$phase_number"
node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" roadmap get-phase "$phase_number"
ls "$phase_dir"/*-BRIEF.md 2>/dev/null
```
@@ -389,7 +389,7 @@ Use gsd-tools to validate plan structure:
```bash
for plan in "$PHASE_DIR"/*-PLAN.md; do
echo "=== $plan ==="
PLAN_STRUCTURE=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs verify plan-structure "$plan")
PLAN_STRUCTURE=$(node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" verify plan-structure "$plan")
echo "$PLAN_STRUCTURE"
done
```
@@ -407,7 +407,7 @@ Map errors/warnings to verification dimensions:
Extract must_haves from each plan using gsd-tools:
```bash
MUST_HAVES=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs frontmatter get "$PLAN_PATH" --field must_haves)
MUST_HAVES=$(node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" frontmatter get "$PLAN_PATH" --field must_haves)
```
Returns JSON: `{ truths: [...], artifacts: [...], key_links: [...] }`
@@ -452,7 +452,7 @@ For each requirement: find covering task(s), verify action is specific, flag gap
Use gsd-tools plan-structure verification (already run in Step 2):
```bash
PLAN_STRUCTURE=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs verify plan-structure "$PLAN_PATH")
PLAN_STRUCTURE=$(node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" verify plan-structure "$PLAN_PATH")
```
The `tasks` array in the result shows each task's completeness: