* test(#2692): add behavioral --wave N test, annotate source-text assertions Adds two behavioral tests for wave filtering via phase-plan-index: - Verifies plans with wave frontmatter are correctly grouped by wave number - Verifies plans with no wave field default to wave 1 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(#2684,#2676): milestone.complete version validation + parallel milestone phase routing #2684: Confirms milestone.complete correctly validates and uses its version argument end-to-end. The inline archive path in milestoneComplete already forwarded version correctly; regression tests lock in that contract. #2676: phase.complete applied getMilestonePhaseFilter unconditionally, using STATE.md's primary milestone to scope the candidate set. When the completed phase belongs to a parallel (secondary) milestone, the filter excluded all phases from that milestone, leaving an empty candidate set and incorrectly returning is_last_phase: true / next_phase: null. Fix: before applying the milestone filter in Step E, check whether the completed phase itself appears in the filtered set. If not, skip the filter for both the directory scan and the ROADMAP.md fallback so phases from the secondary milestone remain visible for next-phase detection. Closes #2684 Closes #2676 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
@gsd-build/sdk
TypeScript SDK for Get Shit Done: deterministic query/mutation handlers, plan execution, and event-stream telemetry so agents focus on judgment, not shell plumbing.
Install
npm install @gsd-build/sdk
Quickstart — programmatic
import { GSD, createRegistry } from '@gsd-build/sdk';
const gsd = new GSD({ projectDir: process.cwd(), sessionId: 'my-run' });
const tools = gsd.createTools();
const registry = createRegistry(gsd.eventStream, 'my-run');
const { data } = await registry.dispatch('state.json', [], process.cwd());
Quickstart — CLI
From a project that depends on this package, invoke the CLI with Node (recommended in CI and local dev):
node ./node_modules/@gsd-build/sdk/dist/cli.js query state.json
node ./node_modules/@gsd-build/sdk/dist/cli.js query roadmap.analyze
If no native handler is registered for a command, the CLI can transparently shell out to get-shit-done/bin/gsd-tools.cjs (see stderr warning), unless GSD_QUERY_FALLBACK=off.
What ships
| Area | Entry |
|---|---|
| Query registry | createRegistry() in src/query/index.ts — same handlers as gsd-sdk query |
| Tools bridge | GSDTools — native dispatch with optional CJS subprocess fallback |
| Orchestrators | PhaseRunner, InitRunner, GSD |
| CLI | gsd-sdk — query, run, init, auto |
Guides
- Handler registry & contracts:
src/query/QUERY-HANDLERS.md - Repository docs (when present):
docs/ARCHITECTURE.md,docs/CLI-TOOLS.mdat repo root
Environment
| Variable | Purpose |
|---|---|
GSD_QUERY_FALLBACK |
off / never disables CLI fallback to gsd-tools.cjs for unknown commands |
GSD_AGENTS_DIR |
Override directory scanned for installed GSD agents (~/.claude/agents by default) |