@brainervirus/workit-cursor 7.6.0 → 8.0.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.
@@ -2,7 +2,7 @@
2
2
  import { createRequire } from "node:module";
3
3
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
4
4
 
5
- // packages/workit-core/src/core/task-contract.ts
5
+ // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/task-contract.ts
6
6
  import { createHash, randomUUID } from "node:crypto";
7
7
 
8
8
  // node_modules/zod/v4/core/util.js
@@ -7516,7 +7516,7 @@ function refine(fn, _params = {}) {
7516
7516
  function superRefine(fn, params) {
7517
7517
  return _superRefine(fn, params);
7518
7518
  }
7519
- // packages/workit-core/src/core/task-contract.ts
7519
+ // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/task-contract.ts
7520
7520
  var SCHEMA_VERSION = 1;
7521
7521
  var POLICY_VERSION = "1.0.0";
7522
7522
  var OPERATION_FAMILIES = [
@@ -8372,14 +8372,14 @@ function requirementId(input) {
8372
8372
  });
8373
8373
  }
8374
8374
 
8375
- // packages/workit-core/src/core/task-engine.ts
8375
+ // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/task-engine.ts
8376
8376
  import { realpathSync as realpathSync4 } from "node:fs";
8377
8377
 
8378
- // packages/workit-core/src/core/policy/derive.ts
8378
+ // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/policy/derive.ts
8379
8379
  import { existsSync } from "node:fs";
8380
8380
  import path4 from "node:path";
8381
8381
 
8382
- // packages/workit-core/src/git/rev.ts
8382
+ // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/git/rev.ts
8383
8383
  import { spawnSync } from "node:child_process";
8384
8384
  import { createHash as createHash2 } from "node:crypto";
8385
8385
  import fs from "node:fs";
@@ -8531,13 +8531,13 @@ function currentBranch(cwd) {
8531
8531
  return line(git(cwd, ["symbolic-ref", "--short", "-q", "HEAD"]));
8532
8532
  }
8533
8533
 
8534
- // packages/workit-core/src/ledger.ts
8534
+ // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/ledger.ts
8535
8535
  import { spawnSync as spawnSync3 } from "node:child_process";
8536
8536
  import { createHash as createHash4, randomBytes } from "node:crypto";
8537
8537
  import fs3 from "node:fs";
8538
8538
  import path3 from "node:path";
8539
8539
 
8540
- // packages/workit-core/src/store/paths.ts
8540
+ // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/store/paths.ts
8541
8541
  import { spawnSync as spawnSync2 } from "node:child_process";
8542
8542
  import { createHash as createHash3 } from "node:crypto";
8543
8543
  import fs2 from "node:fs";
@@ -8817,7 +8817,7 @@ var checkoutSlug = (root) => {
8817
8817
  return `${base}-${shortHash(canonical)}`;
8818
8818
  };
8819
8819
 
8820
- // packages/workit-core/src/ledger.ts
8820
+ // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/ledger.ts
8821
8821
  var LEDGER_VERSION = 1;
8822
8822
  var PASSING = new Set(["verified", "tests-verified", "type-check-only"]);
8823
8823
  var FAILING = new Set(["failed", "blocked"]);
@@ -9164,7 +9164,7 @@ function checkVerdicts(cwd, branch, rows) {
9164
9164
  }
9165
9165
  var OBSERVED_ONLY = new Set(["check", ...PR_ROW_TYPES]);
9166
9166
 
9167
- // packages/workit-core/src/core/policy/derive.ts
9167
+ // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/policy/derive.ts
9168
9168
  var RULES = {
9169
9169
  test: "check:test",
9170
9170
  self: "verdict:self",
@@ -9363,7 +9363,7 @@ function writeBlockers(task, root) {
9363
9363
  });
9364
9364
  }
9365
9365
 
