{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://open-delivery-spec.dev/schemas/ai-change-review.json", "title": "ODS AI Change Review", "description": "Schema for AI change review records in the Open Delivery Spec (v1.0.0).", "type": "object", "required": ["pr_number", "review_level", "reviewer", "timestamp", "outcome", "checklist_results"], "properties": { "pr_number": { "type": "integer", "minimum": 1 }, "review_level": { "type": "string", "enum": ["L1", "L2", "L3"], "description": "L1 = Quick Scan (<20% AI), L2 = Enhanced Review (20-80% AI), L3 = Full Audit (>80% AI)" }, "ai_contribution_percentage": { "type": "number", "minimum": 0, "maximum": 100 }, "reviewer": { "type": "string", "description": "GitHub username of the primary reviewer" }, "second_reviewer": { "type": "string", "description": "Required for L3 reviews" }, "timestamp": { "type": "string", "format": "date-time" }, "outcome": { "type": "string", "enum": ["approved", "approved_with_changes", "changes_requested", "blocked"] }, "checklist_results": { "type": "object", "required": ["correctness", "security", "ai_specific", "quality"], "properties": { "correctness": { "type": "object", "required": ["passed", "issues"], "properties": { "passed": { "type": "boolean" }, "issues": { "type": "integer", "minimum": 0 } } }, "security": { "type": "object", "required": ["passed", "issues"], "properties": { "passed": { "type": "boolean" }, "issues": { "type": "integer", "minimum": 0 } } }, "ai_specific": { "type": "object", "required": ["passed", "issues"], "properties": { "passed": { "type": "boolean" }, "issues": { "type": "integer", "minimum": 0 } } }, "quality": { "type": "object", "required": ["passed", "issues"], "properties": { "passed": { "type": "boolean" }, "issues": { "type": "integer", "minimum": 0 } } } } }, "issues_found": { "type": "array", "items": { "type": "object", "required": ["category", "severity", "description"], "properties": { "category": { "type": "string", "enum": ["correctness", "security", "ai_specific", "quality", "architecture", "testing", "documentation", "compliance"] }, "severity": { "type": "string", "enum": ["critical", "high", "medium", "low", "info"] }, "file": { "type": "string" }, "line": { "type": "integer" }, "description": { "type": "string" }, "resolution": { "type": "string" } } } }, "human_modifications": { "type": "array", "items": { "type": "string" }, "description": "List of changes the human reviewer made" } }, "allOf": [ { "if": { "properties": { "review_level": { "const": "L3" } } }, "then": { "required": ["second_reviewer"] } }, { "if": { "properties": { "outcome": { "enum": ["approved_with_changes", "changes_requested"] } } }, "then": { "required": ["human_modifications"] } } ] }