{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://nova.cloudinit.dev/schemas/onboarding.schema.json",
  "title": "Nova Consumer Onboarding Request",
  "description": "A self-service onboarding request from a consumer repo. Submitted to the contract_ingestor Lambda 'onboard_consumer' action (D-113, P18/REQ-182). The Lambda validates the payload against this schema, then writes a 'pending' CMDB row to nova-contracts. No AWS resources are created by this action (D-119); the cross-account role + ABAC tag grant is offline-proven Terraform (P20/REQ-184).",
  "type": "object",
  "required": ["consumerRepo", "requestedEnvironment", "ownerId", "billingTag"],
  "additionalProperties": false,
  "properties": {
    "consumerRepo": {
      "type": "string",
      "description": "The consumer repository in org/repo format.",
      "pattern": "^[a-zA-Z0-9_.-]+/[a-zA-Z0-9_.-]+$",
      "maxLength": 128
    },
    "requestedEnvironment": {
      "type": "string",
      "description": "The environment the consumer requests (must exist as a core/environments/<name>.json).",
      "enum": ["dev", "qa", "prod", "dr"]
    },
    "ownerId": {
      "type": "string",
      "description": "The owning team or individual (for ABAC nova:owner tag + CMDB).",
      "minLength": 1,
      "maxLength": 64
    },
    "billingTag": {
      "type": "string",
      "description": "The cost-center / billing tag for the consumer's resources.",
      "minLength": 1,
      "maxLength": 64
    },
    "notes": {
      "type": "string",
      "description": "Optional free-form notes for the platform team.",
      "maxLength": 500
    }
  }
}