let module_system_type = [| 'Import, 'Mod, 'Hybrid, 'Flat |] in

let module_type = {
  name        | String,
  required    | Bool            | default = true,
  description | String          | default = "",
} in

{
  Convention = {
    system       | module_system_type | default = 'Mod,
    directory    | String             | default = "justfiles",
    extension    | String             | default = ".just",

    canonical_modules | Array module_type | default = [
      { name = "build",  required = true,  description = "Compilation, linking, output generation" },
      { name = "test",   required = true,  description = "Unit, integration, property-based tests" },
      { name = "dev",    required = true,  description = "Development workflow: fmt, lint, watch" },
      { name = "ci",     required = true,  description = "CI pipeline orchestration" },
      { name = "distro", required = false, description = "Packaging, distribution, release" },
      { name = "docs",   required = false, description = "Documentation generation and serving" },
      { name = "nickel", required = false, description = "Nickel typecheck, export, validation" },
      { name = "deploy", required = false, description = "Deployment to staging/production" },
    ],

    required_recipes | Array String | default = [
      "default",
      "help",
    ],

    required_variables | Array String | default = [
      "project_root",
    ],
  },
}
