@brainervirus/workit-cursor 0.8.4 → 0.8.6

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
  "name": "workit",
3
3
  "displayName": "Workit",
4
4
  "description": "OpenCode-style verify, PR, changelog, commit, and session handoff for Cursor",
5
- "version": "0.8.4",
5
+ "version": "0.8.6",
6
6
  "author": {
7
7
  "name": "Cristhofer Pincetti"
8
8
  },
package/README.md CHANGED
@@ -23,7 +23,7 @@ npx @brainervirus/workit-cli init
23
23
  "command": "npx",
24
24
  "args": [
25
25
  "-y",
26
- "--package=@brainervirus/workit-cursor@0.8.0",
26
+ "--package=@brainervirus/workit-cursor@0.8.5",
27
27
  "workit-cursor-mcp",
28
28
  "${workspaceFolder}"
29
29
  ]
@@ -35,7 +35,7 @@ npx @brainervirus/workit-cli init
35
35
  ### Requirements
36
36
 
37
37
  - **Node.js ≥ 22** — the MCP server and session-start hook are self-contained Node bundles invoked through `npx`.
38
- - **Network** — `npx -y …@0.8.0` resolves and downloads the package on first run in each environment; a machine that cannot reach the npm registry cannot start the MCP server or hook (see [Runtime](#runtime)).
38
+ - **Network** — `npx -y …@0.8.5` resolves and downloads the package on first run in each environment; a machine that cannot reach the npm registry cannot start the MCP server or hook (see [Runtime](#runtime)).
39
39
 
40
40
  ## What it provides
41
41
 
@@ -59,11 +59,11 @@ Cursor adapts workit through policy-only confirmation: approvals and lifecycle t
59
59
 
60
60
  Cursor launches the MCP server and session-start hook through `npx`, so the shipped manifests contain no repository-relative `dist` paths:
61
61
 
62
- - **MCP server** — `npx -y --package=@brainervirus/workit-cursor@0.8.0 workit-cursor-mcp ${workspaceFolder}`. It speaks the MCP stdio protocol; `stdout` is reserved for protocol messages and diagnostics go to `stderr`.
63
- - **Session-start hook** — `npx -y --package=@brainervirus/workit-cursor@0.8.0 workit-cursor-session-start`. It emits valid hook output and a diagnostic on runtime failure, and remains fail-open where Cursor's hook contract requires startup continuity.
62
+ - **MCP server** — `npx -y --package=@brainervirus/workit-cursor@0.8.5 workit-cursor-mcp ${workspaceFolder}`. It speaks the MCP stdio protocol; `stdout` is reserved for protocol messages and diagnostics go to `stderr`.
63
+ - **Session-start hook** — `npx -y --package=@brainervirus/workit-cursor@0.8.5 workit-cursor-session-start`. It emits valid hook output and a diagnostic on runtime failure, and remains fail-open where Cursor's hook contract requires startup continuity.
64
64
  - `npx` startup or network failure is surfaced by Cursor as an MCP/hook startup failure; Workit never silently substitutes stale local runtime code.
65
65
 
66
- The runtime runs from the exact reviewed pin `@0.8.0`: Cursor reviews plugin metadata from Git, while npm serves the pinned runtime. Bumping the pin is a deliberate reviewed update, made only after the target npm version is public — never a mutable `latest` dist-tag. See [Update review](#update-review).
66
+ The runtime runs from the exact reviewed pin `@0.8.5`: Cursor reviews plugin metadata from Git, while npm serves the pinned runtime. Bumping the pin is a deliberate reviewed update, made only after the target npm version is public — never a mutable `latest` dist-tag. See [Update review](#update-review).
67
67
 
68
68
  ## Security and data handling
69
69
 
@@ -96,7 +96,7 @@ The repository root carries `.cursor-plugin/marketplace.json`, indexing `package
96
96
 
97
97
  - **Installing from Marketplace** — a Marketplace admin adds the repository URL through Cursor's authenticated publisher flow; end users then install the plugin from the Cursor Marketplace UI, which reads `.cursor-plugin/plugin.json` and the tracked components directly from Git.
98
98
  - **Submission** — Marketplace submission is a separate, later authenticated action at `https://cursor.com/marketplace/publish`. It is **not** performed here and no publication or acceptance is claimed; the repository is kept validated and submission-ready.
99
- - **Update review** — Git plugin metadata (manifest, rules, skills, assets) is reviewed by Cursor on Marketplace updates, while the npm runtime is pinned to the exact reviewed `@0.8.0`. Bumping that pin in `mcp.json` / `hooks-cursor.json` is a deliberate reviewed change: only after the target npm version is public, never a mutable `latest` dist-tag.
99
+ - **Update review** — Git plugin metadata (manifest, rules, skills, assets) is reviewed by Cursor on Marketplace updates, while the npm runtime is pinned to the exact reviewed `@0.8.5`. Bumping that pin in `mcp.json` / `hooks-cursor.json` is a deliberate reviewed change: only after the target npm version is public, never a mutable `latest` dist-tag.
100
100
  - **Troubleshooting** — `workit doctor` (or the `workflow_doctor` tool) reports installation health including runtime, token, VCS/YouTrack, and log-writability checks; it exits nonzero on failure. An MCP/hook startup failure with no network is an `npx`/registry reachability issue, not a Workit defect.
101
101
 
102
102
  ## Docs
@@ -59,6 +59,8 @@ For each top-level task absent from `completed_task_ids`:
59
59
 
60
60
  Run a separate full-branch code review, then `workflow_verify`. Present the full `<SDD_DIR>/advisories.md` roll-up once, then use native `question` so the user can choose which advisory items to fix, discuss, or discard. Report exact check results and never infer success. Use `workflow_git_context` for a commit preview and load `wk-commit` through `skill` for an approved commit. If working state contains a stash reference, preview reapplication through `question`, then call `workflow_branch_setup` with `confirmed: true` after approval.
61
61
 
62
+ **Mandatory:** end the run by calling `workflow_plan_complete` (OpenCode/Cursor) or the CLI `workit flow complete` (CLI host) after the final task once the SDD ledger is complete (all task IDs appended) and `workflow_verify` passes — a complete ledger and green verification are the tool's gates. Never finish the run while the plan is still `active`.
63
+
62
64
  ## Task order
63
65
 
64
66
  <TASK_LIST>
@@ -9,6 +9,8 @@
9
9
 
10
10
  ## Global Constraints
11
11
 
12
+ - Each task lands exactly one contiguous non-empty commit range (`base..head`): fix rounds append commits to that range and never rewrite/amend an active review range; each progress line records the task's real base..head shas.
13
+ - The final task ends execution with `workflow_plan_complete` (or the CLI `workit flow complete`) once the SDD ledger is complete and repository verification passes — a run never finishes while the plan is still `active`.
12
14
  - <project-wide requirements, one line each>
13
15
 
14
16
  ---
@@ -340,7 +340,7 @@ var logger = createLogger({
340
340
  });
341
341
  var hookDir = path3.dirname(fileURLToPath(import.meta.url));
342
342
  var pluginDir = path3.resolve(hookDir, "..");
343
- var marker = path3.join(pluginDir, ".workflow-toolkit-root");
343
+ var marker = path3.join(pluginDir, ".workit-root");
344
344
  setDiagnosticLogger(logger);
345
345
  logger.info(EVENT.initialization, { host: "cursor-hook", hook_dir: hookDir });
346
346
  var resolveRepoRoot = () => {
@@ -409,35 +409,35 @@ var isDestination = (input) => {
409
409
  };
410
410
  var main = async () => {
411
411
  const reminder = reminderTextFor(isDestination(await readHookInput(HOOK_READ_TIMEOUT_MS)));
412
- const context = `<workflow-toolkit-askquestion-hard-gate>
412
+ const context = `<workit-askquestion-hard-gate>
413
413
  HARD-GATE: Any user choice with options → call Cursor AskQuestion directly with workflow-specific copy. NEVER A/B/C in chat. Overrides Superpowers brainstorming conversational options.
414
- </workflow-toolkit-askquestion-hard-gate>
414
+ </workit-askquestion-hard-gate>
415
415
 
416
- <workflow-toolkit-visual-companion>
416
+ <workit-visual-companion>
417
417
  HARD-GATE: NEVER offer Superpowers visual companion or open a browser tab. For UI wireframes use workflow_present_ascii; for flows use workflow_present_flow. Overrides Superpowers brainstorming visual companion offer.
418
- </workflow-toolkit-visual-companion>
418
+ </workit-visual-companion>
419
419
 
420
- <workflow-toolkit-no-worktrees>
420
+ <workit-no-worktrees>
421
421
  HARD-GATE: NEVER using-git-worktrees or git worktree. In-place feature/* or bugfix/* checkout only via workflow_resolve_branch + workflow_branch_setup. Dirty tree → native AskQuestion before checkout.
422
- </workflow-toolkit-no-worktrees>
422
+ </workit-no-worktrees>
423
423
 
424
- <workflow-toolkit-sdd-path>
424
+ <workit-sdd-path>
425
425
  HARD-GATE: NEVER .superpowers/sdd. ALWAYS workflow_sdd_context with plan_path first — resolves canonical docs/<slug>/sdd/ and creates nothing (no empty ledger; progress.md appears only on the first confirmed append). workflow_sdd_task_brief, workflow_sdd_review_package, workflow_sdd_append_progress only.
426
- </workflow-toolkit-sdd-path>
426
+ </workit-sdd-path>
427
427
 
428
- <workflow-toolkit-todowrite>
428
+ <workit-todowrite>
429
429
  HARD-GATE: After workflow_sdd_context, call Cursor TodoWrite with returned todos (merge: false). SDD ledger is persistence — TodoWrite is the native task list UI. Keep in_progress/completed in sync each task.
430
- </workflow-toolkit-todowrite>
430
+ </workit-todowrite>
431
431
 
432
- <workflow-toolkit-superpowers-doc-contract>
432
+ <workit-superpowers-doc-contract>
433
433
  ${body}
434
- </workflow-toolkit-superpowers-doc-contract>
434
+ </workit-superpowers-doc-contract>
435
435
 
436
- <workflow-toolkit-reminder>
436
+ <workit-reminder>
437
437
  HARD-GATE: Bounded user choices → call Cursor AskQuestion directly (never A/B/C or 1/2/3 lists in prose).
438
438
 
439
439
  ${reminder}
440
- </workflow-toolkit-reminder>`;
440
+ </workit-reminder>`;
441
441
  process.stdout.write(JSON.stringify({ additional_context: context }, null, 2) + `
442
442
  `);
443
443
  process.exit(0);
@@ -21848,7 +21848,7 @@ function cursorHooksEntry(_packageDir) {
21848
21848
  args: []
21849
21849
  };
21850
21850
  }
21851
- var named = (s, name) => s === name || s.startsWith(`${name}@`), CURSOR_RUNTIME_PACKAGE = "@brainervirus/workit-cursor@0.8.0";
21851
+ var named = (s, name) => s === name || s.startsWith(`${name}@`), CURSOR_RUNTIME_PACKAGE = "@brainervirus/workit-cursor@0.8.5";
21852
21852
  var init_registration = () => {};
21853
21853
 
21854
21854
  // packages/workit-core/src/core/skill-manifests.ts
@@ -22219,6 +22219,17 @@ var TOKEN_PLACEHOLDER2 = "YOUR_TOKEN_HERE", findDevFromCwd = (cwd) => {
22219
22219
  if (typeof entry !== "object" || entry === null || Array.isArray(entry))
22220
22220
  return "invalid";
22221
22221
  return typeof entry.command === "string" ? entry.command : "invalid";
22222
+ }, validLocalDistHook = (command, res) => {
22223
+ const m = /^node\s+(.+)$/.exec(command.trim());
22224
+ if (!m)
22225
+ return false;
22226
+ const entry = m[1].trim();
22227
+ if (!path9.isAbsolute(entry))
22228
+ return false;
22229
+ if (path9.resolve(entry) !== path9.resolve(path9.join(res.cursorPluginDir, "dist", "cursor-session-start.js"))) {
22230
+ return false;
22231
+ }
22232
+ return validNodeEntry(entry, "node", res.env);
22222
22233
  }, checkLauncher = (res) => {
22223
22234
  const dev = res.dev;
22224
22235
  const hosts = hostsFor(res.host);
@@ -22234,7 +22245,7 @@ var TOKEN_PLACEHOLDER2 = "YOUR_TOKEN_HERE", findDevFromCwd = (cwd) => {
22234
22245
  const hook = registeredCursorHook(res);
22235
22246
  if (hook === "invalid") {
22236
22247
  missing.push(`cursor: canonical session-start hook in ${path9.join(res.cursorPluginDir, "hooks", "hooks-cursor.json")}`);
22237
- } else if (hook !== null && hook !== canonicalCursorHook) {
22248
+ } else if (hook !== null && hook !== canonicalCursorHook && !validLocalDistHook(hook, res)) {
22238
22249
  missing.push(`cursor: canonical session-start hook in ${path9.join(res.cursorPluginDir, "hooks", "hooks-cursor.json")} (registered ${hook})`);
22239
22250
  }
22240
22251
  }
@@ -24041,8 +24052,13 @@ function sddReviewPackage({
24041
24052
  const contained = resolveDocsPath({ workspace_root, path: sdd_dir });
24042
24053
  if (!contained.ok)
24043
24054
  return { error: contained.error };
24055
+ if (base_sha === head_sha) {
24056
+ return {
24057
+ error: `empty commit range (base_sha ${base_sha} === head_sha ${head_sha}): nothing to review`,
24058
+ code: "empty_commit_range"
24059
+ };
24060
+ }
24044
24061
  const dir = contained.path;
24045
- mkdirSync6(dir, { recursive: true });
24046
24062
  const base7 = base_sha.slice(0, 7);
24047
24063
  const head7 = head_sha.slice(0, 7);
24048
24064
  const diffPath = path19.join(dir, `review-${base7}..${head7}.diff`);
@@ -24052,6 +24068,13 @@ function sddReviewPackage({
24052
24068
  encoding: "utf8",
24053
24069
  stdio: ["pipe", "pipe", "pipe"]
24054
24070
  });
24071
+ if (diff.trim() === "") {
24072
+ return {
24073
+ error: `empty commit range (${base_sha}..${head_sha}): diff is empty, nothing to review`,
24074
+ code: "empty_commit_range"
24075
+ };
24076
+ }
24077
+ mkdirSync6(dir, { recursive: true });
24055
24078
  writeFileSync5(diffPath, diff, "utf8");
24056
24079
  const rel = posix2(path19.relative(contained.base, diffPath));
24057
24080
  return { diff_path: rel, base_sha, head_sha, base7, head7 };
@@ -24069,7 +24092,8 @@ function sddAppendProgress({
24069
24092
  return { error: contained.error };
24070
24093
  const path_ = contained.path;
24071
24094
  const trimmed = line.trim();
24072
- if (!PROGRESS_RE.test(trimmed)) {
24095
+ const match = PROGRESS_RE.exec(trimmed);
24096
+ if (!match || match[1].toLowerCase() === match[2].toLowerCase()) {
24073
24097
  return { error: "invalid progress line format" };
24074
24098
  }
24075
24099
  if (existsSync11(path_) && statSync6(path_).isDirectory()) {
@@ -24087,7 +24111,7 @@ var init_sdd = __esm(() => {
24087
24111
  init_docs_validate();
24088
24112
  init_flow_state();
24089
24113
  init_docs_layout();
24090
- PROGRESS_RE = /^Task\s+\d+:\s+complete\s+\(commits\s+[0-9a-f]{7,40}\.\.[0-9a-f]{7,40},/i;
24114
+ PROGRESS_RE = /^Task\s+\d+:\s+complete\s+\(commits\s+([0-9a-f]{7,40})\.\.([0-9a-f]{7,40}),/i;
24091
24115
  });
24092
24116
 
24093
24117
  // packages/workit-core/src/core/menu.ts
@@ -26793,7 +26817,7 @@ function initStatusData(configDirPath = configDir()) {
26793
26817
  ok: fs5.existsSync(ytJson) && youtrackConfig !== null && !("error" in youtrackConfig),
26794
26818
  path: fs5.existsSync(ytJson) ? resolvePath(ytJson) : path28.resolve(ytJson),
26795
26819
  config_edit_path: resolvePath(ytJson),
26796
- fix: "workflow_toolkit_init_apply action=youtrack_scaffold"
26820
+ fix: "workit_init_apply action=youtrack_scaffold"
26797
26821
  });
26798
26822
  const ytTokenPath = youtrackConfig?.tokenFile ?? path28.join(configDirPath, "youtrack.token");
26799
26823
  const tokenText = fs5.existsSync(ytTokenPath) ? fs5.readFileSync(ytTokenPath, "utf8").trim() : "";
@@ -26856,7 +26880,7 @@ function initStatusData(configDirPath = configDir()) {
26856
26880
  ok: fs5.existsSync(vcsJson) && vcsCfg !== null && !("error" in vcsCfg),
26857
26881
  path: fs5.existsSync(vcsJson) ? resolvePath(vcsJson) : path28.resolve(vcsJson),
26858
26882
  config_edit_path: resolvePath(vcsJson),
26859
- fix: "workflow_toolkit_init_apply action=vcs_scaffold"
26883
+ fix: "workit_init_apply action=vcs_scaffold"
26860
26884
  });
26861
26885
  const provActive = vcsCfg && !("error" in vcsCfg) ? vcsCfg.provider : null;
26862
26886
  const tokenItem = (tid, label, rawPath, providerKey) => {
@@ -27924,7 +27948,7 @@ var init_server3 = __esm(async () => {
27924
27948
  }
27925
27949
  return jsonResult(withWorkspace(workspace_root, payload));
27926
27950
  });
27927
- registerTool("workflow_toolkit_init_status", {
27951
+ registerTool("workit_init_status", {
27928
27952
  description: "Check workit setup (MCP deps, YouTrack config, token)",
27929
27953
  inputSchema: {}
27930
27954
  }, async () => {
@@ -27933,7 +27957,7 @@ var init_server3 = __esm(async () => {
27933
27957
  return jsonResult({ error: data.error });
27934
27958
  return jsonResult(data);
27935
27959
  });
27936
- registerTool("workflow_toolkit_status", {
27960
+ registerTool("workit_status", {
27937
27961
  description: "Full health check: MCP deps, config files, YouTrack API verify. Use after editing token file.",
27938
27962
  inputSchema: {}
27939
27963
  }, async () => {
@@ -27942,7 +27966,7 @@ var init_server3 = __esm(async () => {
27942
27966
  return jsonResult({ error: data.error });
27943
27967
  return jsonResult(data);
27944
27968
  });
27945
- registerTool("workflow_toolkit_init_apply", {
27969
+ registerTool("workit_init_apply", {
27946
27970
  description: "Apply init action. Requires confirmed: true. Token is NOT accepted here — user edits token file locally.",
27947
27971
  inputSchema: {
27948
27972
  action: exports_external.enum([
@@ -28377,7 +28401,7 @@ import path29 from "node:path";
28377
28401
  import { fileURLToPath as fileURLToPath2 } from "node:url";
28378
28402
  var mcpDir = path29.dirname(fileURLToPath2(import.meta.url));
28379
28403
  var pluginDir = path29.resolve(mcpDir, "..");
28380
- var marker = path29.join(pluginDir, ".workflow-toolkit-root");
28404
+ var marker = path29.join(pluginDir, ".workit-root");
28381
28405
  var resolveRoot = () => {
28382
28406
  if (process.env.WORKFLOW_TOOLKIT_ROOT && existsSync19(path29.join(process.env.WORKFLOW_TOOLKIT_ROOT, "scripts"))) {
28383
28407
  return process.env.WORKFLOW_TOOLKIT_ROOT;
@@ -3,7 +3,7 @@
3
3
  "hooks": {
4
4
  "sessionStart": [
5
5
  {
6
- "command": "npx -y --package=@brainervirus/workit-cursor@0.8.0 workit-cursor-session-start"
6
+ "command": "npx -y --package=@brainervirus/workit-cursor@0.8.5 workit-cursor-session-start"
7
7
  }
8
8
  ]
9
9
  }
package/mcp.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "mcpServers": {
3
3
  "workit": {
4
4
  "command": "npx",
5
- "args": ["-y", "--package=@brainervirus/workit-cursor@0.8.0", "workit-cursor-mcp", "${workspaceFolder}"]
5
+ "args": ["-y", "--package=@brainervirus/workit-cursor@0.8.5", "workit-cursor-mcp", "${workspaceFolder}"]
6
6
  }
7
7
  }
8
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brainervirus/workit-cursor",
3
- "version": "0.8.4",
3
+ "version": "0.8.6",
4
4
  "private": false,
5
5
  "description": "Workit Cursor plugin: MCP server, hooks, rules, marketplace manifest (thin over @brainervirus/workit-core)",
6
6
  "keywords": [
@@ -39,7 +39,7 @@
39
39
  "build": "bun scripts/build.ts"
40
40
  },
41
41
  "dependencies": {
42
- "@brainervirus/workit-core": "^0.8.4",
42
+ "@brainervirus/workit-core": "^0.8.6",
43
43
  "@modelcontextprotocol/sdk": "^1.12.0",
44
44
  "zod": "^3.24.0"
45
45
  },
@@ -23,6 +23,8 @@ The pasted prompt includes instructions to call `workflow_sdd_context`, **Cursor
23
23
 
24
24
  `workflow_handoff_prompt` also returns `tasks[]`, `branch`, `sdd_dir`, `completed_task_ids`, and `todos` for same-session MCP use — not copy-paste transport.
25
25
 
26
+ A destination run that executes the plan must still end with `workflow_plan_complete` once the SDD ledger is complete and repository verification passes, and never finish the run while the plan is still `active`.
27
+
26
28
  ## Output (success)
27
29
 
28
30
  When the tool returns `{ prompt }`, output **only** one fenced code block containing `prompt` verbatim. No preamble, no explanation outside the fence.
@@ -37,4 +37,8 @@ Announce: "Using implement + inline."
37
37
 
38
38
  Follow the contract verbatim. Keep TodoWrite `in_progress`/`completed` in sync each task. At verify/commit phase use `workflow_verify` and `workflow_git_context` MCP tools.
39
39
 
40
+ Each task lands exactly one contiguous non-empty commit range (`base..head`): fix rounds append commits to that range and never rewrite/amend an active review range; each progress line records the task's real base..head shas.
41
+
40
42
  Do not emit a handoff fence — this is in-session execution.
43
+
44
+ **Mandatory:** end the run by calling MCP `workflow_plan_complete` after the final task once the SDD ledger is complete (all task IDs appended) and `workflow_verify` passes — a complete ledger and green verification are the tool's gates. Never finish the run while the plan is still `active`.
@@ -12,7 +12,7 @@ Scaffold config via MCP. **Never paste API tokens in chat.**
12
12
 
13
13
  ## Step 1 — Status (required)
14
14
 
15
- Call MCP `workflow_toolkit_init_status`. Show `items[]` in English.
15
+ Call MCP `workit_init_status`. Show `items[]` in English.
16
16
 
17
17
  ### YouTrack settings (when `youtrack_config` present)
18
18
 
@@ -42,11 +42,11 @@ Call MCP `workflow_toolkit_init_status`. Show `items[]` in English.
42
42
 
43
43
  ### mcp_deps
44
44
 
45
- Native `AskQuestion` asks whether to install MCP dependencies → on yes: `workflow_toolkit_init_apply` action=`npm_install` confirmed=`true`
45
+ Native `AskQuestion` asks whether to install MCP dependencies → on yes: `workit_init_apply` action=`npm_install` confirmed=`true`
46
46
 
47
47
  ### YouTrack scaffold
48
48
 
49
- Native `AskQuestion` asks whether to create the YouTrack scaffold → on yes: `workflow_toolkit_init_apply` action=`youtrack_scaffold` confirmed=`true`
49
+ Native `AskQuestion` asks whether to create the YouTrack scaffold → on yes: `workit_init_apply` action=`youtrack_scaffold` confirmed=`true`
50
50
 
51
51
  ### VCS scaffold (GitLab + GitHub token files)
52
52
 
@@ -54,7 +54,7 @@ Only when `items[vcs_json].ok` is **false**:
54
54
 
55
55
  1. Native `AskQuestion` asks for GitLab or GitHub → remember `provider` (`gitlab` | `github`).
56
56
  2. Native `AskQuestion` asks `Create vcs.json and token placeholders for <provider>?`
57
- → on yes: `workflow_toolkit_init_apply` action=`vcs_scaffold` confirmed=`true` **`vcs_provider=<chosen provider>`**
57
+ → on yes: `workit_init_apply` action=`vcs_scaffold` confirmed=`true` **`vcs_provider=<chosen provider>`**
58
58
 
59
59
  Both `gitlab.token` and `github.token` are always created (switch later by editing `provider` in `vcs.json`). Tell the user which token file is **active** for `/wk-pr` based on the chosen provider.
60
60
 
@@ -103,5 +103,5 @@ For the **active** provider (`vcs_config.provider`), show from `vcs_config.token
103
103
  ## Rules
104
104
 
105
105
  - Never ask for or accept tokens in chat.
106
- - Mutations only via `workflow_toolkit_init_apply` with `confirmed: true`.
106
+ - Mutations only via `workit_init_apply` with `confirmed: true`.
107
107
  - Verification is **`/wk-status`** only — not part of init.
@@ -18,7 +18,7 @@ Post a Spanish comment and log time on a **task** issue (not the meeting issue).
18
18
 
19
19
  ## Step 0 — Toolkit ready
20
20
 
21
- If unsure, call `workflow_toolkit_status`. Stop if `ready: false`.
21
+ If unsure, call `workit_status`. Stop if `ready: false`.
22
22
 
23
23
  ## Step 1 — Issue (required)
24
24
 
@@ -12,7 +12,7 @@ Log meeting time to a **meeting issue** from config. **Never post a comment.**
12
12
 
13
13
  ## Step 0 — Toolkit ready
14
14
 
15
- If unsure, call `workflow_toolkit_status`. Stop if `ready: false`.
15
+ If unsure, call `workit_status`. Stop if `ready: false`.
16
16
 
17
17
  ## Step 1 — Context (required)
18
18
 
@@ -12,7 +12,7 @@ Deterministic health check. **Tools only — no manual git/curl.**
12
12
 
13
13
  ## Step 1 — Full status (required)
14
14
 
15
- Call MCP `workflow_toolkit_status` once.
15
+ Call MCP `workit_status` once.
16
16
 
17
17
  Use the return value as ground truth. Do not infer state yourself.
18
18
 
@@ -80,6 +80,6 @@ Use `items[youtrack_token].token_create_url` / `token_edit_path`, or top-level `
80
80
 
81
81
  ## Rules
82
82
 
83
- - Do not call YouTrack HTTP directly — `workflow_toolkit_status` includes verify.
83
+ - Do not call YouTrack HTTP directly — `workit_status` includes verify.
84
84
  - Do not ask user to paste token — point them to edit the token file if `placeholder: true`.
85
85
  - Optional: `workflow_youtrack_verify_token` only if user asks to re-test API alone.
@@ -63,6 +63,7 @@ digraph process {
63
63
  "Read plan, note context and global constraints, create todos" [shape=box];
64
64
  "More tasks remain?" [shape=diamond];
65
65
  "Dispatch final code reviewer subagent (../requesting-code-review/code-reviewer.md)" [shape=box];
66
+ "Run verification, then workflow_plan_complete once the ledger is complete and verification passes" [shape=box];
66
67
  "Use superpowers:finishing-a-development-branch" [shape=box style=filled fillcolor=lightgreen];
67
68
 
68
69
  "Read plan, note context and global constraints, create todos" -> "Dispatch implementer subagent (./implementer-prompt.md)";
@@ -78,10 +79,13 @@ digraph process {
78
79
  "Mark task complete in todo list and progress ledger" -> "More tasks remain?";
79
80
  "More tasks remain?" -> "Dispatch implementer subagent (./implementer-prompt.md)" [label="yes"];
80
81
  "More tasks remain?" -> "Dispatch final code reviewer subagent (../requesting-code-review/code-reviewer.md)" [label="no"];
81
- "Dispatch final code reviewer subagent (../requesting-code-review/code-reviewer.md)" -> "Use superpowers:finishing-a-development-branch";
82
+ "Dispatch final code reviewer subagent (../requesting-code-review/code-reviewer.md)" -> "Run verification, then workflow_plan_complete once the ledger is complete and verification passes";
83
+ "Run verification, then workflow_plan_complete once the ledger is complete and verification passes" -> "Use superpowers:finishing-a-development-branch";
82
84
  }
83
85
  ```
84
86
 
87
+ **Mandatory completion:** after the final whole-branch review, run repository verification. Once the SDD ledger is complete and verification passes, end the run by calling `workflow_plan_complete` (or the CLI `workit flow complete`) — a complete ledger and green verification are the tool's gates. Never finish while the plan is still `active`.
88
+
85
89
  ## Pre-Flight Plan Review
86
90
 
87
91
  Before dispatching Task 1, scan the plan once for conflicts:
@@ -257,6 +261,10 @@ a ledger file, not only in todos.
257
261
  - When a task's review comes back clean, append one line to the ledger in
258
262
  the same message as your other bookkeeping:
259
263
  `Task N: complete (commits <base7>..<head7>, review clean)`.
264
+ - Each task produces exactly one contiguous non-empty commit range: fix
265
+ rounds append commits to it, never amend or rewrite an active review
266
+ range, and the ledger progress line records the task's real base..head
267
+ shas.
260
268
  - The ledger is your recovery map: the commits it names exist in git even
261
269
  when your context no longer remembers creating them. After compaction,
262
270
  trust the ledger and `git log` over your own recollection.