{ "$schema": "http://json-schema.org/draft-07/schema#", "title": "ADR Specification", "description": "JSON Schema for ADR TOML artifacts after parsing and normalization", "type": "object", "required": ["govctl", "content"], "properties": { "govctl": { "type": "object", "required": ["id", "title", "status", "date"], "properties": { "id": { "type": "string", "pattern": "^ADR-\\d{4}$" }, "title": { "type": "string", "minLength": 1 }, "status": { "type": "string", "enum": ["proposed", "accepted", "rejected", "superseded"] }, "date": { "type": "string", "format": "date" }, "superseded_by": { "type": "string", "pattern": "^ADR-\\d{4}$" }, "refs": { "type": "array", "items": { "type": "string", "pattern": "^(RFC-\\d{4}(?::C-[A-Z][A-Z0-9-]*)?|ADR-\\d{4}|WI-\\d{4}-\\d{2}-\\d{2}-(?:[a-f0-9]{4}(?:-\\d{3})?|\\d{3}))$" } }, "tags": { "type": "array", "items": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$" } }, "schema": { "type": "integer" } }, "additionalProperties": false }, "content": { "type": "object", "required": ["context", "decision", "consequences"], "properties": { "context": { "type": "string" }, "decision": { "type": "string" }, "consequences": { "type": "string" }, "alternatives": { "type": "array", "items": { "type": "object", "required": ["text"], "properties": { "text": { "type": "string", "minLength": 1 }, "status": { "type": "string", "enum": ["considered", "rejected", "accepted"] }, "pros": { "type": "array", "items": { "type": "string" } }, "cons": { "type": "array", "items": { "type": "string" } }, "rejection_reason": { "type": "string" } }, "additionalProperties": false } } }, "additionalProperties": false } }, "additionalProperties": false }