aloop · Aladdin's Loop

Intent is all you need.

One line of intent becomes planned, test-first, gate-verified software on Claude Code, Codex and OpenCode. A human approves the plan; cheap workers build it in isolated worktrees; deterministic hooks decide what is accepted.

aladdin "add CSV export to the report"

GitHub · Install · Roadmap

Give the agent something to make false.

Do not merely give an agent a goal. Give it a failing proof of what is missing, then make it earn GREEN. A test written after the code proves the code does what the code does. A test written before it proves the code is missing — and "done" becomes a claim a gate can check, not a sentence a model can say.

RED
writes the tests the plan named — and must fail them. gate-red-verify
SCAFFOLD
declares the symbols the tests need; no bodies. gate-scaffold-verify
GREEN
makes the tests pass, touching only the task's files. gate-green-verify
REVIEW · FINAL
symbol uniqueness, duplicates, orphans; then the sprint's whole matrix once. Every planned test must be on main.

Each step is a sub-agent whose stop is intercepted by a hook. The hook can block the stop and hand the reason back. A gate that crashes blocks. A host that cannot block natively is wrapped from outside. A BLOCK is never downgraded to a warning.

Models explore. Gates decide.

The model mayThe gate decides
plan, split, pick a route (strongest · strong · economical)whether the plan has tests for every task and targets that exist or are declared
write tests, scaffolds, code, reviewswhether RED fails, SCAFFOLD has no bodies, GREEN passes inside its scope
say it is donenothing — done is a passing gate verdict in the event stream
spend tokens and minuteswithin a box: soft warning, hard stop, breach classified and re-planned, never retried as-is

The audit tree

Every run leaves an aladdin.event/1 stream. One command walks a commit back to the human who approved it, with no transcript archaeology:

aloop events trace 3e555af
commit 3e555af   feat: csv export (built from the task's rationale)
└─ task S1-01-T2  "wire the export"              worktree merged --no-ff
   └─ attempt 2   green-worker · economical       gate-green-verify: PASS
      ├─ attempt 1   gate-green-verify: BLOCK      scope: touched src/report.py outside targets
      └─ targets C2  modify src/report.py:4 render  reason: render offers the export
         └─ plan S1-01  approved                   human.approval · autonomy: reviewed
            └─ intent int_01a14d9f…  "add CSV export to the report"   received 2026-10-18T06:07Z

Decisions carry a one-line reason, evidence refs and an authority ref. Usage is reported by class (fresh input, cache read, cache write, output, context) and marked estimated where a host does not report it.

Evidence, not claims

Every public number comes from the harness's own stats.md and is reproducible with make e2e-live YES=1: a one-line intent through intake, standards, planning, RED/SCAFFOLD/GREEN per task, structural review and the final gate, to merged and tested code in a real session. The semver intent ran end to end in 11m10s for $0.65 (run 6); a two-story word-frequency tool in 19m42s for $1.56 (run 9), and in 10m58s for $0.76 with no gate block once every dispatch ran on the project's model (run 23), and in 9m54s for $0.70 on today's master (run 27). Every number here is a row in docs/evidence/README.md with the command that reproduces it, and every requirement on the roadmap is tracked with the test that proves it in docs/TRACKING.md.