# Scratchpad

object type

A Scratchpad: collects intent (free text now; wizard answers/imports/suggestions/consultations mint through their own entrances later) until it holds a PLAN — ordered {operation, input} steps in wire vocabulary (≤24; creates-only v1: each operation must be a live create-class registry mutation) — and, once a human approves, REALIZES the plan into born constructs through the ordinary ops under the realizing caller's OWN session and capability (the hardened-Aldric law: the spine holds ZERO special authority; AI is just one plan author, and the spine never knows the difference). USER-parented (the collector owns the walk), group-rooted. Invalid steps are MARKED, never repaired; a marked plan can be ready for human eyes but can never be approved. Approval PINS the plan revision (the approved plan IS the executed plan); realization is idempotent + convergent-resume (the realized-id stamps are the idempotency keys) and every step's born cause narrates the scratchpad. The ops event domain (at.ops.scratchpad.\*).

## Fields

| Field | Type | Notes |
| --- | --- | --- |
| `id` | [ID](/types/#scalars) `ID!` | The record’s id — a UUID the platform assigned when the record was created; every reference to this record uses it. |
| `sysId` | [String](/types/#scalars) `String!` | The group-scoped human-facing system id (SD-…). |
| `type` | [String](/types/#scalars) `String!` | The kind of record — always `Scratchpad` here. |
| `caption` | [String](/types/#scalars) `String!` | The record’s display name — what people see it called. |
| `status` | [String](/types/#scalars) `String!` | The FSM state: draft \| ready \| approved \| realizing \| realized \| realization_failed \| abandoned. |
| `parentId` | [ID](/types/#scalars) `ID!` | The collecting User; parentId ≠ rootId by construction (the org group is the root). |
| `rootId` | [ID](/types/#scalars) `ID!` | The org-group family root. |
| `createdAt` | [String](/types/#scalars) `String!` | When the record was created, as a UTC timestamp. |
| `updatedAt` | [String](/types/#scalars) `String!` | When the record last changed, as a UTC timestamp. |
| `revisionNum` | [Int](/types/#scalars) `Int!` | How many times this record has been edited; the first save is 0. |
| `revision` | [ID](/types/#scalars) `ID!` | The OCC revision token — supply it on every mutation of this record; rotates on every write. |
| `refCaptions` | [RefCaption](/types/RefCaption/) `[RefCaption!]!` | The server-composed captions of this record's declared references (the referenced-caption rule) — one row per referenced id; see RefCaption. |
| `origin` | [String](/types/#scalars) `String!` | Where the plan came from (wizard \| freeform \| import \| suggestion \| consultation) — stamped at the entrance (freeform v1), never caller-editable. |
| `intent` | [String](/types/#scalars) | The collected free-text intent (≤8192; absent = nothing collected yet). |
| `plan` | [ScratchpadPlanStep](/types/ScratchpadPlanStep/) `[ScratchpadPlanStep!]!` | The ordered plan (seq === position, server-assigned; empty until setScratchpadPlan; marks are the author-time verdicts, verbatim). |
| `planRevision` | [Int](/types/#scalars) `Int!` | Bumps on every setScratchpadPlan — the approval pin's subject. |
| `approvedPlanRevision` | [Int](/types/#scalars) | Stamped by approve (= planRevision at approval) — realization refuses on drift (the OCC pin). |
| `inFlightSeq` | [Int](/types/#scalars) | The step currently executing (progress-honest; a resume finding it set with no realized id refuses auto-resume — the ambiguity fence). |
| `realizationFault` | [String](/types/#scalars) | The last realization fault, superseded by a successful retry (the ChangeRequest realizationFault class). |

## Used by

- [createScratchpad](/reference/scratchpad/createScratchpad/)
- [realizeScratchpad](/reference/work-and-notes/realizeScratchpad/)
- [scratchpad](/reference/scratchpad/scratchpad/)
- [setScratchpadPlan](/reference/work-and-notes/setScratchpadPlan/)
- [takeConsultationPlan](/reference/work-and-notes/takeConsultationPlan/)
- [takeSuggestion](/reference/work-and-notes/takeSuggestion/)
- [transitionScratchpad](/reference/scratchpad/transitionScratchpad/)
- [updateScratchpad](/reference/scratchpad/updateScratchpad/)
