{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.calculatorx.com/schemas/math.geometry.conic.output.json",
  "title": "Conic section — success output",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "status",
    "capability_id",
    "engine",
    "inputs",
    "result",
    "result_detail",
    "calculation_version",
    "verification"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Requested tool id"
    },
    "status": {
      "const": "success"
    },
    "capability_id": {
      "const": "math.geometry.conic"
    },
    "tool": {
      "type": "string",
      "description": "Requested tool id"
    },
    "engine": {
      "type": "string"
    },
    "inputs": {
      "type": "object",
      "description": "Normalized calculation inputs (aliases resolved)"
    },
    "result": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "mode",
        "equation"
      ],
      "properties": {
        "mode": {
          "type": "string"
        },
        "a": {
          "type": "number",
          "x-quantity-kind": "length",
          "x-dimension": [
            1,
            0,
            0,
            0,
            0,
            0,
            0
          ],
          "x-unit-policy": "arbitrary_consistent_length",
          "x-uuce-role": "scalar"
        },
        "b": {
          "type": "number",
          "x-quantity-kind": "length",
          "x-dimension": [
            1,
            0,
            0,
            0,
            0,
            0,
            0
          ],
          "x-unit-policy": "arbitrary_consistent_length",
          "x-uuce-role": "scalar"
        },
        "c": {
          "type": "number",
          "x-quantity-kind": "length",
          "x-dimension": [
            1,
            0,
            0,
            0,
            0,
            0,
            0
          ],
          "x-unit-policy": "arbitrary_consistent_length",
          "x-uuce-role": "scalar"
        },
        "e": {
          "type": "number",
          "x-unit": "1",
          "x-unit-id": "cx:one",
          "x-quantity-kind": "ratio",
          "x-role": "scalar",
          "x-dimension": [
            0,
            0,
            0,
            0,
            0,
            0,
            0
          ],
          "x-uuce-unit": {
            "unit_id": "cx:one",
            "revision": "1.0.0",
            "content_digest": "98cc3ffc58d8733c483b60c4d7e238fe8ad43a6aadcced9496b74f33a01ef599",
            "dependency_digest": "b1c9aa4d586949ee881925298442091ba11dda29f57de0867e43da1cd59e06e5",
            "quantity_kind": "ratio",
            "dimension": [
              0,
              0,
              0,
              0,
              0,
              0,
              0
            ],
            "registry_version": "0.3.0-preview.3",
            "digest_contract": "calculatorx-unit-definition-digests-v2",
            "registry_status": "preview",
            "definition_lifecycle": "candidate",
            "role": "scalar"
          }
        },
        "area": {
          "type": "number",
          "x-quantity-kind": "area",
          "x-dimension": [
            2,
            0,
            0,
            0,
            0,
            0,
            0
          ],
          "x-unit-policy": "input_length_unit_squared",
          "x-uuce-role": "scalar"
        },
        "perimeter": {
          "type": "number",
          "x-quantity-kind": "length",
          "x-dimension": [
            1,
            0,
            0,
            0,
            0,
            0,
            0
          ],
          "x-unit-policy": "arbitrary_consistent_length",
          "x-uuce-role": "scalar"
        },
        "p": {
          "type": "number",
          "x-quantity-kind": "length",
          "x-dimension": [
            1,
            0,
            0,
            0,
            0,
            0,
            0
          ],
          "x-unit-policy": "arbitrary_consistent_length",
          "x-uuce-role": "scalar"
        },
        "orientation": {
          "type": "string"
        },
        "focus_x": {
          "type": "number",
          "x-quantity-kind": "length",
          "x-dimension": [
            1,
            0,
            0,
            0,
            0,
            0,
            0
          ],
          "x-unit-policy": "arbitrary_consistent_length",
          "x-uuce-role": "scalar"
        },
        "focus_y": {
          "type": "number",
          "x-quantity-kind": "length",
          "x-dimension": [
            1,
            0,
            0,
            0,
            0,
            0,
            0
          ],
          "x-unit-policy": "arbitrary_consistent_length",
          "x-uuce-role": "scalar"
        },
        "directrix": {
          "type": "string"
        },
        "asymptote_slope": {
          "type": "number",
          "x-unit": "1",
          "x-unit-id": "cx:one",
          "x-quantity-kind": "ratio",
          "x-role": "scalar",
          "x-dimension": [
            0,
            0,
            0,
            0,
            0,
            0,
            0
          ],
          "x-uuce-unit": {
            "unit_id": "cx:one",
            "revision": "1.0.0",
            "content_digest": "98cc3ffc58d8733c483b60c4d7e238fe8ad43a6aadcced9496b74f33a01ef599",
            "dependency_digest": "b1c9aa4d586949ee881925298442091ba11dda29f57de0867e43da1cd59e06e5",
            "quantity_kind": "ratio",
            "dimension": [
              0,
              0,
              0,
              0,
              0,
              0,
              0
            ],
            "registry_version": "0.3.0-preview.3",
            "digest_contract": "calculatorx-unit-definition-digests-v2",
            "registry_status": "preview",
            "definition_lifecycle": "candidate",
            "role": "scalar"
          }
        },
        "equation": {
          "type": "string"
        },
        "circle": {
          "type": "boolean"
        },
        "formula": {
          "type": "string"
        },
        "major": {
          "type": "number",
          "x-quantity-kind": "length",
          "x-dimension": [
            1,
            0,
            0,
            0,
            0,
            0,
            0
          ],
          "x-unit-policy": "arbitrary_consistent_length",
          "x-uuce-role": "scalar"
        },
        "minor": {
          "type": "number",
          "x-quantity-kind": "length",
          "x-dimension": [
            1,
            0,
            0,
            0,
            0,
            0,
            0
          ],
          "x-unit-policy": "arbitrary_consistent_length",
          "x-uuce-role": "scalar"
        },
        "four_p": {
          "type": "number",
          "x-quantity-kind": "length",
          "x-dimension": [
            1,
            0,
            0,
            0,
            0,
            0,
            0
          ],
          "x-unit-policy": "arbitrary_consistent_length",
          "x-uuce-role": "scalar"
        },
        "directrix_value": {
          "type": "number",
          "x-quantity-kind": "length",
          "x-dimension": [
            1,
            0,
            0,
            0,
            0,
            0,
            0
          ],
          "x-unit-policy": "arbitrary_consistent_length",
          "x-uuce-role": "scalar"
        },
        "directrix_axis": {
          "type": "string",
          "enum": [
            "x",
            "y"
          ]
        },
        "perimeter_method": {
          "const": "ramanujan_i"
        },
        "foci": {
          "type": "array",
          "minItems": 2,
          "maxItems": 2,
          "items": {
            "type": "array",
            "minItems": 2,
            "maxItems": 2,
            "items": {
              "type": "number"
            }
          }
        }
      },
      "oneOf": [
        {
          "properties": {
            "mode": {
              "const": "ellipse"
            }
          },
          "required": [
            "mode",
            "equation",
            "formula",
            "a",
            "b",
            "c",
            "e",
            "area",
            "perimeter",
            "perimeter_method",
            "major",
            "minor",
            "circle",
            "foci"
          ]
        },
        {
          "properties": {
            "mode": {
              "const": "parabola"
            }
          },
          "required": [
            "mode",
            "equation",
            "formula",
            "p",
            "orientation",
            "four_p",
            "focus_x",
            "focus_y",
            "directrix",
            "directrix_axis",
            "directrix_value"
          ]
        },
        {
          "properties": {
            "mode": {
              "const": "hyperbola"
            }
          },
          "required": [
            "mode",
            "equation",
            "formula",
            "a",
            "b",
            "c",
            "e",
            "orientation",
            "asymptote_slope",
            "foci"
          ]
        }
      ]
    },
    "result_detail": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "value",
        "unit",
        "formatted"
      ],
      "properties": {
        "unit_contract": {
          "type": "object",
          "const": {
            "protocol": "calculatorx-field-unit-contract-v1",
            "capability_id": "math.geometry.conic",
            "registry_version": "0.3.0-preview.3",
            "declaration_scope": "Field/branch declarations only; inactive fields are not asserted to exist. No conversion-engine migration or new numerical certification.",
            "path_format": "Paths relative to inputs or result_detail.value; dot separates properties, * denotes array items, $ denotes a scalar result.",
            "inputs": {},
            "outputs": {
              "e": {
                "unit": "1",
                "reference": {
                  "unit_id": "cx:one",
                  "revision": "1.0.0",
                  "content_digest": "98cc3ffc58d8733c483b60c4d7e238fe8ad43a6aadcced9496b74f33a01ef599",
                  "dependency_digest": "b1c9aa4d586949ee881925298442091ba11dda29f57de0867e43da1cd59e06e5",
                  "quantity_kind": "ratio",
                  "dimension": [
                    0,
                    0,
                    0,
                    0,
                    0,
                    0,
                    0
                  ],
                  "registry_version": "0.3.0-preview.3",
                  "digest_contract": "calculatorx-unit-definition-digests-v2",
                  "registry_status": "preview",
                  "definition_lifecycle": "candidate",
                  "role": "scalar"
                }
              },
              "asymptote_slope": {
                "unit": "1",
                "reference": {
                  "unit_id": "cx:one",
                  "revision": "1.0.0",
                  "content_digest": "98cc3ffc58d8733c483b60c4d7e238fe8ad43a6aadcced9496b74f33a01ef599",
                  "dependency_digest": "b1c9aa4d586949ee881925298442091ba11dda29f57de0867e43da1cd59e06e5",
                  "quantity_kind": "ratio",
                  "dimension": [
                    0,
                    0,
                    0,
                    0,
                    0,
                    0,
                    0
                  ],
                  "registry_version": "0.3.0-preview.3",
                  "digest_contract": "calculatorx-unit-definition-digests-v2",
                  "registry_status": "preview",
                  "definition_lifecycle": "candidate",
                  "role": "scalar"
                }
              }
            },
            "quantity_policy": {
              "physical_unit_id": null,
              "input_policy": "Abstract consistent coordinate/length units; no physical unit is selected by this calculator.",
              "derived_policy": "Lengths inherit the input length unit U; areas U^2; volumes U^3. No implicit conversion or fixed metre binding.",
              "coefficient_policy": "Normalized implicit line/equation coefficients have equation-scale conventions, not universal physical unit IDs."
            }
          }
        },
        "value": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "mode",
            "equation"
          ],
          "properties": {
            "mode": {
              "type": "string"
            },
            "a": {
              "type": "number",
              "x-quantity-kind": "length",
              "x-dimension": [
                1,
                0,
                0,
                0,
                0,
                0,
                0
              ],
              "x-unit-policy": "arbitrary_consistent_length",
              "x-uuce-role": "scalar"
            },
            "b": {
              "type": "number",
              "x-quantity-kind": "length",
              "x-dimension": [
                1,
                0,
                0,
                0,
                0,
                0,
                0
              ],
              "x-unit-policy": "arbitrary_consistent_length",
              "x-uuce-role": "scalar"
            },
            "c": {
              "type": "number",
              "x-quantity-kind": "length",
              "x-dimension": [
                1,
                0,
                0,
                0,
                0,
                0,
                0
              ],
              "x-unit-policy": "arbitrary_consistent_length",
              "x-uuce-role": "scalar"
            },
            "e": {
              "type": "number",
              "x-unit": "1",
              "x-unit-id": "cx:one",
              "x-quantity-kind": "ratio",
              "x-role": "scalar",
              "x-dimension": [
                0,
                0,
                0,
                0,
                0,
                0,
                0
              ],
              "x-uuce-unit": {
                "unit_id": "cx:one",
                "revision": "1.0.0",
                "content_digest": "98cc3ffc58d8733c483b60c4d7e238fe8ad43a6aadcced9496b74f33a01ef599",
                "dependency_digest": "b1c9aa4d586949ee881925298442091ba11dda29f57de0867e43da1cd59e06e5",
                "quantity_kind": "ratio",
                "dimension": [
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0
                ],
                "registry_version": "0.3.0-preview.3",
                "digest_contract": "calculatorx-unit-definition-digests-v2",
                "registry_status": "preview",
                "definition_lifecycle": "candidate",
                "role": "scalar"
              }
            },
            "area": {
              "type": "number",
              "x-quantity-kind": "area",
              "x-dimension": [
                2,
                0,
                0,
                0,
                0,
                0,
                0
              ],
              "x-unit-policy": "input_length_unit_squared",
              "x-uuce-role": "scalar"
            },
            "perimeter": {
              "type": "number",
              "x-quantity-kind": "length",
              "x-dimension": [
                1,
                0,
                0,
                0,
                0,
                0,
                0
              ],
              "x-unit-policy": "arbitrary_consistent_length",
              "x-uuce-role": "scalar"
            },
            "p": {
              "type": "number",
              "x-quantity-kind": "length",
              "x-dimension": [
                1,
                0,
                0,
                0,
                0,
                0,
                0
              ],
              "x-unit-policy": "arbitrary_consistent_length",
              "x-uuce-role": "scalar"
            },
            "orientation": {
              "type": "string"
            },
            "focus_x": {
              "type": "number",
              "x-quantity-kind": "length",
              "x-dimension": [
                1,
                0,
                0,
                0,
                0,
                0,
                0
              ],
              "x-unit-policy": "arbitrary_consistent_length",
              "x-uuce-role": "scalar"
            },
            "focus_y": {
              "type": "number",
              "x-quantity-kind": "length",
              "x-dimension": [
                1,
                0,
                0,
                0,
                0,
                0,
                0
              ],
              "x-unit-policy": "arbitrary_consistent_length",
              "x-uuce-role": "scalar"
            },
            "directrix": {
              "type": "string"
            },
            "asymptote_slope": {
              "type": "number",
              "x-unit": "1",
              "x-unit-id": "cx:one",
              "x-quantity-kind": "ratio",
              "x-role": "scalar",
              "x-dimension": [
                0,
                0,
                0,
                0,
                0,
                0,
                0
              ],
              "x-uuce-unit": {
                "unit_id": "cx:one",
                "revision": "1.0.0",
                "content_digest": "98cc3ffc58d8733c483b60c4d7e238fe8ad43a6aadcced9496b74f33a01ef599",
                "dependency_digest": "b1c9aa4d586949ee881925298442091ba11dda29f57de0867e43da1cd59e06e5",
                "quantity_kind": "ratio",
                "dimension": [
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0
                ],
                "registry_version": "0.3.0-preview.3",
                "digest_contract": "calculatorx-unit-definition-digests-v2",
                "registry_status": "preview",
                "definition_lifecycle": "candidate",
                "role": "scalar"
              }
            },
            "equation": {
              "type": "string"
            },
            "circle": {
              "type": "boolean"
            },
            "formula": {
              "type": "string"
            },
            "major": {
              "type": "number",
              "x-quantity-kind": "length",
              "x-dimension": [
                1,
                0,
                0,
                0,
                0,
                0,
                0
              ],
              "x-unit-policy": "arbitrary_consistent_length",
              "x-uuce-role": "scalar"
            },
            "minor": {
              "type": "number",
              "x-quantity-kind": "length",
              "x-dimension": [
                1,
                0,
                0,
                0,
                0,
                0,
                0
              ],
              "x-unit-policy": "arbitrary_consistent_length",
              "x-uuce-role": "scalar"
            },
            "four_p": {
              "type": "number",
              "x-quantity-kind": "length",
              "x-dimension": [
                1,
                0,
                0,
                0,
                0,
                0,
                0
              ],
              "x-unit-policy": "arbitrary_consistent_length",
              "x-uuce-role": "scalar"
            },
            "directrix_value": {
              "type": "number",
              "x-quantity-kind": "length",
              "x-dimension": [
                1,
                0,
                0,
                0,
                0,
                0,
                0
              ],
              "x-unit-policy": "arbitrary_consistent_length",
              "x-uuce-role": "scalar"
            },
            "directrix_axis": {
              "type": "string",
              "enum": [
                "x",
                "y"
              ]
            },
            "perimeter_method": {
              "const": "ramanujan_i"
            },
            "foci": {
              "type": "array",
              "minItems": 2,
              "maxItems": 2,
              "items": {
                "type": "array",
                "minItems": 2,
                "maxItems": 2,
                "items": {
                  "type": "number"
                }
              }
            }
          },
          "oneOf": [
            {
              "properties": {
                "mode": {
                  "const": "ellipse"
                }
              },
              "required": [
                "mode",
                "equation",
                "formula",
                "a",
                "b",
                "c",
                "e",
                "area",
                "perimeter",
                "perimeter_method",
                "major",
                "minor",
                "circle",
                "foci"
              ]
            },
            {
              "properties": {
                "mode": {
                  "const": "parabola"
                }
              },
              "required": [
                "mode",
                "equation",
                "formula",
                "p",
                "orientation",
                "four_p",
                "focus_x",
                "focus_y",
                "directrix",
                "directrix_axis",
                "directrix_value"
              ]
            },
            {
              "properties": {
                "mode": {
                  "const": "hyperbola"
                }
              },
              "required": [
                "mode",
                "equation",
                "formula",
                "a",
                "b",
                "c",
                "e",
                "orientation",
                "asymptote_slope",
                "foci"
              ]
            }
          ]
        },
        "unit": {
          "type": [
            "string",
            "null"
          ]
        },
        "formatted": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "formula": {
      "anyOf": [
        {
          "type": "null"
        },
        {
          "type": "string"
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "id": {
              "type": "string"
            },
            "expression": {
              "type": "string"
            },
            "label": {
              "type": "string"
            }
          }
        }
      ]
    },
    "assumptions": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "warnings": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "code"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "severity": {
            "type": "string"
          },
          "detail": {
            "type": "string"
          },
          "suggestion": {
            "type": "string"
          }
        }
      }
    },
    "verification": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "tier",
        "engine_tested",
        "expert_reviewed",
        "source_checked",
        "reviewed_by",
        "reviewer_role",
        "last_reviewed"
      ],
      "properties": {
        "tier": {
          "type": "string",
          "enum": [
            "candidate",
            "engine_tested",
            "internally_reviewed",
            "expert_verified"
          ]
        },
        "engine_tested": {
          "type": "boolean"
        },
        "expert_reviewed": {
          "type": "boolean"
        },
        "internally_reviewed": {
          "type": "boolean"
        },
        "review_kind": {
          "type": [
            "string",
            "null"
          ]
        },
        "source_checked": {
          "type": "boolean"
        },
        "reviewed_by": {
          "type": [
            "string",
            "null"
          ]
        },
        "reviewer_role": {
          "type": [
            "string",
            "null"
          ]
        },
        "last_reviewed": {
          "type": [
            "string",
            "null"
          ]
        },
        "citation_kind": {
          "type": "string"
        },
        "expert_review": {
          "type": "string"
        },
        "domain_review": {
          "type": "string"
        },
        "calculation_version": {
          "type": "string"
        },
        "calc_tests": {
          "type": [
            "string",
            "null"
          ]
        },
        "tests_passed": {
          "type": [
            "integer",
            "null"
          ]
        },
        "tests_total": {
          "type": [
            "integer",
            "null"
          ]
        },
        "artifact_contract": {
          "type": [
            "string",
            "null"
          ]
        },
        "trust_peek": {
          "type": [
            "string",
            "null"
          ]
        },
        "verification_revision": {
          "type": "string"
        },
        "verified_scope": {
          "type": "string"
        },
        "evidence_digest": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        }
      },
      "allOf": [
        {
          "if": {
            "properties": {
              "tier": {
                "const": "expert_verified"
              }
            },
            "required": [
              "tier"
            ]
          },
          "then": {
            "properties": {
              "engine_tested": {
                "const": true
              },
              "expert_reviewed": {
                "const": true
              },
              "source_checked": {
                "const": true
              },
              "reviewed_by": {
                "type": "string",
                "minLength": 1
              },
              "reviewer_role": {
                "type": "string",
                "minLength": 1
              },
              "last_reviewed": {
                "type": "string",
                "minLength": 1
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "tier": {
                "const": "internally_reviewed"
              }
            },
            "required": [
              "tier"
            ]
          },
          "then": {
            "properties": {
              "engine_tested": {
                "const": true
              },
              "internally_reviewed": {
                "const": true
              },
              "source_checked": {
                "const": true
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "tier": {
                "const": "engine_tested"
              }
            },
            "required": [
              "tier"
            ]
          },
          "then": {
            "properties": {
              "engine_tested": {
                "const": true
              }
            }
          }
        }
      ]
    },
    "calculation_version": {
      "type": "string",
      "const": "1.1.0"
    },
    "api_version": {
      "type": "string"
    },
    "api_contract_version": {
      "type": "string"
    },
    "spec_version": {
      "type": "string"
    },
    "page": {
      "type": [
        "string",
        "null"
      ],
      "description": "Canonical calculator page URL"
    },
    "links": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "schema_input": {
          "type": "string",
          "format": "uri"
        },
        "schema_output": {
          "type": "string",
          "format": "uri"
        },
        "evidence": {
          "type": "string",
          "format": "uri"
        },
        "openapi": {
          "type": "string",
          "format": "uri"
        },
        "capabilities": {
          "type": "string",
          "format": "uri"
        },
        "mcp": {
          "type": "string",
          "format": "uri"
        }
      }
    }
  },
  "x-unit-contract": {
    "protocol": "calculatorx-field-unit-contract-v1",
    "capability_id": "math.geometry.conic",
    "registry_version": "0.3.0-preview.3",
    "declaration_scope": "Field/branch declarations only; inactive fields are not asserted to exist. No conversion-engine migration or new numerical certification.",
    "path_format": "Paths relative to inputs or result_detail.value; dot separates properties, * denotes array items, $ denotes a scalar result.",
    "inputs": {},
    "outputs": {
      "e": {
        "unit": "1",
        "reference": {
          "unit_id": "cx:one",
          "revision": "1.0.0",
          "content_digest": "98cc3ffc58d8733c483b60c4d7e238fe8ad43a6aadcced9496b74f33a01ef599",
          "dependency_digest": "b1c9aa4d586949ee881925298442091ba11dda29f57de0867e43da1cd59e06e5",
          "quantity_kind": "ratio",
          "dimension": [
            0,
            0,
            0,
            0,
            0,
            0,
            0
          ],
          "registry_version": "0.3.0-preview.3",
          "digest_contract": "calculatorx-unit-definition-digests-v2",
          "registry_status": "preview",
          "definition_lifecycle": "candidate",
          "role": "scalar"
        }
      },
      "asymptote_slope": {
        "unit": "1",
        "reference": {
          "unit_id": "cx:one",
          "revision": "1.0.0",
          "content_digest": "98cc3ffc58d8733c483b60c4d7e238fe8ad43a6aadcced9496b74f33a01ef599",
          "dependency_digest": "b1c9aa4d586949ee881925298442091ba11dda29f57de0867e43da1cd59e06e5",
          "quantity_kind": "ratio",
          "dimension": [
            0,
            0,
            0,
            0,
            0,
            0,
            0
          ],
          "registry_version": "0.3.0-preview.3",
          "digest_contract": "calculatorx-unit-definition-digests-v2",
          "registry_status": "preview",
          "definition_lifecycle": "candidate",
          "role": "scalar"
        }
      }
    },
    "quantity_policy": {
      "physical_unit_id": null,
      "input_policy": "Abstract consistent coordinate/length units; no physical unit is selected by this calculator.",
      "derived_policy": "Lengths inherit the input length unit U; areas U^2; volumes U^3. No implicit conversion or fixed metre binding.",
      "coefficient_policy": "Normalized implicit line/equation coefficients have equation-scale conventions, not universal physical unit IDs."
    }
  }
}
