0004. The kernel holds mechanisms; plugins hold policies
- Status: Accepted
- Date: 2026-10-29
- Plan: M3.6, M9, M10
- Review: The structural problem; Making Tenon plugin-first
Context
The goal is a language that agents extend themselves, built as a small kernel plus plugins. The original decision list mixed kernel features, a CLI language and an agent runtime, which contradicted each other in seven places.
Decision
The kernel contains only mechanisms that every feature depends
on: grammar and formatter; types, generics and nominal interfaces;
an unforgeable, attenuable capability type; the effect boundary
(step(state, event) returning state and actions);
fuel and deadline hooks; content hashes; the typed IR, plugin
verifier and diagnostics; and the generator sandbox, which is the
reference interpreter.
Anything with a number or a default in it is policy and lives in a plugin: budgets, retries, durability, grants, scheduling, compaction, providers, codecs.
There are five extension points: generators, platforms, intrinsics, backends and passes, and tooling hooks. Libraries and interface implementations are ordinary code. An extension point freezes only after three real plugins use it. Coherence is checked across the whole program, so bridge plugins are allowed, and interfaces are versioned per item rather than by one hash.
Alternatives considered
- Everything in the kernel — fast to start, but every app pays for the agent runtime, and the kernel never stabilizes.
- Plugins that extend grammar or semantics — rejected in ADR-0006.
Consequences
The agent platform must be buildable from public
extension points alone; that is the architecture's real test
(M12). Core plugins use the same extension points as third
parties.