Command reference
oko work plan
Holds the supervisor's plan of the open work in phases, each item bound to an open defect or an owed task and the session that owns it, read by every session, the operator status and Oko Desktop, so the order of the work is written once instead of retold in messages.
Invocation#
oko work plan show [--json] | oko work plan set --file PLAN.json --by SESSION [--json] | oko work plan done <task-id> --by SESSION [--json]Inputs and options#
- PLAN.json is {phases: [{name, items: [{defect | task, owner}]}]}: every item names exactly one open defect of the register (a short or whole id, kept whole) or one task id (task-…), and an owner session.
- --by is proven from the machine as `oko sessions send --by` is: a session records only as itself, and operator only outside every agent session. A task item is recorded done by its owner or the plan's setter.
- The plan is kept in plan.json beside the defect register (OKO_WORK_PLAN), changed only under plan.lock; set replaces it whole.
Output and state effect#
- show, set and done print {setAt, setBy, phases: [{name, items: [{kind, id, owner, state}]}]}: a defect item's state is read from the register each time — open, `done: the defect is closed`, or `unread: <cause>` — and a task item's is open or `done by <session> at <time>`. The plain answer prints each phase and one line per item, or how to set a plan when none is set.
- Oko Desktop → Blockers → Plan shows the same reading through the native API (`blockers` domain, `work_plan`, `work_plan_set {plan, by}`, `work_plan_done {task, by}`) and records a task item done as the operator.
Refusals and safe exits#
- “oko work plan set: <file> is no plan {phases: [{name, items: [{defect | task, owner}]}]}: <error>”, a phase with no name, an item naming both or neither of defect and task, a closed defect, a task that is no task id, an item with no owner; “oko work plan done: <id> is a defect item; it is done when the defect closes, never by hand”; “oko work plan done: <by> is neither the owner (<owner>) of <id> nor the plan's setter”; “oko work plan done: the plan holds no item <id>”.
- “oko work plan --by names <by>, but this command runs in agent session <id>: a session records only as itself”, and with no session readable, “… which session runs this command cannot be read: <why>; only that session records as itself”. Anything else is “oko work plan takes show, set --file PLAN.json --by SESSION, or done <task-id> --by SESSION; got <words>” (exit 2).