← ClaudeAtlas

06-core-blessed-primitive-scaffold-redirecting-gate-three-layer-listed

CORE — never delete. Trigger whenever a concern repeats across a codebase (soft-delete cascade, list query, CRUD table, derived types, any hand-rolled pattern an AI will re-implement slightly wrong each time) and you're tempted to write it inline again, OR when designing how future features should be born correct. Defines the RAILS-NOT-FRICTION law and the three-layer model — ONE blessed reusable primitive + a scaffold that emits it by default + a redirecting gate that fails the bypass and names the blessed call — so the laziest/cheating model produces correct code by default. Generic; stack-specific kits cite this.
markkennethbadilla/public-agent-provisioning · ★ 0 · AI & Automation · score 72
Install: claude install-skill markkennethbadilla/public-agent-provisioning
# Three-Layer Model — Blessed Primitive + Scaffold + Redirecting Gate (CORE) **Governing law — RAILS NOT FRICTION.** An LLM copies the nearest pattern and takes the shortest fluent path. So make the CORRECT path the shortest and most-copyable; never make correctness a maze. Design for the weakest, laziest, cheating model — if correct is also easiest, it wins by default. Gates are a rare backstop that REDIRECT, never the everyday surface. 1. **Layer 1 — ONE BLESSED PRIMITIVE per concern**: for each repeated concern, expose exactly one battle-tested reusable call (registry/helper/component) as the single correct path; delete every rival inline reimplementation so there is nothing worse to copy. 2. **Layer 2 — SCAFFOLD emits the blessed call by default**: new features are born correct — the generator/template wires the primitive automatically so the path of least resistance already passes; the AI types nothing custom for the solved part. 3. **Layer 3 — REDIRECTING GATE fails the bypass and NAMES the fix**: a deterministic check (Tier-B) or physical block (Tier-A) detects the hand-rolled bypass, exits 1, and prints the exact blessed call to use instead — redirect, never just deny. 4. **Make blessed = shortest = most-copyable**: if the wrong path is fewer keystrokes or more obvious, the model takes it — shorten and surface the blessed call until it's the obvious copy target; un-fluent correctness is a design defect. 5. **Derive, never duplicate**: the primitive should de