The Federation of Extensions
"The Core provides the skeleton; the Extensions provide the organs. But organs alone do not make a body. They must sing in one key, move toward one will, and remember the same night in which they were called to life."
LychD employs a strict philosophy of Dogfooding. The core kernel remains a minimal vessel for routing and state. Every advanced capability—from the API Proxy to the Swarm Protocol—functions as an Extension.
This architecture proves the Extension Protocol (ADR 05): the system constructs itself using the same tools available to the Magus. LychD's first extension boundary is not compatibility; it is assimilation.
Read that boundary narrowly: pre-v1 in-process organs are composed with the body they join; durable compatibility is reserved for surfaces that LychD explicitly versions and tests.
Each extension is more than a plugin-era module. It is an organ with a fantasy, a discipline, and a jurisdiction:
- The Watchers see and remember.
- The Threshold Rites secure the border.
- The Cognitive Organs think, judge, simulate, and evolve.
- The Sovereign Hands reach beyond the local machine into the Forest, the Swarm, and the Infinite Naught.
Read this section not as a package index but as an anatomy of powers. Each page below should feel like a distinct chamber of the same body.
🏛️ The Federation of Fifteen
Fifteen official extension domains form the planned body of the Daemon. Near-term built-ins live under src/lychd/extensions/builtin/ and evolve atomically with the Core. Private Crypt organs may live under ~/.local/share/lychd/extensions/ as Forge-composed repositories, but that location does not by itself create a stable third-party API contract.
Source-map note: doctrine names are domain names, not guaranteed package slugs. Current built-in source uses functional package names such as animator, observability, vpn, proxy, iam, workflow, webcrawler, assimilation, training, video, audio, simulation, identity, and swarm.
| Doctrine Domain | Current Source Mapping |
|---|---|
| Prism / Vision | Official domain; current source exposes the media substrate through video while the full vision.coven surface matures. |
| Riddle / Evaluation | Official domain; no dedicated built-in package has landed yet. Evaluation work currently routes through simulation/Tomb execution doctrine. |
| Toll / Economics | Official domain; no dedicated built-in package has landed yet. |
| Name | Domain | Sigil | Function | ADR |
|---|---|---|---|---|
| The Oculus | Observability | Records the Thought Trace and monitors physical hardware health. | 29 | |
| The Tether | VPN | Establishes a WireGuard tunnel for secure, remote access. | 39 | |
| The Veil | Proxy | Manages automated TLS and shields the Vessel via Caddy. | 40 | |
| The Ward | IAM & Auth | Governs Sigils and Scopes to secure the Inner Circle. | 38 | |
| The Weaver | Workflow | Orchestrates multi-step Patterns and weaves memory into context. | 28 | |
| The Scout | Ingestion | Wields a Dual-Mode browser to harvest internet knowledge. | 30 | |
| The Smith | Assimilation | Drafts code and executes the autonomous Evolution of the system. | 35 | |
| The Soulforge | Training | Transmutes Karma into model weights via LoRA fine-tuning. | 33 | |
| The Riddle | Evaluation | Evaluates model performance in the agentic harness. | 34 | |
| The Toll | Economics | Enforces x402 payments and trades VRAM for Tithes. | 41 | |
| The Prism | Vision | Manages the Vision Coven to perceive and analyze pixel data. | 36 | |
| The Echo | Audio | Operates the Resonance Pipeline for real-time speech. | 37 | |
| The Shadow | Simulation | Deliberative reasoning engine that projects potential futures. | 31 | |
| The Mirror | Identity | Maintains persistent Personas and shifts Bayesian Priors. | 32 | |
| The Legion | Swarm | The Magus's army of Thralls. | 42 |
🧬 Anatomy of the Flesh
Every extension, from simple script to complex multi-module architecture, adheres to the laws of the Federation.
I. The Extension Protocol
An in-process organ participates in the composed runtime image. Pre-v1 organs are intentionally coupled: they may import LychD internals, expose RuneConfig subclasses, and rely on Forge/Smith verification when the Core changes. One branch exposes schema classes the Codex can discover. Another governs optional in-process boot grafting through register(context) when an organ binds runtime-facing logic.
Inside the body, couple and repair. Across bodies, speak protocols. Public SDK/ABI later.
Ia. Compatibility Tiers
Not every organ promises the same stability:
- Built-in Direct: Core-maintained organs in
src/lychd/extensions/builtin/. They may import internals because they evolve with the Core. - Private Coupled: Magus-owned local organs that intentionally import internals for speed and power. They are valid local work, but refactors may break them.
- Future Independent Product: Shareable organs that target a future versioned public API and conformance suite. This is harvested at v1+ from patterns that survived real use.
Use the private coupled tier when local velocity matters more than long-term compatibility. Use an external-service Animator when the organ needs a true isolation boundary today. Treat independent in-process compatibility as future product work, not current doctrine.
II. The Genetic API (ExtensionContext)
The ExtensionContext is the host-provided registration surface used during boot-time grafting. In the current core it is intentionally narrow: it exists to bind in-process logic such as unbound routers or controller classes to the Vessel. It is not the whole Extension Protocol. Schema exposure and synthesis declarations live in other branches of that law; binary compatibility is deferred until Forge-mediated ABI support exists.
| Method | Grant | System Target |
|---|---|---|
add_router(Router) |
Interface | Vessel (11) |
add_controller(Controller) |
Interface | Vessel (11) |
III. Federated Persistence
The system manages extensions as a Jujutsu-backed Federation of Git Repositories. The lychd.lock file in the Crypt root tracks the exact body state of every active organ, ensuring the system remains deterministic and revertible. The flesh may grow, but the binding must remain exact.
IV. The Ritual of Assimilation
Autopoiesis follows a strict path from the volatile to the immutable:
- Genesis: The Magus or The Smith drafts logic in the Lab (13).
- Speculation: The system executes the code within the Shadow Realm (31).
- Validation: The Ghouls execute the "Rite of Albedo" (Linting, Typing, Testing).
- Promotion: Upon Sovereign Consent (25) or an explicit Codex-governed preauthorization class, the system moves code to the Crypt and updates the lockfile. High-stakes mutation remains live Magus authority.
- Rebirth: The system triggers Packaging (17) and restarts into its new physical body.