1. The substrate is the asset; the model is an interchangeable client. Optimize the durable store: its retrieval quality, its history, its governance. Treat every model as a swappable client that reaches memory through one interface. When a better model ships, you point at it and keep everything.
2. Eval-first.
Define the metric, the golden set, and the baseline before tuning anything.
A change that falls below the locked baseline doesn't ship, no matter how
much better it feels. (eval/run_benchmark.py --check is this principle as
a CI job.)
3. Small interfaces, composed.
Retrieval is four small stages, not one clever function. Small stages are
testable in isolation, swappable without collateral damage, and blameable
when a metric moves. The same logic gives every external capability a
four-method-or-fewer interface in adapters/base.py.
4. Adversarial boundaries. Treat everything outside the substrate as hostile until proven otherwise: fetched web content is data, never instructions; external findings are quarantined until vetted; the gateway scopes every caller and exposes no write paths. Those boundaries are enforced mechanically (extractive synthesis, table separation, database roles, and refusals), not by convention. Operator secrets stay out of the store because nothing persists them; keeping secrets out of ingested content is a deployment responsibility, named in the threat model rather than simulated here.
5. Portability by adapters, with one honest exception. Every adapter in the registry is swappable: a registry entry and a secret, never a schema change. The exception is the embedding model, pinned per corpus because all vectors must share one space. Rotating it is a planned re-index, and the system refuses the mismatch rather than silently degrading. Naming where portability costs something is part of the design, not a gap in it.