forked from fa/breadcrumb-the-shire
89 lines
2.5 KiB
JSON
89 lines
2.5 KiB
JSON
{
|
|
"$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 },
|
|
"audit_policy_ref": { "type": "string" },
|
|
"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"] },
|
|
"priority": { "type": "string", "enum": ["P0", "P1", "P2", "P3"] },
|
|
"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 },
|
|
"fix_required": { "type": "string" },
|
|
"run_artifact_id": {
|
|
"type": "string",
|
|
"pattern": "^DOCS-SKILLS-AUDIT-[0-9]{3}$"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
}
|
|
},
|
|
"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"]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"additionalProperties": false
|
|
}
|