# Changelog All notable changes to ontoref are documented here. ADRs referenced below live in `adrs/` as typed Nickel records. --- ## [Unreleased] ### Protocol - ADR-001 accepted: ontoref extracted as a standalone protocol project, independent of stratumiops versioning and release cycle. Consumer projects adopt via `scripts/ontoref` wrapper + `.ontoref/config.ncl`. ([adr-001](adrs/adr-001-protocol-as-standalone-project.ncl)) - ADR-002 accepted: `ontoref-daemon` introduced as optional persistent daemon for NCL export caching (keyed by path+mtime), actor registry (developer/agent/CI), and notification barrier (pre-commit hook, fail-open). Supersedes stratumiops ADR-007. ([adr-002](adrs/adr-002-daemon-for-caching-and-notification-barrier.ncl)) - ADR-003 accepted: Q&A and accumulated operational knowledge persist to `reflection/qa.ncl` — typed NCL, git-versioned, accessible via MCP tools and HTTP endpoints. localStorage eliminated. Q&A entries survive session boundaries and are queryable by any actor. ([adr-003](adrs/adr-003-qa-and-knowledge-persistence-as-ncl.ncl)) ### Crates - `ontoref-ontology`: Rust crate for loading `.ontology/*.ncl` as typed structs (`Core`, `Gate`, `State`). Zero stratumiops dependencies. - `ontoref-reflection`: Rust crate for loading, validating, and executing Reflection modes as NCL DAG contracts. Optional `nats` feature (path dep: `platform-nats`). - `ontoref-daemon`: Rust crate providing HTTP API (axum), DashMap-backed NCL export cache, notify-based file watcher, and actor registry. Optional `db` feature (path dep: `stratum-db`) and `nats` feature (path dep: `platform-nats`). ### Daemon — Q&A NCL Persistence (`crates/ontoref-daemon/src/ui/qa_ncl.rs`) Line-level NCL surgery for `reflection/qa.ncl` — same pattern as `backlog_ncl.rs`. No AST parsing, no nickel-lang-core dependency. - `add_entry` — appends a typed `QaEntry` block before `],` array close; generates sequential `qa-NNN` ids - `update_entry` — in-place field mutation via bidirectional scan (question + answer fields) - `remove_entry` — removes the full block by id using backward scan for `{` and forward scan for `},` HTTP endpoints (all under `#[cfg(feature = "ui")]` except read-only GET): - `GET /qa-json` — export all Q&A entries as JSON (read-only, always enabled) - `POST /qa/add` — append new entry; returns generated id - `POST /qa/delete` — remove entry by id; invalidates NCL cache - `POST /qa/update` — mutate question + answer fields by id; invalidates NCL cache - `GET /actions/run` / `POST /actions/run` — execute a quick action by id; spawns `./ontoref ` Server-side hydration: `qa.html` receives `entries` as Tera context variable, embeds `SERVER_ENTRIES` JSON literal in the page `