Structure that remembers why.
Ontology + Reflection + Daemon + MCP — encode what a system IS (invariants, tensions, constraints) and where it IS GOING (state dimensions, transition conditions, membranes) in machine-queryable directed acyclic graphs. Software projects, personal operational systems, agent contexts — same three files, same protocol. First-class web UI (12 pages), MCP server (19 tools), live session sharing. One protocol for developers, agents, CI, and individuals.
Protocol + Runtime. Zero enforcement.
.ontology/ separates three orthogonal concerns: core.ncl (what IS) · state.ncl (where we ARE vs want to BE) · gate.ncl (when READY to cross a boundary) reflection/ reads all three and answers self-knowledge queries — an agent understands the project without reading code, only by consulting the declarative graph pre_commit, drift, ontology_drift signals block until acknowledged core/state/gate files applied to life, career, and ecosystem dimensions jpl validate "accept offer" → invariants_at_risk, relevant edges, verdict The protocol lives in coexistence.
.ontology/ · adrs/ · reflection/schemas/adr · register · config · backlog · forms · describeontoref · actor detection · advisory locking · ONTOREF_IMPORT_PATHnickel export. ontoref-daemon · ontoref-ontology · ontoref-reflection · search engine · notification barrier · SurrealDB (optional).ontoref/config.ncl · ontoref CLI · adopt_ontoref mode .ontology/ data. Ontoref provides the schemas, modules, and migration scripts. Zero lock-in. .ontology/ NCL files as typed Rust structs Node carries artifact_paths and adrs, both serde(default)stratum-graph + stratum-state required; platform-nats feature-gated store.nu — SurrealDB-backed cache with NCL export sync.nu — ontology code synchronizationdescribe.nu — actor-aware project self-knowledge coder.nu — structured session recordsGET /api/adr/{id}pre_commit · drift · ontology_drift — pre-commit hook polls & blocks on ack ./ontoref dispatched server-side, shared across actors notify): passive drift observer, no polling --db): actor sessions, seeded ontology tables, search index, notification history — fail-open nickel export on unchanged files db + nats feature flags — builds standalone with --no-default-featuresontoref setup wires up any new or existing project — idempotent scaffold with optional auth key bootstrap.
ontoref-daemon is an optional persistent process. It caches NCL exports, serves 12 UI pages, exposes 19 MCP tools, maintains an actor registry, stores notifications, indexes everything for search, and optionally persists to SurrealDB. Auth is opt-in: all surfaces (CLI, UI, MCP) exchange a project key for a UUID v4 session token via POST /sessions; CLI injects ONTOREF_TOKEN as Bearer automatically. It never changes the protocol — it accelerates and shares access to it. Configured via ~/.config/ontoref/config.ncl (Nickel, type-checked); edit interactively with ontoref config-edit. Started via NCL pipe bootstrap: ontoref-daemon-boot.
| Tool | Description |
|---|---|
| ontoref_help | List available tools and usage |
| ontoref_list_projects | Enumerate all registered projects |
| ontoref_set_project | Set session default project context |
| ontoref_project_status | Full project dashboard — health, drift, actors |
| ontoref_describe | Architecture overview and self-description |
| ontoref_search | Free-text search across nodes, ADRs, modes |
| ontoref_get | Fetch ontology node by id |
| ontoref_get_node | Full ontology node with edges and constraints |
| ontoref_list_adrs | List ADRs filtered by status |
| ontoref_get_adr | Full ADR content with constraints |
| ontoref_list_modes | List all reflection modes |
| ontoref_get_mode | Mode DAG contract — steps, preconditions, postconditions |
| ontoref_get_backlog | Backlog items filtered by status |
| ontoref_backlog | Add or update_status on a backlog item |
| ontoref_constraints | All hard + soft architectural constraints |
| ontoref_qa_list | List Q&A knowledge store with optional filter |
| ontoref_qa_add | Persist new Q&A entry to reflection/qa.ncl |
| ontoref_action_list | Quick actions catalog from .ontoref/config.ncl |
| ontoref_action_add | Create reflection mode + register as quick action |
--db feature flag and --db-url ws://...--db: DashMap-backed in-memory, process-lifetime only --db-namespace; credentials via --db-username/--db-passwordGET /notifications/pending?token=X&project=Y; blocks git commit until all acked POST /notifications/ack; custom notifications via POST /{slug}/notifications/emitForce-directed graph of the live ontology. Nodes are typed (Axiom · Tension · Practice) and polarized (Yang · Yin · Spiral). Click any node to open its detail panel — artifacts, connections, NCL source.

Start with ontoref setup. Your project gains machine-queryable invariants, living ADRs, actor-aware operational modes, and a daemon that shares context across every actor in real time.