9366
- // packages/workit-core/src/core/policy-resolver.ts
9366
+ // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/policy-resolver.ts
9367
9367
  function resolvePolicy(input) {
9368
9368
  const ids = input.constraints.map((constraint) => constraint.id);
9369
9369
  if (new Set(ids).size !== ids.length)
@@ -9419,7 +9419,7 @@ function diffPolicy(previous, next, reason, now) {
9419
9419
  return parsed.data;
9420
9420
  }
9421
9421
 
9422
- // packages/workit-core/src/core/operation-input.ts
9422
+ // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/operation-input.ts
9423
9423
  var str2 = (d, values) => ({
9424
9424
  type: "string",
9425
9425
  ...values ? { enum: values } : {},
@@ -9765,7 +9765,7 @@ function normalizeOperationInput(family, input, host) {
9765
9765
  return request;
9766
9766
  }
9767
9767
 
9768
- // packages/workit-core/src/core/policy/judgment.ts
9768
+ // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/policy/judgment.ts
9769
9769
  var isObject3 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
9770
9770
  var squash = (key) => key.toLowerCase().replace(/[_-]/g, "");
9771
9771
  var ALIASES = {
@@ -9889,11 +9889,11 @@ function normalizeJudgment(raw, previous) {
9889
9889
  return success(null, null, { judgment: parsed.data, ignored, legacy });
9890
9890
  }
9891
9891
 
9892
- // packages/workit-core/src/autonomy.ts
9892
+ // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/autonomy.ts
9893
9893
  import os3 from "node:os";
9894
9894
  import path7 from "node:path";
9895
9895
 
9896
- // packages/workit-core/src/core/config.ts
9896
+ // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/config.ts
9897
9897
  import {
9898
9898
  copyFileSync,
9899
9899
  cpSync,
@@ -9906,7 +9906,7 @@ import {
9906
9906
  import os2 from "node:os";
9907
9907
  import path5 from "node:path";
9908
9908
 
9909
- // packages/workit-core/src/core/boundary.ts
9909
+ // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/boundary.ts
9910
9910
  var EVENT = {
9911
9911
  initialization: "initialization",
9912
9912
  provenance: "provenance",
@@ -9927,7 +9927,7 @@ var errorDetail = (err) => {
9927
9927
  return { error_name: "unknown", error: String(err) };
9928
9928
  };
9929
9929
 
9930
- // packages/workit-core/src/core/config.ts
9930
+ // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/config.ts
9931
9931
  var diagnosticLogger;
9932
9932
  var PRESETS = {
9933
9933
  gitflow: {
@@ -10089,7 +10089,7 @@ var resolveCommitPolicy = (config, workspace) => {
10089
10089
  return config.commitPolicy ?? { preset: "conventional" };
10090
10090
  };
10091
10091
 
10092
- // packages/workit-core/src/core/workspaces.ts
10092
+ // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/workspaces.ts
10093
10093
  import { createHash as createHash5 } from "node:crypto";
10094
10094
  import { readFileSync as readFileSync2, realpathSync } from "node:fs";
10095
10095
  import path6 from "node:path";
@@ -10489,7 +10489,7 @@ var resolveRuntimeWorkspacePolicy = (cwd, kind, requestedProfile) => {
10489
10489
  };
10490
10490
  };
10491
10491
 
10492
- // packages/workit-core/src/autonomy.ts
10492
+ // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/autonomy.ts
10493
10493
  var accountHome = () => {
10494
10494
  try {
10495
10495
  return os3.userInfo().homedir;
@@ -10624,7 +10624,7 @@ function resolveAutonomy(cwd) {
10624
10624
  var suggested = (kind) => kind === "merge" ? "verified" : "true";
10625
10625
  var grantHint = (workspace, kind) => `ask the user to run, in their own terminal: workit grant set ${workspace ?? "<workspace>"} ${kind}=${suggested(kind)}`;
10626
10626
 
10627
- // packages/workit-core/src/core/task-store.ts
10627
+ // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/task-store.ts
10628
10628
  import { createHash as createHash7, randomUUID as randomUUID3 } from "node:crypto";
10629
10629
  import * as fs9 from "node:fs";
10630
10630
  import path12 from "node:path";
@@ -11230,7 +11230,7 @@ function acquireFileLockSync(targetPath, options) {
11230
11230
  }
11231
11231
  }
11232
11232
  }
11233
- // packages/workit-core/src/core/package-root.ts
11233
+ // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/package-root.ts
11234
11234
  import { existsSync as existsSync3 } from "node:fs";
11235
11235
  import path10 from "node:path";
11236
11236
  import { fileURLToPath } from "node:url";
@@ -11244,7 +11244,7 @@ var packageRoot = () => {
11244
11244
  }
11245
11245
  };
11246
11246
 
11247
- // packages/workit-core/src/core/store-lock.ts
11247
+ // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/store-lock.ts
11248
11248
  import { spawnSync as spawnSync4 } from "node:child_process";
11249
11249
  import fs7 from "node:fs";
11250
11250
  import { hostname } from "node:os";
@@ -11378,7 +11378,7 @@ var clearAbandonedReclaimGuard = (lockPath, nowMs = Date.now()) => {
11378
11378
  }
11379
11379
  };
11380
11380
 
11381
- // packages/workit-core/src/store/event-log.ts
11381
+ // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/store/event-log.ts
11382
11382
  import { randomUUID as randomUUID2 } from "node:crypto";
11383
11383
  import fs8 from "node:fs";
11384
11384
  import path11 from "node:path";
@@ -11538,7 +11538,7 @@ var retryTransient = (run) => {
11538
11538
  };
11539
11539
  var renameWithRetry = (from, to) => retryTransient(() => fs8.renameSync(from, to));
11540
11540
 
11541
- // packages/workit-core/src/store/patch.ts
11541
+ // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/store/patch.ts
11542
11542
  var isPlainObject2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
11543
11543
  var equal = (left, right) => {
11544
11544
  if (left === right)
@@ -11648,7 +11648,7 @@ var isPatch = (value) => Array.isArray(value) && value.every((op) => {
11648
11648
  return false;
11649
11649
  });
11650
11650
 
11651
- // packages/workit-core/src/store/reduce.ts
11651
+ // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/store/reduce.ts
11652
11652
  import { createHash as createHash6 } from "node:crypto";
11653
11653
  var OPENING_TYPES = new Set([
11654
11654
  "task.opened",
@@ -11779,7 +11779,7 @@ function eventType(before, after) {
11779
11779
  return "task.updated";
11780
11780
  }
11781
11781
 
11782
- // packages/workit-core/src/store/notes.ts
11782
+ // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/store/notes.ts
11783
11783
  var SLOT = Symbol.for("workit.migrationReporter");
11784
11784
  var reportMigration = (report) => {
11785
11785
  try {
@@ -11790,7 +11790,7 @@ var reportMigration = (report) => {
11790
11790
  };
11791
11791
  var migrationReporterInstalled = () => typeof globalThis[SLOT] === "function";
11792
11792
 
11793
- // packages/workit-core/src/core/task-store.ts
11793
+ // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/task-store.ts
11794
11794
  var MIGRATION_PENDING = "workit migration pending";
11795
11795
  var STORE_FORMAT = 3;
11796
11796
  var STORE_MIN_RUNTIME = "3.0.0";
@@ -13427,18 +13427,18 @@ class TaskStore {
13427
13427
  }
13428
13428
  }
13429
13429
 
13430
- // packages/workit-core/src/core/workers.ts
13430
+ // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/workers.ts
13431
13431
  var UNCERTAIN_WORKER_STATES = ["dispatching", "running", "cancelling", "unknown"];
13432
13432
  var isUncertainWorker = (state) => UNCERTAIN_WORKER_STATES.includes(state);
13433
13433
  var workerBlocksTransition = (transition, state) => transition === "pause" ? false : isUncertainWorker(state);
13434
13434
 
13435
- // packages/workit-core/src/core/task-evaluation.ts
13435
+ // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/task-evaluation.ts
13436
13436
  import { createHash as createHash8 } from "node:crypto";
13437
13437
  import * as fs11 from "node:fs";
13438
13438
  import { spawnSync as spawnSync6 } from "node:child_process";
13439
13439
  import path14 from "node:path";
13440
13440
 
13441
- // packages/workit-core/src/check-config.ts
13441
+ // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/check-config.ts
13442
13442
  import { spawnSync as spawnSync5 } from "node:child_process";
13443
13443
  import fs10 from "node:fs";
13444
13444
  import path13 from "node:path";
@@ -13643,7 +13643,7 @@ function checkCommand(args, version, onPath = workitAvailable()) {
13643
13643
  return onPath ? `workit check ${args}` : `npx -y @brainervirus/workit-cli@${version} check ${args}`;
13644
13644
  }
13645
13645
 
13646
- // packages/workit-core/src/core/task-evaluation.ts
13646
+ // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/task-evaluation.ts
13647
13647
  var digestBytes = (value) => createHash8("sha256").update(value).digest("hex");
13648
13648
  var inside = (root, candidate) => candidate === root || candidate.startsWith(`${root}${path14.sep}`);
13649
13649
  var relative = (root, candidate) => path14.relative(root, candidate).split(path14.sep).join("/") || ".";
@@ -14309,7 +14309,7 @@ function evaluateClosure(requestedOutcome, view) {
14309
14309
  });
14310
14310
  }
14311
14311
 
14312
- // packages/workit-core/src/core/methods.ts
14312
+ // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/methods.ts
14313
14313
  var METHODS = {
14314
14314
  "workit-shape": { dimensions: ["challenge", "decisions", "artifacts", "continuity"] },
14315
14315
  "workit-bdd": { dimensions: ["testing"] },
@@ -14417,7 +14417,7 @@ Skills: load the skill, never act from memory of it (slash aliases /wk-<name>).
14417
14417
  - architecture, deepen modules (user-invoked; offer it): workit-architecture
14418
14418
  `.trim();
14419
14419
 
14420
- // packages/workit-core/src/core/task-context.ts
14420
+ // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/task-context.ts
14421
14421
  function reconcileResume(view, observations = []) {
14422
14422
  if (observations.length > 0)
14423
14423
  return failure2("permission_denied", "worker observations require native host verification");
@@ -14532,7 +14532,7 @@ var exportDigest = (bundle) => sha256({
14532
14532
  task: bundle.task
14533
14533
  });
14534
14534
 
14535
- // packages/workit-core/src/core/task-engine.ts
14535
+ // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/task-engine.ts
14536
14536
  var workspaceVerification = (root) => {
14537
14537
  try {
14538
14538
  return resolveAutonomy(root).verification;
@@ -16117,7 +16117,7 @@ class WorkitCore {
16117
16117
  return this.summary(changed.data.task);
16118
16118
  }
16119
16119
  }
16120
- // packages/workit-core/src/hooks/descriptor.ts
16120
+ // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/descriptor.ts
16121
16121
  var support = (descriptor, axis) => {
16122
16122
  if (axis.startsWith("event:"))
16123
16123
  return descriptor.events[axis.slice("event:".length)].support;
@@ -16141,7 +16141,7 @@ var capabilitiesFor = (descriptor, observed = {}) => descriptor.capabilities.map
16141
16141
  refs: rule.refs.map((handle) => ({ kind: "host", host: descriptor.host, handle }))
16142
16142
  };
16143
16143
  });
16144
- // packages/workit-core/src/hooks/context.ts
16144
+ // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/context.ts
16145
16145
  import path15 from "node:path";
16146
16146
  var MIGRATION_PENDING_NOTE = "workit migration pending — run `workit task status`";
16147
16147
  var migrationPending = (result) => !result.ok && result.code === "needs_input" && (result.error ?? "").startsWith(MIGRATION_PENDING);
@@ -16289,10 +16289,10 @@ var turnContextText = (input, descriptor) => {
16289
16289
  return null;
16290
16290
  }
16291
16291
  };
16292
- // packages/workit-core/src/core/branch.ts
16292
+ // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/branch.ts
16293
16293
  import { createHash as createHash9 } from "node:crypto";
16294
16294
 
16295
- // packages/workit-core/src/core/release-tracks.ts
16295
+ // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/release-tracks.ts
16296
16296
  class ReleaseTrackError extends Error {
16297
16297
  }
16298
16298
  var KNOWN_FIELDS = new Set([
@@ -16431,7 +16431,7 @@ function workspaceReleaseTracks(cwd) {
16431
16431
  }
16432
16432
  var memo3 = new Map;
16433
16433
 
16434
- // packages/workit-core/src/core/branch.ts
16434
+ // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/branch.ts
16435
16435
  var withReleaseTracks = (workspaceRoot, policy) => {
16436
16436
  const read = workspaceReleaseTracks(workspaceRoot);
16437
16437
  if (read.error)
@@ -16524,7 +16524,7 @@ var validateBranchNameFor = (workspaceRoot, name) => {
16524
16524
  }
16525
16525
  };
16526
16526
 
16527
- // packages/workit-core/src/core/route-intent.ts
16527
+ // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/route-intent.ts
16528
16528
  var shellBranchTarget = (command) => {
16529
16529
  if (!command.trim() || /[\r\n;&|<>`'"$()\\*?{}~!#]/u.test(command) || command.includes("[") || command.includes("]"))
16530
16530
  return null;
@@ -16540,12 +16540,12 @@ var shellBranchPolicyViolation = (root, command) => {
16540
16540
  return target === null ? null : validateBranchNameFor(root, target);
16541
16541
  };
16542
16542
 
16543
- // packages/workit-core/src/hooks/policy.ts
16543
+ // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/policy.ts
16544
16544
  var shellPolicy = (cwd, command) => {
16545
16545
  const policy = shellBranchPolicyViolation(cwd, command);
16546
16546
  return policy && !policy.ok ? { kind: "deny", reason: `branch_policy_denied: ${policy.error}`, unblock: null } : { kind: "none" };
16547
16547
  };
16548
- // packages/workit-core/src/hooks/write-gate.ts
16548
+ // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/write-gate.ts
16549
16549
  import { realpathSync as realpathSync5 } from "node:fs";
16550
16550
  import path16 from "node:path";
16551
16551
  var NONE2 = { kind: "none" };
@@ -16806,7 +16806,7 @@ function writeGate(cwd, paths) {
16806
16806
  return NONE2;
16807
16807
  }
16808
16808
  }
16809
- // packages/workit-core/src/hooks/hosts/fields.ts
16809
+ // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/hosts/fields.ts
16810
16810
  import { existsSync as existsSync6, realpathSync as realpathSync6, statSync as statSync2 } from "node:fs";
16811
16811
  import path17 from "node:path";
16812
16812
  var isRecord4 = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
@@ -16874,7 +16874,7 @@ var writePaths = (input) => {
16874
16874
  paths.push(match[1].trim());
16875
16875
  return [...new Set(paths)];
16876
16876
  };
16877
- // packages/workit-core/src/hooks/handle.ts
16877
+ // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/handle.ts
16878
16878
  var usable2 = (value) => value === "native" || value === "partial";
16879
16879
  var NONE3 = { kind: "none" };
16880
16880
  var offered = new Set;
@@ -16970,7 +16970,7 @@ var dispatchHook = (adapter, raw, env = process.env) => {
16970
16970
  };
16971
16971
  }
16972
16972
  };
16973
- // packages/workit-core/src/hooks/hosts/claude-code.ts
16973
+ // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/hosts/claude-code.ts
16974
16974
  var CLAUDE_CODE_DESCRIPTOR = {
16975
16975
  host: "claude_code",
16976
16976
  label: "Claude Code",
@@ -17213,7 +17213,7 @@ var claudeCodeAdapter = {
17213
17213
  render
17214
17214
  };
17215
17215
 
17216
- // packages/workit-core/src/hooks/hosts/codex.ts
17216
+ // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/hosts/codex.ts
17217
17217
  function detectCodexSurface(env) {
17218
17218
  return env.CODEX_INTERNAL_ORIGINATOR_OVERRIDE === "Codex Desktop" || Boolean(env.CODEX_ELECTRON_RESOURCES_PATH) ? "codex_desktop" : "codex_cli";
17219
17219
  }
@@ -17441,7 +17441,7 @@ var codexAdapter = {
17441
17441
  addendum: (input) => `<workit-codex-mutations>Codex MCP is read-only: unattested callers cannot mutate. Run workit verbs with the workit CLI on the shell (node_modules/.bin/workit, or npx -y @brainervirus/workit-cli): check, git branch|commit|push, pr, ci, stack, ledger, handoff; task-family mutations take --json${input.session.id ? ` --actor ${input.session.id}` : ""}. A verifier or reviewer records workit ledger verdict under a session the lead assigns (WORKIT_SESSION_ID=<lead>-v<n>), never the author's. Merge and release need a workspace grant (workit grant show); a question answer is not host permission.</workit-codex-mutations>`
17442
17442
  };
17443
17443
 
17444
- // packages/workit-core/src/hooks/hosts/cursor.ts
17444
+ // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/hosts/cursor.ts
17445
17445
  import path18 from "node:path";
17446
17446
  var undocumented2 = { support: "undocumented", native: null };
17447
17447
  var none = { support: "none", native: null };
@@ -17685,7 +17685,7 @@ var cursorAdapter = {
17685
17685
  render: render3
17686
17686
  };
17687
17687
 
17688
- // packages/workit-core/src/hooks/run.ts
17688
+ // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/run.ts
17689
17689
  var HOOK_ADAPTERS = {
17690
17690
  claude_code: claudeCodeAdapter,
17691
17691
  codex_cli: codexAdapter,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brainervirus/workit-cursor",
3
- "version": "7.6.0",
3
+ "version": "8.0.0",
4
4
  "private": false,
5
5
  "description": "Workit Cursor plugin — shared MCP transport, native hooks, and sixteen method skills",
6
6
  "keywords": [
@@ -44,8 +44,8 @@
44
44
  "build": "bun scripts/build.ts"
45
45
  },
46
46
  "dependencies": {
47
- "@brainervirus/workit-core": "^7.6.0",
48
- "@brainervirus/workit-mcp": "^7.6.0"
47
+ "@brainervirus/workit-core": "^8.0.0",
48
+ "@brainervirus/workit-mcp": "^8.0.0"
49
49
  },
50
50
  "engines": {
51
51
  "node": ">=24"
@@ -8,60 +8,60 @@ description: Run independent slices in parallel - one worker per isolated worktr
8
8
  Fan out only independent slices: disjoint files, no shared mutable state, each
9
9
  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
- ceremony; do it yourself.
11
+ ceremony; do it yourself. Workit never spawns agents; you do.
12
12
 
13
13
  1. **Plan the slices** (read the `workit-shape` skill's SKILL.md and follow it) 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 or
18
- placeholder (`<goal>`, `TBD`) brief field (exit 2) and two slices that may
19
- write one file (exit 3) with a fix: an owner for a shared file, or a
20
- dependency that serializes them. Apply it and re-run: refuse to spawn while
21
- a field is empty or the plan is refused. Its `waves` say which slices may
22
- run together; keep 4-6 in flight.
23
- 2. **Brief each worker** from its slice with the fixed template: GOAL, SCOPE,
24
- CONTEXT (pointers, not pasted text), ACCEPTANCE (Given/When/Then), VERIFY
25
- (exact commands), TIER, TIMEBOX, SCRATCH, FORBIDDEN, REPORT, STANDING.
26
- STANDING is every standing order and user directive so far, pasted
27
- verbatim into each spawn and respawn: directives decay across resumes.
28
- 3. **Spawn all workers in one message**, in the background, each in its own
29
- worktree: Claude Code's `implementer` agent (first command `workit git
30
- branch <branch> --base <base>`); elsewhere `workit fanout worktree create
31
- <slice>`, which prints the SCRATCH dir. Refill from `fanout status`.
32
- 4. **Judge liveness by side effects only:** `workit fanout status` (head age,
33
- PR, CI, verdict, landed; STUCK past the TIMEBOX, default 30 min). Stop a
34
- stuck worker and observe that it exited (a timeout is not proof). Removing
35
- a worktree drops its uncommitted changes: `workit fanout worktree release
36
- <slice>` records `git status` in the ledger first and refuses them without
37
- `--force` (native worktrees: record `git -C <wt> status --short` first).
38
- Respawn in `MODE: resume` (brief, directives, last report), same branch.
39
- Never two live workers on one branch. Replace at most twice, then re-slice
40
- or report the gap. Never chain resumes.
41
- 5. **Verify each slice independently.** A fresh agent that did not write it
42
- (Claude Code: the `verifier` agent) runs VERIFY and verify-<app>, then
43
- `workit ledger verdict <result> --branch <b> --how "<evidence>"` under the
44
- session you started it with (`WORKIT_SESSION_ID=<lead>-v<n>`, set by you,
45
- never chosen by the author; Claude Code: the hook names one).
46
- A worker's report is a pointer, never evidence.
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 slice
51
- whose PR merged reads as landed; its dependents stop waiting. Then
52
- `workit ledger check --branch <b>` per slice, land in `fanout status` order
53
- and release the worktrees you made. Stacks: `workit stack plan <bottom> …
54
- <top>` once, then `stack sync` and `land`. Only you touch topology: workers
55
- never rebase, retarget or merge. Then ship (read the `workit-ship` skill's SKILL.md and follow it).
14
+ per slice an id, branch, TIER, SCOPE globs, `owns` for shared files,
15
+ `dependsOn` only for a real dependency, and the brief fields. `workit fanout
16
+ plan <plan.json>` refuses an empty or placeholder brief field (exit 2) and
17
+ two slices that may write one file (exit 3) with a fix; apply it and re-run:
18
+ refuse to spawn while a field is empty or the plan is refused. One PR per
19
+ slice is the default; `"fanIn": "integration"` only when the user wants one
20
+ PR (`references/orchestration.md`).
21
+ 2. **Record standing orders** (`workit ledger standing add "<order>"`): every
22
+ user directive all workers share. Directives decay across resumes.
23
+ 3. **Brief each worker verbatim** with `workit fanout brief <slice>`: plan
24
+ fields, standing orders, SCRATCH, session id, fan-in rule. Never hand-edit
25
+ it; change the plan or the standing orders and render again.
26
+ 4. **Spawn in a rolling window**, in the background, each in its own worktree:
27
+ keep 4-6 in flight and refill from `spawnable` in `workit fanout status` as
28
+ each one finishes. Pick the model from TIER (`references/orchestration.md`).
29
+ Claude Code: the `implementer` agent; elsewhere first `workit fanout
30
+ worktree create <slice>`.
31
+ 5. **Judge liveness by side effects only:** `workit fanout status` (head age,
32
+ PR, CI, verdict, landed; STUCK past the TIMEBOX). Stop a stuck worker and
33
+ observe that it exited (a timeout is not proof). Removing a worktree drops
34
+ its uncommitted changes: `workit fanout worktree release <slice>` records
35
+ `git status` in the ledger first and refuses them without `--force`. Never
36
+ two live workers on one branch.
37
+ 6. **Retry once, then escalate.** A stuck or failed slice gets one retry with
38
+ a fresh brief (`workit fanout brief <slice> --mode resume`, same branch);
39
+ if that fails too, re-slice it, take it over, or report the gap. Never
40
+ chain resumes. A hard slice may race instead: N attempts, keep the best
41
+ verdict (`references/orchestration.md`).
42
+ 7. **Verify by the workspace `verification` setting** (`workit grant show`).
43
+ A report is a pointer, never evidence. `self`: a verifier that wrote none
44
+ of the slices, or you if you wrote none. `independent` or high risk: a
45
+ separate verifier session, never yours (doctrine: the ledger only refuses
46
+ authors). One verifier may take a batch of slices, one verdict per branch
47
+ (`workit ledger verdict <result> --branch <b> --how "<evidence>"`), in a
48
+ session never chosen by the author. A review panel on separate models only at high risk.
49
+ 8. **Fan in** with `workit fanout check`: out-of-scope files (any file outside
50
+ it stops the fan-in) and `git merge-tree` conflicts with trunk and between
51
+ siblings. Fix what it names until it exits 0; a merged slice reads as
52
+ landed. Then `workit ledger check --branch <b>` per slice, land in `fanout
53
+ status` order, release the worktrees you made, and `workit ledger standing
54
+ clear`. Only you touch topology: workers never rebase, retarget or merge,
55
+ except the integration-tip merge in integration mode. Then ship
56
+ (read the `workit-ship` skill's SKILL.md and follow it).
56
57
 
57
58
  ## Example
58
59
 
59
60
  Bad brief: "Do the API part and add tests." (no scope, no acceptance, no
60
61
  verify command, so nobody can tell when it is done)
61
62
 
62
- Good brief: `references/brief.md` (GOAL: `GET /v1/usage` returns daily run
63
- counts; SCOPE: `src/routes/usage.ts`, `test/usage.test.ts`; VERIFY:
64
- `workit check test`; ...).
63
+ Good brief: the output of `workit fanout brief usage-endpoint`
64
+ (`references/brief.md` shows one).
65
65
 
66
66
  ## Check
67
67
 
@@ -1,8 +1,11 @@
1
1
  # Worker brief template
2
2
 
3
- Every field is required. A brief with an empty field is not spawned. Point to
4
- files and ledger rows instead of pasting their content. Size the slice so the
5
- worker finishes it in about 150k tokens of context; split a larger one first.
3
+ `workit fanout brief <slice>` renders this brief from the plan, the standing
4
+ orders in force (`workit ledger standing list`) and the slice's scratch dir;
5
+ pass its output verbatim. The template below is what it fills in. Every field
6
+ is required. A brief with an empty field is not spawned. Point to files and
7
+ ledger rows instead of pasting their content. Size the slice so the worker
8
+ finishes it in about 150k tokens of context; split a larger one first.
6
9
 
7
10
  ```md
8
11
  MODE: <new | resume (a replacement continuing an existing branch)>
@@ -16,11 +19,12 @@ VERIFY: <exact commands, e.g. `workit check test`, the verify-<app> feature to d
16
19
  TIER: <mundane | standard | hard: how much model the slice needs>
17
20
  TIMEBOX: <wall clock or turn budget; past it without a new commit you will be replaced>
18
21
  SCRATCH: <your own temp dir: the one `fanout worktree create` printed, else `mktemp -d`; never a shared path>
19
- FORBIDDEN: <no edits outside SCOPE; no rebase, retarget, merge or force-push; no new dependencies; ...>
22
+ FORBIDDEN: <no edits outside SCOPE; no new dependencies; ...>
23
+ FAN-IN: <one PR per slice: no rebase, retarget, merge or force-push | integration: merge the integration tip before reporting, nothing else>
20
24
  REPORT: branch, head SHA, files changed, each VERIFY command with its exit code,
21
25
  each ACCEPTANCE line met / not met, rulings you made (`workit ledger ruling`),
22
26
  anything out of scope as a follow-up, not a diff.
23
- STANDING: <the standing orders, verbatim: user preferences and every directive given so far>
27
+ STANDING: <the standing orders, verbatim: `workit ledger standing add` records each one>
24
28
  export WORKIT_SESSION_ID=<lead>-w<n> (set by the lead; a verifier brief gets <lead>-v<n>)
25
29
  ```
26
30
 
@@ -40,7 +44,8 @@ VERIFY: `workit check test`; verify-api feature "usage"
40
44
  TIER: standard
41
45
  TIMEBOX: 45 minutes
42
46
  SCRATCH: ../app-wt/usage-endpoint/.workit-scratch
43
- FORBIDDEN: no edits outside SCOPE; no schema migration; no rebase or force-push; no new packages
47
+ FORBIDDEN: no edits outside SCOPE; no schema migration; no new packages
48
+ FAN-IN: one PR per slice. Never rebase, retarget, merge or force-push: the lead owns topology.
44
49
  REPORT: as in the template
45
50
  STANDING: conventional commits; no comments that restate code; ask nothing, record rulings instead
46
51
  ```
@@ -55,7 +60,9 @@ stack); `worktree` defaults to `../<repo>-wt/<id>`. `owns` claims a shared
55
60
  file another slice's glob also matches. Globs that match no file yet are compared
56
61
  through a sample path. Use `/` as the separator; a backslash only escapes
57
62
  literal brackets: `"app/\\[id\\]/page.tsx"`. A `timebox` such as `45 minutes`
58
- is the slice's STUCK threshold in `workit fanout status`.
63
+ is the slice's STUCK threshold in `workit fanout status`. `"fanIn":
64
+ "integration"` (with an integration branch as `trunk`) is the one-PR mode in
65
+ `orchestration.md`; the default `"prs"` lands one PR per slice.
59
66
 
60
67
  ```json
61
68
  {
@@ -90,7 +97,7 @@ is the slice's STUCK threshold in `workit fanout status`.
90
97
  }
91
98
  ```
92
99
 
93
- ## Worker rules (paste into the brief when the host has no implementer agent)
100
+ ## Worker rules (`workit fanout brief` appends them as RULES)
94
101
 
95
102
  1. First command. `MODE: new`: `workit git branch <branch> --base <base>` (the
96
103
  worktree may start on a name that breaks branch policy). `MODE: resume`: