* fix(#2636): surface gsd-sdk query failures and add workflow↔handler parity check Root cause: workflows invoked `gsd-sdk query agent-skills <slug>` with a trailing `2>/dev/null`, swallowing stderr and exit code. When the installed `@gsd-build/sdk` npm was stale (pre-query), the call resolved to an empty string and `agent_skills.<slug>` config was never injected into spawn prompts — silently. The handler exists on main (sdk/src/query/skills.ts), so this is a publish-drift + silent-fallback bug, not a missing handler. Fix: - Remove bare `2>/dev/null` from every `gsd-sdk query agent-skills …` invocation in workflows so SDK failures surface to stderr. - Apply the same rule to other no-fallback calls (audit-open, write-profile, generate-* profile handlers, frontmatter.get in commands). Best-effort cleanup calls (config-set workflow._auto_chain_active false) keep exit-code forgiveness via `|| true` but no longer suppress stderr. Parity tests: - New: tests/bug-2636-gsd-sdk-query-silent-swallow.test.cjs — fails if any `gsd-sdk query agent-skills … 2>/dev/null` is reintroduced. - Existing: tests/gsd-sdk-query-registry-integration.test.cjs already asserts every workflow noun resolves to a registered handler; confirmed passing post-change. Note: npm republish of @gsd-build/sdk is a separate release concern and is not included in this PR. * fix(#2636): address review — restore broken markdown fences and shell syntax The previous commit's mass removal of '2>/dev/null' suffixes also collapsed adjacent closing code fences and 'fi' tokens onto the command line, producing malformed markdown blocks and 'truefi' / 'true fi' shell syntax errors in the workflows. Repaired sites: - commands/gsd/quick.md, thread.md (frontmatter.get fences) - workflows/complete-milestone.md (audit-open fence) - workflows/profile-user.md (write-profile + generate-* fences) - workflows/verify-work.md (audit-open --json fence) - workflows/execute-phase.md (truefi -> true / fi) - workflows/plan-phase.md, discuss-phase-assumptions.md, discuss-phase/modes/chain.md (true fi -> true / fi) All 5450 tests pass.
2.1 KiB
2.1 KiB
Research how to implement a phase. Spawns gsd-phase-researcher with phase context.
Standalone research command. For most workflows, use /gsd:plan-phase which integrates research automatically.
<available_agent_types> Valid GSD subagent types (use exact names — do not fall back to 'general-purpose'):
- gsd-phase-researcher — Researches technical approaches for a phase </available_agent_types>
Step 0: Resolve Model Profile
@~/.claude/get-shit-done/references/model-profile-resolution.md
Resolve model for:
gsd-phase-researcher
Step 1: Normalize and Validate Phase
@~/.claude/get-shit-done/references/phase-argument-parsing.md
PHASE_INFO=$(gsd-sdk query roadmap.get-phase "${PHASE}")
If found is false: Error and exit.
Step 2: Check Existing Research
ls .planning/phases/${PHASE}-*/RESEARCH.md 2>/dev/null || true
If exists: Offer update/view/skip options.
Step 3: Gather Phase Context
INIT=$(gsd-sdk query init.phase-op "${PHASE}")
if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
# Extract: phase_dir, padded_phase, phase_number, state_path, requirements_path, context_path
AGENT_SKILLS_RESEARCHER=$(gsd-sdk query agent-skills gsd-phase-researcher)
Step 4: Spawn Researcher
Task(
prompt="<objective>
Research implementation approach for Phase {phase}: {name}
</objective>
<files_to_read>
- {context_path} (USER DECISIONS from /gsd:discuss-phase)
- {requirements_path} (Project requirements)
- {state_path} (Project decisions and history)
</files_to_read>
${AGENT_SKILLS_RESEARCHER}
<additional_context>
Phase description: {description}
</additional_context>
<output>
Write to: .planning/phases/${PHASE}-{slug}/${PHASE}-RESEARCH.md
</output>",
subagent_type="gsd-phase-researcher",
model="{researcher_model}"
)
Step 5: Handle Return
## RESEARCH COMPLETE— Display summary, offer: Plan/Dig deeper/Review/Done## CHECKPOINT REACHED— Present to user, spawn continuation## RESEARCH INCONCLUSIVE— Show attempts, offer: Add context/Try different mode/Manual