{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://coderifts.com/decision-spec/v1.0.json","title":"CodeRifts Decision Spec v1.0","$comment":"Amended in place 2026-08-03: added required property execution_action (CONTINUE | CONTINUE_WITH_MONITORING | REQUEST_APPROVAL | STOP). Done as an amendment to the published v1.0 document rather than a v1.1 sibling because this spec had no consumers at that point; a schema named v1.1 that still required coderifts_version \"1.0\" would have been self-contradictory, and changing the server to emit 1.1 would have invalidated published v1.0 for every real response. Amending a published versioned schema in place is otherwise not acceptable and will not be repeated once anyone depends on this file.","description":"Machine-readable standard for API governance decisions in AI agent pipelines. This schema describes a FRESH preflight response. A retrieved decision is a different shape and is covered by the consumer schema at https://coderifts.com/schemas/decision-result.v1.consumer.json.","type":"object","required":["coderifts_version","decision","execution_action","risk_score","safe_for_agent","breaking_changes","patterns","requires_migration","evidence_quality","timestamp"],"properties":{"coderifts_version":{"type":"string","enum":["1.0"],"description":"Version of the CodeRifts Decision Spec"},"decision":{"type":"string","enum":["BLOCK","REQUIRE_APPROVAL","WARN","ALLOW"],"description":"Governance decision. BLOCK = do not merge/deploy. REQUIRE_APPROVAL = human review needed. WARN = proceed with caution. ALLOW = no configured blocking signal detected under the supplied evidence."},"execution_action":{"type":"string","enum":["CONTINUE","CONTINUE_WITH_MONITORING","REQUEST_APPROVAL","STOP"],"description":"Branch on execution_action (the proceed signal); use decision as the explanation."},"risk_score":{"type":"integer","minimum":0,"maximum":100,"description":"Composite risk score. 0 = no risk, 100 = maximum risk."},"safe_for_agent":{"type":"boolean","description":"false if any agent-breaking pattern detected. Agents MUST NOT call the updated API when false."},"breaking_changes":{"type":"integer","minimum":0,"description":"Total count of breaking changes detected."},"patterns":{"type":"array","items":{"type":"string"},"description":"Named patterns from the CodeRifts Pattern Registry."},"requires_migration":{"type":"boolean","description":"true if consumers need to update before the change can deploy."},"evidence_quality":{"type":"string","enum":["HIGH","MEDIUM","LOW"],"description":"Confidence in the decision. HIGH = 3+ signals, complete spec, confirmed. MEDIUM = partial evidence. LOW = heuristic only."},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of the analysis."}},"correlation_id":"7d1f03ee-3eaa-43fc-b9a0-72a1a6324042"}