Files
jobtrackingapp/automation/schemas/backlog.schema.json
T

74 lines
3.7 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Jobjakt immutable backlog policy",
"type": "object",
"required": ["schemaVersion", "executionEnabled", "minimumCodexVersion", "baselineCommit", "baselineBranch", "remote", "integrationBranch", "stages"],
"properties": {
"schemaVersion": {"const": 1},
"executionEnabled": {"type": "boolean"},
"minimumCodexVersion": {"type": "string"},
"baselineCommit": {"type": "string", "pattern": "^[0-9a-f]{40}$"},
"baselineBranch": {"$ref": "#/$defs/branch"},
"remote": {"type": "string", "pattern": "^[A-Za-z0-9_-]+$"},
"integrationBranch": {"$ref": "#/$defs/branch"},
"stages": {"type": "array", "minItems": 1, "items": {"$ref": "#/$defs/stage"}}
},
"$defs": {
"branch": {"type": "string", "pattern": "^(codex|feature|planning|test)/[A-Za-z0-9][A-Za-z0-9/_-]*$"},
"strings": {"type": "array", "items": {"type": "string"}},
"stage": {
"type": "object",
"required": ["id", "sequence", "sourcePrompt", "promptSha256", "sourceStatus", "dependencies", "branch", "requiredOwnerApprovals", "retryPolicy", "status", "evidence", "reports", "contextFiles", "checkpoints"],
"properties": {
"id": {"type": "string", "pattern": "^[A-Z0-9-]+$"},
"sequence": {"type": "integer", "minimum": 1},
"sourcePrompt": {"type": "string"},
"promptSha256": {"type": "string"},
"sourceStatus": {"enum": ["VERIFIED", "MISSING", "EMPTY"]},
"dependencies": {"$ref": "#/$defs/strings"},
"branch": {"$ref": "#/$defs/branch"},
"requiredOwnerApprovals": {"$ref": "#/$defs/strings"},
"retryPolicy": {
"type": "object", "required": ["maxAttempts", "maxSessions", "backoffSeconds"],
"properties": {"maxAttempts": {"type": "integer", "minimum": 1, "maximum": 10}, "maxSessions": {"type": "integer", "minimum": 1, "maximum": 100}, "backoffSeconds": {"type": "integer", "minimum": 0, "maximum": 3600}}
},
"status": {"enum": ["PENDING", "READY", "RUNNING", "BLOCKED", "AWAITING_APPROVAL", "FAILED", "CONDITIONALLY_ACCEPTED", "ACCEPTED", "COMPLETED"]},
"evidence": {"type": "array"},
"reports": {"type": "array"},
"contextFiles": {"$ref": "#/$defs/strings"},
"checkpoints": {"type": "array", "minItems": 1, "items": {"$ref": "#/$defs/checkpoint"}}
}
},
"checkpoint": {
"type": "object",
"required": ["id", "instruction", "approvalsBefore", "approvalsAfter", "deferrableGates", "requiredArtifacts", "checks", "evidenceRequirements"],
"properties": {
"id": {"type": "string", "pattern": "^[A-Za-z0-9-]+$"},
"instruction": {"type": "string"},
"approvalsBefore": {"$ref": "#/$defs/strings"},
"approvalsAfter": {"$ref": "#/$defs/strings"},
"deferrableGates": {"$ref": "#/$defs/strings"},
"requiredArtifacts": {"$ref": "#/$defs/strings"},
"evidenceRequirements": {"$ref": "#/$defs/strings"},
"checks": {"type": "array", "items": {"$ref": "#/$defs/check"}}
}
},
"check": {
"type": "object",
"required": ["id", "argv", "cwd", "report"],
"properties": {
"id": {"type": "string", "pattern": "^[A-Za-z0-9-]+$"},
"argv": {"type": "array", "minItems": 1, "items": {"type": "string"}},
"cwd": {"type": "string"},
"configured": {"type": "boolean"},
"report": {"type": ["object", "null"], "properties": {
"format": {"enum": ["trx", "jest", "playwright", "junit"]},
"path": {"type": "string"},
"minimumPassed": {"type": "integer", "minimum": 1},
"expectedNames": {"$ref": "#/$defs/strings"}
}}
}
}
}
}