{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "WriteGuard Task Factory task (wg-task/3)",
  "description": "One task for the Task Factory. Generated from the WriteGuard code; WriteGuard's own check is the final word.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schema",
    "title",
    "intent",
    "parts"
  ],
  "properties": {
    "schema": {
      "const": "wg-task/3"
    },
    "title": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "class_free": {
      "type": "boolean",
      "description": "true: drafted before choosing a class."
    },
    "instructions": {
      "type": "string",
      "maxLength": 600,
      "description": "Shown above the student's page; the goal is used when absent."
    },
    "ai_policy": {
      "enum": [
        "not_allowed",
        "allowed_with_declaration"
      ]
    },
    "max_words": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "type": "integer",
          "minimum": 0,
          "maximum": 50000
        }
      ]
    },
    "pasting": {
      "enum": [
        "standard",
        "paste_disabled",
        "paste_same_page",
        "paste_tracked",
        "open"
      ]
    },
    "form": {
      "enum": [
        "auto",
        "plain",
        "rows"
      ],
      "description": "auto lets WriteGuard choose the page form."
    },
    "intent": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "goal",
        "minutes"
      ],
      "properties": {
        "goal": {
          "type": "string",
          "minLength": 1,
          "description": "What students should be able to do."
        },
        "minutes": {
          "type": "integer",
          "minimum": 1,
          "maximum": 240
        },
        "grade": {
          "type": "string"
        },
        "kind": {
          "type": "string"
        }
      }
    },
    "parts": {
      "type": "array",
      "minItems": 1,
      "maxItems": 12,
      "items": {
        "$ref": "#/$defs/part"
      }
    }
  },
  "$defs": {
    "box": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "label"
      ],
      "properties": {
        "label": {
          "type": "string",
          "minLength": 1,
          "maxLength": 160,
          "description": "The green box's label."
        },
        "lines": {
          "oneOf": [
            {
              "type": "integer",
              "minimum": 1,
              "maximum": 6,
              "description": "Number of empty lines to write on."
            },
            {
              "type": "array",
              "maxItems": 12,
              "items": {
                "type": "string",
                "maxLength": 600
              }
            }
          ]
        },
        "slot": {
          "type": "string",
          "pattern": "^[a-z][a-z0-9_]{0,23}$",
          "description": "A name for this box's answer, unique in the part."
        },
        "before": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          }
        }
      }
    },
    "part": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "block",
        "title",
        "content"
      ],
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^[a-z][a-z0-9_-]{0,31}$",
          "description": "Unique in the task."
        },
        "block": {
          "enum": [
            "read",
            "ref",
            "model",
            "rows",
            "blanks",
            "frames",
            "fix",
            "frame",
            "answer",
            "short",
            "long",
            "example",
            "bridge",
            "selfcheck",
            "exit",
            "extension",
            "lasttime"
          ],
          "description": "The kind of part."
        },
        "title": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "minutes": {
          "type": "integer",
          "minimum": 0,
          "maximum": 120
        },
        "pin": {
          "type": "boolean",
          "description": "Keep this part in view while the student works."
        },
        "optional": {
          "type": "boolean"
        },
        "cell": {
          "enum": [
            "short",
            "medium",
            "long"
          ],
          "description": "Answer cell size on the rows form."
        },
        "check": {
          "type": "boolean",
          "description": "Check this part against its key (blocks with a key only)."
        },
        "content": {
          "type": "object"
        }
      },
      "allOf": [
        {
          "if": {
            "properties": {
              "block": {
                "const": "read"
              }
            }
          },
          "then": {
            "properties": {
              "content": {
                "$ref": "#/$defs/content.read"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "block": {
                "const": "ref"
              }
            }
          },
          "then": {
            "properties": {
              "content": {
                "$ref": "#/$defs/content.ref"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "block": {
                "const": "model"
              }
            }
          },
          "then": {
            "properties": {
              "content": {
                "$ref": "#/$defs/content.model"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "block": {
                "const": "rows"
              }
            }
          },
          "then": {
            "properties": {
              "content": {
                "$ref": "#/$defs/content.rows"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "block": {
                "const": "blanks"
              }
            }
          },
          "then": {
            "properties": {
              "content": {
                "$ref": "#/$defs/content.blanks"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "block": {
                "const": "frames"
              }
            }
          },
          "then": {
            "properties": {
              "content": {
                "$ref": "#/$defs/content.frames"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "block": {
                "const": "fix"
              }
            }
          },
          "then": {
            "properties": {
              "content": {
                "$ref": "#/$defs/content.fix"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "block": {
                "const": "frame"
              }
            }
          },
          "then": {
            "properties": {
              "content": {
                "$ref": "#/$defs/content.frame"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "block": {
                "const": "answer"
              }
            }
          },
          "then": {
            "properties": {
              "content": {
                "$ref": "#/$defs/content.answer"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "block": {
                "const": "short"
              }
            }
          },
          "then": {
            "properties": {
              "content": {
                "$ref": "#/$defs/content.short"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "block": {
                "const": "long"
              }
            }
          },
          "then": {
            "properties": {
              "content": {
                "$ref": "#/$defs/content.long"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "block": {
                "const": "example"
              }
            }
          },
          "then": {
            "properties": {
              "content": {
                "$ref": "#/$defs/content.example"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "block": {
                "const": "bridge"
              }
            }
          },
          "then": {
            "properties": {
              "content": {
                "$ref": "#/$defs/content.bridge"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "block": {
                "const": "selfcheck"
              }
            }
          },
          "then": {
            "properties": {
              "content": {
                "$ref": "#/$defs/content.selfcheck"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "block": {
                "const": "exit"
              }
            }
          },
          "then": {
            "properties": {
              "content": {
                "$ref": "#/$defs/content.exit"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "block": {
                "const": "extension"
              }
            }
          },
          "then": {
            "properties": {
              "content": {
                "$ref": "#/$defs/content.extension"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "block": {
                "const": "lasttime"
              }
            }
          },
          "then": {
            "properties": {
              "content": {
                "$ref": "#/$defs/content.lasttime"
              }
            }
          }
        }
      ]
    },
    "content.read": {
      "title": "Read box",
      "description": "Reads a blue box. Gives input.",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "ican": {
          "type": "string",
          "minLength": 1,
          "maxLength": 600,
          "description": "The \"I can\" line. Printed first, in bold, at the top of the part's blue box. Starts with \"I can\"."
        },
        "read": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "Lines to read: the text, the context, the question."
        },
        "ref": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "The rule, word bank or model the student looks back to while answering. Pin the part to keep it in view."
        },
        "do": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "What to do. Printed last in the blue box, straight above the places to answer."
        },
        "doRows": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "What to do on the rows form of the page (answers in green cells): replaces \"do\" there; the plain form ignores it."
        }
      }
    },
    "content.ref": {
      "title": "Reference (rule or word bank)",
      "description": "A rule, bank or ladder to keep in view while working elsewhere. Pin it.",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "ican": {
          "type": "string",
          "minLength": 1,
          "maxLength": 600,
          "description": "The \"I can\" line. Printed first, in bold, at the top of the part's blue box. Starts with \"I can\"."
        },
        "read": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "Lines to read: the text, the context, the question."
        },
        "ref": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "The rule, word bank or model the student looks back to while answering. Pin the part to keep it in view."
        },
        "do": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "What to do. Printed last in the blue box, straight above the places to answer."
        },
        "doRows": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "What to do on the rows form of the page (answers in green cells): replaces \"do\" there; the plain form ignores it."
        }
      }
    },
    "content.model": {
      "title": "Model text",
      "description": "A model of the text type, to imitate before writing alone.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "model"
      ],
      "properties": {
        "ican": {
          "type": "string",
          "minLength": 1,
          "maxLength": 600,
          "description": "The \"I can\" line. Printed first, in bold, at the top of the part's blue box. Starts with \"I can\"."
        },
        "read": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "Lines to read: the text, the context, the question."
        },
        "ref": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "The rule, word bank or model the student looks back to while answering. Pin the part to keep it in view."
        },
        "do": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "What to do. Printed last in the blue box, straight above the places to answer."
        },
        "doRows": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "What to do on the rows form of the page (answers in green cells): replaces \"do\" there; the plain form ignores it."
        },
        "title": {
          "type": "string",
          "minLength": 1,
          "maxLength": 600,
          "description": "The model's title, printed in bold above it."
        },
        "model": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "The model text, line by line."
        }
      }
    },
    "content.rows": {
      "title": "Items answered on their own line",
      "description": "Each item sits in the green box on the line where it is answered, its answer label after it.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "label",
        "after",
        "items"
      ],
      "properties": {
        "ican": {
          "type": "string",
          "minLength": 1,
          "maxLength": 600,
          "description": "The \"I can\" line. Printed first, in bold, at the top of the part's blue box. Starts with \"I can\"."
        },
        "read": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "Lines to read: the text, the context, the question."
        },
        "ref": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "The rule, word bank or model the student looks back to while answering. Pin the part to keep it in view."
        },
        "do": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "What to do. Printed last in the blue box, straight above the places to answer."
        },
        "doRows": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "What to do on the rows form of the page (answers in green cells): replaces \"do\" there; the plain form ignores it."
        },
        "label": {
          "type": "string",
          "minLength": 1,
          "maxLength": 600,
          "description": "The green box's label (what the student does with the items)."
        },
        "after": {
          "type": "string",
          "minLength": 1,
          "maxLength": 600,
          "description": "The answer label printed after each item, ending with a colon: \"Verb:\", \"D or R + verb:\"."
        },
        "items": {
          "type": "array",
          "minItems": 1,
          "maxItems": 20,
          "items": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "text"
                ],
                "properties": {
                  "text": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 600,
                    "description": "What the student sees for this item."
                  },
                  "answer": {
                    "type": "string",
                    "description": "The accepted answer; alternatives separated by \"|\". Teacher key only, never shown to students."
                  },
                  "why": {
                    "type": "string",
                    "description": "Why the answer is right. Teacher key only."
                  },
                  "wrong": {
                    "type": "array",
                    "maxItems": 6,
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "answer",
                        "why"
                      ],
                      "properties": {
                        "answer": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 160
                        },
                        "why": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 240,
                          "description": "Why this answer is wrong, in plain words."
                        }
                      }
                    },
                    "description": "Wrong answers you expect, each with why. Needs an answer."
                  }
                }
              }
            ]
          },
          "description": "The items, in order, each with its answer (and why) for the key, and optionally \"wrong\": the wrong answers you expect, each with why it is wrong (shown only to a student who gives that answer; it must not give the right answer away)."
        },
        "example": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "text",
            "answer"
          ],
          "properties": {
            "text": {
              "type": "string"
            },
            "answer": {
              "type": "string"
            }
          },
          "description": "A worked example (an item and its answer), printed last in the blue box."
        },
        "options": {
          "type": "array",
          "maxItems": 8,
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "description": "When the answer is one of a few choices (\"D\", \"R\"): the choices."
        },
        "second": {
          "type": "string",
          "minLength": 1,
          "maxLength": 600,
          "description": "What else each answer gives beyond the choice (\"the reporting verb\"), so two choices cannot be guessed."
        },
        "sure": {
          "type": "boolean",
          "description": "The student says \"sure or not sure\" on each item before the part is checked."
        },
        "sentences": {
          "type": "boolean",
          "description": "Each answer is a whole sentence the student writes."
        }
      }
    },
    "content.blanks": {
      "title": "Blanks (plain)",
      "description": "A sentence with a gap (___); the student types the missing word after it, on the same line.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "label",
        "items"
      ],
      "properties": {
        "ican": {
          "type": "string",
          "minLength": 1,
          "maxLength": 600,
          "description": "The \"I can\" line. Printed first, in bold, at the top of the part's blue box. Starts with \"I can\"."
        },
        "read": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "Lines to read: the text, the context, the question."
        },
        "ref": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "The rule, word bank or model the student looks back to while answering. Pin the part to keep it in view."
        },
        "do": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "What to do. Printed last in the blue box, straight above the places to answer."
        },
        "doRows": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "What to do on the rows form of the page (answers in green cells): replaces \"do\" there; the plain form ignores it."
        },
        "label": {
          "type": "string",
          "minLength": 1,
          "maxLength": 600,
          "description": "The green box's label."
        },
        "after": {
          "type": "string",
          "minLength": 1,
          "maxLength": 600,
          "description": "The answer label after each sentence. Default \"Answer:\"."
        },
        "items": {
          "type": "array",
          "minItems": 1,
          "maxItems": 20,
          "items": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "text"
                ],
                "properties": {
                  "text": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 600,
                    "description": "What the student sees for this item."
                  },
                  "answer": {
                    "type": "string",
                    "description": "The accepted answer; alternatives separated by \"|\". Teacher key only, never shown to students."
                  },
                  "why": {
                    "type": "string",
                    "description": "Why the answer is right. Teacher key only."
                  },
                  "wrong": {
                    "type": "array",
                    "maxItems": 6,
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "answer",
                        "why"
                      ],
                      "properties": {
                        "answer": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 160
                        },
                        "why": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 240,
                          "description": "Why this answer is wrong, in plain words."
                        }
                      }
                    },
                    "description": "Wrong answers you expect, each with why. Needs an answer."
                  }
                }
              }
            ]
          },
          "description": "Sentences, each with ___ where the word goes, and the word for the key; optionally \"wrong\": wrong words you expect, each with why it is wrong (never the right word)."
        },
        "example": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "text",
            "answer"
          ],
          "properties": {
            "text": {
              "type": "string"
            },
            "answer": {
              "type": "string"
            }
          },
          "description": "A worked example, printed last in the blue box."
        },
        "sure": {
          "type": "boolean",
          "description": "The student says \"sure or not sure\" on each item before the part is checked."
        },
        "bank": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "description": "The words to choose from, printed in the blue box in the order given (put them in a mixed order yourself)."
        }
      }
    },
    "content.frames": {
      "title": "Sentence frames, finished in line",
      "description": "Completes a started sentence on the same line: do part, then all. Keyed endings are checked; own endings are the student's words.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "label",
        "items"
      ],
      "properties": {
        "ican": {
          "type": "string",
          "minLength": 1,
          "maxLength": 600,
          "description": "The \"I can\" line. Printed first, in bold, at the top of the part's blue box. Starts with \"I can\"."
        },
        "read": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "Lines to read: the text, the context, the question."
        },
        "ref": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "The rule, word bank or model the student looks back to while answering. Pin the part to keep it in view."
        },
        "do": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "What to do. Printed last in the blue box, straight above the places to answer."
        },
        "doRows": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "What to do on the rows form of the page (answers in green cells): replaces \"do\" there; the plain form ignores it."
        },
        "label": {
          "type": "string",
          "minLength": 1,
          "maxLength": 600,
          "description": "The green box's label."
        },
        "items": {
          "type": "array",
          "minItems": 1,
          "maxItems": 20,
          "items": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "text"
                ],
                "properties": {
                  "text": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 600,
                    "description": "What the student sees for this item."
                  },
                  "answer": {
                    "type": "string",
                    "description": "The accepted answer; alternatives separated by \"|\". Teacher key only, never shown to students."
                  },
                  "why": {
                    "type": "string",
                    "description": "Why the answer is right. Teacher key only."
                  },
                  "wrong": {
                    "type": "array",
                    "maxItems": 6,
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "answer",
                        "why"
                      ],
                      "properties": {
                        "answer": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 160
                        },
                        "why": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 240,
                          "description": "Why this answer is wrong, in plain words."
                        }
                      }
                    },
                    "description": "Wrong answers you expect, each with why. Needs an answer."
                  },
                  "own": {
                    "type": "boolean",
                    "description": "true: the student writes their own ending (never marked); give no \"answer\"."
                  }
                }
              }
            ]
          },
          "description": "Sentence starts, each ending with its gap (\"Nadia admitted that ___\"). Give the accepted endings in \"answer\" (with \"|\"), or \"own\": true for the student's own words (never marked); optionally \"wrong\" endings you expect, each with why."
        },
        "example": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "text",
            "answer"
          ],
          "properties": {
            "text": {
              "type": "string"
            },
            "answer": {
              "type": "string"
            }
          },
          "description": "A worked example: a start and its ending, shown finished above the items."
        },
        "sure": {
          "type": "boolean",
          "description": "The student says \"sure or not sure\" on each item before the part is checked."
        }
      }
    },
    "content.fix": {
      "title": "Fix the mistake",
      "description": "Notices the gap in one's own forms: taps the one wrong word in a sentence, then types the fix.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "label",
        "items"
      ],
      "properties": {
        "ican": {
          "type": "string",
          "minLength": 1,
          "maxLength": 600,
          "description": "The \"I can\" line. Printed first, in bold, at the top of the part's blue box. Starts with \"I can\"."
        },
        "read": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "Lines to read: the text, the context, the question."
        },
        "ref": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "The rule, word bank or model the student looks back to while answering. Pin the part to keep it in view."
        },
        "do": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "What to do. Printed last in the blue box, straight above the places to answer."
        },
        "doRows": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "What to do on the rows form of the page (answers in green cells): replaces \"do\" there; the plain form ignores it."
        },
        "label": {
          "type": "string",
          "minLength": 1,
          "maxLength": 600,
          "description": "The green box's label."
        },
        "items": {
          "type": "array",
          "minItems": 1,
          "maxItems": 20,
          "items": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "text"
                ],
                "properties": {
                  "text": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 600,
                    "description": "What the student sees for this item."
                  },
                  "answer": {
                    "type": "string",
                    "description": "The accepted answer; alternatives separated by \"|\". Teacher key only, never shown to students."
                  },
                  "why": {
                    "type": "string",
                    "description": "Why the answer is right. Teacher key only."
                  },
                  "wrong": {
                    "type": "array",
                    "maxItems": 6,
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "additionalProperties": false,
                          "required": [
                            "answer",
                            "why"
                          ],
                          "properties": {
                            "answer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 160
                            },
                            "why": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 240,
                              "description": "Why this answer is wrong, in plain words."
                            }
                          }
                        },
                        {
                          "type": "object",
                          "additionalProperties": false,
                          "required": [
                            "tap",
                            "why"
                          ],
                          "properties": {
                            "tap": {
                              "type": "string",
                              "pattern": "^\\S+$",
                              "description": "A word often tapped that is not the mistake."
                            },
                            "why": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 240,
                              "description": "Why this answer is wrong, in plain words."
                            }
                          }
                        }
                      ]
                    },
                    "description": "Wrong answers you expect, each with why. Needs an answer."
                  },
                  "mistake": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160,
                    "description": "The one wrong word or phrase (up to three words), exactly as printed."
                  }
                }
              }
            ]
          },
          "description": "Sentences, each with ONE wrong word or phrase (up to three words) in \"mistake\" as printed, the accepted fixes in \"answer\" (with \"|\"), and \"wrong\": a wrong fix you expect ({ \"answer\", \"why\" }) or a word often tapped that is not the mistake ({ \"tap\", \"why\" })."
        },
        "example": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "text",
            "answer"
          ],
          "properties": {
            "text": {
              "type": "string"
            },
            "answer": {
              "type": "string"
            }
          },
          "description": "A worked example: a sentence and its fix (\"is → was\"), shown finished above the items."
        },
        "sure": {
          "type": "boolean",
          "description": "The student says \"sure or not sure\" on each item before the part is checked."
        }
      }
    },
    "content.frame": {
      "title": "Sentence frame",
      "description": "Completes a started sentence: do part, then all.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "boxes"
      ],
      "properties": {
        "ican": {
          "type": "string",
          "minLength": 1,
          "maxLength": 600,
          "description": "The \"I can\" line. Printed first, in bold, at the top of the part's blue box. Starts with \"I can\"."
        },
        "read": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "Lines to read: the text, the context, the question."
        },
        "ref": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "The rule, word bank or model the student looks back to while answering. Pin the part to keep it in view."
        },
        "do": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "What to do. Printed last in the blue box, straight above the places to answer."
        },
        "doRows": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "What to do on the rows form of the page (answers in green cells): replaces \"do\" there; the plain form ignores it."
        },
        "boxes": {
          "type": "array",
          "minItems": 1,
          "maxItems": 12,
          "items": {
            "$ref": "#/$defs/box"
          },
          "description": "Green boxes, each with its frame lines (a source line to read may come first)."
        }
      }
    },
    "content.answer": {
      "title": "Answer on the line",
      "description": "Types a short answer after each prompt, on the same line.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "boxes"
      ],
      "properties": {
        "ican": {
          "type": "string",
          "minLength": 1,
          "maxLength": 600,
          "description": "The \"I can\" line. Printed first, in bold, at the top of the part's blue box. Starts with \"I can\"."
        },
        "read": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "Lines to read: the text, the context, the question."
        },
        "ref": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "The rule, word bank or model the student looks back to while answering. Pin the part to keep it in view."
        },
        "do": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "What to do. Printed last in the blue box, straight above the places to answer."
        },
        "doRows": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "What to do on the rows form of the page (answers in green cells): replaces \"do\" there; the plain form ignores it."
        },
        "boxes": {
          "type": "array",
          "minItems": 1,
          "maxItems": 12,
          "items": {
            "$ref": "#/$defs/box"
          },
          "description": "Green boxes, each with prompt lines ending with a colon."
        }
      }
    },
    "content.short": {
      "title": "Short writing",
      "description": "Writes a few sentences of their own.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "boxes"
      ],
      "properties": {
        "ican": {
          "type": "string",
          "minLength": 1,
          "maxLength": 600,
          "description": "The \"I can\" line. Printed first, in bold, at the top of the part's blue box. Starts with \"I can\"."
        },
        "read": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "Lines to read: the text, the context, the question."
        },
        "ref": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "The rule, word bank or model the student looks back to while answering. Pin the part to keep it in view."
        },
        "do": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "What to do. Printed last in the blue box, straight above the places to answer."
        },
        "doRows": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "What to do on the rows form of the page (answers in green cells): replaces \"do\" there; the plain form ignores it."
        },
        "boxes": {
          "type": "array",
          "minItems": 1,
          "maxItems": 12,
          "items": {
            "$ref": "#/$defs/box"
          },
          "description": "Green boxes to write in (lines: how many empty lines)."
        },
        "hints": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "Form hints, printed as a checklist in the blue box (\"a reporting verb\", \"no quote marks\")."
        },
        "topicLine": {
          "type": "boolean",
          "description": "Open with the green box \"My topic, my view\" (My topic is: / My view is:), filled in before any other writing (the model standard, part 4)."
        }
      }
    },
    "content.long": {
      "title": "Long writing",
      "description": "Writes a whole text in named parts (a kit's parts carry their hidden names).",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "boxes"
      ],
      "properties": {
        "ican": {
          "type": "string",
          "minLength": 1,
          "maxLength": 600,
          "description": "The \"I can\" line. Printed first, in bold, at the top of the part's blue box. Starts with \"I can\"."
        },
        "read": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "Lines to read: the text, the context, the question."
        },
        "ref": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "The rule, word bank or model the student looks back to while answering. Pin the part to keep it in view."
        },
        "do": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "What to do. Printed last in the blue box, straight above the places to answer."
        },
        "doRows": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "What to do on the rows form of the page (answers in green cells): replaces \"do\" there; the plain form ignores it."
        },
        "boxes": {
          "type": "array",
          "minItems": 1,
          "maxItems": 12,
          "items": {
            "$ref": "#/$defs/box"
          },
          "description": "Green boxes, one per part of the text, each with its lines, hidden name and help above it."
        },
        "topicLine": {
          "type": "boolean",
          "description": "Open with the green box \"My topic, my view\" (My topic is: / My view is:), filled in before any other writing (the model standard, part 4)."
        }
      }
    },
    "content.example": {
      "title": "EXAMPLE (a model on a different topic)",
      "description": "Shows a model of the text type in the purple EXAMPLE look, never the student's topic: **KEEP** words (bold) are the structure to reuse, ==SWAP== words (highlighted) are the model's topic, which the student's own topic replaces.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "topic",
        "model"
      ],
      "properties": {
        "ican": {
          "type": "string",
          "minLength": 1,
          "maxLength": 600,
          "description": "The \"I can\" line. Printed first, in bold, at the top of the part's blue box. Starts with \"I can\"."
        },
        "read": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "Lines to read: the text, the context, the question."
        },
        "ref": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "The rule, word bank or model the student looks back to while answering. Pin the part to keep it in view."
        },
        "do": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "What to do. Printed last in the blue box, straight above the places to answer."
        },
        "doRows": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "What to do on the rows form of the page (answers in green cells): replaces \"do\" there; the plain form ignores it."
        },
        "topic": {
          "type": "string",
          "minLength": 1,
          "maxLength": 600,
          "description": "The model's topic, printed as \"Example topic: ...\" (for example \"a damaged library book\")."
        },
        "model": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "The model text, line by line. Put **two stars** around KEEP words and ==two equals signs== around SWAP words."
        },
        "yourTopic": {
          "type": "string",
          "minLength": 1,
          "maxLength": 600,
          "description": "The task's own topic, printed beside the model's as \"YOUR topic: ...\" and named in the note a student sees when their writing looks like the EXAMPLE."
        }
      }
    },
    "content.bridge": {
      "title": "Bridge (from the EXAMPLE to your own text, one move at a time)",
      "description": "Goes from the model to the student's own text one move at a time: each row shows the EXAMPLE's sentence for a move (purple) above a green box that starts with the KEEP words and names where the student's OWN content comes from. The bridge is the first draft.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "exampleTopic",
        "yourTopic",
        "items"
      ],
      "properties": {
        "ican": {
          "type": "string",
          "minLength": 1,
          "maxLength": 600,
          "description": "The \"I can\" line. Printed first, in bold, at the top of the part's blue box. Starts with \"I can\"."
        },
        "read": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "Lines to read: the text, the context, the question."
        },
        "ref": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "The rule, word bank or model the student looks back to while answering. Pin the part to keep it in view."
        },
        "do": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "What to do. Printed last in the blue box, straight above the places to answer."
        },
        "doRows": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "What to do on the rows form of the page (answers in green cells): replaces \"do\" there; the plain form ignores it."
        },
        "exampleTopic": {
          "type": "string",
          "minLength": 1,
          "maxLength": 600,
          "description": "The model's topic, shown in purple as \"Example topic: ...\"."
        },
        "yourTopic": {
          "type": "string",
          "minLength": 1,
          "maxLength": 600,
          "description": "The task's own topic, shown in green as \"YOUR topic: ...\"."
        },
        "items": {
          "type": "array",
          "minItems": 1,
          "maxItems": 20,
          "items": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "text"
                ],
                "properties": {
                  "text": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 600,
                    "description": "What the student sees for this item."
                  },
                  "answer": {
                    "type": "string",
                    "description": "The accepted answer; alternatives separated by \"|\". Teacher key only, never shown to students."
                  },
                  "why": {
                    "type": "string",
                    "description": "Why the answer is right. Teacher key only."
                  },
                  "wrong": {
                    "type": "array",
                    "maxItems": 6,
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "answer",
                        "why"
                      ],
                      "properties": {
                        "answer": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 160
                        },
                        "why": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 240,
                          "description": "Why this answer is wrong, in plain words."
                        }
                      }
                    },
                    "description": "Wrong answers you expect, each with why. Needs an answer."
                  },
                  "move": {
                    "type": "string",
                    "description": "The name of this move in the finished text."
                  },
                  "starter": {
                    "type": "string",
                    "description": "The KEEP words the student's sentence starts with."
                  },
                  "source": {
                    "type": "string",
                    "description": "Where the student's own content for this row comes from in the task."
                  }
                }
              }
            ]
          },
          "description": "One row per move, in the order of the finished text: \"move\" (its name), \"text\" (the EXAMPLE's sentence, **KEEP** and ==SWAP== marked), \"starter\" (the KEEP words the student's sentence starts with) and \"source\" (where the student's OWN content comes from in this task)."
        },
        "topicLine": {
          "type": "boolean",
          "description": "Open with the green box \"My topic, my view\" (My topic is: / My view is:), filled in before any other writing (the model standard, part 4)."
        }
      }
    },
    "content.selfcheck": {
      "title": "Self-check list",
      "description": "Checks their own writing against a short list, line by line.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "items"
      ],
      "properties": {
        "ican": {
          "type": "string",
          "minLength": 1,
          "maxLength": 600,
          "description": "The \"I can\" line. Printed first, in bold, at the top of the part's blue box. Starts with \"I can\"."
        },
        "read": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "Lines to read: the text, the context, the question."
        },
        "ref": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "The rule, word bank or model the student looks back to while answering. Pin the part to keep it in view."
        },
        "do": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "What to do. Printed last in the blue box, straight above the places to answer."
        },
        "doRows": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "What to do on the rows form of the page (answers in green cells): replaces \"do\" there; the plain form ignores it."
        },
        "items": {
          "type": "array",
          "minItems": 1,
          "maxItems": 20,
          "items": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "text"
                ],
                "properties": {
                  "text": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 600,
                    "description": "What the student sees for this item."
                  },
                  "answer": {
                    "type": "string",
                    "description": "The accepted answer; alternatives separated by \"|\". Teacher key only, never shown to students."
                  },
                  "why": {
                    "type": "string",
                    "description": "Why the answer is right. Teacher key only."
                  },
                  "wrong": {
                    "type": "array",
                    "maxItems": 6,
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "answer",
                        "why"
                      ],
                      "properties": {
                        "answer": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 160
                        },
                        "why": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 240,
                          "description": "Why this answer is wrong, in plain words."
                        }
                      }
                    },
                    "description": "Wrong answers you expect, each with why. Needs an answer."
                  }
                }
              }
            ]
          },
          "description": "The checks, one per line."
        },
        "label": {
          "type": "string",
          "minLength": 1,
          "maxLength": 600,
          "description": "The green box's label. Default \"Check your own work\"."
        },
        "after": {
          "type": "string",
          "minLength": 1,
          "maxLength": 600,
          "description": "The answer label after each check. Default \"Yes or no:\"."
        }
      }
    },
    "content.exit": {
      "title": "Exit",
      "description": "Writes two lines alone at the end: retrieve and reflect.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "boxes"
      ],
      "properties": {
        "ican": {
          "type": "string",
          "minLength": 1,
          "maxLength": 600,
          "description": "The \"I can\" line. Printed first, in bold, at the top of the part's blue box. Starts with \"I can\"."
        },
        "read": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "Lines to read: the text, the context, the question."
        },
        "ref": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "The rule, word bank or model the student looks back to while answering. Pin the part to keep it in view."
        },
        "do": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "What to do. Printed last in the blue box, straight above the places to answer."
        },
        "doRows": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "What to do on the rows form of the page (answers in green cells): replaces \"do\" there; the plain form ignores it."
        },
        "boxes": {
          "type": "array",
          "minItems": 1,
          "maxItems": 12,
          "items": {
            "$ref": "#/$defs/box"
          },
          "description": "The exit box(es): usually one box with two prompts ending with a colon."
        }
      }
    },
    "content.extension": {
      "title": "Extension (optional)",
      "description": "Optional stretch work, always the last part. The task is complete without it.",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "ican": {
          "type": "string",
          "minLength": 1,
          "maxLength": 600,
          "description": "The \"I can\" line. Printed first, in bold, at the top of the part's blue box. Starts with \"I can\"."
        },
        "read": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "Lines to read: the text, the context, the question."
        },
        "ref": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "The rule, word bank or model the student looks back to while answering. Pin the part to keep it in view."
        },
        "do": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "What to do. Printed last in the blue box, straight above the places to answer."
        },
        "doRows": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "What to do on the rows form of the page (answers in green cells): replaces \"do\" there; the plain form ignores it."
        },
        "boxes": {
          "type": "array",
          "minItems": 1,
          "maxItems": 12,
          "items": {
            "$ref": "#/$defs/box"
          },
          "description": "The extension's green box(es)."
        },
        "note": {
          "type": "string",
          "minLength": 1,
          "maxLength": 600,
          "description": "The line saying it is optional. Default \"Only if you finish early. The task is complete without this part.\""
        },
        "noteBox": {
          "type": "boolean",
          "description": "Print the note in bold in its own blue box (the version-1 house layout)."
        }
      }
    },
    "content.lasttime": {
      "title": "From last time",
      "description": "A door starter built for each student: up to `count` items THAT student got wrong at the first try in earlier tasks of the class come back here, in their own form. The teacher writes no items. Always the first part.",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "ican": {
          "type": "string",
          "minLength": 1,
          "maxLength": 600,
          "description": "The \"I can\" line. Printed first, in bold, at the top of the part's blue box. Starts with \"I can\"."
        },
        "read": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "Lines to read: the text, the context, the question."
        },
        "ref": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "The rule, word bank or model the student looks back to while answering. Pin the part to keep it in view."
        },
        "do": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "What to do. Printed last in the blue box, straight above the places to answer."
        },
        "doRows": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "string",
            "maxLength": 600
          },
          "description": "What to do on the rows form of the page (answers in green cells): replaces \"do\" there; the plain form ignores it."
        },
        "count": {
          "type": "integer",
          "minimum": 1,
          "description": "How many items each student gets at most: 1 to 5. Default 3."
        },
        "label": {
          "type": "string",
          "minLength": 1,
          "maxLength": 600,
          "description": "The green box's label. Default \"Answer these again\"."
        }
      }
    }
  }
}
