@brainervirus/workit-cursor 0.11.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.cursor-plugin/plugin.json +6 -6
- package/README.md +27 -31
- package/assets/templates/workit-contract.md +12 -0
- package/commands/wk-babysit.md +7 -0
- package/commands/wk-blast-radius.md +7 -0
- package/commands/wk-challenge.md +7 -0
- package/commands/wk-debug.md +7 -0
- package/commands/wk-deslop.md +7 -0
- package/commands/wk-diagram.md +7 -0
- package/commands/wk-green-run.md +7 -0
- package/commands/wk-handoff.md +7 -0
- package/commands/wk-implement.md +7 -0
- package/commands/wk-mockup.md +7 -0
- package/commands/wk-plan.md +7 -0
- package/commands/wk-review.md +7 -0
- package/commands/wk-steer.md +7 -0
- package/commands/wk-tdd.md +7 -0
- package/dist/cursor-session-start.js +13240 -414
- package/dist/mcp-server.js +26086 -27592
- package/dist/workit-hook.js +13202 -0
- package/hooks/hooks-cursor.json +29 -0
- package/package.json +8 -8
- package/rules/workit-contract.mdc +28 -0
- package/skills/workit-babysit/SKILL.md +33 -0
- package/skills/workit-behavioral-tdd/SKILL.md +53 -0
- package/skills/workit-blast-radius/SKILL.md +31 -0
- package/skills/workit-challenge/SKILL.md +62 -0
- package/skills/workit-debug/SKILL.md +61 -0
- package/skills/workit-deslop/SKILL.md +36 -0
- package/skills/workit-diagram/SKILL.md +32 -0
- package/skills/workit-green-run/SKILL.md +29 -0
- package/skills/workit-handoff/SKILL.md +43 -0
- package/skills/workit-implement/SKILL.md +46 -0
- package/skills/workit-mockup/SKILL.md +28 -0
- package/skills/workit-plan/SKILL.md +66 -0
- package/skills/workit-review/SKILL.md +60 -0
- package/skills/workit-steer/SKILL.md +32 -0
- package/assets/templates/execution-contract.md +0 -73
- package/assets/templates/greeting.md +0 -1
- package/assets/templates/headers.md +0 -3
- package/assets/templates/hygiene/.editorconfig +0 -8
- package/assets/templates/hygiene/.gitattributes +0 -3
- package/assets/templates/hygiene/CHANGELOG.md +0 -14
- package/assets/templates/hygiene/CONTRIBUTING.md +0 -3
- package/assets/templates/hygiene/LICENSE +0 -21
- package/assets/templates/hygiene/README.md +0 -3
- package/assets/templates/issue-update.md +0 -6
- package/assets/templates/plan-template.md +0 -27
- package/assets/templates/spec-template.md +0 -51
- package/assets/templates/superpowers-doc-contract.md +0 -75
- package/rules/ask-question-only.mdc +0 -49
- package/rules/cursor-todowrite.mdc +0 -14
- package/rules/no-worktrees.mdc +0 -26
- package/rules/sdd-docs-path.mdc +0 -22
- package/skills/wk-changelog/SKILL.md +0 -75
- package/skills/wk-commit/SKILL.md +0 -657
- package/skills/wk-docs-refresh/SKILL.md +0 -41
- package/skills/wk-handoff/SKILL.md +0 -55
- package/skills/wk-implement/SKILL.md +0 -58
- package/skills/wk-init/SKILL.md +0 -107
- package/skills/wk-issue-update/SKILL.md +0 -101
- package/skills/wk-issue-update/references/youtrack-update-style.md +0 -81
- package/skills/wk-meetings/SKILL.md +0 -50
- package/skills/wk-pr/SKILL.md +0 -90
- package/skills/wk-release-notes/SKILL.md +0 -57
- package/skills/wk-status/SKILL.md +0 -85
- package/skills/wk-verify/SKILL.md +0 -48
- package/vendor/superpowers/skills/brainstorming/SKILL.md +0 -159
- package/vendor/superpowers/skills/brainstorming/scripts/frame-template.html +0 -213
- package/vendor/superpowers/skills/brainstorming/scripts/helper.js +0 -167
- package/vendor/superpowers/skills/brainstorming/scripts/server.cjs +0 -723
- package/vendor/superpowers/skills/brainstorming/spec-document-reviewer-prompt.md +0 -49
- package/vendor/superpowers/skills/brainstorming/visual-companion.md +0 -222
- package/vendor/superpowers/skills/dispatching-parallel-agents/SKILL.md +0 -185
- package/vendor/superpowers/skills/executing-plans/SKILL.md +0 -70
- package/vendor/superpowers/skills/finishing-a-development-branch/SKILL.md +0 -241
- package/vendor/superpowers/skills/receiving-code-review/SKILL.md +0 -213
- package/vendor/superpowers/skills/requesting-code-review/SKILL.md +0 -103
- package/vendor/superpowers/skills/requesting-code-review/code-reviewer.md +0 -172
- package/vendor/superpowers/skills/subagent-driven-development/SKILL.md +0 -428
- package/vendor/superpowers/skills/subagent-driven-development/implementer-prompt.md +0 -139
- package/vendor/superpowers/skills/subagent-driven-development/task-reviewer-prompt.md +0 -188
- package/vendor/superpowers/skills/systematic-debugging/CREATION-LOG.md +0 -119
- package/vendor/superpowers/skills/systematic-debugging/SKILL.md +0 -296
- package/vendor/superpowers/skills/systematic-debugging/condition-based-waiting-example.ts +0 -158
- package/vendor/superpowers/skills/systematic-debugging/condition-based-waiting.md +0 -115
- package/vendor/superpowers/skills/systematic-debugging/defense-in-depth.md +0 -122
- package/vendor/superpowers/skills/systematic-debugging/root-cause-tracing.md +0 -169
- package/vendor/superpowers/skills/systematic-debugging/test-academic.md +0 -14
- package/vendor/superpowers/skills/systematic-debugging/test-pressure-1.md +0 -58
- package/vendor/superpowers/skills/systematic-debugging/test-pressure-2.md +0 -68
- package/vendor/superpowers/skills/systematic-debugging/test-pressure-3.md +0 -69
- package/vendor/superpowers/skills/test-driven-development/SKILL.md +0 -371
- package/vendor/superpowers/skills/test-driven-development/testing-anti-patterns.md +0 -299
- package/vendor/superpowers/skills/using-git-worktrees/SKILL.md +0 -202
- package/vendor/superpowers/skills/using-superpowers/SKILL.md +0 -62
- package/vendor/superpowers/skills/using-superpowers/references/antigravity-tools.md +0 -23
- package/vendor/superpowers/skills/using-superpowers/references/codex-tools.md +0 -39
- package/vendor/superpowers/skills/using-superpowers/references/pi-tools.md +0 -16
- package/vendor/superpowers/skills/verification-before-completion/SKILL.md +0 -139
- package/vendor/superpowers/skills/writing-plans/SKILL.md +0 -174
- package/vendor/superpowers/skills/writing-plans/plan-document-reviewer-prompt.md +0 -49
- package/vendor/superpowers/skills/writing-skills/SKILL.md +0 -689
- package/vendor/superpowers/skills/writing-skills/anthropic-best-practices.md +0 -1150
- package/vendor/superpowers/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +0 -189
- package/vendor/superpowers/skills/writing-skills/graphviz-conventions.dot +0 -172
- package/vendor/superpowers/skills/writing-skills/persuasion-principles.md +0 -187
- package/vendor/superpowers/skills/writing-skills/testing-skills-with-subagents.md +0 -384
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: workit-review
|
|
3
|
+
description: Use when policy requires fresh-context review of a candidate or when an independent correctness and regression check is requested
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Review a candidate
|
|
7
|
+
|
|
8
|
+
Review the real candidate in a stable context. A review is evidence about the
|
|
9
|
+
current candidate, not an author's success summary.
|
|
10
|
+
|
|
11
|
+
## Before method work
|
|
12
|
+
|
|
13
|
+
If there is no active or paused task, run shared `task.start` then `policy.assess`
|
|
14
|
+
before relying on selected policy rules or other product mutations. Assessment
|
|
15
|
+
selects requirements; do not wait for a rule that can only exist after assess.
|
|
16
|
+
|
|
17
|
+
## Method
|
|
18
|
+
|
|
19
|
+
1. Pin or identify the candidate revision before reading conclusions. Inspect the
|
|
20
|
+
task objective, scope, constraints, accepted decisions, changed files, and
|
|
21
|
+
actual checks through shared `task`, `evidence`, and `policy` operations.
|
|
22
|
+
2. Examine intent, correctness, regression risk, security or data consequences,
|
|
23
|
+
and project standards. Use the actual diff and check output; do not infer
|
|
24
|
+
evidence from a claim.
|
|
25
|
+
3. Record each concern as a `finding` claim with its affected scope and candidate.
|
|
26
|
+
Investigate it: reproduce or trace the consequence, then fix in scope, dismiss
|
|
27
|
+
with evidence, defer with a reason, or ask the user about a real tradeoff.
|
|
28
|
+
4. Reconcile conclusions when the candidate changes. Run one substantive review
|
|
29
|
+
and targeted rechecks; do not cycle reviewers indefinitely.
|
|
30
|
+
|
|
31
|
+
If the required independent context is unavailable, record the review method as
|
|
32
|
+
`unavailable` and preserve the gap. Same-session self-review is not independent
|
|
33
|
+
review and must not be relabeled as verified.
|
|
34
|
+
|
|
35
|
+
Use shared `evidence` and `finding` operations. Do not create a parallel review
|
|
36
|
+
lifecycle, universal review panel, or direct metadata files.
|
|
37
|
+
|
|
38
|
+
## Two axes, pinned
|
|
39
|
+
|
|
40
|
+
Pin the fixed point first (`git diff <base>...HEAD` plus log); review that
|
|
41
|
+
candidate only. Judge on two axes, never merged or reranked:
|
|
42
|
+
|
|
43
|
+
- **Standards:** repo standards plus a smell baseline (mysterious name, long
|
|
44
|
+
method, duplicated logic, refused bequest, and kin); repo rules override
|
|
45
|
+
the baseline; judgement calls only, never tooling-enforced nits.
|
|
46
|
+
- **Spec:** does the diff implement the originating spec/requirement
|
|
47
|
+
faithfully — missing, creep, or wrong, quoting the spec line.
|
|
48
|
+
|
|
49
|
+
Every finding needs proof: the changed hunk, a failing/passing test ref, or
|
|
50
|
+
a before/after. Causal disposition decides the outcome: introduced or
|
|
51
|
+
worsened behavior gets fixed; pre-existing issues become follow-ups;
|
|
52
|
+
inconclusive claims escalate, never silently pass.
|
|
53
|
+
|
|
54
|
+
## Common mistakes
|
|
55
|
+
|
|
56
|
+
| Mistake | Correction |
|
|
57
|
+
| --- | --- |
|
|
58
|
+
| Reviewing the summary instead of the candidate | Start from the stable candidate and real refs. |
|
|
59
|
+
| Treating every comment as a defect | Investigate the claim and consequence first. |
|
|
60
|
+
| Calling self-review independent | Preserve an unavailable capability gap. |
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: workit-steer
|
|
3
|
+
description: Use when new instructions, interruptions, or forgotten items arrive mid-task
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Steer without losing the thread
|
|
7
|
+
|
|
8
|
+
New context mid-session is normal; losing the thread is not. Park,
|
|
9
|
+
classify, handle, re-anchor — every time.
|
|
10
|
+
|
|
11
|
+
## Before method work
|
|
12
|
+
|
|
13
|
+
If there is no active or paused task, run shared `task.start` then `policy.assess`
|
|
14
|
+
before relying on selected policy rules or other product mutations. Assessment
|
|
15
|
+
selects requirements; do not wait for a rule that can only exist after assess.
|
|
16
|
+
|
|
17
|
+
## Method
|
|
18
|
+
|
|
19
|
+
1. Park current state to task progress verbatim: summary, nextAction,
|
|
20
|
+
blockers. Never trust memory across an interruption.
|
|
21
|
+
2. Classify the steering:
|
|
22
|
+
- same-task: fold into scope (reassess if facts changed), continue.
|
|
23
|
+
- new-task: `task.start` + `policy.assess`; the parked task waits.
|
|
24
|
+
- quick-question: answer from the parked state, then resume.
|
|
25
|
+
3. Handle it with the same rigor as the parked work (no drive-by edits).
|
|
26
|
+
4. Re-anchor: one-line resume brief (where we were, what changed, what
|
|
27
|
+
is next) before touching the parked work again.
|
|
28
|
+
|
|
29
|
+
## Completion
|
|
30
|
+
|
|
31
|
+
Both the steering and the parked work have an owner, a next action, and
|
|
32
|
+
no silent drops. Interrupted work resumes from the brief, not from recall.
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
Load `using-superpowers`, `subagent-driven-development`, `test-driven-development`, and `verification-before-completion` through OpenCode's `skill` tool. Implement the existing plan; do not re-plan.
|
|
2
|
-
|
|
3
|
-
**Spec:** <SPEC_PATH>
|
|
4
|
-
**Plan:** <PLAN_PATH>
|
|
5
|
-
**Branch:** <BRANCH>
|
|
6
|
-
**SDD:** `<SDD_DIR>`
|
|
7
|
-
|
|
8
|
-
## Handoff destination
|
|
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 plus model deferral and never re-offer the originating handoff option:
|
|
11
|
-
|
|
12
|
-
- Subagent-driven
|
|
13
|
-
- Inline
|
|
14
|
-
- Review spec first
|
|
15
|
-
- Review plan first
|
|
16
|
-
- Change model first
|
|
17
|
-
|
|
18
|
-
<workflow-handoff-destination>true</workflow-handoff-destination>
|
|
19
|
-
|
|
20
|
-
## Hard gates
|
|
21
|
-
|
|
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 `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
|
-
- Use native `todowrite` for visible task state as well as the gitignored ledger.
|
|
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 `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`), Subagent-driven execution is supported through the one-time `coordinator_lease` and per-task `delegation_token` minted by `workit_delegate` (fail-closed validation; no `parentID` identity exists on Cursor), and Inline runs single-agent in the current session.
|
|
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
|
-
- Use native `task` with only the built-in `explore` and `general` agents (OpenCode); on Cursor, Subagent-driven dispatches Cursor-native subagents with a task `delegation_token`, Inline runs single-agent in the current session.
|
|
31
|
-
|
|
32
|
-
## Flow gates (HARD)
|
|
33
|
-
|
|
34
|
-
- `wk-implement` refuses to run unless the plan is `approved` (flow.json) and the post-plan menu was presented.
|
|
35
|
-
- `wk-handoff` refuses to run unless both spec and plan are `approved`.
|
|
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
|
-
|
|
38
|
-
## Setup
|
|
39
|
-
|
|
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
|
-
3. Mark IDs in `completed_task_ids` completed and never redispatch them.
|
|
44
|
-
4. Call `workit_resolve_branch`, then show the current branch, target branch, and stash behavior before any in-place checkout/setup mutation.
|
|
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 `workit_branch_setup` with `confirmed: true` only after approval.
|
|
47
|
-
|
|
48
|
-
## Remaining-task loop
|
|
49
|
-
|
|
50
|
-
For each top-level task absent from `completed_task_ids`:
|
|
51
|
-
|
|
52
|
-
1. Mark it `in_progress` with `todowrite`.
|
|
53
|
-
2. Create a working-state brief with `workit_sdd_task_brief` and `confirmed: true`.
|
|
54
|
-
3. Route by the approved execution mode: **Subagent-driven** delegates read-only discovery to an `explore` (OpenCode) agent, delegates implementation to a fresh `general` (OpenCode) agent (on Cursor, the coordinator mints a `delegation_token` with `workit_delegate` and the subagent prompt carries the raw token — the worker passes it as `delegation_token` on its mutation calls, and appending progress revokes it), and the coordinator never edits product code; **Inline** executes every task in the current agent with no dispatch and no token minting. Product changes follow TDD.
|
|
55
|
-
4. Create a working-state diff with `workit_sdd_review_package` and `confirmed: true`.
|
|
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 `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
|
-
|
|
60
|
-
## Final gate
|
|
61
|
-
|
|
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
|
-
|
|
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
|
-
|
|
66
|
-
## Task order
|
|
67
|
-
|
|
68
|
-
<TASK_LIST>
|
|
69
|
-
|
|
70
|
-
## Quality gate (HARD)
|
|
71
|
-
|
|
72
|
-
- Specs/plans are written from `templates/spec-template.md` / `templates/plan-template.md`.
|
|
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.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{{greetingText}}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
|
|
5
|
-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
-
|
|
8
|
-
## [Unreleased]
|
|
9
|
-
|
|
10
|
-
### Added
|
|
11
|
-
|
|
12
|
-
### Changed
|
|
13
|
-
|
|
14
|
-
### Fixed
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) <YEAR> <HOLDER>
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
# <Feature> Implementation Plan
|
|
2
|
-
|
|
3
|
-
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. On Cursor the two paths are: **Subagent-driven** — Cursor-native subagents dispatched by the coordinator, each carrying a task-scoped `delegation_token` minted with `workit_delegate` from the one-time `coordinator_lease`; **Inline** — `executing-plans` in the current session, single-agent, no dispatch, no token minting. Steps use checkbox (`- [ ]`) syntax for tracking.
|
|
4
|
-
|
|
5
|
-
**Spec:** `docs/<slug>/spec.md`
|
|
6
|
-
**Branch:** `feature/<slug>`
|
|
7
|
-
|
|
8
|
-
**Goal:** <one sentence>
|
|
9
|
-
|
|
10
|
-
## Global Constraints
|
|
11
|
-
|
|
12
|
-
- Each task lands exactly one contiguous non-empty commit range (`base..head`): fix rounds append commits to that range and never rewrite/amend an active review range; each progress line records the task's real base..head shas.
|
|
13
|
-
- The final task ends execution with `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
|
-
- <project-wide requirements, one line each>
|
|
15
|
-
|
|
16
|
-
---
|
|
17
|
-
|
|
18
|
-
### Task N: <Component>
|
|
19
|
-
|
|
20
|
-
- [ ] **Step 1: <action>**
|
|
21
|
-
|
|
22
|
-
<!-- per-task criteria: how this task is verified -->
|
|
23
|
-
**Criteria:** <verifiable check>
|
|
24
|
-
|
|
25
|
-
| Status | Task |
|
|
26
|
-
| --- | --- |
|
|
27
|
-
| pending | N: <Component> |
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
# Spec: <feature>
|
|
2
|
-
|
|
3
|
-
**Branch:** `feature/<slug>`
|
|
4
|
-
|
|
5
|
-
## Context
|
|
6
|
-
|
|
7
|
-
<!-- Why does this exist? What problem does it solve? 1-3 sentences. -->
|
|
8
|
-
|
|
9
|
-
## Goals
|
|
10
|
-
|
|
11
|
-
- <!-- measurable, one per bullet -->
|
|
12
|
-
|
|
13
|
-
## Non-goals
|
|
14
|
-
|
|
15
|
-
- <!-- explicitly out of scope -->
|
|
16
|
-
|
|
17
|
-
## Architecture
|
|
18
|
-
|
|
19
|
-
<!-- REQUIRED if this spec has flows or architecture: render a mermaid diagram (workit_present_flow). -->
|
|
20
|
-
```mermaid
|
|
21
|
-
flowchart TD
|
|
22
|
-
A[Start] --> B[Step]
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
<!-- REQUIRED if this spec touches UI: render an ASCII wireframe (workit_present_ascii). -->
|
|
26
|
-
```text
|
|
27
|
-
┌──────────────┐
|
|
28
|
-
│ Header │
|
|
29
|
-
└──────────────┘
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## Data flow / contracts
|
|
33
|
-
|
|
34
|
-
<!-- REQUIRED when there is a glossary, scope comparison, or contracts: use markdown tables. -->
|
|
35
|
-
| Term | Meaning |
|
|
36
|
-
| --- | --- |
|
|
37
|
-
| <term> | <meaning> |
|
|
38
|
-
|
|
39
|
-
## Acceptance criteria
|
|
40
|
-
|
|
41
|
-
<!-- REQUIRED: enumerable, each verifiable. Numbered CA-01, CA-02, ... -->
|
|
42
|
-
- CA-01 …
|
|
43
|
-
- CA-02 …
|
|
44
|
-
|
|
45
|
-
## Decisions
|
|
46
|
-
|
|
47
|
-
- D-01 …
|
|
48
|
-
|
|
49
|
-
## Future work
|
|
50
|
-
|
|
51
|
-
- …
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
# Superpowers document contract
|
|
2
|
-
|
|
3
|
-
Use OpenCode's native `question` for every bounded user choice. Give concise choices and allow a custom answer; if the tool is unavailable, ask one concise plain-text question. Use `skill` to load workflow and Superpowers skills, `todowrite` for task state, and `task` for delegated work (OpenCode) or the host-native equivalent — on Cursor, Subagent-driven dispatches Cursor-native subagents with a task `delegation_token`, Inline runs single-agent in the current session.
|
|
4
|
-
|
|
5
|
-
## Tracked document layout
|
|
6
|
-
|
|
7
|
-
| Document | Path |
|
|
8
|
-
| --- | --- |
|
|
9
|
-
| Spec | `docs/<slug>/spec.md` |
|
|
10
|
-
| Plan | `docs/<slug>/plan.md` |
|
|
11
|
-
| SDD state | `docs/<slug>/sdd/` |
|
|
12
|
-
|
|
13
|
-
An optional human mirror may live at `docs/specs/<same-basename>.md`; when present, keep its branch identical.
|
|
14
|
-
|
|
15
|
-
Specs require:
|
|
16
|
-
|
|
17
|
-
```markdown
|
|
18
|
-
**Branch:** `feature/<slug>`
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
Plans require:
|
|
22
|
-
|
|
23
|
-
```markdown
|
|
24
|
-
**Spec:** `docs/<slug>/spec.md`
|
|
25
|
-
**Branch:** `feature/<slug>`
|
|
26
|
-
```
|
|
27
|
-
|
|
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
|
-
|
|
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
|
-
|
|
32
|
-
## Execution and handoff
|
|
33
|
-
|
|
34
|
-
- Implementation uses `wk-implement` and subagent-driven development, with native `todowrite` and `task`.
|
|
35
|
-
- Commits use `wk-commit` after its native `question` confirmation.
|
|
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`), Subagent-driven execution is supported through the one-time `coordinator_lease` and per-task `delegation_token` minted by `workit_delegate` (fail-closed validation; no `parentID` identity exists on Cursor), and Inline runs single-agent in the current session.
|
|
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
|
-
|
|
42
|
-
## YouTrack content
|
|
43
|
-
|
|
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
|
-
|
|
46
|
-
## Final self-check
|
|
47
|
-
|
|
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
|
-
|
|
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
|
-
|
|
52
|
-
## Post-plan execution choice
|
|
53
|
-
|
|
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
|
-
|
|
56
|
-
On success, use native `question` / Cursor `AskQuestion` with exactly these options (no stay, no A/B/C prose duplicate):
|
|
57
|
-
|
|
58
|
-
1. Subagent-driven → load `wk-implement`
|
|
59
|
-
2. Inline → execute in this session
|
|
60
|
-
3. Handoff → load `wk-handoff` (new session only)
|
|
61
|
-
4. Review spec first
|
|
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.
|
|
66
|
-
|
|
67
|
-
Never emit Superpowers text beginning “Two execution options”.
|
|
68
|
-
|
|
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.
|
|
70
|
-
|
|
71
|
-
- Specs/plans must follow `templates/spec-template.md` / `templates/plan-template.md` (mandated diagrams, tables, CA-XX).
|
|
72
|
-
|
|
73
|
-
## Doc delivery
|
|
74
|
-
|
|
75
|
-
When delivering a spec or plan, use a clickable markdown link (\`[spec.md](docs/<slug>/spec.md)\`) and a 3-5 bullet summary of the content (Context, Goals, key decisions, status). Never reference docs with backtick-only paths.
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: ALL user choices must use Cursor AskQuestion — never A/B/C in chat
|
|
3
|
-
alwaysApply: true
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# AskQuestion only (HARD-GATE)
|
|
7
|
-
|
|
8
|
-
**Overrides** Superpowers brainstorming “ask in chat / A/B/C text options” and any skill that suggests conversational multiple choice.
|
|
9
|
-
|
|
10
|
-
## Required path for every decision
|
|
11
|
-
|
|
12
|
-
When the user must choose (clarifying questions, product identity, layout, yes/no, confirm, branch, stash, YouTrack, approaches, or how to execute a completed plan):
|
|
13
|
-
|
|
14
|
-
1. Call Cursor's native **`AskQuestion`** with a workflow-specific title, prompt, and options.
|
|
15
|
-
2. Wait for the tool result — do **not** also paste the options in the chat message.
|
|
16
|
-
3. If native `AskQuestion` is unavailable in the current mode, ask one concise plain-text question.
|
|
17
|
-
|
|
18
|
-
## Forbidden (always)
|
|
19
|
-
|
|
20
|
-
- Letter options in markdown: `A)`, `B)`, `C)`, `Reply with A, B, or C`
|
|
21
|
-
- Bullet / numbered choice lists meant as the answer UI
|
|
22
|
-
- “First clarifying question” blocks that list options in prose
|
|
23
|
-
- Asking the user to type yes/no when `yes_no` + AskQuestion exists
|
|
24
|
-
|
|
25
|
-
## Mapping
|
|
26
|
-
|
|
27
|
-
| Need | Kind |
|
|
28
|
-
|------|------|
|
|
29
|
-
| 2+ custom choices (brainstorming, identity, layout, …) | `pick_option` + title, prompt, `id:label` args |
|
|
30
|
-
| Yes / no | `yes_no` |
|
|
31
|
-
| Branch / stash / YouTrack / VCS | named kinds from the tool |
|
|
32
|
-
| Plan completed; choose execution method | `plan_execution` + saved plan path |
|
|
33
|
-
|
|
34
|
-
One AskQuestion per turn when possible. Open-ended free text (no options) may stay in chat — **as soon as there are options, AskQuestion is mandatory**.
|
|
35
|
-
|
|
36
|
-
## Superpowers writing-plans override
|
|
37
|
-
|
|
38
|
-
After writing a plan, **do not emit** Superpowers' inline text beginning “Two execution options”.
|
|
39
|
-
|
|
40
|
-
After `workit_docs_validate` succeeds on the saved spec/plan pair, call Cursor `AskQuestion` with exactly:
|
|
41
|
-
|
|
42
|
-
- Subagent-driven → dispatches Cursor-native subagents: `workit_plan_menu` returns a one-time `coordinator_lease`, `workit_delegate` mints a task-scoped `delegation_token` per task, and the worker passes it as `delegation_token` on mutation calls
|
|
43
|
-
- Inline → execute in this session
|
|
44
|
-
- Handoff → `/wk-handoff` (new session only)
|
|
45
|
-
- Review spec first
|
|
46
|
-
- Review plan first
|
|
47
|
-
- Cursor's built-in **Other** response, always last
|
|
48
|
-
|
|
49
|
-
No `--stay` option in this menu.
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: SDD ledger AND Cursor TodoWrite — both required for plan execution
|
|
3
|
-
alwaysApply: true
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# TodoWrite UI (HARD-GATE)
|
|
7
|
-
|
|
8
|
-
When executing a plan / SDD handoff:
|
|
9
|
-
|
|
10
|
-
1. MCP `workit_sdd_context` returns `todos` — call Cursor **TodoWrite** with that array (`merge: false`) before Task 1.
|
|
11
|
-
2. SDD under `docs/<slug>/sdd/` is persistence only — **not** a substitute for the Cursor task list UI.
|
|
12
|
-
3. Per task: `in_progress` before dispatch; `completed` after `workit_sdd_append_progress`.
|
|
13
|
-
|
|
14
|
-
Never skip TodoWrite because the SDD ledger exists.
|
package/rules/no-worktrees.mdc
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: NEVER use git worktrees — in-place feature/* or bugfix/* checkout only
|
|
3
|
-
alwaysApply: true
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# No worktrees (HARD-GATE)
|
|
7
|
-
|
|
8
|
-
**Overrides** Superpowers `using-git-worktrees` skill and any execution contract that mentions worktrees.
|
|
9
|
-
|
|
10
|
-
## Policy
|
|
11
|
-
|
|
12
|
-
- **NEVER** invoke `using-git-worktrees`
|
|
13
|
-
- **NEVER** run `git worktree add` or any worktree command
|
|
14
|
-
- Branch work is **in-place only**: `feature/*` or `bugfix/*`
|
|
15
|
-
- Never commit on `main`, `develop`, `master`, or `prod`
|
|
16
|
-
|
|
17
|
-
## Required flow (before Task 1)
|
|
18
|
-
|
|
19
|
-
1. MCP `workit_resolve_branch` with spec + plan paths
|
|
20
|
-
2. If `needs_checkout` and `dirty` → native **AskQuestion** asks whether to stash before checkout
|
|
21
|
-
3. MCP `workit_branch_setup` with `target_branch` and `stash: yes|no`
|
|
22
|
-
4. After all tasks, if manifest has `stash_ref` → AskQuestion → `workit_branch_setup` action=`reapply_stash`
|
|
23
|
-
|
|
24
|
-
## Tools only
|
|
25
|
-
|
|
26
|
-
Do not infer branch or stash state from manual `git status`. Use MCP tools.
|
package/rules/sdd-docs-path.mdc
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: SDD artifacts live under docs/<slug>/sdd — never .superpowers/sdd
|
|
3
|
-
alwaysApply: true
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# SDD path (HARD-GATE)
|
|
7
|
-
|
|
8
|
-
**Overrides** Superpowers `subagent-driven-development` ledger check at `.superpowers/sdd/progress.md`.
|
|
9
|
-
|
|
10
|
-
## Required
|
|
11
|
-
|
|
12
|
-
1. MCP `workit_sdd_context` with `plan_path` — **always**, including fresh projects
|
|
13
|
-
2. Use returned `sdd_dir` (`docs/<slug>/sdd/`) for all SDD artifacts
|
|
14
|
-
3. `workit_sdd_task_brief`, `workit_sdd_review_package`, `workit_sdd_append_progress` — never Superpowers `sdd-workspace` script
|
|
15
|
-
|
|
16
|
-
## Forbidden
|
|
17
|
-
|
|
18
|
-
- `.superpowers/sdd/` for progress, briefs, or review diffs
|
|
19
|
-
- `cat .superpowers/sdd/progress.md` — missing file there does NOT mean "start fresh"
|
|
20
|
-
- Superpowers `task-brief` / `review-package` scripts under `.agents/skills/`
|
|
21
|
-
|
|
22
|
-
Fresh project with no ledger → `workit_sdd_context` creates nothing; `progress.md` appears only on the first confirmed `workit_sdd_append_progress`.
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: wk-changelog
|
|
3
|
-
description: Update CHANGELOG.md via workit_changelog_context + workit_changelog_apply. Use for /wk-changelog or "update the changelog".
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Changelog — Keep a Changelog Update
|
|
7
|
-
|
|
8
|
-
Update `CHANGELOG.md` for the current repository.
|
|
9
|
-
|
|
10
|
-
## Step 1 — Gather facts (required)
|
|
11
|
-
|
|
12
|
-
Call MCP tool `workit_changelog_context` with arguments from the user's message (range, version, paths, etc.).
|
|
13
|
-
|
|
14
|
-
**Repository calls:** For every repository-scoped `workit_*` call, pass the active Cursor workspace as `workspace_root`; never rely on the MCP process default.
|
|
15
|
-
|
|
16
|
-
Use the tool return value as ground truth. Do not read git, run npm, or infer repo state yourself.
|
|
17
|
-
If the tool errors, report the error and stop.
|
|
18
|
-
|
|
19
|
-
If `unreleased.needs_normalize` is true, call `workit_changelog_apply` with `normalize_only: true` before merging new bullets.
|
|
20
|
-
|
|
21
|
-
## Step 2 — Decide entries (do not edit the file yet)
|
|
22
|
-
|
|
23
|
-
Follow Keep a Changelog 1.1.0:
|
|
24
|
-
|
|
25
|
-
- Target `## [Unreleased]` only (unless the user asks to cut a version).
|
|
26
|
-
- Categories: `Added`, `Changed`, `Deprecated`, `Removed`, `Fixed`, `Security`.
|
|
27
|
-
- Human-readable bullets, not raw commit messages.
|
|
28
|
-
- Group by user-visible behavior, not by file.
|
|
29
|
-
- Skip internal refactors / CI / tests / formatting unless they affect users.
|
|
30
|
-
- If there are no meaningful user-visible changes, stop — do not invent entries.
|
|
31
|
-
|
|
32
|
-
## Step 3 — Apply via tool (required)
|
|
33
|
-
|
|
34
|
-
Call MCP `workit_changelog_apply` with the new bullets. Examples:
|
|
35
|
-
|
|
36
|
-
```json
|
|
37
|
-
{
|
|
38
|
-
"entries": {
|
|
39
|
-
"Added": ["**Foo API** — public endpoint for bar"],
|
|
40
|
-
"Fixed": ["**Login redirect** — stop loop on expired session"]
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
or
|
|
46
|
-
|
|
47
|
-
```json
|
|
48
|
-
{
|
|
49
|
-
"entries": [
|
|
50
|
-
{ "category": "Added", "text": "**Foo API** — public endpoint for bar" }
|
|
51
|
-
]
|
|
52
|
-
}
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
### HARD-GATE
|
|
56
|
-
|
|
57
|
-
- **NEVER** hand-edit `CHANGELOG.md` to append a new `### Added` / `### Changed` / … block under `[Unreleased]`.
|
|
58
|
-
- The apply tool **merges** into the existing category heading (or creates one category once).
|
|
59
|
-
- Duplicate identical bullets are skipped.
|
|
60
|
-
- Do not update package versions or tags.
|
|
61
|
-
- Do not commit.
|
|
62
|
-
|
|
63
|
-
## Output
|
|
64
|
-
|
|
65
|
-
After the tool returns ok, summarize:
|
|
66
|
-
|
|
67
|
-
```md
|
|
68
|
-
Changelog update:
|
|
69
|
-
|
|
70
|
-
- <entry or reason no update was needed>
|
|
71
|
-
|
|
72
|
-
Files changed:
|
|
73
|
-
|
|
74
|
-
- CHANGELOG.md
|
|
75
|
-
```
|