{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/operatornest-com/json-schema/operatornest-com-recurring-task-planner-result-schema.json",
  "title": "recurring-task-planner-result",
  "x-generated": "2026-11-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/operatornest-com-openapi.json#/components/schemas/recurring-task-planner-result",
  "type": "object",
  "properties": {
    "tool": {
      "const": "recurring-task-planner"
    },
    "input": {
      "$ref": "#/$defs/recurring-task-planner-input"
    },
    "units": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "method": {
      "type": "string"
    },
    "assumptions": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "provenance": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "monthlyHours": {
      "type": "number"
    },
    "schedules": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80,
            "pattern": "\\S",
            "description": "Task label used as the calendar event summary."
          },
          "frequency": {
            "type": "string",
            "enum": [
              "weekly",
              "biweekly",
              "monthly"
            ],
            "description": "Repeat every week, every two weeks from the first matching weekday, or every month."
          },
          "day": {
            "type": "string",
            "enum": [
              "MO",
              "TU",
              "WE",
              "TH",
              "FR",
              "SA",
              "SU"
            ],
            "description": "Weekday for weekly/biweekly tasks. Required but ignored for monthly tasks."
          },
          "monthday": {
            "type": "integer",
            "minimum": 1,
            "maximum": 28,
            "description": "Day of month for monthly tasks, limited to dates present in every month. Required but ignored for weekly/biweekly tasks."
          },
          "minutes": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1440,
            "description": "Estimated minutes per run; used for event duration and monthly hours."
          },
          "time": {
            "type": "string",
            "minLength": 5,
            "maxLength": 5,
            "pattern": "^([01][0-9]|2[0-3]):[0-5][0-9]$",
            "description": "24-hour HH:mm start time, floating in the importing calendar’s local time zone."
          },
          "owner": {
            "type": "string",
            "enum": [
              "delegate",
              "keep",
              "decide"
            ],
            "description": "Planning label: delegate to an operator, keep for yourself, or decide later. Included in the calendar note; does not assign or execute work."
          },
          "firstDate": {
            "type": "string",
            "format": "date"
          },
          "recurrenceRule": {
            "type": "string"
          }
        },
        "required": [
          "title",
          "frequency",
          "day",
          "monthday",
          "minutes",
          "time",
          "owner",
          "firstDate",
          "recurrenceRule"
        ],
        "additionalProperties": false
      }
    },
    "ics": {
      "type": "string",
      "description": "RFC 5545 calendar with CRLF folding and floating local times."
    }
  },
  "required": [
    "tool",
    "input",
    "units",
    "method",
    "assumptions",
    "provenance",
    "monthlyHours",
    "schedules",
    "ics"
  ],
  "additionalProperties": false,
  "$defs": {
    "recurring-task-planner-input": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "startDate": {
          "type": "string",
          "format": "date",
          "minLength": 10,
          "maxLength": 10,
          "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
          "description": "Earliest date for the first occurrence of each task, from 2000-01-01 to 2100-12-31."
        },
        "tasks": {
          "type": "array",
          "minItems": 0,
          "maxItems": 20,
          "description": "Tasks to include in the estimate and calendar. [] returns zero hours and a calendar with no events.",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "title": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80,
                "pattern": "\\S",
                "description": "Task label used as the calendar event summary."
              },
              "frequency": {
                "type": "string",
                "enum": [
                  "weekly",
                  "biweekly",
                  "monthly"
                ],
                "description": "Repeat every week, every two weeks from the first matching weekday, or every month."
              },
              "day": {
                "type": "string",
                "enum": [
                  "MO",
                  "TU",
                  "WE",
                  "TH",
                  "FR",
                  "SA",
                  "SU"
                ],
                "description": "Weekday for weekly/biweekly tasks. Required but ignored for monthly tasks."
              },
              "monthday": {
                "type": "integer",
                "minimum": 1,
                "maximum": 28,
                "description": "Day of month for monthly tasks, limited to dates present in every month. Required but ignored for weekly/biweekly tasks."
              },
              "minutes": {
                "type": "integer",
                "minimum": 1,
                "maximum": 1440,
                "description": "Estimated minutes per run; used for event duration and monthly hours."
              },
              "time": {
                "type": "string",
                "minLength": 5,
                "maxLength": 5,
                "pattern": "^([01][0-9]|2[0-3]):[0-5][0-9]$",
                "description": "24-hour HH:mm start time, floating in the importing calendar’s local time zone."
              },
              "owner": {
                "type": "string",
                "enum": [
                  "delegate",
                  "keep",
                  "decide"
                ],
                "description": "Planning label: delegate to an operator, keep for yourself, or decide later. Included in the calendar note; does not assign or execute work."
              }
            },
            "required": [
              "title",
              "frequency",
              "day",
              "monthday",
              "minutes",
              "time",
              "owner"
            ]
          }
        }
      },
      "required": [
        "startDate",
        "tasks"
      ]
    }
  }
}