Artifact 93043b0c97c070209aabaa2642a7cf07179b6bb2b6da00d1f866cffa05a1a97f:
- File docs/design/keel.md — part of check-in [3f1d6de982] at 2026-11-21 17:21:54 on branch keel-method — Record every source file's tier and enforce it: ci/tiers.tsv, ci/tiers.allow, test/pic/tiers.sh in make test-docs, docs/dev/tiers.md, docs/design/keel.md (user: dmestas, size: 1824) [annotate] [blame] [check-ins using] [more...]
Keel: what pic builds and what it hosts
Status: adopted 2026-11-21
The full study, with the sorting test, the hard cases and the first audit, is at https://artifacts.craftdesign.group/v/7AcFU37QOBvcGyD3TEMpp#8b97a2dfe17cd12d8d19f2b890bd60dc80e77ed6cfa7b22a13851a27c01d9630. The manifest and its checks are in tiers.
The principle
Core records and enforces; components decide. Core holds the mechanisms that make an agent durable, recoverable and observable. It holds no decision whose right answer depends on a model, a vendor's API or price list, or the current way of prompting. A decision is journaled before it takes effect, recovery reads the record and never asks the component again, and core runs with no components.
Tiers
- core: every build has it; changes when durability, SQLite or the operating system require it.
- bundled: ships and is on by default, reaches core only through a published seam, can be turned off or replaced.
- external: a separate tool with its own release schedule, speaking hooks, RPC or the extension host.
- data: rows or files with no code (catalogs, prices, prompt text, themes, keymaps), updated without a release.
main.c is the composition root and may name everything. The terminal interface (src/tui/) is a
client.
The component ladder
Lowest rung that works: data, then a hook, then a protocol client, then a C interface, then the extension host.
The tier-line rule
A capability is not core by default. Every ticket or design note that adds one carries a line:
Tier: ... Clock: ... Record: ... Default: .... A Tier: core line needs a design note in this
directory with a status line. A new seam goes to the owner; a new component on an existing seam
does not. Tiers move both ways, by a recorded decision.