@johngaynor/ocnus 2.0.1-next.12 → 2.0.1-next.17
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
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
|
package/package.json
CHANGED
|
@@ -58,6 +58,10 @@ The build step changes nothing on the card. The hand-off records how it ended.
|
|
|
58
58
|
|
|
59
59
|
When every Done when item has its change, run the repo's whole test suite, in every worktree you changed. It is the build step's first whole run. Run it through `ocnus tests run`, as section 2 says, as in `ocnus tests run npm test`. The build step is done only when the tests pass, but for any test the human let stand, as below. Run it once, and keep what it prints, in a file if it is long, rather than running it again to read another part of it.
|
|
60
60
|
|
|
61
|
+
Just before the run, note the tree it tests, in each worktree: `git add -A && git write-tree` prints it. When the run passes, say in the hand-off's `summary` which tree it passed on, as in `The whole suite passed on tree 4b825dc.`, with the repo's name before each tree when there are several. The review step finds that tree in the hand-off, and when the commit it checks holds the same tree, it uses this run rather than running the suite again. Make every change before your last whole run: a file changed after it, even by a commit hook, gives another tree, and the review step runs the suite again.
|
|
62
|
+
|
|
63
|
+
**A change to docs alone.** When every file the change touches is documentation, the whole suite shows nothing about it, so run only the tests that read those files. List the files with `git add -A && git diff --cached --name-only <the commit the task started from>`, which the check on the default branch below says how to find. Documentation is a file nothing runs or loads, such as a README, a `docs/` page or a changelog. A Markdown file a program loads or an agent follows, such as a skill, a prompt or a template, is not documentation. To find the tests that read a file, search the repo's tests for its path and its name with `git grep -l`. Run the part of the suite that holds them through `ocnus tests run`, as in `ocnus tests run npm test -- install`, or the whole suite when the repo can't run less. When no test reads them, run nothing. Either way, note the tree as above, and say in `summary` that the change touches docs alone, which tests ran, and the tree, as in `Docs alone: the install tests passed on tree 4b825dc.`
|
|
64
|
+
|
|
61
65
|
If a test fails, find out why and fix it. Change a test only when the Plan changes what that test checks. A test made to pass by weakening it is a failure you have hidden from the human.
|
|
62
66
|
|
|
63
67
|
When a test fails that your change doesn't explain, find out whether it fails on the default branch too, without touching the task's worktree:
|
|
@@ -94,7 +98,7 @@ ocnus task handoff <space> <card ID> <<'EOF'
|
|
|
94
98
|
step: build
|
|
95
99
|
status: done
|
|
96
100
|
next: review
|
|
97
|
-
summary: <what was built, in which repos, how many commits, and
|
|
101
|
+
summary: <what was built, in which repos, how many commits, and the tree the tests passed on; any detail where you followed the code rather than the Plan>
|
|
98
102
|
flags: <any Done when item you could not show to be true, and why; anything you found outside the Plan>
|
|
99
103
|
EOF
|
|
100
104
|
```
|
|
@@ -176,7 +180,7 @@ ocnus task handoff shop ABC-122 <<'EOF'
|
|
|
176
180
|
step: build
|
|
177
181
|
status: done
|
|
178
182
|
next: review
|
|
179
|
-
summary: Installed each worktree's dependencies as its README says, then built the CSV export in api and the Download CSV button in web, in two commits. Both test suites pass. The CSV helper is csv_rows in shop/api/app/common/export.py, not csv_stream as the Plan said.
|
|
183
|
+
summary: Installed each worktree's dependencies as its README says, then built the CSV export in api and the Download CSV button in web, in two commits. Both test suites pass: on tree 9c1e4a2 in api and 5f03b7d in web. The CSV helper is csv_rows in shop/api/app/common/export.py, not csv_stream as the Plan said.
|
|
180
184
|
flags: The orders page's tests can't set its filters yet, so item 3 is shown by the API test alone. The orders list also ignores the date range on page 2, which is outside this card.
|
|
181
185
|
EOF
|
|
182
186
|
```
|
package/skills/sdlc-pr/SKILL.md
CHANGED
|
@@ -166,7 +166,7 @@ In the worktree of each repo whose pull request is in conflict, on the task's br
|
|
|
166
166
|
|
|
167
167
|
1. Run `git fetch origin`, then `git merge origin/<default branch>`, with the default branch section 2 found. git stops with the files in conflict, and `git status` lists them. Note them: the hand-off and the pull request name them. When git merges it with no conflict, as it does when the default branch has moved again since GitHub looked, it commits the merge itself: go on to item 3.
|
|
168
168
|
2. Resolve each one, keeping both what the card's work does and what the default branch has done since. `git log HEAD..origin/<default branch> -- <file>` lists the commits that changed it there.
|
|
169
|
-
3. Run the repo's whole test suite through `ocnus tests run`, as section 6 does. If a test fails, other than one the human let stand, find out why and fix it. Change a test only when the default branch changed what that test checks. The review step that follows
|
|
169
|
+
3. Run the repo's whole test suite through `ocnus tests run`, as section 6 does. Just before the run, note the tree it tests with `git add -A && git write-tree`, as the build step does. If a test fails, other than one the human let stand, find out why and fix it, then note the tree again and run the suite again. Change a test only when the default branch changed what that test checks. The review step that follows relies on this run, so the suite runs once on the merge: it uses the run when the merge commit holds the tree it passed on.
|
|
170
170
|
4. Commit the merge with `git commit`, by the repo's rules for commits. Where they say nothing of a merge, keep the message git wrote for it, with `git commit --no-edit`. Don't skip its commit hooks. A fix the tests needed goes in the merge, or in a commit after it. `git status` shows no changes after.
|
|
171
171
|
5. Push nothing yet. The review step checks the merge first, and section 4 pushes it once the review step has passed the work again.
|
|
172
172
|
|
|
@@ -191,7 +191,7 @@ ocnus task handoff <space> <card ID> <<'EOF'
|
|
|
191
191
|
step: pr
|
|
192
192
|
status: done
|
|
193
193
|
next: review
|
|
194
|
-
summary: <the pull request brought up to date, the merge commit, the files that conflicted and what the fix changed, and
|
|
194
|
+
summary: <the pull request brought up to date, the merge commit, the files that conflicted and what the fix changed, and the tree the tests passed on>
|
|
195
195
|
EOF
|
|
196
196
|
```
|
|
197
197
|
|
|
@@ -31,14 +31,14 @@ Read the guidance in each worktree with commits: its `CLAUDE.md`, `AGENTS.md`, `
|
|
|
31
31
|
|
|
32
32
|
## 2. Run the tests
|
|
33
33
|
|
|
34
|
-
Run the repo's whole test suite in each worktree with commits, unless
|
|
34
|
+
Run the repo's whole test suite in each worktree with commits, unless a step has already seen it pass on exactly what that worktree holds now. Find out with `ocnus task log <space> <card ID>`: take the last `done` hand-off from the build step, or from the pr step after a conflict merge. Its `summary` names the tree its run passed on, as in `The whole suite passed on tree 4b825dc.` The run counts for this worktree only when all of these hold:
|
|
35
35
|
|
|
36
|
-
-
|
|
37
|
-
- Nothing changed a file in the worktree after that run: that step only committed what the run tested, and every commit since the run is one that step made. A commit hook that refused a commit, so that a file was fixed after the run, means the run no longer counts.
|
|
38
|
-
- The repo runs no commit hook that can change what is committed, such as through `.husky/`, `lint-staged` or `.pre-commit-config.yaml`.
|
|
36
|
+
- That hand-off names a tree for this worktree, and `git rev-parse --short HEAD^{tree}` prints the same tree. The same tree is the same files, whichever session ran the tests, so a file changed after that run, by a fix or by a commit hook, gives another tree and means the run no longer counts.
|
|
39
37
|
- `git status` shows no changes.
|
|
40
38
|
|
|
41
|
-
Then don't run it again, and say so on the Review's round line, as in `The tests pass, in the build step's run.` When
|
|
39
|
+
Then don't run it again, and say so on the Review's round line, as in `The tests pass, in the build step's run on tree 4b825dc.` When no hand-off names a tree, when the trees differ, or when you can't tell, run it yourself: the review step is what shows it.
|
|
40
|
+
|
|
41
|
+
When that hand-off says the change touches docs alone, its run was the tests that read those files, not the whole suite, and it counts in the same way. When you run the tests yourself and every file the task's commits change is documentation, as the build step's section 3 says, run only the tests that read them, as it says there, and say so on the round line.
|
|
42
42
|
|
|
43
43
|
When you run it, run it once, and keep what it prints, in a file if it is long, rather than running it again to read another part of it. Run it through `ocnus tests run`, as the build step does, as in `ocnus tests run npm test`, so that the test run is recorded as this card's.
|
|
44
44
|
|