Two ways to read this page. Not an engineer? Everything below the diagram stays in plain language, and jargon links to the glossary. Engineer? The deep dive lives in TECHNICAL.md: the loop mechanics, the safety rails, the tier configuration, and every major decision mapped back to the problem it solves.
Run AI coding assistants on real work and three failures become routine. The premium model burns its budget on trivia: fetching docs, summarizing code, typing boilerplate, all things a cheaper model does just as well, so the judgment you pay premium prices for gets spent on steps that needed none. Output ships rubber-stamped: the same model that wrote the change reviews it, and a self-review is a formality. And nobody can see what the loop actually did: no plan to check, no review argument to audit, no record a teammate could read after the fact.
Strata-loop is for the developer or team lead driving AI coding CLIs (Claude Code, Codex, and their kin) who wants three things at once: the expensive model's judgment spent only where judgment is needed, verification from a model that owes the builder nothing, and a human in command at the gates that count. It packages that as a skill your CLI already knows how to run: one pipeline, four model tiers, nine gated phases from triage to approval.
Four tiers, four jobs, no overlap:
| Tier | Role | What it owns | Never does |
|---|---|---|---|
| Strategist (your most expensive model) | judgment | assessment, business analysis, the interview, planning, arbitration, final spec-fidelity review | fetch anything; write code (except logged takeovers) |
| Researcher (mid tier) | gathering | codebase recon, search/prior-art, test-failure triage briefs | make a load-bearing call |
| Executor (cheapest tier) | typing | stepwise implementation of locked work orders, mechanical fixes | see the whole plan; decide anything |
| Adversary (rival provider's top model) | attack | adversarial plan review pre-code, cold diff review post-code | build; write a file |
Two invariants hold across all nine phases: judgment never delegates down, and whoever made the thing never checks the thing.
- The cost doctrine, enforced by structure. Your most expensive model spends its tokens only where judgment is needed: it thinks, plans, and judges. A mid tier gathers, the cheapest tier builds, and neither the fetching nor the typing can quietly climb up to the premium model.
- Nobody grades their own work. A separate adversary model, the rival provider's best, attacks the plan before any code exists and grades the finished diff cold. Nothing ships on the builder's say-so.
- A human in command at every gate that counts. You confirm the assumptions ledger, you sign off the plan before a line of code runs, and you approve the final diff before anything commits.
- An append-only paper trail. Every run leaves
PLAN.md(the what),REVIEW-LOG.md(the argument), andWORKLOG.md(the labor record): one chain a teammate or an auditor can read afterward, and never rewrite. - Trivia never enters the loop. The opening triage can decline a task outright and log why, so the machinery engages only for efforts that deserve it.
The E2E suite runs the entire loop live (every tier through its actual
CLI) against a seeded task with a deliberately flawed plan. The first validation
run (2026-08-25): the adversary caught the seeded boundary flaw by
name, the full loop converged across eight real review rounds (one thread, resume mechanic
intact, every round finding genuine issues), the executor's proof went green, and one
undocumented Codex mechanic (--skip-git-repo-check outside git repos) was found and folded
back into the skill.
Plain-terms bridge; each item links to the full story in TECHNICAL.md.
- Premium budget burned on trivial steps. Every phase names the tier that runs it, and the plan carries a tier-assignment cost contract you can veto before anything runs; the cheap model types, the expensive one judges. (tiered model assignment)
- Self-review is a rubber stamp. Verification is separation of duties made mechanical: the rival provider's top model attacks the plan and grades the diff from a read-only sandbox, and it never builds.
- "What did the loop actually do here?" Every phase writes to append-only artifacts (the plan, the review argument, the work log), so a finished run reads like a case file: what was decided, what was contested, and who did the work. (the artifact chain)
- An autonomous loop sounds like a liability. The adversary can only look, never touch; every internal loop is bounded and escalates honestly instead of faking convergence; and the three gates that matter stop for a human. (safety mechanics)
For developers: quickstart
git clone https://github.com/Alex5350/strata-loop.git
cd strata-loop && ./install.sh # copies into every skill-aware CLI foundOr copy skills/strata-loop/ into your CLI's skill directory of choice
(~/.claude/skills/, ~/.agents/skills/, …). Uninstall: ./install.sh --uninstall.
Then, in any CLI that loads skills: /strata-loop, or just describe real work; the skill
triggers on non-trivial development efforts. Prerequisites, per-CLI invocation, tier
configuration, and troubleshooting: USAGE.md.
| Document | What it covers | Audience |
|---|---|---|
| TECHNICAL.md | Loop mechanics, safety rails, tier configuration, decisions mapped to business problems | Engineers |
| docs/GLOSSARY.md | Every term this repo uses, in plain English and precisely | Everyone |
| USAGE.md | Step-by-step install, configure, invoke, and read a run, for each supported CLI | Users |
| skills/strata-loop/SKILL.md | The skill itself: the tier doctrine, the nine phases, the hard rules | Engineers |
| skills/strata-loop/PLAN-FORMAT.md | The plan artifact format, including the tier cost contract | Engineers |
| skills/strata-loop/LOG-FORMAT.md | The review log and work log formats | Engineers |
| tests/e2e/VALIDATION.md | The live end-to-end validation run and what it taught | Everyone |
Protocol adapted from claudex-loop (MIT; its four-phase hardening, ledger/decision-map interview, bounded cross-provider review, and verified CLI mechanics), extended with the tier doctrine, the nine-gate pipeline, work-order execution, and the dual-log artifacts.
MIT; see LICENSE.