@workit-dev/opencode 2.21.1 → 2.21.3

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
@@ -6,7 +6,9 @@
6
6
 
7
7
  [Workit](https://github.com/BrainerVirus/workit) for OpenCode 2.0.18+: the seven task families,
8
8
  read-only `workit_context` and `workit_init_apply` as native tools, the
9
- thirteen method skills with `/wk-*` commands, direct-child delegation, and
9
+ thirteen method skills with `/wk-*` commands, the `workit-implementer`,
10
+ `-verifier`, `-reviewer`, `-decider` and `-babysitter` subagents on their
11
+ `models.roles` models, direct-child delegation, and
10
12
  context injection on session start and after compaction. Requires Node.js 24+.
11
13
 
12
14
  ```json
@@ -12,16 +12,16 @@ Deslop removes; it never changes behavior. Its depth follows the review lane.
12
12
  `suppression` (a lint or type disable with no reason), `debug` (stray logs,
13
13
  `debugger`, `[DEBUG-` tags) or `allowed`, runs `test-audit` on changed
14
14
  tests, and prints the lane and its passes. A marker or a lint/type
15
- suppression raises `self` to `focused`.
15
+ suppression raises `none` or `self` to `focused`.
16
16
  2. **Run the lane's passes** (each lane adds to the one below):
17
17
  - `none` (docs only): prose. Cut filler and hedging from the PR body and
18
18
  docs; keep real symbol names and before-to-after numbers.
19
19
  - `self`: delete every narration, marker and debug finding, plus dead code
20
20
  from the repo's tools (`knip`, `ts-prune`, `vulture`, unused-lint rules).
21
21
  - `focused`: a fresh-eyes no-comments pass and a test-quality lens. Hand
22
- the diff, never your verdict, to a fresh reviewer: Claude Code and Codex,
23
- the `reviewer` agent; OpenCode, a child session; Cursor, a Task subagent
24
- marked `ROLE: reviewer`; Pi, a supervised worker. It deletes every added
22
+ the diff, never your verdict, to a fresh reviewer: Claude Code, the
23
+ `reviewer` agent; Codex, Cursor and OpenCode, `workit-reviewer`; Pi, a
24
+ supervised worker. It deletes every added
25
25
  comment off the keep list and triages `workit test-audit --diff`
26
26
  (call the skill tool with `workit-test-audit`).
27
27
  - `full`: also `workit test-audit --mutate --diff` and one architect
@@ -97,7 +97,8 @@ is the slice's STUCK threshold in `workit fanout status`. `"fanIn":
97
97
  "goal": "The API guide documents GET /v1/usage",
98
98
  "acceptance": ["Given the guide, When a reader looks up usage, Then the response shape is shown"],
99
99
  "verify": ["workit check docs"],
100
- "forbidden": ["no edits outside SCOPE"]
100
+ "forbidden": ["no edits outside SCOPE"],
101
+ "reason": "parallel"
101
102
  }
102
103
  ]
103
104
  }
@@ -130,7 +131,8 @@ deny is two lines ending in that ad-hoc command as `Retry as:`.
130
131
  and 3 for the worker's host: `--host <host>` (claude_code, codex, opencode,
131
132
  cursor, pi), else the lead's (`WORKIT_HOST`, or the host's own session
132
133
  variable). With no known host it warns on stderr and names the valid ones.
133
- RULE 3 carries the host's concrete Co-Authored-By line as a `--trailer`.
134
+ RULE 3 carries the host's concrete Co-Authored-By line as a `--trailer` on
135
+ Claude Code and Cursor; Codex, OpenCode and Pi get none.
134
136
 
135
137
  | Lead's host | Identity line | RULES 1 and 3 |
136
138
  | --- | --- | --- |
@@ -160,3 +162,7 @@ attempt (`--attempt <n>`) follows its host's row with the branch
160
162
  3. Commit with `workit git --cwd <worktree> commit -m "<msg>" --trailer "<host's Co-Authored-By>" -- <paths in SCOPE>`;
161
163
  push only if the brief says so.
162
164
  4. Never record a verdict on your own work.
