{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "project-overlay.schema.json",
  "title": "Project Overlay",
  "description": "Per-spawn context overlay materialized by the orchestrator. Budget: ≤1kB JSON.",
  "version": "1.0.0",
  "type": "object",
  "required": ["projectPrefix", "storeRoot", "indexSlice"],
  "additionalProperties": false,
  "properties": {
    "version":          { "type": "string", "description": "Schema version string. Read by manage-versions.cjs to populate overlayToolVersion at init time.", "default": "1.0.0" },
    "projectPrefix":    { "type": "string", "pattern": "^[A-Z][A-Z0-9-]+$" },
    "sprintId":         { "type": "string" },
    "sprintDir":        { "type": "string" },
    "taskId":           { "type": "string" },
    "taskDir":          { "type": "string" },
    "taskStatus":       { "type": "string" },
    "bugId":            { "type": "string" },
    "bugDir":           { "type": "string" },
    "storeRoot":        { "type": "string" },
    "indexSlice":       { "type": "string", "maxLength": 800 },
    "toolCommands":     { "type": "object" },
    "lastPhaseSummary": { "type": "object" }
  }
}
