@johngaynor/ocnus 2.0.1-next.76 → 2.0.1-next.80
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 +66 -14
- package/cli/lib/events.sh +482 -0
- package/cli/lib/guard.sh +4 -2
- package/cli/lib/host.sh +140 -104
- package/cli/lib/task.sh +2 -1
- package/cli/ocnus +41 -14
- package/herdr/README.md +97 -45
- package/package.json +1 -1
- package/skills/sdlc-build/SKILL.md +1 -1
package/herdr/README.md
CHANGED
|
@@ -1290,6 +1290,58 @@ ocnus task answer <space> <card> <question> <answer>
|
|
|
1290
1290
|
error or gives no brief with all three parts, with what it said. Each of
|
|
1291
1291
|
them but the last is found before any model call. A worktree's copy of
|
|
1292
1292
|
ocnus refuses `task brief`, since it is a model call and keeps the brief.
|
|
1293
|
+
- **`task events` lists what a card's agents did, step by step.**
|
|
1294
|
+
|
|
1295
|
+
```sh
|
|
1296
|
+
ocnus task events <space> <card> [--step <step>] [--json]
|
|
1297
|
+
```
|
|
1298
|
+
|
|
1299
|
+
It reads three things and writes nothing: the card's steps, from the store
|
|
1300
|
+
through the view `task log` reads, its sessions, from the `sessions`
|
|
1301
|
+
table, and each session's transcript, the `<ID>.jsonl` Claude Code keeps
|
|
1302
|
+
for it, found as `task build --continue` finds it, with `jq`. A step is
|
|
1303
|
+
each time the card was in it, as `host report --card` has it: hand-offs of one step
|
|
1304
|
+
in a row, from the hand-off before the first to the last, the step under
|
|
1305
|
+
way running to now; `new` and `start` have none. An entry of a write-up
|
|
1306
|
+
session, a line of its transcript, goes in define, plan or breakdown, and
|
|
1307
|
+
one of a build session in build, review or pr, of the run the session
|
|
1308
|
+
started in: the first of those steps that ends at or after the entry's
|
|
1309
|
+
second, else the last. So the command that records a hand-off is in the
|
|
1310
|
+
step it ends, and the write-up agent's `task start` is under breakdown. A
|
|
1311
|
+
step is recorded when a transcript has an entry in it, and so is the step
|
|
1312
|
+
under way once the newest session of its phase has a transcript. The
|
|
1313
|
+
events are read from the main conversation, a subagent's left out: an
|
|
1314
|
+
edit is an `Edit` or `Write` call that worked; a test run a `Bash` call
|
|
1315
|
+
whose command, without its heredocs' bodies, runs `ocnus tests run`, with
|
|
1316
|
+
its totals from the last line it printed with `<n> passed`, and
|
|
1317
|
+
`<n> failed` from that line, or, when its output went to a file or it ran
|
|
1318
|
+
in the background, from the first command after it that names the file
|
|
1319
|
+
and printed such a line; a commit a `Bash` call that worked, runs
|
|
1320
|
+
`git commit` and printed git's own `[<branch> <hash>] <subject>` line or
|
|
1321
|
+
a `git log --oneline` line for it; a question an `ocnus task handoff` call
|
|
1322
|
+
that worked with `status: needs-human`, its `question:` line; an answer a
|
|
1323
|
+
prompt with `origin.kind` `human`, but for the transcript's first, one
|
|
1324
|
+
that starts `ocnus-merges:`, and `brief`; and a command any other `Bash`
|
|
1325
|
+
call, its `description`, or `Ran <program>` with none. `--step` gives one
|
|
1326
|
+
step alone, each time the card was in it. In words it prints a line naming
|
|
1327
|
+
the card, then each step with its start, then a line an event with its
|
|
1328
|
+
time, its kind and its text, or `not recorded`, or `nothing to list` for a
|
|
1329
|
+
recorded step with no event. `--json` prints one line, with `space`,
|
|
1330
|
+
`card` and `steps`, oldest first. A step has `run`, as in
|
|
1331
|
+
`task log --json`, `step`, `start` and `end`, in UTC as `task log --json`
|
|
1332
|
+
gives times, `open`, true for the step under way, `recorded`, and
|
|
1333
|
+
`events`: null when `recorded` is false, else a list, oldest first. An
|
|
1334
|
+
event has `at` and `clock`, as a row of `task log --json` has them,
|
|
1335
|
+
`kind`, one of `edit`, `test run`, `command`, `commit`, `question` and
|
|
1336
|
+
`answer`, and `text`, one line of at most 200 characters. An edit has
|
|
1337
|
+
`files`, each once, and `count`; a test run has `passed`, `failed` and
|
|
1338
|
+
`running`, true while it is still going, a total that is not known being
|
|
1339
|
+
null; a commit has `hash` and `subject`. A card with no hand-offs has
|
|
1340
|
+
`"steps": []` and exits 0, as `task log --json` does. A space that does
|
|
1341
|
+
not exist, a card that is not a card ID, a `--step` that is not define,
|
|
1342
|
+
plan, breakdown, build, review or pr, and an option it does not know are
|
|
1343
|
+
refused on stderr, with exit 1 and nothing on stdout. A worktree's copy of
|
|
1344
|
+
ocnus runs it, since it only reads.
|
|
1293
1345
|
- **They are kept in `~/.config/ocnus/ocnus.db`,** a SQLite file
|
|
1294
1346
|
beside your spaces, on this machine only, each one with its space. It
|
|
1295
1347
|
needs `sqlite3`, which macOS ships; `OCNUS_SQLITE` picks another
|
|
@@ -2348,7 +2400,7 @@ turn it on, and works on macOS only.
|
|
|
2348
2400
|
ocnus host # whether recording is on, and what it has
|
|
2349
2401
|
ocnus host on # turn recording on
|
|
2350
2402
|
ocnus host off # turn it off, and delete every reading
|
|
2351
|
-
ocnus host report [<period>] # the host's numbers
|
|
2403
|
+
ocnus host report [<period>] # the host's numbers and the work summed up, and where the steps' time went
|
|
2352
2404
|
ocnus host report --card <space> <card> --json # what the host recorded while each of a card's steps ran, as JSON for programs
|
|
2353
2405
|
ocnus tests run <command> # run a test command, and record the test run
|
|
2354
2406
|
```
|
|
@@ -2712,21 +2764,30 @@ of it, summed up as what it is, and none is judged:
|
|
|
2712
2764
|
has no Wi-Fi signal, or readings from before the network and the power and
|
|
2713
2765
|
heat were recorded. It is never shown as 0.
|
|
2714
2766
|
|
|
2715
|
-
Then
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2767
|
+
Then comes the work, summed up by kind, never card by card. None of it is
|
|
2768
|
+
ranked, and no card is named:
|
|
2769
|
+
|
|
2770
|
+
- **Each step and each phase** in the period, under `Steps:` and
|
|
2771
|
+
`Phases:`, the steps in their order from `define` to `pr` and the phases
|
|
2772
|
+
`write-up` then `build`, each with how many cards were in it, how long
|
|
2773
|
+
their agents were open in all, on average and at the longest, the CPU time
|
|
2774
|
+
they used, and the most memory one card held at once. A card counts for
|
|
2775
|
+
its shares while its agent was open, for the part of each reading in the
|
|
2776
|
+
period, once a reading however many of its tabs were in the step, and a
|
|
2777
|
+
tab that holds its shell alone counts for nothing. Its CPU time is its
|
|
2778
|
+
shares' CPU, as a share of all cores, over that part, on that reading's
|
|
2779
|
+
cores, and its memory is the most its shares held in one reading. So a
|
|
2780
|
+
step's time in all is how long its agents were open, as where the steps'
|
|
2781
|
+
time went counts it.
|
|
2782
|
+
- **Each repo's test runs**, under `Test runs:`, of those that started in
|
|
2783
|
+
the period, the repos in the order of their names: how many there were,
|
|
2784
|
+
how long those that ended took in all, on average and at the longest, the
|
|
2785
|
+
CPU time they used, and the most memory one held. When any were cut short
|
|
2786
|
+
by the recorder, as their process had gone, or are still going, the line
|
|
2787
|
+
ends with how many of each.
|
|
2788
|
+
- **Not read** stands in place of a figure nothing in the period holds,
|
|
2789
|
+
such as the CPU time in readings from before the cores were counted, or
|
|
2790
|
+
the time of a repo whose runs are all still going.
|
|
2730
2791
|
- **With no step, phase or test run in the period**, as when no agent was
|
|
2731
2792
|
tied to a card, the report says so in place of the lists. With some, a
|
|
2732
2793
|
list that has none says `none recorded`.
|
|
@@ -2737,12 +2798,12 @@ Then comes where the steps' time went:
|
|
|
2737
2798
|
rest, from the splits in the period, each reading's split counted for the
|
|
2738
2799
|
part of the reading in the period, as the report counts a reading. With
|
|
2739
2800
|
it is how long they were open, which the three add up to.
|
|
2740
|
-
- **
|
|
2741
|
-
|
|
2801
|
+
- **Each step**, in their order from `define` to `pr`, with the same, every
|
|
2802
|
+
card's splits in it added up: how long its agents were open with a split,
|
|
2742
2803
|
and its three parts, each to the second.
|
|
2743
|
-
- **How many steps had no split**:
|
|
2744
|
-
as of an agent started in another harness or while recording was
|
|
2745
|
-
With no split in the period, or a store made before the splits, the
|
|
2804
|
+
- **How many steps had no split**: each card's step open in the period with
|
|
2805
|
+
no split, as of an agent started in another harness or while recording was
|
|
2806
|
+
off. With no split in the period, or a store made before the splits, the
|
|
2746
2807
|
report says no step was split.
|
|
2747
2808
|
|
|
2748
2809
|
```
|
|
@@ -2791,30 +2852,21 @@ Power and heat:
|
|
|
2791
2852
|
Low Power Mode on 0s, off 9h 41m
|
|
2792
2853
|
thermal state nominal 9h 12m, fair 25m 00s, serious 4m 00s, critical 0s
|
|
2793
2854
|
|
|
2794
|
-
Steps
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
Phases that held the most memory at once:
|
|
2804
|
-
LAB-150 build phase memory 3412 MB, ran 3h 48m
|
|
2805
|
-
LAB-151 write-up phase memory 1204 MB, ran 1h 05m
|
|
2806
|
-
Test runs that used the most CPU time:
|
|
2807
|
-
LAB-150 ocnus 2026-11-29 14:02 CPU time 6m 10s, ran 2m 05s
|
|
2808
|
-
LAB-149 ocnus 2026-11-28 10:41 CPU time 5m 58s, ran 2m 01s
|
|
2809
|
-
Test runs that held the most memory at once:
|
|
2810
|
-
LAB-150 ocnus 2026-11-29 14:02 memory 1830 MB, ran 2m 05s
|
|
2811
|
-
LAB-149 ocnus 2026-11-28 10:41 memory 1795 MB, ran 2m 01s
|
|
2855
|
+
Steps:
|
|
2856
|
+
plan 2 cards, 1h 05m in all, 32m 30s on average, 41m 10s at the longest; CPU time 9m 40s; memory 1204 MB at most
|
|
2857
|
+
build 3 cards, 5h 12m in all, 1h 44m on average, 2h 40m at the longest; CPU time 2h 03m; memory 3412 MB at most
|
|
2858
|
+
review 2 cards, 1h 22m in all, 41m 00s on average, 51m 10s at the longest; CPU time 31m 20s; memory 1890 MB at most
|
|
2859
|
+
Phases:
|
|
2860
|
+
write-up 2 cards, 1h 05m in all, 32m 30s on average, 41m 10s at the longest; CPU time 9m 40s; memory 1204 MB at most
|
|
2861
|
+
build 3 cards, 6h 34m in all, 2h 11m on average, 3h 31m at the longest; CPU time 2h 34m; memory 3412 MB at most
|
|
2862
|
+
Test runs:
|
|
2863
|
+
ocnus 14 runs, 28m 10s in all, 2m 01s on average, 2m 05s at the longest; CPU time 1h 24m; memory 1830 MB at most
|
|
2812
2864
|
|
|
2813
2865
|
Where the steps' time went:
|
|
2814
|
-
all agents
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2866
|
+
all agents open 6h 34m: on the host 1h 31m, waiting on the model 3h 58m, the rest 1h 05m
|
|
2867
|
+
build open 5h 12m: on the host 1h 20m, waiting on the model 3h 02m, the rest 50m 00s
|
|
2868
|
+
review open 1h 22m: on the host 11m 00s, waiting on the model 56m 00s, the rest 15m 00s
|
|
2869
|
+
2 steps had no split, as an agent's time is split only when it starts in Claude Code while recording is on
|
|
2818
2870
|
```
|
|
2819
2871
|
|
|
2820
2872
|
`ocnus host report --card <space> <card> --json` gives what the host
|
|
@@ -3073,8 +3125,8 @@ shell, or written as a `NAME=value` line in ocnus's env file,
|
|
|
3073
3125
|
`space team <name>`, `profile ls`, `linear archive` (alone or with
|
|
3074
3126
|
`--json`), `tests` (alone or with `--json`), `billing` (alone or with
|
|
3075
3127
|
`--json`), `usage` (alone or with `--json`), `task ls`, `task log`,
|
|
3076
|
-
`task asks`, `host` and `host report`. Any other command
|
|
3077
|
-
before it changes anything, and says to run plain `ocnus` for a card's
|
|
3128
|
+
`task asks`, `task events`, `host` and `host report`. Any other command
|
|
3129
|
+
stops before it changes anything, and says to run plain `ocnus` for a card's
|
|
3078
3130
|
own steps, to write a test case to try the command, or to run it for real
|
|
3079
3131
|
with `OCNUS_LIVE=1 ./cli/ocnus …`. Plain `ocnus` is never
|
|
3080
3132
|
stopped.
|
package/package.json
CHANGED
|
@@ -42,7 +42,7 @@ Work through the Done when items in order, one at a time. In a later round, work
|
|
|
42
42
|
2. Make the change the Plan's Changes list gives for it, in the files it names. Reuse the helpers it names.
|
|
43
43
|
3. Run the test again and see it pass.
|
|
44
44
|
|
|
45
|
-
Run every test command through `ocnus tests run`, whole suite or part, as in `ocnus tests run npm test -- orders`. It runs the command as it is, with its output, its input and its exit code, and while the host is recorded it records the test run as this card's, so that `ocnus host report` can
|
|
45
|
+
Run every test command through `ocnus tests run`, whole suite or part, as in `ocnus tests run npm test -- orders`. It runs the command as it is, with its output, its input and its exit code, and while the host is recorded it records the test run as this card's, so that `ocnus host report` can sum up each repo's test runs. Give it the command and its arguments, not a line for a shell: what saves or pipes the output goes after them, as in `ocnus tests run npm test > <file> 2>&1`, and a `cd` goes before it.
|
|
46
46
|
|
|
47
47
|
Each path in Changes starts with the repo's name, and that repo's worktree is the folder of the same name in the task. A task with one repo is its worktree.
|
|
48
48
|
|