@brainervirus/workit-cursor 0.6.0 → 0.7.1

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.
Files changed (75) hide show
  1. package/.cursor-plugin/plugin.json +8 -5
  2. package/assets/templates/execution-contract.md +58 -0
  3. package/assets/templates/greeting.md +1 -0
  4. package/assets/templates/headers.md +3 -0
  5. package/assets/templates/hygiene/.editorconfig +8 -0
  6. package/assets/templates/hygiene/.gitattributes +3 -0
  7. package/assets/templates/hygiene/CHANGELOG.md +14 -0
  8. package/assets/templates/hygiene/CONTRIBUTING.md +3 -0
  9. package/assets/templates/hygiene/LICENSE +21 -0
  10. package/assets/templates/hygiene/README.md +3 -0
  11. package/assets/templates/issue-update.md +6 -0
  12. package/assets/templates/plan-template.md +25 -0
  13. package/assets/templates/spec-template.md +51 -0
  14. package/assets/templates/superpowers-doc-contract.md +70 -0
  15. package/dist/cursor-session-start.js +351 -0
  16. package/dist/mcp-server.js +27678 -0
  17. package/hooks/hooks-cursor.json +2 -1
  18. package/hooks/session-start +12 -43
  19. package/marketplace.json +2 -2
  20. package/mcp/run-server.sh +5 -52
  21. package/mcp.json +2 -6
  22. package/package.json +22 -10
  23. package/rules/ask-question-only.mdc +1 -1
  24. package/rules/sdd-docs-path.mdc +2 -2
  25. package/skills/wk-changelog/SKILL.md +1 -1
  26. package/skills/wk-commit/SKILL.md +1 -1
  27. package/skills/wk-docs-refresh/SKILL.md +1 -1
  28. package/skills/wk-handoff/SKILL.md +2 -2
  29. package/skills/wk-implement/SKILL.md +4 -4
  30. package/skills/wk-issue-update/SKILL.md +2 -0
  31. package/skills/wk-pr/SKILL.md +2 -0
  32. package/skills/wk-release-notes/SKILL.md +1 -1
  33. package/skills/wk-verify/SKILL.md +1 -1
  34. package/vendor/superpowers/skills/brainstorming/SKILL.md +159 -0
  35. package/vendor/superpowers/skills/brainstorming/scripts/frame-template.html +213 -0
  36. package/vendor/superpowers/skills/brainstorming/scripts/helper.js +167 -0
  37. package/vendor/superpowers/skills/brainstorming/scripts/server.cjs +723 -0
  38. package/vendor/superpowers/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
  39. package/vendor/superpowers/skills/brainstorming/visual-companion.md +222 -0
  40. package/vendor/superpowers/skills/dispatching-parallel-agents/SKILL.md +185 -0
  41. package/vendor/superpowers/skills/executing-plans/SKILL.md +70 -0
  42. package/vendor/superpowers/skills/finishing-a-development-branch/SKILL.md +241 -0
  43. package/vendor/superpowers/skills/receiving-code-review/SKILL.md +213 -0
  44. package/vendor/superpowers/skills/requesting-code-review/SKILL.md +103 -0
  45. package/vendor/superpowers/skills/requesting-code-review/code-reviewer.md +172 -0
  46. package/vendor/superpowers/skills/subagent-driven-development/SKILL.md +418 -0
  47. package/vendor/superpowers/skills/subagent-driven-development/implementer-prompt.md +139 -0
  48. package/vendor/superpowers/skills/subagent-driven-development/task-reviewer-prompt.md +188 -0
  49. package/vendor/superpowers/skills/systematic-debugging/CREATION-LOG.md +119 -0
  50. package/vendor/superpowers/skills/systematic-debugging/SKILL.md +296 -0
  51. package/vendor/superpowers/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
  52. package/vendor/superpowers/skills/systematic-debugging/condition-based-waiting.md +115 -0
  53. package/vendor/superpowers/skills/systematic-debugging/defense-in-depth.md +122 -0
  54. package/vendor/superpowers/skills/systematic-debugging/root-cause-tracing.md +169 -0
  55. package/vendor/superpowers/skills/systematic-debugging/test-academic.md +14 -0
  56. package/vendor/superpowers/skills/systematic-debugging/test-pressure-1.md +58 -0
  57. package/vendor/superpowers/skills/systematic-debugging/test-pressure-2.md +68 -0
  58. package/vendor/superpowers/skills/systematic-debugging/test-pressure-3.md +69 -0
  59. package/vendor/superpowers/skills/test-driven-development/SKILL.md +371 -0
  60. package/vendor/superpowers/skills/test-driven-development/testing-anti-patterns.md +299 -0
  61. package/vendor/superpowers/skills/using-git-worktrees/SKILL.md +202 -0
  62. package/vendor/superpowers/skills/using-superpowers/SKILL.md +62 -0
  63. package/vendor/superpowers/skills/using-superpowers/references/antigravity-tools.md +23 -0
  64. package/vendor/superpowers/skills/using-superpowers/references/codex-tools.md +39 -0
  65. package/vendor/superpowers/skills/using-superpowers/references/pi-tools.md +16 -0
  66. package/vendor/superpowers/skills/verification-before-completion/SKILL.md +139 -0
  67. package/vendor/superpowers/skills/writing-plans/SKILL.md +174 -0
  68. package/vendor/superpowers/skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
  69. package/vendor/superpowers/skills/writing-skills/SKILL.md +689 -0
  70. package/vendor/superpowers/skills/writing-skills/anthropic-best-practices.md +1150 -0
  71. package/vendor/superpowers/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
  72. package/vendor/superpowers/skills/writing-skills/graphviz-conventions.dot +172 -0
  73. package/vendor/superpowers/skills/writing-skills/persuasion-principles.md +187 -0
  74. package/vendor/superpowers/skills/writing-skills/testing-skills-with-subagents.md +384 -0
  75. package/mcp/server.ts +0 -1193
