{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/modelspec-dev/json-schema/modelspec-dev-decision-bounded-decision-schema.json",
  "title": "DecisionBoundedDecision",
  "x-generated": "2026-11-19",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/modelspec-dev-openapi.yaml#/components/schemas/DecisionBoundedDecision",
  "additionalProperties": false,
  "properties": {
    "representation": {
      "const": "bounded",
      "type": "string"
    },
    "bounded_version": {
      "const": "1.5",
      "type": "string"
    },
    "projects_contract": {
      "const": "2.20",
      "type": "string"
    },
    "decision_id": {
      "type": "string"
    },
    "snapshot": {
      "type": "string"
    },
    "signature_verified": {
      "$ref": "#/$defs/signature_verified"
    },
    "spec_hash": {
      "type": "string"
    },
    "explain": {
      "$ref": "#/$defs/explain"
    },
    "status": {
      "$ref": "#/$defs/status"
    },
    "answer": {
      "$ref": "#/$defs/answer"
    },
    "pick": {
      "anyOf": [
        {
          "pattern": "^[a-z0-9][a-z0-9._-]*/[a-z0-9][a-z0-9._-]*$",
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "warnings": {
      "$ref": "#/$defs/warnings"
    },
    "truncated": {
      "$ref": "#/$defs/truncated"
    },
    "out_of_lineup": {
      "type": "integer"
    },
    "relax": {
      "$ref": "#/$defs/relax"
    },
    "relax_to": {
      "$ref": "#/$defs/relax_to"
    },
    "feedback": {
      "$ref": "#/$defs/feedback"
    },
    "results": {
      "items": {
        "$ref": "#/$defs/DecisionProjectedResult"
      },
      "type": "array"
    },
    "may_qualify": {
      "$ref": "#/$defs/may_qualify"
    },
    "reading": {
      "$ref": "#/$defs/reading"
    },
    "coverage": {
      "$ref": "#/$defs/coverage"
    },
    "relax_task_tokens": {
      "$ref": "#/$defs/relax_task_tokens"
    },
    "relax_single": {
      "$ref": "#/$defs/relax_single"
    },
    "with_estate": {
      "$ref": "#/$defs/with_estate"
    },
    "excluded_plans": {
      "$ref": "#/$defs/excluded_plans"
    },
    "explanation": {
      "$ref": "#/$defs/DecisionBoundedExplanation"
    },
    "model_evidence": {
      "anyOf": [
        {
          "$ref": "#/$defs/DecisionModelEvidence"
        },
        {
          "type": "null"
        }
      ]
    },
    "member_evidence": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/DecisionMemberEvidence"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ]
    },
    "summary_for_user": {
      "default": "",
      "type": "string"
    },
    "decision_url": {
      "default": "",
      "type": "string"
    },
    "router_config": {
      "default": "",
      "type": "string"
    },
    "must_mention": {
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "next_move": {
      "anyOf": [
        {
          "$ref": "#/$defs/DecisionNextMove"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "representation",
    "bounded_version",
    "projects_contract",
    "decision_id",
    "snapshot",
    "signature_verified",
    "spec_hash",
    "explain",
    "status",
    "answer",
    "warnings",
    "truncated",
    "out_of_lineup",
    "relax",
    "relax_to",
    "feedback",
    "results",
    "may_qualify",
    "explanation"
  ],
  "type": "object",
  "$defs": {
    "DecisionBoundedExplanation": {
      "additionalProperties": false,
      "properties": {
        "not_applied": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "omitted": {
          "additionalProperties": {
            "type": "integer"
          },
          "type": "object"
        },
        "note": {
          "default": "Projected rows are incomplete; omissions are not eliminations or absent evidence.",
          "type": "string"
        },
        "fetch": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "type": "object"
    },
    "DecisionCitationSource": {
      "additionalProperties": false,
      "properties": {
        "source_id": {
          "type": "string"
        },
        "url": {
          "pattern": "^https?://\\S+$",
          "type": "string"
        },
        "snapshot_ref": {
          "pattern": "^sha256:[0-9a-f]{64}$",
          "type": "string"
        },
        "retrieved_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "resolved_urls": {
          "items": {
            "pattern": "^https?://\\S+$",
            "type": "string"
          },
          "type": "array"
        }
      },
      "required": [
        "source_id",
        "url",
        "snapshot_ref"
      ],
      "type": "object"
    },
    "DecisionContribution": {
      "additionalProperties": false,
      "properties": {
        "raw_value": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ]
        },
        "unit": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "records": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "dimension": {
          "pattern": "^-?[a-z][a-z0-9_-]*(\\.[a-z0-9_-]+)*$",
          "type": "string"
        },
        "weight": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ]
        },
        "value": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ]
        },
        "normalisation": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "evidence": {
          "items": {
            "$ref": "#/$defs/DecisionEvidenceItem"
          },
          "type": "array"
        },
        "formula": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "preferred_value": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "integer"
            },
            {
              "type": "number"
            },
            {
              "format": "date",
              "type": "string"
            },
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "preference_status": {
          "anyOf": [
            {
              "enum": [
                "satisfied",
                "not_satisfied",
                "unknown"
              ],
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "refinement": {
          "anyOf": [
            {
              "pattern": "^[a-z][a-z0-9_-]*(\\.[a-z0-9_-]+)*$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "dimension"
      ],
      "type": "object"
    },
    "DecisionDomainEvidence": {
      "additionalProperties": false,
      "properties": {
        "domain": {
          "pattern": "^[a-z][a-z0-9_-]*(\\.[a-z0-9_-]+)*$",
          "type": "string"
        },
        "items": {
          "items": {
            "$ref": "#/$defs/DecisionEvidenceItem"
          },
          "type": "array"
        }
      },
      "required": [
        "domain",
        "items"
      ],
      "type": "object"
    },
    "DecisionEvidenceItem": {
      "additionalProperties": false,
      "properties": {
        "requested_domain": {
          "anyOf": [
            {
              "pattern": "^[a-z][a-z0-9_-]*(\\.[a-z0-9_-]+)*$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "record_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "benchmark": {
          "type": "string"
        },
        "version": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "sub_category": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "value": {
          "type": "number"
        },
        "unit": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "n": {
          "anyOf": [
            {
              "minimum": 1,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ]
        },
        "interval": {
          "anyOf": [
            {
              "maxItems": 2,
              "minItems": 2,
              "prefixItems": [
                {
                  "type": "number"
                },
                {
                  "type": "number"
                }
              ],
              "type": "array"
            },
            {
              "type": "null"
            }
          ]
        },
        "quality_flags": {
          "items": {
            "enum": [
              "deprecated",
              "contamination_warning"
            ],
            "type": "string"
          },
          "type": "array"
        },
        "measured_by": {
          "enum": [
            "benchmark_author",
            "independent",
            "provider_self_report",
            "modelspec",
            "outcome_protocol"
          ],
          "type": "string"
        },
        "effort": {
          "anyOf": [
            {
              "pattern": "^[a-z0-9_-]+$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "harness": {
          "anyOf": [
            {
              "pattern": "^[a-z0-9][a-z0-9-]*@[0-9]+\\.[0-9]+$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "harness_unregistered": {
          "default": false,
          "type": "boolean"
        },
        "date": {
          "format": "date",
          "type": "string"
        },
        "date_type": {
          "enum": [
            "observed",
            "published"
          ],
          "type": "string"
        },
        "source": {
          "pattern": "^https?://\\S+$",
          "type": "string"
        },
        "source_snapshot": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "directness": {
          "enum": [
            "direct",
            "proxy"
          ],
          "type": "string"
        },
        "loading": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ]
        },
        "estimate_weight": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ]
        },
        "recency_weight": {
          "anyOf": [
            {
              "maximum": 1,
              "minimum": 0,
              "type": "number"
            },
            {
              "type": "null"
            }
          ]
        },
        "citation": {
          "anyOf": [
            {
              "$ref": "#/$defs/DecisionFactCitation"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "benchmark",
        "value",
        "measured_by",
        "date",
        "date_type",
        "source",
        "directness"
      ],
      "type": "object"
    },
    "DecisionFactCitation": {
      "additionalProperties": false,
      "properties": {
        "status": {
          "const": "cited",
          "type": "string"
        },
        "sources": {
          "items": {
            "$ref": "#/$defs/DecisionCitationSource"
          },
          "minItems": 1,
          "type": "array"
        }
      },
      "required": [
        "status",
        "sources"
      ],
      "type": "object"
    },
    "DecisionMemberEvidence": {
      "additionalProperties": false,
      "description": "Objective evidence for one answer member. Added in bounded 1.1 (MODEL-354).",
      "properties": {
        "model": {
          "pattern": "^[a-z0-9][a-z0-9._-]*/[a-z0-9][a-z0-9._-]*$",
          "type": "string"
        },
        "evidence": {
          "items": {
            "$ref": "#/$defs/DecisionDomainEvidence"
          },
          "type": "array"
        },
        "omitted_items": {
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "model",
        "evidence",
        "omitted_items"
      ],
      "type": "object"
    },
    "DecisionModelEvidence": {
      "additionalProperties": false,
      "properties": {
        "model": {
          "pattern": "^[a-z0-9][a-z0-9._-]*/[a-z0-9][a-z0-9._-]*$",
          "type": "string"
        },
        "status": {
          "enum": [
            "ranked",
            "may_qualify",
            "eliminated"
          ],
          "type": "string"
        },
        "offering": {
          "$ref": "#/$defs/DecisionOfferingRef"
        },
        "rank": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ]
        },
        "evidence": {
          "items": {
            "$ref": "#/$defs/DecisionDomainEvidence"
          },
          "type": "array"
        },
        "contributions": {
          "items": {
            "$ref": "#/$defs/DecisionContribution"
          },
          "type": "array"
        },
        "unknown": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "reasons": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "warnings": {
          "items": {
            "pattern": "^[a-z0-9_]+$",
            "type": "string"
          },
          "type": "array"
        }
      },
      "required": [
        "model",
        "status",
        "offering"
      ],
      "type": "object"
    },
    "DecisionNextMove": {
      "additionalProperties": false,
      "description": "A next step that makes no quality pick. Added in bounded 1.2 (MODEL-339).",
      "properties": {
        "kind": {
          "enum": [
            "ask_user",
            "decide_by_testing",
            "user_tiebreak"
          ],
          "type": "string"
        },
        "say": {
          "type": "string"
        },
        "options": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "steps": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "candidates": {
          "items": {
            "pattern": "^[a-z0-9][a-z0-9._-]*/[a-z0-9][a-z0-9._-]*$",
            "type": "string"
          },
          "maxItems": 8,
          "type": "array"
        },
        "candidates_total": {
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "kind",
        "say",
        "options",
        "steps",
        "candidates",
        "candidates_total"
      ],
      "type": "object"
    },
    "DecisionOfferingRef": {
      "additionalProperties": false,
      "properties": {
        "model": {
          "pattern": "^[a-z0-9][a-z0-9._-]*/[a-z0-9][a-z0-9._-]*$",
          "type": "string"
        },
        "provider": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "region": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "tier": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "api_model_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "router_slug": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "model"
      ],
      "type": "object"
    },
    "DecisionProjectedResult": {
      "additionalProperties": false,
      "properties": {
        "rank": {
          "$ref": "#/$defs/rank"
        },
        "offering": {
          "$ref": "#/$defs/offering"
        },
        "model": {
          "$ref": "#/$defs/model"
        },
        "model_rank": {
          "$ref": "#/$defs/model_rank"
        },
        "cost_per_task": {
          "$ref": "#/$defs/cost_per_task"
        },
        "harness": {
          "$ref": "#/$defs/harness"
        },
        "effort": {
          "$ref": "#/$defs/effort"
        },
        "evidence": {
          "$ref": "#/$defs/evidence"
        },
        "estimates": {
          "$ref": "#/$defs/estimates"
        },
        "refinement_estimates": {
          "$ref": "#/$defs/refinement_estimates"
        },
        "p_best": {
          "$ref": "#/$defs/p_best"
        },
        "top3_stability": {
          "$ref": "#/$defs/top3_stability"
        },
        "soft_penalty": {
          "$ref": "#/$defs/soft_penalty"
        },
        "contributions": {
          "$ref": "#/$defs/contributions"
        },
        "warnings": {
          "$ref": "#/$defs/warnings"
        },
        "plans": {
          "$ref": "#/$defs/plans"
        }
      },
      "required": [
        "rank",
        "offering",
        "model",
        "warnings"
      ],
      "type": "object"
    }
  }
}