Aladdin aloop · Aladdin's loop
Intent is all you need

aloop is a kernel for your harness.

Your harness is the hardware. aloop is the kernel: its gates decide what is accepted, modules plug in the checks your project needs, and a distro (software: the TDD loop) is the user space you run and change. You give one line of intent; cheap workers build it, test first, in isolated worktrees.

Plan. Test. Build. Improve. Repeat.  ·  Models explore. Gates decide.
claude · your project
# add the marketplace and install the plugin
/plugin marketplace add adeelahmad/aloop
/plugin install aloop@aloop-marketplace
/reload-plugins

# say what you want
/aladdin Add rate limiting to the API
intake → standards → planner
✕ 3 tests fail (RED proves what is missing)
✓ 3/3 pass in the task worktree (GREEN)
◆ FINAL-GATE pass · merged, authored by you

Your intent summons possibility.

Aladdin's loop (aloop): turn intent into working software with test-driven agents. 0 Retrospective, 1 Intake, Standards and Planning, 2 Red (write failing tests), 3 Scaffold (create stubs), 4 Green (make tests pass), 5 Review per wave and the Final Gate per sprint. Runs on OpenCode, Codex and Claude Code; powered by ctx-symbols, md-db and budget and stats.
Aladdin's loop (aloop). Many agents. One goal. Better software.More progress every loop.
Quick start

Three lines, then say what you want.

Inside Claude Code. A Rust toolchain 1.85+ lets the plugin build its gate backends (ctx-symbols, md-db) on first start; without it the gates degrade to grep.

Claude Code
# add the marketplace and install the plugin
/plugin marketplace add adeelahmad/aloop
/plugin install aloop@aloop-marketplace
/reload-plugins

# say what you want
/aladdin Add rate limiting to the API

Or just ask

The skill triggers on any build, fix or change request in your own words. /aloop:aladdin is the same skill.

From a shell

aladdin "Add rate limiting to the API" records the intent and prints the line to say in your host. It does not start a run on its own. Follow a run with aladdin status; pick it up in a fresh session with aladdin resume.

Other hosts

Codex, OpenCode and DeepSeek Harness install with aloop install codex|opencode|dsh: the install guide.

The loop, per wave

Plan. Test. Build. Improve. Repeat.

Each step is a sub-agent in its own git worktree, and a hook intercepts its stop. Waves run in parallel across tasks; the final gate runs once per sprint.

Repeat per wave (parallel across tasks)
Plan
Redfailing tests
Scaffoldstubs
Greenpass tests
Reviewstructure
Final Gateend of sprint
1

Intake → Standards → Planning

planning agents
  • Understand intent
  • Load context (ctx-symbols)
  • Apply standards (md-db)
  • Create detailed plan
stories.md · plan.md · tasks.md
acceptance criteria
inintakeststandardsplplanner
2

Red — Write failing tests

give the agent something to make false
  • Write test(s) for the task
  • Run and verify they fail
  • A compile error is not a real failure
