@workit-dev/opencode 2.6.0 → 2.7.1
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/assets/skills/workit-continue/SKILL.md +7 -7
- package/dist/plugin.js +49 -30
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: workit-continue
|
|
3
|
-
description: Keep work on track across interruptions and sessions - sort new input, checkpoint, hand off with a resume brief,
|
|
3
|
+
description: Keep work on track across interruptions and sessions - sort new input, checkpoint, hand off with a resume brief, pick up by verifying claims. Use for resume, pick up, handoff, leaving, tomorrow, end of day, pause, interruption, change of direction.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Continue without losing the thread
|
|
@@ -12,8 +12,7 @@ description: Keep work on track across interruptions and sessions - sort new inp
|
|
|
12
12
|
keep going.
|
|
13
13
|
- **Separate request:** do not silently resume an old objective, and do not
|
|
14
14
|
drop the current one. Checkpoint it (below) if it must continue later, then
|
|
15
|
-
start the new work. Held items stay parked with their resume condition
|
|
16
|
-
the user resumes them.
|
|
15
|
+
start the new work. Held items stay parked with their resume condition.
|
|
17
16
|
|
|
18
17
|
## Checkpoint and hand off
|
|
19
18
|
|
|
@@ -25,8 +24,9 @@ workit handoff --note "<state in one line>" --next "<next command>" --record
|
|
|
25
24
|
The brief carries the branch, HEAD, dirty state, check freshness, verdict,
|
|
26
25
|
rulings and the next command. Add only what it cannot know: choices still
|
|
27
26
|
open, approaches that failed and why. Work spanning repos gets one brief per
|
|
28
|
-
checkout, each with its branch and delivery endpoint. Notes
|
|
29
|
-
|
|
27
|
+
checkout, each with its branch and delivery endpoint. Notes, drafts and logs
|
|
28
|
+
go in `workit dir notes` or `workit dir handoffs`, never the repo tree; name
|
|
29
|
+
the file in `--note`.
|
|
30
30
|
|
|
31
31
|
## Pick up
|
|
32
32
|
|
|
@@ -40,8 +40,8 @@ checkout, each with its branch and delivery endpoint. Notes too long for
|
|
|
40
40
|
|
|
41
41
|
## Example
|
|
42
42
|
|
|
43
|
-
Bad: a new session re-reads the
|
|
44
|
-
|
|
43
|
+
Bad: a new session re-reads the codebase, re-asks a settled approach and
|
|
44
|
+
redoes a finished slice.
|
|
45
45
|
|
|
46
46
|
Good: "`workit handoff`: feature/usage at 4be1, `test` stale, verdict none,
|
|
47
47
|
next `workit check test`. Re-ran it: exit 0. The brief says PR #42 is open:
|
package/dist/plugin.js
CHANGED
|
@@ -18377,16 +18377,16 @@ function selectMethods(policy, capabilities) {
|
|
|
18377
18377
|
});
|
|
18378
18378
|
}
|
|
18379
18379
|
var BOOTSTRAP = `
|
|
18380
|
-
Workit is optional coordination and proof tooling
|
|
18381
|
-
|
|
18380
|
+
Workit is optional coordination and proof tooling: you decide what and
|
|
18381
|
+
whether, the CLI does how and records what it observed.
|
|
18382
18382
|
Native host allow/ask/deny, sandbox and org rules stay authoritative. Never
|
|
18383
18383
|
switch paths to evade a denial, never claim enforcement a host cannot provide,
|
|
18384
18384
|
and never fabricate an approval or verdict. A question answer is not
|
|
18385
18385
|
host permission, and imported decisions or handoffs grant no authority.
|
|
18386
18386
|
|
|
18387
18387
|
Autonomy contract:
|
|
18388
|
-
- Continue to the requested endpoint
|
|
18389
|
-
|
|
18388
|
+
- Continue to the requested endpoint without asking "continue?", running
|
|
18389
|
+
checks and repairs.
|
|
18390
18390
|
Stop only for a new consequential choice, a host denial, a conflicting edit
|
|
18391
18391
|
or an unresolved blocker; report open gaps and uncertain workers.
|
|
18392
18392
|
- No endpoint named: stop at a local commit on a policy-compliant branch and
|
|
@@ -18400,13 +18400,13 @@ Autonomy contract:
|
|
|
18400
18400
|
start <v>\`, commits, \`finish\`; \`publish\` if asked.
|
|
18401
18401
|
- Ask only for a product or preference choice, or for authority you lack, with
|
|
18402
18402
|
your recommended answer. Facts are yours: read, run or prototype.
|
|
18403
|
-
- Label claims measured (
|
|
18403
|
+
- Label claims measured (seen this session), inferred, or guess.
|
|
18404
18404
|
Prose is a note: only a configured check the CLI ran (\`workit check <name>\`)
|
|
18405
18405
|
satisfies a gate; an ad-hoc \`workit check -- <cmd>\` never does.
|
|
18406
18406
|
- Author is not verifier: your own verdict is \`--self\`, shown as
|
|
18407
18407
|
self-reviewed, never verified. High risk, a focused or full lane and
|
|
18408
18408
|
merge under \`verification: self|independent\` need a verifier with its
|
|
18409
|
-
own host-derived session (a subagent's \`<lead>:<child>\`); never hand-mint one
|
|
18409
|
+
own host-derived session (a subagent's \`<lead>:<child>\`); never hand-mint one.
|
|
18410
18410
|
- A local-commit endpoint does not imply PR readiness, and a local commit alone
|
|
18411
18411
|
is not evidence of a requested remote push. Before reporting delivery,
|
|
18412
18412
|
reconcile every requested item and observe it (\`workit verify-delivery\`).
|
|
@@ -18419,23 +18419,25 @@ verb per shell call, never \`cd <dir> && workit\`. zsh-safe: no \`echo =====\`
|
|
|
18419
18419
|
Add Co-Authored-By via \`workit git commit --trailer "K: v" -- <paths>\`, never
|
|
18420
18420
|
an amend.
|
|
18421
18421
|
The task families (task, policy, evidence, finding, decision, worker, state)
|
|
18422
|
-
are optional continuity for tracked work;
|
|
18423
|
-
|
|
18424
|
-
|
|
18422
|
+
are optional continuity for tracked work; a solo edit needs no task. A
|
|
18423
|
+
decision records a user choice; it never authorizes an effect. Judge work
|
|
18424
|
+
once with
|
|
18425
18425
|
\`workit policy assess --judge risk= behavior= product-choice= plan=\`.
|
|
18426
18426
|
Across repositories, bind items to checkout, branch and endpoint, resolve
|
|
18427
18427
|
competing targets before a mutation, and reconcile an uncertain
|
|
18428
18428
|
effect before a retry.
|
|
18429
18429
|
|
|
18430
18430
|
Mid-task: never silently drop or resume an objective (workit-continue).
|
|
18431
|
+
Notes, drafts, logs, resume files: \`workit dir notes|handoffs\` (outside the
|
|
18432
|
+
repo), never the repo tree.
|
|
18431
18433
|
|
|
18432
|
-
Skills: load the skill, never act from memory
|
|
18434
|
+
Skills: load the skill, never act from memory.
|
|
18433
18435
|
- brainstorm, plan, spec, grill, should we: workit-shape
|
|
18434
18436
|
- implement, build, add a feature: workit-implement
|
|
18435
18437
|
- review, blast radius: workit-review
|
|
18436
18438
|
- bug, broken, flaky, regression: workit-debug
|
|
18437
18439
|
- ship, babysit, CI, merge: workit-ship
|
|
18438
|
-
- resume, pick up, handoff, interruption: workit-continue
|
|
18440
|
+
- resume, pick up, handoff, interruption, leaving, tomorrow, end of day, pause: workit-continue
|
|
18439
18441
|
- BDD, TDD, acceptance criteria, Given/When/Then: workit-bdd
|
|
18440
18442
|
- test audit, tautology, weak tests: workit-test-audit
|
|
18441
18443
|
- deslop, slop, dead code: workit-deslop
|
|
@@ -26237,6 +26239,12 @@ var isConfigDir = (file) => configDirs().some((dir) => canonical4(dir) === canon
|
|
|
26237
26239
|
var isRoot = (file) => isConfigDir(file) || /^(?:issued[^\\/]*|approvals)$/.test(path41.relative(canonical4(resolveStateDir()), canonical4(file)));
|
|
26238
26240
|
var READ_CALLS = /^(?:print|log|info|warn|error|debug|puts|readdir(?:Sync)?|listdir|scandir|iterdir|glob|l?stat(?:Sync)?|exists(?:Sync)?|isdir|isfile|is_dir|is_file|access(?:Sync)?|realpath(?:Sync)?|dirname|basename|relative|str|repr|len)$/;
|
|
26239
26241
|
var MUTATING_CALLS = /^(?:renames?(?:Sync)?|move|copy(?:2|file|tree|File)?(?:Sync)?|cp(?:Sync)?|rm(?:tree|dir|Sync|dirSync)?|unlink(?:Sync)?|remove(?:dirs)?|mkdirs?(?:Sync)?|makedirs|mkdtemp(?:Sync)?|(?:sym|hard)?link(?:Sync|_to)?|write\w*|append\w*|truncate(?:Sync)?|ch(?:mod|own)(?:Sync)?|touch|open(?:Sync)?|dump|save|extractall|unpack_archive|put_contents|mv|FileUtils)$/;
|
|
26242
|
+
var SPAWNS = /subprocess|child_process|WriteStream|tempfile|sqlite|inplace|getattr|spawn|\bvm\b|Function\s*\(|FileIO|ZipFile|tarfile|shelve|FileHandler|filename\s*=|savefig|utime|ch(?:mod|own)|mkfifo|mknod|\.(?:delete|to_\w+)\s*\(|Path\b.*\.replace\(|Bun\.\$|O_(?:WR|RDW|CR|AP|TR)|(?:PYTHON|NODE_)\w*=|-r\b|--(?:require|import|[\w-]*loader)|\bos\.replace|\b(?:system|popen|exec\w*|fork|eval|shutil|(?:unlink|rename|remove)\w*)\b|\]\s*\(|\brequire\s*\(\s*(?!(['"])(?:(?![a-zA-Z]:)[\w@][^'"]*|[^'"]*\.json)\1)/;
|
|
26243
|
+
var FREE_OPEN = /\bopen\w*\s*\(\s*(?:(['"])(?![rbtUwax+]*\1)[^'"]*\1|[\w.]+)?\s*(?:,\s*(?:(['"])[rbt]*\2|encoding\s*=\s*(['"])[\w-]+\3)\s*)*\)/g;
|
|
26244
|
+
var writesIn = (text) => {
|
|
26245
|
+
const bare = text.replace(FREE_OPEN, "").replace(/std(?:out|err)\.write|(?<![fF][rR]?)(['"])(?:\\.|(?!\1)[^\\\n])*\1/g, "");
|
|
26246
|
+
return SPAWNS.test(text) || /['"]/.test(bare) || /\$\{|\\[ux]|(?:^|[(,=:;!&|?{}[\s])\/(?![/*])[^/\n]*['"]/.test(text) || [...bare.matchAll(/[\w$]+/g)].some(([word]) => !/^(?:append|copy)$/.test(word) && MUTATING_CALLS.test(word));
|
|
26247
|
+
};
|
|
26240
26248
|
var PATH_CALLS = /^(?:join|resolve|normalize|abspath|expanduser|expandvars|Path|PurePath|fspath)$/;
|
|
26241
26249
|
var rootUse = (text, at) => {
|
|
26242
26250
|
let call;
|
|
@@ -26311,11 +26319,14 @@ var shellScript2 = (words) => {
|
|
|
26311
26319
|
};
|
|
26312
26320
|
var XARGS_VALUE = /^-[IinLPdsEa]$/;
|
|
26313
26321
|
var runsWriter = (words) => {
|
|
26314
|
-
const filled = [
|
|
26322
|
+
const filled = [
|
|
26323
|
+
...words.filter((word) => word !== ";" && word !== "+").map((word) => word.includes("{}") ? "eval" : word),
|
|
26324
|
+
"eval"
|
|
26325
|
+
];
|
|
26315
26326
|
const edits = editsOf(filled);
|
|
26316
26327
|
return edits === null || edits.length > 0 || opaqueWrites(filled) !== null;
|
|
26317
26328
|
};
|
|
26318
|
-
var opaqueWrites = (input, scriptOf = (index) => input[index]) => {
|
|
26329
|
+
var opaqueWrites = (input, scriptOf = (index) => input[index], fed) => {
|
|
26319
26330
|
let words = input;
|
|
26320
26331
|
while (words.length && (PREFIXES2.has(words[0]) || /^\w+=/.test(words[0]))) {
|
|
26321
26332
|
if (words[0] === "xargs") {
|
|
@@ -26372,17 +26383,17 @@ var opaqueWrites = (input, scriptOf = (index) => input[index]) => {
|
|
|
26372
26383
|
}
|
|
26373
26384
|
const inline = (flag) => {
|
|
26374
26385
|
const at = args.findIndex((arg) => flag.test(arg));
|
|
26375
|
-
if (at < 0)
|
|
26386
|
+
if (at < 0 && (fed === undefined || !/^(?:-|\/dev\/stdin)?$/.test(scriptArgs(name, args).named ?? "")))
|
|
26376
26387
|
return null;
|
|
26377
26388
|
const runs = input.length - args.length - 1;
|
|
26378
|
-
|
|
26389
|
+
const texts = input.map((word, index) => index === runs || index < runs && !/^\w+=/.test(word) ? "" : scriptOf(index));
|
|
26390
|
+
return /^(?:python[\d.]*|node|bun)$/.test(name) && [
|
|
26391
|
+
at < 0 ? fed : texts[runs + at + 2],
|
|
26392
|
+
...texts.slice(0, runs + 1 + (at < 0 ? args.length : at))
|
|
26393
|
+
].every((text) => text !== undefined && text !== null && !writesIn(text)) ? null : [
|
|
26379
26394
|
".",
|
|
26380
|
-
...
|
|
26381
|
-
|
|
26382
|
-
return [];
|
|
26383
|
-
const text = scriptOf(index);
|
|
26384
|
-
return text === undefined ? [unknownVarTarget(word)] : pathsIn(text);
|
|
26385
|
-
})
|
|
26395
|
+
...pathsIn(fed ?? ""),
|
|
26396
|
+
...texts.flatMap((text, index) => text === undefined ? [unknownVarTarget(input[index])] : pathsIn(text))
|
|
26386
26397
|
];
|
|
26387
26398
|
};
|
|
26388
26399
|
if (name === "curl")
|
|
@@ -26505,6 +26516,7 @@ var configWrites = (rest) => {
|
|
|
26505
26516
|
named++;
|
|
26506
26517
|
return named > 1;
|
|
26507
26518
|
};
|
|
26519
|
+
var plainFetch = (rest) => /^(?:\w[\w.-]*(?: [^-+:\s][^:\s]*)?)?$/.test(rest.filter((arg) => !/^-[qv]$|^--(?:quiet|verbose)$/.test(arg)).join(" "));
|
|
26508
26520
|
var GIT_VALUE = /^(?:-[Ccbouj]|--(?:git-dir|work-tree|namespace|config-env|branch|origin|config|depth|reference(?:-if-able)?|template|separate-git-dir|upload-pack|jobs|filter|initial-branch|object-format))$/;
|
|
26509
26521
|
var gitOutputs = (args) => {
|
|
26510
26522
|
let at = 0;
|
|
@@ -26546,7 +26558,7 @@ var gitOutputs = (args) => {
|
|
|
26546
26558
|
if (sub === "config" && configWrites(rest))
|
|
26547
26559
|
files.push(has(/^--global$/) ? "~/.gitconfig" : has(/^--system$/) ? "/etc/gitconfig" : valueOf(rest, /^(?:-f|--file=?)(.*)$/s) ?? ".");
|
|
26548
26560
|
const branchWrite = has(/^-[a-zA-Z]*[dDfmMcCu]|^--(?:delete|force|move|copy|set-upstream|unset-upstream|edit)/) || names.length > 0 && !has(/^-[a-zA-Z]*[lavr]|^--(?:list|all|remotes|verbose|show|contains|no-contains|merged|no-merged|points-at|format|sort)/);
|
|
26549
|
-
if (sub === "fetch" || sub === "gc" || sub === "branch" && branchWrite)
|
|
26561
|
+
if (sub === "fetch" && !plainFetch(rest) || sub === "gc" || sub === "branch" && branchWrite)
|
|
26550
26562
|
files.push(".");
|
|
26551
26563
|
if (base === undefined)
|
|
26552
26564
|
return files.length ? files : null;
|
|
@@ -26974,6 +26986,8 @@ var segmentTargets = (cwd, command, dialect, depth = 0, strict = false, inherite
|
|
|
26974
26986
|
const made = mktempPath(value, dir);
|
|
26975
26987
|
if (made !== null)
|
|
26976
26988
|
return made;
|
|
26989
|
+
if (/^(?:\$\(\s*pwd\s*\)|`pwd`)$/.test(value) && !redefined && dir !== UNKNOWN_DIR)
|
|
26990
|
+
return dir ?? null;
|
|
26977
26991
|
const all = expansions(value, vars, loops).map(homeExpanded);
|
|
26978
26992
|
return all.length === 1 && unresolvedRefs(all[0]).length === 0 ? all[0] : null;
|
|
26979
26993
|
};
|
|
@@ -27160,6 +27174,8 @@ var segmentTargets = (cwd, command, dialect, depth = 0, strict = false, inherite
|
|
|
27160
27174
|
for (const sub of depth < 4 ? segment.subs ?? [] : [])
|
|
27161
27175
|
targets.push(...segmentTargets(runIn, sub, dialect, depth + 1, strict, vars));
|
|
27162
27176
|
const expanding = new Set(segment.expands ?? []);
|
|
27177
|
+
const stdin = segment.stdin?.join(`
|
|
27178
|
+
`);
|
|
27163
27179
|
const scriptOf = (index) => {
|
|
27164
27180
|
const word = body[index];
|
|
27165
27181
|
if (word === undefined || !expanding.has(keywords + index))
|
|
@@ -27168,7 +27184,7 @@ var segmentTargets = (cwd, command, dialect, depth = 0, strict = false, inherite
|
|
|
27168
27184
|
return all.some((text) => unresolvedRefs(text).some(unescaped)) ? undefined : all.join(`
|
|
27169
27185
|
`);
|
|
27170
27186
|
};
|
|
27171
|
-
const opaque = segment.unanalyzable ? ["."] : inner === null ? opaqueWrites(body, scriptOf) : null;
|
|
27187
|
+
const opaque = segment.unanalyzable ? ["."] : inner === null ? opaqueWrites(body, scriptOf, stdin && (/[$`]/.test(stdin) && /<<-?[ \t]*[^'"\\\s]/.test(command.replaceAll("\\\n", "")) ? null : stdin)) : null;
|
|
27172
27188
|
const ran = words.findIndex((word) => word === "xargs" || !PREFIXES2.has(word));
|
|
27173
27189
|
const runner = words[ran];
|
|
27174
27190
|
if (runner !== undefined && expanding.has(keywords + lead + ran) && unresolvedRefs(homeExpanded(runner)).length > 0)
|
|
@@ -27184,15 +27200,13 @@ var segmentTargets = (cwd, command, dialect, depth = 0, strict = false, inherite
|
|
|
27184
27200
|
if (ln >= 0 && words.slice(0, ln).every((word) => PREFIXES2.has(word)) && (strict !== "registry" || !lnArgs.some((arg) => /^-[a-zA-Z]*s|^--symbolic$/.test(arg))))
|
|
27185
27201
|
targets.push(...linkSources(lnArgs, at));
|
|
27186
27202
|
}
|
|
27187
|
-
for (const file of segment.redirects)
|
|
27188
|
-
if (!/^\/dev\/(?:null|stdout|stderr|tty)$/.test(file))
|
|
27189
|
-
targets.push(...atAll(file));
|
|
27190
27203
|
const edits = editsOf(body);
|
|
27191
27204
|
if (edits === null) {
|
|
27192
27205
|
if (dir !== undefined)
|
|
27193
27206
|
targets.push(placeholderIn(dir, DIR_TARGET));
|
|
27194
|
-
}
|
|
27195
|
-
|
|
27207
|
+
}
|
|
27208
|
+
for (const file of [...segment.redirects, ...edits ?? []])
|
|
27209
|
+
if (!/^\/dev\/(?:null|stdout|stderr|tty)$/.test(file))
|
|
27196
27210
|
targets.push(...atAll(file));
|
|
27197
27211
|
if (dir !== undefined)
|
|
27198
27212
|
for (const invocation of workitInvocations(body.map(quoteWord2).join(" "), "posix")) {
|
|
@@ -28593,12 +28607,17 @@ var JUDGE_VERBS = {
|
|
|
28593
28607
|
dir: true,
|
|
28594
28608
|
help: true,
|
|
28595
28609
|
"test-audit": true,
|
|
28596
|
-
ledger: ["verdict", "
|
|
28610
|
+
ledger: ["verdict", "list", "check", "ruling", "show"],
|
|
28611
|
+
finding: ["record", "list"],
|
|
28597
28612
|
pr: ["status"],
|
|
28598
28613
|
ci: ["wait", "logs"],
|
|
28599
28614
|
fanout: ["status", "brief"],
|
|
28600
28615
|
models: ["show"],
|
|
28601
|
-
lock: ["status"]
|
|
28616
|
+
lock: ["status"],
|
|
28617
|
+
lease: ["status"],
|
|
28618
|
+
grant: ["show"],
|
|
28619
|
+
task: ["show", "list"],
|
|
28620
|
+
doctor: ["--json"]
|
|
28602
28621
|
};
|
|
28603
28622
|
var JUDGE_JOB = Object.entries(JUDGE_VERBS).map(([verb, subs]) => `workit ${verb}${subs === true ? "" : ` ${subs.join("|")}`}`).join(", ");
|
|
28604
28623
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workit-dev/opencode",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Workit OpenCode plugin — native tools, adaptive policy, and sixteen method skills",
|
|
6
6
|
"keywords": [
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@opencode/plugin": "2.0.18",
|
|
44
|
-
"@workit-dev/core": "^2.
|
|
44
|
+
"@workit-dev/core": "^2.7.1"
|
|
45
45
|
},
|
|
46
46
|
"engines": {
|
|
47
47
|
"node": ">=24"
|