A structured workflow system for Claude Code that brings disciplined project planning, phase-based execution, and progress tracking to your AI-assisted development sessions.
GSD transforms how you work with Claude Code by introducing a systematic approach to project development:
- Plan before you code - Break projects into phases with clear objectives
- Execute with focus - Work through one phase at a time with full context
- Track everything - Automatic progress tracking and session management
- Version control aware - Seamless integration with Git and Mercurial
- Phase-based planning - Structure work into logical phases with dependencies
- VCS abstraction - Works with both Git and Mercurial through unified interface
- Progress tracking - Real-time visibility into completed and remaining work
- Session management - Pause and resume work with full context preservation
- Multi-project support - Manage multiple projects simultaneously
- Codebase mapping - Automatic discovery of project structure
- Quick mode - Fast-track simple tasks without full planning overhead
- Verification system - Validate completed work against phase requirements
git clone https://github.com/b-r-a-n/gsd-claude.git ~/.claude/commands/gsd
cd ~/.claude/commands/gsd
./install.sh- Claude Code - Anthropic's CLI for Claude
- Bash 3.2+ - Works with macOS default bash (4.0+ recommended)
- Git or Mercurial - At least one version control system
- shasum - For checksum verification (usually pre-installed)
GSD runs shell scripts and git commands that may trigger Claude Code permission prompts. To run without prompts, add these permissions to your Claude Code settings:
Quick setup - Add to ~/.claude/settings.json:
{
"permissions": {
"allow": [
"Bash(~/.claude/commands/gsd/**)",
"Bash(git status*)",
"Bash(git add*)",
"Bash(git commit*)",
"Bash(git log*)",
"Bash(git diff*)",
"Bash(git rev-parse*)",
"Read(~/.claude/planning/**)",
"Write(~/.claude/planning/**)"
]
}
}For detailed setup options including per-project configuration, see docs/PERMISSIONS.md.
Pre-made templates are available in docs/settings-global.json and docs/settings-project.json.
/gsd:commands:new-project
Follow the prompts to name your project and describe what you're building.
/gsd:commands:plan-phase 1
Define what needs to be accomplished in phase 1, including objectives, deliverables, and success criteria.
/gsd:commands:execute-phase
Claude will work through the phase systematically, tracking progress as tasks are completed.
/gsd:commands:progress
See what's been completed and what remains.
| Command | Description |
|---|---|
/gsd:commands:new-project |
Create a new GSD project with planning structure |
/gsd:commands:set-project |
Switch active project context |
/gsd:commands:list-projects |
Show all GSD projects |
/gsd:commands:discover-projects |
Scan directory for potential projects |
/gsd:commands:map-codebase |
Analyze and document codebase structure |
/gsd:commands:plan-phase |
Plan objectives and tasks for a phase |
/gsd:commands:execute-phase |
Execute the current phase with tracking |
/gsd:commands:verify-work |
Validate completed work against requirements |
/gsd:commands:progress |
Display current progress and status |
/gsd:commands:pause-work |
Save session state for later resumption |
/gsd:commands:resume-work |
Restore previous session context |
/gsd:commands:quick |
Quick mode for simple, single-session tasks |
- QUICKSTART.md - 5-minute getting started guide
- agents/ - Agent behavior definitions
- commands/ - Command specifications
- scripts/ - Core shell utilities
~/.claude/commands/gsd/
├── adapters/ # VCS adapters (git, hg)
├── agents/ # Agent behavior specifications
├── commands/ # Command definitions (.md files)
├── scripts/ # Shell utilities
├── install.sh # Installation script
├── uninstall.sh # Uninstallation script
├── verify.sh # Verification script
├── README.md # This file
└── QUICKSTART.md # Quick start guide
~/.claude/planning/
├── projects/ # Project-specific planning data
│ └── <project>/
│ ├── project.yml
│ ├── phases/
│ ├── progress/
│ └── sessions/
└── repos/ # Repo-scoped state (for session isolation)
└── <repo-hash>/
└── current-project
GSD uses a layered architecture that separates persistent planning from runtime execution:
┌─────────────────────────────────────────────────────────────────┐
│ GSD LAYER │
│ (Persistence, Phases, Verification, VCS, Multi-project) │
├─────────────────────────────────────────────────────────────────┤
│ PLAN.md │ STATE.md │ VERIFICATION.md │
│ (Phase design) │ (Audit trail) │ (Quality check) │
└─────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ NATIVE TASK API LAYER │
│ (Runtime task management during execution) │
├─────────────────────────────────────────────────────────────────┤
│ TaskCreate │ TaskUpdate │ TaskList / TaskGet │
│ (Register tasks) │ (Track status) │ (Query progress) │
└─────────────────────────────────────────────────────────────────┘
Key Principle: GSD provides the persistent planning and verification layer; Claude's native Task API provides runtime execution tracking. The Task API is the sole source of truth for task status during execution.
-
Project Initialization - GSD creates a planning structure for your project under
~/.claude/planning/projects/ -
Phase Planning - You define phases with clear objectives, deliverables, and success criteria. Tasks are registered with Claude's Task API.
-
Execution - During execution, the Task API tracks task status. GSD coordinates execution and maintains context.
-
Verification - After execution, verify that deliverables meet the defined criteria
-
Session Management - Pause work at any time and resume with full context restoration
When running multiple Claude sessions simultaneously, you can use the GSD_PROJECT environment variable to isolate each session to a specific project:
GSD_PROJECT=my-project claudePriority order for project detection:
GSD_PROJECTenvironment variable (highest priority)- Repo-scoped
current-projectfile (in~/.claude/planning/repos/<hash>/) - Auto-select if exactly one project exists for the current repo
- Most recently active project for this repo (by
last-activetimestamp) - Most recent commit with
[project]tag
This allows you to have multiple terminals working on different projects without interference.
GSD is designed for safe concurrent usage by multiple Claude instances.
All state file operations (STATE.md, repo-scoped current-project) use file locking to prevent race conditions:
- Linux: Uses
flockfor advisory locking - macOS: Uses a custom lock file mechanism for compatibility
Critical file updates use the "write-to-temp-then-rename" pattern:
- Write new content to a temporary file
- Atomically rename temp file to target path
This prevents partial writes and ensures file integrity.
For concurrent work on different projects:
- Use
GSD_PROJECTenvironment variable (recommended) - Or run
/gsd:commands:set-projectin each session
- Multiple sessions working on different projects simultaneously
- Multiple sessions working on different waves of the same phase
- Running
verify.shconcurrently
- Use
GSD_PROJECT=<name>when launching sessions that work on different projects - Coordinate wave execution when multiple sessions work on the same project
- Commits are tagged with
[project-name]for traceability
For detailed testing procedures, see docs/CONCURRENCY-TESTING.md.
MIT License - See LICENSE for details.
Contributions welcome! Please read the existing code style and submit pull requests for any improvements.