let d = import "../ontology/defaults/core.ncl" in { nodes = [ # ── Axioms (invariant = true) ───────────────────────────────────────────── d.make_node { id = "protocol-not-runtime", name = "Protocol, Not Runtime", pole = 'Yang, level = 'Axiom, description = "Onref is a protocol specification and tooling layer. It is never a runtime dependency. Projects implement the protocol; onref provides the schemas and modules to do so.", invariant = true, }, d.make_node { id = "self-describing", name = "Self-Describing", pole = 'Yang, level = 'Axiom, description = "Onref describes itself using its own protocol. The .ontology/, adrs/, and reflection/ directories in this repository are onref consuming ontoref.", invariant = true, artifact_paths = [".ontology/core.ncl", ".ontology/state.ncl", "adrs/"], }, d.make_node { id = "no-enforcement", name = "No Enforcement", pole = 'Yang, level = 'Axiom, description = "Onref defines contracts and patterns. There is no enforcement mechanism. Coherence is voluntary and emerges from justified adoption.", invariant = true, }, d.make_node { id = "dag-formalized", name = "DAG-Formalized Knowledge", pole = 'Yin, level = 'Axiom, description = "All project knowledge — concepts, tensions, decisions, state — is formalized as directed acyclic graphs. This enables transversal queries, impact analysis, and ecosystem-level visibility.", invariant = true, artifact_paths = ["ontology/schemas/", "crates/ontoref-ontology/"], }, # ── Tensions ────────────────────────────────────────────────────────────── d.make_node { id = "formalization-vs-adoption", name = "Formalization vs Adoption Friction", pole = 'Spiral, level = 'Tension, description = "Richer formalization produces better ecosystem visibility but increases the cost of adoption. The balance: schemas are optional layers, not mandatory gates.", }, d.make_node { id = "ontology-vs-reflection", name = "Ontology vs Reflection", pole = 'Spiral, level = 'Tension, description = "Ontology captures what IS (invariants, structure, being). Reflection captures what BECOMES (operations, drift, memory). Both must coexist without one dominating. This tension is onref's core identity.", }, # ── Practices ───────────────────────────────────────────────────────────── d.make_node { id = "adr-lifecycle", name = "ADR Lifecycle", pole = 'Yang, level = 'Practice, description = "Architectural decisions follow: Proposed → Accepted → Superseded. Superseded ADRs retain constraints for historical reconstruction. Active Hard constraints drive the constraint set. Nodes declare which ADRs validate them via the adrs field — surfaced by describe and the daemon graph UI.", artifact_paths = [ "adrs/schema.ncl", "adrs/reflection.ncl", "adrs/_template.ncl", "adrs/adr-001-protocol-as-standalone-project.ncl", "adrs/adr-002-daemon-for-caching-and-notification-barrier.ncl", "adrs/adr-003-qa-and-knowledge-persistence-as-ncl.ncl", "adrs/adr-004-ncl-pipe-bootstrap-pattern.ncl", "adrs/adr-005-unified-auth-session-model.ncl", "adrs/adr-006-nushell-0111-string-interpolation-compat.ncl", "adrs/adr-007-api-surface-discoverability-onto-api-proc-macro.ncl", "adrs/adr-008-ncl-first-config-validation-and-override-layer.ncl", "adrs/adr-009-manifest-self-interrogation-layer-three-semantic-axes.ncl", "adrs/adr-010-protocol-migration-system.ncl", "CHANGELOG.md", ], adrs = ["adr-001", "adr-002", "adr-003", "adr-004", "adr-005", "adr-006", "adr-007", "adr-008", "adr-009", "adr-010"], }, d.make_node { id = "reflection-modes", name = "Reflection Modes", pole = 'Yang, level = 'Practice, description = "Operational procedures are first-class artifacts encoded as NCL DAG contracts. Modes declare actors, steps, dependencies, and error strategies — not prose.", artifact_paths = ["reflection/modes/", "reflection/schemas/", "crates/ontoref-reflection/"], }, d.make_node { id = "coder-process-memory", name = "Coder Process Memory", pole = 'Yin, level = 'Practice, description = "Session knowledge is captured as structured JSONL via coder record. Queryable, exportable, and promotable to reflection/knowledge/. The memory layer between sessions.", artifact_paths = ["reflection/modules/coder.nu", "reflection/schemas/coder.ncl"], }, d.make_node { id = "describe-query-layer", name = "Describe Query Layer", pole = 'Yang, level = 'Practice, description = "describe.nu aggregates all project sources and answers self-knowledge queries: what IS this, what can I DO, what can I NOT do, what tools exist, what is the impact of changing X. Renders Validated by section when a node declares adrs. describe diff computes a semantic diff of .ontology/ files vs HEAD — nodes/edges added/removed/changed without text diffing. describe api queries GET /api/catalog and renders the annotated HTTP surface grouped by tag, filterable by actor/auth.", artifact_paths = ["reflection/modules/describe.nu"], }, d.make_node { id = "ontoref-ontology-crate", name = "Ontoref Ontology Crate", pole = 'Yang, level = 'Practice, description = "Rust implementation for loading and querying .ontology/ NCL files as typed structs. Provides Core, Gate, and State types for ecosystem-level introspection. Node carries artifact_paths (Vec) and adrs (Vec) — both serde(default) for zero-migration backward compatibility.", artifact_paths = ["crates/ontoref-ontology/"], adrs = ["adr-001"], }, d.make_node { id = "ontoref-reflection-crate", name = "Ontoref Reflection Crate", pole = 'Yang, level = 'Practice, description = "Rust implementation for loading, validating, and executing Reflection modes as NCL DAG contracts against project state.", artifact_paths = ["crates/ontoref-reflection/"], }, d.make_node { id = "adopt-ontoref-tooling", name = "Adopt Ontoref Tooling", pole = 'Yang, level = 'Practice, description = "Migration system for onboarding existing projects into the ontoref protocol. adopt_ontoref mode installs .ontoref/, .ontology/ stubs (core, state, gate, manifest, connections), config.ncl template, and scripts/ontoref wrapper — all idempotent. update_ontoref mode brings already-adopted projects to the current protocol version: adds manifest.ncl (content assets) and connections.ncl (cross-project federation) if missing, scans ADR migration status, validates both files, and prints a protocol update report. The 8-phase update-ontology-prompt.md guides an agent through full ontology enrichment on any project.", artifact_paths = [ "ontoref", "justfile", "justfiles/ci.just", "templates/ontology/", "templates/ontoref-config.ncl", "templates/scripts-ontoref", "reflection/modes/adopt_ontoref.ncl", "reflection/modes/update_ontoref.ncl", "reflection/forms/adopt_ontoref.ncl", "reflection/templates/adopt_ontoref.nu.j2", "reflection/templates/update-ontology-prompt.md", "reflection/migrations/", ], }, d.make_node { id = "protocol-migration-system", name = "Protocol Migration System", pole = 'Yang, level = 'Practice, description = "Progressive, ordered protocol migrations for consumer projects. Each migration is an NCL file in reflection/migrations/NNN-slug.ncl declaring id, slug, description, a typed check (FileExists | Grep | NuCmd), and instructions interpolated at runtime with project_root and project_name. Applied state is determined solely by whether the check passes — no state file, fully idempotent. NuCmd checks must be valid Nushell (no bash &&, $env.VAR not $VAR). Accessible via `ontoref migrate list/pending/show` and the interactive group dispatch. Narrows ADR instance checks to `adr-[0-9][0-9][0-9]-*.ncl` to exclude schema/template infrastructure files from pattern matching.", invariant = false, artifact_paths = [ "reflection/migrations/", "reflection/modules/migrate.nu", "reflection/nulib/interactive.nu", "reflection/nulib/help.nu", "reflection/bin/ontoref.nu", ], adrs = ["adr-010"], }, d.make_node { id = "ontology-three-file-split", name = "Ontology Three-File Split", pole = 'Yang, level = 'Practice, description = "The .ontology/ directory separates three orthogonal concerns into three files. core.ncl captures what the project IS — invariant axioms and structural tensions; touching invariant=true nodes requires a new ADR. state.ncl captures where it IS vs where it wants to BE — current and desired state per dimension. gate.ncl defines when it is READY to cross a boundary — active membranes protecting key conditions. reflection/ reads all three and answers self-knowledge queries. This separation lets an agent understand a project without reading code — only by consulting the declarative graph.", invariant = false, artifact_paths = [".ontology/core.ncl", ".ontology/state.ncl", ".ontology/gate.ncl"], }, d.make_node { id = "adr-node-linkage", name = "ADR–Node Declared Linkage", pole = 'Yang, level = 'Practice, description = "Nodes declare which ADRs validate them via the adrs field (Array String). This makes the ADR→Node relationship explicit in the graph rather than implicit in prose. describe surfaces a Validated by section per node. The daemon graph UI renders each ADR as a clickable link opening the full ADR via GET /api/adr/{id}. Field is serde(default) and Nickel default=[] — zero migration cost for existing nodes.", artifact_paths = [ "ontology/schemas/core.ncl", "crates/ontoref-ontology/src/types.rs", "reflection/modules/describe.nu", "crates/ontoref-daemon/templates/pages/graph.html", "crates/ontoref-daemon/src/api.rs", ], }, d.make_node { id = "web-presence", name = "Web Presence", pole = 'Yang, level = 'Practice, description = "Landing page at assets/web/ describing the ontoref protocol to external audiences. Bilingual (EN/ES), covers protocol layers, yin/yang duality, crates, and adoption path. Self-description artifact.", artifact_paths = ["assets/web/src/index.html", "assets/web/index.html", "README.md", "assets/architecture.svg"], }, d.make_node { id = "ontoref-daemon", name = "Ontoref Daemon", pole = 'Yang, level = 'Practice, description = "Runtime support daemon for the ontoref protocol. Provides NCL export caching, file watching, actor registry, notification barrier, HTTP API (11 pages), MCP server (29 tools, stdio + streamable-HTTP), Q&A NCL persistence, quick-actions catalog, passive drift observation, unified auth/session management, per-file ontology version counters (GET /projects/{slug}/ontology/versions), and annotated API catalog (GET /api/catalog). API catalog populated at link time via #[onto_api] proc-macro + inventory — zero runtime overhead. Launched via ADR-004 NCL pipe bootstrap: nickel export config.ncl | ontoref-daemon.bin --config-stdin. Graph, search, and api_catalog UI pages carry browser-style panel navigation (back/forward history stack). File artifact paths open in external tabs: card.repo (Gitea source URL) for most files, card.docs (cargo docs) for .rs files — no inline file loading. card_repo/card_docs injected into Tera context from insert_brand_ctx; | safe filter required for URL values inside