@brainervirus/workit-core 0.8.9 → 0.8.11

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brainervirus/workit-core",
3
- "version": "0.8.9",
3
+ "version": "0.8.11",
4
4
  "private": false,
5
5
  "description": "Workit — workflow rails for agentic coding: specs, plans, YouTrack, CI-gated commits (shared core)",
6
6
  "keywords": [
@@ -0,0 +1,72 @@
1
+ #!/usr/bin/env bun
2
+ // Post-release manifest sync (AR-15): semantic-release bumps package versions
3
+ // only inside the ephemeral CI checkout, so the committed manifests stay frozen
4
+ // while tags march on. This script aligns every tracked manifest with the
5
+ // latest released tag and is safe to re-run — a fully synced tree changes
6
+ // nothing. The workflow step wraps it with a `[skip ci]` commit so main always
7
+ // carries the released version after a release.
8
+ import { execFileSync } from "node:child_process";
9
+ import { readFileSync, writeFileSync } from "node:fs";
10
+ import { resolve } from "node:path";
11
+
12
+ export const SYNC_MANIFEST_PATHS = [
13
+ "package.json",
14
+ "packages/workit-core/package.json",
15
+ "packages/workit-opencode/package.json",
16
+ "packages/workit-cursor/package.json",
17
+ "packages/workit-cli/package.json",
18
+ // Kept in lockstep with packages/workit-core/package.json by contract test.
19
+ "packages/workit-cursor/.cursor-plugin/plugin.json",
20
+ ];
21
+
22
+ export type ManifestSyncResult = { version: string; changed: string[] };
23
+
24
+ /**
25
+ * Write `version` (a bare semver or a leading-v git tag) into every tracked
26
+ * manifest under `root`. Idempotent: manifests already at the target version
27
+ * are left byte-untouched and omitted from `changed`. Throws on a value that
28
+ * is not a plain release version (`latest`, branches, ranges).
29
+ */
30
+ export function syncManifests(root: string, tagOrVersion: string): ManifestSyncResult {
31
+ const match = /^v?(\d+\.\d+\.\d+(?:[-+][0-9A-Za-z.-]+)?)$/.exec(tagOrVersion.trim());
32
+ if (!match) throw new Error(`invalid version tag: ${JSON.stringify(tagOrVersion)}`);
33
+ const version = match[1];
34
+ const changed: string[] = [];
35
+ for (const rel of SYNC_MANIFEST_PATHS) {
36
+ const file = resolve(root, ...rel.split("/"));
37
+ const parsed = JSON.parse(readFileSync(file, "utf8"));
38
+ if (parsed.version === version) continue;
39
+ parsed.version = version;
40
+ writeFileSync(file, `${JSON.stringify(parsed, null, 2)}\n`, "utf8");
41
+ changed.push(rel);
42
+ }
43
+ return { version, changed };
44
+ }
45
+
46
+ /** The newest `v*` tag by descending semver refname order (empty repo throws). */
47
+ export function latestReleaseTag(cwd?: string): string {
48
+ const out = execFileSync("git", ["tag", "--list", "v*", "--sort=-v:refname"], {
49
+ cwd,
50
+ encoding: "utf8",
51
+ stdio: ["pipe", "pipe", "pipe"],
52
+ })
53
+ .split("\n")
54
+ .map((line) => line.trim())
55
+ .filter(Boolean);
56
+ const tag = out[0];
57
+ if (!tag) throw new Error("no v* release tag found — run after the first semantic-release");
58
+ return tag;
59
+ }
60
+
61
+ if (import.meta.main) {
62
+ const root = process.argv[3]
63
+ ? resolve(process.argv[3])
64
+ : resolve(import.meta.dir, "..", "..", "..");
65
+ const tag = process.argv[2] ?? latestReleaseTag(root);
66
+ const { version, changed } = syncManifests(root, tag);
67
+ console.log(
68
+ changed.length > 0
69
+ ? `synced ${changed.length} manifest(s) to ${version}: ${changed.join(", ")}`
70
+ : `manifests already at ${version}`,
71
+ );
72
+ }
@@ -6,10 +6,10 @@ description: Preview and apply a Keep a Changelog update.
6
6
  # Changelog
7
7
 
8
8
  1. Load this skill explicitly through OpenCode's `skill` tool.
9
- 2. Call the read-only `workflow_changelog_context` context tool; its result is ground truth.
9
+ 2. Call the read-only `workit_changelog_context` context tool; its result is ground truth.
10
10
  3. Draft the exact insertion preview, including target heading, categories, and bullets.
11
11
  4. Use native `question` with concise choices and allow a custom answer before changing the file.
12
- 5. Call `workflow_changelog_apply` only after approval with `confirmed: true`.
12
+ 5. Call `workit_changelog_apply` only after approval with `confirmed: true`.
13
13
  6. Report the structured success, failure stage, or partial result; never infer success.
14
14
 
15
15
  Target `## [Unreleased]` unless the user requests a release. Use only Added, Changed, Deprecated, Removed, Fixed, or Security; group user-visible behavior and skip internal-only work. The apply tool must merge into existing category headings, preserve all unrelated lines, and skip duplicate bullets. If normalization is needed, include it in the same preview and approval. Do not hand-edit the changelog, version packages, tag, or commit. `todowrite` and `task` are unnecessary here.
@@ -7,10 +7,10 @@ disable-model-invocation: true
7
7
  # Commit
8
8
 
9
9
  1. Load this skill explicitly through OpenCode's `skill` tool.
10
- 2. Call the read-only `workflow_git_context` context tool with any selected paths; its result is ground truth.
10
+ 2. Call the read-only `workit_git_context` context tool with any selected paths; its result is ground truth.
11
11
  3. Draft the exact Conventional Commit message and the already-staged file set.
12
12
  4. Use native `question` with concise choices and allow a custom answer before committing.
13
- 5. Call `workflow_commit` only after approval with `confirmed: true` and the reviewed `message`.
13
+ 5. Call `workit_commit` only after approval with `confirmed: true` and the reviewed `message`.
14
14
  6. Report the structured success, failure stage, or partial result; never infer success.
15
15
 
16
- Never stage files automatically: `workflow_commit` commits the current index only. Stop for an empty index, partial staging ambiguity, unrelated staged files, secrets, protected branches, or failed hooks. Never push, bypass hooks, use `--no-verify`, or claim files were committed unless the result proves it. Keep related code, tests, and docs in one coherent commit; do not invent extra commit groups. `todowrite` and `task` are unnecessary here.
16
+ Never stage files automatically: `workit_commit` commits the current index only. Stop for an empty index, partial staging ambiguity, unrelated staged files, secrets, protected branches, or failed hooks. Never push, bypass hooks, use `--no-verify`, or claim files were committed unless the result proves it. Keep related code, tests, and docs in one coherent commit; do not invent extra commit groups. `todowrite` and `task` are unnecessary here.
@@ -6,10 +6,10 @@ description: Refresh stale repository documentation from structured change conte
6
6
  # Docs refresh
7
7
 
8
8
  1. Load this skill explicitly through OpenCode's `skill` tool.
9
- 2. Call the read-only `workflow_docs_context` context tool; its result is ground truth.
9
+ 2. Call the read-only `workit_docs_context` context tool; its result is ground truth.
10
10
  3. Draft the smallest factual documentation edit from structured facts.
11
11
  4. Use native `question` with concise choices and allow a custom answer only if the requested edit scope is ambiguous.
12
- 5. Apply approved edits with normal OpenCode file tools, then call `workflow_verify`.
12
+ 5. Apply approved edits with normal OpenCode file tools, then call `workit_verify`.
13
13
  6. Report the structured success, failure stage, or partial result; never infer success.
14
14
 
15
15
  Prefer README changes when stale, then directly related tracked documentation. Preserve tone and structure; do not invent features, commands, environment variables, screenshots, or install steps. Do not make stylistic rewrites, commit, or modify product code. Report verification exactly. Use `todowrite` only when multiple requested documents need tracking; `task` is unnecessary.
@@ -7,13 +7,13 @@ disable-model-invocation: true
7
7
  # Handoff
8
8
 
9
9
  1. Load this skill explicitly through OpenCode's `skill` tool.
10
- 2. Call the automatic `workflow_handoff_session` tool with the full user message as `message`; its result is ground truth.
10
+ 2. Call the automatic `workit_handoff_session` tool with the full user message as `message`; its result is ground truth.
11
11
  3. The tool resolves the tracked spec, plan, and SDD context and seeds the continuation session.
12
12
  4. This workflow needs no `question`: the explicit invocation is approval.
13
13
  5. Pass only `message`; the tool itself recognizes an exact `--stay` flag and otherwise selects the new session.
14
14
  6. Report the structured success, failure stage, or partial result; never infer success.
15
- 7. After any `workflow_handoff_session` result—success, partial, or failure—end the originating turn immediately after one status message. Never create todos, execute the plan inline, modify files, retry handoff, or call another tool.
16
- 8. A destination run that executes the plan must still end with `workflow_plan_complete` (or the CLI `workit flow complete`) once the SDD ledger is complete and repository verification passes, and never finish the run while the plan is still `active`.
15
+ 7. After any `workit_handoff_session` result—success, partial, or failure—end the originating turn immediately after one status message. Never create todos, execute the plan inline, modify files, retry handoff, or call another tool.
16
+ 8. A destination run that executes the plan must still end with `workit_plan_complete` (or the CLI `workit flow complete`) once the SDD ledger is complete and repository verification passes, and never finish the run while the plan is still `active`.
17
17
 
18
18
  Handoff titles continuation sessions `Workit: <slug>` (never `Continue <slug>`). OpenCode's native `Continue opencode -s <session-id>` epilogue is the valid manual recovery command when host selection is unavailable (`stage: "select"`): `selected: false` with a `sessionID` is a partial success — use `opencode -s <session-id>` to resume, not a Workit bug.
19
19
 
@@ -11,14 +11,14 @@ The parent agent is coordinator-only. It must not edit product code or perform d
11
11
  ## Native setup
12
12
 
13
13
  1. Load this skill explicitly through OpenCode's `skill` tool.
14
- 2. Call read-only `workflow_plan_tasks` and `workflow_sdd_context`; their structured results are ground truth.
15
- 3. Call `workflow_flow_status` with the plan path and hard-stop unless `spec.status === "approved"`, `plan.status === "approved"`, and `menu.presented === true`. If any gate is missing, run the required approval flow (`workflow_spec_approve`/`workflow_plan_approve` after the user's native-question approval, `workflow_plan_menu` after the post-plan menu) and re-check — never start tasks on a draft or unapproved plan.
14
+ 2. Call read-only `workit_plan_tasks` and `workit_sdd_context`; their structured results are ground truth.
15
+ 3. Call `workit_flow_status` with the plan path and hard-stop unless `spec.status === "approved"`, `plan.status === "approved"`, and `menu.presented === true`. If any gate is missing, run the required approval flow (`workit_spec_approve`/`workit_plan_approve` after the user's native-question approval, `workit_plan_menu` after the post-plan menu) and re-check — never start tasks on a draft or unapproved plan.
16
16
  4. Initialize native `todowrite` from returned tasks and mark ledger-completed task IDs completed.
17
- 5. Call `workflow_resolve_branch`, then show the current branch, target branch, and stash behavior before any branch checkout/setup mutation.
17
+ 5. Call `workit_resolve_branch`, then show the current branch, target branch, and stash behavior before any branch checkout/setup mutation.
18
18
  6. Always use native `question` before that mutation. For a clean tree, ask whether to proceed or cancel. For a dirty tree, add the stash choice and state what will be stashed; allow a custom answer.
19
- 7. Call `workflow_branch_setup` with `confirmed: true` only after approval; never use worktrees. Flow-tool confirmations are never agent-typed booleans and never caller-supplied evidence: the plugin records your native-`question` answer as a host-observed one-use receipt (`attested: true`, `callID`, `selectedLabel`, `recordedAt`) consumed by the approval/menu tools — no evidence argument exists. Delegated worker status comes from host session parentage (`parentID`), never a caller `role` field.
19
+ 7. Call `workit_branch_setup` with `confirmed: true` only after approval; never use worktrees. Flow-tool confirmations are never agent-typed booleans and never caller-supplied evidence: the plugin records your native-`question` answer as a host-observed one-use receipt (`attested: true`, `callID`, `selectedLabel`, `recordedAt`) consumed by the approval/menu tools — no evidence argument exists. Delegated worker status comes from host session parentage (`parentID`), never a caller `role` field.
20
20
  8. Report any setup failure stage or partial result; never infer success.
21
- 9. Fill specs/plans from the quality templates: `templates/spec-template.md` for specs, `templates/plan-template.md` for plans. After `workflow_docs_validate`, surface the returned `quality` findings: hard findings (missing required section, missing CA-XX) block task start unless the user explicitly waives them; warnings are advisory.
21
+ 9. Fill specs/plans from the quality templates: `templates/spec-template.md` for specs, `templates/plan-template.md` for plans. After `workit_docs_validate`, surface the returned `quality` findings: hard findings (missing required section, missing CA-XX) block task start unless the user explicitly waives them; warnings are advisory.
22
22
 
23
23
  Working state lives only in gitignored `docs/<slug>/sdd/` — never `.superpowers/sdd`, never an extra nested slug level. Load the package-neutral execution contract by name, not an installation-specific path.
24
24
 
@@ -27,21 +27,21 @@ Working state lives only in gitignored `docs/<slug>/sdd/` — never `.superpower
27
27
  For every plan task whose ID is absent from `completed_task_ids`:
28
28
 
29
29
  1. Mark it `in_progress` with `todowrite`.
30
- 2. Create its brief with `workflow_sdd_task_brief` using `confirmed: true` and the parsed `section_text`.
30
+ 2. Create its brief with `workit_sdd_task_brief` using `confirmed: true` and the parsed `section_text`.
31
31
  3. Use `task` with the built-in `explore` agent for read-only discovery when needed, then a fresh built-in `general` agent to implement from the brief. The parent remains coordinator-only.
32
32
  4. Require product changes to follow TDD: failing check first, minimal implementation, passing focused check.
33
- 5. Create the review package with `workflow_sdd_review_package` using `confirmed: true`.
34
- 6. Dispatch separate `general` agents for spec-compliance review and code-quality review. **Blocking findings** (Critical, Important, or spec-compliance) may trigger at most **two** fix+re-review rounds per task. **Advisory** findings (Minor, style, YAGNI, taste) never pause the loop — append them with `workflow_sdd_append_advisory` (`--task <id> --text <text>`) using `confirmed: true`.
35
- 7. Append the validated ledger line with `workflow_sdd_append_progress` using `confirmed: true`, then mark the task completed with `todowrite`.
33
+ 5. Create the review package with `workit_sdd_review_package` using `confirmed: true`.
34
+ 6. Dispatch separate `general` agents for spec-compliance review and code-quality review. **Blocking findings** (Critical, Important, or spec-compliance) may trigger at most **two** fix+re-review rounds per task. **Advisory** findings (Minor, style, YAGNI, taste) never pause the loop — append them with `workit_sdd_append_advisory` (`--task <id> --text <text>`) using `confirmed: true`.
35
+ 7. Append the validated ledger line with `workit_sdd_append_progress` using `confirmed: true`, then mark the task completed with `todowrite`.
36
36
 
37
37
  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.
38
38
 
39
39
  Never redispatch completed task IDs. Pass task briefs and review diffs to agents; do not make them reparse the plan. Keep commits on the in-place feature/bugfix branch.
40
40
 
41
- Delegated authority is direct-child-only: a worker is the session whose host `parentID` exactly equals the activating coordinator's recorded `coordinator_session_id`; missing, mismatched, or multi-owner lineage fails closed with `delegation_lineage_denied`, and nested `opencode` launches are denied during active delegated work. An authorized child receives only the compact worker contract — execute the supplied brief, follow TDD, land one contiguous non-empty commit range, report results — never coordinator guidance, `wk-implement`, or ledger management. Coordinator bookkeeping (briefs, review packages, progress, advisories via `workflow_sdd_*`) stays with the coordinator session.
41
+ Delegated authority is direct-child-only: a worker is the session whose host `parentID` exactly equals the activating coordinator's recorded `coordinator_session_id`; missing, mismatched, or multi-owner lineage fails closed with `delegation_lineage_denied`, and nested `opencode` launches are denied during active delegated work. An authorized child receives only the compact worker contract — execute the supplied brief, follow TDD, land one contiguous non-empty commit range, report results — never coordinator guidance, `wk-implement`, or ledger management. Coordinator bookkeeping (briefs, review packages, progress, advisories via `workit_sdd_*`) stays with the coordinator session.
42
42
 
43
43
  ## Final gate
44
44
 
45
- After all remaining tasks, dispatch a final full-branch code review, run `workflow_verify`, and report exact per-check results. 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. Only then may advisory fixes run. Use `workflow_git_context` for the final commit preview and the `wk-commit` skill for any approved commit. If a tracked stash reference exists, preview reapplication with `question`, then call `workflow_branch_setup` with `confirmed: true` only after approval.
45
+ After all remaining tasks, dispatch a final full-branch code review, run `workit_verify`, and report exact per-check results. 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. Only then may advisory fixes run. Use `workit_git_context` for the final commit preview and the `wk-commit` skill for any approved commit. If a tracked stash reference exists, preview reapplication with `question`, then call `workit_branch_setup` with `confirmed: true` only after approval.
46
46
 
47
- **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`.
47
+ **Mandatory:** end the run by calling `workit_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 `workit_verify` passes — a complete ledger and green verification are the tool's gates. Never finish the run while the plan is still `active`.
@@ -9,10 +9,10 @@ disable-model-invocation: true
9
9
  Read [references/youtrack-update-style.md](references/youtrack-update-style.md) before drafting. Chat follows the user's language; the comment body is manager-friendly Spanish (`es-CL`).
10
10
 
11
11
  1. Load this skill explicitly through OpenCode's `skill` tool.
12
- 2. Ask in plain prose for the user-provided issue URL or ID, call `workflow_youtrack_parse_issue`, then read-only `workflow_youtrack_context`; structured results are ground truth.
13
- 3. Gather the user's notes, call `workflow_youtrack_parse_duration`, polish only supported facts, and call `workflow_youtrack_draft` for the exact comment preview.
12
+ 2. Ask in plain prose for the user-provided issue URL or ID, call `workit_youtrack_parse_issue`, then read-only `workit_youtrack_context`; structured results are ground truth.
13
+ 3. Gather the user's notes, call `workit_youtrack_parse_duration`, polish only supported facts, and call `workit_youtrack_draft` for the exact comment preview.
14
14
  4. Use native `question` with concise choices and allow a custom answer to approve the reviewed comment and time entry.
15
- 5. Call `workflow_youtrack_post` only after approval with `confirmed: true`, `issueId`, `markdown`, and `minutes`.
15
+ 5. Call `workit_youtrack_post` only after approval with `confirmed: true`, `issueId`, `markdown`, and `minutes`.
16
16
  6. Report the structured success, failure stage, or partial result; never infer success.
17
17
 
18
18
  Never guess the issue, compute minutes, pass a date, expose tokens, or post Git/file details as the update. Never present a clickable `question` option whose label is an instruction to type free text (e.g. "Type the issue URL/ID"): clicking an option returns the label literal, not the typed value, so ask for free text in prose instead, with the custom answer field enabled. Preserve the user's paragraph voice, explain technical terms plainly, and avoid robotic status bullets. `todowrite` and `task` are unnecessary here.
@@ -21,7 +21,7 @@ Consume the standard Result envelope:
21
21
 
22
22
  - If `result.ok` is true, report only effects proven by `result.data`.
23
23
  - If false, use `result.data.postedComment` and `result.data.loggedMinutes` to distinguish completed effects.
24
- - If `result.data.retry === "workflow_youtrack_post"`, use native `question` to ask whether to retry the unchanged reviewed `issueId`, `markdown`, and `minutes`. On approval, call `workflow_youtrack_post` with `confirmed: true` at most once; never loop.
25
- - If `result.data.retry === "workflow_youtrack_log_time"`, use native `question` to ask whether to retry the same `issueId` and `minutes`. On approval, call `workflow_youtrack_log_time` with `confirmed: true`, `issueId`, `minutes` at most once; never repost a known posted comment.
24
+ - If `result.data.retry === "workit_youtrack_post"`, use native `question` to ask whether to retry the unchanged reviewed `issueId`, `markdown`, and `minutes`. On approval, call `workit_youtrack_post` with `confirmed: true` at most once; never loop.
25
+ - If `result.data.retry === "workit_youtrack_log_time"`, use native `question` to ask whether to retry the same `issueId` and `minutes`. On approval, call `workit_youtrack_log_time` with `confirmed: true`, `issueId`, `minutes` at most once; never repost a known posted comment.
26
26
  - If the second attempt fails, stop and report its structured result. Never switch retry tools or infer that either effect succeeded.
27
27
  - If outcome is `unknown` or `result.data.retry` is absent, show `result.data.instructions` when present, reconcile manually, and do not retry either mutation.
@@ -1,6 +1,6 @@
1
1
  # YouTrack update style (Cristhofer / es-CL)
2
2
 
3
- Use when writing or polishing the comment body before `workflow_youtrack_draft`. **Preserve the author's voice** — like the ChatGPT revision thread: grammar, flow, and light structure, not a changelog.
3
+ Use when writing or polishing the comment body before `workit_youtrack_draft`. **Preserve the author's voice** — like the ChatGPT revision thread: grammar, flow, and light structure, not a changelog.
4
4
 
5
5
  ## Audience
6
6
 
@@ -7,11 +7,11 @@ disable-model-invocation: true
7
7
  # Meetings
8
8
 
9
9
  1. Load this skill explicitly through OpenCode's `skill` tool.
10
- 2. Call read-only `workflow_youtrack_context` with `mode: "meetings"`; its sole configured target is ground truth.
11
- 3. Ask for duration text, call `workflow_youtrack_parse_duration`, and draft the exact IRPT-12 time entry only.
10
+ 2. Call read-only `workit_youtrack_context` with `mode: "meetings"`; its sole configured target is ground truth.
11
+ 3. Ask for duration text, call `workit_youtrack_parse_duration`, and draft the exact IRPT-12 time entry only.
12
12
  4. Use native `question` with concise choices and allow a custom answer to approve the shown issue, minutes, and work-item text.
13
- 5. Call `workflow_youtrack_log_time` only after approval with `confirmed: true`, `issueId`, `minutes`, `text`.
14
- 6. If `result.data.outcome` is `unknown`, tell the user to reconcile manually and do not retry. Retry `workflow_youtrack_log_time` at most once only when `result.data.outcome` is `not_applied` and `result.data.retry` names that tool; follow `result.data.instructions` and correct invalid input before retrying.
13
+ 5. Call `workit_youtrack_log_time` only after approval with `confirmed: true`, `issueId`, `minutes`, `text`.
14
+ 6. If `result.data.outcome` is `unknown`, tell the user to reconcile manually and do not retry. Retry `workit_youtrack_log_time` at most once only when `result.data.outcome` is `not_applied` and `result.data.retry` names that tool; follow `result.data.instructions` and correct invalid input before retrying.
15
15
  7. Report the structured success or failure stage; never infer success.
16
16
 
17
- Use the configured meeting issue even if its default label is IRPT-12. Never compute minutes, pass a date, ask for a meeting type, post a comment, or call `workflow_youtrack_post`. `todowrite` and `task` are unnecessary here.
17
+ Use the configured meeting issue even if its default label is IRPT-12. Never compute minutes, pass a date, ask for a meeting type, post a comment, or call `workit_youtrack_post`. `todowrite` and `task` are unnecessary here.
@@ -7,16 +7,16 @@ disable-model-invocation: true
7
7
  # Pull request
8
8
 
9
9
  1. Load this skill explicitly through OpenCode's `skill` tool.
10
- 2. Call the read-only `workflow_pr_context` context tool for branch-exclusive commits and changes; its result is ground truth.
11
- 3. Call `workflow_verify`, then draft the exact title, body, base, head, and draft state from structured facts.
10
+ 2. Call the read-only `workit_pr_context` context tool for branch-exclusive commits and changes; its result is ground truth.
11
+ 3. Call `workit_verify`, then draft the exact title, body, base, head, and draft state from structured facts.
12
12
  4. **Show** the exact title and body in chat before any create question.
13
13
  5. Use native `question` with concise choices and allow a custom answer before creation.
14
- 6. Call `workflow_pr_create` only after approval with `confirmed: true` and the reviewed fields.
14
+ 6. Call `workit_pr_create` only after approval with `confirmed: true` and the reviewed fields.
15
15
  7. Report the structured success, failure stage, or partial result; never infer success.
16
16
 
17
17
  ## GitHub issue linking
18
18
 
19
- When the resolved workspace is github with `link_on_pr` — the `workflow_pr_context` tool's `vcs_config` returns `issues_provider: "github"` and `link_on_pr: true` — and no issue is derivable (no `WORKFLOW_GH_ISSUE` env, no numeric branch id like `feature/42-title`, which auto-links without asking), ask with native `question` before creation, exactly three options:
19
+ When the resolved workspace is github with `link_on_pr` — the `workit_pr_context` tool's `vcs_config` returns `issues_provider: "github"` and `link_on_pr: true` — and no issue is derivable (no `WORKFLOW_GH_ISSUE` env, no numeric branch id like `feature/42-title`, which auto-links without asking), ask with native `question` before creation, exactly three options:
20
20
 
21
21
  1. **Use an existing issue** — the user provides the number (extract it from a URL if pasted); verify it exists with `gh issue view <n>` before proceeding.
22
22
  2. **Create a new issue** — via `gh issue create --title "<title>" --body "<body>"`; on success pass the returned number. Reuse the missing-CLI guard: if `gh` is not installed, surface the structured error with the install link and ask the user to confirm once installed.
@@ -6,7 +6,7 @@ description: Draft user-facing release notes for an explicit range.
6
6
  # Release notes
7
7
 
8
8
  1. Load this skill explicitly through OpenCode's `skill` tool.
9
- 2. Require an exact version, tag, or commit range, then call the read-only `workflow_release_notes_context`; its result is ground truth.
9
+ 2. Require an exact version, tag, or commit range, then call the read-only `workit_release_notes_context`; its result is ground truth.
10
10
  3. Draft notes from structured facts and include both requested and resolved range metadata.
11
11
  4. Use native `question` only when the exact range must be supplied or corrected; allow a custom answer.
12
12
  5. This workflow has no mutation tool.
@@ -1,16 +1,16 @@
1
1
  ---
2
2
  name: wk-verify
3
- description: Discover and run project validation with workflow_verify.
3
+ description: Discover and run project validation with workit_verify.
4
4
  disable-model-invocation: true
5
5
  ---
6
6
 
7
7
  # Verify
8
8
 
9
9
  1. Load this skill explicitly through OpenCode's `skill` tool.
10
- 2. Call the read-only `workflow_verify` context tool with `dry_run: true`; its result is ground truth.
10
+ 2. Call the read-only `workit_verify` context tool with `dry_run: true`; its result is ground truth.
11
11
  3. Draft the discovered checks and the proposed selected run from structured facts.
12
12
  4. When the user must choose checks, use native `question` with concise choices and allow a custom answer.
13
- 5. Call `workflow_verify` with `dry_run: false` only for the approved run.
13
+ 5. Call `workit_verify` with `dry_run: false` only for the approved run.
14
14
  6. Report the structured success, failure stage, or partial result; never infer success.
15
15
 
16
16
  Do not edit files or fix failures. Report every check exactly as pass, fail, or skipped, including its command, exit code, and skip reason. Success requires every executed check to exit 0. If the user's message says `--dry-run`, stop after discovery.
@@ -303,7 +303,7 @@ export const branchSetup = ({
303
303
  if (stash !== "yes") {
304
304
  return {
305
305
  error:
306
- "dirty working tree — ask with native question, then call workflow_branch_setup with stash=yes",
306
+ "dirty working tree — ask with native question, then call workit_branch_setup with stash=yes",
307
307
  };
308
308
  }
309
309
  try {
@@ -13,7 +13,7 @@ export const detectConfigGapError = (text: string): boolean => text.includes(CON
13
13
 
14
14
  const COMPLETION_CLAIMS = /\b(?:done|fixed|passing|green|complete|all set)\b/i;
15
15
  const VERIFICATION_EVIDENCE =
16
- /\bbun run check\b|\bworkflow_verify\b|\bbun test\b|\bchecks?\s+pass(?:es|ing)?\b|\btests?\s+pass(?:es|ing)?\b/i;
16
+ /\bbun run check\b|\bworkit_verify\b|\bbun test\b|\bchecks?\s+pass(?:es|ing)?\b|\btests?\s+pass(?:es|ing)?\b/i;
17
17
 
18
18
  // Claims completion without verification-command evidence in the same text.
19
19
  export const detectVerificationClaim = (text: string): boolean =>
@@ -126,7 +126,7 @@ export const promoteSpec = (
126
126
  if (!resolved.ok) return { ok: false, error: resolved.error };
127
127
  const workspaceRootCanonical = resolved.layout.workspace;
128
128
  const repoPath = docsRepoPath();
129
- if (!repoPath) return { ok: false, error: "docs repo not linked — run workflow_docs_repo_link" };
129
+ if (!repoPath) return { ok: false, error: "docs repo not linked — run workit_docs_repo_link" };
130
130
  const repoValid = validateDocsRepo(repoPath);
131
131
  if (!repoValid.ok) return { ok: false, error: repoValid.error };
132
132
  const specRel = path.posix.join("docs", slug, "spec.md");
@@ -501,7 +501,7 @@ const readFlowStrict = (root: string, slug: string): StrictRead => {
501
501
  if (!existsSync(file)) {
502
502
  return err(
503
503
  "flow_not_activated",
504
- `flow not activated for ${slug} — run workflow_flow_status first`,
504
+ `flow not activated for ${slug} — run workit_flow_status first`,
505
505
  );
506
506
  }
507
507
  let text: string;
@@ -2103,13 +2103,13 @@ export const assertHandoffReady = (root: string, planPath: string): FlowGateResu
2103
2103
  if (state.spec.status !== "approved") {
2104
2104
  return err(
2105
2105
  "spec_not_approved",
2106
- `spec not approved (status: ${state.spec.status}). Run workflow_spec_approve after the user's approval.`,
2106
+ `spec not approved (status: ${state.spec.status}). Run workit_spec_approve after the user's approval.`,
2107
2107
  );
2108
2108
  }
2109
2109
  if (state.plan.status !== "approved") {
2110
2110
  return err(
2111
2111
  "plan_not_approved",
2112
- `plan not approved (status: ${state.plan.status}). Run workflow_plan_approve after the user's approval.`,
2112
+ `plan not approved (status: ${state.plan.status}). Run workit_plan_approve after the user's approval.`,
2113
2113
  );
2114
2114
  }
2115
2115
  if (state.handoff_destination) {
@@ -2143,19 +2143,19 @@ export const assertFlowGates = (
2143
2143
  if (state.spec.status !== "approved") {
2144
2144
  return err(
2145
2145
  "spec_not_approved",
2146
- `spec not approved (status: ${state.spec.status}). Run workflow_spec_approve after the user's approval.`,
2146
+ `spec not approved (status: ${state.spec.status}). Run workit_spec_approve after the user's approval.`,
2147
2147
  );
2148
2148
  }
2149
2149
  if (state.plan.status !== "approved") {
2150
2150
  return err(
2151
2151
  "plan_not_approved",
2152
- `plan not approved (status: ${state.plan.status}). Run workflow_plan_approve after the user's approval.`,
2152
+ `plan not approved (status: ${state.plan.status}). Run workit_plan_approve after the user's approval.`,
2153
2153
  );
2154
2154
  }
2155
2155
  if (opts.requireMenu && !state.menu.presented) {
2156
2156
  return err(
2157
2157
  "menu_not_presented",
2158
- "post-plan menu not presented. Ask the native question menu (Subagent-driven/Inline/Handoff/Review spec/Review plan) and record the answer with workflow_plan_menu.",
2158
+ "post-plan menu not presented. Ask the native question menu (Subagent-driven/Inline/Handoff/Review spec/Review plan) and record the answer with workit_plan_menu.",
2159
2159
  );
2160
2160
  }
2161
2161
  return { ok: true };
@@ -2187,19 +2187,19 @@ export const assertProductGates = (
2187
2187
  if (state.spec.status !== "approved") {
2188
2188
  return err(
2189
2189
  "spec_not_approved",
2190
- `spec not approved (status: ${state.spec.status}). Run workflow_spec_approve after the user's approval.`,
2190
+ `spec not approved (status: ${state.spec.status}). Run workit_spec_approve after the user's approval.`,
2191
2191
  );
2192
2192
  }
2193
2193
  if (state.plan.status !== "approved") {
2194
2194
  return err(
2195
2195
  "plan_not_approved",
2196
- `plan not approved (status: ${state.plan.status}). Run workflow_plan_approve after the user's approval.`,
2196
+ `plan not approved (status: ${state.plan.status}). Run workit_plan_approve after the user's approval.`,
2197
2197
  );
2198
2198
  }
2199
2199
  if (opts.requireMenu && !state.menu.presented) {
2200
2200
  return err(
2201
2201
  "menu_not_presented",
2202
- "post-plan menu not presented. Record the native question answer with workflow_plan_menu.",
2202
+ "post-plan menu not presented. Record the native question answer with workit_plan_menu.",
2203
2203
  );
2204
2204
  }
2205
2205
  if (opts.requireDocs) {
@@ -2237,19 +2237,19 @@ export const assertSddControlGates = (
2237
2237
  if (state.spec.status !== "approved") {
2238
2238
  return err(
2239
2239
  "spec_not_approved",
2240
- `spec not approved (status: ${state.spec.status}). Run workflow_spec_approve after the user's approval.`,
2240
+ `spec not approved (status: ${state.spec.status}). Run workit_spec_approve after the user's approval.`,
2241
2241
  );
2242
2242
  }
2243
2243
  if (state.plan.status !== "approved") {
2244
2244
  return err(
2245
2245
  "plan_not_approved",
2246
- `plan not approved (status: ${state.plan.status}). Run workflow_plan_approve after the user's approval.`,
2246
+ `plan not approved (status: ${state.plan.status}). Run workit_plan_approve after the user's approval.`,
2247
2247
  );
2248
2248
  }
2249
2249
  if (opts.requireMenu && !state.menu.presented) {
2250
2250
  return err(
2251
2251
  "menu_not_presented",
2252
- "post-plan menu not presented. Record the native question answer with workflow_plan_menu.",
2252
+ "post-plan menu not presented. Record the native question answer with workit_plan_menu.",
2253
2253
  );
2254
2254
  }
2255
2255
  if (opts.requireDocs) {
@@ -2318,18 +2318,18 @@ export const COORDINATOR_WRITE_TOOLS: readonly string[] = [
2318
2318
  "chown",
2319
2319
  // workit product/config/external mutation tools (SDD control tools are
2320
2320
  // coordinator-owned and routed through assertSddControlGates, not this set)
2321
- "workflow_commit",
2322
- "workflow_pr_create",
2323
- "workflow_rule_edit",
2324
- "workflow_template_edit",
2325
- "workflow_changelog_apply",
2326
- "workflow_branch_setup",
2321
+ "workit_commit",
2322
+ "workit_pr_create",
2323
+ "workit_rule_edit",
2324
+ "workit_template_edit",
2325
+ "workit_changelog_apply",
2326
+ "workit_branch_setup",
2327
2327
  "workit_init_apply",
2328
- "workflow_docs_promote",
2329
- "workflow_docs_layout",
2330
- "workflow_docs_repo_link",
2331
- "workflow_youtrack_post",
2332
- "workflow_youtrack_log_time",
2328
+ "workit_docs_promote",
2329
+ "workit_docs_layout",
2330
+ "workit_docs_repo_link",
2331
+ "workit_youtrack_post",
2332
+ "workit_youtrack_log_time",
2333
2333
  ];
2334
2334
 
2335
2335
  /**
@@ -2987,10 +2987,10 @@ export const subagentDrivenInterception = (input: {
2987
2987
  }
2988
2988
  if (
2989
2989
  [
2990
- "workflow_sdd_task_brief",
2991
- "workflow_sdd_review_package",
2992
- "workflow_sdd_append_progress",
2993
- "workflow_sdd_append_advisory",
2990
+ "workit_sdd_task_brief",
2991
+ "workit_sdd_review_package",
2992
+ "workit_sdd_append_progress",
2993
+ "workit_sdd_append_advisory",
2994
2994
  ].includes(input.tool)
2995
2995
  ) {
2996
2996
  return err(
@@ -15,7 +15,7 @@ export const REMINDER_TEXT = `<workflow-contract-reminder>
15
15
  - Bounded user choices → call the native \`question\` tool (never A/B/C or 1/2/3 lists in prose).
16
16
  - After a plan is approved → native \`question\` menu with exactly: ${SOURCE_MENU_LABELS_DISPLAY.join(", ")}.
17
17
  - Tools with \`confirmed\` → call them; never fabricate their result.
18
- - Before the first \`workflow_spec_approve\`/\`workflow_plan_approve\` (self-review) run the superpowers writing-plans Self-Review checklist: spec coverage (every spec requirement maps to a task), placeholder scan, type consistency; fix findings inline.
18
+ - Before the first \`workit_spec_approve\`/\`workit_plan_approve\` (self-review) run the superpowers writing-plans Self-Review checklist: spec coverage (every spec requirement maps to a task), placeholder scan, type consistency; fix findings inline.
19
19
  - Delivering docs → clickable markdown link \`[spec.md](docs/<slug>/spec.md)\` + 3-5 bullet summary.
20
20
  </workflow-contract-reminder>`;
21
21
 
@@ -29,7 +29,7 @@ export const DESTINATION_REMINDER_TEXT = `<workflow-contract-reminder>
29
29
  - Bounded user choices → call the native \`question\` tool (never A/B/C or 1/2/3 lists in prose).
30
30
  - This session is a handoff destination: present the post-plan menu with exactly: ${DESTINATION_MENU_LABELS.join(", ")}.
31
31
  - Tools with \`confirmed\` → call them; never fabricate their result.
32
- - Before the first \`workflow_spec_approve\`/\`workflow_plan_approve\` (self-review) run the superpowers writing-plans Self-Review checklist: spec coverage (every spec requirement maps to a task), placeholder scan, type consistency; fix findings inline.
32
+ - Before the first \`workit_spec_approve\`/\`workit_plan_approve\` (self-review) run the superpowers writing-plans Self-Review checklist: spec coverage (every spec requirement maps to a task), placeholder scan, type consistency; fix findings inline.
33
33
  - Delivering docs → clickable markdown link \`[spec.md](docs/<slug>/spec.md)\` + 3-5 bullet summary.
34
34
  ${HANDOFF_DESTINATION_MARKER}
35
35
  </workflow-contract-reminder>`;
@@ -78,7 +78,7 @@ A tool failed with a config-gap error (\`workflow config missing\`). Never confi
78
78
  </workflow-config-guard>`;
79
79
 
80
80
  export const VERIFICATION_TEXT = `<workflow-verification-rail>
81
- Skill: verification-before-completion. NO completion claims without fresh verification evidence — run the check command (e.g. \`bun run check\` / \`workflow_verify\`) and show its output before claiming done/fixed/passing. If you haven't run the verification command in this message, you cannot claim it passes.
81
+ Skill: verification-before-completion. NO completion claims without fresh verification evidence — run the check command (e.g. \`bun run check\` / \`workit_verify\`) and show its output before claiming done/fixed/passing. If you haven't run the verification command in this message, you cannot claim it passes.
82
82
  </workflow-verification-rail>`;
83
83
 
84
84
  export const TDD_TEXT = `<workflow-tdd-rail>
@@ -330,7 +330,7 @@ const CHANGELOG_RULES = `- Use an [Unreleased] section.
330
330
  - Entries should be human-readable and user-facing.
331
331
  - Do not use raw commit messages as changelog bullets.
332
332
  - MERGE into existing ### Category under [Unreleased] — never append a second ### Added / ### Fixed block.
333
- - Apply with the native workflow_changelog_apply tool only (not hand-edits under Unreleased).
333
+ - Apply with the native workit_changelog_apply tool only (not hand-edits under Unreleased).
334
334
  - If Unreleased already has duplicate category headings, normalize_only first.`;
335
335
 
336
336
  /** Port of changelog-context.sh — changelog update context. */
package/src/core/sdd.ts CHANGED
@@ -183,7 +183,7 @@ export function sddContext({
183
183
  flow: { spec: flow.spec, plan: flow.plan, menu: flow.menu },
184
184
  todowrite_required: true,
185
185
  todowrite_hint:
186
- "REQUIRED: Call OpenCode todowrite with todos from this result so the native task list shows progress. Before each task set status in_progress; after workflow_sdd_append_progress set it completed.",
186
+ "REQUIRED: Call OpenCode todowrite with todos from this result so the native task list shows progress. Before each task set status in_progress; after workit_sdd_append_progress set it completed.",
187
187
  };
188
188
  }
189
189
 
@@ -102,7 +102,7 @@ type PostData = {
102
102
  loggedMinutes: number;
103
103
  outcome?: "unknown" | "not_applied";
104
104
  instructions?: string;
105
- retry?: "workflow_youtrack_post" | "workflow_youtrack_log_time";
105
+ retry?: "workit_youtrack_post" | "workit_youtrack_log_time";
106
106
  };
107
107
 
108
108
  const notApplied = (value: LegacyValue): value is NotApplied =>
@@ -129,7 +129,7 @@ export async function postUpdate(
129
129
  postedComment: false,
130
130
  loggedMinutes: 0,
131
131
  outcome: "not_applied",
132
- retry: "workflow_youtrack_post",
132
+ retry: "workit_youtrack_post",
133
133
  });
134
134
  unwrap(comment);
135
135
  } catch (error) {
@@ -156,7 +156,7 @@ export async function postUpdate(
156
156
  postedComment: true,
157
157
  loggedMinutes: 0,
158
158
  outcome: "not_applied",
159
- retry: "workflow_youtrack_log_time",
159
+ retry: "workit_youtrack_log_time",
160
160
  });
161
161
  unwrap(time);
162
162
  } catch (error) {
@@ -189,7 +189,7 @@ export async function logTimeUpdate(
189
189
  issueId: input.issueId,
190
190
  loggedMinutes: 0,
191
191
  outcome: "not_applied",
192
- retry: "workflow_youtrack_log_time",
192
+ retry: "workit_youtrack_log_time",
193
193
  });
194
194
  return ok(unwrap(value));
195
195
  } catch (error) {
@@ -711,7 +711,7 @@ export async function postUpdate(
711
711
  postedComment: true,
712
712
  loggedMinutes: 0,
713
713
  error: time.error,
714
- retry: "workflow_youtrack_log_time",
714
+ retry: "workit_youtrack_log_time",
715
715
  };
716
716
  }
717
717
  return { ok: true, issueId, postedComment: true, loggedMinutes: minutes };
@@ -20,48 +20,48 @@ This session is a handoff destination for a continued plan. The originating sess
20
20
  ## Hard gates
21
21
 
22
22
  - The parent is coordinator-only: it does not edit product code or perform delegated exploration.
23
- - Never use a worktree. Branch changes are in-place through `workflow_branch_setup` on `feature/*` or `bugfix/*`; never commit on protected branches.
24
- - Working state, briefs, ledgers, and review diffs live only under gitignored `<SDD_DIR>` in `docs/<slug>/sdd/` and use `workflow_sdd_*` tools.
23
+ - Never use a worktree. Branch changes are in-place through `workit_branch_setup` on `feature/*` or `bugfix/*`; never commit on protected branches.
24
+ - Working state, briefs, ledgers, and review diffs live only under gitignored `<SDD_DIR>` in `docs/<slug>/sdd/` and use `workit_sdd_*` tools.
25
25
  - Use native `todowrite` for visible task state as well as the gitignored ledger.
26
26
  - Use native `question` for branch/stash choices and guarded external mutations; call mutation tools only after approval with `confirmed: true` (grounded in the recorded NativeChoiceEvidence).
27
- - Flow-tool confirmations are never agent-typed booleans and never caller-supplied evidence objects: on OpenCode the plugin records the user's native-`question` answer as a host-observed one-use receipt (`attested: true`, `callID`, `selectedLabel`, `recordedAt`) consumed by `workflow_spec_approve` / `workflow_plan_approve` / `workflow_plan_menu` — no evidence argument exists, and delegated worker status comes from host session parentage (`parentID`), never a caller `role` field. On Cursor, confirmations are policy-only (`attested: false`) and subagent-driven execution is rejected as unsupported.
28
- - Delegated authority is direct-child-only: a worker is the session whose host `parentID` exactly equals the activating coordinator's recorded `coordinator_session_id`; missing, mismatched, or multi-owner lineage fails closed with `delegation_lineage_denied`, and nested `opencode` launches are denied during active delegated work. An authorized child receives only the compact worker contract (execute the supplied brief, follow TDD, land one contiguous non-empty commit range, report results) — never coordinator guidance, `wk-implement`, or ledger management; coordinator bookkeeping via `workflow_sdd_*` stays with the coordinator session.
29
- - On Cursor, for every repository-scoped `workflow_*` call, pass the active Cursor workspace as `workspace_root`; never rely on the MCP process default.
27
+ - Flow-tool confirmations are never agent-typed booleans and never caller-supplied evidence objects: on OpenCode the plugin records the user's native-`question` answer as a host-observed one-use receipt (`attested: true`, `callID`, `selectedLabel`, `recordedAt`) consumed by `workit_spec_approve` / `workit_plan_approve` / `workit_plan_menu` — no evidence argument exists, and delegated worker status comes from host session parentage (`parentID`), never a caller `role` field. On Cursor, confirmations are policy-only (`attested: false`) and subagent-driven execution is rejected as unsupported.
28
+ - Delegated authority is direct-child-only: a worker is the session whose host `parentID` exactly equals the activating coordinator's recorded `coordinator_session_id`; missing, mismatched, or multi-owner lineage fails closed with `delegation_lineage_denied`, and nested `opencode` launches are denied during active delegated work. An authorized child receives only the compact worker contract (execute the supplied brief, follow TDD, land one contiguous non-empty commit range, report results) — never coordinator guidance, `wk-implement`, or ledger management; coordinator bookkeeping via `workit_sdd_*` stays with the coordinator session.
29
+ - On Cursor, for every repository-scoped `workit_*` call, pass the active Cursor workspace as `workspace_root`; never rely on the MCP process default.
30
30
  - Use native `task` with only the built-in `explore` and `general` agents.
31
31
 
32
32
  ## Flow gates (HARD)
33
33
 
34
34
  - `wk-implement` refuses to run unless the plan is `approved` (flow.json) and the post-plan menu was presented.
35
35
  - `wk-handoff` refuses to run unless both spec and plan are `approved`.
36
- - Sequence is enforced by tools: `workflow_spec_approve`, `workflow_plan_approve`, `workflow_plan_menu` — never skip a step (the spec/plan self-review runs automatically inside the transition; only the final approval asks for your confirmation).
36
+ - Sequence is enforced by tools: `workit_spec_approve`, `workit_plan_approve`, `workit_plan_menu` — never skip a step (the spec/plan self-review runs automatically inside the transition; only the final approval asks for your confirmation).
37
37
 
38
38
  ## Setup
39
39
 
40
- 0. Call `workflow_docs_validate` with the linked spec/plan paths. Hard-fail on any error before todos or branch setup.
41
- 1. Call `workflow_sdd_context` with `<PLAN_PATH>` and initialize `todowrite` from returned tasks.
42
- 2. Call `workflow_plan_tasks`; cache each top-level task's `section_text`.
40
+ 0. Call `workit_docs_validate` with the linked spec/plan paths. Hard-fail on any error before todos or branch setup.
41
+ 1. Call `workit_sdd_context` with `<PLAN_PATH>` and initialize `todowrite` from returned tasks.
42
+ 2. Call `workit_plan_tasks`; cache each top-level task's `section_text`.
43
43
  3. Mark IDs in `completed_task_ids` completed and never redispatch them.
44
- 4. Call `workflow_resolve_branch`, then show the current branch, target branch, and stash behavior before any in-place checkout/setup mutation.
44
+ 4. Call `workit_resolve_branch`, then show the current branch, target branch, and stash behavior before any in-place checkout/setup mutation.
45
45
  5. Always use `question`: for a clean tree ask whether to proceed or cancel; for a dirty tree add the stash choice and describe what will be stashed.
46
- 6. Call `workflow_branch_setup` with `confirmed: true` only after approval.
46
+ 6. Call `workit_branch_setup` with `confirmed: true` only after approval.
47
47
 
48
48
  ## Remaining-task loop
49
49
 
50
50
  For each top-level task absent from `completed_task_ids`:
51
51
 
52
52
  1. Mark it `in_progress` with `todowrite`.
53
- 2. Create a working-state brief with `workflow_sdd_task_brief` and `confirmed: true`.
53
+ 2. Create a working-state brief with `workit_sdd_task_brief` and `confirmed: true`.
54
54
  3. Delegate read-only discovery, when needed, to an `explore` agent. Delegate implementation to a fresh `general` agent. Product changes follow TDD.
55
- 4. Create a working-state diff with `workflow_sdd_review_package` and `confirmed: true`.
55
+ 4. Create a working-state diff with `workit_sdd_review_package` and `confirmed: true`.
56
56
  5. Delegate spec-compliance review and code-quality review to separate `general` agents.
57
- 6. **Blocking** findings (Critical, Important, or spec-compliance) may trigger at most **two** fix+re-review rounds per task. **Advisory** findings (Minor, style, YAGNI, taste) never pause the loop — append them with `workflow_sdd_append_advisory` (`--task <id> --text <text>`, `confirmed: true`) instead of an unrestricted file edit.
58
- 7. Append the validated ledger entry with `workflow_sdd_append_progress` and `confirmed: true`; mark the todo completed.
57
+ 6. **Blocking** findings (Critical, Important, or spec-compliance) may trigger at most **two** fix+re-review rounds per task. **Advisory** findings (Minor, style, YAGNI, taste) never pause the loop — append them with `workit_sdd_append_advisory` (`--task <id> --text <text>`, `confirmed: true`) instead of an unrestricted file edit.
58
+ 7. Append the validated ledger entry with `workit_sdd_append_progress` and `confirmed: true`; mark the todo completed.
59
59
 
60
60
  ## Final gate
61
61
 
62
- 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.
62
+ Run a separate full-branch code review, then `workit_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 `workit_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 `workit_branch_setup` with `confirmed: true` after approval.
63
63
 
64
- **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`.
64
+ **Mandatory:** end the run by calling `workit_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 `workit_verify` passes — a complete ledger and green verification are the tool's gates. Never finish the run while the plan is still `active`.
65
65
 
66
66
  ## Task order
67
67
 
@@ -70,4 +70,4 @@ Run a separate full-branch code review, then `workflow_verify`. Present the full
70
70
  ## Quality gate (HARD)
71
71
 
72
72
  - Specs/plans are written from `templates/spec-template.md` / `templates/plan-template.md`.
73
- - After `workflow_docs_validate`, surface `quality` findings (spec scan). Hard findings (missing required section, missing CA-XX) block task start unless the user explicitly waives them. Warnings are advisory.
73
+ - After `workit_docs_validate`, surface `quality` findings (spec scan). Hard findings (missing required section, missing CA-XX) block task start unless the user explicitly waives them. Warnings are advisory.
@@ -10,7 +10,7 @@
10
10
  ## Global Constraints
11
11
 
12
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`.
13
+ - The final task ends execution with `workit_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`.
14
14
  - <project-wide requirements, one line each>
15
15
 
16
16
  ---
@@ -16,13 +16,13 @@
16
16
 
17
17
  ## Architecture
18
18
 
19
- <!-- REQUIRED if this spec has flows or architecture: render a mermaid diagram (workflow_present_flow). -->
19
+ <!-- REQUIRED if this spec has flows or architecture: render a mermaid diagram (workit_present_flow). -->
20
20
  ```mermaid
21
21
  flowchart TD
22
22
  A[Start] --> B[Step]
23
23
  ```
24
24
 
25
- <!-- REQUIRED if this spec touches UI: render an ASCII wireframe (workflow_present_ascii). -->
25
+ <!-- REQUIRED if this spec touches UI: render an ASCII wireframe (workit_present_ascii). -->
26
26
  ```text
27
27
  ┌──────────────┐
28
28
  │ Header │
@@ -27,31 +27,31 @@ Plans require:
27
27
 
28
28
  `bugfix/<slug>` is also valid. Never use `main`, `develop`, `master`, or `prod`. Use plain backtick paths. Top-level headings are exactly `### Task N: Title`; steps use `- [ ] **Step N:** ...`; task headings never appear inside fences.
29
29
 
30
- Before writing **Branch:** into a new spec or plan, call `workflow_docs_branch` and write the returned `branch` verbatim. When `action` is `keep`, use the current feature/bugfix branch. When `action` is `create_from_develop` or `create_from_base`, create the branch only through `workflow_branch_setup`; it uses the configured workspace/global target branch.
30
+ Before writing **Branch:** into a new spec or plan, call `workit_docs_branch` and write the returned `branch` verbatim. When `action` is `keep`, use the current feature/bugfix branch. When `action` is `create_from_develop` or `create_from_base`, create the branch only through `workit_branch_setup`; it uses the configured workspace/global target branch.
31
31
 
32
32
  ## Execution and handoff
33
33
 
34
34
  - Implementation uses `wk-implement` and subagent-driven development, with native `todowrite` and `task`.
35
35
  - Commits use `wk-commit` after its native `question` confirmation.
36
- - Continuation uses `wk-handoff`, whose `workflow_handoff_session` creates and seeds the OpenCode session automatically.
37
- - Never use worktrees. Resolve the declared branch with `workflow_resolve_branch`, preview dirty-tree stash choices with `question`, and apply an approved in-place checkout through `workflow_branch_setup` with `confirmed: true` (grounded in the recorded NativeChoiceEvidence).
38
- - Flow-tool confirmations are never agent-typed booleans and never caller-supplied evidence objects: on OpenCode the plugin records the user's native-`question` answer as a host-observed one-use receipt (`attested: true`, `callID`, `selectedLabel`, `recordedAt`) consumed by `workflow_spec_approve` / `workflow_plan_approve` / `workflow_plan_menu` — no evidence argument exists, and delegated worker status comes from host session parentage (`parentID`), never a caller `role` field. On Cursor, confirmations are policy-only (`attested: false`) and subagent-driven execution is rejected as unsupported.
39
- - Keep all SDD state under the gitignored `docs/<slug>/sdd/`; use `workflow_sdd_context` and the registered `workflow_sdd_*` tools.
40
- - After implementation, use `question` before an approved stash reapply through `workflow_branch_setup` with `confirmed: true`.
36
+ - Continuation uses `wk-handoff`, whose `workit_handoff_session` creates and seeds the OpenCode session automatically.
37
+ - Never use worktrees. Resolve the declared branch with `workit_resolve_branch`, preview dirty-tree stash choices with `question`, and apply an approved in-place checkout through `workit_branch_setup` with `confirmed: true` (grounded in the recorded NativeChoiceEvidence).
38
+ - Flow-tool confirmations are never agent-typed booleans and never caller-supplied evidence objects: on OpenCode the plugin records the user's native-`question` answer as a host-observed one-use receipt (`attested: true`, `callID`, `selectedLabel`, `recordedAt`) consumed by `workit_spec_approve` / `workit_plan_approve` / `workit_plan_menu` — no evidence argument exists, and delegated worker status comes from host session parentage (`parentID`), never a caller `role` field. On Cursor, confirmations are policy-only (`attested: false`) and subagent-driven execution is rejected as unsupported.
39
+ - Keep all SDD state under the gitignored `docs/<slug>/sdd/`; use `workit_sdd_context` and the registered `workit_sdd_*` tools.
40
+ - After implementation, use `question` before an approved stash reapply through `workit_branch_setup` with `confirmed: true`.
41
41
 
42
42
  ## YouTrack content
43
43
 
44
- Chat follows the user's language. YouTrack task comments are Spanish (`es-CL`) and use `workflow_youtrack_draft` followed by reviewed `workflow_youtrack_post` with `confirmed: true`. Preserve the user's paragraph voice; do not inject commits, file paths, or robotic bullet reports.
44
+ Chat follows the user's language. YouTrack task comments are Spanish (`es-CL`) and use `workit_youtrack_draft` followed by reviewed `workit_youtrack_post` with `confirmed: true`. Preserve the user's paragraph voice; do not inject commits, file paths, or robotic bullet reports.
45
45
 
46
46
  ## Final self-check
47
47
 
48
- Before handoff, call `workflow_docs_validate` on the linked spec/plan pair. Hard-fail on any error; never offer execution when validation fails.
48
+ Before handoff, call `workit_docs_validate` on the linked spec/plan pair. Hard-fail on any error; never offer execution when validation fails.
49
49
 
50
50
  Before handoff, verify the saved spec path, plan path, declared branch, top-level task numbering, and workflow-managed SDD directory through the registered read-only workflow tools. Report structured failures; never infer success.
51
51
 
52
52
  ## Post-plan execution choice
53
53
 
54
- After saving a plan, call `workflow_docs_validate` on the spec/plan pair. On failure, stop and fix docs — do not offer execution.
54
+ After saving a plan, call `workit_docs_validate` on the spec/plan pair. On failure, stop and fix docs — do not offer execution.
55
55
 
56
56
  On success, use native `question` / Cursor `AskQuestion` with exactly these options (no stay, no A/B/C prose duplicate):
57
57
 
@@ -62,7 +62,7 @@ On success, use native `question` / Cursor `AskQuestion` with exactly these opti
62
62
  5. Review plan first
63
63
  6. Change model first
64
64
 
65
- `Change model first` is display-only deferral: it ends the turn without calling `workflow_plan_menu` and re-presents the menu on the next turn. Every other choice must call `workflow_plan_menu` immediately after the answer and before any skill, branch question, mutation, or handoff.
65
+ `Change model first` is display-only deferral: it ends the turn without calling `workit_plan_menu` and re-presents the menu on the next turn. Every other choice must call `workit_plan_menu` immediately after the answer and before any skill, branch question, mutation, or handoff.
66
66
 
67
67
  Never emit Superpowers text beginning “Two execution options”.
68
68
 
@@ -63,7 +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
+ "Run verification, then workit_plan_complete once the ledger is complete and verification passes" [shape=box];
67
67
  "Use superpowers:finishing-a-development-branch" [shape=box style=filled fillcolor=lightgreen];
68
68
 
69
69
  "Read plan, note context and global constraints, create todos" -> "Dispatch implementer subagent (./implementer-prompt.md)";
@@ -79,12 +79,12 @@ digraph process {
79
79
  "Mark task complete in todo list and progress ledger" -> "More tasks remain?";
80
80
  "More tasks remain?" -> "Dispatch implementer subagent (./implementer-prompt.md)" [label="yes"];
81
81
  "More tasks remain?" -> "Dispatch final code reviewer subagent (../requesting-code-review/code-reviewer.md)" [label="no"];
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
+ "Dispatch final code reviewer subagent (../requesting-code-review/code-reviewer.md)" -> "Run verification, then workit_plan_complete once the ledger is complete and verification passes";
83
+ "Run verification, then workit_plan_complete once the ledger is complete and verification passes" -> "Use superpowers:finishing-a-development-branch";
84
84
  }
85
85
  ```
86
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`.
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 `workit_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
88
 
89
89
  ## Pre-Flight Plan Review
90
90