# I Ranked Cloudflare's Software Factory and Wow… S TIER TOKENOMICS <!-- ref: @content/youtube/indy-dev-dan/2026-06-20-cloudflare-software-factory-s-tier-tokenomics version: 3 updated_at: 2026-10-31T19:23:28.567Z --> IndyDevDan (Indy Dev Dan, 2026-06-20): Cloudflare ran **130,000 AI code reviews across 5,000 codebases in a single month at a median cost of $1 per merge request**, with reviews completing in about 3 minutes. *Synthesized from IndyDevDan on Indy Dev Dan, 2026-06-20.* IndyDevDan tears down Cloudflare's AI code-review system — documented in an engineering blog post he credits to Ryan Skidmore — and grades each component F-through-S on a tier list of agentic engineering disciplines. ## Core Thesis Cloudflare ran **130,000 AI code reviews across 5,000 codebases in a single month at a median cost of $1 per merge request**, with reviews completing in about 3 minutes. IndyDevDan argues the achievement is not a novel orchestration pattern — theirs is a plain fan-out/fuse delegation — but **tokenomics**: spending tokens, generating value, and arbitraging that value for more than it cost. The mechanisms that get them there are agent specialization, a three-tier model stack, aggressive context engineering, and risk-scaled compute. ## Key Insights - **The constraint being attacked is review, not planning.** A merge request sits in a queue, a reviewer context-switches in, leaves nitpicks, the author responds, repeat — median wait for first review measured in hours. AI review compresses that first pass to minutes and either hard-blocks or lets work through. - **They did not start well.** Off-the-shelf AI review tools lacked the flexibility an org of Cloudflare's size needed; naive vibe-coding (shove the diff into a half-baked prompt) produced hallucinated syntax and vague "consider adding error handling" noise. The fix was a **CI-native orchestration system built on OpenCode**, chosen because they already used it internally, it is open source so they can upstream fixes, and it has an SDK for programmatic sessions. - **Seven specialized reviewer agents**, not one generalist with a giant prompt: security, performance, code quality, documentation, release management, and compliance with their internal engineering codex — managed by a **coordinator agent** that dedupes findings, judges them, and posts one structured review comment. - **A composable plugin architecture** where the entry point delegates all configuration to plugins. Each plugin implements a three-phase lifecycle — bootstrap, configure, post-configure (running after config is assembled) — with a JSON config file loading it all. This is the agents-plus-code layer that makes one system serve 5,000 repos while staying customizable. - **JSONL, not JSON or YAML, for agent output.** A JSONL file is valid at every append, so it is streamable and actionable mid-run; JSON forces you to buffer and hope for the closing bracket. They act on stream triggers like `step-finish` to track cost, catch errors, and fire retries — a finish reason of `length` means the model hit max tokens and was cut off mid-sentence, so retry. - **Shared context beats duplicated diffs.** PR diffs are written to a file path, and each sub-reviewer reads only the patch relevant to its domain plus a shared context file. Duplicating a moderate merge request across all reviewers would multiply token cost roughly **7x**. They also strip large files (lockfiles, bundled JS) so an agent cannot accidentally blow up the cost curve. - **Compute scales with risk.** Trivial changes (<10 lines, <20 files) get just the coordinator plus one generalist reviewer. A light tier (<100 lines, <20 files) adds code quality and documentation. The full specialist suite fires only above 100 lines changed or 50 files. - **A three-tier model stack** — state-of-the-art, standard workhorse, lightweight — assigned by task complexity, with Kimi K2.5 on the lightweight tier. Top-tier models consume roughly half the token spend. IndyDevDan's blunt version: you cannot run Opus for everything and still have a business, especially for out-of-the-loop work where agents run while you are AFK. - **Prompt engineering names the negative space.** Each agent's prompt scopes not only what to look for but what to ignore — no syntax nitpicks, no non-functional commentary. Findings come back as structured XML with a severity classification. IndyDevDan admits he under-uses the what-to-ignore technique himself. - **The coordinator verifies rather than trusting.** Its filter targets speculative issues, nitpicks, false positives, and conventions that contradict findings — and when unsure, it spends tokens reading the source directly to check. - **The system is biased toward approval.** A warning on an otherwise clean MR yields approve-with-comments, not a block. A human commenting `break glass` forces approval regardless of what the AI found — an escape hatch IndyDevDan praises, since it is only a matter of time before someone must override the system. - **Findings can be argued with.** A developer replying "won't fix" or "acknowledge" resolves the finding; replying "disagree" makes the coordinator read the judgment and either resolve or argue back. - **Resilience is engineered, not hoped for**: per-task timeouts, an overall retry budget, an error-classification step deciding whether a failure warrants a model fallback or is something a different model won't fix, coordinator-level fallbacks, and a CI job that refetches model configuration so a provider outage or rate limit can be routed around. Re-reviews after new commits are **incremental** — the coordinator carries the previous review's context instead of starting over. - **Measured value**: about 8,000 critical issues found. The code-quality agent produced roughly 6,000 of them; the security agent found around 400 but flags the highest *proportion* of critical issues. Total token usage ~120 billion, with cache reads high enough that IndyDevDan singles them out as the thing he most wants to study. - **Where he docks points**: a single custom tool (`spawn reviewers`) does all the orchestration work — he questions whether that should be a tool at all versus plain code or several tools (custom tools: C). The system leans on `agents.md`, a file that applies to every agent in the repo and rots fast; their remedy is an agent that yells at developers who make architectural changes without updating instructions, which IndyDevDan calls the opposite of self-improvement (self-improving: F, human-out-of-the-loop: C). Always-on: C. Spend-to-learn: C — inherently in tension with optimizing for cost. - **Final tier list**: tokenomics S, system resilience S; context engineering, prompt engineering, agent observability (Braintrust distributed tracing), model flexibility, extensible factory, agents-plus-code, and agent specialization all A; multi-agent orchestration, harness engineering, and developer experience B; overall grade A — with nothing in his "ZTE" legendary tier, which he says he has not yet seen anyone reach. ## Actionable Takeaways 1. Split review into domain agents with tightly scoped prompts that state both what to flag and what to ignore, and require structured output with a severity field. 2. Write agent output as JSONL so the stream is valid and actionable at every append; hook `step-finish` for cost tracking, error detection, and retry, treating a `length` finish reason as a truncation retry signal. 3. Give each sub-agent only the diff patch for its domain plus one shared context file. Duplicating the full diff N ways multiplies cost by N. 4. Gate agent count on change size — a couple of thresholds (lines changed, files changed) is enough to keep trivial diffs off the full specialist team. 5. Build a three-tier model stack and assign by task complexity, plus a config-fetch job so you can swap providers when one degrades. 6. Bias the merge decision toward approval and ship an explicit human override (`break glass`) so the AI can never hard-block the team. 7. Make re-reviews incremental by passing the prior review's context to the coordinator instead of re-reviewing from scratch. 8. Instrument per-agent value, not just spend: which agent found the critical issues is the number that justifies the pipeline. ## Notable Quotes > "Code review is a fantastic mechanism for catching bugs, but it's also one of the most reliable ways to bottleneck an engineering team." — Cloudflare engineering blog, read aloud by IndyDevDan > "Don't send in the dream team to review a typo fix." — IndyDevDan > "Many specialized agents always beat one generalist." — IndyDevDan > "If you're building oneshot systems that you think are going to work 100% of the time, you're just vibe coding." — IndyDevDan > "What is the planning and review constraint? It's us. It's you and I. We are the constraint now." — IndyDevDan --- *You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).* *Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*