Adoption roadmap for one repository: ladder transitions per loop
PLThe per-repository adoption roadmap moves one codebase’s delivery loops up Dan Shapiro’s Autonomy Ladder one rung at a time—from L1 to L4, and selectively L5—only when Git, CI, and pull-request artifacts prove each gate holds. It gives a tech lead owning one repository an exact sequence of harness changes, promotion evidence, and rollback rules.
Your organization targets L3 across pilot repositories this quarter, yet eight engineers configure agents privately, CI varies by habit, and review queues are stretching. Promoting a whole repository on a calendar schedule fails because routine dependency bumps and payment integrations carry completely different risk profiles.
Why a repository climbs by loop
Section titled “Why a repository climbs by loop”One codebase runs at several autonomy levels simultaneously. Dependency bumps backed by contract tests can safely operate at L4 while payment work beside them stays at L2. The one map defines a loop as a repeatable class of change with its own trigger, named owner, and verification oracle, rated by what a human inspects before merge. Climbing loop by loop maps directly onto the six Software Factory stations—Intent, Harness, Loop, Graph, Verification, and Release—so critical code never blocks safe automation.
Choose the pilot repository and record a baseline
Section titled “Choose the pilot repository and record a baseline”Verify four invariants before promoting any loop:
- Reproducible local typecheck, lint, test, and build commands passing on the default branch.
- Branch protection with required status checks and a named release approver.
- Zero production credentials accessible to agent sessions.
- At least five merged PRs per month in the pilot loop so 30 days yields real evidence.
Run npx @wondelai/harness-audit (automated harness audit) at the repo root to catch missing files, weak CI gates, or unprotected test paths across all six stations. Then capture five 90-day baseline metrics per loop from Git history: median lead time (opened to merged), first-pass CI success, median review rounds, median PR size, and revert or change-failure rate (metrics frameworks). Shorter lead time counts only when change-failure rate stays at or below baseline.
Register loops and risk-class caps in loops.yaml
Section titled “Register loops and risk-class caps in loops.yaml”Commit loops.yaml at the repository root and require a matching CI-checked loop: PR label so audits filter cleanly:
# loops.yaml (excerpt)- loop: dependency-bumps owner: anna-kowalska # named engineer, never a team alias risk_class: low # low | medium | high | critical level: L3 oracle: tests/contract (CODEOWNERS protected, agent_can_edit_oracle: false) baseline: { lead_time_days: 2.4, change_fail_rate: 0.03 } next_transition: { to: L4, exit_criterion: "30d evidence bundles; 20 clean reads" }risk_class caps autonomy regardless of model quality: critical paths (auth, money, data migrations) cap at L3 in year one, high-risk loops enter L4 only with governance sign-off, and only low-risk loops reach L5 (governance and autonomy). Holding a sensitive loop at L3 is disciplined engineering.
Gate criteria for every rung transition
Section titled “Gate criteria for every rung transition”Each loop climbs one rung at a time. Tailor these starting thresholds inside loops.yaml alongside your transformation roadmap:
| Transition | Repository changes | Go: promotion evidence | Stop: roll back one rung when | Sign-off |
|---|---|---|---|---|
| L1 → L2 | Shared AGENTS.md core, thin adapters, secret deny rules | Whole loop uses committed core; zero secrets in transcripts | Any secret or production credential enters a session | Tech lead |
| L2 → L3 | Verification commands in AGENTS.md, Plan Mode, isolated worktrees, required CI, PR size cap | Agent runs local loop before PR; 30-day first-pass CI >= baseline | Review wait or PR size climbs 4 weeks, or failure rate > baseline | Tech lead |
| L3 → L4 | Executable criteria, protected oracle (CODEOWNERS + hooks/sandboxes), CI evidence bundle, automated PR review, rollback drill | 100% evidence bundles for 30 days; 20 shadow/sampled reads with zero misses | Production escape in loop, unauthorized oracle edit, or PR lacking bundle | Service owner + CTO/delegate |
| L4 → L5 | Low-risk auto-merge, progressive delivery with auto-rollback, production signal creating intent | risk_class: low, independent oracle owner, full quarter at L4 within baseline | Any high-severity incident traced to an unread change | CTO + security |
L1 → L2 starts with one shared instruction core covered in shared team context.
Moving from L2 to L3: unattended work with diff review
Section titled “Moving from L2 to L3: unattended work with diff review”At L3, reviewers inspect finished diffs. Ensure every diff arrives small, isolated, and pre-verified:
- Commit literal verification commands in
AGENTS.md(typecheck, lint, test, build) and require agents to execute them before reporting done. - Require Plan Mode before multi-file edits and keep specs or plans on the branch (the artifact chain).
- Isolate every task in its own checkout (Git worktree or cloud VM) so parallel agents never collide on files, ports, or state (Git worktrees).
- Enforce CI as required branch checks so red runs block merges deterministically.
- Enforce a PR size cap (for example, 400 changed lines excluding lockfiles). DORA’s AI Capabilities Model (Google Cloud, December 2025) emphasizes small batches because AI easily generates massive blocks that overwhelm review and testing.
Invocation differs by tool while gates remain identical: Claude Code runs headless worktrees with explicit tool allowlists and hooks, Codex runs inside workspace-write sandboxes with worktrees or Cloud environments, and Cursor pairs Plan Mode with Worktrees or Cloud Agents.
Moving from L3 to L4: spec and evidence replace diff reading
Section titled “Moving from L3 to L4: spec and evidence replace diff reading”Budget the most time for L3 → L4, where safety depends on separating the verification oracle from the authoring agent:
- Write machine-runnable acceptance criteria turning stories into failing checks before coding (acceptance criteria).
- Protect the oracle structurally with
CODEOWNERSon test directories,.github/, andloops.yaml, backed by hooks or sandbox deny rules (protecting the oracle, oracle strength). - Enforce a CI-checked evidence bundle proving spec delta, criterion-to-check results, touched oracle files, and command output (the evidence bundle).
- Layer automated PR review (Claude Code Review, Codex GitHub review, or Cursor Bugbot) on every PR (agent PR review).
- Transfer trust in stages through shadow, random 1-in-5 sampled, and evidence-only review (trust transfer).
- Drill the rollback in staging and record recovery time before signing off.
For strictly low-risk L4 → L5 loops, add conditional auto-merge, progressive delivery with automatic rollback (review and ship), and closed-loop triage opening scoped intents through the same merge gates (automation), validated with a synthetic breach drill.
How to verify a transition worked
Section titled “How to verify a transition worked”DORA’s 2025 report (Google Cloud, September 2025) found AI adoption improved throughput alongside a persistent negative relationship with delivery stability. Verify four signals at every promotion:
- 30-day level distribution: report merged change shares per rung—never average the repo into one number.
- Paired stability guardrail: compare per-loop revert and change-failure rates against baseline.
- Random 10-PR audit: sample ten merged PRs and verify every required artifact holds up.
- Automated harness audit: run
npx @wondelai/harness-audit --cito confirm repository controls match the claimed rung (harness audit guide).
Failure modes when climbing the ladder per repository
Section titled “Failure modes when climbing the ladder per repository”- Choosing a trivial pilot loop. Typo fixes prove nothing. Recovery: pick a production-relevant loop with real tests and regular volume.
- Promoting the whole repository at once. Recovery: scope every promotion strictly to one entry in
loops.yaml. - Letting the agent edit its own oracle. Recovery: demote to L3, lock test/CI paths via
CODEOWNERSand hooks or sandboxes, and restart the 30-day clock. - Outrunning the review queue after L3. Recovery: enforce the PR size cap, halt parallel dispatch, and stabilize the review queue.
- Turning artifacts into empty paperwork. Recovery: delete unread template fields and fail CI on missing command results.
- Locking gates inside one vendor UI. Recovery: keep
AGENTS.md,loops.yaml,CODEOWNERS, and CI checks in Git so every tool faces identical enforcement.
Official documentation and next steps
Section titled “Official documentation and next steps”Verify current CLI flags, worktrees, and cloud execution options in Claude Code docs, OpenAI Codex docs, and Cursor docs.
Did this guide help you?
One tap, no sign-in.
What will you do with it?
How did it read?
What got in the way? Pick any that apply
Your role?
Thanks. I read every answer. Michał Jaskólski
Did this guide help?
One tap each. Close whenever you like.
no sign-in