@workit-dev/pi 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/dist/worker.js +37 -1
- package/dist/workit.js +38 -2
- package/package.json +2 -2
- package/skills/workit-deslop/SKILL.md +4 -4
- package/skills/workit-fanout/references/brief.md +8 -2
- package/skills/workit-fanout/references/orchestration.md +3 -1
- package/skills/workit-implement/SKILL.md +2 -2
- package/skills/workit-shape/references/knowledge.md +1 -1
- package/skills/workit-test-audit/SKILL.md +2 -2
package/dist/worker.js
CHANGED
|
@@ -351,6 +351,18 @@ function prefixIssues(path, issues) {
|
|
|
351
351
|
function unwrapMessage(message) {
|
|
352
352
|
return typeof message === "string" ? message : message?.message;
|
|
353
353
|
}
|
|
354
|
+
function sizeCaps(defChecks) {
|
|
355
|
+
const caps = [];
|
|
356
|
+
for (const ch of defChecks ?? []) {
|
|
357
|
+
const d = ch._zod.def;
|
|
358
|
+
if (!/_(length|size)$|_equals$/.test(d.check))
|
|
359
|
+
break;
|
|
360
|
+
const max = d.maximum ?? d.length ?? d.size;
|
|
361
|
+
if (max >= 0)
|
|
362
|
+
caps.push([max, ch]);
|
|
363
|
+
}
|
|
364
|
+
return caps;
|
|
365
|
+
}
|
|
354
366
|
function attachSchema(issues, start, inst) {
|
|
355
367
|
var _a;
|
|
356
368
|
for (let i = start;i < issues.length; i++) {
|
|
@@ -1348,7 +1360,7 @@ ${content.join(`
|
|
|
1348
1360
|
var version = {
|
|
1349
1361
|
major: 4,
|
|
1350
1362
|
minor: 6,
|
|
1351
|
-
patch:
|
|
1363
|
+
patch: 7
|
|
1352
1364
|
};
|
|
1353
1365
|
|
|
1354
1366
|
// node_modules/zod/v4/core/schemas.js
|
|
@@ -1900,6 +1912,29 @@ var $ZodNever = /* @__PURE__ */ $constructor("$ZodNever", (inst, def) => {
|
|
|
1900
1912
|
return payload;
|
|
1901
1913
|
};
|
|
1902
1914
|
});
|
|
1915
|
+
function capSize(inst, size) {
|
|
1916
|
+
const caps = sizeCaps(inst._zod.def.checks);
|
|
1917
|
+
if (!caps.length)
|
|
1918
|
+
return;
|
|
1919
|
+
const cap = Math.min(...caps.map((c) => c[0]));
|
|
1920
|
+
const parse = inst._zod.parse;
|
|
1921
|
+
inst._zod.parse = (payload, ctx) => {
|
|
1922
|
+
const n = size(payload.value);
|
|
1923
|
+
if (n > cap && !ctx?.skipChecks && ctx?.direction !== "backward") {
|
|
1924
|
+
for (const [max, ch] of sizeCaps(inst._zod.def.checks)) {
|
|
1925
|
+
if (n > max && ch._zod.def.when(payload)) {
|
|
1926
|
+
const start = payload.issues.length;
|
|
1927
|
+
ch._zod.check(payload);
|
|
1928
|
+
payload.issues[start].continue = false;
|
|
1929
|
+
attachSchema(payload.issues, start, inst);
|
|
1930
|
+
return payload;
|
|
1931
|
+
}
|
|
1932
|
+
}
|
|
1933
|
+
}
|
|
1934
|
+
return parse(payload, ctx);
|
|
1935
|
+
};
|
|
1936
|
+
}
|
|
1937
|
+
var arraySize = (input) => Array.isArray(input) ? input.length : -1;
|
|
1903
1938
|
function handleArrayResult(result, final, index) {
|
|
1904
1939
|
if (result.issues.length) {
|
|
1905
1940
|
final.issues.push(...prefixIssues(index, result.issues));
|
|
@@ -1943,6 +1978,7 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
|
|
|
1943
1978
|
}
|
|
1944
1979
|
return payload;
|
|
1945
1980
|
};
|
|
1981
|
+
capSize(inst, arraySize);
|
|
1946
1982
|
});
|
|
1947
1983
|
function handlePropertyResult(result, final, key, input, optin, optout) {
|
|
1948
1984
|
const isPresent = key in input;
|
package/dist/workit.js
CHANGED
|
@@ -356,6 +356,18 @@ function prefixIssues(path, issues) {
|
|
|
356
356
|
function unwrapMessage(message) {
|
|
357
357
|
return typeof message === "string" ? message : message?.message;
|
|
358
358
|
}
|
|
359
|
+
function sizeCaps(defChecks) {
|
|
360
|
+
const caps = [];
|
|
361
|
+
for (const ch of defChecks ?? []) {
|
|
362
|
+
const d = ch._zod.def;
|
|
363
|
+
if (!/_(length|size)$|_equals$/.test(d.check))
|
|
364
|
+
break;
|
|
365
|
+
const max = d.maximum ?? d.length ?? d.size;
|
|
366
|
+
if (max >= 0)
|
|
367
|
+
caps.push([max, ch]);
|
|
368
|
+
}
|
|
369
|
+
return caps;
|
|
370
|
+
}
|
|
359
371
|
function attachSchema(issues, start, inst) {
|
|
360
372
|
var _a;
|
|
361
373
|
for (let i = start;i < issues.length; i++) {
|
|
@@ -1353,7 +1365,7 @@ ${content.join(`
|
|
|
1353
1365
|
var version = {
|
|
1354
1366
|
major: 4,
|
|
1355
1367
|
minor: 6,
|
|
1356
|
-
patch:
|
|
1368
|
+
patch: 7
|
|
1357
1369
|
};
|
|
1358
1370
|
|
|
1359
1371
|
// node_modules/zod/v4/core/schemas.js
|
|
@@ -1905,6 +1917,29 @@ var $ZodNever = /* @__PURE__ */ $constructor("$ZodNever", (inst, def) => {
|
|
|
1905
1917
|
return payload;
|
|
1906
1918
|
};
|
|
1907
1919
|
});
|
|
1920
|
+
function capSize(inst, size) {
|
|
1921
|
+
const caps = sizeCaps(inst._zod.def.checks);
|
|
1922
|
+
if (!caps.length)
|
|
1923
|
+
return;
|
|
1924
|
+
const cap = Math.min(...caps.map((c) => c[0]));
|
|
1925
|
+
const parse = inst._zod.parse;
|
|
1926
|
+
inst._zod.parse = (payload, ctx) => {
|
|
1927
|
+
const n = size(payload.value);
|
|
1928
|
+
if (n > cap && !ctx?.skipChecks && ctx?.direction !== "backward") {
|
|
1929
|
+
for (const [max, ch] of sizeCaps(inst._zod.def.checks)) {
|
|
1930
|
+
if (n > max && ch._zod.def.when(payload)) {
|
|
1931
|
+
const start = payload.issues.length;
|
|
1932
|
+
ch._zod.check(payload);
|
|
1933
|
+
payload.issues[start].continue = false;
|
|
1934
|
+
attachSchema(payload.issues, start, inst);
|
|
1935
|
+
return payload;
|
|
1936
|
+
}
|
|
1937
|
+
}
|
|
1938
|
+
}
|
|
1939
|
+
return parse(payload, ctx);
|
|
1940
|
+
};
|
|
1941
|
+
}
|
|
1942
|
+
var arraySize = (input) => Array.isArray(input) ? input.length : -1;
|
|
1908
1943
|
function handleArrayResult(result, final, index) {
|
|
1909
1944
|
if (result.issues.length) {
|
|
1910
1945
|
final.issues.push(...prefixIssues(index, result.issues));
|
|
@@ -1948,6 +1983,7 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
|
|
|
1948
1983
|
}
|
|
1949
1984
|
return payload;
|
|
1950
1985
|
};
|
|
1986
|
+
capSize(inst, arraySize);
|
|
1951
1987
|
});
|
|
1952
1988
|
function handlePropertyResult(result, final, key, input, optin, optout) {
|
|
1953
1989
|
const isPresent = key in input;
|
|
@@ -11687,7 +11723,7 @@ function normalizeMaxBytes(value, options = {}) {
|
|
|
11687
11723
|
if (selected === undefined || selected === Number.POSITIVE_INFINITY)
|
|
11688
11724
|
return selected;
|
|
11689
11725
|
if (!Number.isSafeInteger(selected) || selected < 0) {
|
|
11690
|
-
throw new RangeError(
|
|
11726
|
+
throw new RangeError("maxBytes must be a non-negative safe integer or Infinity");
|
|
11691
11727
|
}
|
|
11692
11728
|
return selected;
|
|
11693
11729
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workit-dev/pi",
|
|
3
|
-
"version": "2.21.
|
|
3
|
+
"version": "2.21.3",
|
|
4
4
|
"description": "Workit native extension for Pi — tools, method skills, and session continuity",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agentic-coding",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"build": "bun scripts/build.ts"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@earendil-works/pi-coding-agent": "1.
|
|
35
|
+
"@earendil-works/pi-coding-agent": "1.6.0"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"@earendil-works/pi-coding-agent": "^1.4.0"
|
|
@@ -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
|
|
23
|
-
|
|
24
|
-
|
|
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
|
(read the `workit-test-audit` skill's SKILL.md and follow it).
|
|
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
|
-
- `
|
|
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;
|
|
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 | `
|
|
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
|
|
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:
|