let m = import "../ontology/defaults/manifest.ncl" in

m.make_manifest {
  project   = "ontoref",
  repo_kind = 'DevWorkspace,

  consumption_modes = [
    m.make_consumption_mode {
      consumer    = 'Developer,
      needs       = ['OntologyExport],
      audit_level = 'Standard,
      description = "Clones repo, runs ./ontoref, imports Nushell modules. Uses reflection tooling to manage project self-description.",
    },
    m.make_consumption_mode {
      consumer    = 'Agent,
      needs       = ['OntologyExport, 'JsonSchema],
      audit_level = 'Quick,
      description = "Reads .ontology/core.ncl via nickel export. Queries nodes, edges, and ADRs to understand project constraints before acting.",
    },
  ],

  layers = [
    m.make_layer {
      id          = "protocol",
      paths       = ["ontology/", "adrs/", "reflection/schemas/"],
      committed   = true,
      description = "Protocol specification: Nickel schemas, ADR tooling, and reflection schemas. The contract layer that projects implement.",
    },
    m.make_layer {
      id          = "tooling",
      paths       = ["reflection/", "ontoref"],
      committed   = true,
      description = "Operational tooling: Nushell modules, modes, forms, dispatcher, and bash entry point.",
    },
    m.make_layer {
      id          = "crates",
      paths       = ["crates/", "Cargo.toml"],
      committed   = true,
      description = "Rust implementation: ontoref-ontology (load/query .ontology/ as typed structs) and ontoref-reflection (execute reflection modes against project state).",
    },
    m.make_layer {
      id          = "self-description",
      paths       = [".ontology/"],
      committed   = true,
      description = "Ontoref consuming ontoref: the project's own ontology, state, gate, and manifest.",
    },
    m.make_layer {
      id          = "process",
      paths       = [".coder/"],
      committed   = false,
      description = "Session artifacts: plans, investigations, summaries. Process memory for actors.",
    },
  ],
}
