Files
breadcrumb-the-shire/agent-system/contracts/planner.schema.json
2026-03-06 00:44:52 +01:00

144 lines
3.9 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Planner Output",
"type": "object",
"required": [
"task_id",
"summary",
"scope",
"guardrails",
"success_criteria",
"implementation_steps",
"tests",
"acceptance_checks",
"risks"
],
"properties": {
"task_id": { "type": "string", "minLength": 1 },
"summary": { "type": "string", "minLength": 1 },
"assumptions": {
"type": "array",
"items": { "type": "string" }
},
"scope": {
"type": "object",
"required": ["in", "out"],
"properties": {
"in": { "type": "array", "items": { "type": "string" } },
"out": { "type": "array", "items": { "type": "string" } }
},
"additionalProperties": false
},
"guardrails": {
"type": "object",
"required": ["required_guard_ids", "required_quality_gate_ids"],
"properties": {
"required_guard_ids": {
"type": "array",
"minItems": 1,
"items": {
"type": "string",
"pattern": "^GR-[A-Z]+-[0-9]{3}$"
}
},
"required_quality_gate_ids": {
"type": "array",
"minItems": 1,
"items": {
"type": "string",
"pattern": "^QG-[0-9]{3}$"
}
}
},
"additionalProperties": false
},
"success_criteria": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"required": ["id", "criterion"],
"properties": {
"id": {
"type": "string",
"pattern": "^SC-[0-9]{3}$"
},
"criterion": { "type": "string", "minLength": 1 }
},
"additionalProperties": false
}
},
"implementation_steps": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"required": ["id", "title", "description", "guard_refs"],
"properties": {
"id": { "type": "string", "minLength": 1 },
"title": { "type": "string", "minLength": 1 },
"description": { "type": "string", "minLength": 1 },
"guard_refs": {
"type": "array",
"minItems": 1,
"items": {
"type": "string",
"pattern": "^GR-[A-Z]+-[0-9]{3}$"
}
}
},
"additionalProperties": false
}
},
"tests": {
"type": "array",
"minItems": 1,
"items": { "type": "string" }
},
"acceptance_checks": {
"type": "array",
"minItems": 1,
"items": { "type": "string" }
},
"ux_notes": {
"type": "object",
"description": "Required for tasks touching UI (templates, phtml pages, web/js, web/css). Leave fields as empty arrays if not applicable.",
"properties": {
"affected_patterns": {
"type": "array",
"description": "Existing UI patterns or partials touched by this task.",
"items": { "type": "string" }
},
"ui_states_required": {
"type": "array",
"description": "UI states the new view/component must handle: loading, empty, error, success.",
"items": {
"type": "string",
"enum": ["loading", "empty", "error", "success"]
}
},
"a11y_touchpoints": {
"type": "array",
"description": "New interactive elements that must be keyboard-operable and use semantic HTML.",
"items": { "type": "string" }
}
},
"additionalProperties": false
},
"risks": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"required": ["risk", "mitigation"],
"properties": {
"risk": { "type": "string", "minLength": 1 },
"mitigation": { "type": "string", "minLength": 1 }
},
"additionalProperties": false
}
}
},
"additionalProperties": false
}