@brainervirus/workit-claude-code 8.35.2 → 8.37.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/bin/workit-hook.mjs +101 -3
- package/dist/workit-hook.js +95 -91
- package/dist/workit.js +23 -9
- package/hooks/hooks.json +24 -1
- package/package.json +3 -3
- package/skills/implement/SKILL.md +1 -1
- package/skills/ship/SKILL.md +1 -1
package/dist/workit.js
CHANGED
|
@@ -9317,7 +9317,7 @@ var package_default;
|
|
|
9317
9317
|
var init_package = __esm(() => {
|
|
9318
9318
|
package_default = {
|
|
9319
9319
|
name: "@brainervirus/workit-cli",
|
|
9320
|
-
version: "8.
|
|
9320
|
+
version: "8.37.0",
|
|
9321
9321
|
private: false,
|
|
9322
9322
|
description: "Workit CLI — setup wizard, doctor, and task control for agentic coding workflows",
|
|
9323
9323
|
keywords: [
|
|
@@ -9355,13 +9355,13 @@ var init_package = __esm(() => {
|
|
|
9355
9355
|
},
|
|
9356
9356
|
dependencies: {
|
|
9357
9357
|
"@babel/parser": "7.29.9",
|
|
9358
|
-
"@brainervirus/workit-cursor": "^8.
|
|
9358
|
+
"@brainervirus/workit-cursor": "^8.37.0",
|
|
9359
9359
|
"@inkjs/ui": "2.0.0",
|
|
9360
9360
|
ink: "7.1.1",
|
|
9361
9361
|
react: "19.2.8"
|
|
9362
9362
|
},
|
|
9363
9363
|
devDependencies: {
|
|
9364
|
-
"@brainervirus/workit-core": "^8.
|
|
9364
|
+
"@brainervirus/workit-core": "^8.37.0"
|
|
9365
9365
|
},
|
|
9366
9366
|
engines: {
|
|
9367
9367
|
node: ">=24"
|
|
@@ -77639,6 +77639,7 @@ var exports_check = {};
|
|
|
77639
77639
|
__export(exports_check, {
|
|
77640
77640
|
OUTPUT_LINES: () => OUTPUT_LINES,
|
|
77641
77641
|
boundedOutput: () => boundedOutput,
|
|
77642
|
+
countWarnings: () => countWarnings,
|
|
77642
77643
|
hostToolWaitCapMs: () => hostToolWaitCapMs,
|
|
77643
77644
|
run: () => run12,
|
|
77644
77645
|
workspaceResources: () => workspaceResources
|
|
@@ -77823,6 +77824,10 @@ function boundedArgv(argv) {
|
|
|
77823
77824
|
const truncated = cut.length !== argv.length || cut.some((item, index) => item !== argv[index]);
|
|
77824
77825
|
return { argv: cut, truncated };
|
|
77825
77826
|
}
|
|
77827
|
+
function countWarnings(log) {
|
|
77828
|
+
return redactLog(log).replace(ANSI_COLOR, "").split(`
|
|
77829
|
+
`).filter((line) => WARNING_LINE.test(line) && !NO_WARNINGS.test(line)).length;
|
|
77830
|
+
}
|
|
77826
77831
|
function boundedOutput(log, lines) {
|
|
77827
77832
|
const all = tailLines(log, Number.MAX_SAFE_INTEGER);
|
|
77828
77833
|
if (all.length === 0)
|
|
@@ -78079,6 +78084,7 @@ async function run12(argv, io) {
|
|
|
78079
78084
|
};
|
|
78080
78085
|
const storeDir = io.env.WORKFLOW_WORKSPACE_ROOT || top;
|
|
78081
78086
|
const task = await recordInTask(io, storeDir, options.task, observation, unblockFor);
|
|
78087
|
+
const warnings = countWarnings(result.log);
|
|
78082
78088
|
const data = {
|
|
78083
78089
|
evidenceId: task.evidenceId,
|
|
78084
78090
|
ledgerRowId: observation.ledgerRowId,
|
|
@@ -78099,6 +78105,7 @@ async function run12(argv, io) {
|
|
|
78099
78105
|
logPath,
|
|
78100
78106
|
logTail: tail,
|
|
78101
78107
|
outputBytes: result.outputBytes,
|
|
78108
|
+
warnings,
|
|
78102
78109
|
logTruncated: result.truncated,
|
|
78103
78110
|
task: task.task,
|
|
78104
78111
|
lease: heavy?.leaseReport ?? null,
|
|
@@ -78113,7 +78120,7 @@ async function run12(argv, io) {
|
|
|
78113
78120
|
const code = !passed ? "failed" : recordError ? recordError.code : "ok";
|
|
78114
78121
|
const error = !passed ? result.timedOut ? `timed out after ${options.timeoutMs} ms` : result.spawnError ? `cannot start ${command[0]}: ${result.spawnError}` : `exited ${result.exitCode}` : recordError?.message;
|
|
78115
78122
|
const label = name ?? command.join(" ");
|
|
78116
|
-
const summary = `workit check ${label}: ${passed ? "passed, exit 0" : error ?? "failed"} in ${result.durationMs} ms (${configured ? "configured" : "ad-hoc"}${name && !configured && config.checks.some((item) => item.name === name) ? `; not the configured command for "${name}"` : ""}); ${task.evidenceId ? `evidence ${task.evidenceId} on task ${task.task?.id}` : task.note ?? (task.error ? `task: ${task.error.message}` : "ledger only")}; log: ${logPath ?? "not stored"}`;
|
|
78123
|
+
const summary = `workit check ${label}: ${passed ? "passed, exit 0" : error ?? "failed"} in ${result.durationMs} ms (${configured ? "configured" : "ad-hoc"}${warnings ? `; warnings: ${warnings}` : ""}${name && !configured && config.checks.some((item) => item.name === name) ? `; not the configured command for "${name}"` : ""}); ${task.evidenceId ? `evidence ${task.evidenceId} on task ${task.task?.id}` : task.note ?? (task.error ? `task: ${task.error.message}` : "ledger only")}; log: ${logPath ?? "not stored"}`;
|
|
78117
78124
|
if (io.json)
|
|
78118
78125
|
io.stdout(`${JSON.stringify({ ok: code === "ok", code, data, ...error ? { error } : {}, ...task.stillUnsatisfied[0] ? { unblock: task.stillUnsatisfied[0].unblock } : {} })}
|
|
78119
78126
|
`);
|
|
@@ -78136,7 +78143,7 @@ async function run12(argv, io) {
|
|
|
78136
78143
|
return recordError.code === "busy" ? 4 : recordError.code === "invalid_input" ? 2 : 5;
|
|
78137
78144
|
return 0;
|
|
78138
78145
|
}
|
|
78139
|
-
var USAGE5 = 'workit check <name> [--full] [--no-lease --reason "<why>"] | workit check [--name <n>] [--shell] [--heavy] [--full] [--wait <s>] [--timeout <s>] [--task <id>] [--json] -- <cmd…>', OUTPUT_LINES = 60, MAX_UNVERIFIED_RUN_MS, RECORD_TAIL_LINES = 20, RECORD_TAIL_CHARS = 200, posix = (value) => value.split(path50.sep).join("/") || ".", ENGINE_CODES2, FINGERPRINT_VARS, HOST_TOOL_WAIT_CAP_MS = 1e5;
|
|
78146
|
+
var USAGE5 = 'workit check <name> [--full] [--no-lease --reason "<why>"] | workit check [--name <n>] [--shell] [--heavy] [--full] [--wait <s>] [--timeout <s>] [--task <id>] [--json] -- <cmd…>', OUTPUT_LINES = 60, MAX_UNVERIFIED_RUN_MS, RECORD_TAIL_LINES = 20, RECORD_TAIL_CHARS = 200, posix = (value) => value.split(path50.sep).join("/") || ".", ENGINE_CODES2, FINGERPRINT_VARS, ANSI_COLOR, WARNING_LINE, NO_WARNINGS, HOST_TOOL_WAIT_CAP_MS = 1e5;
|
|
78140
78147
|
var init_check = __esm(() => {
|
|
78141
78148
|
init_check_config();
|
|
78142
78149
|
init_checks3();
|
|
@@ -78154,6 +78161,9 @@ var init_check = __esm(() => {
|
|
|
78154
78161
|
permission_denied: "blocked"
|
|
78155
78162
|
};
|
|
78156
78163
|
FINGERPRINT_VARS = ["CI", "NODE_ENV", "npm_config_script_shell", "NODE_OPTIONS", "SHELL"];
|
|
78164
|
+
ANSI_COLOR = new RegExp(`${String.fromCharCode(27)}\\[[0-9;]*m`, "g");
|
|
78165
|
+
WARNING_LINE = /^\s*(?:⚠|\[(?:WARN|WARNING|warn|warning)\]|(?:npm\s+)?(?:WARN\s|warn\s)|warn(?:ing)?(?:\[[^\]]*\])?:|\d+:\d+\s+warning\s|\S+\(\d+,\d+\):\s*warning\s|\S+:\d+:\d+:\s*warning\b)/;
|
|
78166
|
+
NO_WARNINGS = /\b(?:no|0|zero|none)\s+warnings?\b/i;
|
|
78157
78167
|
});
|
|
78158
78168
|
|
|
78159
78169
|
// packages/workit-cli/src/verbs/lock.ts
|
|
@@ -87867,7 +87877,7 @@ function renderBrief(cwd, plan, input) {
|
|
|
87867
87877
|
...verifier ? [
|
|
87868
87878
|
` verifier: model ${verifier.model}${verifier.effort ? ` effort ${verifier.effort}` : ""} (${verifier.source})`
|
|
87869
87879
|
] : [],
|
|
87870
|
-
`TIMEBOX: ${slice.timebox
|
|
87880
|
+
`TIMEBOX: ${timeboxText(slice.timebox)}; past it without a new commit you will be replaced`,
|
|
87871
87881
|
scratchLine,
|
|
87872
87882
|
`FORBIDDEN: ${slice.forbidden.join("; ")}`,
|
|
87873
87883
|
...fanIn,
|
|
@@ -87902,7 +87912,10 @@ function renderBrief(cwd, plan, input) {
|
|
|
87902
87912
|
}
|
|
87903
87913
|
};
|
|
87904
87914
|
}
|
|
87905
|
-
var DEFAULT_TIMEBOX = "30 minutes",
|
|
87915
|
+
var DEFAULT_TIMEBOX = "30 minutes", DEFAULT_TOOL_CALLS = 120, timeboxText = (timebox) => {
|
|
87916
|
+
const text = timebox ?? DEFAULT_TIMEBOX;
|
|
87917
|
+
return /\b\d+\s+tool calls\b/u.test(text) ? text : `${text}, ${DEFAULT_TOOL_CALLS} tool calls`;
|
|
87918
|
+
}, REPORT, identityOf = (host) => {
|
|
87906
87919
|
const family = host?.replace(/_(?:cli|desktop)$/, "") ?? "";
|
|
87907
87920
|
if (family === "claude_code")
|
|
87908
87921
|
return "issued";
|
|
@@ -88414,9 +88427,10 @@ var init_fanout_check = __esm(() => {
|
|
|
88414
88427
|
|
|
88415
88428
|
// packages/workit-core/src/fanout-status.ts
|
|
88416
88429
|
function timeboxMs(text) {
|
|
88417
|
-
|
|
88430
|
+
const time = text?.replace(/[\s,;]*\b\d+\s+tool calls\b[\s,;]*/gu, " ").trim();
|
|
88431
|
+
if (!time || /^\d+(?:\.\d+)?$/u.test(time))
|
|
88418
88432
|
return null;
|
|
88419
|
-
const ms = parseDuration2(
|
|
88433
|
+
const ms = parseDuration2(time);
|
|
88420
88434
|
return ms && ms > 0 ? ms : null;
|
|
88421
88435
|
}
|
|
88422
88436
|
function activity(cwd, plan, slice, rows) {
|
package/hooks/hooks.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"description": "Workit host hooks: task context on session start (incl. compaction restore and forks) and when it changes per turn, branch policy and raw git/forge steering (deny gate bypasses, nudge routine commands) on shell commands, the heavy-command gate (a heavy shell command runs under the machine-wide heavy-check lease, a chain with heavy parts is split, a command a permission rule names is left to Claude Code), the before-write gate on file edits and shell writes, recording raw git commits for the session after they run, worktree guidance for subagents, the role's default model and effort on a subagent spawn that names none, one continuation when the agent stops with a provable unmet delivery obligation, a one-line skill nudge on prompts and delivery commands, and recording each Workit skill load. Only events that change Claude's behavior are registered.",
|
|
2
|
+
"description": "Workit host hooks: task context on session start (incl. compaction restore and forks) and when it changes per turn, branch policy and raw git/forge steering (deny gate bypasses, nudge routine commands) on shell commands, the heavy-command gate (a heavy shell command runs under the machine-wide heavy-check lease, a chain with heavy parts is split, a command a permission rule names is left to Claude Code), the before-write gate on file edits and shell writes, recording raw git commits for the session after they run, worktree guidance for subagents, the role's default model and effort on a subagent spawn that names none, one continuation when the agent stops with a provable unmet delivery obligation, a one-line skill nudge on prompts and delivery commands, and recording each Workit skill load, and counting a budgeted worker's tool calls (Read, Grep and Glob included) so its brief's tool-call budget is told once (its budget files go when it stops). Only events that change Claude's behavior are registered.",
|
|
3
3
|
"hooks": {
|
|
4
4
|
"SessionStart": [
|
|
5
5
|
{
|
|
@@ -71,6 +71,17 @@
|
|
|
71
71
|
}
|
|
72
72
|
]
|
|
73
73
|
},
|
|
74
|
+
{
|
|
75
|
+
"matcher": "Read|Grep|Glob",
|
|
76
|
+
"hooks": [
|
|
77
|
+
{
|
|
78
|
+
"type": "command",
|
|
79
|
+
"command": "node",
|
|
80
|
+
"args": ["${CLAUDE_PLUGIN_ROOT}/bin/workit-hook.mjs"],
|
|
81
|
+
"timeout": 15
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
},
|
|
74
85
|
{
|
|
75
86
|
"matcher": "Skill",
|
|
76
87
|
"hooks": [
|
|
@@ -119,6 +130,18 @@
|
|
|
119
130
|
}
|
|
120
131
|
]
|
|
121
132
|
}
|
|
133
|
+
],
|
|
134
|
+
"SubagentStop": [
|
|
135
|
+
{
|
|
136
|
+
"hooks": [
|
|
137
|
+
{
|
|
138
|
+
"type": "command",
|
|
139
|
+
"command": "node",
|
|
140
|
+
"args": ["${CLAUDE_PLUGIN_ROOT}/bin/workit-hook.mjs"],
|
|
141
|
+
"timeout": 15
|
|
142
|
+
}
|
|
143
|
+
]
|
|
144
|
+
}
|
|
122
145
|
]
|
|
123
146
|
}
|
|
124
147
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brainervirus/workit-claude-code",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.37.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": "^8.
|
|
43
|
-
"@brainervirus/workit-core": "^8.
|
|
42
|
+
"@brainervirus/workit-cli": "^8.37.0",
|
|
43
|
+
"@brainervirus/workit-core": "^8.37.0"
|
|
44
44
|
},
|
|
45
45
|
"engines": {
|
|
46
46
|
"node": ">=24"
|
|
@@ -23,7 +23,7 @@ description: Build a requested change in small verified steps - follow local pat
|
|
|
23
23
|
(`workit check test`, plus `lint` and `typecheck` when the repo has them),
|
|
24
24
|
not after every edit. Heavy work runs under one machine-wide lease: an ad-hoc
|
|
25
25
|
suite is `workit check --heavy -- <cmd>`, never a hand-made flock; a busy
|
|
26
|
-
lease waits and names its holder (`workit lock status`).
|
|
26
|
+
lease waits and names its holder (`workit lock status`). A tool warning is a finding: fix it in this PR in the right layer, or record the false positive with evidence; pre-existing ones get their own PR.
|
|
27
27
|
5. Prove the feature on its real surface with the project's `verify-<app>`
|
|
28
28
|
skill; none yet? Write one (call the Skill tool with `workit:verify-app`). Tests show branch behavior,
|
|
29
29
|
not that the feature works. The report carries what you observed: a UI
|
package/skills/ship/SKILL.md
CHANGED
|
@@ -49,7 +49,7 @@ the same check. Fix round and recheck both failed: a decider (call the Skill too
|
|
|
49
49
|
5. **CI.** Local gates mirror CI: push and continue; `workit ci wait` once on
|
|
50
50
|
the final head, in the background where the host allows. Red: read `logTail`, classify. Flake or infra: one
|
|
51
51
|
`workit ci rerun --failed --reason flake|infra` per head. Real: reproduce
|
|
52
|
-
with `workit check`, fix the root cause, batch every fix in one push.
|
|
52
|
+
with `workit check`, fix the root cause, batch every fix in one push. A tool warning is a finding: fix it in this PR in the right layer, or record the false positive with evidence; pre-existing ones get their own PR.
|
|
53
53
|
6. **Verified.** The lane in `workit pr status` decides: none, no verdict; self, your `--self` verdict; focused or full (or `verification: self|independent`), one non-author verifier per PR after the last push, never per push (call the Skill tool with `workit:review`), on Claude Code with the `model` and `effort` of `workit models show --role verifier`. A docs-only push (or test-only under a unit verdict) keeps the verdict (`carried`); `reverify: focused` re-checks only the new diff, reusing green CI; one verdict at a stack's top covers its unchanged lower PRs. Land only when
|
|
54
54
|
granted: `workit stack land` or `workit pr merge`; `--unverified --reason` if user-asked.
|
|
55
55
|
7. **Observe it landed:** `workit verify-delivery pr` or `merge`. After a failed
|