gsd-2
A powerful meta-prompting, context engineering and spec-driven development system that enables agents to work for long periods of time autonomously without losing track of the big picture
A CLI tool that runs an AI coding agent autonomously on your project, working through a structured task list, managing git branches, tracking token usage, and recovering from crashes, all without you sitting at the keyboard.
GSD 2 is a command-line tool that runs an AI coding agent on your software project and lets it work through a long list of tasks without you sitting at the keyboard. You describe what you want built as a structured plan (the project calls this a roadmap of milestones and slices), then run one command and walk away. The agent works through each task, commits its changes to git as it goes, and stops when the plan is done.
The earlier version of this project was a prompt framework that gave instructions to Claude Code, asking the AI to follow certain habits. This version is different: it sits outside the AI and directly controls how the session runs. It manages which files are loaded into the AI's context for each task, clears the context between tasks to avoid confusion, tracks how many tokens and dollars the session has spent, detects when the agent appears stuck in a loop, and recovers from crashes. The README describes this as going from asking the AI to do things to actually controlling how it runs.
The tool handles git branching automatically during a session. Each milestone or unit of work gets its own branch, and completed work is merged as the session progresses, leaving a clean history. If a session crashes mid-task, GSD 2 can resume from where it left off, detecting leftover lock files and unregistered milestones and reconciling them before continuing.
There is also a built-in terminal dashboard that shows what the agent is doing in real time, including progress through the roadmap, token usage, and whether any recovery steps are running. The tool installs as a global npm package with one command and works on macOS, Linux, and Windows.
GSD 2 is written in TypeScript and is open source under the MIT license. The full README is longer than what was shown.
Where it fits
- Set up a multi-task coding roadmap and let an AI agent build features automatically while you step away
- Monitor an autonomous AI coding session with a real-time dashboard showing task progress and token costs
- Resume a crashed AI coding session from the exact task where it failed using built-in recovery