Write segment
traceable_segment_writeReplace a whole segment with the given TrMD — the primary bulk-authoring tool. Existing rows in the segment are soft-deleted (links to them are marked broken), so use traceable_block_write/traceable_block_update for incremental edits. Author multi-column bands with [[column-start count=N]] … [[column-break]] … [[column-end]] (one rich-text cell per column), and ID grids with [[id-header types=id,text,link]] + a label row followed by [[id-row id=…]] rows (link cells take whitespace-separated TraceID names). The title_* segments are the optional title page; writing to them on a document whose title page is switched off stores the content but it will not render until the page is enabled in the app.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| segment | Yes | Which segment to replace | |
| documentId | Yes | The document UUID | |
| trmContent | Yes | Traceable Markdown (TrMD). GitHub-flavored Markdown plus [[directive]] blocks — see traceable_capabilities. Read-only annotations ([[row]]/[[document]]) are rejected. | |
| baseRevision | No | The revision (meta.revision) from the traceable_doc_read, or the previous write, this change is based on. When given, the write is refused with nothing changed if the document has changed since, so you never overwrite edits you have not seen. Each write returns the current revision. The revision tracks the document's content rows, so changes that touch no row (its name and other metadata, the reference list, Test Plan entries) return it unchanged. A revision is an opaque value: compare it whole, never read meaning into its parts (they are not a counter). |