An autonomous, long-running AI coding agent system built on meta-prompting and context engineering, enabling unattended full-stack software delivery through a Milestone → Slice → Task hierarchy and disk-based state machine.
GSD 2 (npm package: gsd-pi) is an autonomous, long-running AI coding agent system developed by Lex Christopherson. Written in TypeScript, it runs on Node.js ≥ 22.0.0, currently at version 2.77.0 under the MIT license.
Core Design Philosophy The project is built on three pillars: meta-prompting, context engineering, and spec-driven development. Its core innovation lies in strictly decomposing software development into Task units that fit within a single context window, driven by a disk-based file state machine, fundamentally solving the problem of AI agents losing global vision during long tasks.
Work Hierarchy Adopts a three-tier Milestone → Slice → Task structure: Milestone corresponds to a releasable version (4-10 slices), Slice corresponds to a demonstrable vertical capability (1-7 tasks), and Task is a single-context-window work unit. Iron rule: a task must fit in one context window, or it is forcibly split. The execution cycle is Plan → Execute → Complete → Reassess Roadmap → Next Slice → Validate Milestone → Complete Milestone.
Execution Modes
Provides Auto Mode (/gsd auto, fully unattended) and Step Mode (/gsd//gsd next, step-by-step). Each task receives a fresh context window; dispatch prompts inline task plans, slice plans, previous task summaries, dependency summaries, roadmap excerpts, and decision records. v2.77 adds Context Mode for automatic task-ready context construction.
Robustness Crash recovery tracks the current unit via lock files, restoring from disk state on session interruption with forensic data; stuck detection uses sliding windows to identify repeated dispatch patterns; timeout supervision has three tiers (soft warning, idle watchdog, hard pause); provider errors are classified as transient (auto-retry) or permanent (pause for human review); Headless mode supports auto-restart with exponential backoff.
Engineering Capabilities Git strategy supports worktree/branch/none isolation modes with squash merge on milestone completion; verification execution supports configurable shell commands with auto-fix retry and milestone gate validation; cost management captures tokens and costs by stage/slice/model with budget caps and dynamic model routing; supports multi-worker parallel milestone orchestration.
Implementation Details
Built on Pi SDK with npm workspaces monorepo architecture, esbuild + TypeScript toolchain, sql.js (SQLite WASM) for local persistence, platform-specific native binaries in native/ via koffi FFI bindings, and five-tier test coverage (unit/integration/fixture/live regression/smoke).
Extensions & Integrations Built-in extensions include subagent, github-sync, voice, mcp-client, remote-questions, browser-tools, google-search, and more; supports MCP protocol integration; offers a VS Code extension (chat participant + sidebar dashboard); Web UI for browser-based project management; Docker sandbox for isolated execution; skill system with auto-detection and custom authoring; decision routing to Slack/Discord.
Supported Model Providers Anthropic Claude, OpenAI, Google Gemini, Mistral, AWS Bedrock, Ollama, vLLM, LM Studio, and custom proxy endpoints.
Installation & Quick Start
npm install -g gsd-pi@latest
/gsd init
/gsd auto # Autonomous mode
/gsd # Step mode
Unconfirmed Items
Pi SDK lacks a public independent repo or docs; mintlify-docs/ suggests a docs site but no deployed URL found; Web UI has no public demo; RTK (Real-Time Kernel) external documentation not located.