{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/bellatorsi-com/json-schema/bellatorsi-com-bellator-response-import-data-schema.json",
  "title": "BellatorResponse[ImportData]",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/bellatorsi-com-import-api-openapi.yml#/components/schemas/BellatorResponse_ImportData_",
  "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/ImportData"
        },
        {
          "type": "null"
        }
      ]
    },
    "simulation": {
      "anyOf": [
        {
          "$ref": "#/$defs/SimulationEnvelope"
        },
        {
          "type": "null"
        }
      ]
    },
    "metadata": {
      "$ref": "#/$defs/ResponseMetadata"
    }
  },
  "type": "object",
  "required": [
    "status",
    "metadata"
  ],
  "$defs": {
    "AutoDetected": {
      "properties": {
        "start_task_ids": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Start Task Ids"
        },
        "finish_task_ids": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Finish Task Ids"
        },
        "working_hours_per_day": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Working Hours Per Day"
        }
      },
      "type": "object",
      "title": "AutoDetected"
    },
    "CalendarInfo": {
      "properties": {
        "working_hours_per_day": {
          "type": "number",
          "title": "Working Hours Per Day"
        },
        "working_days_per_week": {
          "type": "number",
          "title": "Working Days Per Week"
        },
        "holidays_detected": {
          "type": "integer",
          "title": "Holidays Detected",
          "default": 0
        }
      },
      "type": "object",
      "required": [
        "working_hours_per_day",
        "working_days_per_week"
      ],
      "title": "CalendarInfo"
    },
    "DependencyLink": {
      "properties": {
        "task_id": {
          "type": "string",
          "title": "Task Id",
          "description": "Predecessor task ID"
        },
        "relationship_type": {
          "$ref": "#/$defs/RelationshipType",
          "description": "Relationship type (FS/SS/FF/SF)",
          "default": "FS"
        },
        "lag_days": {
          "type": "number",
          "title": "Lag Days",
          "description": "Lag (positive) or lead (negative) in days",
          "default": 0.0
        },
        "is_external": {
          "type": "boolean",
          "title": "Is External",
          "description": "True if link to external project file",
          "default": false
        },
        "external_path": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "External Path",
          "description": "Path to external file if is_external=True"
        }
      },
      "type": "object",
      "required": [
        "task_id"
      ],
      "title": "DependencyLink",
      "description": "Rich dependency link with relationship type and lag/lead.\n\nSupports parsing from various scheduling tool formats including:\n- MS Project: \"10FS+5 d\", \"/path/file.mpp/10FS+5 d\"\n- Primavera P6: Similar format with XER encoding\n- Server-based: \"<ServerFile>10FS+5 d\"\n- Simple: \"10\" (defaults to FS with zero lag)\n\nExamples:\n    >>> DependencyLink(task_id=\"10\", relationship_type=\"FS\", lag_days=5.0)\n    >>> DependencyLink.from_string(\"10FS+5 d\")\n    >>> DependencyLink.from_string(\"15SS-2 d\")"
    },
    "DurationConversion": {
      "properties": {
        "source_unit": {
          "type": "string",
          "title": "Source Unit"
        },
        "target_unit": {
          "type": "string",
          "title": "Target Unit",
          "default": "days"
        },
        "conversion_factor": {
          "type": "number",
          "title": "Conversion Factor"
        }
      },
      "type": "object",
      "required": [
        "source_unit",
        "conversion_factor"
      ],
      "title": "DurationConversion"
    },
    "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."
    },
    "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."
    },
    "ImportData": {
      "properties": {
        "normalized_schedule": {
          "$ref": "#/$defs/NormalizedSchedule"
        },
        "parse_summary": {
          "$ref": "#/$defs/ParseSummary"
        },
        "mapping_stats": {
          "$ref": "#/$defs/MappingStats"
        },
        "warnings": {
          "items": {
            "$ref": "#/$defs/ParseWarning"
          },
          "type": "array",
          "title": "Warnings"
        },
        "processing_metadata": {
          "$ref": "#/$defs/app__models__schemas__ProcessingMetadata"
        },
        "msp_resource_table": {
          "anyOf": [
            {
              "items": {
                "$ref": "#/$defs/MspResource"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Msp Resource Table",
          "description": "Full resource pool from <Resources> table. MSP imports only. Includes resource_type (0=Work, 1=Material, 2=Cost) for EVM eligibility checks."
        },
        "msp_assignment_table": {
          "anyOf": [
            {
              "items": {
                "$ref": "#/$defs/MspAssignment"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Msp Assignment Table",
          "description": "Full assignment records from <Assignments> table. MSP imports only. actual_work_hours drives the resource progression compliance check."
        }
      },
      "type": "object",
      "required": [
        "normalized_schedule",
        "parse_summary",
        "mapping_stats",
        "processing_metadata"
      ],
      "title": "ImportData",
      "description": "Data payload for all Import API endpoints."
    },
    "MappingStats": {
      "properties": {
        "constraint_mappings": {
          "additionalProperties": {
            "type": "string"
          },
          "type": "object",
          "title": "Constraint Mappings"
        },
        "relationship_mappings": {
          "additionalProperties": {
            "type": "string"
          },
          "type": "object",
          "title": "Relationship Mappings"
        },
        "duration_conversion": {
          "anyOf": [
            {
              "$ref": "#/$defs/DurationConversion"
            },
            {
              "type": "null"
            }
          ]
        },
        "calendar_info": {
          "anyOf": [
            {
              "$ref": "#/$defs/CalendarInfo"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "type": "object",
      "title": "MappingStats",
      "description": "Field mapping statistics for an import operation."
    },
    "MspAssignment": {
      "properties": {
        "uid": {
          "type": "string",
          "title": "Uid",
          "description": "Assignment UID"
        },
        "task_uid": {
          "type": "string",
          "title": "Task Uid",
          "description": "Parent task UID (join key to Task)"
        },
        "resource_uid": {
          "type": "string",
          "title": "Resource Uid",
          "description": "Assigned resource UID (join key to MspResource)"
        },
        "units": {
          "anyOf": [
            {
              "type": "number",
              "minimum": 0.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Units",
          "description": "Allocation fraction (0.5 = 50%)"
        },
        "work_hours": {
          "anyOf": [
            {
              "type": "number",
              "minimum": 0.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Work Hours",
          "description": "Scheduled work in hours"
        },
        "actual_work_hours": {
          "anyOf": [
            {
              "type": "number",
              "minimum": 0.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Actual Work Hours",
          "description": "Actual work recorded in hours. Zero on a progressed task indicates 'Updating task status updates resource status' is disabled."
        },
        "remaining_work_hours": {
          "anyOf": [
            {
              "type": "number",
              "minimum": 0.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Remaining Work Hours",
          "description": "Remaining work in hours"
        },
        "percent_work_complete": {
          "anyOf": [
            {
              "type": "number",
              "maximum": 100.0,
              "minimum": 0.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Percent Work Complete",
          "description": "Assignment-level percent work complete (distinct from task-level)"
        },
        "cost": {
          "anyOf": [
            {
              "type": "number",
              "minimum": 0.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Cost",
          "description": "Scheduled cost"
        },
        "actual_cost": {
          "anyOf": [
            {
              "type": "number",
              "minimum": 0.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Actual Cost",
          "description": "Actual cost incurred"
        },
        "start": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Start",
          "description": "Assignment scheduled start"
        },
        "finish": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Finish",
          "description": "Assignment scheduled finish"
        },
        "actual_start": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Actual Start",
          "description": "Assignment actual start"
        },
        "actual_finish": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Actual Finish",
          "description": "Assignment actual finish"
        },
        "baseline_start": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Baseline Start",
          "description": "Baseline scheduled start (from <Baseline><Number>N><Start>)"
        },
        "baseline_finish": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Baseline Finish",
          "description": "Baseline scheduled finish (from <Baseline><Number>N><Finish>)"
        },
        "baseline_work_hours": {
          "anyOf": [
            {
              "type": "number",
              "minimum": 0.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Baseline Work Hours",
          "description": "Baseline budgeted work in hours (PT format → hours, from <Baseline><Number>N><Work>). Drives BCWS for labor EVM analysis."
        },
        "baseline_cost": {
          "anyOf": [
            {
              "type": "number",
              "minimum": 0.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Baseline Cost",
          "description": "Baseline cost at time of baseline save (from <Baseline><Number>N><Cost>). Drives BCWS for cost accounts."
        }
      },
      "type": "object",
      "required": [
        "uid",
        "task_uid",
        "resource_uid"
      ],
      "title": "MspAssignment",
      "description": "One record per <Assignment> element in an MS Project XML file.\n\nCaptures all assignment-level fields. The actual_work_hours field is the\nkey signal for the resource progression compliance check (ANSI/EIA-748)."
    },
    "MspResource": {
      "properties": {
        "uid": {
          "type": "string",
          "title": "Uid",
          "description": "Resource UID (XML <UID>)"
        },
        "display_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Display Id",
          "description": "User-facing resource ID (XML <ID>)"
        },
        "name": {
          "type": "string",
          "title": "Name",
          "description": "Resource display name"
        },
        "initials": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Initials",
          "description": "Resource initials"
        },
        "group": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Group",
          "description": "Resource pool / org grouping"
        },
        "resource_type": {
          "type": "integer",
          "title": "Resource Type",
          "description": "Resource type: 0=Work (EVM-bearing), 1=Material (EVM-bearing), 2=Cost (expense only)",
          "default": 0
        },
        "max_units": {
          "anyOf": [
            {
              "type": "number",
              "minimum": 0.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Max Units",
          "description": "Maximum availability (1.0 = 100%)"
        },
        "calendar_uid": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Calendar Uid",
          "description": "Resource calendar UID"
        }
      },
      "type": "object",
      "required": [
        "uid",
        "name"
      ],
      "title": "MspResource",
      "description": "One record per <Resource> element in an MS Project XML file.\n\nCaptures the full resource pool with type information needed for\nEVM eligibility checks and resource progression validation.\nType values: 0=Work, 1=Material, 2=Cost."
    },
    "NormalizedSchedule": {
      "properties": {
        "tasks": {
          "items": {
            "$ref": "#/$defs/Task"
          },
          "type": "array",
          "title": "Tasks",
          "description": "Normalized task list"
        },
        "start_task_ids": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Start Task Ids"
        },
        "finish_task_ids": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Finish Task Ids"
        },
        "status_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Status Date"
        },
        "target_finish_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Target Finish Date"
        },
        "baseline_approved_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Baseline Approved Date"
        },
        "milestone_task_ids": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Milestone Task Ids"
        },
        "loe_task_ids": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Loe Task Ids"
        },
        "apportioned_effort_task_ids": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Apportioned Effort Task Ids"
        },
        "schedule_margin_task_ids": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Schedule Margin Task Ids"
        },
        "summary_task_ids": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Summary Task Ids"
        },
        "planning_package_task_ids": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Planning Package Task Ids"
        },
        "summary_level_pp_task_ids": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Summary Level Pp Task Ids"
        },
        "schedule_visibility_task_ids": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Schedule Visibility Task Ids"
        },
        "resource_availability": {
          "items": {
            "$ref": "#/$defs/ResourceAvailability-Output"
          },
          "type": "array",
          "title": "Resource Availability"
        },
        "working_hours_per_day": {
          "type": "number",
          "exclusiveMinimum": 0.0,
          "title": "Working Hours Per Day",
          "default": 8.0
        },
        "working_days_per_week": {
          "type": "number",
          "exclusiveMinimum": 0.0,
          "title": "Working Days Per Week",
          "default": 5.0
        },
        "holidays": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Holidays"
        }
      },
      "type": "object",
      "required": [
        "tasks"
      ],
      "title": "NormalizedSchedule",
      "description": "The canonical schedule representation produced by all Import APIs.\n\nCompatible with ScheduleRequest (can be passed directly to analysis\nendpoints). Extends ScheduleRequest with task-type exclusion arrays\nand calendar metadata per normalized-schedule-schema.md v1.4.0."
    },
    "ParseSummary": {
      "properties": {
        "source_format": {
          "type": "string",
          "title": "Source Format",
          "description": "Source format: mpp-xml, p6-xer"
        },
        "source_version": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Source Version",
          "description": "Source application version string"
        },
        "tasks_imported": {
          "type": "integer",
          "minimum": 0.0,
          "title": "Tasks Imported"
        },
        "dependencies_imported": {
          "type": "integer",
          "minimum": 0.0,
          "title": "Dependencies Imported",
          "default": 0
        },
        "fields_populated": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Fields Populated"
        },
        "fields_missing": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Fields Missing"
        },
        "auto_detected": {
          "$ref": "#/$defs/AutoDetected"
        },
        "custom_fields_discovered": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Custom Fields Discovered",
          "description": "Aliases of WBS/OBS-pattern custom fields found in the project's ExtendedAttributes or OutlineCodes. Empty list when none discovered (e.g., XER imports or projects using only native <WBS>)."
        }
      },
      "type": "object",
      "required": [
        "source_format",
        "tasks_imported"
      ],
      "title": "ParseSummary",
      "description": "Summary statistics for a completed import parse operation."
    },
    "ParseWarning": {
      "properties": {
        "type": {
          "type": "string",
          "title": "Type",
          "description": "Warning type: missing_field, ambiguous_mapping, data_loss"
        },
        "severity": {
          "type": "string",
          "title": "Severity",
          "description": "Severity: info, warning, error",
          "default": "warning"
        },
        "task_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Task Id",
          "description": "Task ID associated with the warning"
        },
        "message": {
          "type": "string",
          "title": "Message",
          "description": "Human-readable warning message"
        },
        "details": {
          "anyOf": [
            {},
            {
              "type": "null"
            }
          ],
          "title": "Details",
          "description": "Additional structured details"
        }
      },
      "type": "object",
      "required": [
        "type",
        "message"
      ],
      "title": "ParseWarning",
      "description": "A non-fatal warning emitted during import parsing."
    },
    "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."
    },
    "RelationshipType": {
      "type": "string",
      "enum": [
        "FS",
        "SS",
        "FF",
        "SF"
      ],
      "title": "RelationshipType",
      "description": "Task relationship types per PMBOK 6.3.2.2.\n\nAttributes:\n    FINISH_START: Predecessor finish → successor start (most common, ~90%)\n    START_START: Predecessor start → successor start (~5%)\n    FINISH_FINISH: Predecessor finish → successor finish (~4%)\n    START_FINISH: Predecessor start → successor finish (rare, ~1%)"
    },
    "ResourceAvailability-Output": {
      "properties": {
        "resource_name": {
          "type": "string",
          "title": "Resource Name",
          "description": "Resource name (must match tasks[*].resources)"
        },
        "available_from": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Available From",
          "description": "Start of availability window (ISO 8601). Null = project start."
        },
        "available_to": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Available To",
          "description": "End of availability window (ISO 8601). Null = project finish."
        },
        "units_per_day": {
          "type": "number",
          "minimum": 0.0,
          "title": "Units Per Day",
          "description": "Available resource-units per working day (default: 1.0 = 100%)",
          "default": 1.0
        }
      },
      "type": "object",
      "required": [
        "resource_name"
      ],
      "title": "ResourceAvailability",
      "description": "Per-resource availability window for Resource Analysis.\n\nSpecifies how many units of a resource are available over a date range.\nresource_name must match a value appearing in tasks[*].resources."
    },
    "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."
    },
    "Task": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id",
          "description": "Unique task identifier"
        },
        "duration_days": {
          "type": "number",
          "minimum": 0.0,
          "title": "Duration Days",
          "description": "Task duration in days",
          "default": 0
        },
        "predecessors": {
          "items": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "$ref": "#/$defs/DependencyLink"
              }
            ]
          },
          "type": "array",
          "title": "Predecessors",
          "description": "List of predecessor task IDs or dependency links. Supports: 'T1', 'T1FS+5 d', 'T2SS-2 d', or DependencyLink objects"
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Name",
          "description": "Task name"
        },
        "resource": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Resource",
          "description": "Resource assigned to task"
        },
        "resources": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Resources",
          "description": "List of resources assigned (for multi-resource tasks)"
        },
        "percent_complete": {
          "type": "number",
          "maximum": 100.0,
          "minimum": 0.0,
          "title": "Percent Complete",
          "description": "Percent complete (0-100)",
          "default": 0
        },
        "physical_percent_complete": {
          "anyOf": [
            {
              "type": "number",
              "maximum": 100.0,
              "minimum": 0.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Physical Percent Complete",
          "description": "Physical percent complete (0-100). Manual EVM entry by scheduler (MSP PhysicalPercentComplete). Authoritative for BCWP calculations. Captured separately from percent_complete on MSP imports."
        },
        "planned_start": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Planned Start",
          "description": "Planned start date (ISO 8601)"
        },
        "planned_finish": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Planned Finish",
          "description": "Planned finish date (ISO 8601)"
        },
        "actual_start": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Actual Start",
          "description": "Actual start date (ISO 8601)"
        },
        "actual_finish": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Actual Finish",
          "description": "Actual finish date (ISO 8601)"
        },
        "baseline_start": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Baseline Start",
          "description": "Baseline start date (ISO 8601)"
        },
        "baseline_finish": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Baseline Finish",
          "description": "Baseline finish date (ISO 8601)"
        },
        "constraint_type": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Constraint Type",
          "description": "Constraint type: ASAP, ALAP, SNET, SNLT, FNET, FNLT, MSO, MFO"
        },
        "constraint_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Constraint Date",
          "description": "Constraint date if applicable (ISO 8601)"
        },
        "task_type": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Task Type",
          "description": "Task type classification. Valid values: task (default), milestone, loe, summary, schedule_margin, planning_package, slpp, schedule_visibility. Drives DCMA check exclusions per PAM 200.1 § 3.2."
        },
        "wbs_code": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 100
            },
            {
              "type": "null"
            }
          ],
          "title": "Wbs Code",
          "description": "WBS code (e.g., '1.2.3')"
        },
        "organization_code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Organization Code",
          "description": "Org/dept identifier for anomaly categorization (Progress Audit)"
        },
        "custom_field_map": {
          "anyOf": [
            {
              "additionalProperties": {
                "type": "string"
              },
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Custom Field Map",
          "description": "All WBS/OBS-pattern custom fields discovered in this MS Project file, keyed by alias (e.g., 'CWBS', 'OBS'). Null for XER imports or when no matching aliases exist."
        },
        "forecast_start": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Forecast Start",
          "description": "Current forecast start date (ISO 8601)"
        },
        "forecast_finish": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Forecast Finish",
          "description": "Current forecast finish date (ISO 8601)"
        },
        "total_float_days": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Total Float Days",
          "description": "Pre-computed total float in days. Auto-computed by CPM if absent."
        },
        "baseline_duration_days": {
          "anyOf": [
            {
              "type": "number",
              "minimum": 0.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Baseline Duration Days",
          "description": "Baseline duration in days. Auto-computed from baseline dates if absent."
        },
        "delay_category": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Delay Category",
          "description": "Delay attribution category. Valid values: owner, contractor, design, procurement, weather, force_majeure."
        },
        "earned_value": {
          "anyOf": [
            {
              "type": "number",
              "minimum": 0.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Earned Value",
          "description": "Earned Value (BCWP) in cost units. Requires options.include_ev_validation."
        },
        "budgeted_cost": {
          "anyOf": [
            {
              "type": "number",
              "minimum": 0.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Budgeted Cost",
          "description": "Budgeted Cost of Work Scheduled (BCWS) in cost units."
        },
        "approval_required": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Approval Required",
          "description": "Whether this task requires explicit approval before it can start."
        },
        "approval_status": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Approval Status",
          "description": "Approval workflow state. Valid values: not_required, pending, approved, rejected."
        }
      },
      "type": "object",
      "required": [
        "id"
      ],
      "title": "Task",
      "description": "Unified task model for all schedule analysis endpoints.\n\nThis model is used across all Tier 1 and Tier 2 APIs. Fields are optional\nunless specifically required by an endpoint.\n\nField Naming Rationale:\n- duration_days: Explicit time unit (vs generic \"duration\")\n- predecessors: Standard scheduling terminology (vs generic \"dependencies\")\n\nDependency Format Support:\n- Simple: [\"task1\", \"task2\"]\n- Rich: [\"task1FS+5 d\", \"task2SS-2 d\"]\n- Objects: [DependencyLink(...), ...]"
    },
    "app__models__schemas__ProcessingMetadata": {
      "properties": {
        "import_timestamp": {
          "type": "string",
          "title": "Import Timestamp",
          "description": "ISO 8601 timestamp"
        },
        "processing_time_ms": {
          "type": "number",
          "minimum": 0.0,
          "title": "Processing Time Ms"
        },
        "api_version": {
          "type": "string",
          "title": "Api Version",
          "default": "v0.2.0"
        },
        "parser_version": {
          "type": "string",
          "title": "Parser Version"
        }
      },
      "type": "object",
      "required": [
        "import_timestamp",
        "processing_time_ms",
        "parser_version"
      ],
      "title": "ProcessingMetadata",
      "description": "Timing and version metadata for an import operation."
    }
  }
}