{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://open-delivery-spec.dev/schemas/commit-message.json", "title": "ODS Commit Message", "description": "Schema for validating commit messages against the Open Delivery Spec Commit Message standard (v1.0.0). Extends Conventional Commits 1.0.0 with AI attribution fields.", "type": "object", "required": ["type", "description"], "properties": { "type": { "type": "string", "enum": ["feat", "fix", "docs", "style", "refactor", "perf", "test", "build", "ci", "chore", "revert"], "description": "Conventional Commit type." }, "scope": { "type": "string", "pattern": "^[a-z0-9_-]+$", "description": "Affected module or component (optional)." }, "description": { "type": "string", "minLength": 1, "maxLength": 72, "description": "Short summary of the change, imperative mood, lowercase." }, "body": { "type": "string", "description": "Detailed explanation, motivation, and context." }, "breaking_change": { "type": "boolean", "default": false, "description": "Whether this commit introduces a breaking change." }, "breaking_change_description": { "type": "string", "description": "Required if breaking_change is true. Migration notes for the breaking change." }, "ai_assisted": { "type": "boolean", "default": false, "description": "Whether AI contributed to this commit." }, "ai_tool": { "type": "string", "description": "Name of the AI tool used (required if ai_assisted is true)." }, "ai_scope": { "type": "string", "description": "What the AI specifically generated." }, "ai_review": { "type": "string", "enum": ["pending", "passed", "failed"], "description": "Review status of AI-generated code." }, "ai_confidence": { "type": "string", "enum": ["low", "medium", "high"], "description": "Author's confidence in AI-generated portion." }, "ticket": { "type": "string", "pattern": "^[A-Z]+-\\d+$", "description": "Issue tracker ticket ID." }, "risk": { "type": "string", "enum": ["low", "medium", "high"], "description": "Author-assessed deployment risk." } }, "allOf": [ { "if": { "properties": { "ai_assisted": { "const": true } } }, "then": { "required": ["ai_tool"] } }, { "if": { "properties": { "breaking_change": { "const": true } } }, "then": { "required": ["breaking_change_description"] } } ], "examples": [ { "type": "feat", "scope": "auth", "description": "add OAuth 2.0 login flow", "ai_assisted": true, "ai_tool": "GitHub Copilot", "ai_scope": "auth module, token refresh logic", "ai_review": "pending", "ai_confidence": "high", "ticket": "PROJ-1234", "risk": "medium" }, { "type": "fix", "scope": "parser", "description": "handle empty input gracefully", "ai_assisted": true, "ai_tool": "GitHub Copilot", "ai_scope": "null check suggestion", "ai_review": "passed", "ticket": "BUG-891" }, { "type": "chore", "scope": "deps", "description": "bump lodash to 4.17.21", "ai_assisted": false } ] }