"""view_templates.py — WAVE 23 item 7 (ruling R10, contract C12): the PLATFORM-CURATED template registry. WHAT A TEMPLATE IS, precisely, because the word is overloaded: a named bundle of SAVED VIEWS that a user applies to a database they already have. It does NOT create a table, it does not add columns, and it does not connect anything. It is the answer to "this database has 30 columns and I do not know which twelve matter for chasing money" — a starting layout, authored once by the platform, applied by whoever wants it. ⛔ THE ONE RULE THAT DECIDES EVERY DESIGN CHOICE HERE — `_seed_wave17.py`'s :9-20 law: **only VIEWS are shared; `fields` and `overlays` are strictly per-user.** So a SHARED view that filtered on a user-created column would, for every other account, name a column that does not exist — and an unknown column is an INACTIVE leaf in the tri-state filter engine, which is IGNORED, which WIDENS. A "Collections focus" that quietly showed the whole customer book to everyone but its author, with nothing going red. Two consequences, both load-bearing: 1. **Applying writes the CALLING USER's own views** (`save_view(..., shared=False)`), never shared ones. A template is a convenience, not an administrative act, and the moment it wrote into the shared bucket it would need an admin wall and a name-collision policy across the tenant. 2. **Every column a template names is checked against the TARGET's live contract before anything is written**, and a template whose columns are missing is REFUSED with them named — never applied partially, never applied with the offending leaf dropped. That check is also what makes eligibility honest: `source` below is a label for grouping, the COLUMNS are the gate, and the two cannot disagree because only one of them is consulted. IDEMPOTENT BY PINNED ID. Every view carries `tpl_