@@ -3,7 +3,8 @@
3
3
  "hooks": {
4
4
  "sessionStart": [
5
5
  {
6
- "command": "./hooks/session-start"
6
+ "command": "node",
7
+ "args": ["./dist/cursor-session-start.js"]
7
8
  }
8
9
  ]
9
10
  }
@@ -1,53 +1,22 @@
1
1
  #!/usr/bin/env bash
2
- # sessionStart — auto-sync toolkit, then inject Superpowers workflow contract
2
+ # sessionStart — inject Superpowers workflow contract (RL-09: NO network sync).
3
+ # Prefer the self-contained Node bundle (dist/cursor-session-start.js); fall back
4
+ # to the dev TS entry via Bun. Fail-open: a missing runtime must not break start.
3
5
  set -euo pipefail
4
6
 
5
7
  SCRIPT_DIR="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
6
- PLUGIN_DIR="$(CDPATH= cd -- "$SCRIPT_DIR/.." && pwd)"
7
- MARKER="${PLUGIN_DIR}/.workflow-toolkit-root"
8
- SHARE="${HOME}/.local/share/workflow-toolkit"
9
- if [ -n "${WORKFLOW_TOOLKIT_ROOT:-}" ] && [ -d "${WORKFLOW_TOOLKIT_ROOT}/templates" ]; then
10
- REPO_ROOT="$WORKFLOW_TOOLKIT_ROOT"
11
- elif [ -f "$MARKER" ]; then
12
- REPO_ROOT="$(tr -d '\n' <"$MARKER")"
13
- elif [ -d "${SHARE}/packages/workit-core/templates" ]; then
14
- REPO_ROOT="$SHARE/packages/workit-core"
15
- else
16
- # Live monorepo: workit-cursor/hooks → packages/workit-core (workspace sibling)
17
- REPO_ROOT="$(CDPATH= cd -- "$SCRIPT_DIR/../../workit-core" && pwd)"
8
+ if [ -f "$SCRIPT_DIR/../dist/cursor-session-start.js" ] && command -v node >/dev/null 2>&1; then
9
+ exec node "$SCRIPT_DIR/../dist/cursor-session-start.js"
18
10
  fi
19
11
 
20
- # ponytail: best-effort auto-update; never block session start on network
21
- SYNC="${REPO_ROOT}/scripts/sync-runtime.sh"
22
- if [ -x "$SYNC" ]; then
23
- timeout 20s "$SYNC" >/dev/null 2>&1 || true
24
- if [ -f "$MARKER" ]; then
25
- REPO_ROOT="$(tr -d '\n' <"$MARKER")"
26
- elif [ -d "${SHARE}/packages/workit-core/templates" ]; then
27
- REPO_ROOT="$SHARE/packages/workit-core"
28
- fi
12
+ BUN_BIN="${BUN:-}"
13
+ if [ -z "$BUN_BIN" ]; then
14
+ for candidate in "$HOME/.bun/bin/bun" /usr/local/bin/bun /usr/bin/bun; do
15
+ [ -x "$candidate" ] && BUN_BIN="$candidate" && break
16
+ done
29
17
  fi
30
-
31
- CONTRACT="${REPO_ROOT}/templates/superpowers-doc-contract.md"
32
-
33
- if [ ! -f "$CONTRACT" ]; then
18
+ if [ -z "$BUN_BIN" ] || [ ! -x "$BUN_BIN" ]; then
34
19
  printf '{}\n'
35
20
  exit 0
36
21
  fi
