@workit-dev/cursor 0.0.0-stage → 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.
Files changed (58) hide show
  1. package/.cursor-plugin/plugin.json +38 -0
  2. package/README.md +57 -2
  3. package/assets/logo.svg +4 -0
  4. package/assets/templates/workit-contract.md +13 -0
  5. package/commands/wk-architecture.md +5 -0
  6. package/commands/wk-bdd.md +5 -0
  7. package/commands/wk-continue.md +5 -0
  8. package/commands/wk-debug.md +5 -0
  9. package/commands/wk-deslop.md +5 -0
  10. package/commands/wk-fanout.md +5 -0
  11. package/commands/wk-implement.md +5 -0
  12. package/commands/wk-retro.md +5 -0
  13. package/commands/wk-review.md +5 -0
  14. package/commands/wk-shape.md +5 -0
  15. package/commands/wk-ship.md +5 -0
  16. package/commands/wk-test-audit.md +5 -0
  17. package/commands/wk-verify-app.md +5 -0
  18. package/dist/cursor-session-start.js +27182 -0
  19. package/dist/mcp-server.js +30655 -0
  20. package/dist/workit-hook.js +24510 -0
  21. package/hooks/hooks-cursor.json +48 -0
  22. package/hooks/launch-runtime.mjs +276 -0
  23. package/hooks/launch.mjs +137 -0
  24. package/hooks/node-resolve.mjs +249 -0
  25. package/hooks/workit-paths.mjs +242 -0
  26. package/mcp.json +8 -0
  27. package/package.json +56 -4
  28. package/rules/workit-contract.mdc +38 -0
  29. package/skills/workit-architecture/SKILL.md +72 -0
  30. package/skills/workit-architecture/agents/openai.yaml +3 -0
  31. package/skills/workit-architecture/references/instruction-files.md +52 -0
  32. package/skills/workit-architecture/references/vocabulary.md +53 -0
  33. package/skills/workit-bdd/SKILL.md +53 -0
  34. package/skills/workit-continue/SKILL.md +54 -0
  35. package/skills/workit-debug/SKILL.md +45 -0
  36. package/skills/workit-deslop/SKILL.md +58 -0
  37. package/skills/workit-fanout/SKILL.md +71 -0
  38. package/skills/workit-fanout/references/brief.md +141 -0
  39. package/skills/workit-fanout/references/orchestration.md +169 -0
  40. package/skills/workit-implement/SKILL.md +71 -0
  41. package/skills/workit-retro/SKILL.md +72 -0
  42. package/skills/workit-retro/agents/openai.yaml +3 -0
  43. package/skills/workit-retro/references/sources.md +35 -0
  44. package/skills/workit-retro/references/steering.md +39 -0
  45. package/skills/workit-review/SKILL.md +66 -0
  46. package/skills/workit-review/references/impact.md +24 -0
  47. package/skills/workit-shape/SKILL.md +71 -0
  48. package/skills/workit-shape/references/diagrams.md +17 -0
  49. package/skills/workit-shape/references/knowledge.md +61 -0
  50. package/skills/workit-shape/references/mockups.md +15 -0
  51. package/skills/workit-shape/references/slicing.md +44 -0
  52. package/skills/workit-ship/SKILL.md +71 -0
  53. package/skills/workit-ship/references/changelog.md +44 -0
  54. package/skills/workit-ship/references/pr-body.md +32 -0
  55. package/skills/workit-ship/references/release.md +39 -0
  56. package/skills/workit-test-audit/SKILL.md +54 -0
  57. package/skills/workit-verify-app/SKILL.md +68 -0
  58. package/skills/workit-verify-app/references/template.md +51 -0
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "workit",
3
+ "displayName": "Workit",
4
+ "description": "Adaptive Workit workflow with shared MCP tools and native Cursor hooks",
5
+ "version": "1.0.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": "skills/",
32
+ "commands": "commands/",
33
+ "rules": [
34
+ "rules/workit-contract.mdc"
35
+ ],
36
+ "mcpServers": "mcp.json",
37
+ "hooks": "hooks/hooks-cursor.json"
38
+ }
package/README.md CHANGED
@@ -1,3 +1,58 @@
1
- # Temporary Holding Version
1
+ # @workit-dev/cursor
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ [![CI](https://github.com/BrainerVirus/workit/actions/workflows/ci.yml/badge.svg)](https://github.com/BrainerVirus/workit/actions/workflows/ci.yml)
4
+ [![npm](https://img.shields.io/npm/v/@workit-dev/cursor.svg)](https://www.npmjs.com/package/@workit-dev/cursor)
5
+ [![license: MIT](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/BrainerVirus/workit/blob/main/LICENSE)
6
+
7
+ [Workit](https://github.com/BrainerVirus/workit) for Cursor: the shared MCP server, one native hook
8
+ dispatcher, the `workit-contract` rule, the thirteen method skills and `/wk-*`
9
+ commands. Requires Node.js 24+ and network access on first run.
10
+
11
+ ## Install
12
+
13
+ ```bash
14
+ npx @workit-dev/cli init # select Cursor
15
+ ```
16
+
17
+ The wizard copies the plugin into `~/.cursor/plugins/local/workit` (a real
18
+ directory) and registers the MCP server and hooks. Manual MCP config and host
19
+ limits: [hosts guide](https://github.com/BrainerVirus/workit/blob/main/docs/guides/hosts.md#cursor).
20
+ Update with `workit upgrade` (it reinstalls missing plugin files); uninstall with `workit uninstall`.
21
+
22
+ ## Runtime
23
+
24
+ The MCP server runs through
25
+ `npx -y --prefer-online --min-release-age=0 --package=@workit-dev/cursor@latest …`,
26
+ so manifests carry no repository-relative `dist` paths (the age override works
27
+ around npm/cli#9765). MCP is read-only for unattested callers; mutations run
28
+ through the `workit` CLI.
29
+
30
+ Hooks run through `node "${CURSOR_PLUGIN_ROOT}/hooks/launch.mjs" <bin>`, which
31
+ picks the plugin's bundled `dist/` hook, else a global `workit-cursor-hook` on
32
+ `PATH`, else `npx -y --prefer-offline` pinned to the plugin's own version. It
33
+ never resolves `@latest` at hook time. Hooks are registered with
34
+ `failClosed: false` and the launcher fails open: offline, a crash or a timeout
35
+ lets the action through with a `[workit] Cursor hook unavailable` line on
36
+ stderr, while the hook's own denials (exit 2) still block. A window with no
37
+ folder open, or a payload without a conversation id, is allowed with a note.
38
+ A local install (`workit init`, `install-cursor-plugin.sh`) writes the
39
+ launcher's absolute path into every event, so only a Marketplace install
40
+ relies on Cursor expanding `${CURSOR_PLUGIN_ROOT}`. On Windows the npx and
41
+ global-bin fallbacks run their `.cmd` shims through `cmd.exe`.
42
+ `workit doctor` reports the launcher mode (`local` with the runtime's version,
43
+ `npx-pinned`, `missing` or `stale`) and the latency of one no-op hook. It
44
+ also warns when Cursor started the Workit MCP server but no hook has run
45
+ since: the launcher stamps `cursor-hook-last-run` and the MCP server stamps
46
+ `cursor-session-last-start` in Workit's state directory.
47
+ The `preToolUse` hook applies the [before-write gate](https://github.com/BrainerVirus/workit/blob/main/docs/guides/verification.md)
48
+ to write tools while the branch task has an open product choice or needs a
49
+ plan.
50
+
51
+ ## Marketplace
52
+
53
+ The repository root carries `.cursor-plugin/marketplace.json` indexing this
54
+ package. Cursor installs Marketplace plugins from git without building, so
55
+ `skills/`, `commands/`, `rules/` and assets are committed; regenerate skills
56
+ with `bun packages/workit-cursor/scripts/build.ts --skills-only`.
57
+ `bun run validate:cursor-marketplace` checks the artifact against the pinned
58
+ Cursor schemas. The plugin is submission-ready but not published there.
@@ -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,13 @@
1
+ # Workit contract
2
+
3
+ Workit keeps one accountable lead and one shared task state. Inspect current
4
+ task state before acting; use only the shared operations for task, policy,
5
+ evidence, finding, decision, worker, and state changes. Authority is
6
+ bounded by the requested scope, current revision, caller/session provenance, and
7
+ observed capabilities; delivery is bounded by the workspace autonomy grants
8
+ (`workit grant show`). Never claim host enforcement or evidence that the host
9
+ cannot provide. Preserve unresolved requirements, gaps, and uncertain workers.
10
+
11
+ Focused methods are loaded only when the resolved policy requires them. A method
12
+ must call the shared operations and must not create a second lifecycle, approval
13
+ chain, or task-state representation.
@@ -0,0 +1,5 @@
1
+ # /wk-architecture
2
+
3
+ Load and apply the bundled `workit-architecture` skill. Rank cited deepening refactors from churn and ledger friction; never applied unapproved. Use for architecture.
4
+
5
+ Extra context: $ARGUMENTS
@@ -0,0 +1,5 @@
1
+ # /wk-bdd
2
+
3
+ Load and apply the bundled `workit-bdd` skill. Turn requirements into Given/When/Then scenarios, agree the test seam, and work test-first in vertical RED/GREEN slices. Use for BDD, TDD, acceptance criteria, scenarios, Given/When/Then, write a test first.
4
+
5
+ Extra context: $ARGUMENTS
@@ -0,0 +1,5 @@
1
+ # /wk-continue
2
+
3
+ Load and apply the bundled `workit-continue` skill. Keep work on track across interruptions and sessions - sort new input, checkpoint, hand off with a resume brief, and pick up by verifying inherited claims. Use for resume, pick up, handoff, new session, interruption, change of direction.
4
+
5
+ Extra context: $ARGUMENTS
@@ -0,0 +1,5 @@
1
+ # /wk-debug
2
+
3
+ Load and apply the bundled `workit-debug` skill. Find a root cause before patching - start from a red-capable deterministic repro, rank hypotheses, bisect regressions, fix at the root with a regression test. Use for bug, broken, failing, flaky, regression, error, why does.
4
+
5
+ Extra context: $ARGUMENTS
@@ -0,0 +1,5 @@
1
+ # /wk-deslop
2
+
3
+ Load and apply the bundled `workit-deslop` skill. Remove AI slop before a PR - dead code, comments that restate the code, filler prose - with a minimal diff and identical behavior. Use for deslop, clean up, slop, tidy before PR, remove dead code, trim the PR body.
4
+
5
+ Extra context: $ARGUMENTS
@@ -0,0 +1,5 @@
1
+ # /wk-fanout
2
+
3
+ Load and apply the bundled `workit-fanout` skill. Run independent slices in parallel - one worker per isolated worktree with a fixed brief and file-scope manifest, a non-author verifier per slice, results in the ledger. Use for fan out, parallelize, parallel agents, split the work, delegate, swarm.
4
+
5
+ Extra context: $ARGUMENTS
@@ -0,0 +1,5 @@
1
+ # /wk-implement
2
+
3
+ Load and apply the bundled `workit-implement` skill. Build a requested change in small verified steps - follow local patterns, run real checks with workit check, prove it on the running app, hand verification to a non-author. Use for implement, build, add a feature, make the change, code it.
4
+
5
+ Extra context: $ARGUMENTS
@@ -0,0 +1,5 @@
1
+ # /wk-retro
2
+
3
+ Load and apply the bundled `workit-retro` skill. Find repeated friction in recent sessions; propose cited fixes ranked by enforcer strength, never applied. Use for retro.
4
+
5
+ Extra context: $ARGUMENTS
@@ -0,0 +1,5 @@
1
+ # /wk-review
2
+
3
+ Load and apply the bundled `workit-review` skill. Independent review of a diff, branch or PR - intent fidelity and standards as separate axes, test quality, blast radius - recorded as a non-author verdict. Use for review, code review, check this PR or MR, is this safe, blast radius.
4
+
5
+ Extra context: $ARGUMENTS
@@ -0,0 +1,5 @@
1
+ # /wk-shape
2
+
3
+ Load and apply the bundled `workit-shape` skill. Shape work before building - brainstorm, grill open choices with a recommended answer, challenge weak premises, slice into PRs, propose a spec/ADR only when it pays. Use for brainstorm, plan, spec, design, options, should we, grill me.
4
+
5
+ Extra context: $ARGUMENTS
@@ -0,0 +1,5 @@
1
+ # /wk-ship
2
+
3
+ Load and apply the bundled `workit-ship` skill. Drive pushed work to its endpoint - open or stack PRs, fix red CI, answer PR threads, land verified PRs when granted. Use for ship, open a PR, babysit, CI failing, checks red, address comments, stack, merge, land.
4
+
5
+ Extra context: $ARGUMENTS
@@ -0,0 +1,5 @@
1
+ # /wk-test-audit
2
+
3
+ Load and apply the bundled `workit-test-audit` skill. Find tautological, low-value or noisy tests and replace them with ones that catch real breaks. Use before trusting a green suite, for agent-written tests, test audit, tautology, weak tests, prune or strengthen tests.
4
+
5
+ Extra context: $ARGUMENTS
@@ -0,0 +1,5 @@
1
+ # /wk-verify-app
2
+
3
+ Load and apply the bundled `workit-verify-app` skill. Generate or maintain the project's own verify-<app> skill that launches, drives and observes the real app (CLI, web, API) so agents prove features work. Use for verify the app, run it, smoke test, prove it works, set up verification.
4
+
5
+ Extra context: $ARGUMENTS