* fix(#21): add YAML frontmatter to STATE.md File Template sections Both template files (get-shit-done/templates/state.md and sdk/prompts/templates/state.md) lacked a YAML frontmatter block in their File Template section. When an AI agent creates .planning/STATE.md from the template, the file had no frontmatter until the first state.* mutation ran syncStateFrontmatter — leaving the init→first-write window with nothing for frontmatter consumers (current_phase, status, progress.*) to read. Adds a minimal frontmatter block with gsd_state_version, status, and a zeroed progress skeleton matching the shape buildStateFrontmatter produces. syncStateFrontmatter will replace these placeholders on the first state write. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(#21): bump lint-test-file-count state ceiling for bug-21 test Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * chore(#21): add changeset fragment for STATE.md template frontmatter fix Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(#21): address review — dual-template equality guard, progress schema assertion, version annotation - Add inline comment to gsd_state_version in both templates documenting that syncStateFrontmatter overwrites the value on first state.* call - Sync sdk/prompts/templates/state.md File Template block to match get-shit-done/templates/state.md (add Deferred Items section, fix Pending Todos blurb) — templates were diverged - Add parseFrontmatter() helper to test file for value-aware parsing - Add per-template test: progress.total_plans === 0 and progress.completed_plans === 0 - Add cross-template byte-equality assertion to catch future drift - Add note to parseFrontmatterKeys that it does not handle list-valued fields Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
@opengsd/gsd-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 @opengsd/gsd-sdk
Quickstart — programmatic
import { GSD, createRegistry } from '@opengsd/gsd-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/@opengsd/gsd-sdk/dist/cli.js query state.json
node ./node_modules/@opengsd/gsd-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) |