tests/*.test.* · test report
failure evidence
rwred-worker gate-red-verify
3

Scaffold — Create stubs

just enough for the tests to run
  • Create minimal code stubs
  • No business logic
  • Own task worktree
created files (task worktree)
execution.log · output.md
scscaffolder gate-scaffold-verify
4

Green — Make tests pass

touching only the task's files
  • Write minimal code to make tests pass
  • Keep it simple
  • No extra features
implemented code · execution.log
passing test report
grgreen-worker gate-green-verify
5

Review → Final Gate

per wave, then once per sprint
  • Check structure, find duplication
  • Validate docs (md-db), all tests pass
  • Every planned test is on main
gate report · updated docs
srstructural-reviewerfgfinal-gate
0

Retrospective

start the next sprint
  • Read stats.md and NEXT.md
  • Update memory.md, capture learnings
  • Context cleared → resume
stats.md + NEXT.md written
memory.md (updated)
ararchivist
Deterministic hooks

Models explore. Gates decide.

Give the agent something to make false. A test written after the code proves the code does what the code does. A test written before it proves the code is missing, so "done" becomes a claim a gate can check, not a sentence a model can say. A gate that crashes blocks; a BLOCK is never downgraded to a warning.

✕
Gate blockedgate-red-verify

Tests passed on the first run: RED needs failing proof.

✓
Gate passedgate-green-verify

3/3 tests pass in the task worktree, inside its scope.

✕
Gate blockedgate-green-verify

Scope: touched src/app.py outside the task's targets.

One-way doorgate-door-plan

A push to the default branch waits for your typed authorization.

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

Isolated worktrees

Each task in its own git worktree.

Parallel waves

Multiple agents run in parallel.

Time & token box

Every attempt boxed; auto re-plan on a hard limit.

Deterministic hooks

Enforce tool usage, file scope, test protection, commit author.

Your commits

Merges authored by you.

Clear sprint boundary

Ends with stats.md and NEXT.md; context cleared.

Audit

Every commit walks back to your intent.

Every run leaves an aladdin.event/1 stream. Decisions carry a one-line reason, evidence refs and an authority ref; usage is reported by class and marked estimated where a host does not report it.

aloop events trace
$ aloop events trace 3e555af
commit 3e555af   feat: rate limiting (built from the task's rationale)
└─ task S1-01-T2  "wire the limiter"            worktree merged --no-ff
   └─ attempt 2   green-worker · economical      gate-green-verify: PASS
      ├─ attempt 1   gate-green-verify: BLOCK     scope: touched src/app.py outside targets
      └─ targets C2  modify src/api.py:12 handle  reason: handle checks the limit
         └─ plan S1-01  granted by the typed intent  autonomy: autonomous (M11)
            └─ intent int_01a14d9f…  "Add rate limiting to the API"
Evidence, not claims

About a dollar and ten minutes per tested feature.

A one-line intent, start to merged code, in a real Claude Code session. Every row is in the evidence ledger with the command that reproduces it: make e2e-live YES=1 INTENT=<intent>.

IntentResultTimeCost
a Rust semver parser (run 21)12/12 checks8m17s$0.66
a Rust word-frequency tool, two dependent stories (run 27)13/13 checks9m54s$0.70
a Python slugify package, pytest (run 37)12/12 checks9m42s$0.69
a Go Roman-numeral package, go test (run 39)12/12 checks7m52s$0.56
a JS camelCase module, node --test (run 41)12/12 checks6m45s$0.56
extend an existing crate, brownfield (run 42)13/13 checks, seed tests untouched7m11s$0.67
a wc-like CLI app, tested by running it (run 46)13/13 checks, the merged binary works15m19s$0.99
Harness · kernel · modules · distros (M12)

Build your own Module.

Think of it as a computer. The harness (Claude Code, Codex, OpenCode, DeepSeek Harness) is the hardware. aloop is the kernel: the gate engine, its gates and the audit log, never overridden. Modules plug into the kernel: use an existing one, or build one for what your project needs. Above them runs a distro: the user space (agents, prompts, skills) that shapes the loop, yours to eject and change in git. The software distro, the TDD loop, ships today.

◆

Kernel

the plugin · a release changes it
  • Gate engine and core gates
  • The audit log (aladdin.event/1)
  • What a project declares runs, and is logged
libexec/gate-* · hooks/hooks.json
+

Modules

use one or build one · add-only
  • Run beside the core gates on SubagentStop or Stop
  • Exit 2 blocks with your reason; a pass decides only itself
  • Added by sha256: changed, missing or crashing blocks
~/.aloop/modules/<name>/module.json
check (exit 2 blocks)
✎

Distros

user space · fully overridable
  • A distro = modules + agents + skills; software (TDD) by default
  • Agents, prompts and skills, ejected on the first run
  • Layers: home > repo > plugin, per file
  • Upgrades never clobber an edit
docs/agents/userspace/distro.json (in git)
~/.aloop/projects/ (personal)
~/.aloop/modules/no-todo
# 1. scaffold a module: module.json + an executable check
$ aloop module new no-todo --on Stop
created ~/.aloop/modules/no-todo

# module.json
{"name": "no-todo", "on": ["Stop"],
 "command": "./check", "timeout": 120}

# check: exit 2 blocks, stderr is the reason
grep -rn TODO "$ALOOP_PROJECT/src" && {
  echo "TODO left in src/" >&2; exit 2; }
exit 0
your project
# 2. add it: its sha256 goes in distro.json, in git
$ aloop module add no-todo
added no-todo 0b4d8588bc1c

# 3. shape the loop: eject the distro's user space, edit, apply
$ aloop userspace eject
ejected 78 file(s) into docs/agents/userspace
$ aloop userspace apply

# 4. or bundle modules + user space as a distro
$ aloop distro new my-distro
$ aloop distro install ./my-distro

# at the sprint's stop, beside the core gates
◆ module no-todo blocked: TODO left in src/

Every command above ran as shown. A check sees ALOOP_EVENT, ALOOP_ROLE, ALOOP_PROJECT, ALOOP_DISTRO and ALOOP_MODULE; a crash, a timeout, or a module missing or changed since it was added blocks too, and every run is a module.run audit event. The full how-to: Build your own module. The rules: ROADMAP §4.15.

Roadmap

Heading for Aladdin 1.0.

Every requirement, its status and the test that proves it: ROADMAP.md · TRACKING.md.

MilestoneWhatStatus
M0 to M7hygiene, trustworthy state, budgets that plan, clean boundaries, intent contracts, narrow context, audit, any hostShipped v0.12.0
M8, Aladdin 1.0/aladdin and the CLI, this site, measured public runs on every hostIn progress
M9, mission layermissions, journeys, baseline, goals: the loop picks its next goalIn progress
M10, agent habitatcontained workers, a supply-chain gate, fetched content as data, one project stopIn progress
M11, autonomous by defaultthe typed intent is the grant; only one-way doors askIn progress
M12, kernel and user spacealoop is a kernel for your harness: modules plug in, distros (software: TDD) are yours to eject and changeIn progress
Runs on your tools
OpenCodeCodexClaude CodeDeepSeek Harness
Powered by
ctx-symbolsmd-dbbudget & stats
Models explore. Gates decide.