kortecxdocs

Extending

Seven trait seams make the runtime swappable — Journal, ContentStore, CapabilityBroker, InferenceBackend, ResourceManager, SecretStore, WorkerRegistry.

The runtime is built against trait seams — interfaces at every boundary that matters. Implement a trait and swap an implementation without touching the rest of the system.

The seven seams

TraitResponsibility
JournalThe append-only source of truth — where typed events are recorded.
ContentStoreStorage for content-addressed motes.
CapabilityBrokerThe single door to world effects (fs / net / shell), where policy is enforced.
InferenceBackendModel execution — e.g. the llama.cpp backend for local inference.
ResourceManagerResource accounting and allocation.
SecretStoreSecret resolution for capabilities that need credentials.
WorkerRegistryTracks workers in the optional distributed layer.

Why seams matter

  • Testability — substitute an in-memory Journal or a fake CapabilityBroker in tests.
  • Portability — back the ContentStore with local disk now, object storage later.
  • No rewrite to scale — the same seams power single-system and the coordinator/worker layer.

Implement against the interface

Code in the runtime depends on the trait, never the concrete type. As long as your implementation upholds the contract, the guarantees (exactly-once, recovery, policy gating) hold.