{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://example.invalid/schemas/automation-manifest-1.0.json", "title": "Automation Manifest", "type": "object", "additionalProperties": false, "required": [ "schema_version", "automation", "source", "trigger", "execution", "hosts", "requirements", "inputs", "outputs", "observability", "failure_policy", "recovery", "security", "change_control" ], "properties": { "schema_version": { "const": "1.0" }, "automation": { "type": "object", "additionalProperties": false, "required": ["id", "name", "description", "version", "status", "owner", "tags"], "properties": { "id": { "type": "string", "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" }, "name": { "type": "string", "minLength": 3 }, "description": { "type": "string", "minLength": 10 }, "version": { "type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$" }, "status": { "enum": ["draft", "testing", "active", "paused", "retired"] }, "owner": { "type": "string", "minLength": 1 }, "tags": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true } } }, "source": { "type": "object", "additionalProperties": false, "required": ["repository", "definition_path", "revision_policy"], "properties": { "repository": { "type": "string", "minLength": 1 }, "definition_path": { "type": "string", "minLength": 1 }, "revision_policy": { "enum": ["pinned-release", "pinned-commit", "tracked-branch"] } } }, "trigger": { "type": "object", "additionalProperties": false, "required": ["type", "enabled_by_default"], "properties": { "type": { "enum": ["schedule", "event", "manual"] }, "schedule": { "type": "object", "additionalProperties": false, "required": ["human", "timezone"], "properties": { "human": { "type": "string", "minLength": 1 }, "timezone": { "type": "string", "minLength": 1 }, "rrule": { "type": ["string", "null"] } } }, "event": { "type": ["object", "null"] }, "enabled_by_default": { "type": "boolean" } }, "allOf": [ { "if": { "properties": { "type": { "const": "schedule" } } }, "then": { "required": ["schedule"] } } ] }, "execution": { "type": "object", "additionalProperties": false, "required": ["platform", "mode", "task_prompt", "working_directory", "skills", "command", "timeout_minutes", "concurrency", "idempotency"], "properties": { "platform": { "enum": ["codex-desktop", "chatgpt-web", "codex-cli", "external-scheduler", "other"] }, "mode": { "enum": ["local-project", "isolated-worktree", "web", "script", "manual"] }, "task_prompt": { "type": "string", "minLength": 1 }, "working_directory": { "type": ["string", "null"] }, "skills": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["path", "required"], "properties": { "path": { "type": "string", "minLength": 1 }, "required": { "type": "boolean" } } } }, "command": { "type": ["string", "null"] }, "timeout_minutes": { "type": "integer", "minimum": 1 }, "concurrency": { "type": "object", "additionalProperties": false, "required": ["max_active_runs", "overlap_policy"], "properties": { "max_active_runs": { "type": "integer", "minimum": 1 }, "overlap_policy": { "enum": ["skip", "queue", "cancel-previous", "parallel"] } } }, "idempotency": { "type": "object", "additionalProperties": false, "required": ["strategy", "state_location"], "properties": { "strategy": { "enum": ["scheduled-window", "input-hash", "external-lock", "none"] }, "state_location": { "type": ["string", "null"] } } } } }, "hosts": { "type": "object", "additionalProperties": false, "required": ["activation_policy", "primary", "standby", "overrides_file"], "properties": { "activation_policy": { "const": "single-active-host" }, "primary": { "$ref": "#/$defs/host" }, "standby": { "type": "array", "items": { "$ref": "#/$defs/host" } }, "overrides_file": { "type": "string", "minLength": 1 } } }, "requirements": { "type": "object", "required": ["software", "tools_and_connectors", "secrets", "permissions"], "properties": { "software": { "type": "array", "items": { "type": "object" } }, "tools_and_connectors": { "type": "array", "items": { "type": ["string", "object"] } }, "secrets": { "type": "array", "items": { "type": "object", "required": ["name", "required", "source"] } }, "permissions": { "type": "object" } } }, "inputs": { "type": "object", "required": ["sources", "parameters"] }, "outputs": { "type": "object", "required": ["artifacts", "success_contract"] }, "observability": { "type": "object", "required": ["run_log", "health", "notifications"] }, "failure_policy": { "type": "object", "required": ["retries", "after_final_failure", "partial_output_policy"] }, "recovery": { "type": "object", "required": ["runbook", "recovery_time_objective_hours", "recovery_point_objective_hours", "failover"] }, "security": { "type": "object", "required": ["secrets_in_repository", "destructive_actions", "external_writes"] }, "change_control": { "type": "object", "required": ["last_reviewed", "review_cadence_days", "required_checks"] } }, "$defs": { "host": { "type": "object", "additionalProperties": false, "required": ["id", "role"], "properties": { "id": { "type": "string", "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" }, "role": { "enum": ["active", "cold-standby", "disabled"] } } } } }