@brainervirus/workit-claude-code 7.2.0 → 7.3.0
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/.claude-plugin/plugin.json +1 -1
- package/dist/workit.js +1095 -106
- package/package.json +3 -3
- package/skills/fanout/SKILL.md +29 -20
- package/skills/fanout/references/brief.md +45 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brainervirus/workit-claude-code",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.3.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Workit Claude Code plugin — session and per-turn task context, branch policy on git shell commands, workit method skills, and verifier/reviewer/implementer agents",
|
|
6
6
|
"keywords": [
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"build": "bun scripts/build.ts"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@brainervirus/workit-cli": "^7.
|
|
43
|
-
"@brainervirus/workit-core": "^7.
|
|
42
|
+
"@brainervirus/workit-cli": "^7.3.0",
|
|
43
|
+
"@brainervirus/workit-core": "^7.3.0"
|
|
44
44
|
},
|
|
45
45
|
"engines": {
|
|
46
46
|
"node": ">=24"
|
package/skills/fanout/SKILL.md
CHANGED
|
@@ -10,41 +10,49 @@ verifiable alone. Code-coupled work stays with one owner, who fans out after
|
|
|
10
10
|
the blocking part lands. A worker whose whole job is re-running one command is
|
|
11
11
|
ceremony; do it yourself.
|
|
12
12
|
|
|
13
|
-
1. **
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
13
|
+
1. **Plan the slices** (workit-shape) in a plan file (`references/brief.md`):
|
|
14
|
+
per slice an id, branch, TIER, the file-scope manifest (SCOPE globs),
|
|
15
|
+
`owns` for shared files (lockfile, registry, barrels), `dependsOn` only for
|
|
16
|
+
a real dependency (independent PRs off trunk are the default), and the
|
|
17
|
+
brief fields. `workit fanout plan <plan.json>` refuses an empty brief field
|
|
18
|
+
(exit 2) and two slices that may write one file (exit 3) with a fix: an
|
|
19
|
+
owner for a shared file, or a dependency that serializes them. Apply it and
|
|
20
|
+
re-run: refuse to spawn while a field is empty or the plan is refused.
|
|
21
|
+
Its `waves` say which slices may run together; keep 4-6 in flight.
|
|
22
|
+
2. **Brief each worker** from its slice with the fixed template: GOAL, SCOPE,
|
|
23
|
+
CONTEXT (pointers, not pasted text), ACCEPTANCE (Given/When/Then), VERIFY
|
|
24
|
+
(exact commands), TIER, TIMEBOX, FORBIDDEN, REPORT, STANDING. STANDING is
|
|
25
|
+
every standing order and user directive so far, pasted verbatim into each
|
|
26
|
+
spawn and respawn, because directives decay across resumes.
|
|
27
|
+
3. **Spawn all workers in one message**, in the background, each in its own
|
|
24
28
|
worktree (Claude Code: the `implementer` agent; elsewhere
|
|
25
29
|
`git worktree add --detach ../<repo>-wt/<slug> origin/<base>`). The first
|
|
26
30
|
command a worker runs is `workit git branch <branch> --base <base>`.
|
|
27
|
-
|
|
31
|
+
4. **Judge liveness by side effects only:** new commits and pushes
|
|
28
32
|
(`git log <branch>`), PR and check changes (`workit pr status --branch <b>`).
|
|
29
33
|
No progress past the timebox means stuck. Stop the old worker and observe
|
|
30
34
|
that it exited (a timeout is not proof). `git worktree remove --force`
|
|
31
35
|
drops its uncommitted changes, so first record `git -C <wt> status --short`
|
|
32
|
-
in the ledger or your report; only then remove the worktree. Respawn with
|
|
33
|
-
`MODE: resume` (
|
|
36
|
+
in the ledger or your report; only then remove the worktree. Respawn with
|
|
37
|
+
the brief in `MODE: resume` (original, later directives, its last report):
|
|
34
38
|
the new worker runs `git switch <branch>` in its fresh worktree instead of
|
|
35
39
|
`workit git branch`. Never two live workers on one branch. Replace at most
|
|
36
40
|
twice, then re-slice or report the gap. Never chain resumes.
|
|
37
|
-
|
|
41
|
+
5. **Verify each slice independently.** A fresh agent that did not write it
|
|
38
42
|
(Claude Code: the `verifier` agent) runs VERIFY and verify-<app>, then
|
|
39
43
|
`workit ledger verdict <result> --branch <b> --how "<evidence>"` under the
|
|
40
44
|
session you started it with (`WORKIT_SESSION_ID=<lead>-v<n>`, set by you,
|
|
41
45
|
never chosen by the author; Claude Code: the hook names one).
|
|
42
46
|
A worker's report is a pointer, never evidence.
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
47
|
+
6. **Fan in** with `workit fanout check`: out-of-scope files (any file outside
|
|
48
|
+
it stops the fan-in), and `git merge-tree` conflicts with trunk and between
|
|
49
|
+
siblings, charged to the slice that lands later. Fix what it names (an
|
|
50
|
+
out-of-scope edit becomes a follow-up slice) until it exits 0. A landed
|
|
51
|
+
slice reads as not found: re-plan without it and drop it from dependents'
|
|
52
|
+
`dependsOn`. Then `workit ledger check --branch <b>` per slice; land in its
|
|
53
|
+
order. Stacked slices: `workit stack plan <bottom> … <top>` once, then
|
|
54
|
+
`workit stack sync` and `land`. Only you touch topology: workers never
|
|
55
|
+
rebase, retarget or merge. Then workit-ship.
|
|
48
56
|
|
|
49
57
|
## Example
|
|
50
58
|
|
|
@@ -58,5 +66,6 @@ counts; SCOPE: `src/routes/usage.ts`, `test/usage.test.ts`; VERIFY:
|
|
|
58
66
|
## Check
|
|
59
67
|
|
|
60
68
|
```sh
|
|
69
|
+
workit fanout check # exit 0: in scope, no conflicts, landing order printed
|
|
61
70
|
workit ledger check --branch <b> # per slice: accepted (current, passing, independent)
|
|
62
71
|
```
|
|
@@ -12,6 +12,7 @@ CONTEXT: <pointers: spec section, ledger decisions, the neighbour file to imitat
|
|
|
12
12
|
ACCEPTANCE:
|
|
13
13
|
- Given <state>, When <action>, Then <observable result>
|
|
14
14
|
VERIFY: <exact commands, e.g. `workit check test`, the verify-<app> feature to drive>
|
|
15
|
+
TIER: <mundane | standard | hard: how much model the slice needs>
|
|
15
16
|
TIMEBOX: <wall clock or turn budget; past it without a new commit you will be replaced>
|
|
16
17
|
FORBIDDEN: <no edits outside SCOPE; no rebase, retarget, merge or force-push; no new dependencies; ...>
|
|
17
18
|
REPORT: branch, head SHA, files changed, each VERIFY command with its exit code,
|
|
@@ -34,12 +35,56 @@ ACCEPTANCE:
|
|
|
34
35
|
- Given 3 runs today and 1 yesterday, When GET /v1/usage, Then the last two entries are {"runs":1} and {"runs":3}
|
|
35
36
|
- Given no auth header, When GET /v1/usage, Then the status is 401
|
|
36
37
|
VERIFY: `workit check test`; verify-api feature "usage"
|
|
38
|
+
TIER: standard
|
|
37
39
|
TIMEBOX: 45 minutes
|
|
38
40
|
FORBIDDEN: no edits outside SCOPE; no schema migration; no rebase or force-push; no new packages
|
|
39
41
|
REPORT: as in the template
|
|
40
42
|
STANDING: conventional commits; no comments that restate code; ask nothing, record rulings instead
|
|
41
43
|
```
|
|
42
44
|
|
|
45
|
+
## Plan file
|
|
46
|
+
|
|
47
|
+
`workit fanout plan <plan.json>` records the slices before any spawn. Each
|
|
48
|
+
slice carries the brief fields the plan checks (goal, scope, acceptance,
|
|
49
|
+
verify, forbidden must be filled; tier is mundane, standard or hard). `base`
|
|
50
|
+
defaults to the trunk, or to the branch of a single `dependsOn` slice (a
|
|
51
|
+
stack); `worktree` defaults to `../<repo>-wt/<id>`. `owns` claims a shared
|
|
52
|
+
file another slice's glob also matches. Globs that match no file yet are compared
|
|
53
|
+
through a sample path. Escape literal brackets: `"app/\\[id\\]/page.tsx"`.
|
|
54
|
+
|
|
55
|
+
```json
|
|
56
|
+
{
|
|
57
|
+
"name": "usage",
|
|
58
|
+
"trunk": "main",
|
|
59
|
+
"slices": [
|
|
60
|
+
{
|
|
61
|
+
"id": "usage-endpoint",
|
|
62
|
+
"branch": "feature/usage-endpoint",
|
|
63
|
+
"tier": "standard",
|
|
64
|
+
"scope": ["src/routes/usage.ts", "src/queries/usage.ts", "test/usage.test.ts"],
|
|
65
|
+
"owns": ["package.json"],
|
|
66
|
+
"goal": "GET /v1/usage returns the run count per UTC day for the last 7 days",
|
|
67
|
+
"acceptance": ["Given no auth header, When GET /v1/usage, Then the status is 401"],
|
|
68
|
+
"verify": ["workit check test"],
|
|
69
|
+
"forbidden": ["no edits outside SCOPE", "no rebase or force-push"],
|
|
70
|
+
"context": "docs/usage/spec.md Behavior",
|
|
71
|
+
"timebox": "45 minutes"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"id": "usage-docs",
|
|
75
|
+
"branch": "docs/usage",
|
|
76
|
+
"tier": "mundane",
|
|
77
|
+
"dependsOn": ["usage-endpoint"],
|
|
78
|
+
"scope": ["docs/usage/**"],
|
|
79
|
+
"goal": "The API guide documents GET /v1/usage",
|
|
80
|
+
"acceptance": ["Given the guide, When a reader looks up usage, Then the response shape is shown"],
|
|
81
|
+
"verify": ["workit check docs"],
|
|
82
|
+
"forbidden": ["no edits outside SCOPE"]
|
|
83
|
+
}
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
43
88
|
## Worker rules (paste into the brief when the host has no implementer agent)
|
|
44
89
|
|
|
45
90
|
1. First command. `MODE: new`: `workit git branch <branch> --base <base>` (the
|