Building Syntaqlite with AI: Real Talk on Devtools for SQLite πŸ”₯

Yo, dude, this post is goldβ€”Lalit spent 8 years dreaming of killer SQLite devtools (formatter, linter, LSP), then crushed it in 3 months (~250 hrs) using AI agents like Claude Code. But it's no fairy tale; he breaks down the wins and the pains. Let's unpack the big ideas without the hype. πŸš€

WHY SQLite Devtools Sucked (The Pain That Killed Motivation) πŸ’€

Before: SQLite powers everythingβ€”phones, browsers, embedded systemsβ€”but devtools? Trash.

  • No reliable parser: Existing ones approximated SQL, broke on edge cases (e.g., ate comments, ignored virtual tables).
  • No formal spec or stable parser API. SQLite skips parse trees entirely, jumps straight to bytecode. 🀯
  • Dense C codebase: 400+ grammar rules, fiendishly hard to grok.
  • Result? Formatters/linters slow, unreliable. For Lalit's PerfettoSQL (SQLite extension), workarounds everywhere.

The "ohhh" moment: Perfect parsing unlocks everythingβ€”accurate trees for formatters, linters, VS Code smarts like TypeScript. But solo? Too hard + tedious for side project. Bugs, tests, docs? Motivation killer.

PROBLEM (BEFORE)                  SOLUTION (SYNTAGQLITE)
════════════════                  ════════════════
    β”‚                                   β”‚
    β–Ό                                   β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Approx parsers ❌    β”‚  ───►   β”‚ Exact parse tree βœ…  β”‚
β”‚ Breaks on edges     β”‚         β”‚ Formatter/linter/   β”‚
β”‚ Slow, unreliable    β”‚         β”‚ LSP for *all* SQL   β”‚
β”‚ No PerfettoSQL      β”‚         β”‚ Rust-powered, fast  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

BIG PICTURE: What Syntaqlite Is & Where It Fits ⚑

Syntaqlite = High-fidelity SQLite devtools suite:

  • Core: Parser extracted from SQLite source (tokenizer + Lemon-generated grammar).
  • Built on: Parse tree (missing in SQLite) β†’ powers formatter (Wadler-Lindig pretty-printing), linter, validator.
  • Exposed as: CLI, LSP (VS Code/Zed extensions), Python/WASM bindings, playground.
  • Fits: Any SQLite user, extensible to dialects like PerfettoSQL.
SQLite SQL ──► Tokenizer (C) ──► Grammar Rules (~400) ──► Parse Tree ──► Devtools
                                      β”‚
                                      β–Ό (AI helped generate/map rules)
                          Formatter/Linter/LSP/Validator

Not a DB wrapperβ€”language tools like Prettier + ESLint for SQL, but SQLite-precise.

HOW AI Made It Happen (Mechanics + Wins) βœ…

Lalit vibe-coded first (delegate everything to Claude), got prototype + 500 tests, but spaghetti β†’ full Rust rewrite with him owning design.

Step-by-step AI workflow:

  1. Overcome inertia: AI prototypes fast β†’ concrete code to critique, not endless head-thinking.
  2. Churn obvious code: AI > human for "standard" stuff (docs, consistent style). Broke problems into "write func X with Y params."
  3. Refactor loop: Generate β†’ review β†’ AI refactor β†’ human taste-check. Constant, or codebase rots.
  4. Research TA: Explained Wadler-Lindig printing, Rust tooling, LSP APIs in convos. Hours β†’ minutes.
  5. Last-mile polish: Extensions, docs, packagingβ€”each a "weekend project," AI made 'em cheap.
  6. Scaffolding: Upstream SQLite tests (1.3k files) validate parser matches real SQLite exactly.

AI shine zones:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ AI KILLS IT βœ…               β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ β€’ Obvious impl (funcs/classes)β”‚
β”‚ β€’ Refactors at scale         β”‚
β”‚ β€’ Research/new domains      β”‚
β”‚ β€’ Parser rule gen (w/ review)β”‚
β”‚ β€’ UX prototypes             β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

            β”‚ "Relativity"
            β–Ό Knows what you know
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ AI SUCKS ❌                  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ β€’ Architecture/design       β”‚
β”‚ β€’ Taste (API feel)          β”‚
β”‚ β€’ History/time sense        β”‚
β”‚ β€’ Unverifiable tasks        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Result: Shipped complete (0.1 in Mar 2026). Without AI? Smaller, no extensions/docs.

The Dark Side: AI Costs & Pitfalls 😱

AI ain't free. Lalit calls it out raw.

Biggest traps:

  • Addiction loop: Slot machine vibesβ€”"one more prompt." Tired? Vague prompts β†’ slop β†’ more tries β†’ exhaustion.
  • Losing touch: Skip reading code β†’ mental model fades β†’ bad comms w/ AI ("fix the thing that does Bar").
  • Design procrastination: Easy refactor β†’ defer decisions β†’ confusing codebase β†’ clear thinking dies.
  • False security: 500+ tests? Still scrapped prototype. No crystal ball for edges.
  • No time sense: AI forgets evolution/history. Humans carry "why this API changed" implicitly.

Fixes he learned:

  • Own all decisions upfront.
  • Read/review every change.
  • Tight process: Design β†’ scaffold (lints/tests) β†’ generate β†’ refactor β†’ audit.
  • Stay "in touch"β€”manual code walks.
AI USER SKILL MAP              (Lalit's "Relativity")
═══════════════════════════════
Your Expertise ─────► AI Win %
Known + verifiable ─► 100% πŸš€ (parser rules)
Known + fuzzy ──────► 70%  (formatter)
Unknown ────────────► 20% πŸ’€ (arch)

LOCK IT IN: TL;DR πŸ”₯

  • Why Syntaqlite? SQLite huge, devtools weak β†’ exact parser unlocks pro tools.
  • AI force-multiplier: Impl/research speed β†’ bigger project, but you drive design/taste.
  • Golden rule: Concrete + verifiable = AI godmode. Abstract/global = human only.
  • Burn this: Vibe-code prototypes, rewrite structured. Refactor relentlessly or die.

Trackin'? Syntaqlite GitHub = here. Deeper on parsers/AI workflows? Hit me. πŸ˜‚


Original article

← All notes