Build harness for long-horizon software execution using AI agents.
Ridgeline decomposes large software ideas into phased builds using a multi-agent pipeline (shaper, specifier, planner, builder, reviewer) driven by the Claude CLI. It manages state through git checkpoints, tracks costs, and supports resumable execution when things go wrong.
- Shape -- describe what you want built. The shaper agent analyzes your codebase and asks clarifying questions to produce a structured shape document.
- Specify -- an ensemble of three specialist agents (completeness, clarity,
pragmatism) drafts spec proposals, then a synthesizer merges them into
spec.md,constraints.md, and optionallytaste.md. - Plan -- an ensemble of three specialist planners (simplicity, thoroughness, velocity) proposes phase decompositions, then a synthesizer merges them into numbered phase files with acceptance criteria.
- Build -- for each phase the builder agent implements the spec inside your repo, then creates a git checkpoint.
- Review -- the reviewer agent (read-only) checks the output against the acceptance criteria and returns a structured verdict. On failure, the harness generates a feedback file from the verdict for the builder's next attempt.
- Retry or advance -- failed phases are retried up to a configurable limit; passing phases hand off context to the next one.
npm install -g ridgelineRidgeline requires the Claude CLI to be installed and authenticated.
For sandboxing (recommended), install one of:
- macOS/Linux: Greywall --
brew install greywall(domain-level network allowlisting + filesystem isolation) - Linux: bubblewrap --
apt install bubblewrap(full network block + read-only filesystem)
Sandboxing is on by default when a provider is detected. No flags needed.
# Auto-advance through the pipeline (shape → spec → plan → build)
ridgeline my-feature "Build a REST API for task management"
# Or run each stage individually
ridgeline shape my-feature "Build a REST API for task management"
ridgeline spec my-feature
ridgeline plan my-feature
ridgeline dry-run my-feature # preview before committing
ridgeline build my-feature
# Resume after a failure (re-run build)
ridgeline build my-feature
# Rewind to an earlier stage and redo from there
ridgeline rewind my-feature --to spec
# Clean up stale worktrees from failed builds
ridgeline cleanAuto-advances the build through the next incomplete pipeline stage (shape → spec → plan → build). Accepts all flags from the individual commands.
Gathers project context through interactive Q&A and codebase analysis. Produces
shape.md in the build directory. Accepts an optional input argument -- a file
path to an existing document or a natural language description.
| Flag | Default | Description |
|---|---|---|
--model <name> |
opus |
Model for shaper agent |
--timeout <minutes> |
10 |
Max duration per turn |
Runs the specifier ensemble: three specialist agents (completeness, clarity,
pragmatism) draft proposals in parallel, then a synthesizer merges them into
spec.md, constraints.md, and optionally taste.md.
| Flag | Default | Description |
|---|---|---|
--model <name> |
opus |
Model for specifier agents |
--timeout <minutes> |
10 |
Max duration per turn |
--max-budget-usd <n> |
none | Halt if cumulative cost exceeds this |
Runs the planner ensemble: three specialist planners (simplicity, thoroughness,
velocity) propose phase decompositions in parallel, then a synthesizer merges
them into numbered phase files (01-slug.md, 02-slug.md, ...) stored in the
build's phases/ directory.
| Flag | Default | Description |
|---|---|---|
--model <name> |
opus |
Model for planner agents |
--timeout <minutes> |
120 |
Max planning duration |
--constraints <path> |
auto | Path to constraints file |
--taste <path> |
auto | Path to taste file |
Displays the execution plan without invoking builders or reviewers. Accepts
the same flags as plan.
Executes the full build pipeline: build each phase, evaluate, retry on failure, and advance on success.
| Flag | Default | Description |
|---|---|---|
--model <name> |
opus |
Model for builder and reviewer |
--timeout <minutes> |
120 |
Max duration per phase |
--check-timeout <seconds> |
1200 |
Max duration for check command |
--max-retries <n> |
2 |
Max reviewer retry loops per phase |
--check <command> |
from constraints | Baseline check command |
--max-budget-usd <n> |
none | Halt if cumulative cost exceeds this |
--constraints <path> |
auto | Path to constraints file |
--taste <path> |
auto | Path to taste file |
--context <text> |
none | Extra context appended to builder and planner prompts |
--unsafe |
off | Disable sandbox auto-detection |
The build command automatically resumes from the last successful phase if previous state exists. Each build runs in an isolated git worktree -- completed phases are reflected back to your branch, and failed builds leave the worktree intact for inspection.
Resets pipeline state to a given stage and deletes downstream artifacts.
| Flag | Default | Description |
|---|---|---|
--to <stage> |
(required) | Stage to rewind to: shape, spec, or plan |
Removes all build worktrees under .ridgeline/worktrees/ and their associated
WIP branches. Use this after inspecting a failed build.
.ridgeline/
├── settings.json # Optional project-level config (network allowlist, etc.)
├── worktrees/ # Git worktrees for active builds
│ └── <build-name>/ # Isolated working directory per build
└── builds/<build-name>/
├── shape.md # Structured project context (from shaper)
├── spec.md # What to build
├── constraints.md # Technical constraints and check commands
├── taste.md # Optional coding style preferences
├── phases/
│ ├── 01-scaffold.md
│ ├── 01-scaffold.feedback.md # Generated by harness on review failure
│ ├── 02-core.md
│ └── ...
├── state.json # Phase statuses, retries, timestamps, git tags
├── budget.json # Per-invocation cost tracking
├── trajectory.jsonl # Event log (plan/build/eval start/complete)
└── handoff.md # Context passed to the next phase
Constraint and taste files are resolved in order:
- CLI flag (
--constraints <path>) - Build-level (
.ridgeline/builds/<build-name>/constraints.md) - Project-level (
.ridgeline/constraints.md)
Project-level settings (network allowlist, etc.) are loaded from
.ridgeline/settings.json. See SECURITY.md for details.
npm install
npm run build # Compile TypeScript and copy agent prompts
npm run dev # Watch mode
npm test # Typecheck, lint, and run unit tests
npm run test:unit # Unit tests only (vitest)
npm run test:e2e # End-to-end tests
npm run test:watch # Watch mode
npm run lint # Run all linters (oxlint, markdownlint, agnix, fallow)
npm run typecheck # Type-check without emitting