workspace.write
Append findings, attempts, lifecycle marks, and scratch entries to a workspace, and set or clear focus, at an exact base revision.
Instructions
Direct tool. Do not call capability.describe. Arguments are flat: send base_revision (never revision_id) and top-level findings, attempts, marks, scratch, or focus (never a batch wrapper). Every draft uses client_ref, never ref. Append at an exact base revision. Finding fields are client_ref, kind, title, body; optional links are dependency_refs and assumption_refs (never depends_on_refs). Attempt fields are client_ref, target_ref, method, outcome, summary. Margin marks append an explicit ACTIVE, CLOSED, RETRACTED, SUPERSEDED, or ARCHIVED state; only SUPERSEDED carries superseded_by_ref. References may use a client_ref from the same batch. PROBLEM is reserved for workspace.open. A RETRACTED or SUPERSEDED card must receive an ACTIVE mark before CLOSED or ARCHIVED. Set focus with active_ref/pinned_refs, clear it with clear=true, or omit it; focus references finding cards, never attempts, marks, or scratch. Never send verification/assertion/stale fields: all workspace assertions remain AGENT_RECORDED and UNVERIFIED. Canonical batch example: findings=[{"client_ref":"C1","kind":"CLAIM","title":"...","body":"..."}], attempts=[{"client_ref":"T1","target_ref":"C1","method":"...","outcome":"COMPLETED","summary":"..."}], focus={"active_ref":"C1","pinned_refs":["C1"]}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| focus | No | Optional explicit focus update: set active_ref/pinned_refs, use clear=true to clear, or omit to preserve current focus. | |
| marks | No | Optional append-only lifecycle marks. CLOSED is workflow state, not proof; RETRACTED and SUPERSEDED deterministically make explicit dependents stale. | |
| scratch | No | Optional unverified scratch entries to append. | |
| attempts | No | Optional unverified operational attempts to append. | |
| findings | No | Optional typed, unverified cards to append. | |
| branch_id | Yes | branch:// handle returned by workspace.open | |
| workspace_id | Yes | workspace:// handle returned by workspace.open | |
| base_revision | Yes | Exact current revision:// head returned by workspace.open, workspace.write, or workspace.query. | |
| idempotency_key | Yes | Caller-chosen key unique to this exact write payload; reuse only to retry the identical request. |