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