37
-
38
- escape_for_json() {
39
- local s="$1"
40
- s="${s//\\/\\\\}"
41
- s="${s//\"/\\\"}"
42
- s="${s//$'\n'/\\n}"
43
- s="${s//$'\r'/\\r}"
44
- s="${s//$'\t'/\\t}"
45
- printf '%s' "$s"
46
- }
47
-
48
- body=$(<"$CONTRACT")
49
- context=$'<workflow-toolkit-askquestion-hard-gate>\nHARD-GATE: Any user choice with options → call Cursor AskQuestion directly with workflow-specific copy. NEVER A/B/C in chat. Overrides Superpowers brainstorming conversational options.\n</workflow-toolkit-askquestion-hard-gate>\n\n<workflow-toolkit-visual-companion>\nHARD-GATE: NEVER offer Superpowers visual companion or open a browser tab. For UI wireframes use workflow_present_ascii; for flows use workflow_present_flow. Overrides Superpowers brainstorming visual companion offer.\n</workflow-toolkit-visual-companion>\n\n<workflow-toolkit-no-worktrees>\nHARD-GATE: NEVER using-git-worktrees or git worktree. In-place feature/* or bugfix/* checkout only via workflow_resolve_branch + workflow_branch_setup. Dirty tree → native AskQuestion before checkout.\n</workflow-toolkit-no-worktrees>\n\n<workflow-toolkit-sdd-path>\nHARD-GATE: NEVER .superpowers/sdd. ALWAYS workflow_sdd_context with plan_path first — creates docs/<slug>/sdd/ even on fresh projects. workflow_sdd_task_brief, workflow_sdd_review_package, workflow_sdd_append_progress only.\n</workflow-toolkit-sdd-path>\n\n<workflow-toolkit-todowrite>\nHARD-GATE: After workflow_sdd_context, call Cursor TodoWrite with returned todos (merge: false). SDD ledger is persistence — TodoWrite is the native task list UI. Keep in_progress/completed in sync each task.\n</workflow-toolkit-todowrite>\n\n<workflow-toolkit-superpowers-doc-contract>\n'"${body}"$'\n</workflow-toolkit-superpowers-doc-contract>\n\n<workflow-toolkit-reminder>\nHARD-GATE: Bounded user choices → call Cursor AskQuestion directly (never A/B/C or 1/2/3 lists in prose). After a plan is approved → AskQuestion menu with: Subagent-driven, Inline, Handoff (new session only), Review spec first, Review plan first. Tools with confirmed → call them; never fabricate results.\nDelivering docs → clickable markdown link (docs/<slug>/spec.md) + 3-5 bullet summary.\n</workflow-toolkit-reminder>'
50
- escaped=$(escape_for_json "$context")
51
-
52
- printf '{\n "additional_context": "%s"\n}\n' "$escaped"
53
- exit 0
22
+ exec "$BUN_BIN" "$SCRIPT_DIR/session-start.ts"
package/marketplace.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "workit",
3
- "displayName": "Workflow Toolkit",
3
+ "displayName": "Workit",
4
4
  "description": "Workflow rails for agentic coding: specs, plans, YouTrack, CI-gated commits",
5
5
  "publisher": "cristhofer-pincetti",
6
- "version": "0.6.0",
6
+ "version": "0.7.1",
7
7
  "homepage": "https://github.com/BrainerVirus/workit",
8
8
  "repository": "https://github.com/BrainerVirus/workit.git",
9
9
  "license": "MIT"
package/mcp/run-server.sh CHANGED
@@ -1,56 +1,9 @@
1
1
  #!/usr/bin/env bash
2
- # Resolve the core package root for Cursor MCP (install copy vs live monorepo).
2
+ # Cursor MCP launcher: prefer the self-contained Node bundle (dist/mcp-server.js);
3
+ # fall back to the dev TS entry via Bun.
3
4
  set -euo pipefail
4
-
5
5
  MCP_DIR="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
6
- # Dev mode: the installed copies (plugin/share) ship without the core package
7
- # (their mcp/ has no package.json, so npm install never installs it). When the
8
- # live monorepo is present, exec its server so @brainervirus/workit-core
9
- # resolves through the workspace symlink at the repo root node_modules.
10
- # Same DEV_DEFAULT convention as sync-runtime.sh.
11
- DEV_DEFAULT="${HOME}/Documents/projects/personal/workflow-toolkit"
12
- DEV="${WORKFLOW_TOOLKIT_DEV:-$DEV_DEFAULT}"
13
- if [ -x "$DEV/packages/workit-cursor/mcp/run-server.sh" ] \
14
- && [ -e "$DEV/node_modules/@brainervirus/workit-core" ] \
15
- && [ "$MCP_DIR" != "$DEV/packages/workit-cursor/mcp" ]; then
16
- exec "$DEV/packages/workit-cursor/mcp/run-server.sh" "$@"
6
+ if [ -f "$MCP_DIR/../dist/mcp-server.js" ] && command -v node >/dev/null 2>&1; then
7
+ exec node "$MCP_DIR/../dist/mcp-server.js" "$@"
17
8
  fi
