piyaz
ReferenceTools

piyaz_edit

Edit one task with an ordered list of operations, applied atomically (all or nothing).

task accepts 'JCL-42' or a UUID. Text fields (description, implementationPlan, executionRecord): op='str_replace' (oldStr must match exactly once; the error names the occurrence count), op='append' (adds a paragraph), op='set' (full replace, prefer str_replace/append for surgical edits). Collections (acceptanceCriteria, decisions, links, assignees): op='add' (text/url; assignees take value='me' or a user UUID), op='update'/'remove'/'check'/'uncheck' by the item id from piyaz_get lens='working' or fields=[...] (assignees support add/remove only). Removed items are unrecoverable. Scalars (status, priority, estimate, category, title, tags, files, prUrl): op='set' with value. Status transitions return lifecycle hints, read and act on them. ifUpdatedAt (from a prior read) makes the whole call a compare-and-swap for contended tasks. op='delete_task' must be the only op: preview defaults to true (impact summary); preview=false executes. Prefer set status='cancelled' for abandoned scope, delete only pure noise. Fails while the project is archived (reopen via piyaz_workspace status='active').

Parameters

NameTypeRequiredDescription
ifUpdatedAtstringNoOptimistic-concurrency precondition: the task's updatedAt from your last read (piyaz_get emits it). If the task changed since, the call fails with the current updatedAt, re-read, then retry. Use for contended tasks.
operationsobject[]Yes1-20 operations applied in order, atomically: one failure rolls back all. delete_task must be the only op.
taskstringYestaskRef ('JCL-42') or task UUID. Required.

Last updated

On this page