@johngaynor/ocnus 2.0.1-next.24 → 2.0.1-next.69
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 +459 -42
- package/cli/lib/agents.sh +32 -16
- package/cli/lib/asks.sh +762 -0
- package/cli/lib/banner.sh +181 -0
- package/cli/lib/brief.sh +375 -0
- package/cli/lib/chain.sh +363 -0
- package/cli/lib/close.sh +5 -3
- package/cli/lib/cost.sh +500 -0
- package/cli/lib/github.sh +106 -26
- package/cli/lib/guard.sh +38 -11
- package/cli/lib/handoff.sh +196 -31
- package/cli/lib/host.sh +172 -1
- package/cli/lib/linear.sh +198 -1
- package/cli/lib/links.sh +6 -3
- package/cli/lib/merges.sh +126 -27
- package/cli/lib/sessions.sh +132 -0
- package/cli/lib/settings.sh +31 -15
- package/cli/lib/task.sh +159 -64
- package/cli/lib/tests.sh +300 -4
- package/cli/lib/usage.sh +70 -25
- package/cli/ocnus +234 -37
- package/herdr/README.md +756 -79
- package/herdr/layouts/default.json +10 -0
- package/herdr/layouts/showcase.json +291 -0
- package/herdr/layouts/vibe.json +162 -0
- package/herdr/layouts/vibe.svg +41 -0
- package/herdr/mods/agent-settings/main.js +19 -7
- package/herdr/mods/names/main.js +22 -4
- package/herdr/mods/step-counts/main.js +281 -0
- package/herdr/mods/step-counts/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/README.md
CHANGED
|
@@ -28,7 +28,7 @@ Six skills do the work, one for each step an agent runs, and a seventh,
|
|
|
28
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 |
|
|
29
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 |
|
|
30
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 |
|
|
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. 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 |
|
|
32
32
|
|
|
33
33
|
They live in [skills/](skills/). `ocnus install` links them into
|
|
34
34
|
`~/.claude/skills`, so any Claude Code session on the machine can run one by
|
|
@@ -44,8 +44,10 @@ the Steps panel in Herdr shows the same for the card whose tab is selected.
|
|
|
44
44
|
With no card, both list the space's cards and where each stands.
|
|
45
45
|
A `needs-human` stop opens with a brief, above its block, with the question
|
|
46
46
|
as what is happening now, and "brief" or `/brief` gets one at any time. A
|
|
47
|
-
brief is
|
|
48
|
-
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)).
|
|
49
51
|
|
|
50
52
|
**What a machine needs.** ocnus runs on macOS or Linux. It needs:
|
|
51
53
|
|
|
@@ -89,10 +91,32 @@ and the two phase profiles in [agents/](agents/), which it links into
|
|
|
89
91
|
`~/.claude/agents`; see [herdr/README.md](herdr/README.md) for the full
|
|
90
92
|
walkthrough. `install` ends by telling you to switch Herdr to the `default`
|
|
91
93
|
layout, which holds ocnus's panels: the Ocnus spaces panel, the Cards
|
|
92
|
-
and Steps panels, the
|
|
93
|
-
|
|
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
|
|
94
97
|
its own layout, which has no Layout dropdown, so the first switch is
|
|
95
|
-
`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`. The `layouts/vibe.json`
|
|
104
|
+
row in [herdr/README.md](herdr/README.md#whats-here) says what each column
|
|
105
|
+
holds.
|
|
106
|
+
|
|
107
|
+
In a terminal, `ocnus install` and `ocnus help`, which `ocnus` with no
|
|
108
|
+
command is too, open with a banner: OCNUS in block letters beside Ocnus on
|
|
109
|
+
his rock, plaiting a rope that his donkey eats as fast as he makes it. A
|
|
110
|
+
terminal at least 79 columns wide and 24 rows tall, whose `TERM` is not
|
|
111
|
+
`dumb`, shows the whole banner. It moves once, for about three seconds, then
|
|
112
|
+
stays, and the command goes on below it; Ctrl-C while it moves stops
|
|
113
|
+
`ocnus` before the command runs. With `NO_COLOR` set, it is still and has no
|
|
114
|
+
colour. Any other terminal at least 44 columns wide gets the OCNUS letters
|
|
115
|
+
alone, six lines, in colour unless `NO_COLOR` is set or `TERM` is `dumb`.
|
|
116
|
+
Piped or sent to a file, or in a terminal narrower than 44 columns, both
|
|
117
|
+
print what they print without it, so `ocnus help | less` reads as it
|
|
118
|
+
always has. No other command shows either, nor does the usage an unknown
|
|
119
|
+
command gets.
|
|
96
120
|
|
|
97
121
|
Neither `install` nor `update` needs the Herdr app open, or even opened
|
|
98
122
|
before. The mods and layouts go in Herdr's folder, `~/.config/herdr-app`,
|
|
@@ -183,7 +207,8 @@ stops `task new` and `task build` before an agent starts, saying what in it is
|
|
|
183
207
|
wrong, and `ocnus status` says so too. The file is read with `jq`. In
|
|
184
208
|
Herdr, the settings button, a cog at the right end of the tab bar, shows and
|
|
185
209
|
changes the same values, and below them archiving, the tests setting, the
|
|
186
|
-
breakdown approval and
|
|
210
|
+
breakdown approval, billing and the chain, which follow here, each with a
|
|
211
|
+
click; see
|
|
187
212
|
[herdr/README.md](herdr/README.md#the-settings-button).
|
|
188
213
|
|
|
189
214
|
The same file says whether a merged card is archived in Linear, as
|
|
@@ -221,6 +246,7 @@ otherwise: with no `"tests"` in the file, or no file, and `install` and
|
|
|
221
246
|
ocnus tests # say which is set (--json for programs)
|
|
222
247
|
ocnus tests queue # have test runs go one at a time
|
|
223
248
|
ocnus tests share # have them share the processors again
|
|
249
|
+
ocnus tests ls # list the test runs going, and how each uses the processors (--json for programs)
|
|
224
250
|
```
|
|
225
251
|
|
|
226
252
|
Sharing, runs going at the same time run one case per processor between
|
|
@@ -237,6 +263,16 @@ refused, naming both, with the file left as it was; a `"tests"` that is not
|
|
|
237
263
|
`"share"` or `"queue"` makes the file not valid settings. A test run reads
|
|
238
264
|
the file with `jq` alone, and shares when it does not find `"queue"` there.
|
|
239
265
|
|
|
266
|
+
`ocnus tests ls` lists the runs going, in the order they started, under a
|
|
267
|
+
line that says which is set. Each line names its run's card, such as
|
|
268
|
+
`LAB-241`, when the run was started in a task's folder, and its folder's
|
|
269
|
+
name otherwise, then says whether it is sharing the processors, waiting its
|
|
270
|
+
turn, having its turn or running with `OCNUS_TEST_JOBS`, how long ago it
|
|
271
|
+
started, and how many processors it holds, such as `5/10`. A run that
|
|
272
|
+
started before a switch and still goes the way it started, sharing though the
|
|
273
|
+
runs now queue, or waiting though they now share, is marked `old mode`. With
|
|
274
|
+
no run going it says so in one line.
|
|
275
|
+
|
|
240
276
|
The file also says whether breakdown, the last step of the write-up phase,
|
|
241
277
|
asks you to approve each card, as `"approval": {"breakdown": true}` or
|
|
242
278
|
`false`. It is on until you turn it off: with no `"approval"` in the file, or
|
|
@@ -279,9 +315,10 @@ ocnus billing subscription # run them on the subscription again
|
|
|
279
315
|
the Linear key: it is never an argument, the file is left readable by you
|
|
280
316
|
alone, and a linked env file, or one in a git repo, is left alone. Only a key
|
|
281
317
|
that starts `sk-ant-` is taken, and it is not checked with Anthropic. On
|
|
282
|
-
`api`, `claude` starts with an `apiKeyHelper` in `--settings=`,
|
|
283
|
-
runs to ask ocnus for the key, so the key is in
|
|
284
|
-
agent's environment, and the agent starts without
|
|
318
|
+
`api`, `claude` starts with an `apiKeyHelper` in `--settings=`, beside its
|
|
319
|
+
`statusLine`, a command it runs to ask ocnus for the key, so the key is in
|
|
320
|
+
no argument and in no agent's environment, and the agent starts without
|
|
321
|
+
asking whether to use it.
|
|
285
322
|
An `ANTHROPIC_API_KEY` or `ANTHROPIC_AUTH_TOKEN` you export is still kept from
|
|
286
323
|
it, and is never taken for the saved key. On `api` with no key saved, `task
|
|
287
324
|
new` and `task build` stop before an agent starts, and say how to save one. A
|
|
@@ -303,6 +340,30 @@ In Herdr, the settings button shows which is set and switches it with a
|
|
|
303
340
|
click, through `billing subscription` and `billing api`; the key is saved in a
|
|
304
341
|
terminal, with `billing key`.
|
|
305
342
|
|
|
343
|
+
The file also says whether the chain is on, as `"chain": true` or `false`:
|
|
344
|
+
whether ocnus's watch starts each card once the cards that block it are
|
|
345
|
+
done, so that you do not come back to start it. It is on until you turn it
|
|
346
|
+
off: with no `"chain"` in the file, or no file, and `install` and `update`
|
|
347
|
+
never write one.
|
|
348
|
+
|
|
349
|
+
```sh
|
|
350
|
+
ocnus chain # say whether it is on (--json for programs)
|
|
351
|
+
ocnus chain off # have the watch start no card
|
|
352
|
+
ocnus chain on # have it start them again
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
With it on, the watch starts a card that `task start` held once its blockers
|
|
356
|
+
are done: at the merge of the last one, or within about half an hour when
|
|
357
|
+
the last one was closed some other way; see [Tasks](#tasks). With it
|
|
358
|
+
off, the watch starts no card, and a held card waits in Todo until you start
|
|
359
|
+
it, with `task start` or with `ocnus task ready <space>`, which starts
|
|
360
|
+
every card of the space's teams that is ready. `--json` prints it as one
|
|
361
|
+
line, such as `{"file":"…/settings.json","chain":true}`. `on` and `off` leave
|
|
362
|
+
the rest of the file as it is, and anything else is refused, with the file
|
|
363
|
+
left as it was; a `"chain"` that is not `true` or `false` makes the file not
|
|
364
|
+
valid settings. In Herdr, the settings button shows it as Start blocked
|
|
365
|
+
cards, and switches it with a click.
|
|
366
|
+
|
|
306
367
|
On the subscription, the Usage section, above Memory and CPU in the `default`
|
|
307
368
|
layout's sidebar, shows how much of your Claude subscription's five-hour and
|
|
308
369
|
weekly usage limits is used, as a percentage and a bar each, and when each
|
|
@@ -312,16 +373,34 @@ resets.
|
|
|
312
373
|
ocnus usage # say the same in words (--json for programs, which the section reads every 30 seconds)
|
|
313
374
|
```
|
|
314
375
|
|
|
315
|
-
The reading comes from the agents ocnus starts
|
|
376
|
+
The reading comes from the agents ocnus starts. On either account,
|
|
316
377
|
`claude` starts with a `statusLine` in `--settings=` that runs
|
|
317
|
-
`ocnus usage record
|
|
318
|
-
`~/.config/ocnus/usage.json
|
|
319
|
-
|
|
378
|
+
`ocnus usage record` with the agent's space, card, phase and account. It
|
|
379
|
+
saves the limits Claude Code hands it to `~/.config/ocnus/usage.json`, adds
|
|
380
|
+
what the agent's session has used to `~/.config/ocnus/cost.db` for
|
|
381
|
+
`task log` (see [Tasks](#tasks)), and prints nothing, so the agents' status
|
|
382
|
+
line is blank. An agent on `api` has no limits to hand it, so the reading is
|
|
383
|
+
as fresh as the last turn of an agent on the subscription. Older than ten
|
|
320
384
|
minutes, it says how old it is, and a limit whose reset has passed since
|
|
321
385
|
shows no number. With no reading, or one that cannot be read, the section
|
|
322
386
|
shows one line saying so. Claude Code sessions you start yourself are not
|
|
323
|
-
read
|
|
324
|
-
|
|
387
|
+
read. See [herdr/README.md](herdr/README.md#the-usage-section).
|
|
388
|
+
|
|
389
|
+
With billing on `api`, `ocnus usage` also says what the agents ocnus
|
|
390
|
+
started on an Anthropic API key have spent: today, from midnight, with the
|
|
391
|
+
card that has spent the most today, and this week, from Monday at midnight,
|
|
392
|
+
with how many cards that is for and how many of them have merged, both in
|
|
393
|
+
this machine's time:
|
|
394
|
+
|
|
395
|
+
```
|
|
396
|
+
Spent on the API key today: $4.45, most of it on ABC-1 in my-space ($3.10)
|
|
397
|
+
Spent on the API key this week, from Monday 2026-11-30: $6.95, on 5 cards, 1 of them merged
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
It is the cost Claude Code reports for each agent's session, added up by the
|
|
401
|
+
day each part of it was recorded. Work an agent did on the subscription is
|
|
402
|
+
in none of it, and on the subscription `usage` gives no spend. `--json`
|
|
403
|
+
gives it as `spend`, which is `null` on the subscription.
|
|
325
404
|
|
|
326
405
|
## Spaces
|
|
327
406
|
|
|
@@ -346,8 +425,9 @@ than making a second one.
|
|
|
346
425
|
|
|
347
426
|
In Herdr, the `+` at the top of the Ocnus spaces panel does the same
|
|
348
427
|
without a terminal: choose a repo's folder, name the space in the New space
|
|
349
|
-
dialog, and it opens. The panel is the `ocnus-spaces` mod, on
|
|
350
|
-
`default`
|
|
428
|
+
dialog, and it opens. The panel is the `ocnus-spaces` mod, on all three of
|
|
429
|
+
ocnus's layouts, `default`, `showcase` and `vibe`; Herdr's own list of
|
|
430
|
+
spaces is its `spaces` mod.
|
|
351
431
|
|
|
352
432
|
Your spaces live in `~/.config/ocnus/spaces`, outside this repo, so
|
|
353
433
|
they are never published and survive updates.
|
|
@@ -368,7 +448,8 @@ A task is one piece of work in a space, usually a Linear card. Two commands
|
|
|
368
448
|
make it, in this order: `task new`, then `task start`, which the write-up phase
|
|
369
449
|
runs as soon as you approve the card: approving a card starts it. A card you
|
|
370
450
|
want to hold, leave unapproved. A card that another card blocks waits by
|
|
371
|
-
itself: `task start` holds it until every card that blocks it is done
|
|
451
|
+
itself: `task start` holds it until every card that blocks it is done, and
|
|
452
|
+
ocnus's watch starts it then.
|
|
372
453
|
|
|
373
454
|
To see which cards there are first, `task ls` lists the open cards of the
|
|
374
455
|
space's Linear teams, under their statuses:
|
|
@@ -476,8 +557,59 @@ row has a line under it that says the setting approved it:
|
|
|
476
557
|
approved: by the setting (ocnus approval --breakdown off), not the human
|
|
477
558
|
```
|
|
478
559
|
|
|
560
|
+
Under each row, `task log` also says what the card's agents used in the
|
|
561
|
+
step that row ended. At the end it says what the step the card is in has
|
|
562
|
+
used so far, and what the card has used in all:
|
|
563
|
+
|
|
564
|
+
```
|
|
565
|
+
2026-11-30T10:30:11Z plan done, then breakdown 12m 04s
|
|
566
|
+
tokens: 410k in (93% from cache), 21k out, ≈$1.42 at API prices
|
|
567
|
+
...
|
|
568
|
+
2026-11-30T11:52:40Z build done, then review 38m 15s
|
|
569
|
+
tokens: 2.1M in (95% from cache), 64k out, ≈$4.80 at API prices
|
|
570
|
+
so far in review: 320k in (97% from cache), 9k out, ≈$0.41 at API prices
|
|
571
|
+
in all: 3.2M in (94% from cache), 120k out, ≈$7.95 at API prices
|
|
572
|
+
```
|
|
573
|
+
|
|
574
|
+
- **What is counted.** Each model turn of the Claude Code sessions the card's
|
|
575
|
+
agents ran in, the turns of the subagents they started included, each
|
|
576
|
+
counted once. A step's figures are those of the turns after the row
|
|
577
|
+
before it, up to its own row. The write-up agent's last words, after
|
|
578
|
+
`task start` has recorded its row, count on that row, and the build
|
|
579
|
+
phase's agent's words after its merge is recorded count on the merge's
|
|
580
|
+
row.
|
|
581
|
+
- **The tokens.** `in` is all that went into the model: new input, and
|
|
582
|
+
what was read from the prompt cache and written to it. The share in
|
|
583
|
+
brackets is the cache share: how much of what went in was read from the
|
|
584
|
+
cache. `out` is what the model wrote. `--json` gives each of the four,
|
|
585
|
+
input, output, cache read and cache write, and their total.
|
|
586
|
+
- **The cost.** It is the cost Claude Code reports for each agent's session,
|
|
587
|
+
which it works out at API prices. On the Claude subscription that is not
|
|
588
|
+
money paid, and it says so: `≈$1.42 at API prices`. On an Anthropic API
|
|
589
|
+
key, with billing on `api`, it is money spent: `$1.42 spent on the API
|
|
590
|
+
key`. A step or a card with some of each says both:
|
|
591
|
+
`≈$1.42 at API prices, $0.40 of it spent on the API key`. Which it is goes
|
|
592
|
+
by the account the agent ran on, whatever `ocnus billing` says when you
|
|
593
|
+
read it.
|
|
594
|
+
- **Not recorded.** The figures come from the agents' status line, so a step
|
|
595
|
+
whose agent ran before this version, or whose figures could not be
|
|
596
|
+
recorded, such as with no `sqlite3`, says `not recorded`, never 0. A card
|
|
597
|
+
with none says `tokens: not recorded for this card` once. A total that
|
|
598
|
+
leaves a step out says `not the whole card` and how many steps are not
|
|
599
|
+
recorded. A step that used nothing, such as a `start` row after which the
|
|
600
|
+
write-up agent said nothing more, says 0.
|
|
601
|
+
- **When they move.** Each time an agent's status line updates, which Claude
|
|
602
|
+
Code does as the agent works, so the step under way shows what it has used
|
|
603
|
+
so far. They are kept in `~/.config/ocnus/cost.db`, which `task log`
|
|
604
|
+
only reads, so they stay once the card has merged, its task is finished
|
|
605
|
+
and Claude Code no longer keeps the session's transcript.
|
|
606
|
+
- **What is not in it.** Claude Code sessions you start yourself, and, for a
|
|
607
|
+
card that was sliced, its slices' figures: each slice has its own.
|
|
608
|
+
|
|
479
609
|
Leave the card out to see every card in the space that has hand-offs,
|
|
480
|
-
newest first, with where each stands, such as waiting on you, or merged
|
|
610
|
+
newest first, with where each stands, such as waiting on you, or merged,
|
|
611
|
+
and what it has used in all, or `tokens not recorded`. `--json` gives every
|
|
612
|
+
card's total in one call:
|
|
481
613
|
|
|
482
614
|
```sh
|
|
483
615
|
ocnus task log my-space
|
|
@@ -505,6 +637,180 @@ the card's own log and in the Steps and Cards panels, which draw what
|
|
|
505
637
|
request is closed or in conflict, the card shows as waiting on you, as
|
|
506
638
|
before.
|
|
507
639
|
|
|
640
|
+
On the `default` layout, the Step counts section, right above Usage in the
|
|
641
|
+
sidebar, shows where every card of the space that is showing stands, at a
|
|
642
|
+
glance: the seven steps, from `define` to `pr`, each with a dot for every
|
|
643
|
+
card that stands on it, and how many there are. A dot is amber when its card
|
|
644
|
+
needs you, waiting on you or with its agent blocked on a prompt in its tab;
|
|
645
|
+
blue while its agent is working; green, at `pr`, once the card is ready to
|
|
646
|
+
merge, with its pull requests all open, none in conflict and every check on
|
|
647
|
+
them passed; and red when `task log` says its agent is stuck or has stopped,
|
|
648
|
+
or that a pull request of the card's is closed, in conflict or unwatched.
|
|
649
|
+
`start` has no dots: it says how many approved cards are held, their work
|
|
650
|
+
not yet started. The section draws what `task log <space> --json` counts,
|
|
651
|
+
and updates on its own. See
|
|
652
|
+
[herdr/README.md](herdr/README.md#the-step-counts-section).
|
|
653
|
+
|
|
654
|
+
`task asks` lists every question that waits on you in a space, oldest first,
|
|
655
|
+
so that you, or a board, can see what each agent is asking without opening
|
|
656
|
+
its tab:
|
|
657
|
+
|
|
658
|
+
```sh
|
|
659
|
+
ocnus task asks my-space
|
|
660
|
+
```
|
|
661
|
+
|
|
662
|
+
```
|
|
663
|
+
Questions waiting on you in 'my-space', oldest first
|
|
664
|
+
ABC-122 approval 41 asked 2026-12-04T10:41:53Z, 12m 05s ago
|
|
665
|
+
Approve ABC-122 as specified, planned and broken down, and start its build phase?
|
|
666
|
+
options: approve | change breakdown | change plan | change specification
|
|
667
|
+
ABC-98 permission p3f9a12c4 asked 2026-12-04T10:52:10Z, 1m 48s ago
|
|
668
|
+
Allow Bash to run: npm test -- orders
|
|
669
|
+
options: allow | refuse | allow from now on
|
|
670
|
+
ABC-77 merge 38 asked 2026-12-04T10:53:40Z, 18s ago, agent not running
|
|
671
|
+
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.
|
|
672
|
+
pull requests: https://github.com/acme/api/pull/7
|
|
673
|
+
options: merge | a change you want made | stop here
|
|
674
|
+
```
|
|
675
|
+
|
|
676
|
+
Each line names the card, the question's kind, its id, and when it was
|
|
677
|
+
asked. Under it come the question's text, any summary the agent recorded,
|
|
678
|
+
and its options. With none waiting it says so. A question has one of four
|
|
679
|
+
kinds:
|
|
680
|
+
|
|
681
|
+
| Kind | What is asking | Its options |
|
|
682
|
+
|---|---|---|
|
|
683
|
+
| `approval` | sdlc-breakdown, for your approval of the card | the skill's own: `approve`, or the section to change |
|
|
684
|
+
| `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 |
|
|
685
|
+
| `choice` | any other question an agent handed off as `needs-human`, such as which way to settle a conflict | the agent's own list |
|
|
686
|
+
| `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` |
|
|
687
|
+
|
|
688
|
+
The first three are a card's latest hand-off, while that is `needs-human`,
|
|
689
|
+
and the id is its number in the store. A permission prompt's id starts with
|
|
690
|
+
`p`. `--json` prints the same as one line, for a program:
|
|
691
|
+
`{"space": …, "questions": […]}`, the list empty when none waits. Each
|
|
692
|
+
question has its `id`, `card`, `kind`, `text`, `options` (a list), `at` (when
|
|
693
|
+
it was asked, in UTC), `seconds` (how long ago), `summary` (or `null`),
|
|
694
|
+
`words` (whether it can be answered in your own words) and `running`
|
|
695
|
+
(whether its agent is running, to take an answer). A merge also has `pulls`,
|
|
696
|
+
the links of its open pull requests, and a permission prompt `tool`, the
|
|
697
|
+
tool's name.
|
|
698
|
+
|
|
699
|
+
`task answer` answers one of them, named by its card and its id, with no one
|
|
700
|
+
typing in the agent's tab:
|
|
701
|
+
|
|
702
|
+
```sh
|
|
703
|
+
ocnus task answer my-space ABC-122 41 approve
|
|
704
|
+
ocnus task answer my-space ABC-122 41 change plan: keep the old exporter
|
|
705
|
+
ocnus task answer my-space ABC-98 p3f9a12c4 allow
|
|
706
|
+
ocnus task answer my-space ABC-77 38 merge
|
|
707
|
+
```
|
|
708
|
+
|
|
709
|
+
- **An approval, a choice or a merge** takes one of its options, or your own
|
|
710
|
+
words in place of one. Either goes to the card's agent as if you had typed
|
|
711
|
+
it in its tab, and the agent goes on as it does when you answer there: it
|
|
712
|
+
records your answer and carries on. Words after the first are joined, so
|
|
713
|
+
they need no quotes.
|
|
714
|
+
- **A permission prompt** takes only one of its options. `allow` and `refuse`
|
|
715
|
+
close the prompt as the same choice in the tab does, and a refusal does not
|
|
716
|
+
interrupt the agent. `allow from now on` allows it with the rules the
|
|
717
|
+
prompt itself suggested, and is an option only of a prompt that suggested
|
|
718
|
+
some. Nothing is typed into the tab for it.
|
|
719
|
+
- **A merge answered with `merge`** is not sent to the agent. It merges each
|
|
720
|
+
of the card's open pull requests on GitHub, by the method GitHub's own
|
|
721
|
+
merge button would use for you in that repo (a merge commit, a squash or a
|
|
722
|
+
rebase), and only at the commit GitHub was asked about. ocnus's watch
|
|
723
|
+
then records the merge and finishes the task, as it does when you merge on
|
|
724
|
+
GitHub. When GitHub would not merge one of them as it stands, such as one
|
|
725
|
+
in conflict, with a required check not passed, behind its base branch or a
|
|
726
|
+
draft, none is merged: the command names that pull request and why, and
|
|
727
|
+
exits non-zero. Nothing is forced, and no auto-merge is turned on. It needs
|
|
728
|
+
`gh`, signed in. In a repo whose method is a squash or a rebase, the watch
|
|
729
|
+
records the merge and leaves the task for you to finish, as when you merge
|
|
730
|
+
that way on GitHub (see `task finish`, below).
|
|
731
|
+
|
|
732
|
+
An answer is for one question, the one the list showed. When that question
|
|
733
|
+
no longer waits, because it was answered in the tab or by an earlier answer,
|
|
734
|
+
or the agent has asked another since, nothing is sent or merged, and the
|
|
735
|
+
command says why and exits non-zero. The same goes for a question whose
|
|
736
|
+
agent is not running, with its tab closed or its own shell in the
|
|
737
|
+
foreground, which the list marks with `agent not running`: an answer goes
|
|
738
|
+
to a running agent, so start it again in its tab first. A merge answered
|
|
739
|
+
with `merge` needs no agent. An agent still ending its turn is waited for,
|
|
740
|
+
for half a minute. The command exits zero only once the agent has taken the
|
|
741
|
+
answer, which is once Herdr shows it working again, once the hook of a
|
|
742
|
+
permission prompt has taken the option, or once the pull requests have
|
|
743
|
+
merged.
|
|
744
|
+
|
|
745
|
+
Only you answer. Run from inside the session of an agent ocnus started,
|
|
746
|
+
`task answer` sends nothing and merges nothing, and says so; `task asks`
|
|
747
|
+
lists there as anywhere.
|
|
748
|
+
|
|
749
|
+
A permission prompt is seen through a Claude Code hook, which `task new` and
|
|
750
|
+
`task build` give every `claude` they start: `ocnus task hold <space>
|
|
751
|
+
<card>`. Claude Code runs it beside the prompt. It writes the question to
|
|
752
|
+
`~/.config/ocnus/asks/<space>/<card>/<id>.json`, the tool and what it
|
|
753
|
+
would do and nothing else of the session, and waits. `task answer` leaves
|
|
754
|
+
the option beside that file, and the hook prints the decision that closes
|
|
755
|
+
the prompt. Once the prompt is answered in the tab, the hook sees that its
|
|
756
|
+
terminal is no longer blocked and ends without deciding, and its file goes.
|
|
757
|
+
So the list shows a prompt only while its hook waits and Herdr says its
|
|
758
|
+
terminal is blocked. What it cannot see:
|
|
759
|
+
|
|
760
|
+
- A prompt only the person in the tab can answer: a question the agent asks
|
|
761
|
+
mid-step with its own options (`AskUserQuestion`), and a plan to approve
|
|
762
|
+
(`ExitPlanMode`). The hook leaves both alone.
|
|
763
|
+
- Any other prompt of Claude Code's, such as a sign-in, and the prompts of a
|
|
764
|
+
harness other than `claude`. `task log` still says the agent is waiting in
|
|
765
|
+
its tab.
|
|
766
|
+
- The prompts of an agent that was started before this hook was there, or
|
|
767
|
+
not by `task new` or `task build`, until it is started again by one.
|
|
768
|
+
- A prompt on a machine without `jq` or Herdr's `hc`, or of an agent whose
|
|
769
|
+
terminal is not one of herdr-core's.
|
|
770
|
+
|
|
771
|
+
When an agent has two prompts at once, both are listed, and each is answered
|
|
772
|
+
by its own id. One of them answered in the tab stays in the list until the
|
|
773
|
+
other is answered too, since the terminal stays blocked until then, and an
|
|
774
|
+
answer to it does nothing.
|
|
775
|
+
|
|
776
|
+
To catch up on a card's agent without going to its tab, ask for its brief:
|
|
777
|
+
the one the `brief` skill gives in the tab, with the original task, what has
|
|
778
|
+
happened so far and what the agent is doing now, in no more than five lines.
|
|
779
|
+
|
|
780
|
+
```sh
|
|
781
|
+
ocnus task brief my-space ABC-122
|
|
782
|
+
```
|
|
783
|
+
|
|
784
|
+
It leaves the agent alone. `task new` and `task build` give `claude` the ID
|
|
785
|
+
of the session they start it in, and record it as the card's, so `claude`
|
|
786
|
+
makes the brief in a copy of the card's newest session: its build agent's
|
|
787
|
+
once `task build` has started one, the one started last, or else its
|
|
788
|
+
write-up agent's. The copy has no tools and is never saved, and nothing is
|
|
789
|
+
sent to the agent's tab, so an agent in the middle of a turn keeps working,
|
|
790
|
+
and a question it is waiting on, in a hand-off or on a permission prompt,
|
|
791
|
+
stays unanswered. The brief says what the agent was doing or asking when the
|
|
792
|
+
copy was made. It is given whatever the agent is doing, with its tab open or
|
|
793
|
+
closed, and once the card has merged and its task is finished, for as long
|
|
794
|
+
as Claude Code keeps the session's transcript.
|
|
795
|
+
|
|
796
|
+
A new brief is a model call, so it runs on `haiku` at low effort, since it
|
|
797
|
+
reads the agent's whole conversation (`OCNUS_BRIEF_MODEL` picks another
|
|
798
|
+
model), and it is paid for as the agents are: on your Claude subscription, or
|
|
799
|
+
on the saved Anthropic key when `ocnus billing` is on `api`, where it stops
|
|
800
|
+
before the call with no key saved. So ocnus keeps the last brief of each
|
|
801
|
+
card. Asked again before another hand-off is recorded for the card, or
|
|
802
|
+
another agent is started on it, it gives the kept one, saying when it was
|
|
803
|
+
made, and makes no model call. `--refresh` makes a new one. `--json` gives
|
|
804
|
+
the brief as one line for programs, with when it was made and whether it is
|
|
805
|
+
the kept one.
|
|
806
|
+
|
|
807
|
+
A card gets no brief when no session of its agent is recorded, as when no
|
|
808
|
+
agent was started on it, or only before ocnus recorded sessions, when its
|
|
809
|
+
agent runs in another harness, and when Claude Code no longer keeps the
|
|
810
|
+
session's transcript. The command then says why and exits non-zero, as it
|
|
811
|
+
does when Claude Code could not make the brief. See
|
|
812
|
+
[herdr/README.md](herdr/README.md#hand-offs).
|
|
813
|
+
|
|
508
814
|
`task start` starts the work, once you have approved the card. It takes the
|
|
509
815
|
card too, makes a branch and a git worktree of it in every repo of the
|
|
510
816
|
space, opens a tab for it, and starts the agent there that runs the build
|
|
@@ -526,7 +832,8 @@ start, it stops before it makes anything. See
|
|
|
526
832
|
`task start` holds a card while a card that blocks it, or the card it was
|
|
527
833
|
sliced from, is not done yet in Linear. It makes no branch, worktree or tab,
|
|
528
834
|
leaves the card in Todo, names each card that holds it, with its status, and
|
|
529
|
-
exits non-zero.
|
|
835
|
+
exits non-zero. ocnus's watch starts the card once those cards are done,
|
|
836
|
+
unless the chain is off, as the watch's paragraphs below say. When Linear is not
|
|
530
837
|
asked, as when the card's type and title are given with no key saved, it
|
|
531
838
|
starts the card with a note that its blockers were not checked.
|
|
532
839
|
|
|
@@ -547,9 +854,10 @@ for it. The clean exit is what archives the session in the Claude app's list
|
|
|
547
854
|
of sessions, with Remote Control on. Its transcript stays, so
|
|
548
855
|
`claude --resume` still opens it. A live agent is never killed: when it has
|
|
549
856
|
not exited 30 seconds after `/exit`, or the tab runs a program that reports
|
|
550
|
-
no status, the tab is left open. When `task start` holds the card,
|
|
551
|
-
write-up session
|
|
552
|
-
|
|
857
|
+
no status, the tab is left open. When `task start` holds the card, it puts
|
|
858
|
+
the write-up session away too, since all there is to know of a held card is
|
|
859
|
+
in Linear, its status and its blockers, and the watch opens a new build tab
|
|
860
|
+
once it starts the card. When `task start` stops,
|
|
553
861
|
before it has made the task or without opening its tab, the write-up session
|
|
554
862
|
stays open. Only the card's own write-up tab is closed: the build tab, other
|
|
555
863
|
cards' write-up tabs and the terminal `task start` ran in stay open, and a
|
|
@@ -624,10 +932,13 @@ has it build the card with the `sdlc-build` skill, check that work with the
|
|
|
624
932
|
`sdlc-review` skill, and then put it up as a pull request with the `sdlc-pr`
|
|
625
933
|
skill. If the agent stops, run the same command again in the tab. It runs only
|
|
626
934
|
in the card's own task folder. With `--continue <message>` after the card, it
|
|
627
|
-
continues
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
935
|
+
continues the card's build session instead, with that message, on the same
|
|
936
|
+
profile, model and effort, which a bare `claude --continue` would not give
|
|
937
|
+
it. That is the session of the build agent `task build` started last, by the
|
|
938
|
+
ID it gave `claude`, or `claude`'s last session in the task when none is
|
|
939
|
+
recorded, as for an agent started before ocnus recorded sessions. ocnus's
|
|
940
|
+
watch runs it to wake an agent that has exited (see below). Another harness
|
|
941
|
+
refuses `--continue`. When a phase profile is not linked, `task new`
|
|
631
942
|
and `task build` stop before they start anything, and say to run
|
|
632
943
|
`ocnus update`. Both start the agent on the account `ocnus billing`
|
|
633
944
|
sets, the subscription unless it is `api`; on `api` with no Anthropic key
|
|
@@ -679,8 +990,9 @@ team with one started status the card stays in it. When the card cannot be
|
|
|
679
990
|
moved, it says so, and why, and goes on.
|
|
680
991
|
|
|
681
992
|
Then it asks you to merge them, as `needs-human` with their links, and
|
|
682
|
-
waits, running no watch of its own. Merge each one on GitHub yourself
|
|
683
|
-
|
|
993
|
+
waits, running no watch of its own. Merge each one on GitHub yourself, or
|
|
994
|
+
have `ocnus task answer <space> <card> <question> merge` merge them (see
|
|
995
|
+
above); you don't have to tell the agent. ocnus's watch on the merges (see below)
|
|
684
996
|
asks GitHub every minute, however long the pull requests have been open,
|
|
685
997
|
whatever the agent is doing, so a merge is seen within a minute or so. Once
|
|
686
998
|
every one has merged, it records the merge, as your answer, so `task log`
|
|
@@ -746,8 +1058,9 @@ launchd agent that `install` and `update` write (see
|
|
|
746
1058
|
back within a minute of herdr-core starting, whether the Herdr app, the
|
|
747
1059
|
phone or an `ocnus` command started it, and a watch that died comes back
|
|
748
1060
|
the same way. `--wake` only wakes it, and says nothing. It starts only
|
|
749
|
-
while a card waits on its merge
|
|
750
|
-
|
|
1061
|
+
while a card waits on its merge, or once its half-hourly look for ready
|
|
1062
|
+
cards is due, as below, and herdr-core is running;
|
|
1063
|
+
it never starts herdr-core, and never runs twice. Every minute, it asks GitHub about the
|
|
751
1064
|
pull requests of every card whose latest hand-off is the pr step's question,
|
|
752
1065
|
in any space and however long ago, in one call, with `gh api graphql`,
|
|
753
1066
|
however many cards wait and in however many spaces and repos; past 100
|
|
@@ -777,8 +1090,9 @@ come back, never killed, then `task finish` (below) removes the task and
|
|
|
777
1090
|
closes its tab, with the Herdr app open or closed. When `task finish` refuses,
|
|
778
1091
|
as for work it would lose, or the agent does not exit, the task is left as it
|
|
779
1092
|
is, and `task log` shows why, as `task not finished: …` in the merge's flags;
|
|
780
|
-
run `task finish` yourself once you have dealt with it.
|
|
781
|
-
|
|
1093
|
+
run `task finish` yourself once you have dealt with it. Then it starts the
|
|
1094
|
+
cards the merged card was blocking that are ready, as the chain's paragraphs
|
|
1095
|
+
below say. It ends once no card waits, and `--once` checks once. Once a card's merge is recorded,
|
|
782
1096
|
`task handoff` refuses any other block for it, saying the merge is recorded
|
|
783
1097
|
already, so it is recorded once. Then the agent records nothing more and
|
|
784
1098
|
runs no `task finish`.
|
|
@@ -802,13 +1116,85 @@ What it woke each card's agent for is kept in
|
|
|
802
1116
|
`~/.config/ocnus/merges/<space>/<card>.woke` while the card waits.
|
|
803
1117
|
For `task log`, each pass also leaves when it began, in
|
|
804
1118
|
`~/.config/ocnus/merges/.alive`, and what it saw of each card's pull
|
|
805
|
-
requests, in `~/.config/ocnus/merges/<space>/<card>`. For
|
|
1119
|
+
requests, in `~/.config/ocnus/merges/<space>/<card>`. For `task asks`,
|
|
1120
|
+
it keeps each pull request it saw, with its state, in
|
|
1121
|
+
`~/.config/ocnus/merges/<space>/<card>.pulls`. For
|
|
806
1122
|
`ocnus status`, a pass whose call to GitHub failed leaves when, whether
|
|
807
1123
|
`gh` needs signing in, and `gh`'s words, in
|
|
808
1124
|
`~/.config/ocnus/merges/.gh`, which the next pass whose call works, or
|
|
809
|
-
that asks GitHub nothing, removes. All of them go once no card waits.
|
|
1125
|
+
that asks GitHub nothing, removes. All of them go once no card waits. When
|
|
1126
|
+
the watch last looked for ready cards stays, in
|
|
1127
|
+
`~/.config/ocnus/merges/.ready`.
|
|
1128
|
+
|
|
1129
|
+
**The chain.** A card that `task start` held starts by itself once the cards
|
|
1130
|
+
that block it are done: the watch starts it, with `task start`, as you would.
|
|
1131
|
+
Once the watch has recorded a card's merge and finished its task, it asks
|
|
1132
|
+
Linear once for the cards that card was blocking, and, when the merge closed
|
|
1133
|
+
the card it was sliced from, for the cards that card was blocking too. It
|
|
1134
|
+
starts each one that is ready:
|
|
1135
|
+
|
|
1136
|
+
- it is in a not-started status, which is where your approval puts it: Todo
|
|
1137
|
+
in Lab, so a card still in Backlog is never started;
|
|
1138
|
+
- its team is in a space's teams (`ocnus space team`);
|
|
1139
|
+
- its description has a Specification and a Plan;
|
|
1140
|
+
- every card that blocks it, or the card it was sliced from, is done. A
|
|
1141
|
+
blocker that was canceled is not done, so it still holds the card.
|
|
1142
|
+
|
|
1143
|
+
A ready card that was sliced starts through its first sub-issue that is not
|
|
1144
|
+
started, done or canceled, as breakdown picks one. Each card starts in the
|
|
1145
|
+
merged card's own space when its teams hold the card's team, or else in the
|
|
1146
|
+
one space that lists the team, and from its repos' default branches as they
|
|
1147
|
+
are after the merge, since `task start` fetches first. A card under another
|
|
1148
|
+
parent card starts the same way: only its blockers count. There is no limit on
|
|
1149
|
+
how many cards start at once.
|
|
1150
|
+
|
|
1151
|
+
The watch never starts a card that is not ready. It names each one it leaves,
|
|
1152
|
+
with why, and each one it starts, in the merge's flags, so `task log` shows
|
|
1153
|
+
them under the merge:
|
|
1154
|
+
|
|
1155
|
+
```
|
|
1156
|
+
2026-03-02T10:14:09Z pr done, then merged 0s
|
|
1157
|
+
summary: Merged on GitHub: https://github.com/acme/api/pull/7. Recorded by ocnus's watch.
|
|
1158
|
+
flags: ABC-123 was started; ABC-124 was not started: ABC-121, in In Review, still blocks it; ABC-125 was not started: it has no Plan
|
|
1159
|
+
```
|
|
1160
|
+
|
|
1161
|
+
A card it leaves because it cannot be sure of it is named too: one whose
|
|
1162
|
+
team more than one other space lists, one with more relations or sub-issues
|
|
1163
|
+
in Linear than it reads, one that has a task on this machine already, and one
|
|
1164
|
+
`task start` stopped on, with what `task start` said. When Linear cannot be
|
|
1165
|
+
asked, the flags say that the cards were not looked for. With no Linear key
|
|
1166
|
+
saved, it looks for none and says nothing.
|
|
1167
|
+
|
|
1168
|
+
A start can be missed at the merge: `task start` stopped, Linear could not be
|
|
1169
|
+
asked, the chain was off, or the last blocker was closed some other way, such
|
|
1170
|
+
as by hand in Linear, with no merge for the watch to see. The catch-up starts
|
|
1171
|
+
those:
|
|
810
1172
|
|
|
811
|
-
|
|
1173
|
+
```sh
|
|
1174
|
+
ocnus task ready my-space
|
|
1175
|
+
```
|
|
1176
|
+
|
|
1177
|
+
It asks Linear for the cards of the space's teams that wait in a not-started
|
|
1178
|
+
status, 20 to a question, with their blockers, and starts each one that is
|
|
1179
|
+
ready, by the same rules, in that space. It says what became of each card that
|
|
1180
|
+
waits, a line each, and exits non-zero when a card that was ready could not
|
|
1181
|
+
be started. The watch runs it too, for every space that has a team, once its
|
|
1182
|
+
last look is half an hour old, with a card waiting on its merge or not: so a
|
|
1183
|
+
ready card starts within about half an hour whatever freed it, at the cost
|
|
1184
|
+
of one question to Linear for each space each half hour, while no more than
|
|
1185
|
+
20 of its cards wait. The watch names no
|
|
1186
|
+
space of its own, so it leaves a card whose team more than one space lists:
|
|
1187
|
+
start that one yourself. What its look found is in its terminal,
|
|
1188
|
+
`hc attach ocnus-merges`, and is recorded nowhere, since a card that
|
|
1189
|
+
starts records its own start.
|
|
1190
|
+
|
|
1191
|
+
`ocnus chain off` turns the chain off: the watch then starts no card, at
|
|
1192
|
+
a merge or at its half-hourly look. `task ready` still starts the ready cards
|
|
1193
|
+
when you run it. See [Setting up a machine](#setting-up-a-machine) for the
|
|
1194
|
+
setting.
|
|
1195
|
+
|
|
1196
|
+
To have something changed instead of merging, say what in the tab, or with
|
|
1197
|
+
`task answer` in your own words. The agent
|
|
812
1198
|
makes the change on the task's branch, with its test, runs the whole test
|
|
813
1199
|
suite, then commits and pushes it, never forced, so the pull request shows
|
|
814
1200
|
it, and adds it to the pull request's description. Then it asks you again,
|
|
@@ -859,7 +1245,10 @@ that together they still run one case per processor, or, after
|
|
|
859
1245
|
`ocnus tests queue`, go one at a time, each waiting its turn (see above).
|
|
860
1246
|
`OCNUS_TEST_JOBS=<n> npm test` runs n at a time however many other runs
|
|
861
1247
|
are going, though it still waits its turn when they go one at a time, and
|
|
862
|
-
`OCNUS_TEST_JOBS=1 npm test` runs the cases one at a time.
|
|
1248
|
+
`OCNUS_TEST_JOBS=1 npm test` runs the cases one at a time.
|
|
1249
|
+
`OCNUS_TEST_TIMES=<file> npm test` also writes a line to the file for each
|
|
1250
|
+
case, with its wall, user and sys times, whether it passed, its area and its
|
|
1251
|
+
name; [test/TIMES.md](test/TIMES.md) says where a whole run's time goes. Once
|
|
863
1252
|
a pull request merges, `scripts/after-merge <name>`, run from the clone,
|
|
864
1253
|
removes the Claude Code worktree under `.claude/worktrees/` that the work was
|
|
865
1254
|
done in, deletes its branch and updates the clone; see
|
|
@@ -869,9 +1258,10 @@ A git worktree of the repo, such as the one `task start` makes for one of
|
|
|
869
1258
|
ocnus's own cards, holds a copy of the CLI that is a change being built.
|
|
870
1259
|
Its `./cli/ocnus` runs only the commands that read: `help`, `status`,
|
|
871
1260
|
`space ls`, `space team <name>`, `profile ls`, `linear archive` (alone or
|
|
872
|
-
with `--json`), `tests` (alone or with `--json`),
|
|
873
|
-
|
|
874
|
-
`--json`), `
|
|
1261
|
+
with `--json`), `tests` and `tests ls` (each alone or with `--json`),
|
|
1262
|
+
`approval` (alone or with `--json`), `billing` (alone or with `--json`),
|
|
1263
|
+
`chain` (alone or with `--json`), `usage` (alone or with `--json`),
|
|
1264
|
+
`task ls`, `task log`, `task asks`, `host` and `host report`.
|
|
875
1265
|
Any other command stops before it does anything, says that it is a
|
|
876
1266
|
worktree's copy, and gives the command that runs it for real:
|
|
877
1267
|
`OCNUS_LIVE=1 ./cli/ocnus …`, for that one run. The installed `ocnus` is never stopped, whatever folder
|
|
@@ -886,6 +1276,7 @@ read afterwards. It is off until you turn it on, and works on macOS only.
|
|
|
886
1276
|
```sh
|
|
887
1277
|
ocnus host on # turn recording on
|
|
888
1278
|
ocnus host report [<period>] # how often CPU, memory and disk were at their limit, what used the most, and where the steps' time went
|
|
1279
|
+
ocnus host report --card <space> <card> --json # what the host recorded while each of a card's steps ran, as JSON for programs
|
|
889
1280
|
ocnus host off # turn it off, and delete every reading
|
|
890
1281
|
ocnus host # whether recording is on, and what it has
|
|
891
1282
|
ocnus tests run <command> # run a test command, and record the test run
|
|
@@ -966,8 +1357,34 @@ Then it says where the steps' time went: the agents' time in all on the
|
|
|
966
1357
|
host, waiting on the model and the rest, then the same for the 10 steps open
|
|
967
1358
|
longest, each one card's own, such as LAB-152's build step, and how many
|
|
968
1359
|
steps had no split.
|
|
1360
|
+
|
|
1361
|
+
`ocnus host report --card <space> <card> --json` gives a program what
|
|
1362
|
+
the host recorded while each of a card's steps ran, as one line of JSON, so
|
|
1363
|
+
that a slow step can be set beside how busy the host was then. Its `steps`
|
|
1364
|
+
are each time the card was in a step, oldest first, with the start and end
|
|
1365
|
+
`task log` gives it, the time it waited on you included. The step the card
|
|
1366
|
+
is in now runs to now and is marked `open`. Each step has its `points`,
|
|
1367
|
+
one for each reading, with the time it covers, how busy the CPU was across
|
|
1368
|
+
all cores, the memory used, and the memory pressure as `normal`, `warning`
|
|
1369
|
+
or `critical`. They are the whole host's figures, not the card's own share.
|
|
1370
|
+
|
|
1371
|
+
A step with 60 readings or fewer comes back reading by reading. One with
|
|
1372
|
+
more comes back as 60 points at most: its time is cut into 60 equal parts,
|
|
1373
|
+
and each part with a reading in it gives one point, with the average of
|
|
1374
|
+
its readings' CPU and memory and the worst of their memory pressure, so
|
|
1375
|
+
every reading counts and none is dropped. Time with no reading has no
|
|
1376
|
+
point, so it is never given as idle or as 0. Each step says how many
|
|
1377
|
+
readings it has and how many of its seconds they cover, and with recording
|
|
1378
|
+
off the JSON says `"recording": false` and still lists the steps, so a
|
|
1379
|
+
program can show "not recorded" in place of an empty chart. It can be asked
|
|
1380
|
+
at any point in a card's life, and after its task is finished, for as long
|
|
1381
|
+
as the readings are kept. A request it cannot make sense of, such as a
|
|
1382
|
+
period beside `--card` or a card that is not a card ID, is refused with a
|
|
1383
|
+
message on stderr, exit 1 and nothing on stdout, so a program never reads
|
|
1384
|
+
words as JSON.
|
|
1385
|
+
|
|
969
1386
|
See [herdr/README.md](herdr/README.md#recording-the-host) for what a
|
|
970
|
-
reading holds.
|
|
1387
|
+
reading holds, and for every key of a card's JSON.
|
|
971
1388
|
|
|
972
1389
|
## Releasing
|
|
973
1390
|
|