The Table That Kept Getting Copied
The list of assistant brains — their identifiers, their display labels, which effort levels each accepts, which endpoint each uses, what payload defaults each needs — is needed by the engines in Python, by the web clients in TypeScript, and by a native app in Swift.
Written by hand three times, this table has one guaranteed future: somebody adds a brain to one language and not the others, and nothing anywhere notices. The failure is not a crash; it is a picker that offers four options where another offers five, which reads as a product inconsistency rather than as drift.
So it is one data file, and the deploy renders it into all three languages on the way out. Not a build step in each consumer — a transform inside the same script that delivers everything else, so the same drift check that guards hand-written copies also guards these.
Validate at the Narrowest Point
The transform parses its source and asserts the shape before rendering anything: every entry carries the required fields and no extras, identifiers are unique, every effort list is non-empty, every route path looks like a route, and every alias points at an entry that actually exists.
Put that validation anywhere else and it is either absent or triplicated. Put it in the transform and a malformed catalog produces a failed deploy with a readable message — instead of three generated files that compile perfectly and misbehave at runtime in three different languages, each requiring its own debugging session to trace back to one bad line in a data file.
The Copy That Appeared Inside the Kit Itself
Worth recording because of where it happened. The alias map — the small table that says one brand name means one tool name — was generated correctly into every language. Then a shared component needed to compare two brain values, and rather than call the generated helper, it hand-mirrored the alias map inline. A fourth copy of the vocabulary, inside the repository whose entire purpose is to prevent fourth copies.
The lesson is not that somebody was careless. It is that generating a data structure is only half the job: unless you also generate and export the operations on it — the comparison, the normalization, the lookup — every consumer that needs one will write it, because writing three lines is easier than discovering that the three lines already exist somewhere.