{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/bellatorsi-com/json-schema/bellatorsi-com-bellator-response-change-tracking-data-schema.json",
  "title": "BellatorResponse[ChangeTrackingData]",
  "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_ChangeTrackingData_",
  "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/ChangeTrackingData"
        },
        {
          "type": "null"
        }
      ]
    },
    "simulation": {
      "anyOf": [
        {
          "$ref": "#/$defs/SimulationEnvelope"
        },
        {
          "type": "null"
        }
      ]
    },
    "metadata": {
      "$ref": "#/$defs/ResponseMetadata"
    }
  },
  "type": "object",
  "required": [
    "status",
    "metadata"
  ],
  "$defs": {
    "ActualCategoryResult": {
      "properties": {
        "total_changes": {
          "type": "integer",
          "title": "Total Changes",
          "default": 0
        },
        "material_changes": {
          "type": "integer",
          "title": "Material Changes",
          "default": 0
        },
        "dcma_decm_violations": {
          "items": {
            "$ref": "#/$defs/DCMADECMViolationRecord"
          },
          "type": "array",
          "title": "Dcma Decm Violations"
        },
        "changes": {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "type": "array",
          "title": "Changes"
        }
      },
      "type": "object",
      "title": "ActualCategoryResult",
      "description": "Result for actual date change category (includes DCMA DECM violations)."
    },
    "BaselineCategoryResult": {
      "properties": {
        "total_changes": {
          "type": "integer",
          "title": "Total Changes",
          "default": 0
        },
        "material_changes": {
          "type": "integer",
          "title": "Material Changes",
          "default": 0
        },
        "changes": {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "type": "array",
          "title": "Changes"
        }
      },
      "type": "object",
      "title": "BaselineCategoryResult",
      "description": "Result for baseline change category."
    },
    "ChangeImpactAnalysis": {
      "properties": {
        "total_tasks_affected": {
          "type": "integer",
          "title": "Total Tasks Affected",
          "default": 0
        },
        "critical_path_affected": {
          "type": "boolean",
          "title": "Critical Path Affected",
          "default": false
        },
        "schedule_impact_days": {
          "type": "number",
          "title": "Schedule Impact Days",
          "default": 0.0
        },
        "cost_impact_estimate": {
          "type": "string",
          "enum": [
            "low",
            "medium",
            "high",
            "critical"
          ],
          "title": "Cost Impact Estimate",
          "default": "low"
        },
        "downstream_effects": {
          "items": {
            "$ref": "#/$defs/DownstreamEffect"
          },
          "type": "array",
          "title": "Downstream Effects"
        }
      },
      "type": "object",
      "title": "ChangeImpactAnalysis",
      "description": "Impact analysis of detected changes on the schedule."
    },
    "ChangeTrackingData": {
      "properties": {
        "comparison_summary": {
          "$ref": "#/$defs/ComparisonSummary"
        },
        "changes_by_category": {
          "$ref": "#/$defs/ChangesByCategory"
        },
        "impact_analysis": {
          "$ref": "#/$defs/ChangeImpactAnalysis"
        },
        "trends": {
          "$ref": "#/$defs/ChangeTrends"
        },
        "compliance_tags": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Compliance Tags"
        },
        "processing_metadata": {
          "additionalProperties": true,
          "type": "object",
          "title": "Processing Metadata"
        }
      },
      "type": "object",
      "required": [
        "comparison_summary",
        "changes_by_category"
      ],
      "title": "ChangeTrackingData",
      "description": "Data payload for POST /api/v1/forensics/change-tracking."
    },
    "ChangeTrends": {
      "properties": {
        "identified_patterns": {
          "items": {
            "$ref": "#/$defs/TrendPattern"
          },
          "type": "array",
          "title": "Identified Patterns"
        },
        "risk_indicators": {
          "items": {
            "$ref": "#/$defs/RiskIndicator"
          },
          "type": "array",
          "title": "Risk Indicators"
        }
      },
      "type": "object",
      "title": "ChangeTrends",
      "description": "Systemic trend patterns and risk indicators."
    },
    "ChangesByCategory": {
      "properties": {
        "baseline_changes": {
          "$ref": "#/$defs/BaselineCategoryResult"
        },
        "actual_changes": {
          "$ref": "#/$defs/ActualCategoryResult"
        },
        "forecast_changes": {
          "$ref": "#/$defs/ForecastCategoryResult"
        },
        "logic_changes": {
          "$ref": "#/$defs/LogicCategoryResult"
        },
        "resource_changes": {
          "$ref": "#/$defs/ResourceCategoryResult"
        },
        "progress_changes": {
          "$ref": "#/$defs/ProgressCategoryResult"
        }
      },
      "type": "object",
      "title": "ChangesByCategory",
      "description": "All six change categories bundled together."
    },
    "ComparisonSummary": {
      "properties": {
        "current_status_date": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Current Status Date"
        },
        "snapshots_analyzed": {
          "type": "integer",
          "title": "Snapshots Analyzed",
          "default": 0
        },
        "snapshot_dates": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Snapshot Dates"
        },
        "comparison_mode": {
          "type": "string",
          "title": "Comparison Mode",
          "default": "all_periods"
        },
        "total_changes_detected": {
          "type": "integer",
          "title": "Total Changes Detected",
          "default": 0
        },
        "material_changes": {
          "type": "integer",
          "title": "Material Changes",
          "default": 0
        },
        "immaterial_changes_filtered": {
          "type": "integer",
          "title": "Immaterial Changes Filtered",
          "default": 0
        }
      },
      "type": "object",
      "title": "ComparisonSummary",
      "description": "High-level summary of the comparison operation."
    },
    "DCMADECMViolationRecord": {
      "properties": {
        "check_id": {
          "type": "string",
          "title": "Check Id"
        },
        "task_id": {
          "type": "string",
          "title": "Task Id"
        },
        "violation": {
          "type": "string",
          "title": "Violation"
        },
        "original_date": {
          "type": "string",
          "title": "Original Date"
        },
        "changed_date": {
          "type": "string",
          "title": "Changed Date"
        },
        "snapshot_of_change": {
          "type": "string",
          "title": "Snapshot Of Change"
        },
        "severity": {
          "type": "string",
          "enum": [
            "critical",
            "high",
            "medium",
            "low"
          ],
          "title": "Severity"
        },
        "suspicion_details": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Suspicion Details"
        }
      },
      "type": "object",
      "required": [
        "check_id",
        "task_id",
        "violation",
        "original_date",
        "changed_date",
        "snapshot_of_change",
        "severity"
      ],
      "title": "DCMADECMViolationRecord",
      "description": "A DCMA DECM 06A504a/b violation record."
    },
    "DownstreamEffect": {
      "properties": {
        "change_task_id": {
          "type": "string",
          "title": "Change Task Id"
        },
        "affected_task_ids": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Affected Task Ids"
        },
        "impact_type": {
          "type": "string",
          "enum": [
            "schedule_slip",
            "schedule_acceleration"
          ],
          "title": "Impact Type"
        },
        "impact_days": {
          "type": "number",
          "title": "Impact Days"
        }
      },
      "type": "object",
      "required": [
        "change_task_id",
        "impact_type",
        "impact_days"
      ],
      "title": "DownstreamEffect",
      "description": "Downstream schedule effect from a material change."
    },
    "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."
    },
    "ForecastCategoryResult": {
      "properties": {
        "total_changes": {
          "type": "integer",
          "title": "Total Changes",
          "default": 0
        },
        "material_changes": {
          "type": "integer",
          "title": "Material Changes",
          "default": 0
        },
        "trends": {
          "additionalProperties": {
            "type": "integer"
          },
          "type": "object",
          "title": "Trends"
        },
        "changes": {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "type": "array",
          "title": "Changes"
        }
      },
      "type": "object",
      "title": "ForecastCategoryResult",
      "description": "Result for forecast change category."
    },
    "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."
    },
    "LogicCategoryResult": {
      "properties": {
        "total_changes": {
          "type": "integer",
          "title": "Total Changes",
          "default": 0
        },
        "material_changes": {
          "type": "integer",
          "title": "Material Changes",
          "default": 0
        },
        "added_dependencies": {
          "type": "integer",
          "title": "Added Dependencies",
          "default": 0
        },
        "removed_dependencies": {
          "type": "integer",
          "title": "Removed Dependencies",
          "default": 0
        },
        "modified_lags": {
          "type": "integer",
          "title": "Modified Lags",
          "default": 0
        },
        "changes": {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "type": "array",
          "title": "Changes"
        }
      },
      "type": "object",
      "title": "LogicCategoryResult",
      "description": "Result for logic change category."
    },
    "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+)."
    },
    "ProgressCategoryResult": {
      "properties": {
        "total_changes": {
          "type": "integer",
          "title": "Total Changes",
          "default": 0
        },
        "material_changes": {
          "type": "integer",
          "title": "Material Changes",
          "default": 0
        },
        "anomalies": {
          "items": {
            "$ref": "#/$defs/app__models__schemas__ProgressAnomaly__1"
          },
          "type": "array",
          "title": "Anomalies"
        },
        "changes": {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "type": "array",
          "title": "Changes"
        }
      },
      "type": "object",
      "title": "ProgressCategoryResult",
      "description": "Result for progress anomaly category."
    },
    "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."
    },
    "ResourceCategoryResult": {
      "properties": {
        "total_changes": {
          "type": "integer",
          "title": "Total Changes",
          "default": 0
        },
        "material_changes": {
          "type": "integer",
          "title": "Material Changes",
          "default": 0
        },
        "resources_added": {
          "type": "integer",
          "title": "Resources Added",
          "default": 0
        },
        "resources_removed": {
          "type": "integer",
          "title": "Resources Removed",
          "default": 0
        },
        "changes": {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "type": "array",
          "title": "Changes"
        }
      },
      "type": "object",
      "title": "ResourceCategoryResult",
      "description": "Result for resource change category."
    },
    "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."
    },
    "RiskIndicator": {
      "properties": {
        "indicator": {
          "type": "string",
          "title": "Indicator"
        },
        "count": {
          "type": "integer",
          "title": "Count"
        },
        "severity": {
          "type": "string",
          "enum": [
            "low",
            "medium",
            "high",
            "critical"
          ],
          "title": "Severity"
        },
        "recommendation": {
          "type": "string",
          "title": "Recommendation"
        }
      },
      "type": "object",
      "required": [
        "indicator",
        "count",
        "severity",
        "recommendation"
      ],
      "title": "RiskIndicator",
      "description": "A risk indicator flagged during trend analysis."
    },
    "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."
    },
    "TrendPattern": {
      "properties": {
        "pattern": {
          "type": "string",
          "title": "Pattern"
        },
        "description": {
          "type": "string",
          "title": "Description"
        },
        "affected_tasks": {
          "type": "integer",
          "title": "Affected Tasks"
        },
        "first_detected": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "First Detected"
        },
        "severity": {
          "type": "string",
          "enum": [
            "low",
            "medium",
            "high",
            "critical"
          ],
          "title": "Severity"
        }
      },
      "type": "object",
      "required": [
        "pattern",
        "description",
        "affected_tasks",
        "severity"
      ],
      "title": "TrendPattern",
      "description": "An identified systemic trend pattern."
    },
    "app__models__schemas__ProgressAnomaly__1": {
      "properties": {
        "task_id": {
          "type": "string",
          "title": "Task Id"
        },
        "task_name": {
          "type": "string",
          "title": "Task Name"
        },
        "anomaly_type": {
          "type": "string",
          "title": "Anomaly Type"
        },
        "snapshot_date": {
          "type": "string",
          "title": "Snapshot Date"
        },
        "previous_pct": {
          "type": "number",
          "title": "Previous Pct"
        },
        "current_pct": {
          "type": "number",
          "title": "Current Pct"
        },
        "delta_pct": {
          "type": "number",
          "title": "Delta Pct"
        },
        "is_material": {
          "type": "boolean",
          "title": "Is Material",
          "default": true
        },
        "explanation": {
          "type": "string",
          "title": "Explanation"
        }
      },
      "type": "object",
      "required": [
        "task_id",
        "task_name",
        "anomaly_type",
        "snapshot_date",
        "previous_pct",
        "current_pct",
        "delta_pct",
        "explanation"
      ],
      "title": "ProgressAnomaly",
      "description": "A progress anomaly detected during change tracking."
    }
  }
}