Skip to main content

The spec-to-PR lifecycle

UseZombie turns a markdown spec into a validated pull request through a deterministic pipeline: validate, implement, gate, score, ship.

Step by step

1

Write a spec

A spec is a markdown file describing what you want built. It can follow any format — structured sections, free-form prose, bullet lists. The agent reads natural language and infers intent from your codebase context.You describe what to build. The agent figures out how.
2

Submit

Submit via zombiectl run --spec <path> or the REST API (POST /v1/runs). On submission, UseZombie validates that referenced files exist in the workspace, deduplicates against in-flight runs, and enqueues the work.
3

Agent implements

The NullClaw agent runtime picks up the run and works inside an isolated git worktree — a fresh working directory branched from your default branch. The agent receives the spec plus injected codebase context (relevant file contents, module structure) to produce an accurate implementation.No changes touch your main branch until you approve the PR.
4

Gate loop

After implementation, the agent runs your project’s standard validation gates in sequence:
  1. make lint — linting and type checks
  2. make test — unit tests
  3. make build — production build
If any gate fails, the agent reads the error output, diagnoses the issue, and self-repairs. This loop runs up to 3 times by default. If all repair attempts fail, the run is marked FAILED with full error context.
The repair limit is configurable per agent profile. See Gate loop for details.
5

Score

Every completed run receives a scorecard with four weighted dimensions:
DimensionWeightWhat it measures
Completion40%Did the agent implement everything the spec asked for?
Error rate30%How many gate failures occurred before passing?
Latency20%Wall-clock time from enqueue to PR.
Resource efficiency10%Token and compute usage relative to task complexity.
Scores map to tiers:
TierScore range
Bronze0 — 39
Silver40 — 69
Gold70 — 89
Elite90 — 100
6

PR

The agent pushes a branch named zombie/<run_id>/<slug> and opens a pull request on GitHub. The PR body contains an agent-generated explanation of what was implemented and why. A scorecard comment is posted with the quality metrics.From here, it’s a normal code review. Approve, request changes, or close.

Runtime architecture

Under the hood, the CLI, API server, queue, worker, and executor coordinate to move a run from submission to PR. Component responsibilities:
  • zombiectl — CLI client. Submits specs, checks status, streams logs.
  • zombied API — HTTP server. Validates specs, manages runs and workspaces, serves the dashboard.
  • Redis Streams — Work queue. Durable, ordered, with consumer group semantics for worker fleet scaling.
  • zombied worker — Claim runs, orchestrate the gate loop, push results to GitHub. Supports drain and rolling deploys.
  • zombied-executor — Sidecar process that owns the sandbox lifecycle. Spawns NullClaw agents, manages worktrees, enforces resource limits.
  • GitHub — Target forge. Branch push, PR creation, scorecard comments.

Agent relay model

For lightweight, interactive agent sessions (spec init, run --preview), UseZombie uses a different execution model: the agent relay. Instead of queuing work for a sandbox, zombied acts as a stateless pass-through between the CLI and the workspace’s LLM provider. Key differences from the pipeline model:
Pipeline (full runs)Agent relay (spec init, preview)
ExecutionSandbox on worker, queuedDirect handler, no queue
File accessAgent reads files in sandboxCLI reads files locally, sends to model on demand
Duration1-5 minutes3-8 seconds
StateDurable (DB + Redis)Stateless (CLI manages conversation)
ProviderConfigured per workspaceSame, resolved by zombied
The relay model is inspired by how Claude Code and OpenCode work: the CLI holds tool definitions, the model calls them on demand, and the API layer is a relay. The difference is zombied sits between CLI and provider because API keys are server-side secrets managed per-workspace.