fix: Windows shell robustness, project_root detection, and hook stdin safety (#1343)
Address 4 root causes of Windows + Claude Code reliability issues:
1. Workflow shell robustness: add || true guards to informational commands
(ls, grep, find, cat) that return non-zero on "no results", preventing
workflow step failures under strict execution models. Guard glob loops
with [ -e "$var" ] || continue to handle empty glob expansion.
2. Hook stdin handling: replace readFileSync('/dev/stdin') with async
process.stdin + timeout in agent templates (gsd-verifier.md). Existing
JS hooks already have timeout guards.
3. project_root detection: fix isInsideGitRepo() to check .git at the
candidate parent level (not just below it), enabling correct detection
when .git and .planning/ are siblings at the same directory level —
the common single-repo case from a subdirectory.
4. @file: handoff: add missing @file: handlers to autonomous.md and
manager.md workflows that call gsd-tools init but lacked the handler
for large output payloads.
Fixes #1343
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -146,7 +146,7 @@ find . -type d -name "*test*" -o -name "*spec*" -o -name "*__tests__*" 2>/dev/nu
|
||||
# Find existing test files for convention matching
|
||||
find . -type f \( -name "*.test.*" -o -name "*.spec.*" -o -name "*Tests.fs" -o -name "*Test.fs" \) 2>/dev/null | head -20
|
||||
# Check for test runners
|
||||
ls package.json *.sln 2>/dev/null
|
||||
ls package.json *.sln 2>/dev/null || true
|
||||
```
|
||||
|
||||
Identify:
|
||||
@@ -243,7 +243,7 @@ For each approved E2E test:
|
||||
|
||||
1. **Check for existing tests** covering the same scenario:
|
||||
```bash
|
||||
grep -r "{scenario keyword}" {e2e test directory} 2>/dev/null
|
||||
grep -r "{scenario keyword}" {e2e test directory} 2>/dev/null || true
|
||||
```
|
||||
If found, extend rather than duplicate.
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ Use existing area from step 2 if similar match exists.
|
||||
<step name="check_duplicates">
|
||||
```bash
|
||||
# Search for key words from title in existing todos
|
||||
grep -l -i "[key words from title]" .planning/todos/pending/*.md 2>/dev/null
|
||||
grep -l -i "[key words from title]" .planning/todos/pending/*.md 2>/dev/null || true
|
||||
```
|
||||
|
||||
If potential duplicate found:
|
||||
|
||||
@@ -105,6 +105,7 @@ For each phase's VERIFICATION.md, extract the expanded requirements table:
|
||||
For each phase's SUMMARY.md, extract `requirements-completed` from YAML frontmatter:
|
||||
```bash
|
||||
for summary in .planning/phases/*-*/*-SUMMARY.md; do
|
||||
[ -e "$summary" ] || continue
|
||||
node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" summary-extract "$summary" --fields requirements_completed --pick requirements_completed
|
||||
done
|
||||
```
|
||||
|
||||
@@ -29,6 +29,7 @@ Bootstrap via milestone-level init:
|
||||
|
||||
```bash
|
||||
INIT=$(node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" init milestone-op)
|
||||
if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
||||
```
|
||||
|
||||
Parse JSON for: `milestone_version`, `milestone_name`, `phase_count`, `completed_phases`, `roadmap_exists`, `state_exists`, `commit_docs`.
|
||||
@@ -351,9 +352,9 @@ Read project-level and prior phase context to avoid re-asking decided questions.
|
||||
**Read project files:**
|
||||
|
||||
```bash
|
||||
cat .planning/PROJECT.md 2>/dev/null
|
||||
cat .planning/REQUIREMENTS.md 2>/dev/null
|
||||
cat .planning/STATE.md 2>/dev/null
|
||||
cat .planning/PROJECT.md 2>/dev/null || true
|
||||
cat .planning/REQUIREMENTS.md 2>/dev/null || true
|
||||
cat .planning/STATE.md 2>/dev/null || true
|
||||
```
|
||||
|
||||
Extract from these:
|
||||
@@ -364,7 +365,7 @@ Extract from these:
|
||||
**Read all prior CONTEXT.md files:**
|
||||
|
||||
```bash
|
||||
find .planning/phases -name "*-CONTEXT.md" 2>/dev/null | sort
|
||||
(find .planning/phases -name "*-CONTEXT.md" 2>/dev/null || true) | sort
|
||||
```
|
||||
|
||||
For each CONTEXT.md where phase number < current phase:
|
||||
@@ -398,7 +399,7 @@ Lightweight codebase scan to inform grey area identification and proposals. Keep
|
||||
**Check for existing codebase maps:**
|
||||
|
||||
```bash
|
||||
ls .planning/codebase/*.md 2>/dev/null
|
||||
ls .planning/codebase/*.md 2>/dev/null || true
|
||||
```
|
||||
|
||||
**If codebase maps exist:** Read the most relevant ones (CONVENTIONS.md, STRUCTURE.md, STACK.md based on phase type). Extract reusable components, established patterns, integration points. Skip to building context below.
|
||||
@@ -408,8 +409,8 @@ ls .planning/codebase/*.md 2>/dev/null
|
||||
Extract key terms from the phase goal. Search for related files:
|
||||
|
||||
```bash
|
||||
grep -rl "{term1}\|{term2}" src/ app/ --include="*.ts" --include="*.tsx" --include="*.js" --include="*.jsx" 2>/dev/null | head -10
|
||||
ls src/components/ src/hooks/ src/lib/ src/utils/ 2>/dev/null
|
||||
grep -rl "{term1}\|{term2}" src/ app/ --include="*.ts" --include="*.tsx" --include="*.js" --include="*.jsx" 2>/dev/null | head -10 || true
|
||||
ls src/components/ src/hooks/ src/lib/ src/utils/ 2>/dev/null || true
|
||||
```
|
||||
|
||||
Read the 3-5 most relevant files to understand existing patterns.
|
||||
@@ -721,7 +722,7 @@ Skill(skill="gsd:complete-milestone", args="${milestone_version}")
|
||||
After complete-milestone returns, verify it produced output:
|
||||
|
||||
```bash
|
||||
ls .planning/milestones/v${milestone_version}-ROADMAP.md 2>/dev/null
|
||||
ls .planning/milestones/v${milestone_version}-ROADMAP.md 2>/dev/null || true
|
||||
```
|
||||
|
||||
If the archive file does not exist, go to handle_blocker: "Complete milestone did not produce expected archive files."
|
||||
|
||||
@@ -27,7 +27,7 @@ Extract each milestone version (e.g., v1.0, v1.1, v2.0).
|
||||
Check which milestone archive dirs already exist:
|
||||
|
||||
```bash
|
||||
ls -d .planning/milestones/v*-phases 2>/dev/null
|
||||
ls -d .planning/milestones/v*-phases 2>/dev/null || true
|
||||
```
|
||||
|
||||
Filter to milestones that do NOT already have a `-phases` archive directory.
|
||||
@@ -55,7 +55,7 @@ Extract phase numbers and names from the archived roadmap (e.g., Phase 1: Founda
|
||||
Check which of those phase directories still exist in `.planning/phases/`:
|
||||
|
||||
```bash
|
||||
ls -d .planning/phases/*/ 2>/dev/null
|
||||
ls -d .planning/phases/*/ 2>/dev/null || true
|
||||
```
|
||||
|
||||
Match phase directories to milestone membership. Only include directories that still exist in `.planning/phases/`.
|
||||
|
||||
@@ -90,7 +90,7 @@ If user selects "Proceed anyway": note incomplete requirements in MILESTONES.md
|
||||
<config-check>
|
||||
|
||||
```bash
|
||||
cat .planning/config.json 2>/dev/null
|
||||
cat .planning/config.json 2>/dev/null || true
|
||||
```
|
||||
|
||||
</config-check>
|
||||
@@ -129,7 +129,7 @@ Calculate milestone statistics:
|
||||
```bash
|
||||
git log --oneline --grep="feat(" | head -20
|
||||
git diff --stat FIRST_COMMIT..LAST_COMMIT | tail -1
|
||||
find . -name "*.swift" -o -name "*.ts" -o -name "*.py" | xargs wc -l 2>/dev/null
|
||||
find . -name "*.swift" -o -name "*.ts" -o -name "*.py" | xargs wc -l 2>/dev/null || true
|
||||
git log --format="%ai" FIRST_COMMIT | tail -1
|
||||
git log --format="%ai" LAST_COMMIT | head -1
|
||||
```
|
||||
@@ -156,6 +156,7 @@ Extract one-liners from SUMMARY.md files using summary-extract:
|
||||
```bash
|
||||
# For each phase in milestone, extract one-liner
|
||||
for summary in .planning/phases/*-*/*-SUMMARY.md; do
|
||||
[ -e "$summary" ] || continue
|
||||
node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" summary-extract "$summary" --fields one_liner --pick one_liner
|
||||
done
|
||||
```
|
||||
@@ -446,7 +447,7 @@ rm .planning/REQUIREMENTS.md
|
||||
|
||||
Check for existing retrospective:
|
||||
```bash
|
||||
ls .planning/RETROSPECTIVE.md 2>/dev/null
|
||||
ls .planning/RETROSPECTIVE.md 2>/dev/null || true
|
||||
```
|
||||
|
||||
**If exists:** Read the file, append new milestone section before the "## Cross-Milestone Trends" section.
|
||||
|
||||
@@ -89,7 +89,7 @@ Exit workflow.
|
||||
Check if CONTEXT.md already exists using `has_context` from init.
|
||||
|
||||
```bash
|
||||
ls ${phase_dir}/*-CONTEXT.md 2>/dev/null
|
||||
ls ${phase_dir}/*-CONTEXT.md 2>/dev/null || true
|
||||
```
|
||||
|
||||
**If exists:**
|
||||
@@ -134,9 +134,9 @@ Read project-level and prior phase context to avoid re-asking decided questions.
|
||||
|
||||
**Step 1: Read project-level files**
|
||||
```bash
|
||||
cat .planning/PROJECT.md 2>/dev/null
|
||||
cat .planning/REQUIREMENTS.md 2>/dev/null
|
||||
cat .planning/STATE.md 2>/dev/null
|
||||
cat .planning/PROJECT.md 2>/dev/null || true
|
||||
cat .planning/REQUIREMENTS.md 2>/dev/null || true
|
||||
cat .planning/STATE.md 2>/dev/null || true
|
||||
```
|
||||
|
||||
Extract from these:
|
||||
@@ -146,7 +146,7 @@ Extract from these:
|
||||
|
||||
**Step 2: Read all prior CONTEXT.md files**
|
||||
```bash
|
||||
find .planning/phases -name "*-CONTEXT.md" 2>/dev/null | sort
|
||||
(find .planning/phases -name "*-CONTEXT.md" 2>/dev/null || true) | sort
|
||||
```
|
||||
|
||||
For each CONTEXT.md where phase number < current phase:
|
||||
@@ -185,7 +185,7 @@ Lightweight scan of existing code to inform assumption generation.
|
||||
|
||||
**Step 1: Check for existing codebase maps**
|
||||
```bash
|
||||
ls .planning/codebase/*.md 2>/dev/null
|
||||
ls .planning/codebase/*.md 2>/dev/null || true
|
||||
```
|
||||
|
||||
**If codebase maps exist:** Read relevant ones (CONVENTIONS.md, STRUCTURE.md, STACK.md). Extract reusable components, patterns, integration points. Skip to Step 3.
|
||||
|
||||
@@ -160,7 +160,7 @@ Exit workflow.
|
||||
Check if CONTEXT.md already exists using `has_context` from init.
|
||||
|
||||
```bash
|
||||
ls ${phase_dir}/*-CONTEXT.md 2>/dev/null
|
||||
ls ${phase_dir}/*-CONTEXT.md 2>/dev/null || true
|
||||
```
|
||||
|
||||
**If exists:**
|
||||
@@ -206,9 +206,9 @@ Read project-level and prior phase context to avoid re-asking decided questions
|
||||
**Step 1: Read project-level files**
|
||||
```bash
|
||||
# Core project files
|
||||
cat .planning/PROJECT.md 2>/dev/null
|
||||
cat .planning/REQUIREMENTS.md 2>/dev/null
|
||||
cat .planning/STATE.md 2>/dev/null
|
||||
cat .planning/PROJECT.md 2>/dev/null || true
|
||||
cat .planning/REQUIREMENTS.md 2>/dev/null || true
|
||||
cat .planning/STATE.md 2>/dev/null || true
|
||||
```
|
||||
|
||||
Extract from these:
|
||||
@@ -219,7 +219,7 @@ Extract from these:
|
||||
**Step 2: Read all prior CONTEXT.md files**
|
||||
```bash
|
||||
# Find all CONTEXT.md files from phases before current
|
||||
find .planning/phases -name "*-CONTEXT.md" 2>/dev/null | sort
|
||||
(find .planning/phases -name "*-CONTEXT.md" 2>/dev/null || true) | sort
|
||||
```
|
||||
|
||||
For each CONTEXT.md where phase number < current phase:
|
||||
@@ -300,7 +300,7 @@ Lightweight scan of existing code to inform gray area identification and discuss
|
||||
|
||||
**Step 1: Check for existing codebase maps**
|
||||
```bash
|
||||
ls .planning/codebase/*.md 2>/dev/null
|
||||
ls .planning/codebase/*.md 2>/dev/null || true
|
||||
```
|
||||
|
||||
**If codebase maps exist:** Read the most relevant ones (CONVENTIONS.md, STRUCTURE.md, STACK.md based on phase type). Extract:
|
||||
@@ -316,12 +316,12 @@ Extract key terms from the phase goal (e.g., "feed" → "post", "card", "list";
|
||||
|
||||
```bash
|
||||
# Find files related to phase goal terms
|
||||
grep -rl "{term1}\|{term2}" src/ app/ --include="*.ts" --include="*.tsx" --include="*.js" --include="*.jsx" 2>/dev/null | head -10
|
||||
grep -rl "{term1}\|{term2}" src/ app/ --include="*.ts" --include="*.tsx" --include="*.js" --include="*.jsx" 2>/dev/null | head -10 || true
|
||||
|
||||
# Find existing components/hooks
|
||||
ls src/components/ 2>/dev/null
|
||||
ls src/hooks/ 2>/dev/null
|
||||
ls src/lib/ src/utils/ 2>/dev/null
|
||||
ls src/components/ 2>/dev/null || true
|
||||
ls src/hooks/ 2>/dev/null || true
|
||||
ls src/lib/ src/utils/ 2>/dev/null || true
|
||||
```
|
||||
|
||||
Read the 3-5 most relevant files to understand existing patterns.
|
||||
|
||||
@@ -27,8 +27,8 @@ If `.planning/` missing: error.
|
||||
<step name="identify_plan">
|
||||
```bash
|
||||
# Use plans/summaries from INIT JSON, or list files
|
||||
ls .planning/phases/XX-name/*-PLAN.md 2>/dev/null | sort
|
||||
ls .planning/phases/XX-name/*-SUMMARY.md 2>/dev/null | sort
|
||||
(ls .planning/phases/XX-name/*-PLAN.md 2>/dev/null || true) | sort
|
||||
(ls .planning/phases/XX-name/*-SUMMARY.md 2>/dev/null || true) | sort
|
||||
```
|
||||
|
||||
Find first PLAN without matching SUMMARY. Decimal phases supported (`01.1-hotfix/`):
|
||||
@@ -467,7 +467,7 @@ If .planning/codebase/ doesn't exist: skip.
|
||||
|
||||
```bash
|
||||
FIRST_TASK=$(git log --oneline --grep="feat({phase}-{plan}):" --grep="fix({phase}-{plan}):" --grep="test({phase}-{plan}):" --reverse | head -1 | cut -d' ' -f1)
|
||||
git diff --name-only ${FIRST_TASK}^..HEAD 2>/dev/null
|
||||
git diff --name-only ${FIRST_TASK}^..HEAD 2>/dev/null || true
|
||||
```
|
||||
|
||||
Update only structural changes: new src/ dir → STRUCTURE.md | deps → STACK.md | file pattern → CONVENTIONS.md | API client → INTEGRATIONS.md | config → STACK.md | renamed → update paths. Skip code-only/bugfix/content changes.
|
||||
@@ -481,8 +481,8 @@ node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" commit "" --files .planning
|
||||
If `USER_SETUP_CREATED=true`: display `⚠️ USER SETUP REQUIRED` with path + env/config tasks at TOP.
|
||||
|
||||
```bash
|
||||
ls -1 .planning/phases/[current-phase-dir]/*-PLAN.md 2>/dev/null | wc -l
|
||||
ls -1 .planning/phases/[current-phase-dir]/*-SUMMARY.md 2>/dev/null | wc -l
|
||||
(ls -1 .planning/phases/[current-phase-dir]/*-PLAN.md 2>/dev/null || true) | wc -l
|
||||
(ls -1 .planning/phases/[current-phase-dir]/*-SUMMARY.md 2>/dev/null || true) | wc -l
|
||||
```
|
||||
|
||||
| Condition | Route | Action |
|
||||
|
||||
@@ -168,7 +168,7 @@ When `--repair` is active, detect and clean up:
|
||||
# Check for stale task directories (older than 24 hours)
|
||||
TASKS_DIR="$HOME/.claude/tasks"
|
||||
if [ -d "$TASKS_DIR" ]; then
|
||||
STALE_COUNT=$(find "$TASKS_DIR" -maxdepth 1 -type d -mtime +1 2>/dev/null | wc -l)
|
||||
STALE_COUNT=$( (find "$TASKS_DIR" -maxdepth 1 -type d -mtime +1 2>/dev/null || true) | wc -l )
|
||||
if [ "$STALE_COUNT" -gt 0 ]; then
|
||||
echo "⚠️ Found $STALE_COUNT stale task directories in ~/.claude/tasks/"
|
||||
echo " These are leftover from crashed subagent sessions."
|
||||
|
||||
@@ -20,6 +20,7 @@ Bootstrap via manager init:
|
||||
|
||||
```bash
|
||||
INIT=$(node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" init manager)
|
||||
if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
||||
```
|
||||
|
||||
Parse JSON for: `milestone_version`, `milestone_name`, `phase_count`, `completed_count`, `in_progress_count`, `phases`, `recommended_actions`, `all_complete`, `waiting_signal`.
|
||||
@@ -53,6 +54,7 @@ Proceed to dashboard step.
|
||||
|
||||
```bash
|
||||
INIT=$(node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" init manager)
|
||||
if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
||||
```
|
||||
|
||||
Parse the full JSON. Build the dashboard display.
|
||||
|
||||
@@ -13,7 +13,7 @@ Find current phase directory from most recently modified files:
|
||||
|
||||
```bash
|
||||
# Find most recent phase directory with work
|
||||
ls -lt .planning/phases/*/PLAN.md 2>/dev/null | head -1 | grep -oP 'phases/\K[^/]+'
|
||||
(ls -lt .planning/phases/*/PLAN.md 2>/dev/null || true) | head -1 | grep -oP 'phases/\K[^/]+' || true
|
||||
```
|
||||
|
||||
If no active phase detected, ask user which phase they're pausing work on.
|
||||
@@ -36,7 +36,7 @@ Ask user for clarifications if needed via conversational questions.
|
||||
**Also inspect SUMMARY.md files for false completions:**
|
||||
```bash
|
||||
# Check for placeholder content in existing summaries
|
||||
grep -l "To be filled\|placeholder\|TBD" .planning/phases/*/*.md 2>/dev/null
|
||||
grep -l "To be filled\|placeholder\|TBD" .planning/phases/*/*.md 2>/dev/null || true
|
||||
```
|
||||
Report any summaries with placeholder content as incomplete items.
|
||||
</step>
|
||||
|
||||
@@ -12,7 +12,7 @@ Read all files referenced by the invoking prompt's execution_context before star
|
||||
|
||||
```bash
|
||||
# Find the most recent audit file
|
||||
ls -t .planning/v*-MILESTONE-AUDIT.md 2>/dev/null | head -1
|
||||
(ls -t .planning/v*-MILESTONE-AUDIT.md 2>/dev/null || true) | head -1
|
||||
```
|
||||
|
||||
Parse YAML frontmatter to extract structured gaps:
|
||||
|
||||
@@ -339,7 +339,7 @@ If `research_enabled` is false and `nyquist_validation_enabled` is true: warn "N
|
||||
In that case: **skip validation-strategy creation entirely**. Do **not** expect `RESEARCH.md` or `VALIDATION.md` for this run, and continue to Step 6.
|
||||
|
||||
```bash
|
||||
grep -l "## Validation Architecture" "${PHASE_DIR}"/*-RESEARCH.md 2>/dev/null
|
||||
grep -l "## Validation Architecture" "${PHASE_DIR}"/*-RESEARCH.md 2>/dev/null || true
|
||||
```
|
||||
|
||||
**If found:**
|
||||
@@ -409,7 +409,7 @@ Otherwise use AskUserQuestion:
|
||||
## 6. Check Existing Plans
|
||||
|
||||
```bash
|
||||
ls "${PHASE_DIR}"/*-PLAN.md 2>/dev/null
|
||||
ls "${PHASE_DIR}"/*-PLAN.md 2>/dev/null || true
|
||||
```
|
||||
|
||||
**If exists AND `--reviews` flag:** Skip prompt — go straight to replanning (the purpose of `--reviews` is to replan with review feedback).
|
||||
|
||||
@@ -86,7 +86,7 @@ Store relevant file paths as `$BREADCRUMBS`.
|
||||
<step name="generate_seed_id">
|
||||
```bash
|
||||
# Find next seed number
|
||||
EXISTING=$(ls .planning/seeds/SEED-*.md 2>/dev/null | wc -l)
|
||||
EXISTING=$( (ls .planning/seeds/SEED-*.md 2>/dev/null || true) | wc -l )
|
||||
NEXT=$((EXISTING + 1))
|
||||
PADDED=$(printf "%03d" $NEXT)
|
||||
```
|
||||
|
||||
@@ -85,7 +85,7 @@ Use this instead of manually reading/parsing ROADMAP.md.
|
||||
- Use `current_phase` and `next_phase` from `$ROADMAP`
|
||||
- Note `paused_at` if work was paused (from `$STATE`)
|
||||
- Count pending todos: use `init todos` or `list-todos`
|
||||
- Check for active debug sessions: `ls .planning/debug/*.md 2>/dev/null | grep -v resolved | wc -l`
|
||||
- Check for active debug sessions: `(ls .planning/debug/*.md 2>/dev/null || true) | grep -v resolved | wc -l`
|
||||
</step>
|
||||
|
||||
<step name="report">
|
||||
@@ -143,9 +143,9 @@ CONTEXT: [✓ if has_context | - if not]
|
||||
List files in the current phase directory:
|
||||
|
||||
```bash
|
||||
ls -1 .planning/phases/[current-phase-dir]/*-PLAN.md 2>/dev/null | wc -l
|
||||
ls -1 .planning/phases/[current-phase-dir]/*-SUMMARY.md 2>/dev/null | wc -l
|
||||
ls -1 .planning/phases/[current-phase-dir]/*-UAT.md 2>/dev/null | wc -l
|
||||
(ls -1 .planning/phases/[current-phase-dir]/*-PLAN.md 2>/dev/null || true) | wc -l
|
||||
(ls -1 .planning/phases/[current-phase-dir]/*-SUMMARY.md 2>/dev/null || true) | wc -l
|
||||
(ls -1 .planning/phases/[current-phase-dir]/*-UAT.md 2>/dev/null || true) | wc -l
|
||||
```
|
||||
|
||||
State: "This phase has {X} plans, {Y} summaries."
|
||||
@@ -156,7 +156,7 @@ Check for UAT.md files with status "diagnosed" (has gaps needing fixes).
|
||||
|
||||
```bash
|
||||
# Check for diagnosed UAT with gaps or partial (incomplete) testing
|
||||
grep -l "status: diagnosed\|status: partial" .planning/phases/[current-phase-dir]/*-UAT.md 2>/dev/null
|
||||
grep -l "status: diagnosed\|status: partial" .planning/phases/[current-phase-dir]/*-UAT.md 2>/dev/null || true
|
||||
```
|
||||
|
||||
Track:
|
||||
|
||||
@@ -26,7 +26,7 @@ If `found` is false: Error and exit.
|
||||
## Step 2: Check Existing Research
|
||||
|
||||
```bash
|
||||
ls .planning/phases/${PHASE}-*/RESEARCH.md 2>/dev/null
|
||||
ls .planning/phases/${PHASE}-*/RESEARCH.md 2>/dev/null || true
|
||||
```
|
||||
|
||||
If exists: Offer update/view/skip options.
|
||||
|
||||
@@ -64,16 +64,17 @@ Look for incomplete work that needs attention:
|
||||
|
||||
```bash
|
||||
# Check for structured handoff (preferred — machine-readable)
|
||||
cat .planning/HANDOFF.json 2>/dev/null
|
||||
cat .planning/HANDOFF.json 2>/dev/null || true
|
||||
|
||||
# Check for continue-here files (mid-plan resumption)
|
||||
ls .planning/phases/*/.continue-here*.md 2>/dev/null
|
||||
ls .planning/phases/*/.continue-here*.md 2>/dev/null || true
|
||||
|
||||
# Check for plans without summaries (incomplete execution)
|
||||
for plan in .planning/phases/*/*-PLAN.md; do
|
||||
[ -e "$plan" ] || continue
|
||||
summary="${plan/PLAN/SUMMARY}"
|
||||
[ ! -f "$summary" ] && echo "Incomplete: $plan"
|
||||
done 2>/dev/null
|
||||
done 2>/dev/null || true
|
||||
|
||||
# Check for interrupted agents (use has_interrupted_agent and interrupted_agent_id from init)
|
||||
if [ "$has_interrupted_agent" = "true" ]; then
|
||||
@@ -215,7 +216,7 @@ What would you like to do?
|
||||
**Note:** When offering phase planning, check for CONTEXT.md existence first:
|
||||
|
||||
```bash
|
||||
ls .planning/phases/XX-name/*-CONTEXT.md 2>/dev/null
|
||||
ls .planning/phases/XX-name/*-CONTEXT.md 2>/dev/null || true
|
||||
```
|
||||
|
||||
If missing, suggest discuss-phase before plan. If exists, offer plan directly.
|
||||
|
||||
@@ -41,8 +41,8 @@ Mark current phase complete and advance to next. This is the natural point where
|
||||
Before transition, read project state:
|
||||
|
||||
```bash
|
||||
cat .planning/STATE.md 2>/dev/null
|
||||
cat .planning/PROJECT.md 2>/dev/null
|
||||
cat .planning/STATE.md 2>/dev/null || true
|
||||
cat .planning/PROJECT.md 2>/dev/null || true
|
||||
```
|
||||
|
||||
Parse current position to verify we're transitioning the right phase.
|
||||
@@ -55,8 +55,8 @@ Note accumulated context that may need updating after transition.
|
||||
Check current phase has all plan summaries:
|
||||
|
||||
```bash
|
||||
ls .planning/phases/XX-current/*-PLAN.md 2>/dev/null | sort
|
||||
ls .planning/phases/XX-current/*-SUMMARY.md 2>/dev/null | sort
|
||||
(ls .planning/phases/XX-current/*-PLAN.md 2>/dev/null || true) | sort
|
||||
(ls .planning/phases/XX-current/*-SUMMARY.md 2>/dev/null || true) | sort
|
||||
```
|
||||
|
||||
**Verification logic:**
|
||||
@@ -69,7 +69,7 @@ ls .planning/phases/XX-current/*-SUMMARY.md 2>/dev/null | sort
|
||||
<config-check>
|
||||
|
||||
```bash
|
||||
cat .planning/config.json 2>/dev/null
|
||||
cat .planning/config.json 2>/dev/null || true
|
||||
```
|
||||
|
||||
</config-check>
|
||||
@@ -151,7 +151,7 @@ Wait for user decision.
|
||||
Check for lingering handoffs:
|
||||
|
||||
```bash
|
||||
ls .planning/phases/XX-current/.continue-here*.md 2>/dev/null
|
||||
ls .planning/phases/XX-current/.continue-here*.md 2>/dev/null || true
|
||||
```
|
||||
|
||||
If found, delete them — phase is complete, handoffs are stale.
|
||||
@@ -429,7 +429,7 @@ Read ROADMAP.md to get the next phase's name and goal.
|
||||
**Check if next phase has CONTEXT.md:**
|
||||
|
||||
```bash
|
||||
ls .planning/phases/*[X+1]*/*-CONTEXT.md 2>/dev/null
|
||||
ls .planning/phases/*[X+1]*/*-CONTEXT.md 2>/dev/null || true
|
||||
```
|
||||
|
||||
**If next phase exists:**
|
||||
|
||||
@@ -37,8 +37,8 @@ Extract from init JSON: `phase_dir`, `phase_number`, `phase_name`, `has_plans`,
|
||||
Then load phase details and list plans/summaries:
|
||||
```bash
|
||||
node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" roadmap get-phase "${phase_number}"
|
||||
grep -E "^| ${phase_number}" .planning/REQUIREMENTS.md 2>/dev/null
|
||||
ls "$phase_dir"/*-SUMMARY.md "$phase_dir"/*-PLAN.md 2>/dev/null
|
||||
grep -E "^| ${phase_number}" .planning/REQUIREMENTS.md 2>/dev/null || true
|
||||
ls "$phase_dir"/*-SUMMARY.md "$phase_dir"/*-PLAN.md 2>/dev/null || true
|
||||
```
|
||||
|
||||
Extract **phase goal** from ROADMAP.md (the outcome to verify, not tasks) and **requirements** from REQUIREMENTS.md if it exists.
|
||||
@@ -171,7 +171,7 @@ Record status and evidence for each key link.
|
||||
<step name="verify_requirements">
|
||||
If REQUIREMENTS.md exists:
|
||||
```bash
|
||||
grep -E "Phase ${PHASE_NUM}" .planning/REQUIREMENTS.md 2>/dev/null
|
||||
grep -E "Phase ${PHASE_NUM}" .planning/REQUIREMENTS.md 2>/dev/null || true
|
||||
```
|
||||
|
||||
For each requirement: parse description → identify supporting truths/artifacts → status: ✓ SATISFIED / ✗ BLOCKED / ? NEEDS HUMAN.
|
||||
|
||||
@@ -35,7 +35,7 @@ Parse JSON for: `planner_model`, `checker_model`, `commit_docs`, `phase_found`,
|
||||
**First: Check for active UAT sessions**
|
||||
|
||||
```bash
|
||||
find .planning/phases -name "*-UAT.md" -type f 2>/dev/null | head -5
|
||||
(find .planning/phases -name "*-UAT.md" -type f 2>/dev/null || true) | head -5
|
||||
```
|
||||
|
||||
**If active sessions exist AND no $ARGUMENTS provided:**
|
||||
@@ -84,7 +84,7 @@ Continue to `create_uat_file`.
|
||||
Use `phase_dir` from init (or run init if not already done).
|
||||
|
||||
```bash
|
||||
ls "$phase_dir"/*-SUMMARY.md 2>/dev/null
|
||||
ls "$phase_dir"/*-SUMMARY.md 2>/dev/null || true
|
||||
```
|
||||
|
||||
Read each SUMMARY.md to extract testable deliverables.
|
||||
|
||||
Reference in New Issue
Block a user