Loading...
Loading...
Build software products autonomously via GSD headless mode. Handles the full lifecycle: write a spec, launch a build, poll for completion, handle blockers, track costs, and verify the result. Use when asked to "build something", "create a project", "run gsd", "check build status", or any task that requires autonomous software development via subprocess.
npx skill4agent add gsd-build/gsd-2 gsd-orchestratorgsd headless ... new-milestone --context spec.md --autogsd headless [--flags] [command] [args]2>/dev/nullqueryautocost.total.gsd/workflows/build-from-spec.mdworkflows/monitor-and-poll.mdworkflows/step-by-step.mdreferences/json-result.mdreferences/answer-injection.mdreferences/commands.mdmkdir -p /tmp/my-project && cd /tmp/my-project && git init
cat > spec.md << 'EOF'
# Your Product Spec Here
Build a ...
EOF
gsd headless --output-format json --context spec.md new-milestone --auto 2>/dev/nullcd /path/to/project
gsd headless query | jq '{phase: .state.phase, progress: .state.progress, cost: .cost.total}'cd /path/to/project
gsd headless --output-format json auto 2>/dev/nullRESULT=$(gsd headless --output-format json next 2>/dev/null)
echo "$RESULT" | jq '{status: .status, phase: .phase, cost: .cost.total}'| Code | Meaning | Your action |
|---|---|---|
| Success | Check deliverables, verify output, report completion |
| Error or timeout | Inspect stderr, check |
| Blocked | Query state for blocker details, steer around it or escalate to human |
| Cancelled | Process was interrupted — resume with |
| </exit_codes> |
.gsd/.gsd/
PROJECT.md # What this project is
REQUIREMENTS.md # Capability contract
DECISIONS.md # Architectural decisions (append-only)
KNOWLEDGE.md # Persistent project knowledge (patterns, rules, lessons)
STATE.md # Current phase and next action
milestones/
M001-xxxxx/
M001-xxxxx-CONTEXT.md # Scope, constraints, assumptions
M001-xxxxx-ROADMAP.md # Slices with checkboxes
M001-xxxxx-SUMMARY.md # Completion summary
slices/S01/
S01-PLAN.md # Tasks
S01-SUMMARY.md # Slice summary
tasks/
T01-PLAN.md # Individual task spec
T01-SUMMARY.md # Task completion summarygsd headless --answers answers.json --output-format json auto 2>/dev/null{
"questions": { "question_id": "selected_option" },
"secrets": { "API_KEY": "sk-..." },
"defaults": { "strategy": "first_option" }
}"first_option""cancel"references/answer-injection.mdgsd headless --json auto 2>/dev/null | while read -r line; do
TYPE=$(echo "$line" | jq -r '.type')
case "$TYPE" in
tool_execution_start) echo "Tool: $(echo "$line" | jq -r '.toolName')" ;;
extension_ui_request) echo "GSD: $(echo "$line" | jq -r '.message // .title // empty')" ;;
agent_end) echo "Session ended" ;;
esac
done--events agent_end,execution_complete,extension_ui_requestagent_startagent_endtool_execution_starttool_execution_endtool_execution_updateextension_ui_requestmessage_startmessage_endmessage_updateturn_startturn_endcost_updateexecution_complete| Command | Purpose |
|---|---|
| Run all queued units until milestone complete or blocked (default) |
| Run exactly one unit, then exit |
| Instant JSON snapshot — state, next dispatch, costs (no LLM, ~50ms) |
| Create milestone from spec file |
| Force specific phase (research, plan, execute, complete, reassess, uat, replan) |
| Control auto-mode |
| Hard-steer plan mid-execution |
| Unit control |
| Queue/reorder milestones |
| View execution history |
| Health check + auto-fix |
| Add persistent project knowledge |
references/commands.md