docs(system): naming, versioning, deprecation, system plugin trust laws
b507c00dda514f18f1720c59c093a6950eb94dd2
Oliver Jan Krylow <oliver@bugabinga.net> ·
unsigned
- Parent 1: c49c78fe4779
There are many coding harnesses - but this one is fast
b507c00dda514f18f1720c59c093a6950eb94dd2
Oliver Jan Krylow <oliver@bugabinga.net> ·
unsigned
+20 / −0 text lines
+4 / −0 text lines
11. Interfaces are the ecosystem unit: contracts publish, implementations swap, binding is explicit (OCaml, Java Collections).13. World-first: the WIT world is the only API; no smith-authored SDK ships before 1.0, and an SDK stays optional forever — comfort through raw bindgen is a design requirement.14. One world major for the host API (`smith:plugin@N`); plugin-published contracts carry their own majors; versioning every interface separately recreates classpath chaos for no benefit.15. Deprecation is metadata with a named replacement and a removal major; enforcement is mechanical at `smith plugin check`, never a breaking change by itself.16. Flat interfaces inside one world; the fixed `namespace:package/interface` hierarchy is all the structure a world needs.17. Trust flows through the distribution channel — embedded and release-signed, or installed and hash-recorded — never through runtime privilege.+16 / −0 text lines
## System pluginsSystem plugins ship inside the smith release artifact, hash-pinned at build time; their trust is the release signature, transitively.They get no runtime privilege: same sandbox, loader, fuel, and grant model as user plugins.The `smith:` package prefix is reserved; external artifacts exporting `smith:` contracts fail validation with a concrete fix.Product default grants — for example net-scope for the OAuth plugin — are configuration shipped by the product, not runtime privilege.Trust tiers: embedded (signed with the release), installed user (hash recorded at install, grants at install), project (trust-gated before enumeration, grants at trust time).- Two layers: a core world every plugin sees, plus granted capability interfaces — HTTP via net-scope, credential exchange via secret-proxy, logging — imported only with matching grants.- Flat interface set inside one world: `http`, `secrets`, `log`, `stream`, `contrib`; resources carry methods, no prefix hierarchies. Grouping pressure means an interface is too wide.- One world major: `smith:plugin@N`; breaking changes bump the world, additive changes stay inside it. Plugin-published contracts carry their own majors (`owner:name@major`). The host embeds the previous world during a deprecation window.- Deprecations are metadata: `@deprecated` with since and removal versions plus a named replacement; deprecated items stay functional until the next world major; `smith plugin check` fails new builds targeting them.- Append-only inside a major: add functions, never edit signatures or records; supersede with a new function and a deprecation marker.- Names follow verb-noun functions, noun types, no abbreviations; symmetric verb pairs; `open` for acquired handles, `create` for pure values; faults are nouns.- Parameter order is data first, options record last.- One world-wide glossary distinguishes near-synonyms: secret, credential, chunk, frame, provider, effect.