{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/bellatorsi-com/json-schema/bellatorsi-com-bellator-response-baseline-compare-data-schema.json",
  "title": "BellatorResponse[BaselineCompareData]",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/bellatorsi-com-forensics-api-openapi.yml#/components/schemas/BellatorResponse_BaselineCompareData_",
  "properties": {
    "status": {
      "$ref": "#/$defs/ResponseStatus"
    },
    "score": {
      "anyOf": [
        {
          "type": "number",
          "maximum": 100.0,
          "minimum": 0.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Score"
    },
    "grade": {
      "anyOf": [
        {
          "$ref": "#/$defs/Grade"
        },
        {
          "type": "null"
        }
      ]
    },
    "summary": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Summary"
    },
    "breakdown": {
      "anyOf": [
        {
          "additionalProperties": {
            "$ref": "#/$defs/ScoreComponent"
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Breakdown"
    },
    "findings": {
      "items": {
        "$ref": "#/$defs/Finding"
      },
      "type": "array",
      "title": "Findings"
    },
    "recommendations": {
      "items": {
        "$ref": "#/$defs/Recommendation"
      },
      "type": "array",
      "title": "Recommendations"
    },
    "data": {
      "anyOf": [
        {
          "$ref": "#/$defs/BaselineCompareData"
        },
        {
          "type": "null"
        }
      ]
    },
    "simulation": {
      "anyOf": [
        {
          "$ref": "#/$defs/SimulationEnvelope"
        },
        {
          "type": "null"
        }
      ]
    },
    "metadata": {
      "$ref": "#/$defs/ResponseMetadata"
    }
  },
  "type": "object",
  "required": [
    "status",
    "metadata"
  ],
  "$defs": {
    "BaselineChartData": {
      "properties": {
        "dates": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Dates"
        },
        "total_variance": {
          "items": {
            "type": "number"
          },
          "type": "array",
          "title": "Total Variance"
        },
        "bei_values": {
          "items": {
            "type": "number"
          },
          "type": "array",
          "title": "Bei Values"
        },
        "spi_values": {
          "items": {
            "type": "number"
          },
          "type": "array",
          "title": "Spi Values"
        },
        "cp_variance": {
          "items": {
            "type": "number"
          },
          "type": "array",
          "title": "Cp Variance"
        }
      },
      "type": "object",
      "title": "BaselineChartData",
      "description": "Pre-aggregated time-series arrays for dashboard charts."
    },
    "BaselineCompareData": {
      "properties": {
        "summary": {
          "$ref": "#/$defs/BaselineCompareSummary"
        },
        "performance_indicators": {
          "$ref": "#/$defs/BaselinePerformanceIndicators"
        },
        "task_variances": {
          "items": {
            "$ref": "#/$defs/TaskVarianceRecord"
          },
          "type": "array",
          "title": "Task Variances"
        },
        "findings": {
          "items": {
            "$ref": "#/$defs/VarianceFinding"
          },
          "type": "array",
          "title": "Findings"
        },
        "recommendations": {
          "items": {
            "$ref": "#/$defs/BaselineRecommendation"
          },
          "type": "array",
          "title": "Recommendations"
        },
        "variance_trends": {
          "anyOf": [
            {
              "$ref": "#/$defs/VarianceTrends"
            },
            {
              "type": "null"
            }
          ]
        },
        "evms_trends": {
          "anyOf": [
            {
              "$ref": "#/$defs/EVMSTrends"
            },
            {
              "type": "null"
            }
          ]
        },
        "forecast_trends": {
          "anyOf": [
            {
              "$ref": "#/$defs/ForecastTrends"
            },
            {
              "type": "null"
            }
          ]
        },
        "logic_changes": {
          "anyOf": [
            {
              "$ref": "#/$defs/LogicChanges"
            },
            {
              "type": "null"
            }
          ]
        },
        "logic_audit_summary": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Logic Audit Summary"
        },
        "processing_metadata": {
          "additionalProperties": true,
          "type": "object",
          "title": "Processing Metadata"
        }
      },
      "type": "object",
      "title": "BaselineCompareData",
      "description": "Data payload for POST /api/v1/forensics/baseline-compare."
    },
    "BaselineCompareSummary": {
      "properties": {
        "comparison_date": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Comparison Date"
        },
        "baseline_date": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Baseline Date"
        },
        "total_tasks": {
          "type": "integer",
          "title": "Total Tasks",
          "default": 0
        },
        "matched_tasks": {
          "type": "integer",
          "title": "Matched Tasks",
          "default": 0
        },
        "unmatched_current_tasks": {
          "type": "integer",
          "title": "Unmatched Current Tasks",
          "default": 0
        },
        "unmatched_baseline_tasks": {
          "type": "integer",
          "title": "Unmatched Baseline Tasks",
          "default": 0
        },
        "tasks_with_variance": {
          "type": "integer",
          "title": "Tasks With Variance",
          "default": 0
        },
        "total_variance_days": {
          "type": "number",
          "title": "Total Variance Days",
          "default": 0.0
        },
        "critical_path_variance_days": {
          "type": "number",
          "title": "Critical Path Variance Days",
          "default": 0.0
        }
      },
      "type": "object",
      "title": "BaselineCompareSummary",
      "description": "High-level match and variance counts."
    },
    "BaselinePerformanceIndicators": {
      "properties": {
        "bei": {
          "type": "number",
          "title": "Bei",
          "default": 1.0
        },
        "critical_path_bei": {
          "type": "number",
          "title": "Critical Path Bei",
          "default": 1.0
        },
        "spi_schedule": {
          "type": "number",
          "title": "Spi Schedule",
          "default": 1.0
        },
        "variance_severity": {
          "type": "string",
          "enum": [
            "low",
            "medium",
            "high",
            "critical"
          ],
          "title": "Variance Severity",
          "default": "low"
        },
        "on_track_percentage": {
          "type": "number",
          "title": "On Track Percentage",
          "default": 100.0
        },
        "oos_penalty": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Oos Penalty"
        }
      },
      "type": "object",
      "title": "BaselinePerformanceIndicators",
      "description": "BEI, SPI, and severity classification."
    },
    "BaselineRecommendation": {
      "properties": {
        "priority": {
          "type": "string",
          "enum": [
            "critical",
            "high",
            "medium",
            "low"
          ],
          "title": "Priority"
        },
        "category": {
          "type": "string",
          "enum": [
            "schedule_recovery",
            "baseline_revision",
            "resource_reallocation",
            "risk_mitigation"
          ],
          "title": "Category"
        },
        "description": {
          "type": "string",
          "title": "Description"
        },
        "affected_tasks": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Affected Tasks"
        }
      },
      "type": "object",
      "required": [
        "priority",
        "category",
        "description"
      ],
      "title": "BaselineRecommendation",
      "description": "Actionable recommendation from variance analysis."
    },
    "EACHistoryEntry": {
      "properties": {
        "period_date": {
          "type": "string",
          "title": "Period Date"
        },
        "forecasted_completion": {
          "type": "string",
          "title": "Forecasted Completion"
        },
        "variance_to_baseline_days": {
          "type": "integer",
          "title": "Variance To Baseline Days",
          "default": 0
        }
      },
      "type": "object",
      "required": [
        "period_date",
        "forecasted_completion"
      ],
      "title": "EACHistoryEntry",
      "description": "Forecasted completion for one period."
    },
    "EACStability": {
      "properties": {
        "variance_range_days": {
          "type": "number",
          "title": "Variance Range Days",
          "default": 0.0
        },
        "avg_monthly_change_days": {
          "type": "number",
          "title": "Avg Monthly Change Days",
          "default": 0.0
        },
        "stability_rating": {
          "type": "string",
          "enum": [
            "stable",
            "moderate",
            "volatile"
          ],
          "title": "Stability Rating",
          "default": "stable"
        },
        "is_accelerating": {
          "type": "boolean",
          "title": "Is Accelerating",
          "default": false
        }
      },
      "type": "object",
      "title": "EACStability",
      "description": "EAC forecast stability assessment."
    },
    "EVMSChartData": {
      "properties": {
        "dates": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Dates"
        },
        "spi_values": {
          "items": {
            "type": "number"
          },
          "type": "array",
          "title": "Spi Values"
        },
        "cpi_values": {
          "items": {
            "type": "number"
          },
          "type": "array",
          "title": "Cpi Values"
        },
        "eac_values": {
          "items": {
            "type": "number"
          },
          "type": "array",
          "title": "Eac Values"
        }
      },
      "type": "object",
      "title": "EVMSChartData",
      "description": "Chart-ready EVMS time series."
    },
    "EVMSPerformanceSummary": {
      "properties": {
        "current_spi": {
          "type": "number",
          "title": "Current Spi",
          "default": 1.0
        },
        "avg_spi": {
          "type": "number",
          "title": "Avg Spi",
          "default": 1.0
        },
        "spi_trend": {
          "type": "string",
          "enum": [
            "improving",
            "stable",
            "declining"
          ],
          "title": "Spi Trend",
          "default": "stable"
        },
        "current_cpi": {
          "type": "number",
          "title": "Current Cpi",
          "default": 1.0
        },
        "avg_cpi": {
          "type": "number",
          "title": "Avg Cpi",
          "default": 1.0
        },
        "cpi_trend": {
          "type": "string",
          "enum": [
            "improving",
            "stable",
            "declining"
          ],
          "title": "Cpi Trend",
          "default": "stable"
        },
        "forecast_reliability": {
          "type": "string",
          "enum": [
            "high",
            "medium",
            "low"
          ],
          "title": "Forecast Reliability",
          "default": "medium"
        }
      },
      "type": "object",
      "title": "EVMSPerformanceSummary",
      "description": "Aggregate EVMS performance across periods."
    },
    "EVMSPeriod": {
      "properties": {
        "period_date": {
          "type": "string",
          "title": "Period Date"
        },
        "sv": {
          "type": "number",
          "title": "Sv",
          "default": 0.0
        },
        "cv": {
          "type": "number",
          "title": "Cv",
          "default": 0.0
        },
        "spi": {
          "type": "number",
          "title": "Spi",
          "default": 1.0
        },
        "cpi": {
          "type": "number",
          "title": "Cpi",
          "default": 1.0
        },
        "tcpi": {
          "type": "number",
          "title": "Tcpi",
          "default": 1.0
        },
        "eac_cpi": {
          "type": "number",
          "title": "Eac Cpi",
          "default": 0.0
        },
        "eac_spi": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Eac Spi"
        },
        "eac_composite": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Eac Composite"
        },
        "eac_weighted": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Eac Weighted"
        }
      },
      "type": "object",
      "required": [
        "period_date"
      ],
      "title": "EVMSPeriod",
      "description": "EVMS metrics for one period."
    },
    "EVMSTrends": {
      "properties": {
        "periods": {
          "items": {
            "$ref": "#/$defs/EVMSPeriod"
          },
          "type": "array",
          "title": "Periods"
        },
        "performance_summary": {
          "$ref": "#/$defs/EVMSPerformanceSummary"
        },
        "chart_data": {
          "anyOf": [
            {
              "$ref": "#/$defs/EVMSChartData"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "type": "object",
      "title": "EVMSTrends",
      "description": "EVMS trend data."
    },
    "Finding": {
      "properties": {
        "code": {
          "type": "string",
          "title": "Code",
          "description": "Stable machine-readable identifier e.g. DCMA_CHECK_8_HIGH_DURATION"
        },
        "severity": {
          "$ref": "#/$defs/FindingSeverity"
        },
        "title": {
          "type": "string",
          "title": "Title",
          "description": "Short human-readable label"
        },
        "description": {
          "type": "string",
          "title": "Description",
          "description": "Full explanation of the issue"
        },
        "standard": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Standard",
          "description": "Standard citation e.g. 'DCMA PAM 200.1 Check #8'"
        },
        "affected_tasks": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Affected Tasks",
          "description": "Task IDs implicated by this finding"
        },
        "metric_value": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Metric Value",
          "description": "Observed measurement e.g. 60.0 days"
        },
        "threshold": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Threshold",
          "description": "Threshold that was violated e.g. 44.0 days"
        }
      },
      "type": "object",
      "required": [
        "code",
        "severity",
        "title",
        "description"
      ],
      "title": "Finding",
      "description": "A discrete, machine-readable issue identified during analysis.\n\n`code` values are stable across versions; consumers may key logic on them.\nPattern: {STANDARD}_{CHECK_ID}_{SHORT_DESCRIPTION} in SCREAMING_SNAKE_CASE."
    },
    "FindingSeverity": {
      "type": "string",
      "enum": [
        "critical",
        "high",
        "medium",
        "low",
        "info"
      ],
      "title": "FindingSeverity",
      "description": "Severity level for findings; reused as priority level for recommendations."
    },
    "ForecastChartData": {
      "properties": {
        "dates": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Dates"
        },
        "eac_variance_days": {
          "items": {
            "type": "integer"
          },
          "type": "array",
          "title": "Eac Variance Days"
        }
      },
      "type": "object",
      "title": "ForecastChartData",
      "description": "Chart-ready EAC variance time series."
    },
    "ForecastTrends": {
      "properties": {
        "eac_history": {
          "items": {
            "$ref": "#/$defs/EACHistoryEntry"
          },
          "type": "array",
          "title": "Eac History"
        },
        "eac_stability": {
          "anyOf": [
            {
              "$ref": "#/$defs/EACStability"
            },
            {
              "type": "null"
            }
          ]
        },
        "chart_data": {
          "anyOf": [
            {
              "$ref": "#/$defs/ForecastChartData"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "type": "object",
      "title": "ForecastTrends",
      "description": "EAC forecast trend analysis."
    },
    "Grade": {
      "type": "string",
      "enum": [
        "A",
        "B",
        "C",
        "D",
        "F"
      ],
      "title": "Grade",
      "description": "Letter grade derived from a 0–100 score. Null on non-scoring endpoints."
    },
    "LogicChanges": {
      "properties": {
        "added_relationships": {
          "items": {
            "$ref": "#/$defs/LogicRelationship"
          },
          "type": "array",
          "title": "Added Relationships"
        },
        "removed_relationships": {
          "items": {
            "$ref": "#/$defs/LogicRelationship"
          },
          "type": "array",
          "title": "Removed Relationships"
        },
        "retyped_relationships": {
          "items": {
            "$ref": "#/$defs/RetypedRelationship"
          },
          "type": "array",
          "title": "Retyped Relationships"
        },
        "summary": {
          "$ref": "#/$defs/LogicChangesSummary"
        }
      },
      "type": "object",
      "title": "LogicChanges",
      "description": "Dependency graph changes between baseline and current."
    },
    "LogicChangesSummary": {
      "properties": {
        "total_added": {
          "type": "integer",
          "title": "Total Added",
          "default": 0
        },
        "total_removed": {
          "type": "integer",
          "title": "Total Removed",
          "default": 0
        },
        "total_retyped": {
          "type": "integer",
          "title": "Total Retyped",
          "default": 0
        },
        "drift_severity": {
          "type": "string",
          "enum": [
            "low",
            "medium",
            "high",
            "critical"
          ],
          "title": "Drift Severity",
          "default": "low"
        }
      },
      "type": "object",
      "title": "LogicChangesSummary",
      "description": "Summary counts and severity for logic drift."
    },
    "LogicRelationship": {
      "properties": {
        "predecessor_id": {
          "type": "string",
          "title": "Predecessor Id"
        },
        "successor_id": {
          "type": "string",
          "title": "Successor Id"
        },
        "relationship_type": {
          "type": "string",
          "title": "Relationship Type",
          "default": "FS"
        },
        "lag_days": {
          "type": "integer",
          "title": "Lag Days",
          "default": 0
        }
      },
      "type": "object",
      "required": [
        "predecessor_id",
        "successor_id"
      ],
      "title": "LogicRelationship",
      "description": "An added or removed dependency relationship."
    },
    "PercentileResult": {
      "properties": {
        "p10": {
          "type": "number",
          "title": "P10",
          "description": "10th percentile outcome"
        },
        "p50": {
          "type": "number",
          "title": "P50",
          "description": "50th percentile (median)"
        },
        "p80": {
          "type": "number",
          "title": "P80",
          "description": "80th percentile — common contract delivery threshold"
        },
        "p90": {
          "type": "number",
          "title": "P90",
          "description": "90th percentile"
        },
        "mean": {
          "type": "number",
          "title": "Mean"
        },
        "std_dev": {
          "type": "number",
          "title": "Std Dev"
        }
      },
      "type": "object",
      "required": [
        "p10",
        "p50",
        "p80",
        "p90",
        "mean",
        "std_dev"
      ],
      "title": "PercentileResult",
      "description": "Percentile distribution across simulation trials.\n\nReserved for Tier 3 Monte Carlo / risk simulation endpoints (v0.3.0+)."
    },
    "Recommendation": {
      "properties": {
        "priority": {
          "$ref": "#/$defs/FindingSeverity"
        },
        "action": {
          "type": "string",
          "title": "Action",
          "description": "What to do — specific and actionable"
        },
        "standard": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Standard",
          "description": "Supporting standard citation"
        },
        "finding_codes": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Finding Codes",
          "description": "Finding.code values this recommendation addresses"
        }
      },
      "type": "object",
      "required": [
        "priority",
        "action"
      ],
      "title": "Recommendation",
      "description": "An actionable item tied to one or more findings.\n\n`finding_codes` links each recommendation back to the specific Finding(s)\nit addresses, enabling consumers to correlate actions with evidence."
    },
    "ResponseMetadata": {
      "properties": {
        "task_count": {
          "type": "integer",
          "title": "Task Count",
          "description": "Number of tasks in the submitted schedule"
        },
        "processing_time_ms": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Processing Time Ms",
          "description": "Wall-clock processing time in milliseconds"
        },
        "api_version": {
          "type": "string",
          "title": "Api Version",
          "description": "API version that produced this response",
          "default": "v0.2.0"
        },
        "endpoint": {
          "type": "string",
          "title": "Endpoint",
          "description": "Endpoint path e.g. /api/v1/health/score"
        },
        "standards_applied": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Standards Applied",
          "description": "Standards consulted during analysis e.g. ['DCMA PAM 200.1', 'GAO BP-2']"
        },
        "confidence": {
          "anyOf": [
            {
              "type": "number",
              "maximum": 1.0,
              "minimum": 0.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Confidence",
          "description": "Confidence in the result (0–1). Present on scoring endpoints."
        },
        "status_date": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Status Date",
          "description": "ISO date used as analysis reference point. Present on time-aware analyses."
        }
      },
      "type": "object",
      "required": [
        "task_count",
        "endpoint"
      ],
      "title": "ResponseMetadata",
      "description": "Audit trail and processing context — always present, never null."
    },
    "ResponseStatus": {
      "type": "string",
      "enum": [
        "pass",
        "fail",
        "warning",
        "info"
      ],
      "title": "ResponseStatus",
      "description": "Top-level result status — always present in every response."
    },
    "RetypedRelationship": {
      "properties": {
        "predecessor_id": {
          "type": "string",
          "title": "Predecessor Id"
        },
        "successor_id": {
          "type": "string",
          "title": "Successor Id"
        },
        "baseline_type": {
          "type": "string",
          "title": "Baseline Type"
        },
        "current_type": {
          "type": "string",
          "title": "Current Type"
        }
      },
      "type": "object",
      "required": [
        "predecessor_id",
        "successor_id",
        "baseline_type",
        "current_type"
      ],
      "title": "RetypedRelationship",
      "description": "A dependency whose type changed."
    },
    "ScoreComponent": {
      "properties": {
        "score": {
          "type": "number",
          "maximum": 100.0,
          "minimum": 0.0,
          "title": "Score",
          "description": "Dimension score 0–100"
        },
        "weight": {
          "type": "number",
          "maximum": 1.0,
          "minimum": 0.0,
          "title": "Weight",
          "description": "Contribution weight (all weights sum to 1.0)"
        },
        "label": {
          "type": "string",
          "title": "Label",
          "description": "Human-readable dimension name"
        },
        "detail": {
          "additionalProperties": true,
          "type": "object",
          "title": "Detail",
          "description": "Computed inputs that drove this score — the defensible justification layer"
        }
      },
      "type": "object",
      "required": [
        "score",
        "weight",
        "label"
      ],
      "title": "ScoreComponent",
      "description": "One named dimension in a breakdown dict.\n\nThe `detail` field carries the computed inputs that drove this score —\ncounts, percentages, threshold values, standard references.  It is\nintentionally open so each dimension can surface whatever is relevant\nwithout a fixed sub-schema."
    },
    "SimulationEnvelope": {
      "properties": {
        "method": {
          "type": "string",
          "title": "Method",
          "description": "Simulation method: monte_carlo | latin_hypercube"
        },
        "trial_count": {
          "type": "integer",
          "title": "Trial Count"
        },
        "duration_days": {
          "anyOf": [
            {
              "$ref": "#/$defs/PercentileResult"
            },
            {
              "type": "null"
            }
          ]
        },
        "cost": {
          "anyOf": [
            {
              "$ref": "#/$defs/PercentileResult"
            },
            {
              "type": "null"
            }
          ]
        },
        "completion_date": {
          "anyOf": [
            {
              "additionalProperties": {
                "type": "string"
              },
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Completion Date",
          "description": "Map of p-value strings to ISO completion dates e.g. {'p50': '2027-04-15'}"
        }
      },
      "type": "object",
      "required": [
        "method",
        "trial_count"
      ],
      "title": "SimulationEnvelope",
      "description": "Probabilistic simulation outputs for Tier 3 endpoints.\n\nNull on all Tier 1 and Tier 2 responses.  When Tier 3 launches, this\nfield transitions from null to populated without changing any other\nenvelope field — existing consumers are unaffected."
    },
    "TaskVarianceRecord": {
      "properties": {
        "task_id": {
          "type": "string",
          "title": "Task Id"
        },
        "task_name": {
          "type": "string",
          "title": "Task Name"
        },
        "is_critical_path": {
          "type": "boolean",
          "title": "Is Critical Path",
          "default": false
        },
        "start_variance_days": {
          "type": "integer",
          "title": "Start Variance Days",
          "default": 0
        },
        "finish_variance_days": {
          "type": "integer",
          "title": "Finish Variance Days",
          "default": 0
        },
        "duration_variance_days": {
          "type": "integer",
          "title": "Duration Variance Days",
          "default": 0
        },
        "progress_variance_pct": {
          "type": "number",
          "title": "Progress Variance Pct",
          "default": 0.0
        },
        "variance_severity": {
          "type": "string",
          "enum": [
            "low",
            "medium",
            "high",
            "critical"
          ],
          "title": "Variance Severity",
          "default": "low"
        },
        "oos_impact_days": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Oos Impact Days"
        },
        "fuzzy_match_confidence": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Fuzzy Match Confidence"
        }
      },
      "type": "object",
      "required": [
        "task_id",
        "task_name"
      ],
      "title": "TaskVarianceRecord",
      "description": "Per-task variance metrics."
    },
    "TrendIndicators": {
      "properties": {
        "variance_trend": {
          "type": "string",
          "enum": [
            "improving",
            "stable",
            "declining"
          ],
          "title": "Variance Trend",
          "default": "stable"
        },
        "bei_trend": {
          "type": "string",
          "enum": [
            "improving",
            "stable",
            "declining"
          ],
          "title": "Bei Trend",
          "default": "stable"
        },
        "spi_trend": {
          "type": "string",
          "enum": [
            "improving",
            "stable",
            "declining"
          ],
          "title": "Spi Trend",
          "default": "stable"
        },
        "variance_acceleration": {
          "type": "number",
          "title": "Variance Acceleration",
          "default": 0.0
        },
        "projected_completion_variance": {
          "type": "number",
          "title": "Projected Completion Variance",
          "default": 0.0
        }
      },
      "type": "object",
      "title": "TrendIndicators",
      "description": "Aggregate trend direction for variance/BEI/SPI."
    },
    "VarianceFinding": {
      "properties": {
        "finding_type": {
          "type": "string",
          "title": "Finding Type"
        },
        "severity": {
          "type": "string",
          "enum": [
            "low",
            "medium",
            "high",
            "critical"
          ],
          "title": "Severity"
        },
        "affected_tasks": {
          "type": "integer",
          "title": "Affected Tasks",
          "default": 0
        },
        "total_variance_days": {
          "type": "number",
          "title": "Total Variance Days",
          "default": 0.0
        },
        "description": {
          "type": "string",
          "title": "Description",
          "default": ""
        },
        "tasks": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Tasks"
        }
      },
      "type": "object",
      "required": [
        "finding_type",
        "severity"
      ],
      "title": "VarianceFinding",
      "description": "A significant variance pattern finding."
    },
    "VariancePattern": {
      "properties": {
        "pattern_type": {
          "type": "string",
          "title": "Pattern Type"
        },
        "description": {
          "type": "string",
          "title": "Description",
          "default": ""
        },
        "confidence": {
          "type": "number",
          "title": "Confidence",
          "default": 0.0
        }
      },
      "type": "object",
      "required": [
        "pattern_type"
      ],
      "title": "VariancePattern",
      "description": "Identified variance pattern."
    },
    "VarianceTrendPeriod": {
      "properties": {
        "period_date": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Period Date"
        },
        "total_variance_days": {
          "type": "number",
          "title": "Total Variance Days",
          "default": 0.0
        },
        "bei": {
          "type": "number",
          "title": "Bei",
          "default": 1.0
        },
        "spi_schedule": {
          "type": "number",
          "title": "Spi Schedule",
          "default": 1.0
        },
        "critical_path_variance_days": {
          "type": "number",
          "title": "Critical Path Variance Days",
          "default": 0.0
        }
      },
      "type": "object",
      "title": "VarianceTrendPeriod",
      "description": "Variance metrics for a single historical period."
    },
    "VarianceTrends": {
      "properties": {
        "periods": {
          "items": {
            "$ref": "#/$defs/VarianceTrendPeriod"
          },
          "type": "array",
          "title": "Periods"
        },
        "trend_indicators": {
          "$ref": "#/$defs/TrendIndicators"
        },
        "identified_patterns": {
          "items": {
            "$ref": "#/$defs/VariancePattern"
          },
          "type": "array",
          "title": "Identified Patterns"
        },
        "chart_data": {
          "anyOf": [
            {
              "$ref": "#/$defs/BaselineChartData"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "type": "object",
      "title": "VarianceTrends",
      "description": "Multi-period variance trend analysis."
    }
  }
}