{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://github.com/create-cmp/create-cmp/options.schema.json",
  "title": "create-cmp engine config",
  "description": "The config object built by the CLI/plugin front door and consumed by the scaffold engine.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "appName",
    "package",
    "iosBundleId",
    "region",
    "themePrefix",
    "platforms",
    "firebase",
    "room",
    "e2e",
    "inspector",
    "devClient",
    "tabs",
    "targetDir"
  ],
  "properties": {
    "appName": {
      "type": "string",
      "description": "Human display name.",
      "minLength": 1,
      "pattern": "^[^\\n\\r]+$"
    },
    "package": {
      "type": "string",
      "description": "Reverse-DNS package id, e.g. com.acme.app.",
      "pattern": "^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+$"
    },
    "iosBundleId": {
      "type": "string",
      "description": "iOS bundle id, e.g. com.acme.app.",
      "pattern": "^[A-Za-z0-9][A-Za-z0-9-]*(\\.[A-Za-z0-9][A-Za-z0-9-]*)+$"
    },
    "region": {
      "type": "string",
      "description": "Firebase region, e.g. us-central1.",
      "minLength": 1,
      "pattern": "^[a-z]+(-[a-z]+[0-9]+)?$|^[a-z-]+[0-9]+$"
    },
    "themePrefix": {
      "type": "string",
      "description": "PascalCase theme symbol prefix, e.g. Acme.",
      "pattern": "^[A-Z][A-Za-z0-9]*$"
    },
    "platforms": {
      "type": "object",
      "additionalProperties": false,
      "required": ["android", "ios"],
      "properties": {
        "android": {
          "type": "boolean",
          "const": true,
          "description": "Android is always enabled."
        },
        "ios": { "type": "boolean" }
      }
    },
    "firebase": {
      "type": "object",
      "additionalProperties": false,
      "required": ["enabled"],
      "properties": {
        "enabled": { "type": "boolean" },
        "auth": {
          "type": "string",
          "enum": ["email", "phone", "both", "none"]
        },
        "firestore": { "type": "boolean" },
        "storage": { "type": "boolean" },
        "functions": { "type": "boolean" },
        "fcm": { "type": "boolean" }
      }
    },
    "harness": {
      "type": "boolean",
      "description": "The verification harness (the mode split, LADDER R3). true/absent = full mode: verify lane + receipts + specs + approvals + generators + Stop hook. false = minimal mode (`--minimal`): the same app, tests, previews, inspector, and advisory hooks, without the lane or governance — `create-cmp harden` installs the subtraction back. Absent means full so every pre-mode config keeps meaning what it meant."
    },
    "room": { "type": "boolean" },
    "e2e": {
      "type": "boolean",
      "description": "Device-level E2E harness (Maestro flows in qa/e2e/). Feature key renamed from `appium` to `e2e` in 0.3.0."
    },
    "inspector": {
      "type": "boolean",
      "description": "Live on-device inspector: debug-only loopback HTTP server (127.0.0.1:9500) serving the Compose semantics tree + design-token catalog to the cmp-inspector MCP. Structurally absent from release builds."
    },
    "devClient": {
      "type": "boolean",
      "description": "Desktop dev-client: a jvm(\"desktop\") target running the shared commonMain UI in a phone-sized JVM window with Compose Hot Reload attached (./gradlew :composeApp:hotRunDesktop --auto). Firebase is never initialized on desktop; platform seams get JVM fakes/impls in desktopMain."
    },
    "tabs": {
      "type": "array",
      "minItems": 1,
      "maxItems": 5,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": ["label", "icon"],
        "properties": {
          "label": { "type": "string", "minLength": 1 },
          "icon": { "type": "string", "minLength": 1 }
        }
      }
    },
    "targetDir": {
      "type": "string",
      "description": "Destination directory for the stamped project.",
      "minLength": 1
    }
  }
}
