{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://json.schemastore.org/atmos-manifest.json",
  "title": "JSON Schema for Atmos Stack Manifest files. Version 1.0. https://atmos.tools",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Logical name for this stack. Takes precedence over name_template and name_pattern from atmos.yaml."
    },
    "import": {
      "$ref": "#/definitions/import"
    },
    "terraform": {
      "$ref": "#/definitions/terraform"
    },
    "helmfile": {
      "$ref": "#/definitions/helmfile"
    },
    "kubernetes": {
      "$ref": "#/definitions/kubernetes"
    },
    "packer": {
      "$ref": "#/definitions/packer"
    },
    "vars": {
      "$ref": "#/definitions/vars"
    },
    "hooks": {
      "$ref": "#/definitions/hooks"
    },
    "env": {
      "$ref": "#/definitions/env"
    },
    "settings": {
      "$ref": "#/definitions/settings"
    },
    "locals": {
      "$ref": "#/definitions/locals"
    },
    "components": {
      "$ref": "#/definitions/components"
    },
    "compositions": {
      "$ref": "#/definitions/compositions"
    },
    "secrets": {
      "$ref": "#/definitions/component_secrets"
    },
    "overrides": {
      "$ref": "#/definitions/overrides"
    },
    "workflows": {
      "$ref": "#/definitions/workflows"
    },
    "dependencies": {
      "$ref": "#/definitions/dependencies"
    },
    "generate": {
      "$ref": "#/definitions/generate"
    },
    "version": {
      "$ref": "#/definitions/version"
    }
  },
  "additionalProperties": true,
  "oneOf": [
    {
      "required": [
        "workflows"
      ]
    },
    {
      "anyOf": [
        {
          "additionalProperties": true,
          "not": {
            "required": [
              "workflows"
            ]
          }
        },
        {
          "required": [
            "import"
          ]
        },
        {
          "required": [
            "terraform"
          ]
        },
        {
          "required": [
            "helmfile"
          ]
        },
        {
          "required": [
            "kubernetes"
          ]
        },
        {
          "required": [
            "packer"
          ]
        },
        {
          "required": [
            "vars"
          ]
        },
        {
          "required": [
            "hooks"
          ]
        },
        {
          "required": [
            "env"
          ]
        },
        {
          "required": [
            "settings"
          ]
        },
        {
          "required": [
            "components"
          ]
        },
        {
          "required": [
            "overrides"
          ]
        }
      ]
    }
  ],
  "definitions": {
    "condition_predicate": {
      "type": "string",
      "description": "Built-in condition predicate for step and hook execution.",
      "enum": [
        "ci",
        "local",
        "always",
        "never",
        "success",
        "failure"
      ]
    },
    "step_condition_predicate": {
      "type": "string",
      "description": "Built-in condition predicate for workflow and custom command step execution.",
      "enum": [
        "ci",
        "local",
        "always",
        "never",
        "success"
      ]
    },
    "step_condition": {
      "description": "Declarative condition controlling whether a workflow or custom command step runs. A string is a built-in predicate or CEL expression; an array is shorthand for all predicates; an object composes conditions with all, any, or not.",
      "anyOf": [
        {
          "$ref": "#/definitions/step_condition_predicate"
        },
        {
          "type": "string",
          "description": "CEL expression. Built-in predicate keywords are evaluated as predicates before CEL."
        },
        {
          "type": "array",
          "description": "All-of shorthand. Every condition in the list must evaluate to true.",
          "items": {
            "$ref": "#/definitions/step_condition"
          },
          "minItems": 1
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "all": {
              "description": "All conditions must evaluate to true.",
              "anyOf": [
                {
                  "$ref": "#/definitions/step_condition"
                },
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/step_condition"
                  },
                  "minItems": 1
                }
              ]
            },
            "any": {
              "type": "array",
              "description": "At least one condition must evaluate to true.",
              "items": {
                "$ref": "#/definitions/step_condition"
              },
              "minItems": 1
            },
            "not": {
              "description": "The nested condition must evaluate to false.",
              "$ref": "#/definitions/step_condition"
            }
          },
          "oneOf": [
            {
              "required": [
                "all"
              ]
            },
            {
              "required": [
                "any"
              ]
            },
            {
              "required": [
                "not"
              ]
            }
          ]
        }
      ]
    },
    "condition": {
      "description": "Declarative condition controlling whether a step or hook runs. A string is a built-in predicate or CEL expression; an array is shorthand for all predicates; an object composes conditions with all, any, or not.",
      "anyOf": [
        {
          "$ref": "#/definitions/condition_predicate"
        },
        {
          "type": "string",
          "description": "CEL expression. Built-in predicate keywords are evaluated as predicates before CEL."
        },
        {
          "type": "array",
          "description": "All-of shorthand. Every condition in the list must evaluate to true.",
          "items": {
            "$ref": "#/definitions/condition"
          },
          "minItems": 1
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "all": {
              "description": "All conditions must evaluate to true.",
              "anyOf": [
                {
                  "$ref": "#/definitions/condition"
                },
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/condition"
                  },
                  "minItems": 1
                }
              ]
            },
            "any": {
              "type": "array",
              "description": "At least one condition must evaluate to true.",
              "items": {
                "$ref": "#/definitions/condition"
              },
              "minItems": 1
            },
            "not": {
              "description": "The nested condition must evaluate to false.",
              "$ref": "#/definitions/condition"
            }
          },
          "oneOf": [
            {
              "required": [
                "all"
              ]
            },
            {
              "required": [
                "any"
              ]
            },
            {
              "required": [
                "not"
              ]
            }
          ]
        }
      ]
    },
    "import": {
      "title": "import",
      "description": "Import section",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "array",
          "items": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "path": {
                    "type": "string"
                  },
                  "skip_templates_processing": {
                    "type": "boolean"
                  },
                  "ignore_missing_template_values": {
                    "type": "boolean"
                  },
                  "skip_if_missing": {
                    "type": "boolean"
                  },
                  "nested_imports": {
                    "type": "string",
                    "enum": [
                      "local",
                      "remote"
                    ]
                  },
                  "ttl": {
                    "type": "string",
                    "description": "Cache duration for the cloned source repo of a remote (git) import. When set, the clone is reused across Atmos invocations until it expires (e.g. with a warm CI cache). Within a single invocation a source repo is cloned at most once regardless of TTL. Examples: '0s', '5m', '1h', '7d', 'daily'."
                  },
                  "context": {
                    "type": "object",
                    "additionalProperties": true
                  }
                },
                "required": [
                  "path"
                ]
              }
            ]
          }
        }
      ]
    },
    "components": {
      "title": "components",
      "description": "Components section. Supports built-in types (terraform, helmfile, kubernetes, packer) and custom component types defined in custom commands.",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "additionalProperties": true,
          "properties": {
            "terraform": {
              "$ref": "#/definitions/terraform_components"
            },
            "helmfile": {
              "$ref": "#/definitions/helmfile_components"
            },
            "kubernetes": {
              "$ref": "#/definitions/kubernetes_components"
            },
            "packer": {
              "$ref": "#/definitions/packer_components"
            },
            "container": {
              "$ref": "#/definitions/container_components"
            },
            "emulator": {
              "$ref": "#/definitions/emulator_components"
            }
          },
          "required": []
        }
      ]
    },
    "terraform": {
      "title": "terraform",
      "description": "Terraform section",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "vars": {
              "$ref": "#/definitions/vars"
            },
            "hooks": {
              "$ref": "#/definitions/hooks"
            },
            "env": {
              "$ref": "#/definitions/env"
            },
            "settings": {
              "$ref": "#/definitions/settings"
            },
            "locals": {
              "$ref": "#/definitions/locals"
            },
            "command": {
              "$ref": "#/definitions/command"
            },
            "backend_type": {
              "$ref": "#/definitions/backend_type"
            },
            "backend": {
              "$ref": "#/definitions/backend"
            },
            "remote_state_backend_type": {
              "$ref": "#/definitions/remote_state_backend_type"
            },
            "remote_state_backend": {
              "$ref": "#/definitions/remote_state_backend"
            },
            "overrides": {
              "$ref": "#/definitions/overrides"
            },
            "providers": {
              "$ref": "#/definitions/providers"
            },
            "generate": {
              "$ref": "#/definitions/generate"
            },
            "dependencies": {
              "$ref": "#/definitions/dependencies"
            },
            "provision": {
              "$ref": "#/definitions/provision"
            }
          },
          "required": []
        }
      ]
    },
    "terraform_components": {
      "title": "terraform_components",
      "description": "Terraform components section",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "patternProperties": {
            "^[/a-zA-Z0-9-_{}. ]+$": {
              "$ref": "#/definitions/terraform_component_manifest"
            }
          },
          "additionalProperties": false
        }
      ]
    },
    "terraform_component_manifest": {
      "title": "terraform_component_manifest",
      "description": "Terraform component manifest",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "metadata": {
              "$ref": "#/definitions/metadata"
            },
            "component": {
              "$ref": "#/definitions/component"
            },
            "vars": {
              "$ref": "#/definitions/vars"
            },
            "test": {
              "type": "object",
              "description": "Terraform test configuration. `vars` are passed only to `terraform test` as test-scope variables.",
              "additionalProperties": false,
              "properties": {
                "vars": {
                  "$ref": "#/definitions/vars"
                }
              }
            },
            "mocks": {
              "type": "object",
              "description": "Literal Terraform output values used by !terraform.state and !terraform.output when --use-mocks is set.",
              "additionalProperties": true
            },
            "env": {
              "$ref": "#/definitions/env"
            },
            "settings": {
              "$ref": "#/definitions/settings"
            },
            "locals": {
              "$ref": "#/definitions/locals"
            },
            "command": {
              "$ref": "#/definitions/command"
            },
            "backend_type": {
              "$ref": "#/definitions/backend_type"
            },
            "backend": {
              "$ref": "#/definitions/backend"
            },
            "remote_state_backend_type": {
              "$ref": "#/definitions/remote_state_backend_type"
            },
            "remote_state_backend": {
              "$ref": "#/definitions/remote_state_backend"
            },
            "providers": {
              "$ref": "#/definitions/providers"
            },
            "hooks": {
              "$ref": "#/definitions/hooks"
            },
            "auth": {
              "$ref": "#/definitions/component_auth"
            },
            "secrets": {
              "$ref": "#/definitions/component_secrets"
            },
            "generate": {
              "$ref": "#/definitions/generate"
            },
            "dependencies": {
              "$ref": "#/definitions/dependencies"
            },
            "provision": {
              "$ref": "#/definitions/provision"
            },
            "source": {
              "$ref": "#/definitions/source"
            }
          },
          "required": []
        }
      ]
    },
    "helmfile": {
      "title": "helmfile",
      "description": "Helmfile section",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "vars": {
              "$ref": "#/definitions/vars"
            },
            "env": {
              "$ref": "#/definitions/env"
            },
            "settings": {
              "$ref": "#/definitions/settings"
            },
            "locals": {
              "$ref": "#/definitions/locals"
            },
            "command": {
              "$ref": "#/definitions/command"
            },
            "plugins": {
              "$ref": "#/definitions/plugins"
            },
            "overrides": {
              "$ref": "#/definitions/overrides"
            },
            "dependencies": {
              "$ref": "#/definitions/dependencies"
            },
            "provision": {
              "$ref": "#/definitions/provision"
            }
          },
          "required": []
        }
      ]
    },
    "helmfile_components": {
      "title": "helmfile_components",
      "description": "Helmfile components section",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "patternProperties": {
            "^[/a-zA-Z0-9-_{}. ]+$": {
              "$ref": "#/definitions/helmfile_component_manifest"
            }
          },
          "additionalProperties": false
        }
      ]
    },
    "container_restart": {
      "title": "container_restart",
      "type": "object",
      "description": "Restart policy (maps to docker/podman --restart). Shared by the container and emulator component kinds.",
      "additionalProperties": false,
      "properties": {
        "policy": {
          "type": "string",
          "description": "Restart policy.",
          "enum": [
            "no",
            "always",
            "on-failure",
            "unless-stopped"
          ]
        },
        "max_retries": {
          "type": "integer",
          "description": "Maximum restart attempts (only used with the `on-failure` policy).",
          "minimum": 0
        }
      }
    },
    "container_healthcheck": {
      "title": "container_healthcheck",
      "type": "object",
      "description": "Health check, mirroring the Docker Compose `healthcheck` shape (maps to docker/podman --health-* flags). Shared by the container and emulator component kinds.",
      "additionalProperties": false,
      "properties": {
        "test": {
          "description": "Health command. A string (run via the shell, equivalent to CMD-SHELL) or a list whose first element is NONE, CMD, or CMD-SHELL.",
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          ]
        },
        "interval": {
          "type": "string",
          "description": "Time between checks (e.g. 30s, 1m30s)."
        },
        "timeout": {
          "type": "string",
          "description": "Time a check may take before it is considered failed (e.g. 10s)."
        },
        "retries": {
          "type": "integer",
          "description": "Consecutive failures before the container is marked unhealthy.",
          "minimum": 0
        },
        "start_period": {
          "type": "string",
          "description": "Grace period before failures are counted (e.g. 40s)."
        },
        "start_interval": {
          "type": "string",
          "description": "Time between checks during the start period (e.g. 5s)."
        },
        "disable": {
          "type": "boolean",
          "description": "Disable any health check baked into the image."
        }
      }
    },
    "container_runtime": {
      "title": "container_runtime",
      "type": "object",
      "description": "Per-instance container runtime block. Shared by the container and emulator component kinds.",
      "additionalProperties": false,
      "properties": {
        "provider": {
          "type": "string",
          "description": "Container runtime provider: docker, podman, or empty for auto-detect.",
          "enum": [
            "",
            "docker",
            "podman"
          ]
        },
        "auto_start": {
          "type": "boolean",
          "description": "Auto-init/start the Podman machine when no running runtime is found."
        },
        "host": {
          "type": "boolean",
          "description": "Grant the container access to the host container runtime (Docker-out-of-Docker): mount the runtime socket, run as root, relabel for SELinux, set DOCKER_HOST. Opt-in; effectively host-root. On rootless podman the socket is unreachable in-container \u2014 use Docker or `podman machine set --rootful`."
        }
      }
    },
    "emulator_components": {
      "title": "emulator_components",
      "description": "Emulator components section",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "patternProperties": {
            "^[/a-zA-Z0-9-_{}. ]+$": {
              "$ref": "#/definitions/emulator_component_manifest"
            }
          },
          "additionalProperties": false
        }
      ]
    },
    "emulator_component_manifest": {
      "title": "emulator_component_manifest",
      "description": "Emulator component manifest. A driver-backed, long-lived cloud-API emulator (Floci, k3s, OpenBao, registry, \u2026). `driver` and the nested `container` block are first-class sections (not under `vars`).",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "additionalProperties": true,
          "properties": {
            "driver": {
              "type": "string",
              "description": "Built-in emulator driver, e.g. `floci/aws`, `k3s`, `openbao`, `registry`, `gitea`."
            },
            "cloud": {
              "type": "string",
              "description": "Explicit emulated cloud/target (optional; derived from the driver when omitted)."
            },
            "region": {
              "type": "string",
              "description": "Cloud region (AWS/GCP/Azure)."
            },
            "project": {
              "type": "string",
              "description": "GCP project."
            },
            "services": {
              "type": "array",
              "description": "Emulated services to enable (informational; may drive env).",
              "items": {
                "type": "string"
              }
            },
            "ephemeral": {
              "type": "boolean",
              "description": "When true, run without persisting state (no host data dir is bind-mounted)."
            },
            "container": {
              "type": "object",
              "description": "Container overrides for the emulator (image, ports, mounts, env, restart, healthcheck). Reuses the container kind's run shape; the driver supplies defaults.",
              "additionalProperties": true,
              "properties": {
                "runtime": {
                  "$ref": "#/definitions/container_runtime"
                },
                "restart": {
                  "$ref": "#/definitions/container_restart"
                },
                "healthcheck": {
                  "$ref": "#/definitions/container_healthcheck"
                }
              }
            },
            "env": {
              "$ref": "#/definitions/env"
            },
            "settings": {
              "$ref": "#/definitions/settings"
            },
            "metadata": {
              "$ref": "#/definitions/metadata"
            }
          }
        }
      ]
    },
    "container_components": {
      "title": "container_components",
      "description": "Container components section",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "patternProperties": {
            "^[/a-zA-Z0-9-_{}. ]+$": {
              "$ref": "#/definitions/container_component_manifest"
            }
          },
          "additionalProperties": false
        }
      ]
    },
    "container_component_manifest": {
      "title": "container_component_manifest",
      "description": "Container component manifest. A stack-scoped, persistent container service. `image`, `build`, and `run` are first-class sections (not under `vars`).",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "additionalProperties": true,
          "properties": {
            "composition": {
              "type": "string",
              "description": "Name of the composition this component is a member of (must be declared under the top-level `compositions` section)."
            },
            "image": {
              "type": "string",
              "description": "Container image reference (supports Go templates)."
            },
            "build": {
              "type": "object",
              "description": "Image build configuration (context, dockerfile, tags, build_args, target, etc.).",
              "additionalProperties": true
            },
            "run": {
              "type": "object",
              "description": "Container run configuration (command, ports, mounts, user, restart, healthcheck, etc.).",
              "additionalProperties": true,
              "properties": {
                "runtime": {
                  "$ref": "#/definitions/container_runtime"
                },
                "restart": {
                  "$ref": "#/definitions/container_restart"
                },
                "healthcheck": {
                  "$ref": "#/definitions/container_healthcheck"
                }
              }
            },
            "env": {
              "$ref": "#/definitions/env"
            },
            "settings": {
              "$ref": "#/definitions/settings"
            },
            "metadata": {
              "$ref": "#/definitions/metadata"
            },
            "command": {
              "$ref": "#/definitions/command"
            }
          }
        }
      ]
    },
    "compositions": {
      "title": "compositions",
      "description": "Named multi-service systems. Components join a composition via their `composition` field.",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "patternProperties": {
            "^[/a-zA-Z0-9-_{}. ]+$": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "services"
              ],
              "properties": {
                "description": {
                  "type": "string"
                },
                "services": {
                  "type": "array",
                  "description": "Closed set of service names that may claim membership (open for fulfillment).",
                  "minItems": 1,
                  "uniqueItems": true,
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "additionalProperties": false
        }
      ]
    },
    "helmfile_component_manifest": {
      "title": "helmfile_component_manifest",
      "description": "Helmfile component manifest",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "metadata": {
              "$ref": "#/definitions/metadata"
            },
            "component": {
              "$ref": "#/definitions/component"
            },
            "vars": {
              "$ref": "#/definitions/vars"
            },
            "env": {
              "$ref": "#/definitions/env"
            },
            "settings": {
              "$ref": "#/definitions/settings"
            },
            "locals": {
              "$ref": "#/definitions/locals"
            },
            "command": {
              "$ref": "#/definitions/command"
            },
            "plugins": {
              "$ref": "#/definitions/plugins"
            },
            "auth": {
              "$ref": "#/definitions/component_auth"
            },
            "secrets": {
              "$ref": "#/definitions/component_secrets"
            },
            "dependencies": {
              "$ref": "#/definitions/dependencies"
            },
            "provision": {
              "$ref": "#/definitions/provision"
            },
            "source": {
              "$ref": "#/definitions/source"
            }
          },
          "required": []
        }
      ]
    },
    "kubernetes": {
      "title": "kubernetes",
      "description": "Kubernetes component type defaults",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "vars": {
              "$ref": "#/definitions/vars"
            },
            "env": {
              "$ref": "#/definitions/env"
            },
            "settings": {
              "$ref": "#/definitions/settings"
            },
            "locals": {
              "$ref": "#/definitions/locals"
            },
            "provider": {
              "$ref": "#/definitions/kubernetes_provider"
            },
            "paths": {
              "$ref": "#/definitions/kubernetes_paths"
            },
            "manifests": {
              "$ref": "#/definitions/kubernetes_manifests"
            },
            "render": {
              "$ref": "#/definitions/kubernetes_render"
            },
            "hooks": {
              "$ref": "#/definitions/hooks"
            }
          },
          "required": []
        }
      ]
    },
    "kubernetes_components": {
      "title": "kubernetes_components",
      "description": "Kubernetes components section",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "patternProperties": {
            "^[/a-zA-Z0-9-_{}. ]+$": {
              "$ref": "#/definitions/kubernetes_component_manifest"
            }
          },
          "additionalProperties": false
        }
      ]
    },
    "kubernetes_component_manifest": {
      "title": "kubernetes_component_manifest",
      "description": "Kubernetes component manifest",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "metadata": {
              "$ref": "#/definitions/metadata"
            },
            "component": {
              "$ref": "#/definitions/component"
            },
            "provider": {
              "$ref": "#/definitions/kubernetes_provider"
            },
            "paths": {
              "$ref": "#/definitions/kubernetes_paths"
            },
            "manifests": {
              "$ref": "#/definitions/kubernetes_manifests"
            },
            "vars": {
              "$ref": "#/definitions/vars"
            },
            "env": {
              "$ref": "#/definitions/env"
            },
            "settings": {
              "$ref": "#/definitions/settings"
            },
            "locals": {
              "$ref": "#/definitions/locals"
            },
            "hooks": {
              "$ref": "#/definitions/hooks"
            },
            "generate": {
              "$ref": "#/definitions/generate"
            },
            "render": {
              "$ref": "#/definitions/kubernetes_render"
            },
            "source": {
              "$ref": "#/definitions/source"
            },
            "provision": {
              "$ref": "#/definitions/provision"
            },
            "auth": {
              "$ref": "#/definitions/component_auth"
            },
            "dependencies": {
              "$ref": "#/definitions/dependencies"
            }
          },
          "required": []
        }
      ]
    },
    "packer": {
      "title": "packer",
      "description": "Packer section",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "vars": {
              "$ref": "#/definitions/vars"
            },
            "env": {
              "$ref": "#/definitions/env"
            },
            "settings": {
              "$ref": "#/definitions/settings"
            },
            "locals": {
              "$ref": "#/definitions/locals"
            },
            "command": {
              "$ref": "#/definitions/command"
            },
            "overrides": {
              "$ref": "#/definitions/overrides"
            },
            "dependencies": {
              "$ref": "#/definitions/dependencies"
            },
            "provision": {
              "$ref": "#/definitions/provision"
            }
          },
          "required": []
        }
      ]
    },
    "packer_components": {
      "title": "packer_components",
      "description": "Packer components section",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "patternProperties": {
            "^[/a-zA-Z0-9-_{}. ]+$": {
              "$ref": "#/definitions/packer_component_manifest"
            }
          },
          "additionalProperties": false
        }
      ]
    },
    "packer_component_manifest": {
      "title": "packer_component_manifest",
      "description": "packer component manifest",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "metadata": {
              "$ref": "#/definitions/metadata"
            },
            "component": {
              "$ref": "#/definitions/component"
            },
            "vars": {
              "$ref": "#/definitions/vars"
            },
            "env": {
              "$ref": "#/definitions/env"
            },
            "settings": {
              "$ref": "#/definitions/settings"
            },
            "locals": {
              "$ref": "#/definitions/locals"
            },
            "command": {
              "$ref": "#/definitions/command"
            },
            "auth": {
              "$ref": "#/definitions/component_auth"
            },
            "secrets": {
              "$ref": "#/definitions/component_secrets"
            },
            "dependencies": {
              "$ref": "#/definitions/dependencies"
            },
            "provision": {
              "$ref": "#/definitions/provision"
            },
            "source": {
              "$ref": "#/definitions/source"
            }
          },
          "required": []
        }
      ]
    },
    "kubernetes_provider": {
      "title": "kubernetes_provider",
      "description": "SDK-backed Kubernetes manifest provider",
      "type": "string",
      "enum": [
        "kubectl",
        "kustomize"
      ]
    },
    "kubernetes_paths": {
      "title": "kubernetes_paths",
      "description": "Manifest files or directories relative to the Kubernetes component directory",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ]
    },
    "kubernetes_manifests": {
      "title": "kubernetes_manifests",
      "description": "Inline Kubernetes manifests rendered and deployed with the component",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "array",
          "items": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "$ref": "#/definitions/kubernetes_manifest"
              }
            ]
          }
        }
      ]
    },
    "kubernetes_manifest": {
      "title": "kubernetes_manifest",
      "description": "Kubernetes API object. Atmos validates only the structural fields it requires before passing the object to the Kubernetes API.",
      "type": "object",
      "additionalProperties": true,
      "required": [
        "apiVersion",
        "kind"
      ],
      "properties": {
        "apiVersion": {
          "type": "string"
        },
        "kind": {
          "type": "string"
        },
        "metadata": {
          "type": "object",
          "additionalProperties": true
        }
      }
    },
    "kubernetes_render": {
      "title": "kubernetes_render",
      "description": "Render output configuration for Kubernetes manifests",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "output": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "path": {
                  "type": "string"
                },
                "split": {
                  "type": "boolean"
                }
              },
              "required": []
            }
          },
          "required": []
        }
      ]
    },
    "plugins": {
      "title": "plugins",
      "description": "Helm CLI plugins (e.g. helm-diff, helm-secrets) to install into the managed HELM_PLUGINS directory. Each entry is a compact spec: a short alias (e.g. \"diff@3.9.x\"), an \"owner/repo@version\", or a full plugin URL.",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ]
    },
    "generate": {
      "title": "generate",
      "description": "Generate section for declarative file generation. Keys are filenames (must be quoted if containing dots), values are either string templates or objects that will be serialized based on file extension (.json, .yaml, .yml, .tf, .hcl).",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "additionalProperties": {
            "oneOf": [
              {
                "type": "string",
                "description": "String template processed with Go templates"
              },
              {
                "type": "object",
                "description": "Object serialized based on file extension",
                "additionalProperties": true
              }
            ]
          }
        }
      ]
    },
    "source": {
      "title": "source",
      "description": "Component source configuration for Just-in-Time (JIT) vendoring. Specifies where to fetch component code from. Supports go-getter compatible URIs.",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "string",
          "description": "Go-getter compatible URI with optional version in query string (e.g., 'github.com/org/repo//path?ref=v1.0.0')"
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "type": {
              "type": "string",
              "description": "Source type hint for go-getter (e.g., 'git', 's3', 'gcs')"
            },
            "uri": {
              "type": "string",
              "description": "Go-getter compatible URI (e.g., 'github.com/org/repo//path')"
            },
            "version": {
              "type": "string",
              "description": "Version tag, branch, or commit hash to checkout"
            },
            "included_paths": {
              "type": "array",
              "description": "Glob patterns for files to include when vendoring",
              "items": {
                "type": "string"
              }
            },
            "excluded_paths": {
              "type": "array",
              "description": "Glob patterns for files to exclude when vendoring",
              "items": {
                "type": "string"
              }
            },
            "retry": {
              "$ref": "#/definitions/source_retry"
            }
          },
          "required": [
            "uri"
          ]
        }
      ]
    },
    "source_retry": {
      "title": "source_retry",
      "description": "Retry configuration for source vendoring operations",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "max_attempts": {
              "type": "integer",
              "minimum": 1,
              "description": "Maximum number of retry attempts"
            },
            "initial_delay": {
              "type": "string",
              "description": "Initial delay between retries (e.g., '1s', '500ms')"
            },
            "max_delay": {
              "type": "string",
              "description": "Maximum delay between retries (e.g., '30s', '1m')"
            },
            "backoff_strategy": {
              "type": "string",
              "enum": [
                "constant",
                "linear",
                "exponential"
              ],
              "description": "Strategy for increasing delay between retries"
            },
            "multiplier": {
              "type": "number",
              "minimum": 1,
              "description": "Multiplier for exponential/linear backoff"
            },
            "random_jitter": {
              "type": "number",
              "minimum": 0,
              "maximum": 1,
              "description": "Random jitter factor (0-1) to add to delays"
            },
            "max_elapsed_time": {
              "type": "string",
              "description": "Maximum total time for all retry attempts (e.g., '5m', '1h')"
            }
          },
          "required": []
        }
      ]
    },
    "provision_workdir": {
      "title": "provision_workdir",
      "description": "Workdir provisioner configuration for isolated component execution directories",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "enabled": {
              "type": "boolean",
              "description": "Enable isolated working directory for this component"
            }
          },
          "required": []
        }
      ]
    },
    "provision": {
      "title": "provision",
      "description": "Provision section for component provisioning configuration, including workdir and delivery targets",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "properties": {
            "workdir": {
              "$ref": "#/definitions/provision_workdir"
            },
            "default": {
              "type": "string",
              "description": "Name of the provision target used by apply/deploy when --target is not given"
            },
            "targets": {
              "type": "object",
              "description": "Named delivery destinations for rendered artifacts, keyed by target name",
              "additionalProperties": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "description": "Target provisioner kind (e.g. 'git' or 'kubernetes')"
                  },
                  "repository": {
                    "type": "string",
                    "description": "For kind 'git': name of a top-level git.repositories.<name> to publish to"
                  },
                  "path": {
                    "type": "string",
                    "description": "For kind 'git': destination path inside the deployment repository (supports Go templates)"
                  },
                  "auth": {
                    "type": "object",
                    "properties": {
                      "identity": {
                        "type": "string",
                        "description": "Atmos Auth identity used for the delivery"
                      }
                    },
                    "additionalProperties": false
                  },
                  "commit": {
                    "type": "object",
                    "properties": {
                      "message": {
                        "type": "string",
                        "description": "Commit message (supports Go templates)"
                      },
                      "signing": {
                        "type": "string",
                        "enum": [
                          "auto",
                          "always",
                          "never"
                        ],
                        "description": "Commit signing mode"
                      }
                    },
                    "additionalProperties": false
                  },
                  "pull_request": {
                    "type": "object",
                    "properties": {
                      "enabled": {
                        "type": "boolean",
                        "description": "Publish via pull request (not yet supported by the cli git provider)"
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "required": [
                  "kind"
                ],
                "additionalProperties": true
              }
            }
          },
          "additionalProperties": true
        }
      ]
    },
    "dependencies": {
      "title": "dependencies",
      "description": "Dependencies section. Declares required tool versions (`tools`), component-to-component dependencies (`components`), and path-based dependencies (`files`, `folders`) used by `atmos describe affected`, `atmos describe dependents`, and CI/CD integrations.",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "tools": {
              "$ref": "#/definitions/dependencies_tools"
            },
            "components": {
              "$ref": "#/definitions/dependencies_components"
            },
            "files": {
              "$ref": "#/definitions/dependencies_files"
            },
            "folders": {
              "$ref": "#/definitions/dependencies_folders"
            }
          },
          "required": []
        }
      ]
    },
    "dependencies_components": {
      "title": "dependencies_components",
      "description": "List of component-to-component dependencies. Each entry declares a dependency on another component using `name` (preferred) or `component` (legacy alias), with optional `stack` and `kind`. Path-based dependencies should use the sibling `files` / `folders` keys; the legacy `kind: file` / `kind: folder` entries inside this list still parse but are discouraged.",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/definitions/dependencies_component_entry"
          }
        }
      ]
    },
    "dependencies_component_entry": {
      "title": "dependencies_component_entry",
      "description": "A single component-to-component dependency entry. Use `name` (preferred) or `component` (legacy alias) to identify the target component. The legacy `kind: file` / `kind: folder` shape with `path:` still parses for backward compatibility, but new configurations should use the sibling `dependencies.files` / `dependencies.folders` keys instead.",
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Component instance name (e.g., `vpc`, `tgw/hub`). Preferred over `component` in new configurations. This is the name under `components.<kind>.<name>`, not the Terraform module path."
        },
        "component": {
          "type": "string",
          "description": "Legacy alias for `name`. Component instance name (e.g., `vpc`, `tgw/hub`). New configurations should use `name` instead."
        },
        "stack": {
          "type": "string",
          "description": "Atmos stack name where the component is provisioned (e.g., `tenant1-ue2-prod`). If omitted, the dependency is resolved in the current stack. Supports Go templates."
        },
        "kind": {
          "type": "string",
          "description": "Dependency type. Use `terraform`, `helmfile`, `packer`, or another registered component type for component dependencies (defaults to the declaring component's type). The legacy values `file` and `folder` (with `path:`) still parse but are discouraged \u2014 use `dependencies.files` / `dependencies.folders` instead."
        },
        "path": {
          "type": "string",
          "description": "File or folder path for legacy inline path-based dependencies. Required when `kind` is `file` or `folder`. New configurations should use the sibling `dependencies.files` / `dependencies.folders` keys instead."
        }
      },
      "anyOf": [
        {
          "required": [
            "name"
          ]
        },
        {
          "required": [
            "component"
          ]
        },
        {
          "required": [
            "kind",
            "path"
          ],
          "properties": {
            "kind": {
              "enum": [
                "file",
                "folder"
              ]
            }
          }
        }
      ],
      "additionalProperties": false
    },
    "dependencies_files": {
      "title": "dependencies_files",
      "description": "List of file paths whose changes mark the declaring component as affected by `atmos describe affected`. Each entry is a file path string. Replaces the legacy `kind: file` entries inside `dependencies.components`.",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "array",
          "items": {
            "type": "string",
            "description": "File path (relative to the repository root). Changes to this file mark the declaring component as affected."
          }
        }
      ]
    },
    "dependencies_folders": {
      "title": "dependencies_folders",
      "description": "List of folder paths whose contents (recursive) mark the declaring component as affected by `atmos describe affected`. Each entry is a folder path string. Replaces the legacy `kind: folder` entries inside `dependencies.components`.",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "array",
          "items": {
            "type": "string",
            "description": "Folder path (relative to the repository root). Changes to any file under this folder mark the declaring component as affected."
          }
        }
      ]
    },
    "dependencies_tools": {
      "title": "dependencies_tools",
      "description": "Tool dependencies with version specifications. Keys are tool names (e.g., 'terraform', 'kubectl', 'k9s') and values are version strings (e.g., '1.9.8', 'latest').",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "additionalProperties": {
            "type": "string",
            "description": "Tool version (e.g., '1.9.8', '0.32.7', 'latest')"
          }
        }
      ]
    },
    "command": {
      "title": "command",
      "description": "Command to execute",
      "type": "string"
    },
    "component": {
      "title": "component",
      "description": "Component section",
      "type": "string"
    },
    "metadata": {
      "title": "metadata",
      "description": "Metadata section",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "name": {
              "type": "string",
              "description": "Logical component identity used for workspace key prefix auto-generation. Inheritable from base components."
            },
            "type": {
              "type": "string",
              "enum": [
                "abstract",
                "real"
              ]
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag to enable or disable the component"
            },
            "component": {
              "type": "string",
              "description": "Terraform/OpenTofu/Helmfile component"
            },
            "description": {
              "type": "string",
              "description": "Human-readable component description"
            },
            "inherits": {
              "oneOf": [
                {
                  "type": "string",
                  "pattern": "^!include"
                },
                {
                  "type": "array",
                  "description": "A list of Atmos components that the current component inherits from",
                  "uniqueItems": true,
                  "items": {
                    "type": "string"
                  }
                }
              ]
            },
            "terraform_workspace": {
              "type": "string",
              "description": "Terraform workspace"
            },
            "terraform_workspace_pattern": {
              "type": "string",
              "description": "Terraform workspace pattern"
            },
            "custom": {
              "oneOf": [
                {
                  "type": "string",
                  "pattern": "^!include"
                },
                {
                  "type": "object",
                  "description": "Custom configuration per component, not inherited by derived components",
                  "additionalProperties": true,
                  "title": "custom"
                }
              ]
            },
            "locked": {
              "type": "boolean",
              "description": "Flag to lock the component and prevent modifications while allowing read operations"
            },
            "tags": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "User-defined tags for categorizing and filtering components (atmos list components --tags)."
            },
            "labels": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              },
              "description": "User-defined key-value labels for categorizing and filtering components (atmos list components --labels)."
            }
          },
          "required": []
        }
      ]
    },
    "settings": {
      "title": "settings",
      "description": "Settings section",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "additionalProperties": true,
          "properties": {
            "validation": {
              "$ref": "#/definitions/validation"
            },
            "depends_on": {
              "$ref": "#/definitions/depends_on"
            },
            "spacelift": {
              "$ref": "#/definitions/spacelift"
            },
            "atlantis": {
              "$ref": "#/definitions/atlantis"
            },
            "templates": {
              "$ref": "#/definitions/templates"
            },
            "yaml": {
              "type": "object",
              "description": "YAML parsing settings",
              "properties": {
                "key_delimiter": {
                  "type": "string",
                  "description": "Delimiter for expanding dotted keys into nested maps (e.g., '.' or '::'). Empty or omitted disables expansion."
                }
              }
            }
          },
          "required": []
        }
      ]
    },
    "validation": {
      "title": "validation",
      "description": "Validation section",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "patternProperties": {
            "^[/a-zA-Z0-9-_{}. ]+$": {
              "$ref": "#/definitions/validation_manifest"
            }
          },
          "additionalProperties": false
        }
      ]
    },
    "validation_manifest": {
      "title": "validation_manifest",
      "description": "Validation manifest",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "properties": {
            "schema_type": {
              "type": "string",
              "enum": [
                "jsonschema",
                "opa"
              ]
            },
            "schema_path": {
              "type": "string"
            },
            "description": {
              "type": "string"
            },
            "disabled": {
              "type": "boolean"
            },
            "timeout": {
              "type": "integer",
              "minimum": 0
            },
            "module_paths": {
              "type": "array",
              "uniqueItems": true,
              "items": {
                "type": "string"
              },
              "description": "List of paths to validation modules"
            }
          },
          "additionalProperties": false,
          "required": [
            "schema_type",
            "schema_path"
          ]
        }
      ]
    },
    "vars": {
      "title": "vars",
      "description": "Vars section",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "additionalProperties": true
        }
      ]
    },
    "env": {
      "title": "env",
      "description": "Env section",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "additionalProperties": true
        }
      ]
    },
    "locals": {
      "title": "locals",
      "description": "File-scoped local variables for use within templates. Locals are resolved before other sections and can reference each other within the same file. Unlike vars and settings, locals do NOT inherit across file boundaries.",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "additionalProperties": true
        }
      ]
    },
    "backend_type": {
      "title": "backend_type",
      "description": "Backend type",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "string",
          "enum": [
            "local",
            "s3",
            "remote",
            "vault",
            "static",
            "azurerm",
            "gcs",
            "cloud"
          ]
        }
      ]
    },
    "backend": {
      "title": "backend",
      "description": "Backend section",
      "$ref": "#/definitions/backend_manifest"
    },
    "remote_state_backend_type": {
      "title": "remote_state_backend_type",
      "description": "Remote state backend type",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "string",
          "enum": [
            "local",
            "s3",
            "remote",
            "vault",
            "static",
            "azurerm",
            "gcs",
            "cloud"
          ]
        }
      ]
    },
    "remote_state_backend": {
      "title": "remote_state_backend",
      "description": "Remote state backend section",
      "$ref": "#/definitions/backend_manifest"
    },
    "backend_manifest": {
      "title": "backend",
      "description": "Backend manifest",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "local": {
              "oneOf": [
                {
                  "type": "string",
                  "pattern": "^!include"
                },
                {
                  "type": "object",
                  "additionalProperties": true
                }
              ]
            },
            "s3": {
              "oneOf": [
                {
                  "type": "string",
                  "pattern": "^!include"
                },
                {
                  "type": "object",
                  "additionalProperties": true
                }
              ]
            },
            "remote": {
              "oneOf": [
                {
                  "type": "string",
                  "pattern": "^!include"
                },
                {
                  "type": "object",
                  "additionalProperties": true
                }
              ]
            },
            "vault": {
              "oneOf": [
                {
                  "type": "string",
                  "pattern": "^!include"
                },
                {
                  "type": "object",
                  "additionalProperties": true
                }
              ]
            },
            "static": {
              "oneOf": [
                {
                  "type": "string",
                  "pattern": "^!include"
                },
                {
                  "type": "object",
                  "additionalProperties": true
                }
              ]
            },
            "azurerm": {
              "oneOf": [
                {
                  "type": "string",
                  "pattern": "^!include"
                },
                {
                  "type": "object",
                  "additionalProperties": true
                }
              ]
            },
            "gcs": {
              "oneOf": [
                {
                  "type": "string",
                  "pattern": "^!include"
                },
                {
                  "type": "object",
                  "additionalProperties": true
                }
              ]
            },
            "cloud": {
              "oneOf": [
                {
                  "type": "string",
                  "pattern": "^!include"
                },
                {
                  "type": "object",
                  "additionalProperties": true
                }
              ]
            }
          },
          "required": []
        }
      ]
    },
    "overrides": {
      "title": "overrides",
      "description": "Overrides section",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "command": {
              "$ref": "#/definitions/command"
            },
            "vars": {
              "$ref": "#/definitions/vars"
            },
            "env": {
              "$ref": "#/definitions/env"
            },
            "settings": {
              "$ref": "#/definitions/settings"
            },
            "providers": {
              "$ref": "#/definitions/providers"
            }
          },
          "required": []
        }
      ]
    },
    "depends_on": {
      "title": "depends_on",
      "description": "Depends_on section",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "patternProperties": {
            "^[/a-zA-Z0-9-_{}. ]+$": {
              "$ref": "#/definitions/depends_on_manifest"
            }
          },
          "additionalProperties": false
        }
      ]
    },
    "depends_on_manifest": {
      "title": "depends_on_manifest",
      "description": "Depends_on manifest",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "properties": {
            "namespace": {
              "type": "string"
            },
            "tenant": {
              "type": "string"
            },
            "environment": {
              "type": "string"
            },
            "stage": {
              "type": "string"
            },
            "component": {
              "type": "string"
            },
            "file": {
              "type": "string"
            },
            "folder": {
              "type": "string"
            }
          },
          "oneOf": [
            {
              "required": [
                "component"
              ]
            },
            {
              "required": [
                "file"
              ]
            },
            {
              "required": [
                "folder"
              ]
            }
          ],
          "additionalProperties": false
        }
      ]
    },
    "spacelift": {
      "title": "spacelift",
      "description": "Spacelift section",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "additionalProperties": true,
          "properties": {
            "workspace_enabled": {
              "type": "boolean"
            },
            "stack_destructor_enabled": {
              "type": "boolean"
            },
            "protect_from_deletion": {
              "type": "boolean"
            },
            "autodeploy": {
              "type": "boolean"
            },
            "terraform_version": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "string"
                }
              ]
            }
          },
          "required": []
        }
      ]
    },
    "atlantis": {
      "title": "atlantis",
      "description": "Atlantis section",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "config_template_name": {
              "type": "string"
            },
            "config_template": {
              "oneOf": [
                {
                  "type": "string",
                  "pattern": "^!include"
                },
                {
                  "type": "object",
                  "additionalProperties": true
                }
              ]
            },
            "project_template_name": {
              "type": "string"
            },
            "project_template": {
              "oneOf": [
                {
                  "type": "string",
                  "pattern": "^!include"
                },
                {
                  "type": "object",
                  "additionalProperties": true
                }
              ]
            },
            "workflow_templates": {
              "oneOf": [
                {
                  "type": "string",
                  "pattern": "^!include"
                },
                {
                  "type": "object",
                  "additionalProperties": true
                }
              ]
            }
          },
          "required": []
        }
      ]
    },
    "workflows": {
      "title": "workflows",
      "description": "Workflows section",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "properties": {
            "name": {
              "type": "string"
            },
            "description": {
              "type": "string"
            }
          },
          "patternProperties": {
            "^[/a-zA-Z0-9-_{}. ]+$": {
              "$ref": "#/definitions/workflow_manifest"
            }
          },
          "additionalProperties": false
        }
      ]
    },
    "workflow_manifest": {
      "title": "workflow_manifest",
      "description": "Workflow manifest",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "description": {
              "type": "string"
            },
            "stack": {
              "type": "string"
            },
            "steps": {
              "oneOf": [
                {
                  "type": "string",
                  "pattern": "^!include"
                },
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/workflow_step"
                  }
                }
              ]
            },
            "working_directory": {
              "type": "string",
              "description": "Working directory for the workflow."
            },
            "dependencies": {
              "$ref": "#/definitions/dependencies"
            },
            "env": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              },
              "description": "Environment variables applied to every step in the workflow."
            },
            "container": {
              "$ref": "#/definitions/workflow_container"
            },
            "output": {
              "type": "string",
              "description": "Default output mode for steps in this workflow."
            },
            "viewport": {
              "$ref": "#/definitions/workflow_viewport"
            },
            "show": {
              "$ref": "#/definitions/workflow_show"
            }
          },
          "required": [
            "steps"
          ]
        }
      ]
    },
    "workflow_viewport": {
      "title": "workflow_viewport",
      "description": "Viewport settings controlling the scrollback window for workflow step output.",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "height": {
              "type": "integer",
              "description": "Viewport height in lines."
            },
            "width": {
              "type": "integer",
              "description": "Viewport width in columns."
            }
          }
        }
      ]
    },
    "workflow_show": {
      "title": "workflow_show",
      "description": "Automatic display settings for workflows. Each flag is tri-state: omitted inherits, true enables, false disables.",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "header": {
              "type": "boolean",
              "description": "Auto-display the workflow description as a styled header before the first step."
            },
            "flags": {
              "type": "boolean",
              "description": "Display workflow-level flag values under the header (e.g. \"stack: dev\")."
            },
            "command": {
              "type": "boolean",
              "description": "Show each step command before execution (with a $ prefix)."
            },
            "count": {
              "type": "boolean",
              "description": "Show the step count prefix (e.g. \"[1/3]\")."
            },
            "progress": {
              "type": "boolean",
              "description": "Show a progress bar pinned to the bottom (Docker-build style, TTY only)."
            },
            "labels": {
              "type": "boolean",
              "description": "Show step boundary labels and completion/failure footers."
            }
          }
        }
      ]
    },
    "workflow_container": {
      "title": "workflow_container",
      "description": "Container execution settings for a workflow or step. Set to `false` to run on the host instead of a container.",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "boolean"
        },
        {
          "type": "object",
          "additionalProperties": true,
          "properties": {
            "image": {
              "type": "string",
              "description": "Container image to run steps in."
            },
            "shell": {
              "type": "string",
              "description": "Shell used to execute commands inside the container."
            },
            "provider": {
              "type": "string",
              "description": "Container provider: docker, podman, or empty for auto-detect."
            },
            "runtime_auto_start": {
              "type": "boolean",
              "description": "Automatically start the container runtime when needed."
            },
            "pull": {
              "type": "string",
              "description": "Image pull policy: always, missing, or never."
            },
            "workspace": {
              "type": "string",
              "description": "Path the repository is mounted to inside the container."
            },
            "workspace_read_only": {
              "type": "boolean",
              "description": "Mount the workspace read-only."
            },
            "cleanup": {
              "type": "string",
              "description": "Cleanup policy for the container after the workflow completes."
            },
            "user": {
              "type": "string",
              "description": "User to run as inside the container."
            },
            "run_args": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Extra arguments passed to the container run command."
            },
            "mounts": {
              "type": "array",
              "items": {
                "type": "object",
                "additionalProperties": true
              },
              "description": "Additional volume mounts for the container."
            },
            "ports": {
              "type": "array",
              "items": {
                "type": "object",
                "additionalProperties": true
              },
              "description": "Port mappings for the container."
            },
            "env": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              },
              "description": "Environment variables set inside the container."
            }
          }
        }
      ]
    },
    "workflow_step": {
      "title": "workflow_step",
      "description": "Workflow step",
      "type": "object",
      "additionalProperties": true,
      "properties": {
        "name": {
          "type": "string"
        },
        "command": {
          "type": "string"
        },
        "args": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Command/scanner step arguments (supports templates)."
        },
        "prompt": {
          "description": "Prompt text for interactive steps, or a structured prompt for cast simulation steps.",
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "text": {
                  "type": "string",
                  "description": "Prompt text to render before simulated typed text."
                },
                "style": {
                  "type": "string",
                  "enum": [
                    "command",
                    "label",
                    "muted",
                    "info",
                    "notice"
                  ],
                  "description": "Semantic Atmos theme style for the simulated prompt."
                }
              }
            }
          ]
        },
        "mode": {
          "type": "string",
          "description": "Mode for cast and simulate steps. Simulate supports typed and prompt."
        },
        "rate": {
          "type": "string",
          "description": "Delay between simulated typed characters, e.g. 35ms. Use 0 to write immediately."
        },
        "write_rate": {
          "type": "string",
          "description": "Default delay between cast session text writes, e.g. 35ms. Use 0 to write immediately."
        },
        "text": {
          "type": "string",
          "description": "Text for write, wait, or simulate steps."
        },
        "stack": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "retry": {
          "$ref": "#/definitions/workflow_retry"
        },
        "working_directory": {
          "type": "string",
          "description": "Working directory for the workflow step"
        },
        "identity": {
          "type": "string",
          "description": "Identity to use for the workflow step"
        },
        "when": {
          "description": "Condition controlling whether this workflow step runs. Omitted means run.",
          "allOf": [
            {
              "$ref": "#/definitions/step_condition"
            }
          ]
        },
        "timeout": {
          "type": "string",
          "description": "Timeout duration for the workflow step"
        },
        "env": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Environment variables for the workflow step"
        },
        "needs": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "uniqueItems": true,
          "description": "Sibling workflow steps that must complete before this step can run"
        },
        "max_concurrency": {
          "type": "integer",
          "minimum": 0,
          "description": "Maximum number of child steps to run concurrently"
        },
        "fail": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "mode": {
              "type": "string",
              "enum": [
                "wait_all",
                "fail_fast",
                "best_effort"
              ]
            },
            "max_failures": {
              "type": "integer",
              "minimum": 0
            }
          }
        },
        "output": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "mode": {
                  "type": "string",
                  "enum": [
                    "grouped",
                    "prefixed",
                    "none",
                    "raw"
                  ]
                },
                "order": {
                  "type": "string",
                  "enum": [
                    "completion",
                    "definition"
                  ]
                },
                "show_summary": {
                  "type": "boolean"
                },
                "prefix": {
                  "type": "string"
                },
                "cast": {
                  "type": "string",
                  "description": "Path to write the asciicast recording (cast steps)."
                },
                "gif": {
                  "type": "string",
                  "description": "Path to render an animated GIF from the cast recording (requires agg)."
                },
                "mp4": {
                  "type": "string",
                  "description": "Path to render an MP4 from the cast recording (requires agg and ffmpeg)."
                },
                "html": {
                  "type": "string",
                  "description": "Path to render a static HTML fragment of the final terminal content (native)."
                },
                "ascii": {
                  "type": "string",
                  "description": "Path to render the final terminal content as plain text with no ANSI codes (native)."
                },
                "png": {
                  "type": "string",
                  "description": "Path to render a static PNG image of the final terminal content (native)."
                },
                "jpg": {
                  "type": "string",
                  "description": "Path to render a static JPEG image of the final terminal content (native)."
                }
              }
            }
          ]
        },
        "matrix": {
          "type": "object",
          "additionalProperties": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "string"
            }
          },
          "description": "Matrix axes for matrix workflow steps"
        },
        "steps": {
          "oneOf": [
            {
              "type": "string",
              "pattern": "^!include"
            },
            {
              "type": "array",
              "items": {
                "$ref": "#/definitions/workflow_step"
              }
            }
          ]
        },
        "script": {
          "type": "string",
          "description": "Inline script body for the script step type."
        },
        "interpreter": {
          "type": "string",
          "description": "Script interpreter for the script step type (e.g. bash, python3)."
        },
        "interactive": {
          "type": "boolean",
          "description": "Attach host stdin to the step and let it handle Ctrl-C (like docker -i)."
        },
        "tty": {
          "type": "boolean",
          "description": "Allocate a pseudo-terminal for the step (like docker -t). Combine with interactive for full terminal sessions."
        },
        "options": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Options presented by the choose/filter step types."
        },
        "default": {
          "type": "string",
          "description": "Default value for the input/choose interactive step types."
        },
        "placeholder": {
          "type": "string",
          "description": "Placeholder text for the input step type."
        },
        "password": {
          "type": "boolean",
          "description": "Mask typed input for the input step type."
        },
        "multiple": {
          "type": "boolean",
          "description": "Allow selecting multiple options in the choose step type."
        },
        "limit": {
          "type": "integer",
          "description": "Maximum number of selections for the choose step type."
        },
        "content": {
          "type": "string",
          "description": "Content for output step types (supports templates)."
        },
        "title": {
          "type": "string",
          "description": "Title for spin and pager step types."
        },
        "data": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": true
          },
          "description": "Row objects for the table step type."
        },
        "columns": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Column headers for the table step type."
        },
        "separator": {
          "type": "string",
          "description": "Separator for the join step type (default: newline)."
        },
        "path": {
          "type": "string",
          "description": "Starting path for the file picker step type, or target path for the workdir step type."
        },
        "source": {
          "description": "Source for workdir provisioning; a string or a source map.",
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "object",
              "additionalProperties": true
            }
          ]
        },
        "reset": {
          "type": "boolean",
          "description": "Reset the target path before provisioning (workdir step type)."
        },
        "extensions": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "File extension filter for the file picker step type."
        },
        "height": {
          "type": "integer",
          "description": "Editor height in lines for the write step type."
        },
        "viewport": {
          "$ref": "#/definitions/workflow_viewport"
        },
        "count": {
          "type": "integer",
          "description": "Number of blank lines emitted by the linebreak step type."
        },
        "foreground": {
          "type": "string",
          "description": "Foreground color for the style step type."
        },
        "background": {
          "description": "Style background color (string) for the style step type, or a boolean async marker (`background: true`) for container step types.",
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "boolean"
            }
          ]
        },
        "border": {
          "type": "string",
          "description": "Border style for the style step type: none, hidden, normal, rounded, thick, or double."
        },
        "border_foreground": {
          "type": "string",
          "description": "Border foreground color for the style step type."
        },
        "border_background": {
          "type": "string",
          "description": "Border background color for the style step type."
        },
        "padding": {
          "type": "string",
          "description": "Padding for the style step type: \"1\", \"1 2\", or \"1 2 1 2\" (top, right, bottom, left)."
        },
        "margin": {
          "type": "string",
          "description": "Margin for the style step type: \"1\", \"1 2\", or \"1 2 1 2\" (top, right, bottom, left)."
        },
        "width": {
          "type": "integer",
          "description": "Fixed width for the style step type."
        },
        "align": {
          "type": "string",
          "description": "Text alignment for the style step type: left, center, or right."
        },
        "bold": {
          "type": "boolean",
          "description": "Render text bold (style step type)."
        },
        "italic": {
          "type": "boolean",
          "description": "Render text italic (style step type)."
        },
        "underline": {
          "type": "boolean",
          "description": "Underline text (style step type)."
        },
        "strikethrough": {
          "type": "boolean",
          "description": "Render text with strikethrough (style step type)."
        },
        "faint": {
          "type": "boolean",
          "description": "Render text faint/dim (style step type)."
        },
        "markdown": {
          "type": "boolean",
          "description": "Render content as markdown (output and style step types)."
        },
        "level": {
          "type": "string",
          "description": "Log level for the log step type (e.g. trace, debug, info, warn, error)."
        },
        "fields": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Structured log fields (key-value pairs) for the log step type."
        },
        "voice": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Ordered voice candidates for the say step type; the first installed on the host wins (CSS font-family style)."
        },
        "print": {
          "type": "string",
          "description": "Print policy for the say step type: fallback (default), always, or never."
        },
        "vars": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Variables to set for the env step type."
        },
        "code": {
          "type": "integer",
          "description": "Exit code for the exit step type."
        },
        "url": {
          "type": "string",
          "description": "Request URL for the http step type (supports templates)."
        },
        "method": {
          "type": "string",
          "description": "HTTP method for the http step type: GET (default), POST, PUT, PATCH, DELETE, HEAD, or OPTIONS."
        },
        "headers": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Request headers for the http step type (supports templates)."
        },
        "query": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Query-string parameters for the http step type (supports templates)."
        },
        "body": {
          "type": "string",
          "description": "Raw request body for the http step type (supports templates); mutually exclusive with form."
        },
        "form": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Form/JSON body parameters for the http step type; mutually exclusive with body."
        },
        "expect": {
          "type": "object",
          "additionalProperties": true,
          "description": "Success criteria for the http step type; defaults to any 2xx response.",
          "properties": {
            "status": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "description": "Acceptable HTTP status codes."
            },
            "response": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Regex patterns; the response body must match at least one."
            }
          }
        },
        "shell": {
          "type": "string",
          "description": "Shell for cast session mode."
        },
        "key_interval": {
          "type": "string",
          "description": "Default delay between repeated keys in cast session mode, e.g. 35ms."
        },
        "jitter": {
          "type": "number",
          "description": "Deterministic typing delay variance for simulated typed cast steps."
        },
        "cursor": {
          "type": "boolean",
          "description": "Show a simulated cursor for cast simulate steps."
        },
        "regex": {
          "type": "string",
          "description": "Regex for cast wait actions."
        },
        "key": {
          "type": "string",
          "description": "Key name for cast key actions."
        },
        "duration": {
          "type": "string",
          "description": "Duration for cast pause/wait actions, e.g. 500ms."
        },
        "interval": {
          "type": "string",
          "description": "Per-key repeat delay override for cast key actions."
        },
        "repeat": {
          "type": "integer",
          "description": "Key repeat count for cast key actions."
        },
        "defaults": {
          "type": "object",
          "additionalProperties": true,
          "description": "Default settings applied to child steps inside a cast step."
        },
        "action": {
          "type": "string",
          "description": "Container verb for the container step type: build, push, run, or inspect."
        },
        "with": {
          "type": "object",
          "additionalProperties": true,
          "description": "Container action parameters (GitHub-Actions uses/with style), decoded according to `action`."
        },
        "runtime_auto_start": {
          "type": "boolean",
          "description": "Automatically start the container runtime for this step."
        },
        "runtime": {
          "type": "object",
          "additionalProperties": true,
          "description": "Inline per-step container runtime block (e.g. runtime.host for Docker-out-of-Docker)."
        },
        "provider": {
          "type": "string",
          "description": "Container provider: docker, podman, or empty for auto-detect."
        },
        "container": {
          "$ref": "#/definitions/workflow_container"
        },
        "component": {
          "type": "string",
          "description": "Emulator component name to operate on (emulator step type)."
        },
        "ephemeral": {
          "type": "boolean",
          "description": "Run the emulator without persistence for this step (emulator step type)."
        },
        "format": {
          "type": "string",
          "description": "Archive format for the archive step type: zip, tar, tgz, tar.bz2, or tar.xz; inferred from destination/source extension when omitted."
        },
        "destination": {
          "type": "string",
          "description": "Archive step type: archive file to write when packing, or directory to extract into when extracting."
        },
        "subpath": {
          "type": "string",
          "description": "Archive step type: nest source content under this path inside the archive when packing; only extract this path (prefix stripped) when extracting."
        },
        "include": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Archive step type: glob(s); keep only matching files."
        },
        "exclude": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Archive step type: glob(s); drop matching files, evaluated before include."
        },
        "mtime": {
          "type": "string",
          "description": "Archive step type: modification-time metadata stamped into each archive entry: filesystem (default), epoch (one shared timestamp for the whole archive), or git (per-entry timestamps). epoch/git also normalize permission bits."
        },
        "files": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Glob(s) of JUnit XML files to summarize or annotate (junit step type)."
        },
        "tools": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Executables that must be found on PATH for the require step type (supports templates)."
        },
        "dirs": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Directories that must exist for the require step type (supports templates)."
        },
        "hint": {
          "type": "string",
          "description": "Extra remediation note appended to a require step failure (supports templates)."
        },
        "outputs": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Named outputs derived from the step result."
        },
        "show": {
          "$ref": "#/definitions/workflow_show"
        },
        "for": {
          "description": "Target background step name(s) a wait/cancel action applies to; a scalar or a sequence.",
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          ]
        }
      },
      "allOf": [
        {
          "if": {
            "properties": {
              "prompt": {
                "type": "object"
              }
            },
            "required": [
              "prompt"
            ]
          },
          "then": {
            "properties": {
              "type": {
                "const": "simulate"
              }
            },
            "required": [
              "type"
            ]
          }
        }
      ]
    },
    "workflow_retry": {
      "title": "workflow_retry",
      "description": "Retry configuration for workflow steps",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "max_attempts": {
              "type": "integer",
              "minimum": 1,
              "description": "Maximum number of retry attempts"
            },
            "initial_delay": {
              "type": "string",
              "description": "Initial delay between retries (e.g., '1s', '500ms')"
            },
            "max_delay": {
              "type": "string",
              "description": "Maximum delay between retries (e.g., '30s', '1m')"
            },
            "backoff_strategy": {
              "type": "string",
              "enum": [
                "constant",
                "linear",
                "exponential"
              ],
              "description": "Strategy for increasing delay between retries"
            },
            "multiplier": {
              "type": "number",
              "minimum": 1,
              "description": "Multiplier for exponential/linear backoff"
            },
            "random_jitter": {
              "type": "number",
              "minimum": 0,
              "maximum": 1,
              "description": "Random jitter factor (0-1) to add to delays"
            },
            "max_elapsed_time": {
              "type": "string",
              "description": "Maximum total time for all retry attempts (e.g., '5m', '1h')"
            }
          },
          "required": []
        }
      ]
    },
    "providers": {
      "title": "providers",
      "description": "Providers section",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "additionalProperties": true
        }
      ]
    },
    "templates": {
      "title": "templates",
      "description": "Templates section",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "additionalProperties": true
        }
      ]
    },
    "hooks": {
      "title": "hooks",
      "description": "Hooks section. Each key names a hook; the value sets its kind, the lifecycle events it fires on, and kind-specific settings.",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "additionalProperties": {
            "oneOf": [
              {
                "type": "string",
                "pattern": "^!include"
              },
              {
                "type": "object",
                "description": "A single hook.",
                "properties": {
                  "kind": {
                    "type": "string",
                    "description": "Selects the engine that runs this hook.",
                    "enum": [
                      "store",
                      "command",
                      "infracost",
                      "checkov",
                      "kics",
                      "trivy",
                      "tflint",
                      "git",
                      "step",
                      "steps",
                      "ci.check",
                      "ci.output",
                      "ci.summary",
                      "ci.upload",
                      "ci.download"
                    ]
                  },
                  "command": {
                    "type": "string",
                    "description": "Binary to execute (command kind); also the legacy alias for kind (e.g. 'command: store')."
                  },
                  "events": {
                    "type": "array",
                    "description": "Lifecycle events this hook fires on (e.g. after.terraform.apply). The legacy hyphenated form (e.g. after-terraform-apply) is also accepted. Empty matches all events.",
                    "items": {
                      "type": "string"
                    }
                  },
                  "on_failure": {
                    "type": "string",
                    "description": "Failure mode when the hook errors.",
                    "enum": [
                      "warn",
                      "fail",
                      "ignore"
                    ]
                  },
                  "when": {
                    "description": "Condition controlling whether this hook runs. Omitted means success. If no success, failure, or always predicate is mentioned, success is applied implicitly.",
                    "allOf": [
                      {
                        "$ref": "#/definitions/condition"
                      }
                    ]
                  },
                  "args": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "env": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "format": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string",
                    "description": "Step type to run (step kind): any registered workflow/custom-command step type, e.g. container, http, toast, log."
                  },
                  "with": {
                    "description": "Parameters for the step named by 'type' (step kind), or an ordered list of steps (steps kind). Validated by the step handler at run time.",
                    "oneOf": [
                      {
                        "type": "object",
                        "additionalProperties": true
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    ]
                  },
                  "retry": {
                    "$ref": "#/definitions/workflow_retry"
                  },
                  "name": {
                    "type": "string",
                    "description": "Store backend name (store kind)."
                  },
                  "outputs": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "repository": {
                    "type": "string",
                    "description": "Managed repository name (git kind)."
                  },
                  "commit": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "push": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": true
              }
            ]
          }
        }
      ]
    },
    "version": {
      "title": "version",
      "description": "Stack-level Atmos Version Tracker track assertion. Selects which version track (`atmos version track`) this stack resolves `!version` and `{{ .version.* }}` against.",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "track": {
              "type": "string",
              "description": "The version track this stack asserts (e.g. `dev`, `prod`). Defaults to `version.track` in `atmos.yaml` when omitted."
            }
          }
        }
      ]
    },
    "component_secrets": {
      "title": "component_secrets",
      "description": "Secrets configuration. Declares secrets resolved at runtime via the `!secret` YAML function, and (at the stack/global level) the non-store secret providers (e.g. SOPS) that back them. Store-backed secrets reference a `secret: true` store under `stores`.",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "providers": {
              "$ref": "#/definitions/secret_providers"
            },
            "vars": {
              "$ref": "#/definitions/secret_vars"
            }
          }
        }
      ]
    },
    "secret_providers": {
      "title": "secret_providers",
      "description": "Non-store secret providers (e.g. SOPS) that do not fit the key-value store interface. Keys are provider names, values are provider configurations.",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "patternProperties": {
            "^[a-zA-Z0-9/_-]+$": {
              "$ref": "#/definitions/secret_provider"
            }
          },
          "additionalProperties": false
        }
      ]
    },
    "secret_provider": {
      "title": "secret_provider",
      "description": "A single non-store secret provider configuration (e.g. a SOPS backend).",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "additionalProperties": true,
          "properties": {
            "kind": {
              "type": "string",
              "description": "Provider implementation (e.g. 'sops/age', 'sops/aws-kms', 'sops/gcp-kms', 'sops/gpg')."
            },
            "identity": {
              "type": "string",
              "description": "Optional auth identity (resolved via auth) used by KMS-backed SOPS kinds (sops/aws-kms, sops/gcp-kms). Local-key kinds (sops/age, sops/gpg) ignore it."
            },
            "spec": {
              "type": "object",
              "additionalProperties": true,
              "description": "Provider-specific options (e.g. file, age_recipients, kms arn)."
            }
          },
          "required": [
            "kind"
          ]
        }
      ]
    },
    "secret_vars": {
      "title": "secret_vars",
      "description": "Declared secrets for a component. Keys are secret names, values are secret declarations. A secret must be declared before it can be set, read via `!secret`, or pulled/pushed.",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "patternProperties": {
            ".+": {
              "$ref": "#/definitions/secret_declaration"
            }
          },
          "additionalProperties": false
        }
      ]
    },
    "secret_declaration": {
      "title": "secret_declaration",
      "description": "A single declared secret. Exactly one backend reference (store or sops) is set.",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "description": {
              "type": "string",
              "description": "Human-readable description of the secret."
            },
            "store": {
              "type": "string",
              "description": "Names a `secret: true` store (under `stores`) this secret resolves from."
            },
            "sops": {
              "type": "string",
              "description": "Names a `secrets.providers` SOPS provider this secret resolves from."
            },
            "reference": {
              "type": "string",
              "description": "Optional backend-specific address for the secret. Reference-based backends (e.g. a 1Password store) resolve it directly instead of composing a key from the secret name; it may contain Go-template vars ({{ .atmos_stack }}, {{ .atmos_component }}). Example: \"op://Production/{{ .atmos_component }}/password\". Name-keyed backends ignore it."
            },
            "required": {
              "type": "boolean",
              "description": "Marks the secret as required; validation fails if it is not initialized."
            },
            "scope": {
              "type": "string",
              "enum": [
                "instance",
                "stack",
                "global"
              ],
              "description": "Storage scope. Normally derived from declaration position (top-level `secrets:` => stack, shared by every component instance; `components.<c>.secrets:` => instance). If set explicitly it must match the position \u2014 a conflict (e.g. `scope: stack` under a component) is an error \u2014 except `global`, which is honored at either position. Instance-scoped secrets are stored per component; stack-scoped secrets are stored once per stack; global secrets are stored once per backend store and shared by every stack and component that resolves through it."
            }
          },
          "oneOf": [
            {
              "required": [
                "store"
              ],
              "not": {
                "required": [
                  "sops"
                ]
              }
            },
            {
              "required": [
                "sops"
              ],
              "not": {
                "required": [
                  "store"
                ]
              }
            }
          ]
        }
      ]
    },
    "component_auth": {
      "title": "component_auth",
      "description": "Component-level authentication configuration. Allows overriding or extending global auth providers and identities for specific components.",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "additionalProperties": true,
          "properties": {
            "realm": {
              "type": "string",
              "description": "Credential isolation realm. Different realms provide isolated credentials even for identities with the same name."
            },
            "providers": {
              "$ref": "#/definitions/auth_providers"
            },
            "identities": {
              "$ref": "#/definitions/auth_identities"
            },
            "integrations": {
              "type": "object",
              "description": "Client-only credential materializations (e.g., ECR, EKS).",
              "additionalProperties": true
            }
          },
          "required": []
        }
      ]
    },
    "auth_providers": {
      "title": "auth_providers",
      "description": "Authentication providers configuration. Keys are provider names, values are provider configurations.",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "patternProperties": {
            "^[a-zA-Z0-9/_-]+$": {
              "$ref": "#/definitions/auth_provider"
            }
          },
          "additionalProperties": false
        }
      ]
    },
    "auth_provider": {
      "title": "auth_provider",
      "description": "Authentication provider configuration.",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "additionalProperties": true,
          "properties": {
            "kind": {
              "type": "string",
              "description": "Provider type (e.g., 'aws/iam-identity-center', 'aws/credentials')"
            },
            "start_url": {
              "type": "string",
              "description": "SSO start URL for AWS IAM Identity Center"
            },
            "url": {
              "type": "string",
              "description": "Provider URL"
            },
            "region": {
              "type": "string",
              "description": "AWS region for the provider"
            },
            "default": {
              "type": "boolean",
              "description": "Whether this is the default provider"
            },
            "session": {
              "$ref": "#/definitions/auth_session"
            },
            "console": {
              "$ref": "#/definitions/auth_console"
            },
            "auto_provision_identities": {
              "type": "boolean",
              "description": "Whether to auto-provision identities when authenticating with this provider"
            },
            "spec": {
              "type": "object",
              "additionalProperties": true,
              "description": "Provider-specific configuration"
            },
            "tags": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "User-defined tags for categorizing and filtering providers (atmos auth list/logout --tags)."
            }
          },
          "required": [
            "kind"
          ]
        }
      ]
    },
    "auth_identities": {
      "title": "auth_identities",
      "description": "Authentication identities configuration. Keys are identity names, values are identity configurations.",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "patternProperties": {
            "^[a-zA-Z0-9/_-]+$": {
              "$ref": "#/definitions/auth_identity"
            }
          },
          "additionalProperties": false
        }
      ]
    },
    "auth_identity": {
      "title": "auth_identity",
      "description": "Authentication identity configuration.",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "additionalProperties": true,
          "properties": {
            "kind": {
              "type": "string",
              "description": "Identity type (e.g., 'aws/permission-set', 'aws/assume-role')"
            },
            "default": {
              "type": "boolean",
              "description": "Whether this is the default identity"
            },
            "required": {
              "type": "boolean",
              "description": "Whether this identity is automatically authenticated without prompting. Required identities are authenticated before commands run."
            },
            "provider": {
              "type": "string",
              "description": "Provider name for direct provider association"
            },
            "via": {
              "$ref": "#/definitions/auth_identity_via"
            },
            "principal": {
              "type": "object",
              "additionalProperties": true,
              "description": "Principal information (role name, account, etc.)",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "Principal name (e.g., permission set name, role name)"
                },
                "account": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "Account name"
                    },
                    "id": {
                      "type": "string",
                      "description": "Account ID"
                    }
                  }
                }
              }
            },
            "credentials": {
              "type": "object",
              "additionalProperties": true,
              "description": "Static credentials configuration"
            },
            "alias": {
              "type": "string",
              "description": "Alias for the identity"
            },
            "env": {
              "type": "array",
              "description": "Environment variables to set when using this identity",
              "items": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string"
                  },
                  "value": {
                    "type": "string"
                  }
                },
                "required": [
                  "key",
                  "value"
                ]
              }
            },
            "session": {
              "$ref": "#/definitions/auth_session"
            },
            "tags": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "User-defined tags for categorizing and filtering identities (atmos auth list/login --tags)."
            }
          },
          "required": []
        }
      ]
    },
    "auth_identity_via": {
      "title": "auth_identity_via",
      "description": "Specifies how an identity connects to a provider or chains from another identity.",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "provider": {
              "type": "string",
              "description": "Provider name to authenticate through"
            },
            "identity": {
              "type": "string",
              "description": "Identity name to chain from (for role chaining)"
            }
          }
        }
      ]
    },
    "auth_session": {
      "title": "auth_session",
      "description": "Session configuration for authentication.",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "duration": {
              "type": "string",
              "description": "Session duration (e.g., '1h', '12h')"
            }
          }
        }
      ]
    },
    "auth_console": {
      "title": "auth_console",
      "description": "Web console access configuration.",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^!include"
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "session_duration": {
              "type": "string",
              "description": "Console session duration (e.g., '12h'). Max: 12h for AWS."
            }
          }
        }
      ]
    }
  }
}
