# WriteGuard Task Factory: the wg-task/3 task format

<!-- Generated from the WriteGuard code by scripts/docs/export-task-spec.mjs. Do not edit by hand. -->

A teacher (or the teacher's own AI assistant) can write a whole task as one JSON object and paste it into the Task Factory's Import JSON box. WriteGuard checks it, shows every problem with its place in the JSON, and saves it as a hidden draft: students see nothing until the teacher has reviewed it and shown it.

Answers stay with the teacher. Every `answer`, `why` and `wrong` goes into a separate teacher key, never into the student's page. A student sees a `wrong` entry's why only after giving that wrong answer.

WriteGuard records how a task arrived (made by hand or pasted from an assistant). Do not add a field for it.

The JSON Schema of this format is `wg-task-3.schema.json`, generated from the same code. WriteGuard's own check is the final word.

## The task

| Field | Required | What it is |
|---|---|---|
| `schema` | yes | Always `"wg-task/3"`. |
| `title` | yes | The task's title, up to 120 characters. |
| `intent` | yes | `{ goal, minutes, grade?, kind? }`: what students should be able to do, and the minutes it takes (1 to 240). |
| `parts` | yes | 1 to 12 parts, in order. |
| `class_free` | no | `true` when drafted before choosing a class. |
| `instructions` | no | Shown above the student's page, up to 600 characters. |
| `ai_policy` | no | `"not_allowed"` or `"allowed_with_declaration"`. |
| `max_words` | no | `null` or a whole number up to 50000. |
| `pasting` | no | How pasting works: `"standard"` (watch pasting, the default), `"paste_disabled"` (block it), `"paste_same_page"` (only text copied on the task page), `"paste_tracked"` (record it only) or `"open"`. |
| `form` | no | `"auto"` (WriteGuard chooses), `"plain"` or `"rows"`. |

## A part

| Field | Required | What it is |
|---|---|---|
| `id` | yes | Starts with a lowercase letter; up to 32 lowercase letters, digits, - or _; unique in the task. |
| `block` | yes | The kind of part: one of the kinds below. |
| `title` | yes | The part's heading, up to 80 characters. |
| `content` | yes | The block's fields (below). |
| `minutes` | no | 0 to 120. |
| `pin` | no | `true` keeps the part in view while the student works. |
| `optional` | no | `true` or `false`. |
| `cell` | no | `"short"`, `"medium"` or `"long"`: the answer cell size on the rows form. |
| `check` | no | `true` or `false`: check the part against its key (only blocks that have a key). |

## Fields every block takes

| Field | Kind | What it is |
|---|---|---|
| `ican` | text | The "I can" line. Printed first, in bold, at the top of the part's blue box. Starts with "I can". |
| `read` | list of lines (up to 20) | Lines to read: the text, the context, the question. |
| `ref` | list of lines (up to 20) | The rule, word bank or model the student looks back to while answering. Pin the part to keep it in view. |
| `do` | list of lines (up to 20) | What to do. Printed last in the blue box, straight above the places to answer. |
| `doRows` | list of lines (up to 20) | What to do on the rows form of the page (answers in green cells): replaces "do" there; the plain form ignores it. |

## The kinds of part

### `read`: Read box

Reads a blue box. Gives input.

Nothing in this part is marked against a key.

Takes only the fields every block takes.

### `ref`: Reference (rule or word bank)

A rule, bank or ladder to keep in view while working elsewhere. Pin it.

Nothing in this part is marked against a key.

Takes only the fields every block takes.

### `model`: Model text

A model of the text type, to imitate before writing alone.

Nothing in this part is marked against a key.

| Field | Kind | Required | What it is |
|---|---|---|---|
| `title` | text | no | The model's title, printed in bold above it. |
| `model` | list of lines (up to 20) | yes | The model text, line by line. |

### `rows`: Items answered on their own line

Each item sits in the green box on the line where it is answered, its answer label after it.

This part can be checked against the teacher key.

| Field | Kind | Required | What it is |
|---|---|---|---|
| `label` | text | yes | The green box's label (what the student does with the items). |
| `after` | text | yes | The answer label printed after each item, ending with a colon: "Verb:", "D or R + verb:". |
| `items` | list of items (1 to 20) | yes | 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` | { text, answer } | no | A worked example (an item and its answer), printed last in the blue box. |
| `options` | list of short words | no | When the answer is one of a few choices ("D", "R"): the choices. |
| `second` | text | no | What else each answer gives beyond the choice ("the reporting verb"), so two choices cannot be guessed. |
| `sure` | true or false | no | The student says "sure or not sure" on each item before the part is checked. |
| `sentences` | true or false | no | Each answer is a whole sentence the student writes. |

### `blanks`: Blanks (plain)

A sentence with a gap (___); the student types the missing word after it, on the same line.

This part can be checked against the teacher key.

| Field | Kind | Required | What it is |
|---|---|---|---|
| `label` | text | yes | The green box's label. |
| `after` | text | no | The answer label after each sentence. Default "Answer:". |
| `items` | list of items (1 to 20) | yes | 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` | { text, answer } | no | A worked example, printed last in the blue box. |
| `sure` | true or false | no | The student says "sure or not sure" on each item before the part is checked. |
| `bank` | list of short words | no | The words to choose from, printed in the blue box in the order given (put them in a mixed order yourself). |

### `frames`: Sentence frames, finished in line

Completes a started sentence on the same line: do part, then all. Keyed endings are checked; own endings are the student's words.

This part can be checked against the teacher key.

| Field | Kind | Required | What it is |
|---|---|---|---|
| `label` | text | yes | The green box's label. |
| `items` | list of items (1 to 20) | yes | 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. Items may also carry: `own`. |
| `example` | { text, answer } | no | A worked example: a start and its ending, shown finished above the items. |
| `sure` | true or false | no | The student says "sure or not sure" on each item before the part is checked. |

### `fix`: Fix the mistake

Notices the gap in one's own forms: taps the one wrong word in a sentence, then types the fix.

This part can be checked against the teacher key.

| Field | Kind | Required | What it is |
|---|---|---|---|
| `label` | text | yes | The green box's label. |
| `items` | list of items (1 to 20) | yes | 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" }). Items may also carry: `mistake`. |
| `example` | { text, answer } | no | A worked example: a sentence and its fix ("is → was"), shown finished above the items. |
| `sure` | true or false | no | The student says "sure or not sure" on each item before the part is checked. |

### `frame`: Sentence frame

Completes a started sentence: do part, then all.

Nothing in this part is marked against a key.

| Field | Kind | Required | What it is |
|---|---|---|---|
| `boxes` | list of green boxes (1 to 12) | yes | Green boxes, each with its frame lines (a source line to read may come first). |

### `answer`: Answer on the line

Types a short answer after each prompt, on the same line.

Nothing in this part is marked against a key.

| Field | Kind | Required | What it is |
|---|---|---|---|
| `boxes` | list of green boxes (1 to 12) | yes | Green boxes, each with prompt lines ending with a colon. |

### `short`: Short writing

Writes a few sentences of their own.

Nothing in this part is marked against a key.

| Field | Kind | Required | What it is |
|---|---|---|---|
| `boxes` | list of green boxes (1 to 12) | yes | Green boxes to write in (lines: how many empty lines). |
| `hints` | list of lines (up to 20) | no | Form hints, printed as a checklist in the blue box ("a reporting verb", "no quote marks"). |
| `topicLine` | true or false | no | 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). |

