ontoref-code/domains/rustelo/domain.ncl
Jesús Pérez 22795f4329
feat(rustelo): declare both faces + bond-aware routes (adr-076)
domain.ncl declares being (10 framework adrs) + becoming (5 modes) as reference
ids. commands.nu `routes` falls the build workspace back to the instance when
the domain root has no site/content, so a self-contained bonded consumer
operates on its own tree.
2026-07-21 12:07:13 +01:00

75 lines
4 KiB
Text

let s = import "../schema.ncl" in
# Rustelo domain — full-stack Rust framework (Leptos + Axum).
# Authority: rustelo project. Schemas queried via schema_cmd.
# Consumers declare the bond carrier .domains-ontoref/rustelo/ (bond model, ADR-073).
s.Domain & {
id = "rustelo",
name = "Rustelo Framework",
repo_kinds = ["RusteloApp"],
description = "Full-stack Rust framework based on Leptos and Axum. Provides schemas for app layers, WASM targets, plugin system, and routing contracts.",
short_alias = "rs",
# NCL schemas live in the rustelo project — not in ontoref.
# Resolves to the rustelo project root via the global registry so consumers
# import as: import "%{schema_root}/domains/rustelo/ontology/schema.ncl".
schema_cmd = "ontoref project root rustelo",
# Both faces of the domain scope (ADR-076 the-domain-scope-carries-both-faces,
# reference ids into the provider
# spine rustelo/.ontoref/). BEING — the framework-governing decisions a RusteloApp
# inherits. BECOMING — the modes that operate the framework and its implementations.
# The .ncl content lives in rustelo's spine; the domain contract only names them.
adrs = [
"adr-001-build-time-code-generation",
"adr-002-custom-routing-over-leptos-router",
"adr-003-layered-override-system",
"adr-004-plugin-architecture-level5",
"adr-005-auth-hexagonal-port",
"adr-006-rendering-profile-htmx-support",
"adr-007-website-templates-and-generator",
"adr-008-unified-route-derived-navigation",
"adr-009-apa-adoption",
"adr-010-apa-domain-schema-axis",
],
modes = [
"validate-pap",
"validate-purpose-alignment",
"integrity-check",
"plan-publication",
"sync-ontology",
],
commands = [
{ id = "layers", description = "List application layers declared in catalog" },
{ id = "plugins", description = "Plugin registry: registered, active, interface contracts" },
# Declared from the start and answering `not yet implemented` for its entire life — the
# project's own pathogen on its own domain surface: a capability announced on a queryable
# protocol surface, doing nothing, with nothing noticing. Now it is the WITNESS across the
# three levels a rustelo page spans, and each seam it checks is one that fails SILENTLY:
#
# route → page_id → FTL a route with no FTL keys does NOT 404. `static.j2` renders
# `texts[page_id ~ "-page-title"] | default(page_id)`, so the page
# comes back 200 with its own id as the title. Seven of them are
# live. A broken page that returns 200 is worse than a 404: nothing
# alerts, and no log records it.
# content → route `content/pages/**` is NOT a content-kind and NO Rust code reads
# it. A .md there is dead by construction — and it looks like the
# obvious place to edit. The privacy policy lives in BOTH the FTL
# (served) and the markdown (dead), and nothing checks they agree.
# A legal document, declared twice, no witness.
{ id = "routes",
description = "Route manifest, and the witness across the three levels: routes (framework/build) → page_id → FTL text (instance), plus orphan markdown in the content tree",
usage = "ore rustelo routes [--check]",
examples = [
"ore rustelo routes # report the manifest and every seam",
"ore rustelo routes --check # exit 1 on a broken seam (CI gate)",
] },
{ id = "wasm", description = "WASM build targets and feature flags" },
{ id = "publish-contract", description = "Content-publisher consumption contract: the 6 answers + their oracles, declared once on the producer" },
{ id = "probe", description = "Run the end-to-end publish->activate->index oracle in this RusteloApp (ADR-056 witnessed verification)" },
],
pages = [],
}