@johngaynor/ocnus 2.0.1-next.9 → 2.0.1-next.94

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/README.md +655 -106
  2. package/cli/lib/agents.sh +85 -34
  3. package/cli/lib/asks.sh +837 -0
  4. package/cli/lib/banner.sh +249 -0
  5. package/cli/lib/brief.sh +375 -0
  6. package/cli/lib/chain.sh +501 -0
  7. package/cli/lib/close.sh +5 -3
  8. package/cli/lib/commands.sh +42 -3
  9. package/cli/lib/cost.sh +505 -0
  10. package/cli/lib/events.sh +485 -0
  11. package/cli/lib/finish.sh +30 -4
  12. package/cli/lib/github.sh +106 -26
  13. package/cli/lib/guard.sh +41 -10
  14. package/cli/lib/handoff.sh +279 -37
  15. package/cli/lib/host.sh +470 -475
  16. package/cli/lib/linear.sh +428 -34
  17. package/cli/lib/links.sh +10 -7
  18. package/cli/lib/merges.sh +129 -30
  19. package/cli/lib/progress.sh +301 -0
  20. package/cli/lib/sessions.sh +132 -0
  21. package/cli/lib/settings.sh +35 -19
  22. package/cli/lib/task.sh +170 -54
  23. package/cli/lib/tests.sh +302 -7
  24. package/cli/lib/usage.sh +204 -0
  25. package/cli/ocnus +323 -73
  26. package/herdr/README.md +1264 -268
  27. package/herdr/layouts/default.json +30 -11
  28. package/herdr/layouts/showcase.json +314 -0
  29. package/herdr/layouts/vibe.json +169 -0
  30. package/herdr/layouts/vibe.svg +41 -0
  31. package/herdr/mods/agent-settings/main.js +19 -7
  32. package/herdr/mods/card-list/main.js +658 -0
  33. package/herdr/mods/card-list/mod.json +1 -0
  34. package/herdr/mods/memory/main.js +128 -0
  35. package/herdr/mods/memory/mod.json +1 -0
  36. package/herdr/mods/memory/reading.js +88 -0
  37. package/herdr/mods/names/main.js +22 -4
  38. package/herdr/mods/needs-you/main.js +526 -0
  39. package/herdr/mods/needs-you/mod.json +1 -0
  40. package/herdr/mods/step-counts/main.js +281 -0
  41. package/herdr/mods/step-counts/mod.json +1 -0
  42. package/herdr/mods/usage/main.js +149 -0
  43. package/herdr/mods/usage/mod.json +1 -0
  44. package/package.json +1 -1
  45. package/prompts/task-new.md +1 -1
  46. package/skills/brief/SKILL.md +8 -0
  47. package/skills/sdlc-breakdown/SKILL.md +5 -5
  48. package/skills/sdlc-build/SKILL.md +7 -3
  49. package/skills/sdlc-pr/SKILL.md +2 -2
  50. package/skills/sdlc-review/SKILL.md +5 -5
package/README.md CHANGED
@@ -1,3 +1,11 @@
1
+ <p align="center">
2
+ <picture>
3
+ <source media="(prefers-color-scheme: dark)" srcset="assets/banner-dark.gif">
4
+ <source media="(prefers-color-scheme: light)" srcset="assets/banner-light.gif">
5
+ <img src="https://raw.githubusercontent.com/johngaynor/ocnus-ai/main/assets/banner-light.gif" width="822" alt="OCNUS in block letters, beside Ocnus on his rock plaiting a rope that his donkey eats as fast as he makes it">
6
+ </picture>
7
+ </p>
8
+
1
9
  # ocnus
2
10
 
3
11
  A software factory: agent skills, and the Herdr setup to run them, that take a
@@ -20,7 +28,7 @@ Six skills do the work, one for each step an agent runs, and a seventh,
20
28
  | `sdlc-build` | The build step: builds an approved card in its task, making the change the Plan describes, running the tests and committing, pushing nothing |
21
29
  | `sdlc-review` | The review step: checks the build step's work against the card's Done when, writes what it found on the card as its Review, and sends what is not met back to the build step |
22
30
  | `sdlc-pr` | The pr step: pushes a reviewed card's branch, opens its pull requests, moves the card to In Review and waits while you merge them, running no watch of its own: ocnus's watch records the merge and finishes the task. It never merges |
23
- | `brief` | Not a step: a catch-up on the session, in no more than five lines and three parts: the original task, what has happened so far, and what the agent is working on right now. In a session ocnus started for a card, it reads the card, with its parent card and Linear project, `task log` and the branch's commits. For a slice it reads the parent card too, and gives the card's place among its slices, as slice 2 of 4, and which of them have shipped; for a card with slices of its own, which of those have. Say "brief" or `/brief` in any Claude Code session for one. It records nothing, is never an answer to a question, and never stops a run |
31
+ | `brief` | Not a step: a catch-up on the session, in no more than five lines and three parts: the original task, what has happened so far, and what the agent is working on right now. In a session ocnus started for a card, it reads the card, with its parent card and Linear project, `task log` and the branch's commits. For a slice it reads the parent card too, and gives the card's place among its slices, as slice 2 of 4, and which of them have shipped; for a card with slices of its own, which of those have. Say "brief" or `/brief` in any Claude Code session for one, or run `ocnus task brief <space> <card>` for the brief of a card's agent without going to its tab. It records nothing, is never an answer to a question, and never stops a run |
24
32
 
25
33
  They live in [skills/](skills/). `ocnus install` links them into
26
34
  `~/.claude/skills`, so any Claude Code session on the machine can run one by
@@ -36,8 +44,10 @@ the Steps panel in Herdr shows the same for the card whose tab is selected.
36
44
  With no card, both list the space's cards and where each stands.
37
45
  A `needs-human` stop opens with a brief, above its block, with the question
38
46
  as what is happening now, and "brief" or `/brief` gets one at any time. A