165
+ 5. Run tests, lint, typecheck and builds only through `workit check`; `--heavy`
166
+ only for full suites, never a hand-made `flock`.
167
+ 6. A failed review gets one fix round and one recheck, then stop and report.
168
+ 7. Wait for or stop every background command before the final report.
@@ -96,7 +96,9 @@ it (`git branch <branch> <winner>`), have the verifier record the verdict on
96
96
  Follow the workspace `verification` setting (`workit grant show`); the
97
97
  worker never records a verdict on its own work.
98
98
 
99
- - `self` (the default): a verifier that wrote none of the slices records the
99
+ - `proportional` (the default): each slice's review lane decides (none: no
100
+ verdict; self: the author's `--self`; focused or full: a verifier).
101
+ - `self`: a verifier that wrote none of the slices records the
100
102
  verdicts. A lead that authored none of the slices may record them in its
101
103
  own session.
102
104
  - `independent`, and any slice at high risk: a separate verifier session
@@ -39,8 +39,8 @@ description: Build a requested change in small verified steps - follow local pat
39
39
  status`). Lane none: no verdict. Lane self: after `workit check test` passes,
40
40
  record `workit ledger verdict tests-verified --self --how "<what you ran>"`;
41
41
  it reads self-reviewed, never verified, and is enough. Focused, full, high
42
- risk or `verification: self|independent` merges: one fresh verifier per PR after the last push, its own host-derived session (Claude Code: the `verifier` agent with the `model` (and `effort`) of `workit models show --role verifier`; Codex:
43
- the `verifier` agent; OpenCode: a child session; Pi: a supervised worker),
42
+ risk or `verification: self|independent` merges: one fresh verifier per PR after the last push, its own host-derived session (Claude Code: the `verifier` agent with the `model` (and `effort`) of `workit models show --role verifier`; Codex,
43
+ Cursor and OpenCode: the `workit-verifier` agent; Pi: a supervised worker),
44
44
  never a hand-minted id. Before saying done, reconcile
45
45
  every named deliverable against the target checkout and observe it (for a push:
46
46
  `workit verify-delivery push`).
@@ -7,7 +7,7 @@ user asks for one, say which trigger fired, and let the user decline.
7
7
  | Record | Trigger | Where |
8
8
  | --- | --- | --- |
9
9
  | Spec | more than one slice, crosses repos, or an open product choice a future reader must know | `docs/<topic>/spec.md` |
10
- | Plan | more than one slice with dependencies, or work that will be resumed by someone else | `docs/<topic>/plan.md`, next to the spec |
10
+ | Plan | more than one slice with dependencies, or work that will be resumed by someone else | `workit dir plans` (per clone, outside the repo tree) |
11
11
  | ADR | the choice is hard to reverse **and** surprising **and** a real trade-off (all three) | `docs/adr/NNNN-<slug>.md` |
12
12
  | Glossary entry | a project term was ambiguous and you resolved it | `GLOSSARY.md` (create lazily) |
13
13
  | Coding standard | a judgment-call rule a reviewer must check, recurring twice, found by workit-retro; a mechanical rule gets a check instead | `CODING_STANDARDS.md` (create lazily) |
@@ -16,8 +16,8 @@ or weaken a test to make it quiet.
16
16
  `workit test-audit --diff --json` or `workit test-audit <paths> --json`.
17
17
  Each finding has file:line, rule, severity, confidence, why and a fix.
18
18
  Prose checks are `info`; add `--min-severity info` to see them.
19
- `mock-call-order` flags a call count or order asserted on a double of the
20
- code's own module; `private-access` flags `_private` reads and test-only
19
+ `mock-call-order` flags a call order asserted on any double, and a call
20
+ count on a double of the code's own module; `private-access` flags `_private` reads and test-only
21
21
  imports. Both pin how the code works, not what it does.
22
22
  2. Triage every finding with "Name the Break": which wrong production change
23
23
  should make this test fail? Then choose one, and say which:
package/dist/plugin.js CHANGED
@@ -535,6 +535,18 @@ function prefixIssues(path, issues) {
535
535
  function unwrapMessage(message) {
536
536
  return typeof message === "string" ? message : message?.message;
537
537
  }
538
+ function sizeCaps(defChecks) {
539
+ const caps = [];
540
+ for (const ch of defChecks ?? []) {
541
+ const d = ch._zod.def;
542
+ if (!/_(length|size)$|_equals$/.test(d.check))
543
+ break;
544
+ const max = d.maximum ?? d.length ?? d.size;
545
+ if (max >= 0)
546
+ caps.push([max, ch]);
547
+ }
548
+ return caps;
549
+ }
538
550
  function attachSchema(issues, start, inst) {
539
551
  var _a;
540
552
  for (let i = start;i < issues.length; i++) {
@@ -1532,7 +1544,7 @@ ${content.join(`
1532
1544
  var version = {
1533
1545
  major: 4,
1534
1546
  minor: 6,
1535
- patch: 5
1547
+ patch: 7
1536
1548
  };
