{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/fluidrecall-com/json-schema/fluidrecall-com-deadline-plan-schema.json",
  "title": "DeadlinePlan",
  "x-generated": "2026-11-08",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/fluidrecall-com-openapi.json#/components/schemas/DeadlinePlan",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "deadline",
    "asOf",
    "asOfStudyDay",
    "timezone",
    "dayBoundaryHour",
    "remainingNewCards",
    "alreadyLearned",
    "totalCards",
    "calendarDaysUntilDeadline",
    "studyDaysUntilDeadline",
    "recommendedNewCardsPerDay",
    "currentNewCardsPerDay",
    "projectedFinishDateAtCurrent",
    "projectedFinishDateAtRecommended",
    "onTrack",
    "pace",
    "countsFromDeck",
    "applied",
    "deckId",
    "deck",
    "assumptions",
    "coaching"
  ],
  "properties": {
    "deadline": {
      "type": "string",
      "description": "Deadline study day as YYYY-MM-DD."
    },
    "asOf": {
      "type": "string",
      "description": "UTC ISO-8601 timestamp ending in Z"
    },
    "asOfStudyDay": {
      "type": "string",
      "description": "Study day of asOf as YYYY-MM-DD."
    },
    "timezone": {
      "type": "string"
    },
    "dayBoundaryHour": {
      "type": "integer"
    },
    "remainingNewCards": {
      "type": "integer"
    },
    "alreadyLearned": {
      "type": "integer"
    },
    "totalCards": {
      "type": "integer"
    },
    "calendarDaysUntilDeadline": {
      "type": "integer"
    },
    "studyDaysUntilDeadline": {
      "type": "integer"
    },
    "recommendedNewCardsPerDay": {
      "type": "integer",
      "description": "ceil(remainingNewCards / studyDaysUntilDeadline), clamped to 0–9999. Not a default of 20. A floor from the deadline."
    },
    "currentNewCardsPerDay": {
      "type": [
        "integer",
        "null"
      ]
    },
    "projectedFinishDateAtCurrent": {
      "type": [
        "string",
        "null"
      ],
      "description": "YYYY-MM-DD of the last new-card introduction at the current N. Null if current N is missing or 0."
    },
    "projectedFinishDateAtRecommended": {
      "type": [
        "string",
        "null"
      ]
    },
    "onTrack": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "True when current N finishes remaining new cards by the deadline. Null when there is no current N."
    },
    "pace": {
      "type": "string",
      "enum": [
        "done",
        "overdue",
        "faster",
        "on_track",
        "slower",
        "unknown"
      ]
    },
    "countsFromDeck": {
      "type": "boolean"
    },
    "applied": {
      "type": "boolean"
    },
    "deckId": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "deck": {
      "type": [
        "object",
        "null"
      ],
      "description": "The patched deck after apply. Null on preview."
    },
    "assumptions": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "coaching": {
      "type": "string"
    }
  }
}