18
-
19
- PLUGIN_DIR="$(CDPATH= cd -- "$MCP_DIR/.." && pwd)"
20
- MARKER="${PLUGIN_DIR}/.workflow-toolkit-root"
21
- # ponytail: config-stability alias — the installed share keeps the legacy
22
- # workflow-toolkit path (existing installs); "workit" is the package/brand name.
23
- SHARE="${HOME}/.local/share/workflow-toolkit"
24
-
25
- if [ -n "${WORKFLOW_TOOLKIT_ROOT:-}" ] && [ -d "${WORKFLOW_TOOLKIT_ROOT}/scripts" ]; then
26
- ROOT="$WORKFLOW_TOOLKIT_ROOT"
27
- elif [ -f "$MARKER" ]; then
28
- ROOT="$(tr -d '\n' <"$MARKER")"
29
- elif [ -d "${SHARE}/packages/workit-core/scripts" ]; then
30
- ROOT="$SHARE/packages/workit-core"
31
- else
32
- # Live monorepo: workit-cursor/mcp → packages/workit-core (workspace sibling)
33
- ROOT="$(CDPATH= cd -- "$MCP_DIR/../../workit-core" && pwd)"
34
- fi
35
-
36
- export WORKFLOW_TOOLKIT_ROOT="$ROOT"
37
- if [ "${1:-}" != "" ]; then
38
- export WORKFLOW_WORKSPACE_ROOT="$1"
39
- fi
40
-
41
- BUN_BIN="${BUN:-}"
42
- if [ -z "$BUN_BIN" ]; then
43
- for candidate in "$HOME/.bun/bin/bun" /usr/local/bin/bun /usr/bin/bun; do
44
- [ -x "$candidate" ] && BUN_BIN="$candidate" && break
45
- done
46
- fi
47
- if [ -z "$BUN_BIN" ]; then
48
- echo "workit: bun not found (required for MCP server)" >&2
49
- exit 1
50
- fi
51
- # Execute the server next to this script: server.ts imports @brainervirus/workit-core,
52
- # resolved via node_modules (workspace link in the monorepo, npm install in the
53
- # cursor plugin copy). Make the resolved bun visible to child scripts that exec
54
- # bare `bun` (the port wrappers) when it lives outside PATH (e.g. ~/.bun/bin).
55
- export PATH="$(dirname "$BUN_BIN"):$PATH"
56
- exec "$BUN_BIN" "$MCP_DIR/server.ts"
9
+ exec "${BUN:-bun}" "$MCP_DIR/run-server.ts" "$@"
package/mcp.json CHANGED
@@ -1,12 +1,8 @@
1
1
  {
2
2
  "mcpServers": {
3
3
  "workit": {
4
- "command": "bash",
5
- "args": [
6
- "-lc",
7
- "exec \"$HOME/.local/share/workflow-toolkit/packages/workit-core/scripts/run-cursor-mcp.sh\" \"$0\"",
8
- "${workspaceFolder}"
9
- ]
4
+ "command": "node",
5
+ "args": ["./dist/mcp-server.js", "${workspaceFolder}"]
10
6
  }
11
7
  }
12
8
  }
package/package.json CHANGED
@@ -1,36 +1,48 @@
1
1
  {
2
2
  "name": "@brainervirus/workit-cursor",
3
- "version": "0.6.0",
3
+ "version": "0.7.1",
4
4
  "private": false,
5
5
  "description": "Workit Cursor plugin: MCP server, hooks, rules, marketplace manifest (thin over @brainervirus/workit-core)",
6
- "license": "MIT",
7
6
  "keywords": [
7
+ "agent",
8
8
  "cursor",
9
9
  "mcp",
10
- "workflow",
11
- "agent"
10
+ "workflow"
12
11
  ],
13
12
  "bugs": {
14
13
  "url": "https://github.com/BrainerVirus/workit/issues"
15
14
  },
15
+ "license": "MIT",
16
16
  "repository": {
17
17
  "type": "git",
18
18
  "url": "https://github.com/BrainerVirus/workit.git"
19
19
  },
20
20
  "files": [
21
- "mcp/",
22
- "hooks/",
21
+ "dist/",
22
+ "assets/",
23
+ "mcp/run-server.sh",
24
+ "mcp.json",
25
+ "marketplace.json",
26
+ ".cursor-plugin/",
23
27
  "rules/",
24
28
  "skills/",
25
- ".cursor-plugin/",
26
- "mcp.json",
27
- "marketplace.json"
29
+ "vendor/superpowers/skills/",
30
+ "hooks/session-start",
31
+ "hooks/hooks-cursor.json"
28
32
  ],
29
33
  "type": "module",
30
34
  "publishConfig": {
31
35
  "access": "public"
32
36
  },
37
+ "scripts": {
38
+ "build": "bun scripts/build.ts"
39
+ },
33
40
  "dependencies": {
34
- "@brainervirus/workit-core": "^0.4.0"
41
+ "@brainervirus/workit-core": "^0.7.1",
42
+ "@modelcontextprotocol/sdk": "^1.12.0",
43
+ "zod": "^3.24.0"
44
+ },
45
+ "engines": {
46
+ "node": ">=20"
35
47
  }
36
48
  }
@@ -39,7 +39,7 @@ After writing a plan, **do not emit** Superpowers' inline text beginning “Two
39
39
 
40
40
  After `workflow_docs_validate` succeeds on the saved spec/plan pair, call Cursor `AskQuestion` with exactly:
41
41
 
42
- - Subagent-driven → `wk-implement`
42
+ - Subagent-driven → **unsupported on Cursor** (the MCP rejects it as `unsupported_mode`; use OpenCode `wk-implement`)
43
43
  - Inline → execute in this session
44
44
  - Handoff → `/wk-handoff` (new session only)
45
45
  - Review spec first
@@ -10,7 +10,7 @@ alwaysApply: true
10
10
  ## Required