### `long`: Long writing

Writes a whole text in named parts (a kit's parts carry their hidden names).

Nothing in this part is marked against a key.

| Field | Kind | Required | What it is |
|---|---|---|---|
| `boxes` | list of green boxes (1 to 12) | yes | Green boxes, one per part of the text, each with its lines, hidden name and help above it. |
| `topicLine` | true or false | no | 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). |

### `example`: EXAMPLE (a model on a different topic)

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.

Nothing in this part is marked against a key.

| Field | Kind | Required | What it is |
|---|---|---|---|
| `topic` | text | yes | The model's topic, printed as "Example topic: ..." (for example "a damaged library book"). |
| `model` | list of lines (up to 20) | yes | The model text, line by line. Put **two stars** around KEEP words and ==two equals signs== around SWAP words. |
| `yourTopic` | text | no | 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. |

### `bridge`: Bridge (from the EXAMPLE to your own text, one move at a time)

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.

Nothing in this part is marked against a key.

| Field | Kind | Required | What it is |
|---|---|---|---|
| `exampleTopic` | text | yes | The model's topic, shown in purple as "Example topic: ...". |
| `yourTopic` | text | yes | The task's own topic, shown in green as "YOUR topic: ...". |
| `items` | list of items (1 to 20) | yes | 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). Items may also carry: `move`, `starter`, `source`. |
| `topicLine` | true or false | no | 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). |

