AlmondTill/G3N API

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

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

Used by