Design as Code: The Engineering Problems Nobody Warned Me About
The thesis behind Caret is straightforward enough to fit in a sentence: design and code should be the same thing, not two separate artifacts maintained in parallel that inevitably drift apart. But the
engineeringwithprecious.hashnode.dev9 min read
The move from regex replace to AST editing keyed off a stable node id is the right call, and the "Submit" example shows why: text matching has no way to tell a button from a test assertion or a prop name. The broader point about pushing pieces from probabilistic to deterministic wherever a wrong edit is expensive is one I wish more agent tooling took seriously. On the compositional drift across pages, that feels like exactly the thing you would want a check on at generation time, comparing spacing and structure against your component definitions rather than hoping the tokens hold.