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 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 human-readable id, shaped like SD-… — stable for the record’s life.
typeString String!The kind of record — always Scratchpad here.
captionString String!The record’s display name — what people see it called.
statusString String!The record’s current state — one of draft, ready, approved, realizing, realized, realization_failed or abandoned.
parentIdID ID!The collecting User; parentId ≠ rootId by construction (the org group is the root).
rootIdID ID!The id of your organization group — every record of yours carries the same one.
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 id of the record’s current edit — send it back with a change so an edit made in the meantime is refused instead of overwritten.
refCaptionsRefCaption [RefCaption!]!The captions of the records this one refers to, composed for you — 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.
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).
originConsultationIdIDWhere a consultation-born plan came from: the conversation (with originTurnSeq, the Aldric turn that drafted it) — the way back; absent on every other entrance and on rows born before it was kept.
originTurnSeqIntThe turn number of the Aldric reply that drafted a consultation-born plan (rides with originConsultationId, never alone).
originSuggestionIdIDWhere a suggestion-born plan came from: the suggestion the take minted it from — the way back; absent on every other entrance and on rows born before it was kept.

Used by