11
11
 
12
12
  1. MCP `workflow_sdd_context` with `plan_path` — **always**, including fresh projects
13
- 2. Use returned `sdd_dir` (`docs/<plan-basename>/sdd/`) for all SDD artifacts
13
+ 2. Use returned `sdd_dir` (`docs/<slug>/sdd/`) for all SDD artifacts
14
14
  3. `workflow_sdd_task_brief`, `workflow_sdd_review_package`, `workflow_sdd_append_progress` — never Superpowers `sdd-workspace` script
15
15
 
16
16
  ## Forbidden
@@ -19,4 +19,4 @@ alwaysApply: true
19
19
  - `cat .superpowers/sdd/progress.md` — missing file there does NOT mean "start fresh"
20
20
  - Superpowers `task-brief` / `review-package` scripts under `.agents/skills/`
21
21
 
22
- Fresh project with no ledger → `workflow_sdd_context` **creates** `docs/<slug>/sdd/progress.md`.
22
+ Fresh project with no ledger → `workflow_sdd_context` creates nothing; `progress.md` appears only on the first confirmed `workflow_sdd_append_progress`.
@@ -11,7 +11,7 @@ Update `CHANGELOG.md` for the current repository.
11
11
 
12
12
  Call MCP tool `workflow_changelog_context` with arguments from the user's message (range, version, paths, etc.).
13
13
 
14
- **Workspace root:** defaults to the Cursor workspace. Pass `workspace_root` when the user names a different repository path.
14
+ **Repository calls:** For every repository-scoped `workflow_*` call, pass the active Cursor workspace as `workspace_root`; never rely on the MCP process default.
15
15
 
16
16
  Use the tool return value as ground truth. Do not read git, run npm, or infer repo state yourself.
17
17
  If the tool errors, report the error and stop.
@@ -10,7 +10,7 @@ disable-model-invocation: true
10
10
 
11
11
  Call MCP tool `workflow_git_context` with arguments from the user's message (paths after `/wk-commit`, etc.).
12
12
 
13
- **Workspace root:** defaults to the Cursor workspace. Pass `workspace_root` when the user names a different repository path.
13
+ **Repository calls:** For every repository-scoped `workflow_*` call, pass the active Cursor workspace as `workspace_root`; never rely on the MCP process default.
14
14
 
15
15
  Use the tool return value as ground truth. Do not read git, run npm, or infer repo state yourself.
16
16
  If the tool errors, report the error and stop.
@@ -11,7 +11,7 @@ Inspect current changes and refresh stale documentation.
11
11
 
12
12
  Call MCP tool `workflow_docs_context` with arguments from the user's message (range, version, paths, etc.).
13
13
 
14
- **Workspace root:** defaults to the Cursor workspace. Pass `workspace_root` when the user names a different repository path.
14
+ **Repository calls:** For every repository-scoped `workflow_*` call, pass the active Cursor workspace as `workspace_root`; never rely on the MCP process default.
15
15
 
16
16
  Use the tool return value as ground truth. Do not read git, run npm, or infer repo state yourself.
17
17
  If the tool errors, report the error and stop.
@@ -12,14 +12,14 @@ Emit a copy-paste prompt for a **new** implementation chat.
12
12
 
13
13
  Call MCP tool `workflow_handoff_prompt` with the **full** user message as `message`.
14
14
 
15
- **Workspace root:** defaults to the Cursor workspace. Pass `workspace_root` when spec/plan paths are relative to a different repository.
15
+ **Repository calls:** For every repository-scoped `workflow_*` call, pass the active Cursor workspace as `workspace_root`; never rely on the MCP process default.
16
16
 
17
17
  **Thread context:** If this thread has a known spec/plan pair (from brainstorming, writing-plans, or open files), append both paths to `message` even when the user only typed `/wk-handoff`. Without explicit paths, the tool picks the **most recently touched** linked pair under `docs/<slug>/` (plan `**Spec:**` link + file mtimes) — not “only one file in the folder.”
18
18
 
19
19
  Use the tool return value as ground truth. Do not read git, run npm, or infer repo state yourself.
20
20
  If the tool errors, report the error and stop.
21
21
 
22
- The pasted prompt includes instructions to call `workflow_sdd_context`, **Cursor TodoWrite** (with returned `todos`), and `workflow_plan_tasks` in Chat B before Task 1. SDD artifacts go to `docs/<plan-basename>/sdd/` — never `.superpowers/sdd`. TodoWrite is required for the native Cursor task list UI (remaining/completed); the SDD ledger is persistence only. The fenced `prompt` does not contain `section_text`. **Branch** is resolved automatically in the prompt (from spec/plan or derived as `feature/*` / `bugfix/*`). **No worktrees** — Chat B uses `workflow_resolve_branch` + `workflow_branch_setup` in-place. Commits use workit **/wk-commit** skill — no separate commit-policy field.
22
+ The pasted prompt includes instructions to call `workflow_sdd_context`, **Cursor TodoWrite** (with returned `todos`), and `workflow_plan_tasks` in Chat B before Task 1. SDD artifacts go to `docs/<slug>/sdd/` — never `.superpowers/sdd`. TodoWrite is required for the native Cursor task list UI (remaining/completed); the SDD ledger is persistence only. The fenced `prompt` does not contain `section_text`. **Branch** is resolved automatically in the prompt (from spec/plan or derived as `feature/*` / `bugfix/*`). **No worktrees** — Chat B uses `workflow_resolve_branch` + `workflow_branch_setup` in-place. Commits use workit **/wk-commit** skill — no separate commit-policy field.
23
23
 
