From e22a66dee82b7a1c05c30d051d4368e6aecce5f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesu=CC=81s=20Pe=CC=81rez?= Date: Tue, 21 Jul 2026 11:46:01 +0100 Subject: [PATCH] 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 ". --- domains/rustelo/commands.nu | 16 ++++++++++++---- domains/rustelo/domain.ncl | 24 ++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 4 deletions(-) diff --git a/domains/rustelo/commands.nu b/domains/rustelo/commands.nu index 8ef0c23..039c6f2 100644 --- a/domains/rustelo/commands.nu +++ b/domains/rustelo/commands.nu @@ -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)" } } diff --git a/domains/rustelo/domain.ncl b/domains/rustelo/domain.ncl index 9ec93c4..b0839ed 100644 --- a/domains/rustelo/domain.ncl +++ b/domains/rustelo/domain.ncl @@ -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" },