Documentation
How to use Agent On Rails
Agent On Rails turns an approved spec into bounded work for coding agents — with review and evidence before anything is marked done. The control plane is the contract folder inside your project, not the product name.
What you need to set up
Already have aor? You mainly need a project contract, a coding agent, and a human approver.
Agent On Rails does not replace Cursor / Claude / Codex — it packages the work for them.
- 1. Python 3.11+ + git +
aor— ifaor guideworks, CLI is done. - 2. Project contract —
aor init ./my-product --name "My Product"(docs+specs only). - 3. Coding agent — Cursor, Claude Code, Codex, Gemini, or your Teknopus agent runner.
- 4. Human gates — approve specs and final-review; evidence before done.
- Optional —
aor team, GitHubgh, API keys on the coding agent (not in git).
Setup app (macOS, Windows, Linux)
Prefer a wizard? The desktop setup app checks Python, installs the
aor CLI, bootstraps your first docs+specs project,
and can draft SurveyDesk-shaped specs from natural language
(aor gather, confirm before write) —
then hands off to the terminal UI. Onboarding only
(ADR-008);
day-to-day work stays in aor.
Agent On Rails 0.1.5
macOS builds are signed with Developer ID. Open the DMG and drag Agent On Rails into Applications (app on the left, Applications folder on the right). Sparkle auto-update via appcast.xml; in the app use Agent On Rails → Check for Updates…. Windows MSI is published from GitHub Actions (unsigned until a code-signing certificate is configured). Requires Python 3.11+.
Linux — compile yourself
No prebuilt Linux installer. Build the Tauri wizard locally (Node 20+, Rust, WebKitGTK), or skip the GUI and use the CLI-only Linux path below.
# Debian/Ubuntu system deps
sudo apt update
sudo apt install -y curl build-essential pkg-config \
libwebkit2gtk-4.1-dev libayatana-appindicator3-dev \
librsvg2-dev patchelf libssl-dev
# Build the setup wizard
git clone https://github.com/agent-on-rails/agent-on-rails-desktop.git
cd agent-on-rails-desktop
npm install
npm run tauri build
# → src-tauri/target/release/bundle/ Full notes: docs/build-linux.md · Fedora packages included there.
Linux / server (agent host)
Lightest path for a Linux laptop or agent machine (Python CLI only — no desktop GUI). Same harness as Hermes-style workflows: approve a spec, package a bounded task, let your coding agent implement.
sudo apt install -y python3 python3-pip python3-venv git pipx # Debian/Ubuntu
pipx ensurepath
pipx install git+https://github.com/agent-on-rails/agent-on-rails-cli.git
aor init ./my-product --name "My Product"
cd my-product && aor Install the CLI
Works on macOS, Windows, and Linux. Requires Python 3.11+. Prefer pipx:
pipx install git+https://github.com/agent-on-rails/agent-on-rails-cli.git
aor aor opens a mouse-friendly terminal UI (same idea as OpenCode, Claude Code, or Gemini).
It is a harness — not a coding agent. Subcommands still work for scripts.
Or:
curl -fsSL https://raw.githubusercontent.com/agent-on-rails/agent-on-rails-cli/main/scripts/install.sh | bash
The loop
aor init → aor gather run → aor spec approve → aor plan → aor run → aor review - 1. Init — create the docs+specs contract. No application code.
- 2. Spec — write
spec.md+ acceptance + evidence. - 3. Approve — a human must approve before agents run.
- 4. Plan / run — Agent On Rails packages a bounded task for Cursor, Claude, Codex, or another headless agent. With the engine online,
aor runregisters the task and drives implementor ↔ reviewer under policy. - 5. Review — humans own final review and merge. Evidence proves done.
Escalation, watchdog & unattended runtime
Approved contracts AOR-006 and AOR-009 define how Agent On Rails decides retries, stops forever-loops, and fails fast on environment hangs — without babysitting the terminal.
- Intelligent escalation (Option A) — distinct bugs across fix↔review are normal progress. The same failure signature climbs tier 1 → 2 → 3 → human. Strike max is only a safety ceiling.
- Environment ≠ smarter model —
hung Gradle, npm, or a missing device is cancelled, notified, and marked
blocked_environment. Independent work continues. Wave-levelHUMAN_REQUIREDonly when blocking acceptance remains. - Run report —
every wave ends with a durable report:
spec_id,terminal_status, completed, blocked environment, skipped deps, coding failures, human actions, notifications. The engine authors it; empty lists are allowed, omitted keys are not. - Task API —
register with
POST /v1/tasks, then run. The engine owns attempt, tier, and signature history — callers report events. - Watchdog classification —
specific-first:
./gradlew testis a test,build/assemble*is a build — not a short device timeout by default.
Escalation policy → Execution watchdog → Phase 1 coherence plan →
Walkthrough — start to final review
Full path: install → init → write spec → human approve → plan → run → coding agent implements → evidence → human final review.
- 1. Install & open TUI —
use the setup app
or
pipx install …, thenaor. - 2. Init — create the docs+specs contract (no app code).
- 3. New spec —
edit
spec.md, acceptance, and evidence while status is DRAFT. - 4. Approve — human gate. Agents cannot skip this.
- 5. Plan + Run —
packages
.aor/packages/TASK-00N/prompt.mdfor Cursor / Claude / Codex. - 6. Implement — in the sibling app repo only. PR + tests = evidence.
- 7. Final review —
human Review in the TUI (or
aor review TASK-001 --approve). Ready when evidence exists.
Setup checklist
What is required vs optional before the first Plan → Run.
Linux / server guide
Lightweight install on an agent host, first loop, and upgrade tips.
Full walkthrough (start → final review)
Screen-by-screen TUI steps, command-line twin, checklist, and stuck? fixes.
CLI reference
Install options, loop table, and what aor run does today.
Setup app (macOS / Windows)
Desktop wizard to install aor and run aor init.
CLI repository
Download and develop aor on GitHub.
Authority / contract guide
How specs, ADRs, policies, and evidence work inside the control-plane folder.
AGENTS.md
Required first read for any coding agent — boundaries, review separation, and evidence rules.
Specs (AOR-001 … AOR-009)
MVP contracts for bootstrap, GitHub, planner, execution, review, escalation, evidence, desktop setup, and unattended AI Team runtime.
AOR-006 — Model escalation
Forever-loop vs normal progress, Option A ladder, and auditable escalation history.
AOR-009 — Unattended AI Team runtime
Manager loop, watchdog, RunReport, task API, and wave-level human gates.
Control plane repository
The authority tree — what should be built and how success is proven.
Core principle
GitHub is the operating surface
Agents ship through Issues, labels, PRs, and Checks — not a parallel console. Docs define intent. Specs define the contract. Agent On Rails governs execution. Evidence proves completion. Humans own final review and merge.