24
24
  `workflow_handoff_prompt` also returns `tasks[]`, `branch`, `sdd_dir`, `completed_task_ids`, and `todos` for same-session MCP use — not copy-paste transport.
25
25
 
@@ -1,18 +1,18 @@
1
1
  ---
2
2
  name: wk-implement
3
- description: Execute a Superpowers plan as SDD coordinator with subagent-per-task and mandatory review loops. Use for /wk-implement or "implement from plan using subagent-driven-development".
3
+ description: Execute an approved Superpowers plan on Cursor as the coordinator session (inline only). subagent-driven is unsupported on Cursor and the MCP rejects that menu choice. Use for /wk-implement or "implement from plan".
4
4
  disable-model-invocation: true
5
5
  ---
6
6
 
7
7
  # Implement
8
8
 
9
- Execute a plan as **coordinator only** (subagent-driven-development). Do not edit product code in this thread.
9
+ Execute the plan **inline in this coordinator session**. subagent-driven execution is unsupported on Cursor: the MCP rejects the subagent-driven menu choice (`unsupported_mode`) Cursor has no child sessions. Plan-level edits stay coordinator-gated.
10
10
 
11
11
  ## Step 1 — Gather facts (required)
12
12
 
13
13
  Call MCP tool `workflow_plan_tasks` with `plan_path` from the user's message and `spec_path` when known.
14
14
 
15
- **Workspace root:** defaults to the Cursor workspace. Pass `workspace_root` when plan/spec paths are relative to a different repository.
15
+ **Repository calls:** For every repository-scoped `workflow_*` call, pass the active Cursor workspace as `workspace_root`; never rely on the MCP process default.
16
16
 
17
17
  Use the returned `tasks[]` as ground truth. Cache each `section_text` for subagent prompts. Do not read the plan file for task text.
18
18
 
@@ -24,7 +24,7 @@ Load `templates/execution-contract.md`. Substitute `<SPEC_PATH>`, `<PLAN_PATH>`,
24
24
 
25
25
  ## Step 3 — Follow contract
26
26
 
27
- Announce: "Using implement + subagent-driven-development."
27
+ Announce: "Using implement + inline."
28
28
 
29
29
  **Before Task 1 — validate + SDD + TodoWrite UI + branch (no worktrees):**
30
30
 
@@ -14,6 +14,8 @@ Post a Spanish comment and log time on a **task** issue (not the meeting issue).
14
14
 
15
15
  **Audience:** @Alejandra.Flores — not a developer. Clarify technical terms in plain language when they appear.
16
16
 
17
+ **Repository calls:** For every repository-scoped `workflow_*` call, pass the active Cursor workspace as `workspace_root`; never rely on the MCP process default.
18
+
17
19
  ## Step 0 — Toolkit ready
18
20
 
19
21
  If unsure, call `workflow_toolkit_status`. Stop if `ready: false`.
@@ -15,6 +15,8 @@ Draft a merge request / pull request body, or create it on GitLab (`glab`) / Git
15
15
 
16
16
  Call MCP `workflow_pr_context` with **no `range` argument** unless the user supplied an explicit git range string.
17
17
 
18
+ **Repository calls:** For every repository-scoped `workflow_*` call, pass the active Cursor workspace as `workspace_root`; never rely on the MCP process default.
19
+
18
20
  On `feature/*` or `bugfix/*`, the tool compares **only against `develop`** (never `main`).
19
21
 
20
22
  Use the tool return as ground truth. Pay attention to:
@@ -13,7 +13,7 @@ If the user did not provide an exact tag, version, or commit range, ask for it b
13
13
 
14
14
  Call MCP tool `workflow_release_notes_context` with arguments from the user's message (range, version, paths, etc.).
15
15
 
16
- **Workspace root:** defaults to the Cursor workspace. Pass `workspace_root` when the user names a different repository path.
16
+ **Repository calls:** For every repository-scoped `workflow_*` call, pass the active Cursor workspace as `workspace_root`; never rely on the MCP process default.
17
17
 
18
18
  Use the tool return value as ground truth. Do not read git, run npm, or infer repo state yourself.
19
19
  If the tool errors, report the error and stop.
@@ -12,7 +12,7 @@ Run the repository's validation checks and report exact results.
12
12
 
13
13
  Call MCP tool `workflow_verify` with arguments from the user's message (range, version, paths, etc.).
14
14
 
15
- **Workspace root:** defaults to the Cursor workspace. Pass `workspace_root` when the user names a different repository path.
15
+ **Repository calls:** For every repository-scoped `workflow_*` call, pass the active Cursor workspace as `workspace_root`; never rely on the MCP process default.
16
16
 
