Give it a spec. Get back a reviewed PR.

Fram Loop for Claude Code and Codex

01

Ralph loops. Fram frames.

Ralph made the loop useful: deterministic feedback keeps the agent moving. Fram makes it reviewable: Builder writes; a separate read-only Reviewer scores with numeric thresholds and file:line evidence. Red→Green commits, baseline filtering, and adaptive recovery keep the loop moving until the goal is complete or progress is impossible.

02

Long-running work. Finished end-to-end.

A two-agent autonomous loop for features, refactors, migrations, library design, performance projects, and large cleanups. Kick it off with a spec and plan; review the finished PR, not per-phase progress.

owns the run

Orchestrator

Creates the isolated harness branch, dispatches Builder and Reviewer agents across phases, and drives until the deliverable is complete, partial, or blocked. Never writes code. Never pauses mid-run for opinions.

implements the work

Builder

Receives the spec, plan slice, git history, prior carry-forward, and key files. Writes code, commits source and tests, and never grades its own work.

evaluates the result

Reviewer

Reads the actual code, exercises the running deliverable, runs the checks, and scores the rubric with evidence. Read-only by tooling and by doctrine.

Isolated harness branch

Branch template

fram/<source>-<feature>-<sha>

Cut from your branch tip. Phase work, recovery, and run-state artifacts all land there. Your source branch stays untouched until the PR is ready to inspect.

Final verification

Re-walk the spec section by section. Drive the deliverable in production-shape, end-to-end. Scan for new secrets and supply-chain hooks. Compare the full suite, lint, and typecheck against the Phase 0 baseline. Only after those checks pass does the loop push the harness branch and open the PR.

Three terminal states

complete — goal met, end-to-end verified, PR opened. partial — locally verified, push failed, local handoff written. blocked — the spec, environment, or dependency prevents progress. No arbitrary fix-round cap.

03

Built for chunky work. Overkill for the tiny stuff.

Use it when

  • A feature, refactor, migration, library, performance project, or cleanup that needs 3+ coherent phases.
  • Each phase can produce something independently testable end-to-end.
  • You have a reviewed spec and a phased plan, or you are ready to create them first.
  • You want to review the finished output, not approve every intermediate move.
  • You explicitly ask for the loop. It never auto-invokes itself.

Don't use it when

  • 01Single-task or single-phase work. The orchestration overhead will slow you down.
  • 02The plan does not have clear phase boundaries. Shape the plan first.
  • 03You want to approve each phase before the next one starts. Use a checkpointed workflow instead.
  • 04There's no way to exercise the deliverable end-to-end (no dev server, no test DB, no library consumer).
  • 05Hot-fixes against production. Use the regular tools.

Install the loop.

One command adds the skill to Claude Code or Codex. Use it when the work is bigger than one agent run and you want the final feature, not an MVP with constant status checks.

Autonomous coding loop

A two-agent autonomous coding loop by Andrei Clodius. First reference run: 5 phases, 17 commits, 98 tests, no human intervention after kickoff.

Fram.Design  -  Andrei Clodius