Install contract (I0) — DRAFT
Status: consolidated 2026-08-24 — Sol and Kodo resolved the open questions from census evidence (two read-only crate/port censuses of this checkout). Chairs may still object; objections reopen the specific section.
Follows: A0 ontology contract (docs/ONTOLOGY_CONTRACT.md), goal A "Foundation before floors".
Evidence: crates/athanor-install/src/supervisor.rs (runtime_plan), crates/host/src/config.rs (akasha_enabled), crates/akasha/src/config.rs (embed defaults), House memory #3953.
1. The problem
No install declares which modules it has. Each component infers its own mode from a different signal.
- Host derives
akasha_enabledfromdatabase_url || nats_url(host/src/config.rs:101). A managed install always sets both. The flag cannot be false in practice. The declaration is dead. - Akasha defaults the embedder to one hardcoded loopback URL (
akasha/src/config.rs:25). The shape of a URL is the only Ollama signal. runtime_planhardcodes the child list and assigns one port per room (supervisor.rs:290-432). It carries duplicate-port checks that exist only because collision is possible.- Ollama does not boot with the House. After a reboot,
rememberfails until a hand starts Ollama (observed 2026-08-24).
The ship target adds selectable modes: vault, akasha, giga, omega. Four booleans give sixteen combinations. Inference cannot carry sixteen combinations. Declaration can.
2. The rulings (Sol, 2026-08-24)
- Modules are declared, never derived. The installer writes one manifest. Every component reads it. No component infers its mode from side effects of other configuration.
- A module owns four things: its processes, its schema, its config keys, its health checks. An absent module means those four things are provably absent. This is coding lesson #446 (every concern is a module) applied at install scope.
- One door routes rooms by name. Room identity is routing data, not network topology. A new room must not require a new port.
- Ollama boots with akasha. When the manifest declares akasha with a managed embedder, the supervisor owns the Ollama process.
- Live proof comes after the contract. The chairs review this draft first. Code follows consolidation. A live install test follows the code.
- The vault-mode spirit is minimal and file-backed (Sol, 2026-08-24). The spirit keeps identity and working memory as markdown files in the vault, and updates them itself. The same surface is the fallback when akasha is declared but the database is unhealthy. This gives hearth's
baseauthority mode its concrete meaning. - Vocabulary is free; capability is gated (2026-08-24). Types and wire shapes for a module may live in always-crates. The module gates its processes, its schema, its config keys, its health checks, and its mounted doors.
- The Host is house-scoped (2026-08-24). One Host process serves every declared room. The supervisor spawns one Host, never one per room.
- Cutover is atomic (2026-08-24). One quest lands the Host redesign, the deletions, the adapter fix, and config regeneration together. No dual-stack period.
- Anon is a toggle, not a module (Sol, 2026-08-24). The manifest does not carry it.
3. The design
3.1 The manifest
The installer writes one file into the mutable state root:
{
"modules": {
"vault": true,
"akasha": true,
"giga": false,
"omega": false
},
"embedder": "managed"
}
- The file is the single authority for module presence. Env keys configure modules; they never enable them.
- Dependency edges are closed and explicit:
akasharequires the database.gigarequiresakasha.omegarequiresgiga. The installer refuses an invalid combination at selection time. Sharp refusal at the front door, not a crash at boot. embedder: "managed"follows thedatabaseModepattern (managed | external). Managed means the supervisor spawns Ollama. External means the operator owns it. No URL sniffing.- The manifest lives in the state root. It survives upgrades unchanged (Sol, 2026-08-24).
- Version drift is boring by rule. A module absent from the manifest is off. An upgrade that ships a new module shows a new toggle, defaults off, and says so in the changelog. A rollback to a binary that does not know a manifest word warns "unknown module, treated as off" and boots. Warn and ignore, never refuse — a refusal on rollback strands the operator outside the House.
3.2 The consumers
Every component reads the manifest and nothing else for module presence:
- runtime_plan builds the child list from declared modules: postgres and nats for akasha, Ollama for
embedder: managed, nothing for absent modules. - Migrations apply per module. An absent module applies no schema.
- Health defines green per module. A vault-only install is green without a database.
- Hosts and organs mount doors per module.
gigatools do not exist in a non-giga install.
3.3 One door
athanor.exeowns one in-process multi-room Host.- The process is an independent peer: it does not launch OMP and owns neither OMP session lifetime nor terminal parenthood.
- The Host binds one declared loopback port.
- Every WebSocket and HTTP route starts with
/room/<room-key>. RuntimeConfig.host_portowns the port.HostRoomConfigcontains only the room key and spirit identity.- The installer converts the old per-room port format before it writes format 2.
protocol::is_safe_room_keyowns the Rust room-key grammar.- The OMP adapter receives one base URL and adds the validated room path.
- The Host uses one shared PostgreSQL pool.
- Unknown rooms have no route.
3.4 Ollama as a managed child
- One more
ProcessSpecinruntime_plan, gated onembedder: "managed": spawnollama serve, readinessTcp(127.0.0.1:11434), stopped with the rest in reverse order. - Named asymmetry: every other child ships in
version_root; Ollama is a system install resolved from PATH or a declared absolute path. This special case is load-bearing. Do not smooth it into the shipped-runtime shape.
3.5 Module ↔ crate mapping (consolidated 2026-08-24)
| crate | evidence | module |
|---|---|---|
hearth |
pure domain rules — census confirmed zero IO deps | always |
protocol |
wire shapes | always |
host |
the room server, the spirit's door | always |
athanor-install |
the installer itself | always |
gui-prototype/ |
Read-only web operator surface; bun gui-prototype/serve.ts proxies Host reads over loopback |
source checkout |
vault |
retrieval without a database — guarded by test (vault_recall_dispatch_has_no_database_parameters) |
vault |
origami, delivery |
NATS pointers, PostgreSQL bodies | akasha |
akasha |
PostgreSQL bodies and the managed-embedder client | akasha |
GIGA lives in four places: types in hearth/src/giga/, wire shapes in protocol, the worker in akasha/src/giga_worker/, a source-ledger surface in host. Ruling 7 makes this legal: the vocabulary stays in always-crates; the giga toggle gates the worker, the schema, and the mounted doors.
Named debt, in scope for I0: host hard-depends on akasha (host/Cargo.toml:19) with direct sqlx and NATS use. vault is reachable only through the akasha crate, so a vault-only install links no vault code today. Decouple the Host: it reads the manifest and reaches akasha through one module boundary; vault gets a direct consumer so ruling 6 has a body.
The markdown-spirit surface (ruling 6) lives with vault: the crate already owns the file authority.
3.6 The markdown spirit (Sol, 2026-08-24)
The surface is not new. It is the original pre-AKASHA room layout, kept today as the provenance layer: the identity file, the active-spirit file, the spellbook, and one memory/ folder of compact dated markdown files. Vault mode makes that layout first-class again. The spirit updates its own files.
Two organs never got a file-backed form and complete the mode:
- Sleep and wake: a boat is one more dated markdown file; wake reads the newest.
- Anamnesis: a rolling digest file compacted from the
memory/folder.
The akasha degraded fallback writes to the same files, so a database outage degrades to the original room, not to nothing.
The file contract, per room root (resolves open question 1):
| file | writer | format |
|---|---|---|
identity.md |
hand + spirit | free markdown, the always-true layer |
active_spirit.md |
host | fixed header (Agent / Operator / Embodied) |
spellbook.md |
spirit | familiar bindings |
memory/YYYY-MM-DD_slug.md |
spirit (remember) | YAML frontmatter title, written (ISO), kind; the body stands alone |
boats/YYYY-MM-DD_HHMM.md |
spirit (sleep) | same frontmatter; wake reads the lexicographic maximum |
anamnesis.md |
spirit | rolling digest compacted from memory/ |
The frontmatter is load-bearing for recovery: files written by the akasha fallback during an outage re-ingest into PostgreSQL mechanically. Filename plus frontmatter carry everything the database row needs.
4. Enforcement placement
- Installer: refuses invalid module combinations at selection.
- Supervisor: builds children from the manifest only.
- Components: read the manifest through one typed door (the
RoomSettingspattern from knobs, applied to install scope). Per coding#446 the manifest reader is one module with one public door; no component parses the file itself. - The derived
akasha_enabledexpression is deleted, not deprecated. The field itself survives (host/src/config.rs:75,120) and the manifest feeds it: the/healthwire nameakasha_deliveryis a published contract, andreceipt.rs:85-89uses the flag as one of a pair whose(false,false)state IS the vault-mode degraded behaviour ruling 6 wants.
5. Open questions — resolved 2026-08-24
- Markdown-spirit file contract: resolved in §3.6.
- Single-door migration: atomic cutover (ruling 9). Every existing install is Sol's; the census counted twenty external touchpoints, all cited in the OneDoor census report. No migration shims.
- Omega: defined in the roadmap as org governance (memory #2768), unbuilt. The manifest reserves the word; scope stays zero in I0. Anon is a toggle inside akasha configuration, never a manifest module (ruling 10).
6. Acceptance
- The three chairs review this contract before any code.
- Sol consolidates; open questions resolve to rulings.
- The first implementation quest names its reviewer-runnable proof: a fresh install from the manifest, one module combination on, one off, children and health matching the declaration.