17
17
  Use the tool return value as ground truth. Do not read git, run npm, or infer repo state yourself.
18
18
  If the tool errors, report the error and stop.
@@ -0,0 +1,159 @@
1
+ ---
2
+ name: brainstorming
3
+ description: "You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation."
4
+ ---
5
+
6
+ # Brainstorming Ideas Into Designs
7
+
8
+ Help turn ideas into fully formed designs and specs through natural collaborative dialogue.
9
+
10
+ Start by understanding the current project context, then ask questions one at a time to refine the idea. Once you understand what you're building, present the design and get user approval.
11
+
12
+ <HARD-GATE>
13
+ Do NOT invoke any implementation skill, write any code, scaffold any project, or take any implementation action until you have presented a design and the user has approved it. This applies to EVERY project regardless of perceived simplicity.
14
+ </HARD-GATE>
15
+
16
+ ## Anti-Pattern: "This Is Too Simple To Need A Design"
17
+
18
+ Every project goes through this process. A todo list, a single-function utility, a config change — all of them. "Simple" projects are where unexamined assumptions cause the most wasted work. The design can be short (a few sentences for truly simple projects), but you MUST present it and get approval.
19
+
20
+ ## Checklist
21
+
22
+ You MUST create a task for each of these items and complete them in order:
23
+
24
+ 1. **Explore project context** — check files, docs, recent commits
25
+ 2. **Offer the visual companion just-in-time** — NOT upfront. The first time a question would genuinely be clearer shown than described, offer it then (its own message); on approval its browser tab opens for you. If no visual question ever arises, never offer it. See the Visual Companion section below.
26
+ 3. **Ask clarifying questions** — one at a time, understand purpose/constraints/success criteria
27
+ 4. **Propose 2-3 approaches** — with trade-offs and your recommendation
28
+ 5. **Present design** — in sections scaled to their complexity, get user approval after each section
29
+ 6. **Write design doc** — save to `docs/<slug>/spec.md` and commit
30
+ 7. **Spec self-review** — quick inline check for placeholders, contradictions, ambiguity, scope (see below)
31
+ 8. **User reviews written spec** — ask user to review the spec file before proceeding
32
+ 9. **Transition to implementation** — invoke writing-plans skill to create implementation plan
33
+
34
+ ## Process Flow
35
+
36
+ ```dot
37
+ digraph brainstorming {
38
+ "Explore project context" [shape=box];
39
+ "Ask clarifying questions" [shape=box];
40
+ "Propose 2-3 approaches" [shape=box];
41
+ "Present design sections" [shape=box];
42
+ "User approves design?" [shape=diamond];
43
+ "Write design doc" [shape=box];
44
+ "Spec self-review\n(fix inline)" [shape=box];
45
+ "User reviews spec?" [shape=diamond];
46
+ "Invoke writing-plans skill" [shape=doublecircle];
47
+
48
+ "Explore project context" -> "Ask clarifying questions";
49
+ "Ask clarifying questions" -> "Propose 2-3 approaches";
50
+ "Propose 2-3 approaches" -> "Present design sections";
51
+ "Present design sections" -> "User approves design?";
52
+ "User approves design?" -> "Present design sections" [label="no, revise"];
53
+ "User approves design?" -> "Write design doc" [label="yes"];
54
+ "Write design doc" -> "Spec self-review\n(fix inline)";
55
+ "Spec self-review\n(fix inline)" -> "User reviews spec?";
56
+ "User reviews spec?" -> "Write design doc" [label="changes requested"];
57
+ "User reviews spec?" -> "Invoke writing-plans skill" [label="approved"];
58
+ }
59
+ ```
60
+
61
+ **The terminal state is invoking writing-plans.** Do NOT invoke frontend-design, mcp-builder, or any other implementation skill. The ONLY skill you invoke after brainstorming is writing-plans.
62
+
63
+ ## The Process
64
+
65
+ **Understanding the idea:**
66
+
67
+ - Check out the current project state first (files, docs, recent commits)
68
+ - Before asking detailed questions, assess scope: if the request describes multiple independent subsystems (e.g., "build a platform with chat, file storage, billing, and analytics"), flag this immediately. Don't spend questions refining details of a project that needs to be decomposed first.
69
+ - If the project is too large for a single spec, help the user decompose into sub-projects: what are the independent pieces, how do they relate, what order should they be built? Then brainstorm the first sub-project through the normal design flow. Each sub-project gets its own spec → plan → implementation cycle.
70
+ - For appropriately-scoped projects, ask questions one at a time to refine the idea
71
+ - Prefer multiple choice questions when possible, but open-ended is fine too
72
+ - Only one question per message - if a topic needs more exploration, break it into multiple questions
73
+ - Focus on understanding: purpose, constraints, success criteria
74
+
75
+ **Exploring approaches:**
76
+
77
+ - Propose 2-3 different approaches with trade-offs
78
+ - Present options conversationally with your recommendation and reasoning
79
+ - Lead with your recommended option and explain why
80
+
81
+ **Presenting the design:**
82
+
83
+ - Once you believe you understand what you're building, present the design
84
+ - Scale each section to its complexity: a few sentences if straightforward, up to 200-300 words if nuanced
85
+ - Ask after each section whether it looks right so far
86
+ - Cover: architecture, components, data flow, error handling, testing
87
+ - Be ready to go back and clarify if something doesn't make sense
88
+
89
+ **Design for isolation and clarity:**
90
+
91
+ - Break the system into smaller units that each have one clear purpose, communicate through well-defined interfaces, and can be understood and tested independently
92
+ - For each unit, you should be able to answer: what does it do, how do you use it, and what does it depend on?
93
+ - Can someone understand what a unit does without reading its internals? Can you change the internals without breaking consumers? If not, the boundaries need work.
94
+ - Smaller, well-bounded units are also easier for you to work with - you reason better about code you can hold in context at once, and your edits are more reliable when files are focused. When a file grows large, that's often a signal that it's doing too much.
95
+
96
+ **Working in existing codebases:**
97
+
98
+ - Explore the current structure before proposing changes. Follow existing patterns.
99
+ - Where existing code has problems that affect the work (e.g., a file that's grown too large, unclear boundaries, tangled responsibilities), include targeted improvements as part of the design - the way a good developer improves code they're working in.
100
+ - Don't propose unrelated refactoring. Stay focused on what serves the current goal.
101
+
102
+ ## After the Design
103
+
104
+ **Documentation:**
105
+
106
+ - Write the validated design (spec) to `docs/<slug>/spec.md`
107
+ - (User preferences for spec location override this default)
108
+ - Use elements-of-style:writing-clearly-and-concisely skill if available
109
+ - Commit the design document to git
110
+
111
+ **Spec Self-Review:**
112
+ After writing the spec document, look at it with fresh eyes:
113
+
114
+ 1. **Placeholder scan:** Any "TBD", "TODO", incomplete sections, or vague requirements? Fix them.
115
+ 2. **Internal consistency:** Do any sections contradict each other? Does the architecture match the feature descriptions?
116
+ 3. **Scope check:** Is this focused enough for a single implementation plan, or does it need decomposition?
117
+ 4. **Ambiguity check:** Could any requirement be interpreted two different ways? If so, pick one and make it explicit.
118
+
119
+ Fix any issues inline. No need to re-review — just fix and move on.
120
+
121
+ **User Review Gate:**
122
+ After the spec review loop passes, ask the user to review the written spec before proceeding:
123
+
124
+ > "Spec written and committed to `<path>`. Please review it and let me know if you want to make any changes before we start writing out the implementation plan."
125
+
126
+ Wait for the user's response. If they request changes, make them and re-run the spec review loop. Only proceed once the user approves.
127
+
128
+ **Implementation:**
129
+
130
+ - Invoke the writing-plans skill to create a detailed implementation plan
131
+ - Do NOT invoke any other skill. writing-plans is the next step.
132
+
133
+ ## Key Principles
134
+
135
+ - **One question at a time** - Don't overwhelm with multiple questions
136
+ - **Multiple choice preferred** - Easier to answer than open-ended when possible
137
+ - **YAGNI ruthlessly** - Remove unnecessary features from all designs
138
+ - **Explore alternatives** - Always propose 2-3 approaches before settling
139
+ - **Incremental validation** - Present design, get approval before moving on
140
+ - **Be flexible** - Go back and clarify when something doesn't make sense
141
+
142
+ ## Visual Companion
143
+
144
+ A browser-based companion for showing mockups, diagrams, and visual options during brainstorming. Available as a tool — not a mode. Accepting the companion means it's available for questions that benefit from visual treatment; it does NOT mean every question goes through the browser.
145
+
146
+ **Offering the companion (just-in-time):** Do NOT offer it upfront. Wait until a question would genuinely be clearer shown than told — a real mockup / layout / diagram question, not merely a UI *topic*. The first time that happens, offer it then, as its own message:
147
+ > "This next part might be easier if I show you — I can put together mockups, diagrams, and comparisons in a browser tab as we go. It's still new and can be token-intensive. Want me to? I'll open it for you."
148
+
149
+ **This offer MUST be its own message.** Only the offer — no clarifying question, summary, or other content. Wait for the user's response. If they accept, start the server with `--open` so their browser opens to the first screen automatically. If they decline, continue text-only and don't offer again unless they raise it.
150
+
151
+ **Per-question decision:** Even after the user accepts, decide FOR EACH QUESTION whether to use the browser or the terminal. The test: **would the user understand this better by seeing it than reading it?**
152
+
153
+ - **Use the browser** for content that IS visual — mockups, wireframes, layout comparisons, architecture diagrams, side-by-side visual designs
154
+ - **Use the terminal** for content that is text — requirements questions, conceptual choices, tradeoff lists, A/B/C/D text options, scope decisions
155
+
156
+ A question about a UI topic is not automatically a visual question. "What does personality mean in this context?" is a conceptual question — use the terminal. "Which wizard layout works better?" is a visual question — use the browser.
157
+
158
+ If they agree to the companion, read the detailed guide before proceeding:
159
+ `skills/brainstorming/visual-companion.md`