let s = import "../schema.ncl" in

# Shared NCL schemas for Library/Service/Tool projects:
#   import "framework/ontology/schema.ncl"      — mode contract (DAG, steps, guards)
#   import "framework/ontology/constraints.ncl" — NonEmptySteps, ValidTrigger
#   import "framework/ontology/defaults.ncl"    — make_mode / make_step factories
#
# Requires $ONTOREF_ROOT/domains in NICKEL_IMPORT_PATH (added by ore wrapper).

s.Domain & {
  id          = "framework",
  name        = "Framework Protocol",
  repo_kinds  = ["Library", "Service", "Tool"],
  description = "Protocol connectivity commands for Library, Service, and Tool projects: FSM state, dependency graph, gate membranes, and manifest capabilities.",
  short_alias = "fw",

  commands = [
    { id = "state",                 description = "Current FSM position across all dimensions with blockers and catalysts" },
    { id = "next",                  description = "Next valid transitions per dimension" },
    { id = "connections",           description = "Upstream and downstream project dependency graph" },
    { id = "gates",                 description = "Gate membrane status and opening conditions" },
    { id = "capabilities",          description = "Platform capabilities from manifest" },
    { id = "validate <decision>",   description = "Check a decision against ontological invariants" },
  ],

  pages = [
    { id = "framework", route = "/<slug>/provisioning", title = "Connections · Gates · State", template = "provisioning", nav_label = "Framework" },
  ],
}
