Autonomous code repair
that earns the commit.
Naoru drives your software, judges the result, and has an LLM propose a fix in an isolated worktree — then gates every autonomous commit behind a deterministic red-first oracle. No false greens. No silent regressions.
$ naoru run --mission test-and-fix-bugs ● drive running system-under-test… ✗ judge RED AssertionError · checkout total mismatch ✎ fix worker patch in worktree wt-3f9a (fixer-blind) ✓ gate RED→GREEN · 3-of-3 · oracle satisfied ✓ commit a1b2c3d fix: correct checkout rounding
Drive → judge → fix → gate.
A bounded, deterministic loop. The engine core imports zero host code — it binds to your environment through three seams, so it runs on arbitrary-language repos.
Drive
Launch the system-under-test, stream output, detect when it terminates.
Judge
Score the run RED or GREEN with machine-checkable predicates — exit code, traceback, contract, output.
Fix
A bounded LLM worker proposes a patch in an isolated git worktree. Your model, inherited from host config.
Gate
The oracle re-runs the check blind to the fix. Only a proven repair is allowed to commit.
A red-first oracle stands between the fix and your history.
- RED→GREENRed-first. The check must have genuinely failed before the fix, then pass after. A patch can't take credit for code that was already green.
- N-of-MRepeated. The post-fix pass is confirmed across multiple runs, so a flaky green never clears the gate.
- blindFixer-blind. The oracle that validates the repair never sees the patch's reasoning — it judges behavior, not narrative.
- safeSandboxed by default. Bounded worker, isolated worktree, gate-required commits.
--unsafeis an explicit opt-in.
Point it at a goal, declare your checks, let it run.
Author checks as declarative leaves — a command plus a pass-predicate.
naoru leaves generate proposes a starter set from your project's own tooling.
test-and-fix-bugsRed-first oracle. Finds a failing check, repairs it, and commits only a proven fix.
improve-performanceMetric gate. Keeps a change only when it measurably moves the number you defined.
improve-uxProposes a patch for human review. Never commits autonomously.
general-improvementOpen-ended propose-a-patch for review — the engine suggests, you decide.
Install naoru and its host.
Naoru is the repair engine; a host binds it to your environment — LLM access, runtime paths, tooling discovery. Obra is the default host, and one command installs both:
$ uv tool install naoru[obra-host] # installs naoru + the Obra host $ naoru config # choose your provider and model $ naoru run --mission test-and-fix-bugs
Prefer a different host? Naoru is host-agnostic by design. The
[obra-host] extra is just the default — install bare uv tool install naoru
and bind your own environment through fix_engine.host.configure_host(...).
Obra is the batteries-included choice, not a requirement.