Shift work: status
shiftwork_statusRead a shift-work checkpoint to report unit counts by status, the current plan cursor, pending handoff questions, and the last history entry before resuming a job or locating its state.
Instructions
Shift-work status: where ONE checkpoint file stands — units counted by status, the unit plan.cursor points at, how many handoff.open_questions are waiting, and the last history entry. Call it first when resuming a job or answering 'where is job X'; it is the cheap read before any clock-in. It does not say WHICH units may run now — that is shiftwork_plan, the dependency batches — and it says nothing about the server itself, which is bantamkit_status. Every fact is read from the checkpoint on this call, nothing is cached, and a checkpoint that is missing, not valid JSON or failing the checkpoint schema answers {"result": "error", "reason": ""} instead of a partial summary — the same refusals shiftwork_plan and shiftwork_clock_in give for that file. With search, it also returns the lines of jobs Retention archived under the checkpoint's .shiftwork/archive/ that hold every word of the query. Opens only the checkpoint (and that archive directory when search is given); writes nothing, not even the log shiftwork_clock_in appends to.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| search | No | Also search jobs Retention archived under this checkpoint's .shiftwork/archive/: every line holding all the query's words, as {job, file, line}. | |
| checkpoint | Yes | Path to the shift-work checkpoint JSON file (by convention .shiftwork/checkpoint.json in the repo the job works on), absolute or relative to the server's working directory. The same file shiftwork_plan, shiftwork_clock_in and shiftwork_clock_out take; it must validate against assets/schemas/shiftwork-checkpoint.json. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| units | No | Unit count per status, keys among todo, in_progress, done, blocked, dropped; a status no unit holds is absent. | |
| cursor | No | The unit id plan.cursor points at. | |
| reason | No | With result `error`: one sentence saying why the call was refused. | |
| result | Yes | `status` on success; `error` when the checkpoint could not be read or failed the schema, with `reason`. | |
| search | No | Only when `search` was given: every archived line holding all its words, as {job, file, line}. | |
| last_history | No | The newest entry of the 5-entry history ring ({unit, outcome, notes?, ...}), or null when the ring is empty. | |
| open_questions | No | How many handoff.open_questions are waiting; non-zero means the next clock-in escalates. |