open-gsd/gsd-pi/gsd-headless
Claude Code and agent skill by open-gsd/gsd-pi
- community
Checking that the SKILL.md file is still in the repository.
Orchestrate GSD (Git Ship Done) projects programmatically via headless CLI. Use when an agent needs to create milestones from specs, execute dev workflows, monitor progress, check status, or control execution (pause/stop/skip/steer). Triggers on "run gsd", "create milestone", "execute project", "check gsd status", "orchestrate development", "run headless workflow", or building orchestrators that coordinate multiple GSD workers.
Install
npx vskill@latest install open-gsd/gsd-pi/gsd-headlessSKILL.md
The same SKILL.md was published earlier as open-gsd/gsd-pi/gsd-headless.
GSD Headless Orchestration
Run GSD commands without TUI via gsd headless. Spawns an RPC child process, auto-responds to UI prompts, streams progress.
Command Syntax
Flags:
--timeout N— overall timeout in ms;autohas no overall timeout unless this flag is set--json— JSONL event stream ending with the authoritativeheadless_result--model ID— override LLM model--thinking LEVEL— override thinking level (off,minimal,low,medium,high,xhigh,max)--resume <id>— resume a prior headless session by ID--bare— start with minimal context for CI/ecosystem use--verbose— show tool calls in progress output--supervised— forward interactive UI requests to orchestrator via stdout/stdin--response-timeout N— timeout for orchestrator response in supervised mode (default 30000)--max-restarts N— auto-restart on crash with backoff (default 3, 0 to disable)--answers <path>— pre-supply answers and secrets from JSON file--events <types>— filter JSONL output to specific event types (comma-separated, implies--json)
Exit codes: 0=complete, 1=error/timeout, 10=blocked, 11=cancelled
Core Workflows
1. Create + Execute a Milestone (end-to-end)
Reads spec, bootstraps .gsd/, creates milestone, then chains into auto-mode executing all phases (discuss → research → plan → execute → summarize → complete).
Extra flags for new-milestone: --context <path> (use - for stdin), --context-text <text>, --auto.
2. Run All Queued Work
Default command. Loops through all pending units until milestone complete or blocked.
3. Run One Unit
Execute exactly one unit (task/slice/milestone step), then exit. Ideal for step-by-step orchestration with external decision logic between steps.
4. Instant State Snapshot (no LLM)
Returns a single JSON object with the full project snapshot — no LLM session, instant (~50ms). This is the recommended way for orchestrators to inspect state.
5. Dispatch Specific Phase
Force-route to a specific phase, bypassing normal state-machine routing.
Orchestrator Patterns
Poll-and-React Loop
Step-by-Step with Monitoring
Multi-Session Orchestration
GSD tracks concurrent workers via status files in .gsd/parallel/. See references/multi-session.md for the full architecture.
Quick overview:
Each worker spawns with GSD_MILESTONE_LOCK=M00X + its own git worktree. Workers write heartbeats to .gsd/parallel/<milestoneId>.status.json. The orchestrator enumerates all status files to get a dashboard of all workers.
Status file fields: milestoneId, pid, state (running/paused/stopped/error), currentUnit, completedUnits, cost, lastHeartbeat, startedAt, worktreePath.
Worker commands: pause, resume and stop are command_queue rows in the project database. The coordinator writes them (/gsd parallel pause|resume|stop). An external orchestrator stops a worker with SIGTERM. A signal file .gsd/parallel/<milestoneId>.signal.json is still accepted for compatibility and is deprecated: the worker turns it into a command_queue row and removes the file.
Liveness detection: PID alive check (kill -0 $pid) + heartbeat freshness (30s timeout). Stale sessions are auto-cleaned.
For multiple projects: each project has its own .gsd/ directory. The orchestrator must track (projectPath, milestoneId) tuples externally.
JSONL Event Stream
Use --json to get real-time events on stdout for downstream processing:
Event types: agent_start, agent_end, tool_execution_start, tool_execution_end, extension_ui_request, message_update, error.
Filtered Event Stream
Use --events to receive only specific event types — reduces noise for orchestrators:
The filter applies only to stdout output. Internal processing (completion detection, supervised mode, answer injection) is unaffected — all events are still processed internally.
Available event types: agent_start, agent_end, tool_execution_start, tool_execution_end, tool_execution_update, extension_ui_request, message_start, message_end, message_update, turn_start, turn_end.
Answer Injection
Pre-supply answers and secrets for headless runs via --answers:
Answer file schema:
- questions — question ID → answer (string or string[])
- secrets — env var → value, injected into child process env
- defaults.strategy —
"first_option"(default) or"cancel"for unmatched
See references/answer-injection.md for full details.
GSD Project Structure
All state lives in .gsd/ as markdown files (version-controllable):
Runtime state is stored in the project-root database; markdown files are reviewable projections written under .gsd/phases/. Legacy projects may still resolve to .gsd/milestones/<MID>/ until migrated.
All Headless Commands
Quick reference — see references/commands.md for the complete list.
| Command | Purpose | |
|---|---|---|
auto | Run all queued units (default) | |
next | Run one unit | |
query | Instant JSON snapshot — state, next dispatch, costs (no LLM) | |
new-milestone | Create milestone from spec | |
queue | Queue/reorder milestones | |
history | View execution history | |
stop / pause | Control auto-mode | |
dispatch <phase> | Force specific phase | |
skip / undo | Unit control | |
doctor | Health check + auto-fix | |
steer <desc> | Hard-steer plan mid-execution | |
explore / spike / sketch | Prompt-driven ideation and experiment workflows | |
map-codebase / docs-update / graphify | Codebase documentation and knowledge workflows | |
code-review / review / audit-* / verify-work | Review, audit, and UAT workflows |
Security
- Security scanPassed, 96 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingsrc/resources/extensions/gsd/skills/gsd-headless/SKILL.md
Popularity
- Repository stars
- 1,381
- Repository forks
- 119
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/open-gsd/gsd-pi/gsd-headless)