Proto UI's Bitter Lesson
What went wrong when our AI governance scaffolding grew ten times larger than our core runtime, why we deleted 310,000+ lines, and how we are changing our engineering loop.
2026-11-29 · Engineering Retrospective
In 2019, Rich Sutton wrote The Bitter Lesson: researchers repeatedly try to encode clever human heuristics into their systems, enjoying a short-term feeling of control—only for general methods and compute to sweep past them, turning the hand-crafted complexity into dead weight.
In late 2026, we lived through the software-engineering version of that lesson on Proto UI.
This is not a victory lap. After publishing Proto UI 0.2.0 on August 13, 2026, our repository ran at blistering speed—thousands of commits and more than two thousand issues and pull requests—yet more than three months passed without cutting the next stable release.
Our problem was never raw output. Our problem was effective delivery.
A bureaucracy ten times larger than the engine
Section titled “A bureaucracy ten times larger than the engine”When we stopped on November 29, 2026 and measured what had accumulated in the repository, the numbers were hard to ignore:
| Area | Before cleanup | Reference point |
|---|---|---|
scripts/coverage-matrices/ | 57,632 lines (12,416-line checker + 20,001-line test file) | packages/core/src/ is 5,590 lines |
.github/workflows/ | 83 workflows (dozens of per-component *-evidence.yml files) | Fewer than 15 core/release/cycle workflows needed |
| Agent control plane | 41 skills, 16 JSON schemas, plus a self-exam CLI | Only 7 domain guides carried real engineering value |
internal/records/ | 1,582 files of process logs, receipts, and attempt diaries | Only 205 referenced design memos and benchmarks |
Trying to stop coding agents from taking shortcuts, we had layered on:
- Full-file SHA-256 source allowlists and 28 JSON provenance tombstones pinning historical file hashes;
- Custom symlink/NUL-byte parsers,
libseccompsocket blocking, andffmpeg 6.1memfd video-frame sealing inside coverage scripts; - Dozens of single-component
*-evidence.ymlworkflows—some nearly 900 lines of YAML—backed by thousands of lines of meta-tests asserting exact YAML step names and checksum commands; - A 41-skill workflow state machine with handoff envelopes, readiness tokens, and self-assessment exams.
Every individual check began with good intentions. A model skipped a test once, or missed a screenshot, or overclaimed a result, so we added another gate. Stacked together over months, those gates changed the nature of the repository.
The four traps that drained our velocity
Section titled “The four traps that drained our velocity”1. Gates became a one-way ratchet
Section titled “1. Gates became a one-way ratchet”In AI-assisted engineering, adding a guard or schema always looks thorough, while deleting one looks like lowering standards. Every past bug left behind a permanent workflow, allowlist, or checklist long after the fix shipped.
Worse, we used the wrong threat model: we applied adversarial cryptographic anti-tampering controls to solve ordinary model laziness. In practice, static SHA-256 source pins and tombstone files broke legitimate refactors far more often than they caught real bugs.
2. Hash locks trained models to weld shims and write legalese
Section titled “2. Hash locks trained models to weld shims and write legalese”When deleting or moving a file breaks static fingerprint checks, models quickly optimize for the path of least resistance: leave dead code behind compatibility shims, append another tombstone file, and pad every commit and document with defensive legal disclaimers (“does not claim, prove, establish, or substitute for…”).
The codebase grew thicker while the abstractions we actually cared about drifted further apart.
3. Giant PRs and heavy feedback loops reinforced each other
Section titled “3. Giant PRs and heavy feedback loops reinforced each other”Multi-thousand-line PRs spanning dozens of files collided with full-repo static scans, chained per-component CI workflows, and 20 browser shards. Leaving a branch open for two days meant wading through merge conflicts and unrelated red jobs. Agents spent more tokens proving compliance and patching cascading test failures than improving components or compilers.
4. Iterating in a spec vacuum without consumer pull
Section titled “4. Iterating in a spec vacuum without consumer pull”The subtlest trap was shipping cadence. Without a real dogfood application and frequent releases forcing hard trade-offs, it is tempting to keep polishing abstractions toward theoretical completeness across every host and component family before cutting a version. Abstractions expanded upward while users were still installing a release from more than three months earlier.
What we kept—and what we deleted
Section titled “What we kept—and what we deleted”Learning from this does not mean abandoning engineering rigor. Every load-bearing invariant in Proto UI stayed intact:
- Definition-first:
spec/**remains the machine-governed source of truth for component interaction semantics. Prototypes and adapters implement shared definitions independently. - Thin Compiler: Our 0.4 compiler lowers shared definitions through compile-time IR into native target code—no hard-coded component dispatch and no second framework runtime.
- Real behavioral tests: Unit tests, cross-adapter conformance tests, and real browser suites stay in place—just consolidated instead of wrapped in 14 separate Astro-rebuilding YAML pipelines.
- Strict release lockstep: Exact public package versioning, manifest checks, and reproducible release workflows remain untouched.
What we retired was the ~317,000 lines of temporary agent-policing tax (PR #2032 and PR #2033):
- Replaced the 57k-line SHA-256 coverage checker with lightweight consumer-matrix rendering and production bundle-graph checks;
- Reduced
.github/workflows/from 83 to 13 (fast minute-level PR checks, with all production browser suites consolidated into sharded Nightly jobs underci-production-suites.yml); - Slimmed 41 workflow skills and 16 schemas down to 7 focused domain skills and a concise ~85-line
AGENTS.md; - Pruned 1,377 unreferenced historical log files from
internal/records/while preserving all 205 cited records (and keeping full history in Git).
How we are working now
Section titled “How we are working now”We distilled the lesson into five concrete rules in AGENTS.md:
- Guard architectural invariants, not ceremony. Bureaucratic state machines designed around yesterday’s weaker models depreciate fast and slow down stronger models and human contributors alike.
- Test observable behavior, never source hashes. Assert runtime semantics, types, spec graph integrity, and build outputs—never freeze source files with SHA-256 allowlists.
- Ship small PRs (~50–400 lines) and delete dead code cleanly. Merge focused vertical slices linearly onto
mainonce lightweight PR CI and DCO pass. Accept red intermediate states during refactors instead of welding compatibility shims. - Keep the inner loop in milliseconds. Verify core logic locally with focused unit and conformance tests; let Nightly CI own multi-hour browser shards and full site builds.
- Release early, pulled by real consumers. Cut frequent releases when a useful slice works, and let real apps and user issues set priorities instead of waiting for all-platform theoretical completeness.
Models will keep getting stronger and tooling will keep getting faster. Our job is to invest that momentum into the interaction protocol, the thin compiler, and real components people actually install—not into taller walls of compliance theater.