Page tree
Instructions are a multi-page tree with two supported levels:- Root pages
- One level of subpages beneath a root
Rich documents and checksums
Each page body is a TipTap JSON document:attrs object produce the same reviewed checksum. Default-null list background
and code-block language attributes are also omitted to match canonical TipTap
Cloud readback.
Preview and live writes
The current job editor is immediately live: there is no separate publication step. Use preview for content-only rendering and preflight for the complete intended operation. Preflight validates the current target, checksum, placement, content, and resulting tree, then returns a short-lived signed token bound to that exact operation. Mutations require both the token andconfirmLive: true
(or --confirm-live in the CLI).
Agent tools read the canonical page back after a mutation before reporting
success. Treat only that readback and returned employer URL as confirmation;
a response from any unrelated document system is not worker-visibility
evidence.
Single-page patch and replacement operations stage a new canonical TipTap
document and atomically switch the job page to it. They do not wholesale-replace
a collaboration document that may still be open in an employer editor. The
employer and worker surfaces adopt the new canonical document identity through
their live workspace refresh.
For coordinated multi-page revisions, a local CLI bundle can represent the
desired tree. The bundle is explicitly non-authoritative. Its reviewed plan is
applied as one atomic tree change, preventing a partially assembled manual from
becoming visible between individual page writes.
Images and DOCX files
The canonical image endpoint accepts JPEG, PNG, WebP, GIF, and AVIF files up to 5 MB and returns a URL for a TipTap image node. Uploading an image does not edit a page by itself. Capability discovery returnsimage.allowedHostPatterns for
image URLs the renderer accepts. Upload any image from another host through the
canonical endpoint before placing its returned URL in a page.
The CLI exposes this flow as opentrain instructions image upload. It plans a
stable URL without writing unless you pass --confirm-live, then verifies the
confirmed upload against the reviewed plan. Confirmed uploads require the
SHA-256 returned by preview, so changed local bytes fail before upload.
The CLI can import a DOCX file into a new job page. It deterministically
converts supported headings, paragraphs, formatting, links, lists, tables, and
embedded images. Preview mode plans stable final image URLs and uploads
nothing. A confirmed import verifies those plans while uploading each embedded
image and placing it in the canonical TipTap document.
General file, audio, and video attachments are not currently part of the job
Instructions API. Do not assume support based on another OpenTrain feature.
Required scopes
instructions:readreads a job tree or page.instructions:writepreviews content, uploads images, and mutates pages.