wirk_write
Apply or propose atomic batches of item and link changes with revision checks to prevent stale writes and route review-required edits with reasons.
Instructions
Change items and links atomically. In expect put each changed or linked-from item’s rN and the parent work of a contributes_to link; missing revisions get basis_changed. Context changes apply when you may make them; requires_review means propose with a reason.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | ||
| expect | No | {"<ID>": <revision you read>}, e.g. {"5c1e7a90": 3}. | |
| format | No | ||
| reason | No | Why: required to propose and to archive; to complete wirk, the evidence (tests, link, file path or upload ID). | |
| operations | Yes | 1-32 of: {op:item.create, ref?, data:{title, body?, work?:{owner_id? (me or an ID), due_at?, criteria?:[{text}]}, context?:{level, state?, steward_id?, open?}, fields?, uploads?}, allow_duplicate_of?} · {op:item.edit, id, patch:{title?, body?, work?, fields?, reservation?, attach_uploads?}}; reservation occupied starts; occupied:G guards any edit; vacant:G releases; replace:G takes over (a reviewer, with a reason, when a person asks) · {op:link.create, data:{type, from, to}}, type related_to, contributes_to, requires, cites, relies_on or works_at (a person record to a company record), from/to may be $ref of a new item; a cites link also takes target_revision, selector, relation and quotation: the exact text, else quotation_mismatch · {op:link.remove, id} · {op:item.archive, id} · {op:item.restore, id} · {op:message.send, ref?, data:{body, title?, to?:[principal], reply_to?, uploads?}}; a board post adds link.create related_to from its $ref to the item · {op:message.acknowledge, messages:[ID]}. work makes an item work, context makes it context (level organization or initiative); fields maps a field to an option, null clears. uploads/attach_uploads: upload IDs or absolute local file paths, stored first; if one fails nothing is written. | |
| request_id | No | Optional; named in the receipt; set your own when attaching files. After an uncertain result, resend with that ID. | |
| workspace_id | No |