@brainervirus/workit-opencode 0.8.8 → 0.8.10
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/README.md +4 -4
- package/assets/skills/wk-changelog/SKILL.md +2 -2
- package/assets/skills/wk-commit/SKILL.md +3 -3
- package/assets/skills/wk-docs-refresh/SKILL.md +2 -2
- package/assets/skills/wk-handoff/SKILL.md +5 -3
- package/assets/skills/wk-implement/SKILL.md +13 -11
- package/assets/skills/wk-issue-update/SKILL.md +5 -5
- package/assets/skills/wk-issue-update/references/youtrack-update-style.md +1 -1
- package/assets/skills/wk-meetings/SKILL.md +5 -5
- package/assets/skills/wk-pr/SKILL.md +4 -4
- package/assets/skills/wk-release-notes/SKILL.md +1 -1
- package/assets/skills/wk-verify/SKILL.md +3 -3
- package/assets/templates/execution-contract.md +20 -18
- package/assets/templates/plan-template.md +1 -1
- package/assets/templates/spec-template.md +2 -2
- package/assets/templates/superpowers-doc-contract.md +13 -10
- package/assets/vendor/superpowers/skills/subagent-driven-development/SKILL.md +4 -4
- package/dist/plugin.js +429 -164
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -26,14 +26,14 @@ Requirements: OpenCode ≥ 1.15.0, Node ≥ 22 (the published plugin is a self-c
|
|
|
26
26
|
## What it provides
|
|
27
27
|
|
|
28
28
|
- **12 `wk-*` commands/skills** (`wk-init`, `wk-status`, `wk-verify`, `wk-commit`, `wk-pr`, `wk-changelog`, `wk-release-notes`, `wk-docs-refresh`, `wk-handoff`, `wk-implement`, `wk-meetings`, `wk-issue-update`).
|
|
29
|
-
- **Native plugin tools** (`
|
|
29
|
+
- **Native plugin tools** (`workit_*`) — branch setup, PR create/context, docs validate/promote, YouTrack post/log/time, templates, rules, presentation, doctor, and handoff.
|
|
30
30
|
- **Per-turn enforcement rails** — contract reminder, doc rendering, self-review gates, config guard, issue rails, and post-hoc detectors.
|
|
31
31
|
|
|
32
32
|
## Host-native behavior
|
|
33
33
|
|
|
34
|
-
- **Approvals** — flow gates (`
|
|
35
|
-
- **Lifecycle** — `
|
|
36
|
-
- **Delegation** — approved plans execute through subagent-driven task delegation (native `task`); while a subagent-driven plan is active, coordinator product edits are intercepted.
|
|
34
|
+
- **Approvals** — flow gates (`workit_spec_approve` / `workit_plan_approve` / `workit_plan_menu`) record native `question` receipts; the self-review validation runs automatically during the transition. Approvals bind to the document's exact SHA-256 digest: editing an approved spec/plan invalidates the approval and forces a fresh reapproval.
|
|
35
|
+
- **Lifecycle** — `workit_plan_pause` / `workit_plan_resume` / `workit_plan_complete` move a plan through `pending`/`active`/`paused`/`completed`, each gated by a one-use native-question receipt; completion requires a complete SDD ledger and passing repository verification.
|
|
36
|
+
- **Delegation** — approved plans execute through subagent-driven task delegation (native `task`); while a subagent-driven plan is active, coordinator product edits are intercepted. Receipts are purpose-bound: each gate consumes the newest fresh receipt for exactly its purpose, so unrelated questions never authorize or mask a gate. Delegated authority is direct-child-only — authorized workers receive compact worker-only context, while mismatched session lineage is denied (`delegation_lineage_denied`).
|
|
37
37
|
- **Commit** — `wk-commit` previews a Conventional Commit and confirms through a native `question`.
|
|
38
38
|
- **Handoff** — `wk-handoff` seeds and spawns a native OpenCode continuation session; a destination session presents a four-choice menu (never the originating Handoff option) and carries the handoff-destination marker.
|
|
39
39
|
- **Diagnostics** — durable JSONL journal plus native `client.app.log()`; nothing is mirrored to `process.stderr` or the agent conversation.
|
|
@@ -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 `
|
|
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 `
|
|
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 `
|
|
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 `
|
|
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: `
|
|
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 `
|
|
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 `
|
|
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,12 +7,14 @@ 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 `
|
|
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 `
|
|
16
|
-
8. A destination run that executes the plan must still end with `
|
|
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
|
+
|
|
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.
|
|
17
19
|
|
|
18
20
|
Never emit a continuation prompt, use the clipboard, or ask the user to copy text. If selected, report the session ID only if the current session remains visible. If staying, report the seeded session ID. On failure, report `stage` and `error`; preserve any returned session for the session picker and never recreate it automatically. `todowrite` and `task` are unnecessary here.
|
|
@@ -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 `
|
|
15
|
-
3. Call `
|
|
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 `
|
|
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 `
|
|
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 `
|
|
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,19 +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 `
|
|
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 `
|
|
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
|
|
35
|
-
7. Append the validated ledger line with `
|
|
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 `workit_sdd_*`) stays with the coordinator session.
|
|
42
|
+
|
|
41
43
|
## Final gate
|
|
42
44
|
|
|
43
|
-
After all remaining tasks, dispatch a final full-branch code review, run `
|
|
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.
|
|
44
46
|
|
|
45
|
-
**Mandatory:** end the run by calling `
|
|
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 `
|
|
13
|
-
3. Gather the user's notes, call `
|
|
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 `
|
|
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 === "
|
|
25
|
-
- If `result.data.retry === "
|
|
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 `
|
|
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 `
|
|
11
|
-
3. Ask for duration text, call `
|
|
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 `
|
|
14
|
-
6. If `result.data.outcome` is `unknown`, tell the user to reconcile manually and do not retry. Retry `
|
|
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 `
|
|
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 `
|
|
11
|
-
3. Call `
|
|
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 `
|
|
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 `
|
|
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 `
|
|
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
|
|
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 `
|
|
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 `
|
|
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.
|
|
@@ -7,59 +7,61 @@ Load `using-superpowers`, `subagent-driven-development`, `test-driven-developmen
|
|
|
7
7
|
|
|
8
8
|
## Handoff destination
|
|
9
9
|
|
|
10
|
-
This session is a handoff destination for a continued plan. The originating session already recorded the post-plan menu choice; present exactly these four choices and never re-offer the originating handoff option:
|
|
10
|
+
This session is a handoff destination for a continued plan. The originating session already recorded the post-plan menu choice; present exactly these four choices plus model deferral and never re-offer the originating handoff option:
|
|
11
11
|
|
|
12
12
|
- Subagent-driven
|
|
13
13
|
- Inline
|
|
14
14
|
- Review spec first
|
|
15
15
|
- Review plan first
|
|
16
|
+
- Change model first
|
|
16
17
|
|
|
17
18
|
<workflow-handoff-destination>true</workflow-handoff-destination>
|
|
18
19
|
|
|
19
20
|
## Hard gates
|
|
20
21
|
|
|
21
22
|
- The parent is coordinator-only: it does not edit product code or perform delegated exploration.
|
|
22
|
-
- Never use a worktree. Branch changes are in-place through `
|
|
23
|
-
- Working state, briefs, ledgers, and review diffs live only under gitignored `<SDD_DIR>` in `docs/<slug>/sdd/` and use `
|
|
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.
|
|
24
25
|
- Use native `todowrite` for visible task state as well as the gitignored ledger.
|
|
25
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).
|
|
26
|
-
- 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 `
|
|
27
|
-
-
|
|
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.
|
|
28
30
|
- Use native `task` with only the built-in `explore` and `general` agents.
|
|
29
31
|
|
|
30
32
|
## Flow gates (HARD)
|
|
31
33
|
|
|
32
34
|
- `wk-implement` refuses to run unless the plan is `approved` (flow.json) and the post-plan menu was presented.
|
|
33
35
|
- `wk-handoff` refuses to run unless both spec and plan are `approved`.
|
|
34
|
-
- Sequence is enforced by tools: `
|
|
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).
|
|
35
37
|
|
|
36
38
|
## Setup
|
|
37
39
|
|
|
38
|
-
0. Call `
|
|
39
|
-
1. Call `
|
|
40
|
-
2. Call `
|
|
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`.
|
|
41
43
|
3. Mark IDs in `completed_task_ids` completed and never redispatch them.
|
|
42
|
-
4. Call `
|
|
44
|
+
4. Call `workit_resolve_branch`, then show the current branch, target branch, and stash behavior before any in-place checkout/setup mutation.
|
|
43
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.
|
|
44
|
-
6. Call `
|
|
46
|
+
6. Call `workit_branch_setup` with `confirmed: true` only after approval.
|
|
45
47
|
|
|
46
48
|
## Remaining-task loop
|
|
47
49
|
|
|
48
50
|
For each top-level task absent from `completed_task_ids`:
|
|
49
51
|
|
|
50
52
|
1. Mark it `in_progress` with `todowrite`.
|
|
51
|
-
2. Create a working-state brief with `
|
|
53
|
+
2. Create a working-state brief with `workit_sdd_task_brief` and `confirmed: true`.
|
|
52
54
|
3. Delegate read-only discovery, when needed, to an `explore` agent. Delegate implementation to a fresh `general` agent. Product changes follow TDD.
|
|
53
|
-
4. Create a working-state diff with `
|
|
55
|
+
4. Create a working-state diff with `workit_sdd_review_package` and `confirmed: true`.
|
|
54
56
|
5. Delegate spec-compliance review and code-quality review to separate `general` agents.
|
|
55
|
-
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
|
|
56
|
-
7. Append the validated ledger entry with `
|
|
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.
|
|
57
59
|
|
|
58
60
|
## Final gate
|
|
59
61
|
|
|
60
|
-
Run a separate full-branch code review, then `
|
|
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.
|
|
61
63
|
|
|
62
|
-
**Mandatory:** end the run by calling `
|
|
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`.
|
|
63
65
|
|
|
64
66
|
## Task order
|
|
65
67
|
|
|
@@ -68,4 +70,4 @@ Run a separate full-branch code review, then `workflow_verify`. Present the full
|
|
|
68
70
|
## Quality gate (HARD)
|
|
69
71
|
|
|
70
72
|
- Specs/plans are written from `templates/spec-template.md` / `templates/plan-template.md`.
|
|
71
|
-
- After `
|
|
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 `
|
|
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 (
|
|
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 (
|
|
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 `
|
|
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 `
|
|
37
|
-
- Never use worktrees. Resolve the declared branch with `
|
|
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 `
|
|
39
|
-
- Keep all SDD state under the gitignored `docs/<slug>/sdd/`; use `
|
|
40
|
-
- After implementation, use `question` before an approved stash reapply through `
|
|
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 `
|
|
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 `
|
|
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 `
|
|
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
|
|
|
@@ -60,10 +60,13 @@ On success, use native `question` / Cursor `AskQuestion` with exactly these opti
|
|
|
60
60
|
3. Handoff → load `wk-handoff` (new session only)
|
|
61
61
|
4. Review spec first
|
|
62
62
|
5. Review plan first
|
|
63
|
+
6. Change model first
|
|
64
|
+
|
|
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.
|
|
63
66
|
|
|
64
67
|
Never emit Superpowers text beginning “Two execution options”.
|
|
65
68
|
|
|
66
|
-
A handoff destination session (the seeded contract carries `<workflow-handoff-destination>true</workflow-handoff-destination>`) presents exactly
|
|
69
|
+
A handoff destination session (the seeded contract carries `<workflow-handoff-destination>true</workflow-handoff-destination>`) presents exactly five choices — Subagent-driven, Inline, Review spec first, Review plan first, Change model first — and never re-offers the originating handoff option.
|
|
67
70
|
|
|
68
71
|
- Specs/plans must follow `templates/spec-template.md` / `templates/plan-template.md` (mandated diagrams, tables, CA-XX).
|
|
69
72
|
|
|
@@ -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
|
|
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
|
|
83
|
-
"Run verification, then
|
|
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 `
|
|
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
|
|