1537
1549
 
1538
1550
  // node_modules/zod/v4/core/schemas.js
@@ -2084,6 +2096,29 @@ var $ZodNever = /* @__PURE__ */ $constructor("$ZodNever", (inst, def) => {
2084
2096
  return payload;
2085
2097
  };
2086
2098
  });
2099
+ function capSize(inst, size) {
2100
+ const caps = sizeCaps(inst._zod.def.checks);
2101
+ if (!caps.length)
2102
+ return;
2103
+ const cap = Math.min(...caps.map((c) => c[0]));
2104
+ const parse = inst._zod.parse;
2105
+ inst._zod.parse = (payload, ctx) => {
2106
+ const n = size(payload.value);
2107
+ if (n > cap && !ctx?.skipChecks && ctx?.direction !== "backward") {
2108
+ for (const [max, ch] of sizeCaps(inst._zod.def.checks)) {
2109
+ if (n > max && ch._zod.def.when(payload)) {
2110
+ const start = payload.issues.length;
2111
+ ch._zod.check(payload);
2112
+ payload.issues[start].continue = false;
2113
+ attachSchema(payload.issues, start, inst);
2114
+ return payload;
2115
+ }
2116
+ }
2117
+ }
2118
+ return parse(payload, ctx);
2119
+ };
2120
+ }
2121
+ var arraySize = (input) => Array.isArray(input) ? input.length : -1;
2087
2122
  function handleArrayResult(result, final, index) {
2088
2123
  if (result.issues.length) {
2089
2124
  final.issues.push(...prefixIssues(index, result.issues));
@@ -2127,6 +2162,7 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
2127
2162
  }
2128
2163
  return payload;
2129
2164
  };
2165
+ capSize(inst, arraySize);
2130
2166
  });
2131
2167
  function handlePropertyResult(result, final, key, input, optin, optout) {
2132
2168
  const isPresent = key in input;
@@ -11942,7 +11978,7 @@ function normalizeMaxBytes(value, options = {}) {
11942
11978
  if (selected === undefined || selected === Number.POSITIVE_INFINITY)
11943
11979
  return selected;
11944
11980
  if (!Number.isSafeInteger(selected) || selected < 0) {
11945
- throw new RangeError(`${options.label ?? "maxBytes"} must be a non-negative safe integer or Infinity`);
11981
+ throw new RangeError("maxBytes must be a non-negative safe integer or Infinity");
11946
11982
  }
11947
11983
  return selected;
11948
11984
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workit-dev/opencode",
3
- "version": "2.21.1",
3
+ "version": "2.21.3",
4
4
  "private": false,
5
5
  "description": "Workit OpenCode plugin — native tools, adaptive policy, and sixteen method skills",
6
6
  "keywords": [
@@ -40,8 +40,8 @@
40
40
  "typecheck": "tsc --noEmit"
41
41
  },
42
42
  "devDependencies": {
43
- "@opencode/plugin": "2.0.18",
44
- "@workit-dev/core": "^2.21.1"
43
+ "@opencode/plugin": "2.3.2",
44
+ "@workit-dev/core": "^2.21.3"
45
45
  },
46
46
  "engines": {
47
47
  "node": ">=24"