Files
breadcrumb-the-shire/agent-system/contracts/reviewer-guards.schema.json

89 lines
2.5 KiB
JSON
Raw Normal View History

2026-03-06 00:44:52 +01:00
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Guard Reviewer Output",
"type": "object",
"required": ["task_id", "verdict", "checked_guard_ids", "checked_quality_gate_ids", "findings"],
"properties": {
"task_id": { "type": "string", "minLength": 1 },
2026-03-09 19:56:08 +01:00
"audit_policy_ref": { "type": "string" },
2026-03-06 00:44:52 +01:00
"verdict": { "type": "string", "enum": ["pass", "fail"] },
"checked_guard_ids": {
"type": "array",
"minItems": 1,
"items": {
"type": "string",
"pattern": "^GR-[A-Z]+-[0-9]{3}$"
}
},
"checked_quality_gate_ids": {
"type": "array",
"minItems": 1,
"items": {
"type": "string",
"pattern": "^QG-[0-9]{3}$"
}
},
"findings": {
"type": "array",
"items": {
"type": "object",
"required": ["id", "severity", "rule_ref", "summary", "file"],
"properties": {
"id": { "type": "string", "minLength": 1 },
"severity": { "type": "string", "enum": ["low", "medium", "high", "critical"] },
2026-03-09 19:56:08 +01:00
"priority": { "type": "string", "enum": ["P0", "P1", "P2", "P3"] },
2026-03-06 00:44:52 +01:00
"rule_ref": {
"type": "string",
"pattern": "^(GR-[A-Z]+-[0-9]{3}|QG-[0-9]{3})$"
},
"summary": { "type": "string", "minLength": 1 },
"file": { "type": "string", "minLength": 1 },
2026-03-09 19:56:08 +01:00
"fix_required": { "type": "string" },
"run_artifact_id": {
"type": "string",
"pattern": "^DOCS-SKILLS-AUDIT-[0-9]{3}$"
}
2026-03-06 00:44:52 +01:00
},
"additionalProperties": false
}
}
},
2026-03-09 19:56:08 +01:00
"allOf": [
{
"if": {
"properties": {
"task_id": { "pattern": "^DOCS-SKILLS-AUDIT-[0-9]{3}$" }
},
"required": ["task_id"]
},
"then": {
"required": ["audit_policy_ref"],
"properties": {
"audit_policy_ref": { "const": "agent-system/checks/docs-skills-audit-policy.md" },
"findings": {
"items": {
"allOf": [
{
"required": ["priority"]
},
{
"if": {
"properties": {
"priority": { "enum": ["P0", "P1"] }
},
"required": ["priority"]
},
"then": {
"required": ["run_artifact_id"]
}
}
]
}
}
}
}
}
],
2026-03-06 00:44:52 +01:00
"additionalProperties": false
}