[Case study]2026

From a ticket to a reviewed PR, in any project

Role
Design & engineering
Year
2026
Type
Developer tooling · Claude Code agents
Status
In use, not published yet
gaia.mp4 · 0:56

( Overview )

Gaia is a software factory that runs on Claude Code. Give it a ticket key and it hands back pull requests that are planned, implemented in isolated worktrees, green on your gates, reviewed by a second agent and linked to the ticket. It also turns a PM's spec into well-formed tickets. A human always merges.

[01]/ The problem

An agent can write a fix in minutes. Getting it to a mergeable PR is everything else: reading the ticket right, touching the right repos, passing the gates, opening a clean PR, answering review and CI, and linking it all back to the tracker.

Doing that safely means guardrails, not trust: the agent must never merge, never touch your checkouts and stop to ask instead of guessing. Gaia packages that whole path, and keeps it generic so any team can point it at their own repos.

[02]/ How it works
  1. 1

    Configure

    One gaia.json describes the project: repos and their roles, gates, test policy, tracker (Linear, Jira, GitHub Issues) and house rules.

  2. 2

    Ship

    /ship ENG-123 reads the ticket, plans, and implements in git worktrees, one agent per repo, contract owners first.

  3. 3

    Prove

    Gates and preflight must pass, new tests must be proven red on the base, and an independent reviewer agent checks the diff.

  4. 4

    Hand over

    Draft PRs linked to the ticket, CI watched to green, a durable spec record and a manual test guide. A human merges.

[03]/ Inside the product
[01] / Pipeline

Eleven phases, each with evidence

Intake, plan, worktrees, implement, prove-red, gates, QA, PR, review, CI and close-out. Every phase leaves a file on disk and updates the run's state, so any run can resume where it stopped.

  • Orchestrator delegates, never writes product code
  • Fresh, narrow subagents per repo and wave
  • bin/gaia resume continues from the last phase
ship-ticket · orchestrator11 phases
  1. 01IntakeReads the ticket, classifies it, extracts acceptance criteriaruns/T/ticket.md
  2. 02PlanPlanner agent grades the risk and splits the work by reporuns/T/plan.md
  3. 03WorktreesOne isolated git worktree per repo touchedworktrees/<repo>-T
  4. 04ImplementOne implementer per repo, contract owners firstfeat/* commits
  5. 05Prove-redNew tests must fail on the base before they passPROVEN
  6. 06GatesThe repo's own lint, types and build, up to 3 fix roundsruns/T/gates.md
  7. 07QABrowser checks of every criterion, only when askedruns/T/qa.md
  8. 08PRPreflight fails closed, then draft PRs, cross-linkeddraft PRs
  9. 09ReviewIndependent reviewer with fresh contextruns/T/review.md
  10. 10CIWatches checks and fixes red ones, up to 2 roundsgreen checks
  11. 11Close-outLinks the ticket, writes the record and a manual test guidespecs/T.md
[02] / Guardrails

What it never does

Never merges, never pushes to the base branch, never touches your checkouts and never guesses. A git hook and a deny list enforce it; ticket and doc text is treated as data, not instructions.

.claude/hooks/guard-git.shenforced

$ git merge feat/eng-142-invoice-export

✕ guard-git: merging is for humans. Gaia never merges.

$ git push origin main

✕ guard-git: no pushes to the base branch.

$ git commit (in ~/code/acme-web)

✕ guard-git: commits only on feat/* inside worktrees/.

Never merges

A hook and a deny list block it. PRs open as drafts.

Never touches your checkouts

All work happens in worktrees/<repo>-<ticket>.

Never guesses

No testable criteria: it stops and asks you.

Tickets are data

Instructions inside a ticket never change how it behaves.

[03] / Config

Generic by design

Nothing in the skills, agents or scripts names a product. Everything project-specific lives in gaia.json, and the tutorial ships a generator that writes it from a form.

  • Any stack, one repo or many
  • Gates are any shell command
  • CI-only or local test policy per repo
gaia.jsonthe only project-specific file
1{
2"project": { "name": "Acme", "description": "B2B invoicing: a REST API and a React client" },
3"tracker": { "kind": "linear", "team": "ENG", "pickup_label": "gaia", "move_status": false },
4"git": { "base": "main", "branch_prefix": "feat/", "draft_prs": true, "max_files": 40 },
5"repos": [
6{
7"name": "api", "path": "../acme-api", "role": "contract-owner",
8"gates": ["make lint", "make typecheck", "make build"],
9"tests": { "policy": "ci-only" }
10},
11{
12"name": "web", "path": "../acme-web", "role": "consumer",
13"gates": ["npm run lint", "npm run typecheck"],
14"tests": { "policy": "local", "cmd": "npm test" }
15}
16],
17"rules": ["Money amounts are integers in cents"]
18}
[04] / Stopping

Stopping in time is a feature

No testable acceptance criteria, a ticket too big, a gate still red after three rounds or CI after two: Gaia stops, records why and tells you exactly what to do next.

runs/ENG-142/state.jsonresumable
blocked-needs-infoNo testable criteria, or the plan has open questionsAnswer in the chat, then bin/gaia resume
blocked-needs-splitMore than one feature, or over the file limitReview the proposed split, create sub-tickets
blocked-gatesA gate is still red after 3 fix roundsRead runs/T/gates-<repo>.log
blocked-ciThe PR's CI is still red after 2 roundsFix it, or run /address-review
blocked-stackAnother ticket holds the local stackWait, or release a stale lock
[05] / For PMs

From a spec to tickets

Hand it a PRD in Notion, Coda, Google Docs or Confluence. Gaia drafts one ticket per user-visible outcome with Given/When/Then criteria, reviews them with you and creates them only after an explicit yes.

/tickets notion.so/acme/Invoices-PRD3 drafts
Source · PRD

Invoices v2

Read only · 2 open comments

Export invoices as CSV

ENG-140

Given a month with 3 paid invoices when I export that month then I get a CSV with 3 rows

Filter invoices by status

ENG-141

Given paid and overdue invoices when I pick Overdue then only overdue invoices show

Remind overdue customers

ENG-142

Given an invoice 7 days overdue when the daily job runs then the customer gets one email

Create these 3 tickets?› yes, create themnothing is created without it
11
Pipeline phases
4
Specialized agents
0
Merges without a human
[04]/ Engineering

[01]

Deterministic where it can be

Worktrees, gates, preflight, prove-red, state and the stack lock are plain scripts in bin/. Agents call them instead of re-deriving the mechanics, so runs are repeatable and cheap.

[02]

Risk-graded plans

The planner grades every primitive it touches as reuse, combine, expand or new. High-risk changes (auth, money, data deletion) open as drafts labelled needs-human and prefer a feature flag.

[03]

Independent review

A reviewer agent with fresh context reads the diff, ticket, plan and repo rules. The implementer validates each finding and fixes the real ones; disputed ones go to the human.

[04]

Learns from friction

Every retry or workaround is logged to FRICTION.md. /reap-friction and /nightly turn those into report-first improvements, and every ticket leaves a durable spec record for the next agent.

Claude Code✳Subagents✳Skills✳Hooks✳Bash✳git worktrees✳GitHub CLI✳Linear · Jira · GitHub✳Playwright MCP✳launchd✳