{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/bellatorsi-com/json-schema/bellatorsi-com-bellator-response-delay-analysis-data-schema.json",
  "title": "BellatorResponse[DelayAnalysisData]",
  "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_DelayAnalysisData_",
  "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/DelayAnalysisData"
        },
        {
          "type": "null"
        }
      ]
    },
    "simulation": {
      "anyOf": [
        {
          "$ref": "#/$defs/SimulationEnvelope"
        },
        {
          "type": "null"
        }
      ]
    },
    "metadata": {
      "$ref": "#/$defs/ResponseMetadata"
    }
  },
  "type": "object",
  "required": [
    "status",
    "metadata"
  ],
  "$defs": {
    "CategorizedDelays": {
      "properties": {
        "owner": {
          "type": "number",
          "title": "Owner",
          "default": 0.0
        },
        "contractor": {
          "type": "number",
          "title": "Contractor",
          "default": 0.0
        },
        "design": {
          "type": "number",
          "title": "Design",
          "default": 0.0
        },
        "procurement": {
          "type": "number",
          "title": "Procurement",
          "default": 0.0
        },
        "weather": {
          "type": "number",
          "title": "Weather",
          "default": 0.0
        },
        "force_majeure": {
          "type": "number",
          "title": "Force Majeure",
          "default": 0.0
        },
        "concurrent": {
          "type": "number",
          "title": "Concurrent",
          "default": 0.0
        }
      },
      "type": "object",
      "title": "CategorizedDelays",
      "description": "Delay days aggregated by responsible party."
    },
    "CausalChain": {
      "properties": {
        "root_task_id": {
          "type": "string",
          "title": "Root Task Id"
        },
        "impacted_milestone": {
          "type": "string",
          "title": "Impacted Milestone"
        },
        "delay_propagation_path": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Delay Propagation Path"
        },
        "cumulative_impact_days": {
          "type": "number",
          "title": "Cumulative Impact Days",
          "default": 0.0
        },
        "chain_confidence": {
          "type": "number",
          "title": "Chain Confidence",
          "default": 1.0
        },
        "concurrency_score": {
          "type": "number",
          "title": "Concurrency Score",
          "default": 0.0
        }
      },
      "type": "object",
      "required": [
        "root_task_id",
        "impacted_milestone"
      ],
      "title": "CausalChain",
      "description": "Delay propagation chain from a root task."
    },
    "ConcurrentOverlap": {
      "properties": {
        "overlapping_task_id": {
          "type": "string",
          "title": "Overlapping Task Id"
        },
        "shared_days": {
          "type": "integer",
          "title": "Shared Days"
        },
        "concurrency_ratio": {
          "type": "number",
          "title": "Concurrency Ratio"
        }
      },
      "type": "object",
      "required": [
        "overlapping_task_id",
        "shared_days",
        "concurrency_ratio"
      ],
      "title": "ConcurrentOverlap",
      "description": "Concurrent delay overlap details."
    },
    "DelayAnalysisData": {
      "properties": {
        "delay_summary": {
          "$ref": "#/$defs/DelaySummary"
        },
        "delay_drivers": {
          "items": {
            "$ref": "#/$defs/DelayDriver"
          },
          "type": "array",
          "title": "Delay Drivers"
        },
        "causal_chains": {
          "items": {
            "$ref": "#/$defs/CausalChain"
          },
          "type": "array",
          "title": "Causal Chains"
        },
        "float_analysis": {
          "$ref": "#/$defs/FloatAnalysis"
        },
        "recommendations": {
          "items": {
            "$ref": "#/$defs/DelayRecommendation"
          },
          "type": "array",
          "title": "Recommendations"
        },
        "processing_metadata": {
          "additionalProperties": true,
          "type": "object",
          "title": "Processing Metadata"
        }
      },
      "type": "object",
      "title": "DelayAnalysisData",
      "description": "Data payload for POST /api/v1/forensics/delay-analysis."
    },
    "DelayDriver": {
      "properties": {
        "task_id": {
          "type": "string",
          "title": "Task Id"
        },
        "task_name": {
          "type": "string",
          "title": "Task Name"
        },
        "delay_days": {
          "type": "number",
          "title": "Delay Days"
        },
        "variance_type": {
          "type": "string",
          "enum": [
            "start_delay",
            "finish_delay",
            "duration_overrun",
            "compound_delay",
            "concurrent_delay"
          ],
          "title": "Variance Type"
        },
        "delay_category": {
          "type": "string",
          "title": "Delay Category",
          "default": ""
        },
        "baseline_start": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Baseline Start"
        },
        "actual_start": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Actual Start"
        },
        "baseline_finish": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Baseline Finish"
        },
        "actual_finish": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Actual Finish"
        },
        "contribution_to_total": {
          "type": "number",
          "title": "Contribution To Total",
          "default": 0.0
        },
        "on_critical_path": {
          "type": "boolean",
          "title": "On Critical Path",
          "default": false
        },
        "successors_impacted": {
          "type": "integer",
          "title": "Successors Impacted",
          "default": 0
        },
        "causal_score": {
          "type": "number",
          "title": "Causal Score",
          "default": 0.0
        },
        "confidence": {
          "type": "number",
          "title": "Confidence",
          "default": 1.0
        },
        "concurrent_overlaps": {
          "items": {
            "$ref": "#/$defs/ConcurrentOverlap"
          },
          "type": "array",
          "title": "Concurrent Overlaps"
        }
      },
      "type": "object",
      "required": [
        "task_id",
        "task_name",
        "delay_days",
        "variance_type"
      ],
      "title": "DelayDriver",
      "description": "Per-task delay driver with attribution scores."
    },
    "DelayRecommendation": {
      "properties": {
        "priority": {
          "type": "string",
          "enum": [
            "critical",
            "high",
            "medium"
          ],
          "title": "Priority"
        },
        "recommendation": {
          "type": "string",
          "title": "Recommendation"
        },
        "expected_impact": {
          "type": "string",
          "title": "Expected Impact"
        },
        "standards_citation": {
          "type": "string",
          "title": "Standards Citation"
        }
      },
      "type": "object",
      "required": [
        "priority",
        "recommendation",
        "expected_impact",
        "standards_citation"
      ],
      "title": "DelayRecommendation",
      "description": "Actionable delay mitigation recommendation."
    },
    "DelaySummary": {
      "properties": {
        "total_delay_days": {
          "type": "number",
          "title": "Total Delay Days",
          "default": 0.0
        },
        "delayed_tasks_count": {
          "type": "integer",
          "title": "Delayed Tasks Count",
          "default": 0
        },
        "critical_path_delay_days": {
          "type": "number",
          "title": "Critical Path Delay Days",
          "default": 0.0
        },
        "float_consumed_days": {
          "type": "number",
          "title": "Float Consumed Days",
          "default": 0.0
        },
        "schedule_performance_index": {
          "type": "number",
          "title": "Schedule Performance Index",
          "default": 1.0
        },
        "categorized_delays": {
          "$ref": "#/$defs/CategorizedDelays"
        }
      },
      "type": "object",
      "title": "DelaySummary",
      "description": "Aggregate delay metrics."
    },
    "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."
    },
    "FloatAnalysis": {
      "properties": {
        "float_consumed_by_task": {
          "additionalProperties": {
            "type": "number"
          },
          "type": "object",
          "title": "Float Consumed By Task"
        },
        "near_critical_tasks": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Near Critical Tasks"
        },
        "float_erosion_rate": {
          "type": "number",
          "title": "Float Erosion Rate",
          "default": 0.0
        }
      },
      "type": "object",
      "title": "FloatAnalysis",
      "description": "Float consumption and near-critical task tracking."
    },
    "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."
    },
    "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."
    },
    "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."
    }
  }
}