39
- brief is in the session only: it is never recorded, so the log and the Steps
40
- panel read after it as they did before.
47
+ brief is never a hand-off: it is never recorded, so the log and the Steps
48
+ panel read after it as they did before. `ocnus task brief <space> <card>`
49
+ gives you the brief of a card's agent from outside its tab, and leaves the
50
+ agent alone (see [Tasks](#tasks)).
41
51
 
42
52
  **What a machine needs.** ocnus runs on macOS or Linux. It needs:
43
53
 
@@ -65,7 +75,8 @@ worked out. Until then the build step itself installs into each worktree what
65
75
  the tests need, and [`just`](https://just.systems) matters only once setup is
66
76
  on; see [what a repo provides](herdr/README.md#what-a-repo-provides). On
67
77
  Linux, the CPU mod in the `default` layout shows an error where its reading
68
- would be, since it reads macOS's `/usr/bin/top`.
78
+ would be, since it reads macOS's `/usr/bin/top`, and so does the Memory mod
79
+ above it, which reads macOS's `sysctl`, `vm_stat` and `ps`.
69
80
 
70
81
  ## Setting up a machine
71
82
 
@@ -80,9 +91,57 @@ and the two phase profiles in [agents/](agents/), which it links into
80
91
  `~/.claude/agents`; see [herdr/README.md](herdr/README.md) for the full
81
92
  walkthrough. `install` ends by telling you to switch Herdr to the `default`
82
93
  layout, which holds ocnus's panels: the Ocnus spaces panel, the Cards
83
- and Steps panels, the Layout dropdown and the settings button. Herdr starts on
94
+ and Steps panels, the Step counts section right above the Usage section,
95
+ which is above Memory and CPU, the Layout dropdown and the settings button.
96
+ Herdr's own Agents section is not on it. Herdr starts on
84
97
  its own layout, which has no Layout dropdown, so the first switch is
85
- `ctrl-shift-l`, pressed until `default` shows.
98
+ `ctrl-shift-l`, pressed until `default` shows. The Layout dropdown lists
99
+ `showcase` and `vibe` too. `showcase` places every mod ocnus ships, each in
100
+ a block of its own, so that you can see each one working before you choose
101
+ what to put in a layout of your own. `vibe` is three columns for steering
102
+ every agent without reading code, with no files, diffs or split terminals,
103
+ and the dropdown again, to come back to `default`. Its middle column starts
104
+ with the card list, the cards that are running and every open card of the
105
+ space that is showing, and its right column is Needs you, every question
106
+ that waits on you in the space, each answered with a click. The
107
+ `layouts/vibe.json` row in [herdr/README.md](herdr/README.md#whats-here)
108
+ says what each column holds.
109
+
110
+ In a terminal, `ocnus install` and `ocnus help`, which `ocnus` with no
111
+ command is too, open with a banner: OCNUS in block letters beside Ocnus on
112
+ his rock, plaiting a rope that his donkey eats as fast as he makes it. A
113
+ terminal at least 79 columns wide and 24 rows tall, whose `TERM` is not
114
+ `dumb`, shows the whole banner. It moves once, for about three seconds, then
115
+ stays, and the command goes on below it; Ctrl-C while it moves stops
116
+ `ocnus` before the command runs. With `NO_COLOR` set, it is still and has no
117
+ colour. Any other terminal at least 44 columns wide gets the OCNUS letters
118
+ alone, six lines, in colour unless `NO_COLOR` is set or `TERM` is `dumb`.
119
+ Piped or sent to a file, or in a terminal narrower than 44 columns, both
120
+ print what they print without it, so `ocnus help | less` reads as it
121
+ always has. No other command shows either, nor does the usage an unknown
122
+ command gets, but for the picture below.
123
+
124
+ In a terminal one row taller, at least 79 columns wide and 25 rows tall,
125
+ whose `TERM` is not `dumb`, with `NO_COLOR` unset, `ocnus install` and
126
+ `ocnus status` show their work under the banner instead. The banner moves
127
+ at the top, a bar under it fills as each part of the work finishes, and under
128
+ the bar one line says what is being done now, such as "Checking the Linear
129
+ key", which asks Linear and takes longest. install's parts are linking, the
130
+ settings file, the dev profiles and `PATH` on a clone, the launchd
131
+ agent, and refreshing Herdr once it has been opened; status's are its
132
+ checks. For install the banner moves for about three seconds, as above, and
133
+ longer only while a part is still running; for status, for as long as it
134
+ checks. Then the banner rests, and below it status prints its report, as it
135
+ does in any other terminal, and install the lines that are left for you to
136
+ see to, such as a link skipped because a file is in the way or a folder
137
+ missing from `PATH`, then its closing "Done" line. The lines that only say
138
+ what install did, such as each link it made, are not printed there. If
139
+ something fails, the picture stops where it is, and below it comes
140
+ everything the command printed, the error with it, as it would have
141
+ printed it without the picture. Ctrl-C stops `ocnus` there too. However it
142
+ ends, the cursor shows again and the prompt comes back below it all. In any
143
+ other terminal, or piped, both print what they always have: install with
144
+ the banner as above, and status its report alone.
86
145
 
87
146
  Neither `install` nor `update` needs the Herdr app open, or even opened
88
147
  before. The mods and layouts go in Herdr's folder, `~/.config/herdr-app`,
@@ -173,7 +232,8 @@ stops `task new` and `task build` before an agent starts, saying what in it is
173
232
  wrong, and `ocnus status` says so too. The file is read with `jq`. In
174
233
  Herdr, the settings button, a cog at the right end of the tab bar, shows and
175
234
  changes the same values, and below them archiving, the tests setting, the
176
- breakdown approval and billing, which follow here, each with a click; see
235
+ breakdown approval, billing and the chain, which follow here, each with a
236
+ click; see
177
237
  [herdr/README.md](herdr/README.md#the-settings-button).
178
238
 
179
239
  The same file says whether a merged card is archived in Linear, as
@@ -211,6 +271,7 @@ otherwise: with no `"tests"` in the file, or no file, and `install` and
211
271
  ocnus tests # say which is set (--json for programs)
212
272
  ocnus tests queue # have test runs go one at a time
213
273
  ocnus tests share # have them share the processors again
274
+ ocnus tests ls # list the test runs going, and how each uses the processors (--json for programs)
214
275
  ```
215
276
 
216
277
  Sharing, runs going at the same time run one case per processor between
@@ -227,6 +288,16 @@ refused, naming both, with the file left as it was; a `"tests"` that is not
227
288
  `"share"` or `"queue"` makes the file not valid settings. A test run reads
228
289
  the file with `jq` alone, and shares when it does not find `"queue"` there.
229
290
 
291
+ `ocnus tests ls` lists the runs going, in the order they started, under a
292
+ line that says which is set. Each line names its run's card, such as
293
+ `LAB-241`, when the run was started in a task's folder, and its folder's
294
+ name otherwise, then says whether it is sharing the processors, waiting its
295
+ turn, having its turn or running with `OCNUS_TEST_JOBS`, how long ago it
296
+ started, and how many processors it holds, such as `5/10`. A run that
297
+ started before a switch and still goes the way it started, sharing though the
298
+ runs now queue, or waiting though they now share, is marked `old mode`. With
299
+ no run going it says so in one line.
300
+
230
301
  The file also says whether breakdown, the last step of the write-up phase,
231
302
  asks you to approve each card, as `"approval": {"breakdown": true}` or
232
303
  `false`. It is on until you turn it off: with no `"approval"` in the file, or
@@ -269,9 +340,10 @@ ocnus billing subscription # run them on the subscription again
269
340
  the Linear key: it is never an argument, the file is left readable by you
270
341
  alone, and a linked env file, or one in a git repo, is left alone. Only a key
271
342
  that starts `sk-ant-` is taken, and it is not checked with Anthropic. On
272
- `api`, `claude` starts with an `apiKeyHelper` in `--settings=`, a command it
273
- runs to ask ocnus for the key, so the key is in no argument and in no
274
- agent's environment, and the agent starts without asking whether to use it.
343
+ `api`, `claude` starts with an `apiKeyHelper` in `--settings=`, beside its
344
+ `statusLine`, a command it runs to ask ocnus for the key, so the key is in
345
+ no argument and in no agent's environment, and the agent starts without
346
+ asking whether to use it.
275
347
  An `ANTHROPIC_API_KEY` or `ANTHROPIC_AUTH_TOKEN` you export is still kept from
276
348
  it, and is never taken for the saved key. On `api` with no key saved, `task
277
349
  new` and `task build` stop before an agent starts, and say how to save one. A
@@ -293,6 +365,68 @@ In Herdr, the settings button shows which is set and switches it with a
293
365
  click, through `billing subscription` and `billing api`; the key is saved in a
294
366
  terminal, with `billing key`.
295
367
 
368
+ The file also says whether the chain is on, as `"chain": true` or `false`:
369
+ whether ocnus's watch starts each card once the cards that block it are
370
+ done, so that you do not come back to start it. It is on until you turn it
371
+ off: with no `"chain"` in the file, or no file, and `install` and `update`
372
+ never write one.
373
+
374
+ ```sh
375
+ ocnus chain # say whether it is on (--json for programs)
376
+ ocnus chain off # have the watch start no card
377
+ ocnus chain on # have it start them again
378
+ ```
379
+
380
+ With it on, the watch starts a card that `task start` held once its blockers
381
+ are done: at the merge of the last one, or within about half an hour when
382
+ the last one was closed some other way; see [Tasks](#tasks). With it
383
+ off, the watch starts no card, and a held card waits in Todo until you start
384
+ it, with `task start` or with `ocnus task ready <space>`, which starts
385
+ every card of the space's teams that is ready. `--json` prints it as one
386
+ line, such as `{"file":"…/settings.json","chain":true}`. `on` and `off` leave
387
+ the rest of the file as it is, and anything else is refused, with the file
388
+ left as it was; a `"chain"` that is not `true` or `false` makes the file not
389
+ valid settings. In Herdr, the settings button shows it as Start blocked
390
+ cards, and switches it with a click.
391
+
392
+ On the subscription, the Usage section, above Memory and CPU in the `default`
393
+ layout's sidebar, shows how much of your Claude subscription's five-hour and
394
+ weekly usage limits is used, as a percentage and a bar each, and when each
395
+ resets.
396
+
397
+ ```sh
398
+ ocnus usage # say the same in words (--json for programs, which the section reads every 30 seconds)
399
+ ```
400
+
401
+ The reading comes from the agents ocnus starts. On either account,
402
+ `claude` starts with a `statusLine` in `--settings=` that runs
403
+ `ocnus usage record` with the agent's space, card, phase and account. It
404
+ saves the limits Claude Code hands it to `~/.config/ocnus/usage.json`, adds
405
+ what the agent's session has used to `~/.config/ocnus/cost.db` for
406
+ `task log` (see [Tasks](#tasks)), and prints nothing, so the agents' status
407
+ line is blank. An agent on `api` has no limits to hand it, so the reading is
408
+ as fresh as the last turn of an agent on the subscription. Older than ten
409
+ minutes, it says how old it is, and a limit whose reset has passed since
410
+ shows no number. With no reading, or one that cannot be read, the section
411
+ shows one line saying so. Claude Code sessions you start yourself are not
412
+ read. See [herdr/README.md](herdr/README.md#the-usage-section).
413
+
414
+ With billing on `api`, `ocnus usage` also says what the agents ocnus
415
+ started on an Anthropic API key have spent: today, from midnight, with the
416
+ card that has spent the most today, and this week, from Monday at midnight,
417
+ with how many cards that is for and how many of them have merged, both in
418
+ this machine's time:
419
+
420
+ ```
421
+ Spent on the API key today: $4.45, most of it on ABC-1 in my-space ($3.10)
422
+ Spent on the API key this week, from Monday 2026-11-30: $6.95, on 5 cards, 1 of them merged
423
+ ```
424
+
425
+ It is the cost Claude Code reports for each agent's session, added up by the
426
+ day each part of it was recorded. Work an agent did on the subscription is
427
+ in none of it, and on the subscription `usage` gives no spend. `--json`
428
+ gives it as `spend`, which is `null` on the subscription.
429
+
296
430
  ## Spaces
297
431
 
298
432
  A space groups the repos that belong together, with a `SPACE.md` saying
@@ -316,8 +450,9 @@ than making a second one.
316
450
 
317
451
  In Herdr, the `+` at the top of the Ocnus spaces panel does the same
318
452
  without a terminal: choose a repo's folder, name the space in the New space
319
- dialog, and it opens. The panel is the `ocnus-spaces` mod, on the
320
- `default` layout; Herdr's own list of spaces is its `spaces` mod.
453
+ dialog, and it opens. The panel is the `ocnus-spaces` mod, on all three of
454
+ ocnus's layouts, `default`, `showcase` and `vibe`; Herdr's own list of
455
+ spaces is its `spaces` mod.
321
456
 
322
457
  Your spaces live in `~/.config/ocnus/spaces`, outside this repo, so
323
458
  they are never published and survive updates.
@@ -338,7 +473,8 @@ A task is one piece of work in a space, usually a Linear card. Two commands
338
473
  make it, in this order: `task new`, then `task start`, which the write-up phase
339
474
  runs as soon as you approve the card: approving a card starts it. A card you
340
475
  want to hold, leave unapproved. A card that another card blocks waits by
341
- itself: `task start` holds it until every card that blocks it is done.
476
+ itself: `task start` holds it until every card that blocks it is done, and
477
+ ocnus's watch starts it then.
342
478
 
343
479
  To see which cards there are first, `task ls` lists the open cards of the
344
480
  space's Linear teams, under their statuses:
@@ -349,6 +485,13 @@ ocnus space team my-space ABC # once: the team whose cards are ABC-122
349
485
  ocnus task ls my-space
350
486
  ```
351
487
 
488
+ With `--json`, for programs, the list also says which cards are held and
489
+ which cards each of them waits on: a card is held while it is in a
490
+ not-started status, such as Todo, and a card that blocks it, or its parent,
491
+ is not done, which is when `task start` holds it. Each card names its parent
492
+ there too, with its place among the parent's sub-issues and how many of them
493
+ are done.
494
+
352
495
  It asks Linear itself, with no agent running. `ocnus status` checks the
353
496
  saved key with Linear each time it runs: it says whose the key is when it
354
497
  works, notes when no key is saved or when the key could not be checked, and
@@ -439,8 +582,59 @@ row has a line under it that says the setting approved it:
439
582
  approved: by the setting (ocnus approval --breakdown off), not the human
440
583
  ```
441
584
 
585
+ Under each row, `task log` also says what the card's agents used in the
586
+ step that row ended. At the end it says what the step the card is in has
587
+ used so far, and what the card has used in all:
588
+
589
+ ```
590
+ 2026-11-30T10:30:11Z plan done, then breakdown 12m 04s
591
+ tokens: 410k in (93% from cache), 21k out, ≈$1.42 at API prices
592
+ ...
593
+ 2026-11-30T11:52:40Z build done, then review 38m 15s
594
+ tokens: 2.1M in (95% from cache), 64k out, ≈$4.80 at API prices
595
+ so far in review: 320k in (97% from cache), 9k out, ≈$0.41 at API prices
596
+ in all: 3.2M in (94% from cache), 120k out, ≈$7.95 at API prices
597
+ ```
598
+
599
+ - **What is counted.** Each model turn of the Claude Code sessions the card's
600
+ agents ran in, the turns of the subagents they started included, each
601
+ counted once. A step's figures are those of the turns after the row
602
+ before it, up to its own row. The write-up agent's last words, after
603
+ `task start` has recorded its row, count on that row, and the build
604
+ phase's agent's words after its merge is recorded count on the merge's
605
+ row.
606
+ - **The tokens.** `in` is all that went into the model: new input, and
607
+ what was read from the prompt cache and written to it. The share in
608
+ brackets is the cache share: how much of what went in was read from the
609
+ cache. `out` is what the model wrote. `--json` gives each of the four,
610
+ input, output, cache read and cache write, and their total.
611
+ - **The cost.** It is the cost Claude Code reports for each agent's session,
612
+ which it works out at API prices. On the Claude subscription that is not
613
+ money paid, and it says so: `≈$1.42 at API prices`. On an Anthropic API
614
+ key, with billing on `api`, it is money spent: `$1.42 spent on the API
615
+ key`. A step or a card with some of each says both:
616
+ `≈$1.42 at API prices, $0.40 of it spent on the API key`. Which it is goes
617
+ by the account the agent ran on, whatever `ocnus billing` says when you
618
+ read it.
619
+ - **Not recorded.** The figures come from the agents' status line, so a step
620
+ whose agent ran before this version, or whose figures could not be
621
+ recorded, such as with no `sqlite3`, says `not recorded`, never 0. A card
622
+ with none says `tokens: not recorded for this card` once. A total that
623
+ leaves a step out says `not the whole card` and how many steps are not
624
+ recorded. A step that used nothing, such as a `start` row after which the
625
+ write-up agent said nothing more, says 0.
626
+ - **When they move.** Each time an agent's status line updates, which Claude
627
+ Code does as the agent works, so the step under way shows what it has used
628
+ so far. They are kept in `~/.config/ocnus/cost.db`, which `task log`
629
+ only reads, so they stay once the card has merged, its task is finished
630
+ and Claude Code no longer keeps the session's transcript.
631
+ - **What is not in it.** Claude Code sessions you start yourself, and, for a
632
+ card that was sliced, its slices' figures: each slice has its own.
633
+
442
634
  Leave the card out to see every card in the space that has hand-offs,
443
- newest first, with where each stands, such as waiting on you, or merged:
635
+ newest first, with where each stands, such as waiting on you, or merged,
636
+ and what it has used in all, or `tokens not recorded`. `--json` gives every
637
+ card's total in one call:
444
638
 
445
639
  ```sh
446
640
  ocnus task log my-space
@@ -454,6 +648,12 @@ and as the last line of the card's own log. It is read from herdr-core each
454
648
  time and never stored, so it shows with the Herdr app closed too. See
455
649
  [herdr/README.md](herdr/README.md#hand-offs).
456
650
 
651
+ A card that ocnus's watch asked you about, because a canceled card holds it
652
+ (see the chain, below), has no agent: its question shows in place of where it
653
+ stands, as `waiting on the human:` and the question, in the list, in the
654
+ card's own log and in the Steps and Cards panels, until the card starts or
655
+ you answer it.
656
+
457
657
  While a card's pull requests wait on you to merge them, `task log` also
458
658
  says when what should happen for them cannot. When one is closed without merging, or in conflict with
459
659
  its default branch, and the card has no agent running to wake, since its
@@ -468,6 +668,261 @@ the card's own log and in the Steps and Cards panels, which draw what
468
668
  request is closed or in conflict, the card shows as waiting on you, as
469
669
  before.
470
670
 
671
+ On the `default` layout, the Step counts section, right above Usage in the
672
+ sidebar, shows where every card of the space that is showing stands, at a
673
+ glance: the seven steps, from `define` to `pr`, each with a dot for every
674
+ card that stands on it, and how many there are. A dot is amber when its card
675
+ needs you, waiting on you or with its agent blocked on a prompt in its tab;
676
+ blue while its agent is working; green, at `pr`, once the card is ready to
677
+ merge, with its pull requests all open, none in conflict and every check on
678
+ them passed; and red when `task log` says its agent is stuck or has stopped,
679
+ or that a pull request of the card's is closed, in conflict or unwatched.
680
+ `start` has no dots: it says how many approved cards are held, their work
681
+ not yet started. The section draws what `task log <space> --json` counts,
682
+ and updates on its own. See
683
+ [herdr/README.md](herdr/README.md#the-step-counts-section).
684
+
685
+ On the `vibe` layout, the card list, at the top of the middle column, shows
686
+ the cards of the space that is showing in two views. Agents lists the cards
687
+ that are running, those whose tab ocnus opened is open with their phase
688
+ still going on, the ones that need you first: Stuck, then Permission,
689
+ Approve? and Asking, then Merge?, then Working. Each row has the card's
690
+ parent, a bar for its seven steps, its status, how long it has been so and
691
+ the tokens its agents have used. Linear lists every open card under its
692
+ parent card, with Start for a card not approved yet, Held and what it waits
693
+ on for one that is held, and the rest as `task log` has them. A click on a
694
+ running card opens its agent on the right. It draws what `task ls` and
695
+ `task log` give, and updates on its own. See
696
+ [herdr/README.md](herdr/README.md#the-card-list).
697
+
698
+ `task asks` lists every question that waits on you in a space, oldest first,
699
+ so that you, or a board, can see what each agent is asking without opening
700
+ its tab:
701
+
702
+ ```sh
703
+ ocnus task asks my-space
704
+ ```
705
+
706
+ ```
707
+ Questions waiting on you in 'my-space', oldest first
708
+ ABC-122 approval 41 asked 2026-12-04T10:41:53Z, 12m 05s ago
709
+ Approve ABC-122 as specified, planned and broken down, and start its build phase?
710
+ options: approve | change breakdown | change plan | change specification
711
+ ABC-98 permission p3f9a12c4 asked 2026-12-04T10:52:10Z, 1m 48s ago
712
+ Allow Bash to run: npm test -- orders
713
+ options: allow | refuse | allow from now on
714
+ ABC-77 merge 38 asked 2026-12-04T10:53:40Z, 18s ago, agent not running
715
+ Merge https://github.com/acme/api/pull/7. ocnus's watch sees the merge on GitHub and records it; tell me here if you want a change instead.
716
+ pull requests: https://github.com/acme/api/pull/7
717
+ options: merge | a change you want made | stop here
718
+ ```
719
+
720
+ Each line names the card, the question's kind, its id, and when it was
721
+ asked. Under it come the question's text, any summary the agent recorded,
722
+ and its options. With none waiting it says so. A question has one of four
723
+ kinds:
724
+
725
+ | Kind | What is asking | Its options |
726
+ |---|---|---|
727
+ | `approval` | sdlc-breakdown, for your approval of the card | the skill's own: `approve`, or the section to change |
728
+ | `merge` | sdlc-pr, waiting for you to merge the card's pull requests. It comes with the links of those still open, as ocnus's watch last saw them, or as the question names them before its first pass | `merge`, a change you want made, or to stop |
729
+ | `choice` | any other question an agent handed off as `needs-human`, such as which way to settle a conflict, or the one ocnus's watch asks about a card a canceled card holds (see the chain, below) | the agent's own list, or the watch's |
730
+ | `permission` | Claude Code, before it runs a tool. The text names the tool and what it would do: the command, the file or the address | `allow`, `refuse` and, where the prompt offers it, `allow from now on` |
731
+
732
+ The first three are a card's latest hand-off, while that is `needs-human`,
733
+ and the id is its number in the store. A permission prompt's id starts with
734
+ `p`. `--json` prints the same as one line, for a program:
735
+ `{"space": …, "questions": […]}`, the list empty when none waits. Each
736
+ question has its `id`, `card`, `kind`, `step` (the step its agent is at:
737
+ its hand-off's, or for a permission prompt the step its card stands on, or
738
+ `null` for a card with no hand-off), `text`, `options` (a list), `at` (when
739
+ it was asked, in UTC), `seconds` (how long ago), `summary` (or `null`),
740
+ `words` (whether it can be answered in your own words) and `running`
741
+ (whether its agent is running, to take an answer; always `true` for the
742
+ watch's question, which needs none). A merge also has `pulls`,
743
+ the links of its open pull requests, and a permission prompt `tool`, the
744
+ tool's name.
745
+
746
+ `task answer` answers one of them, named by its card and its id, with no one
747
+ typing in the agent's tab:
748
+
749
+ ```sh
750
+ ocnus task answer my-space ABC-122 41 approve
751
+ ocnus task answer my-space ABC-122 41 change plan: keep the old exporter
752
+ ocnus task answer my-space ABC-98 p3f9a12c4 allow
753
+ ocnus task answer my-space ABC-77 38 merge
754
+ ```
755
+
756
+ - **An approval, a choice or a merge** takes one of its options, or your own
757
+ words in place of one. Either goes to the card's agent as if you had typed
758
+ it in its tab, and the agent goes on as it does when you answer there: it
759
+ records your answer and carries on. Words after the first are joined, so
760
+ they need no quotes.
761
+ - **A permission prompt** takes only one of its options. `allow` and `refuse`
762
+ close the prompt as the same choice in the tab does, and a refusal does not
763
+ interrupt the agent. `allow from now on` allows it with the rules the
764
+ prompt itself suggested, and is an option only of a prompt that suggested
765
+ some. Nothing is typed into the tab for it.
766
+ - **A merge answered with `merge`** is not sent to the agent. It merges each
767
+ of the card's open pull requests on GitHub, by the method GitHub's own
768
+ merge button would use for you in that repo (a merge commit, a squash or a
769
+ rebase), and only at the commit GitHub was asked about. ocnus's watch
770
+ then records the merge and finishes the task, as it does when you merge on
771
+ GitHub. When GitHub would not merge one of them as it stands, such as one
772
+ in conflict, with a required check not passed, behind its base branch or a
773
+ draft, none is merged: the command names that pull request and why, and
774
+ exits non-zero. Nothing is forced, and no auto-merge is turned on. It needs
775
+ `gh`, signed in. In a repo whose method is a squash or a rebase, the watch
776
+ records the merge and leaves the task for you to finish, as when you merge
777
+ that way on GitHub (see `task finish`, below).
778
+ - **The watch's question** about a card it could not start has no agent to
779
+ take an answer: the card has no task yet. Your answer, one of its options
780
+ or your own words, is recorded as the card's `start` `answered`, which
781
+ ends its wait in `task log`, and nothing is sent. What it says, such as
782
+ removing a relation in Linear and starting the card, is yours to do.
783
+
784
+ An answer is for one question, the one the list showed. When that question
785
+ no longer waits, because it was answered in the tab or by an earlier answer,
786
+ or the agent has asked another since, nothing is sent or merged, and the
787
+ command says why and exits non-zero. The same goes for a question whose
788
+ agent is not running, with its tab closed or its own shell in the
789
+ foreground, which the list marks with `agent not running`: an answer goes
790
+ to a running agent, so start it again in its tab first. A merge answered
791
+ with `merge` needs no agent, and nor does the watch's question. An agent
792
+ still ending its turn is waited for, for half a minute. The command exits
793
+ zero only once the agent has taken the answer, which is once Herdr shows it
794
+ working again, once the hook of a permission prompt has taken the option,
795
+ once the pull requests have merged, or, for the watch's question, once the
796
+ answer is recorded.
797
+
798
+ Only you answer. Run from inside the session of an agent ocnus started,
799
+ `task answer` sends nothing and merges nothing, and says so; `task asks`
800
+ lists there as anywhere.
801
+
802
+ On the `vibe` layout, Needs you does both with a click. It lists what
803
+ `task asks` lists for the space that is showing, the merges after the rest,
804
+ and keeps up on its own. A permission prompt, an approval and a merge have
805
+ their options as buttons, such as Yes and No, Approve, or Merge and Ask for
806
+ changes, and a merge an Open button for each pull request, which opens it in
807
+ your browser. An agent's own options are numbered rows. A click runs
808
+ `task answer` with that option, then shows `✓ Sent`, or what ocnus said
809
+ when it refused, with the buttons back. The last row, Something else,
810
+ answers nothing: it opens the agent, for you to answer in your own words,
811
+ once the opened agent (LAB-239) is there to show it. See
812
+ [herdr/README.md](herdr/README.md#needs-you).
813
+
814
+ A permission prompt is seen through a Claude Code hook, which `task new` and
815
+ `task build` give every `claude` they start: `ocnus task hold <space>
816
+ <card>`. Claude Code runs it beside the prompt. It writes the question to
817
+ `~/.config/ocnus/asks/<space>/<card>/<id>.json`, the tool and what it
818
+ would do and nothing else of the session, and waits. `task answer` leaves
819
+ the option beside that file, and the hook prints the decision that closes
820
+ the prompt. Once the prompt is answered in the tab, the hook sees that its
821
+ terminal is no longer blocked and ends without deciding, and its file goes.
822
+ So the list shows a prompt only while its hook waits and Herdr says its
823
+ terminal is blocked. What it cannot see:
824
+
825
+ - A prompt only the person in the tab can answer: a question the agent asks
826
+ mid-step with its own options (`AskUserQuestion`), and a plan to approve
827
+ (`ExitPlanMode`). The hook leaves both alone.
828
+ - Any other prompt of Claude Code's, such as a sign-in, and the prompts of a
829
+ harness other than `claude`. `task log` still says the agent is waiting in
830
+ its tab.
831
+ - The prompts of an agent that was started before this hook was there, or
832
+ not by `task new` or `task build`, until it is started again by one.
833
+ - A prompt on a machine without `jq` or Herdr's `hc`, or of an agent whose
834
+ terminal is not one of herdr-core's.
835
+
836
+ When an agent has two prompts at once, both are listed, and each is answered
837
+ by its own id. One of them answered in the tab stays in the list until the
838
+ other is answered too, since the terminal stays blocked until then, and an
839
+ answer to it does nothing.
840
+
841
+ To catch up on a card's agent without going to its tab, ask for its brief:
842
+ the one the `brief` skill gives in the tab, with the original task, what has
843
+ happened so far and what the agent is doing now, in no more than five lines.
844
+
845
+ ```sh
846
+ ocnus task brief my-space ABC-122
847
+ ```
848
+
849
+ It leaves the agent alone. `task new` and `task build` give `claude` the ID
850
+ of the session they start it in, and record it as the card's, so `claude`
851
+ makes the brief in a copy of the card's newest session: its build agent's
852
+ once `task build` has started one, the one started last, or else its
853
+ write-up agent's. The copy has no tools and is never saved, and nothing is
854
+ sent to the agent's tab, so an agent in the middle of a turn keeps working,
855
+ and a question it is waiting on, in a hand-off or on a permission prompt,
856
+ stays unanswered. The brief says what the agent was doing or asking when the
857
+ copy was made. It is given whatever the agent is doing, with its tab open or
858
+ closed, and once the card has merged and its task is finished, for as long
859
+ as Claude Code keeps the session's transcript.
860
+
861
+ A new brief is a model call, so it runs on `haiku` at low effort, since it
862
+ reads the agent's whole conversation (`OCNUS_BRIEF_MODEL` picks another
863
+ model), and it is paid for as the agents are: on your Claude subscription, or
864
+ on the saved Anthropic key when `ocnus billing` is on `api`, where it stops
865
+ before the call with no key saved. So ocnus keeps the last brief of each
866
+ card. Asked again before another hand-off is recorded for the card, or
867
+ another agent is started on it, it gives the kept one, saying when it was
868
+ made, and makes no model call. `--refresh` makes a new one. `--json` gives
869
+ the brief as one line for programs, with when it was made and whether it is
870
+ the kept one.
871
+
872
+ A card gets no brief when no session of its agent is recorded, as when no
873
+ agent was started on it, or only before ocnus recorded sessions, when its
874
+ agent runs in another harness, and when Claude Code no longer keeps the
875
+ session's transcript. The command then says why and exits non-zero, as it
876
+ does when Claude Code could not make the brief. See
877
+ [herdr/README.md](herdr/README.md#hand-offs).
878
+
879
+ To follow how a card's steps went without reading code or scrolling a
880
+ terminal, list what its agents did:
881
+
882
+ ```sh
883
+ ocnus task events my-space ABC-122
884
+ ```
885
+
886
+ It lists each step the card has been in, as `task log` times it, with what
887
+ its agent did in it, oldest first: a line an event, with its time, its kind
888
+ and one line of text. `--step` lists one step alone, such as
889
+ `--step review`, each time the card was in it, and `--json` gives the same
890
+ as one line for programs. Each kind's line says this much:
891
+
892
+ - An **edit** names the files the agent edited and how many, from the
893
+ folder it works in. Edits made one after another, with no other event
894
+ between them, are one event, which names each file once.
895
+ - A **test run**, a command that runs `ocnus tests run`, says how many cases
896
+ passed and how many failed. When its output went to a file, or it ran in
897
+ the background, they are read from the first command after it that read
898
+ the file and printed them. While it is still going, or when its totals
899
+ cannot be read, it has no totals, never 0.
900
+ - A **commit** gives its short hash and its subject, as git printed them.
901
+ - A **command**, any other command the agent ran, says what it was for, as
902
+ the agent described it when it ran it, or the program it ran when it gave
903
+ no description.
904
+ - A **question** is what the agent asked you in a `needs-human` hand-off.
905
+ - An **answer** is what you said to the agent in its tab. ocnus's first
906
+ message to it, ocnus's watch waking it, and asking it for a brief are not
907
+ answers.
908
+
909
+ The list never gives a file's contents or a diff, whether it would come
910
+ from an edit, from a command's own text or from what a command printed: of
911
+ what a command printed, it gives only a test run's totals and a commit's
912
+ hash and subject. Nor does it list the files an agent read, its calls to
913
+ Linear or Claude Code's permission prompts.
914
+
915
+ It reads the transcripts Claude Code keeps of the sessions `task new` and
916
+ `task build` record, so while an agent works, its step lists what it has
917
+ done so far, and once the card has merged and its task is finished, the list
918
+ is still given, for as long as Claude Code keeps the transcripts. A step
919
+ says `not recorded` when its agent's session was not recorded, as for a card
920
+ from before ocnus recorded sessions or an agent in another harness, or when
921
+ Claude Code no longer keeps the transcript. It never shows such a step as
922
+ one in which the agent did nothing: a step in which it did nothing that is
923
+ listed says `nothing to list`. See
924
+ [herdr/README.md](herdr/README.md#hand-offs).
925
+
471
926
  `task start` starts the work, once you have approved the card. It takes the
472
927
  card too, makes a branch and a git worktree of it in every repo of the
473
928
  space, opens a tab for it, and starts the agent there that runs the build
@@ -489,7 +944,8 @@ start, it stops before it makes anything. See
489
944
  `task start` holds a card while a card that blocks it, or the card it was
490
945
  sliced from, is not done yet in Linear. It makes no branch, worktree or tab,
491
946
  leaves the card in Todo, names each card that holds it, with its status, and
492
- exits non-zero. Run it again once those cards are done. When Linear is not
947
+ exits non-zero. ocnus's watch starts the card once those cards are done,
948
+ unless the chain is off, as the watch's paragraphs below say. When Linear is not
493
949
  asked, as when the card's type and title are given with no key saved, it
494
950
  starts the card with a note that its blockers were not checked.
495
951
 
@@ -510,9 +966,10 @@ for it. The clean exit is what archives the session in the Claude app's list
510
966
  of sessions, with Remote Control on. Its transcript stays, so
511
967
  `claude --resume` still opens it. A live agent is never killed: when it has
512
968
  not exited 30 seconds after `/exit`, or the tab runs a program that reports
513
- no status, the tab is left open. When `task start` holds the card, the
514
- write-up session stays open until you run `task start` again, from any
515
- terminal, once the cards that hold it are done. When `task start` stops,
969
+ no status, the tab is left open. When `task start` holds the card, it puts
970
+ the write-up session away too, since all there is to know of a held card is
971
+ in Linear, its status and its blockers, and the watch opens a new build tab
972
+ once it starts the card. When `task start` stops,
516
973
  before it has made the task or without opening its tab, the write-up session
517
974
  stays open. Only the card's own write-up tab is closed: the build tab, other
518
975
  cards' write-up tabs and the terminal `task start` ran in stay open, and a
@@ -587,10 +1044,13 @@ has it build the card with the `sdlc-build` skill, check that work with the
587
1044
  `sdlc-review` skill, and then put it up as a pull request with the `sdlc-pr`
588
1045
  skill. If the agent stops, run the same command again in the tab. It runs only
589
1046
  in the card's own task folder. With `--continue <message>` after the card, it
590
- continues `claude`'s last session in the task instead, with that message, on
591
- the same profile, model and effort, which a bare `claude --continue` would
592
- not give it; ocnus's watch runs it to wake an agent that has exited (see
593
- below). Another harness refuses `--continue`. When a phase profile is not linked, `task new`
1047
+ continues the card's build session instead, with that message, on the same
1048
+ profile, model and effort, which a bare `claude --continue` would not give
1049
+ it. That is the session of the build agent `task build` started last, by the
1050
+ ID it gave `claude`, or `claude`'s last session in the task when none is
1051
+ recorded, as for an agent started before ocnus recorded sessions. ocnus's
1052
+ watch runs it to wake an agent that has exited (see below). Another harness
1053
+ refuses `--continue`. When a phase profile is not linked, `task new`
594
1054
  and `task build` stop before they start anything, and say to run
595
1055
  `ocnus update`. Both start the agent on the account `ocnus billing`
596
1056
  sets, the subscription unless it is `api`; on `api` with no Anthropic key
@@ -642,8 +1102,9 @@ team with one started status the card stays in it. When the card cannot be
642
1102
  moved, it says so, and why, and goes on.
643
1103
 
644
1104
  Then it asks you to merge them, as `needs-human` with their links, and
645
- waits, running no watch of its own. Merge each one on GitHub yourself; you
646
- don't have to tell the agent. ocnus's watch on the merges (see below)
1105
+ waits, running no watch of its own. Merge each one on GitHub yourself, or
1106
+ have `ocnus task answer <space> <card> <question> merge` merge them (see
1107
+ above); you don't have to tell the agent. ocnus's watch on the merges (see below)
647
1108
  asks GitHub every minute, however long the pull requests have been open,
648
1109
  whatever the agent is doing, so a merge is seen within a minute or so. Once
649
1110
  every one has merged, it records the merge, as your answer, so `task log`
@@ -709,8 +1170,9 @@ launchd agent that `install` and `update` write (see
709
1170
  back within a minute of herdr-core starting, whether the Herdr app, the
710
1171
  phone or an `ocnus` command started it, and a watch that died comes back
711
1172
  the same way. `--wake` only wakes it, and says nothing. It starts only
712
- while a card waits on its merge and herdr-core is running, never starts
713
- herdr-core, and never runs twice. Every minute, it asks GitHub about the
1173
+ while a card waits on its merge, or once its half-hourly look for ready
1174
+ cards is due, as below, and herdr-core is running;
1175
+ it never starts herdr-core, and never runs twice. Every minute, it asks GitHub about the
714
1176
  pull requests of every card whose latest hand-off is the pr step's question,
715
1177
  in any space and however long ago, in one call, with `gh api graphql`,
716
1178
  however many cards wait and in however many spaces and repos; past 100
@@ -740,8 +1202,9 @@ come back, never killed, then `task finish` (below) removes the task and
740
1202
  closes its tab, with the Herdr app open or closed. When `task finish` refuses,
741
1203
  as for work it would lose, or the agent does not exit, the task is left as it
742
1204
  is, and `task log` shows why, as `task not finished: …` in the merge's flags;
743
- run `task finish` yourself once you have dealt with it. It ends once no card
744
- waits, and `--once` checks once. Once a card's merge is recorded,
1205
+ run `task finish` yourself once you have dealt with it. Then it starts the
1206
+ cards the merged card was blocking that are ready, as the chain's paragraphs
1207
+ below say. It ends once no card waits, and `--once` checks once. Once a card's merge is recorded,
745
1208
  `task handoff` refuses any other block for it, saying the merge is recorded
746
1209
  already, so it is recorded once. Then the agent records nothing more and
747
1210
  runs no `task finish`.
@@ -765,13 +1228,108 @@ What it woke each card's agent for is kept in
765
1228
  `~/.config/ocnus/merges/<space>/<card>.woke` while the card waits.
766
1229
  For `task log`, each pass also leaves when it began, in
767
1230
  `~/.config/ocnus/merges/.alive`, and what it saw of each card's pull
768
- requests, in `~/.config/ocnus/merges/<space>/<card>`. For
1231
+ requests, in `~/.config/ocnus/merges/<space>/<card>`. For `task asks`,
1232
+ it keeps each pull request it saw, with its state, in
1233
+ `~/.config/ocnus/merges/<space>/<card>.pulls`. For
769
1234
  `ocnus status`, a pass whose call to GitHub failed leaves when, whether
770
1235
  `gh` needs signing in, and `gh`'s words, in
771
1236
  `~/.config/ocnus/merges/.gh`, which the next pass whose call works, or
772
- that asks GitHub nothing, removes. All of them go once no card waits.
1237
+ that asks GitHub nothing, removes. All of them go once no card waits. When
1238
+ the watch last looked for ready cards stays, in
1239
+ `~/.config/ocnus/merges/.ready`.
1240
+
1241
+ **The chain.** A card that `task start` held starts by itself once the cards
1242
+ that block it are done: the watch starts it, with `task start`, as you would.
1243
+ Once the watch has recorded a card's merge and finished its task, it asks
1244
+ Linear once for the cards that card was blocking, and, when the merge closed
1245
+ the card it was sliced from, for the cards that card was blocking too. It
1246
+ starts each one that is ready:
1247
+
1248
+ - it is in a not-started status, which is where your approval puts it: Todo
1249
+ in Lab, so a card still in Backlog is never started;
1250
+ - its team is in a space's teams (`ocnus space team`);
1251
+ - its description has a Specification and a Plan;
1252
+ - every card that blocks it, or the card it was sliced from, is done. A
1253
+ blocker that was canceled is not done, so it still holds the card.
1254
+
1255
+ A ready card that was sliced starts through its first sub-issue that is not
1256
+ started, done or canceled, as breakdown picks one. Each card starts in the
1257
+ merged card's own space when its teams hold the card's team, or else in the
1258
+ one space that lists the team, and from its repos' default branches as they
1259
+ are after the merge, since `task start` fetches first. A card under another
1260
+ parent card starts the same way: only its blockers count. There is no limit on
1261
+ how many cards start at once.
1262
+
1263
+ The watch never starts a card that is not ready. It names each one it leaves,
1264
+ with why, and each one it starts, in the merge's flags, so `task log` shows
1265
+ them under the merge:
773
1266
 
774
- To have something changed instead of merging, say what in the tab. The agent
1267
+ ```
1268
+ 2026-03-02T10:14:09Z pr done, then merged 0s
1269
+ summary: Merged on GitHub: https://github.com/acme/api/pull/7. Recorded by ocnus's watch.
1270
+ flags: ABC-123 was started; ABC-124 was not started: ABC-121, in In Review, still blocks it (a comment on it in Linear says so); ABC-125 was not started: it has no Plan
1271
+ ```
1272
+
1273
+ A card it leaves because it cannot be sure of it is named too: one whose
1274
+ team more than one other space lists, one with more relations or sub-issues
1275
+ in Linear than it reads, one that has a task on this machine already, and one
1276
+ `task start` stopped on, with what `task start` said. When Linear cannot be
1277
+ asked, the flags say that the cards were not looked for. With no Linear key
1278
+ saved, it looks for none and says nothing.
1279
+
1280
+ At a merge, it also tells you, on the card in Linear, about each card the
1281
+ merge freed in part that another card still holds:
1282
+
1283
+ - **A card that a card not done yet still blocks**, itself or the card it
1284
+ was sliced from, gets a comment that names each of them, and says the
1285
+ watch starts it once they are done. Nothing is needed from you.
1286
+ - **A card that a canceled card blocks** can never start by itself, since a
1287
+ canceled card is never done. The comment names the canceled card, and asks
1288
+ you what should happen: remove the relation in Linear, then start the card
1289
+ with `ocnus task start`, through its first open slice when it was
1290
+ sliced, or cancel it. Nothing removes a relation for you. The watch also
1291
+ records the question as the card's hand-off, `start` `needs-human`, so
1292
+ that `task log`, `task asks` and the Steps and Cards panels show the card
1293
+ waiting on you, with the question. It waits until the card starts, which
1294
+ records its start, or until you answer it with `task answer`. A later
1295
+ merge that frees it in part again comments again, and does not record the
1296
+ question twice.
1297
+
1298
+ The merge's flags say which, as for ABC-124 above, and say so when Linear
1299
+ did not make a comment, with why. The merge stays recorded either way. The
1300
+ catch-up below comments on nothing and records nothing, so that a card that
1301
+ waits is not told the same every half hour.
1302
+
1303
+ A start can be missed at the merge: `task start` stopped, Linear could not be
1304
+ asked, the chain was off, or the last blocker was closed some other way, such
1305
+ as by hand in Linear, with no merge for the watch to see. The catch-up starts
1306
+ those:
1307
+
1308
+ ```sh
1309
+ ocnus task ready my-space
1310
+ ```
1311
+
1312
+ It asks Linear for the cards of the space's teams that wait in a not-started
1313
+ status, 20 to a question, with their blockers, and starts each one that is
1314
+ ready, by the same rules, in that space. It says what became of each card that
1315
+ waits, a line each, and exits non-zero when a card that was ready could not
1316
+ be started. The watch runs it too, for every space that has a team, once its
1317
+ last look is half an hour old, with a card waiting on its merge or not: so a
1318
+ ready card starts within about half an hour whatever freed it, at the cost
1319
+ of one question to Linear for each space each half hour, while no more than
1320
+ 20 of its cards wait. The watch names no
1321
+ space of its own, so it leaves a card whose team more than one space lists:
1322
+ start that one yourself. What its look found is in its terminal,
1323
+ `hc attach ocnus-merges`, and is recorded nowhere, since a card that
1324
+ starts records its own start.
1325
+
1326
+ `ocnus chain off` turns the chain off: the watch then starts no card, at
1327
+ a merge or at its half-hourly look. `task ready` still starts the ready cards
1328
+ when you run it. See [Setting up a machine](#setting-up-a-machine) for the
1329
+ setting.
1330
+
1331
+ To have something changed instead of merging, say what in the tab, or with
1332
+ `task answer` in your own words. The agent
775
1333
  makes the change on the task's branch, with its test, runs the whole test
776
1334
  suite, then commits and pushes it, never forced, so the pull request shows
777
1335
  it, and adds it to the pull request's description. Then it asks you again,
@@ -822,7 +1380,10 @@ that together they still run one case per processor, or, after
822
1380
  `ocnus tests queue`, go one at a time, each waiting its turn (see above).
823
1381
  `OCNUS_TEST_JOBS=<n> npm test` runs n at a time however many other runs
824
1382
  are going, though it still waits its turn when they go one at a time, and
825
- `OCNUS_TEST_JOBS=1 npm test` runs the cases one at a time. Once
1383
+ `OCNUS_TEST_JOBS=1 npm test` runs the cases one at a time.
1384
+ `OCNUS_TEST_TIMES=<file> npm test` also writes a line to the file for each
1385
+ case, with its wall, user and sys times, whether it passed, its area and its
1386
+ name; [test/TIMES.md](test/TIMES.md) says where a whole run's time goes. Once
826
1387
  a pull request merges, `scripts/after-merge <name>`, run from the clone,
827
1388
  removes the Claude Code worktree under `.claude/worktrees/` that the work was
828
1389
  done in, deletes its branch and updates the clone; see
@@ -832,11 +1393,12 @@ A git worktree of the repo, such as the one `task start` makes for one of
832
1393
  ocnus's own cards, holds a copy of the CLI that is a change being built.
833
1394
  Its `./cli/ocnus` runs only the commands that read: `help`, `status`,
834
1395
  `space ls`, `space team <name>`, `profile ls`, `linear archive` (alone or
835
- with `--json`), `tests` (alone or with `--json`), `approval` (alone or with
836
- `--json`), `billing` (alone or with `--json`), `task ls`, `task log`,
837
- `host` and `host report`.
838
- Any other command stops before it does anything, says that it is a
839
- worktree's copy, and gives the command that runs it for real:
1396
+ with `--json`), `tests` and `tests ls` (each alone or with `--json`),
1397
+ `approval` (alone or with `--json`), `billing` (alone or with `--json`),
1398
+ `chain` (alone or with `--json`), `usage` (alone or with `--json`),
1399
+ `task ls`, `task log`, `task asks`, `task events`, `host` and
1400
+ `host report`. Any other command stops before it does anything, says that
1401
+ it is a worktree's copy, and gives the command that runs it for real:
840
1402
  `OCNUS_LIVE=1 ./cli/ocnus …`, for that one run. The installed `ocnus` is never stopped, whatever folder
841
1403
  it is run from, so an agent in the worktree records its hand-offs with it.
842
1404
 
@@ -848,7 +1410,8 @@ read afterwards. It is off until you turn it on, and works on macOS only.
848
1410
 
849
1411
  ```sh
850
1412
  ocnus host on # turn recording on
851
- ocnus host report [<period>] # how often CPU, memory and disk were at their limit, with how many agents working and how much slower test runs were, what was going then, what used the most, where the steps' time went, whether the network may be the cause, and what to upgrade first
1413
+ ocnus host report [<period>] # the host's numbers and the work summed up, and where the steps' time went
1414
+ ocnus host report --card <space> <card> --json # what the host recorded while each of a card's steps ran, as JSON for programs
852
1415
  ocnus host off # turn it off, and delete every reading
853
1416
  ocnus host # whether recording is on, and what it has
854
1417
  ocnus tests run <command> # run a test command, and record the test run
@@ -914,75 +1477,61 @@ waits on the model are kept for 90 days, in `~/.config/ocnus/host`, and
914
1477
  recording uses well under 1% of the CPU.
915
1478
 
916
1479
  `host report` takes the last 7 days, `<n>d` or `<n>h` back from now, a day
917
- such as `2026-11-29`, or `2026-11-01..2026-11-29`. For each of CPU, memory
918
- and disk it says how much of the recorded time it was at its limit: the CPU
919
- at least 90% busy across all cores, memory pressure at warning or critical,
920
- or under 10% of the home folder's disk free. Time with no reading, such as
921
- when no agent was open, is shown as missing, never as idle. It also says how
922
- much of the CPU recording used, watching the test runs included. Then, for
923
- each number of agents working at once, from none up, it says how long that
924
- many were working and how much of that time the CPU or memory was at its
925
- limit. It names the fewest working at which that was at least a quarter of
926
- the time, as the number from which the host was the limit, so you can tell
927
- how many agents to run at once, or says the host was not the limit at any
928
- number. Readings from before the agents working were counted are left out
929
- of these figures, and their time is counted on a line of its own. Under
930
- each number from 2 up, it says how much slower test runs were than with one
931
- agent working, as a percentage, such as `test runs 30% slower than with 1
932
- working, from 3 runs of 1 command against 3 with 1 working`. It sets only
933
- runs of the same command in the same repo against each other, and a command
934
- counts only once it has run at least 3 times with that many working and 3
935
- times with one; with none that has, it says it cannot tell yet. A test run
936
- counts at the number of agents working for most of its time. Runs cut
937
- short, runs from before the fingerprints were kept, and runs while no
938
- reading counted the agents working are left out. Then it names the 5
939
- longest stretches in the period when the CPU or memory was at its limit,
940
- longest first: when each started, how long it lasted and which of the two
941
- was at its limit, then every card going then, with its step, or its phase
942
- when it was in none, and every test run going then, each with its share of
943
- all cores over the stretch and the most memory it held. Each card also says
944
- for how much of the stretch its agent was working. With none, it says the
945
- host was never at its limit for CPU or memory. Disk is not among them: a
946
- full disk is not caused by a moment's work. Then it lists the
947
- 10 steps and the 10 phases that used the most CPU time in the period, and
948
- the 10 of each that held the most memory at once, each one card's own, such
949
- as LAB-150's build step, with how long it ran. Then come the 10 test runs
950
- that used the most CPU time, and the 10 that held the most memory at once,
951
- each named by its card, its repo and when it started, with how long it ran.
952
- Then it says where the steps' time went: the agents' time in all on the
953
- host, waiting on the model and the rest, then the same for the 10 steps open
954
- longest, each one card's own, such as LAB-152's build step, and how many
955
- steps had no split.
956
-
957
- Then it says whether the network may be the cause, as a slow wait on the
958
- model can be the network rather than the host. A wait is slow when it took
959
- over twice the median of every wait on the model recorded, up to 90 days.
960
- When waits that ended in the period were slow while CPU, memory and disk
961
- were all below their limit, in every reading over the wait, it says so:
962
- `The network may be the cause: 14 of 120 waits on the model were slow (over
963
- twice the median of 6.2s) while CPU, memory and disk were below their
964
- limit.` A slow wait with no reading over it does not count. With none, it
965
- says nothing. It cannot tell a slow network from a slow model.
966
-
967
- Last comes the verdict, one line with the numbers behind it, so that money
968
- goes on what slows the agents' work on the host. It weighs each reading by
969
- the agents' time on the host in it, the seconds their tools ran, an agent's
970
- second each, from the splits. With fewer than 10 steps with their time
971
- split in the period, or under 1 hour of the agents' time on the host, there
972
- is too little data yet, and it says how many and how long. Otherwise, of
973
- CPU, memory and disk, the one at its limit for the most of the agents' time
974
- on the host, when that is at least 10% of it, is the one to upgrade first:
975
- `upgrade memory first: it was at its limit for 23.0% of the agents' 6h 10m
976
- on the host (CPU 8.0%, disk 0.0%)`. When over half of its time at its limit
977
- was on battery, in Low Power Mode or with the thermal state at serious or
978
- critical, the verdict is that the power state was the limit, in place of an
979
- upgrade: plugging in, or letting the machine cool, costs nothing. With none
980
- at its limit for 10%, the network was the limit when at least 10% of the
981
- period's waits on the model were slow while CPU, memory and disk were below
982
- their limit, so that no host upgrade is bought that would not have helped.
983
- Otherwise no upgrade is needed.
1480
+ such as `2026-11-29`, or `2026-11-01..2026-11-29`. It says how much of the
1481
+ period was recorded, in all and on each day. Time with no reading, such as
1482
+ when no agent was open, is shown as missing, never as idle. Then it sums up
1483
+ each number the readings hold of the host, under CPU, memory, disk, network,
1484
+ and power and heat, and judges none of them: a total for an amount, such as
1485
+ the bytes read from the disk; an average and the most in one reading for a
1486
+ level, such as how busy the CPU was, or the least for the disk's free space
1487
+ and the Wi-Fi's signal; and how long each state lasted, such as each level
1488
+ of memory pressure. An average weighs each reading by its seconds in the
1489
+ period. One of the levels is how much of the CPU recording used, its
1490
+ average with watching the test runs included. A number that no reading in
1491
+ the period holds, as on a Mac without it or in readings from before it was
1492
+ recorded, is shown as not read, never as 0. Then it sums up the work in
1493
+ the period by kind, never card by card, and ranks none of it. For each
1494
+ step, in their order from `define` to `pr`, and each phase, `write-up` then
1495
+ `build`: how many cards were in it, how long their agents were open in all,
1496
+ on average and at the longest, the CPU time they used, and the most memory
1497
+ one card held at once. A tab that holds its shell alone counts for none of
1498
+ it. For each repo's test runs that started in the period, the repos in the
1499
+ order of their names: how many there were, how long those that ended took
1500
+ in all, on average and at the longest, the CPU time they used, the most
1501
+ memory one held, and how many were cut short or are still going. A figure
1502
+ that was not read, such as the CPU time in readings from before the cores
1503
+ were counted, is shown as not read, and a list with none says
1504
+ `none recorded`. Then it says where the steps' time went: the agents' time
1505
+ in all on the host, waiting on the model and the rest, then the same for
1506
+ each step, every card's in it together, and how many steps had no split.
1507
+
1508
+ `ocnus host report --card <space> <card> --json` gives a program what
1509
+ the host recorded while each of a card's steps ran, as one line of JSON, so
1510
+ that a slow step can be set beside how busy the host was then. Its `steps`
1511
+ are each time the card was in a step, oldest first, with the start and end
1512
+ `task log` gives it, the time it waited on you included. The step the card
1513
+ is in now runs to now and is marked `open`. Each step has its `points`,
1514
+ one for each reading, with the time it covers, how busy the CPU was across
1515
+ all cores, the memory used, and the memory pressure as `normal`, `warning`
1516
+ or `critical`. They are the whole host's figures, not the card's own share.
1517
+
1518
+ A step with 60 readings or fewer comes back reading by reading. One with
1519
+ more comes back as 60 points at most: its time is cut into 60 equal parts,
1520
+ and each part with a reading in it gives one point, with the average of
1521
+ its readings' CPU and memory and the worst of their memory pressure, so
1522
+ every reading counts and none is dropped. Time with no reading has no
1523
+ point, so it is never given as idle or as 0. Each step says how many
1524
+ readings it has and how many of its seconds they cover, and with recording
1525
+ off the JSON says `"recording": false` and still lists the steps, so a
1526
+ program can show "not recorded" in place of an empty chart. It can be asked
1527
+ at any point in a card's life, and after its task is finished, for as long
1528
+ as the readings are kept. A request it cannot make sense of, such as a
1529
+ period beside `--card` or a card that is not a card ID, is refused with a
1530
+ message on stderr, exit 1 and nothing on stdout, so a program never reads
1531
+ words as JSON.
1532
+
984
1533
  See [herdr/README.md](herdr/README.md#recording-the-host) for what a
985
- reading holds.
1534
+ reading holds, and for every key of a card's JSON.
986
1535
 
987
1536
  ## Releasing
988
1537