feat(rustelo): declare both faces + bond-aware routes (adr-077)

domain.ncl declares its being (10 framework adrs) and becoming (5 modes) as
reference ids into the provider spine. 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 instead of erroring
"no site workspace under <rustelo-project>".
This commit is contained in:
Jesús Pérez 2026-07-21 11:46:01 +01:00
parent b3e3a62f91
commit e22a66dee8
Signed by: jesus
GPG key ID: 9F243E355E0BC939
2 changed files with 36 additions and 4 deletions

View file

@ -143,10 +143,18 @@ def routes [domain_root: string, instance_root: string, check: bool] {
# live in THIS instance. The seam between the two levels is exactly where a page dies, so the
# check must span both — an instance verifying only itself would report clean over a route it
# does not own, and a framework verifying only itself would never see the orphan markdown.
let build_ws = (site-workspace $domain_root)
if ($build_ws | is-empty) { error make { msg: $"no site workspace under ($domain_root)" } }
let ws = (site-workspace $instance_root)
let inst = (if ($ws | is-empty) { $build_ws } else { $ws })
# domain_root is the framework/build tree (routes baked there) in the MANAGED model. A BONDED
# consumer (ADR-073) is self-contained: it carries its own site/config/routes.ncl and content,
# with no separate framework workspace on disk — build and instance coincide. Fall the build
# workspace back to the instance when the domain root has none; only a project with NEITHER is
# genuinely unbuildable.
let inst_ws = (site-workspace $instance_root)
let dom_ws = (site-workspace $domain_root)
let build_ws = (if ($dom_ws | is-not-empty) { $dom_ws } else { $inst_ws })
if ($build_ws | is-empty) {
error make { msg: $"no site workspace under ($instance_root) or ($domain_root) — expected site/content" }
}
let inst = (if ($inst_ws | is-empty) { $build_ws } else { $inst_ws })
let routes_ncl = ([$build_ws, "site", "config", "routes.ncl"] | path join)
if not ($routes_ncl | path exists) { error make { msg: $"routes.ncl not found at ($routes_ncl)" } }

View file

@ -16,6 +16,30 @@ s.Domain & {
# import as: import "%{schema_root}/domains/rustelo/ontology/schema.ncl".
schema_cmd = "ontoref project root rustelo",
# Both faces of the domain scope (ADR-076/ADR-077, 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" },