Skip to main content

System Design

GSD is a context engineering and meta-prompting system built on a foundation of specialized agents, structured artifacts, and wave-based execution. The architecture prioritizes:
  • Context efficiency — Orchestrators stay lean (~10-15%), subagents get fresh 200K contexts
  • Modular workflows — Each workflow is independent, composable, and resumable
  • State persistence — Every decision, position, and blocker tracked across sessions
  • Parallel execution — Independent work runs simultaneously via wave coordination

Core Principles

Orchestrator Pattern: Thin coordinators spawn specialized agents. The orchestrator NEVER does heavy lifting — it discovers, routes, waits, and integrates results.
Context degradation awareness: Claude’s quality drops as context fills: GSD keeps orchestrators lean and spawns fresh subagents to avoid degradation.

Directory Structure

Source Repository (get-shit-done/)

Agent Definitions (agents/)

Project Artifacts (.planning/)

Created in each user project:
Size Constraints: Every file has limits based on where Claude’s quality degrades:
  • STATE.md: Under 100 lines (digest, not archive)
  • PLAN.md: 2-3 tasks max (complete within ~50% context)
  • SUMMARY.md: Under 200 lines

File Organization

Separation of Concerns

Context Loading Strategy

Orchestrators load:
  • STATE.md (always first — current position)
  • Workflow-specific templates (inline via @-references)
  • CLI tool JSON output (parsed for routing decisions)
Agents load:
  • Plan or task definition (their assignment)
  • PROJECT.md + STATE.md (project context)
  • CONTEXT.md (user decisions for that phase)
  • References as needed (verification patterns, questioning techniques)
Why @-references? Claude Code’s @ syntax loads files directly into context without orchestrator parsing. This keeps orchestrator code minimal and context usage low.

Workflow Composition

Every GSD command follows the same pattern:
Workflows compose via routing:
  • /gsd:plan-phase → spawns researchers → spawns planner → spawns plan-checker → loops if fails
  • /gsd:execute-phase → spawns executors (parallel waves) → spawns verifier
  • /gsd:verify-work → UAT loop → spawns debuggers for failures → spawns planner for fixes

CLI Tools Architecture

Node.js utilities (bin/gsd-tools.cjs) handle:
  • State queries: Current phase, plan inventory, requirement traceability
  • State mutations: Mark phase complete, add decision, update roadmap
  • Git integration: Atomic commits, branch management, tag releases
  • Config management: Model profiles, workflow toggles, granularity settings
Why Node.js? Cross-platform (Mac, Windows, Linux), JSON I/O, filesystem operations, git bindings. Bash would fragment across platforms.
Key modules:

Data Flow

Extension Points

Adding a New Workflow

  1. Create workflows/your-command.md
  2. Follow orchestrator pattern (load STATE, spawn agents, collect results)
  3. Update CLI tool if new state mutations needed
  4. Register in command index

Adding a New Agent

  1. Create agents/gsd-your-agent.md
  2. Define frontmatter: name, description, tools, skills
  3. Document role, context reading requirements, output format
  4. Spawn via Task(subagent_type="gsd-your-agent", ...)

Adding a New Template

  1. Create templates/your-template.md
  2. Use {{variable}} placeholders
  3. Document purpose, lifecycle, size constraints
  4. Reference via @~/.claude/get-shit-done/templates/your-template.md
GSD’s architecture is deliberately simple. No databases, no servers, no external dependencies. Just markdown files, git, and Claude.

Performance Characteristics

Context efficiency:
  • Orchestrator: 10-15% context usage (stays responsive)
  • Agents: Fresh 200K each (peak quality for heavy lifting)
Parallelization:
  • Research: 4 agents simultaneously
  • Execution: N plans per wave (independent work)
  • Mapping: 4-7 agents for brownfield analysis
Session continuity:
  • /clear between major operations (context stays fresh)
  • STATE.md restored instantly via /gsd:resume-work
  • Plans executable in any order (dependency-aware but stateless)

Next Steps

Agent System

Deep dive into agent roles and orchestration patterns

Wave Execution

How parallel execution with dependencies works

State Management

STATE.md, decision tracking, session continuity

Security

Protecting sensitive files and deny list setup