@brainervirus/workit-cursor 0.6.1 → 0.8.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 +33 -5
- package/README.md +88 -6
- package/assets/logo.svg +4 -0
- package/assets/templates/execution-contract.md +58 -0
- package/assets/templates/greeting.md +1 -0
- package/assets/templates/headers.md +3 -0
- package/assets/templates/hygiene/.editorconfig +8 -0
- package/assets/templates/hygiene/.gitattributes +3 -0
- package/assets/templates/hygiene/CHANGELOG.md +14 -0
- package/assets/templates/hygiene/CONTRIBUTING.md +3 -0
- package/assets/templates/hygiene/LICENSE +21 -0
- package/assets/templates/hygiene/README.md +3 -0
- package/assets/templates/issue-update.md +6 -0
- package/assets/templates/plan-template.md +25 -0
- package/assets/templates/spec-template.md +51 -0
- package/assets/templates/superpowers-doc-contract.md +70 -0
- package/dist/cursor-session-start.js +351 -0
- package/dist/mcp-server.js +27687 -0
- package/hooks/hooks-cursor.json +1 -1
- package/mcp.json +2 -6
- package/package.json +20 -7
- package/rules/ask-question-only.mdc +1 -1
- package/rules/sdd-docs-path.mdc +2 -2
- package/skills/wk-changelog/SKILL.md +1 -1
- package/skills/wk-commit/SKILL.md +1 -1
- package/skills/wk-docs-refresh/SKILL.md +1 -1
- package/skills/wk-handoff/SKILL.md +2 -2
- package/skills/wk-implement/SKILL.md +5 -5
- package/skills/wk-issue-update/SKILL.md +2 -0
- package/skills/wk-pr/SKILL.md +2 -0
- package/skills/wk-release-notes/SKILL.md +1 -1
- package/skills/wk-verify/SKILL.md +1 -1
- package/vendor/superpowers/skills/brainstorming/SKILL.md +159 -0
- package/vendor/superpowers/skills/brainstorming/scripts/frame-template.html +213 -0
- package/vendor/superpowers/skills/brainstorming/scripts/helper.js +167 -0
- package/vendor/superpowers/skills/brainstorming/scripts/server.cjs +723 -0
- package/vendor/superpowers/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
- package/vendor/superpowers/skills/brainstorming/visual-companion.md +222 -0
- package/vendor/superpowers/skills/dispatching-parallel-agents/SKILL.md +185 -0
- package/vendor/superpowers/skills/executing-plans/SKILL.md +70 -0
- package/vendor/superpowers/skills/finishing-a-development-branch/SKILL.md +241 -0
- package/vendor/superpowers/skills/receiving-code-review/SKILL.md +213 -0
- package/vendor/superpowers/skills/requesting-code-review/SKILL.md +103 -0
- package/vendor/superpowers/skills/requesting-code-review/code-reviewer.md +172 -0
- package/vendor/superpowers/skills/subagent-driven-development/SKILL.md +418 -0
- package/vendor/superpowers/skills/subagent-driven-development/implementer-prompt.md +139 -0
- package/vendor/superpowers/skills/subagent-driven-development/task-reviewer-prompt.md +188 -0
- package/vendor/superpowers/skills/systematic-debugging/CREATION-LOG.md +119 -0
- package/vendor/superpowers/skills/systematic-debugging/SKILL.md +296 -0
- package/vendor/superpowers/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/vendor/superpowers/skills/systematic-debugging/condition-based-waiting.md +115 -0
- package/vendor/superpowers/skills/systematic-debugging/defense-in-depth.md +122 -0
- package/vendor/superpowers/skills/systematic-debugging/root-cause-tracing.md +169 -0
- package/vendor/superpowers/skills/systematic-debugging/test-academic.md +14 -0
- package/vendor/superpowers/skills/systematic-debugging/test-pressure-1.md +58 -0
- package/vendor/superpowers/skills/systematic-debugging/test-pressure-2.md +68 -0
- package/vendor/superpowers/skills/systematic-debugging/test-pressure-3.md +69 -0
- package/vendor/superpowers/skills/test-driven-development/SKILL.md +371 -0
- package/vendor/superpowers/skills/test-driven-development/testing-anti-patterns.md +299 -0
- package/vendor/superpowers/skills/using-git-worktrees/SKILL.md +202 -0
- package/vendor/superpowers/skills/using-superpowers/SKILL.md +62 -0
- package/vendor/superpowers/skills/using-superpowers/references/antigravity-tools.md +23 -0
- package/vendor/superpowers/skills/using-superpowers/references/codex-tools.md +39 -0
- package/vendor/superpowers/skills/using-superpowers/references/pi-tools.md +16 -0
- package/vendor/superpowers/skills/verification-before-completion/SKILL.md +139 -0
- package/vendor/superpowers/skills/writing-plans/SKILL.md +174 -0
- package/vendor/superpowers/skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
- package/vendor/superpowers/skills/writing-skills/SKILL.md +689 -0
- package/vendor/superpowers/skills/writing-skills/anthropic-best-practices.md +1150 -0
- package/vendor/superpowers/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
- package/vendor/superpowers/skills/writing-skills/graphviz-conventions.dot +172 -0
- package/vendor/superpowers/skills/writing-skills/persuasion-principles.md +187 -0
- package/vendor/superpowers/skills/writing-skills/testing-skills-with-subagents.md +384 -0
- package/hooks/session-start +0 -53
- package/marketplace.json +0 -10
- package/mcp/run-server.sh +0 -56
- package/mcp/server.ts +0 -1163
|
@@ -2,9 +2,37 @@
|
|
|
2
2
|
"name": "workit",
|
|
3
3
|
"displayName": "Workit",
|
|
4
4
|
"description": "OpenCode-style verify, PR, changelog, commit, and session handoff for Cursor",
|
|
5
|
-
"version": "0.
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"
|
|
5
|
+
"version": "0.8.0",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "Cristhofer Pincetti"
|
|
8
|
+
},
|
|
9
|
+
"publisher": "BrainerVirus",
|
|
10
|
+
"homepage": "https://github.com/BrainerVirus/workit",
|
|
11
|
+
"repository": "https://github.com/BrainerVirus/workit",
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"logo": "assets/logo.svg",
|
|
14
|
+
"keywords": [
|
|
15
|
+
"agent",
|
|
16
|
+
"cursor",
|
|
17
|
+
"mcp",
|
|
18
|
+
"workflow",
|
|
19
|
+
"workit"
|
|
20
|
+
],
|
|
21
|
+
"category": "Developer Tools",
|
|
22
|
+
"tags": [
|
|
23
|
+
"workflow",
|
|
24
|
+
"agent",
|
|
25
|
+
"mcp",
|
|
26
|
+
"pr",
|
|
27
|
+
"changelog",
|
|
28
|
+
"commit",
|
|
29
|
+
"handoff"
|
|
30
|
+
],
|
|
31
|
+
"skills": [
|
|
32
|
+
"skills/",
|
|
33
|
+
"vendor/superpowers/skills/"
|
|
34
|
+
],
|
|
35
|
+
"rules": "rules/",
|
|
36
|
+
"mcpServers": "mcp.json",
|
|
37
|
+
"hooks": "hooks/hooks-cursor.json"
|
|
10
38
|
}
|
package/README.md
CHANGED
|
@@ -1,21 +1,103 @@
|
|
|
1
1
|
# @brainervirus/workit-cursor
|
|
2
2
|
|
|
3
|
-
Cursor plugin for workit — MCP server,
|
|
3
|
+
Cursor plugin for workit — MCP server, session-start hook, rules, and skills for agentic coding workflows (specs, plans, YouTrack, CI-gated commits).
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
**Wizard (recommended)** — configures Cursor and/or OpenCode and installs the platform packages:
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
10
|
npx @brainervirus/workit-cli init
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
+
**npm (package)** — the package is published as `@brainervirus/workit-cursor`; its `.cursor-plugin/plugin.json` identifies the plugin as `workit` (display name `Workit`) and registers its MCP server, hook, rules, and skills. A local (non-npm) install lives at `~/.cursor/plugins/local/workit` and writes `enabled_plugins.workit = true`; the installer migrates exact legacy `workflow-toolkit` entries only after the replacement succeeds.
|
|
14
|
+
|
|
15
|
+
**Marketplace** — see [Marketplace](#marketplace).
|
|
16
|
+
|
|
17
|
+
**Manual** — add the MCP server to `.cursor/mcp.json`:
|
|
18
|
+
|
|
19
|
+
```json
|
|
20
|
+
{
|
|
21
|
+
"mcpServers": {
|
|
22
|
+
"workit": {
|
|
23
|
+
"command": "npx",
|
|
24
|
+
"args": [
|
|
25
|
+
"-y",
|
|
26
|
+
"--package=@brainervirus/workit-cursor@latest",
|
|
27
|
+
"workit-cursor-mcp",
|
|
28
|
+
"${workspaceFolder}"
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Requirements
|
|
36
|
+
|
|
37
|
+
- **Node.js ≥ 22** — the MCP server and session-start hook are self-contained Node bundles invoked through `npx`.
|
|
38
|
+
- **Network** — `npx -y …@latest` resolves and downloads the package on first run in each environment; a machine that cannot reach the npm registry cannot start the MCP server or hook (see [Runtime](#runtime)).
|
|
39
|
+
|
|
13
40
|
## What it provides
|
|
14
41
|
|
|
15
|
-
- MCP server
|
|
16
|
-
- Session-start contract hook
|
|
17
|
-
-
|
|
18
|
-
|
|
42
|
+
- MCP server exposing the `workflow_*` tools (branch setup, PR create/context, docs validate/promote, YouTrack post/log/time, templates, rules, presentation, doctor, handoff).
|
|
43
|
+
- Session-start contract hook.
|
|
44
|
+
- 4 rules and 12 `wk-*` skills (plus 14 sanitized Superpowers skills).
|
|
45
|
+
|
|
46
|
+
## Host limitations
|
|
47
|
+
|
|
48
|
+
Cursor adapts workit through policy-only confirmation: approvals and commits are recorded as policy decisions (`attested: false`) rather than fabricated delegated identity, and subagent-driven plan execution is not supported on this host. OpenCode records native `question` receipts and runs delegated tasks; see the root [README](../../README.md#host-capabilities) for the full host-capability matrix.
|
|
49
|
+
|
|
50
|
+
## Configuration
|
|
51
|
+
|
|
52
|
+
- Plugin metadata: `packages/workit-cursor/.cursor-plugin/plugin.json` (`name: "workit"`, `displayName: "Workit"`).
|
|
53
|
+
- MCP server: `mcp.json`.
|
|
54
|
+
- Session-start hook: `hooks/hooks-cursor.json`.
|
|
55
|
+
- Rules: `rules/` (`ask-question-only.mdc`, `cursor-todowrite.mdc`, `no-worktrees.mdc`, `sdd-docs-path.mdc`).
|
|
56
|
+
- Skills: `skills/` (12 `wk-*`) and `vendor/superpowers/skills/` (14).
|
|
57
|
+
|
|
58
|
+
## Runtime
|
|
59
|
+
|
|
60
|
+
Cursor launches the MCP server and session-start hook through `npx`, so the shipped manifests contain no repository-relative `dist` paths:
|
|
61
|
+
|
|
62
|
+
- **MCP server** — `npx -y --package=@brainervirus/workit-cursor@latest workit-cursor-mcp ${workspaceFolder}`. It speaks the MCP stdio protocol; `stdout` is reserved for protocol messages and diagnostics go to `stderr`.
|
|
63
|
+
- **Session-start hook** — `npx -y --package=@brainervirus/workit-cursor@latest workit-cursor-session-start`. It emits valid hook output and a diagnostic on runtime failure, and remains fail-open where Cursor's hook contract requires startup continuity.
|
|
64
|
+
- `npx` startup or network failure is surfaced by Cursor as an MCP/hook startup failure; Workit never silently substitutes stale local runtime code.
|
|
65
|
+
|
|
66
|
+
The `@latest` tag means the runtime updates independently of the Marketplace metadata: Cursor reviews plugin metadata from Git, while npm serves the runtime. See [Update review](#update-review).
|
|
67
|
+
|
|
68
|
+
## Security and data handling
|
|
69
|
+
|
|
70
|
+
- **Secrets** — tokens are stored in files with mode 600 (`~/.config/workit/*.token`) and are never printed by tools; edit them locally.
|
|
71
|
+
- **Logs** — a persistent JSONL journal records redacted structured diagnostics under the configuration directory; Cursor keeps `stderr` diagnostics for protocol safety, and `stdout` remains reserved for the MCP/hook protocol (the logger never writes to it).
|
|
72
|
+
- **External interactions** — Git/VCS (branch resolution, PR/MR creation) and YouTrack (task updates, time logging) happen only when you invoke the corresponding tools; local setup copies files under `~/.cursor/plugins/local/workit` and `~/.config/workit/`.
|
|
73
|
+
|
|
74
|
+
## Plugin layout
|
|
75
|
+
|
|
76
|
+
| Path | Contents |
|
|
77
|
+
| --- | --- |
|
|
78
|
+
| `mcp/` + `dist/mcp-server.js` | MCP server entry (built). |
|
|
79
|
+
| `hooks/` | session-start hook manifest. |
|
|
80
|
+
| `rules/` | 4 `.mdc` rules. |
|
|
81
|
+
| `skills/` | 12 `wk-*` skills. |
|
|
82
|
+
| `vendor/superpowers/skills/` | 14 sanitized Superpowers skills. |
|
|
83
|
+
| `.cursor-plugin/plugin.json` | authoritative plugin manifest. |
|
|
84
|
+
|
|
85
|
+
## Package scripts
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
bun run build # bundle dist/mcp-server.js, dist/cursor-session-start.js, sanitize vendor skills
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
From the repository root, `bun run validate:cursor-marketplace` validates the tracked Marketplace artifact against the official Cursor JSON schemas and clean-checkout invariants (component paths, frontmatter, logo, sanitized vendor parity, no ignored-`dist` runtime references).
|
|
92
|
+
|
|
93
|
+
## Marketplace
|
|
94
|
+
|
|
95
|
+
The repository root carries `.cursor-plugin/marketplace.json`, indexing `packages/workit-cursor` (plugin `workit` / `Workit`). Cursor installs Marketplace plugins from Git and does not build the repository, so all declared skills, rules, and assets are tracked and validated in CI — the runtime is launched from npm as described in [Runtime](#runtime).
|
|
96
|
+
|
|
97
|
+
- **Installing from Marketplace** — a Marketplace admin adds the repository URL through Cursor's authenticated publisher flow; end users then install the plugin from the Cursor Marketplace UI, which reads `.cursor-plugin/plugin.json` and the tracked components directly from Git.
|
|
98
|
+
- **Submission** — Marketplace submission is a separate, later authenticated action at `https://cursor.com/marketplace/publish`. It is **not** performed here and no publication or acceptance is claimed; the repository is kept validated and submission-ready.
|
|
99
|
+
- **Update review** — Git plugin metadata (manifest, rules, skills, assets) is reviewed by Cursor on Marketplace updates, while the npm runtime tagged `@latest` updates independently. Reviewing an npm runtime change is a manual step: pin `--package=@brainervirus/workit-cursor@<version>` in `mcp.json` / `hooks-cursor.json` if you need immutable reviewed code instead of `@latest`.
|
|
100
|
+
- **Troubleshooting** — `workit doctor` (or the `workflow_doctor` tool) reports installation health including runtime, token, VCS/YouTrack, and log-writability checks; it exits nonzero on failure. An MCP/hook startup failure with no network is an `npx`/registry reachability issue, not a Workit defect.
|
|
19
101
|
|
|
20
102
|
## Docs
|
|
21
103
|
|
package/assets/logo.svg
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="64" height="64">
|
|
2
|
+
<rect width="64" height="64" rx="14" fill="#111827"/>
|
|
3
|
+
<path d="M18 33l10 10 18-20" fill="none" stroke="#34d399" stroke-width="6" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
+
</svg>
|
|
@@ -0,0 +1,58 @@
|
|
|
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
|
+
## Hard gates
|
|
9
|
+
|
|
10
|
+
- The parent is coordinator-only: it does not edit product code or perform delegated exploration.
|
|
11
|
+
- Never use a worktree. Branch changes are in-place through `workflow_branch_setup` on `feature/*` or `bugfix/*`; never commit on protected branches.
|
|
12
|
+
- Working state, briefs, ledgers, and review diffs live only under gitignored `<SDD_DIR>` in `docs/<slug>/sdd/` and use `workflow_sdd_*` tools.
|
|
13
|
+
- Use native `todowrite` for visible task state as well as the gitignored ledger.
|
|
14
|
+
- 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).
|
|
15
|
+
- 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.
|
|
16
|
+
- On Cursor, for every repository-scoped `workflow_*` call, pass the active Cursor workspace as `workspace_root`; never rely on the MCP process default.
|
|
17
|
+
- Use native `task` with only the built-in `explore` and `general` agents.
|
|
18
|
+
|
|
19
|
+
## Flow gates (HARD)
|
|
20
|
+
|
|
21
|
+
- `wk-implement` refuses to run unless the plan is `approved` (flow.json) and the post-plan menu was presented.
|
|
22
|
+
- `wk-handoff` refuses to run unless both spec and plan are `approved`.
|
|
23
|
+
- 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).
|
|
24
|
+
|
|
25
|
+
## Setup
|
|
26
|
+
|
|
27
|
+
0. Call `workflow_docs_validate` with the linked spec/plan paths. Hard-fail on any error before todos or branch setup.
|
|
28
|
+
1. Call `workflow_sdd_context` with `<PLAN_PATH>` and initialize `todowrite` from returned tasks.
|
|
29
|
+
2. Call `workflow_plan_tasks`; cache each top-level task's `section_text`.
|
|
30
|
+
3. Mark IDs in `completed_task_ids` completed and never redispatch them.
|
|
31
|
+
4. Call `workflow_resolve_branch`, then show the current branch, target branch, and stash behavior before any in-place checkout/setup mutation.
|
|
32
|
+
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.
|
|
33
|
+
6. Call `workflow_branch_setup` with `confirmed: true` only after approval.
|
|
34
|
+
|
|
35
|
+
## Remaining-task loop
|
|
36
|
+
|
|
37
|
+
For each top-level task absent from `completed_task_ids`:
|
|
38
|
+
|
|
39
|
+
1. Mark it `in_progress` with `todowrite`.
|
|
40
|
+
2. Create a working-state brief with `workflow_sdd_task_brief` and `confirmed: true`.
|
|
41
|
+
3. Delegate read-only discovery, when needed, to an `explore` agent. Delegate implementation to a fresh `general` agent. Product changes follow TDD.
|
|
42
|
+
4. Create a working-state diff with `workflow_sdd_review_package` and `confirmed: true`.
|
|
43
|
+
5. Delegate spec-compliance review and code-quality review to separate `general` agents.
|
|
44
|
+
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 to `<SDD_DIR>/advisories.md`.
|
|
45
|
+
7. Append the validated ledger entry with `workflow_sdd_append_progress` and `confirmed: true`; mark the todo completed.
|
|
46
|
+
|
|
47
|
+
## Final gate
|
|
48
|
+
|
|
49
|
+
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.
|
|
50
|
+
|
|
51
|
+
## Task order
|
|
52
|
+
|
|
53
|
+
<TASK_LIST>
|
|
54
|
+
|
|
55
|
+
## Quality gate (HARD)
|
|
56
|
+
|
|
57
|
+
- Specs/plans are written from `templates/spec-template.md` / `templates/plan-template.md`.
|
|
58
|
+
- 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.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{{greetingText}}
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
|
@@ -0,0 +1,21 @@
|
|
|
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.
|
|
@@ -0,0 +1,25 @@
|
|
|
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. 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
|
+
- <project-wide requirements, one line each>
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
### Task N: <Component>
|
|
17
|
+
|
|
18
|
+
- [ ] **Step 1: <action>**
|
|
19
|
+
|
|
20
|
+
<!-- per-task criteria: how this task is verified -->
|
|
21
|
+
**Criteria:** <verifiable check>
|
|
22
|
+
|
|
23
|
+
| Status | Task |
|
|
24
|
+
| --- | --- |
|
|
25
|
+
| pending | N: <Component> |
|
|
@@ -0,0 +1,51 @@
|
|
|
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 (workflow_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 (workflow_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
|
+
- …
|
|
@@ -0,0 +1,70 @@
|
|
|
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.
|
|
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 `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.
|
|
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 `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`.
|
|
41
|
+
|
|
42
|
+
## YouTrack content
|
|
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.
|
|
45
|
+
|
|
46
|
+
## Final self-check
|
|
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.
|
|
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 `workflow_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
|
+
|
|
64
|
+
Never emit Superpowers text beginning “Two execution options”.
|
|
65
|
+
|
|
66
|
+
- Specs/plans must follow `templates/spec-template.md` / `templates/plan-template.md` (mandated diagrams, tables, CA-XX).
|
|
67
|
+
|
|
68
|
+
## Doc delivery
|
|
69
|
+
|
|
70
|
+
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.
|