# Eight Years of Wanting, Three Months of Building with AI

Lalit Maganti (Google, PerfettoSQL maintainer) spent 8 years wanting to build proper SQLite developer tools but never starting — the work was too tedious. With AI coding agents, he built and shipped syntaqlite in 3 months. But the path included a full month of vibe-coded prototype that had to be thrown away entirely, and the post is unusually honest about both where AI helped and where it actively hurt.

## The two phases

**Phase 1: Vibe coding (January 2025).** Delegated everything to Claude Code on the Max plan. Got a working prototype: C parser extracted from SQLite sources, formatter, PerfettoSQL support, web playground, 500+ tests. But the codebase was "complete spaghetti" — unclear architecture, functions scattered across files. Proved the approach was viable. Required complete rebuilding.

**Phase 2: Disciplined AI use (February–March).** Rewrote in Rust with himself as architect. AI became "autocomplete on steroids" — he made all design decisions, did upfront architecture work, set up validation scaffolding, and reviewed every output. The result shipped as syntaqlite 0.1 in mid-March.

The contrast between these phases is the article's core data point. Same person, same AI tools, same project — radically different outcomes depending on whether a human was doing the design work.

## Where AI delivered

**Overcoming inertia.** The project sat for 8 years because extracting SQLite's ~400 grammar rules and building parse trees was tedious but demanding. AI turned abstract paralysis into concrete prototypes. "I work so much better with concrete prototypes to play with and code to look at than endlessly thinking about designs in my head." This alone justified the vibe-coded month — even though the code was thrown away, it broke the inertia.

**Obvious code, fast.** Implementing functions that match a specified behavior and interface. Formatter rules were the sweet spot: with scaffolding that let him verify output in minutes, iteration was remarkably fast. AI also maintains consistent style and documents things humans would skip.

**Cheap refactoring.** Because generation is fast, refactoring becomes affordable. Continuous refactoring during phase 2 prevented debt accumulation — the lesson learned painfully from phase 1 where insufficient refactoring compounded into an unredeemable mess.

**Domain bridging.** Learning Wadler-Lindig pretty-printing algorithms, unfamiliar Rust tooling, VS Code extension APIs — topics that would take days of independent study compressed into hours of focused conversation. He could ask "why does this work?" until he actually understood.

**Feature completeness.** Beyond the core tool: editor extensions, Python bindings, WASM playground, documentation site, multi-ecosystem packaging. AI freed mental energy for UX — error messages, formatter defaults, CLI intuitiveness — the things that separate tools people adopt from tools they try once.

## Where AI hurt

**The addiction loop.** Slot-machine psychology: send a prompt, wait for the result, chase the dopamine hit of "one more prompt." Fatigue intensifies the cycle — tired prompts are vague, vague prompts produce bad output, bad output makes you more tired. Maganti says this loop can be slower than manual implementation but is psychologically hard to exit. This is the most under-discussed failure mode of AI coding.

**Loss of mental models.** When AI writes most of the code, you lose track of which functions call which, what small decisions accumulated, where the boundaries are. Communication with AI degrades: instead of "change FooClass to do X" you say "change the thing doing Bar" and the agent has to guess. The mitigation: read code immediately after implementation and actively consider alternatives.

**Design decision deferral.** Because refactoring felt cheap, Maganti postponed architectural choices. But deferral corroded his ability to think clearly — the codebase stayed confusing even though rework seemed costless. Phase 1 exemplified this: early architectural decisions would have accelerated convergence dramatically.

**False test security.** 500+ generated tests created false confidence. Tests catch foreseeable edge cases. Without sound architecture, unforeseen bugs appear relentlessly. The phase 1 prototype had extensive tests and still required complete rebuilding. Tests are necessary but not sufficient — architecture is the load-bearing structure.

**No historical context.** AI sees the current codebase but doesn't feel how APIs evolved, why decisions were made, what past mistakes taught. This prevented consistent API design and allowed repeating previous mistakes. Senior engineers carry this context naturally; AI requires exhaustive documentation that humans won't maintain.

## The expertise hierarchy

Maganti identifies four zones of AI effectiveness:

1. **Deep expertise** (parser rules) — AI excels. You evaluate instantly, catch mistakes before they land, iterate fast. Best case.
2. **Articulable needs, missing knowledge** (Wadler-Lindig) — AI works if you engage actively. Can't passively accept results; must evaluate direction and learn iteratively.
3. **Don't know what you want** (early architecture) — AI leads you down dead ends that consume weeks. Worst use of AI time.
4. **No objectively verifiable answer** (API design) — AI fails critically. Design requires taste. Days spent correcting AI's API choices that "worked" but were unpleasant to use.

## The relativity framework

Local code (functions, classes) looks Newtonian — straightforward, testable, AI handles it. Zoomed out, architecture curves like spacetime — local correctness doesn't guarantee global coherence. Knowing where you sit on this axis determines whether AI is a multiplier or a trap.

"AI is an incredible force multiplier for implementation, but it's a dangerous substitute for design."

## Connections

This is the most detailed first-hand account in the wiki of the vibe-coding-to-discipline transition. [[cult-of-vibe-coding]] makes the same argument from the outside (Cohen critiquing Claude's team); Maganti lived it and documents the exact failure modes.

The addiction loop and loss of mental models are failure modes that [[human-in-the-loop]] is designed to prevent — though HITL is usually framed as a safety mechanism, here the "human in the loop" is protecting code quality by maintaining architectural understanding.

The false test security observation connects to [[byzantine-fault]] thinking: tests are a validator, but they only catch faults you anticipated. Architectural coherence is a different kind of correctness that no test suite can fully verify.

[[bryan-cantrill|Bryan Cantrill]]'s [[peril-of-laziness-lost|"The Peril of Laziness Lost"]] gives a name to what went wrong in phase 1: laziness lost. Without the constraint of human time forcing simplification, the LLM produced a layercake of garbage — exactly what Maganti experienced before switching to architect-led development in phase 2.

"Design can't be delegated" is Maganti's lived restatement of Brooks' [[no-silver-bullet|essential difficulty]] — specification, design, and testing of the conceptual construct is where the hard work lives, and LLMs don't do it for you. [[no-silver-bullet-llms|James Bennett]] makes the same argument theoretically using DORA/CircleCI/METR data.

[[agentic-coding-fatigue]] names the addiction loop directly: Maganti's phase 1 is the gacha schedule 0xsid describes, and the four-or-five-hour daily ceiling explains why the addictive variant felt productive while quietly burning him out.