### `selfcheck`: Self-check list

Checks their own writing against a short list, line by line.

Nothing in this part is marked against a key.

| Field | Kind | Required | What it is |
|---|---|---|---|
| `items` | list of items (1 to 20) | yes | The checks, one per line. |
| `label` | text | no | The green box's label. Default "Check your own work". |
| `after` | text | no | The answer label after each check. Default "Yes or no:". |

### `exit`: Exit

Writes two lines alone at the end: retrieve and reflect.

Nothing in this part is marked against a key.

| Field | Kind | Required | What it is |
|---|---|---|---|
| `boxes` | list of green boxes (1 to 12) | yes | The exit box(es): usually one box with two prompts ending with a colon. |

### `extension`: Extension (optional)

Optional stretch work, always the last part. The task is complete without it.

Nothing in this part is marked against a key.

| Field | Kind | Required | What it is |
|---|---|---|---|
| `boxes` | list of green boxes (1 to 12) | no | The extension's green box(es). |
| `note` | text | no | The line saying it is optional. Default "Only if you finish early. The task is complete without this part." |
| `noteBox` | true or false | no | Print the note in bold in its own blue box (the version-1 house layout). |

### `lasttime`: From last time

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.

Nothing in this part is marked against a key.

| Field | Kind | Required | What it is |
|---|---|---|---|
| `count` | whole number, 1 or more | no | How many items each student gets at most: 1 to 5. Default 3. |
| `label` | text | no | The green box's label. Default "Answer these again". |

## Rules that keep answers private

- Put student text in `read`, `ref`, `do`, the boxes and each item's `text`.
- Put `answer` (alternatives separated by `|`), `why` and `wrong: [{ "answer", "why" }]` only inside the items of a part that is checked. On `fix`, a wrong entry may be `{ "tap", "why" }`: a word often tapped that is not the mistake.
- Pair every `**bold**` marker. Use `==swap==` only in `example` and `bridge`.
- Limits: a line up to 600 characters, up to 20 lines in a list, up to 20 items, up to 12 green boxes, up to 6 wrong answers an item.

## A worked example

```json
{
  "schema": "wg-task/3",
  "title": "Reporting Verbs Warm-Up",
  "class_free": true,
  "ai_policy": "not_allowed",
  "intent": {
    "goal": "Choose the accurate reporting verb in past summaries.",
    "minutes": 20,
    "grade": "Grade 8"
  },
  "parts": [
    {
      "id": "p1",
      "block": "read",
      "title": "Part 1 · Context",
      "content": {
        "ican": "I can compare neutral and cautious reporting verbs.",
        "read": [
          "Read each short sentence before completing Part 2."
        ]
      }
    },
    {
      "id": "p2",
      "block": "blanks",
      "title": "Part 2 · Choose the Verb",
      "content": {
        "label": "Type the best verb for each gap",
        "bank": [
          "admitted",
          "claimed",
          "confirmed"
        ],
        "items": [
          {
            "text": "1. The speaker ___ that the data was incomplete.",
            "answer": "admitted",
            "why": "Admitted concedes an unwanted flaw.",
            "wrong": [
              {
                "answer": "confirmed",
                "why": "Check whether the speaker conceded a flaw or agreed."
              }
            ]
          }
        ]
      }
    },
    {
      "id": "p3",
      "block": "exit",
      "title": "Part 3 · Exit Check",
      "content": {
        "boxes": [
          {
            "label": "One-minute reflection",
            "lines": [
              "Strongest verb today:",
              "Why it fits:"
            ]
          }
        ]
      }
    }
  ]
}
```
