specweave 0.6.7 → 0.7.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 (281) hide show
  1. package/.claude-plugin/README.md +1 -1
  2. package/CLAUDE.md +920 -107
  3. package/README.md +143 -207
  4. package/bin/specweave.js +67 -0
  5. package/dist/adapters/adapter-interface.d.ts +11 -11
  6. package/dist/adapters/adapter-interface.d.ts.map +1 -1
  7. package/dist/adapters/adapter-interface.js +1 -1
  8. package/dist/adapters/adapter-loader.d.ts +1 -2
  9. package/dist/adapters/adapter-loader.d.ts.map +1 -1
  10. package/dist/adapters/adapter-loader.js +3 -6
  11. package/dist/adapters/adapter-loader.js.map +1 -1
  12. package/dist/adapters/agents-md-generator.d.ts +3 -3
  13. package/dist/adapters/agents-md-generator.js +3 -3
  14. package/dist/adapters/generic/adapter.d.ts +2 -2
  15. package/dist/adapters/generic/adapter.d.ts.map +1 -1
  16. package/dist/adapters/generic/adapter.js +28 -9
  17. package/dist/adapters/generic/adapter.js.map +1 -1
  18. package/dist/cli/commands/abandon.d.ts +13 -0
  19. package/dist/cli/commands/abandon.d.ts.map +1 -0
  20. package/dist/cli/commands/abandon.js +15 -0
  21. package/dist/cli/commands/abandon.js.map +1 -0
  22. package/dist/cli/commands/init.d.ts.map +1 -1
  23. package/dist/cli/commands/init.js +141 -40
  24. package/dist/cli/commands/init.js.map +1 -1
  25. package/dist/cli/commands/pause.d.ts +13 -0
  26. package/dist/cli/commands/pause.d.ts.map +1 -0
  27. package/dist/cli/commands/pause.js +15 -0
  28. package/dist/cli/commands/pause.js.map +1 -0
  29. package/dist/cli/commands/qa.d.ts +54 -0
  30. package/dist/cli/commands/qa.d.ts.map +1 -0
  31. package/dist/cli/commands/qa.js +98 -0
  32. package/dist/cli/commands/qa.js.map +1 -0
  33. package/dist/cli/commands/resume.d.ts +12 -0
  34. package/dist/cli/commands/resume.d.ts.map +1 -0
  35. package/dist/cli/commands/resume.js +14 -0
  36. package/dist/cli/commands/resume.js.map +1 -0
  37. package/dist/cli/commands/status.d.ts +12 -0
  38. package/dist/cli/commands/status.d.ts.map +1 -0
  39. package/dist/cli/commands/status.js +23 -0
  40. package/dist/cli/commands/status.js.map +1 -0
  41. package/dist/cli/helpers/issue-tracker/ado.d.ts +57 -0
  42. package/dist/cli/helpers/issue-tracker/ado.d.ts.map +1 -0
  43. package/dist/cli/helpers/issue-tracker/ado.js +223 -0
  44. package/dist/cli/helpers/issue-tracker/ado.js.map +1 -0
  45. package/dist/cli/helpers/issue-tracker/github.d.ts +65 -0
  46. package/dist/cli/helpers/issue-tracker/github.d.ts.map +1 -0
  47. package/dist/cli/helpers/issue-tracker/github.js +284 -0
  48. package/dist/cli/helpers/issue-tracker/github.js.map +1 -0
  49. package/dist/cli/helpers/issue-tracker/index.d.ts +22 -0
  50. package/dist/cli/helpers/issue-tracker/index.d.ts.map +1 -0
  51. package/dist/cli/helpers/issue-tracker/index.js +270 -0
  52. package/dist/cli/helpers/issue-tracker/index.js.map +1 -0
  53. package/dist/cli/helpers/issue-tracker/jira.d.ts +61 -0
  54. package/dist/cli/helpers/issue-tracker/jira.d.ts.map +1 -0
  55. package/dist/cli/helpers/issue-tracker/jira.js +265 -0
  56. package/dist/cli/helpers/issue-tracker/jira.js.map +1 -0
  57. package/dist/cli/helpers/issue-tracker/types.d.ts +86 -0
  58. package/dist/cli/helpers/issue-tracker/types.d.ts.map +1 -0
  59. package/dist/cli/helpers/issue-tracker/types.js +16 -0
  60. package/dist/cli/helpers/issue-tracker/types.js.map +1 -0
  61. package/dist/cli/helpers/issue-tracker/utils.d.ts +103 -0
  62. package/dist/cli/helpers/issue-tracker/utils.d.ts.map +1 -0
  63. package/dist/cli/helpers/issue-tracker/utils.js +240 -0
  64. package/dist/cli/helpers/issue-tracker/utils.js.map +1 -0
  65. package/dist/core/increment/limits.d.ts +68 -0
  66. package/dist/core/increment/limits.d.ts.map +1 -0
  67. package/dist/core/increment/limits.js +224 -0
  68. package/dist/core/increment/limits.js.map +1 -0
  69. package/dist/core/increment/metadata-manager.d.ts +114 -0
  70. package/dist/core/increment/metadata-manager.d.ts.map +1 -0
  71. package/dist/core/increment/metadata-manager.js +320 -0
  72. package/dist/core/increment/metadata-manager.js.map +1 -0
  73. package/dist/core/increment/status-commands.d.ts +43 -0
  74. package/dist/core/increment/status-commands.d.ts.map +1 -0
  75. package/dist/core/increment/status-commands.js +277 -0
  76. package/dist/core/increment/status-commands.js.map +1 -0
  77. package/dist/core/plugin-detector.d.ts +1 -0
  78. package/dist/core/plugin-detector.d.ts.map +1 -1
  79. package/dist/core/plugin-detector.js +25 -0
  80. package/dist/core/plugin-detector.js.map +1 -1
  81. package/dist/core/qa/qa-runner.d.ts +16 -0
  82. package/dist/core/qa/qa-runner.d.ts.map +1 -0
  83. package/dist/core/qa/qa-runner.js +404 -0
  84. package/dist/core/qa/qa-runner.js.map +1 -0
  85. package/dist/core/qa/quality-gate-decider.d.ts +53 -0
  86. package/dist/core/qa/quality-gate-decider.d.ts.map +1 -0
  87. package/dist/core/qa/quality-gate-decider.js +268 -0
  88. package/dist/core/qa/quality-gate-decider.js.map +1 -0
  89. package/dist/core/qa/risk-calculator.d.ts +126 -0
  90. package/dist/core/qa/risk-calculator.d.ts.map +1 -0
  91. package/dist/core/qa/risk-calculator.js +247 -0
  92. package/dist/core/qa/risk-calculator.js.map +1 -0
  93. package/dist/core/qa/types.d.ts +315 -0
  94. package/dist/core/qa/types.d.ts.map +1 -0
  95. package/dist/core/qa/types.js +8 -0
  96. package/dist/core/qa/types.js.map +1 -0
  97. package/dist/core/types/config.d.ts +37 -2
  98. package/dist/core/types/config.d.ts.map +1 -1
  99. package/dist/core/types/config.js +16 -0
  100. package/dist/core/types/config.js.map +1 -1
  101. package/dist/core/types/increment-metadata.d.ts +120 -0
  102. package/dist/core/types/increment-metadata.d.ts.map +1 -0
  103. package/dist/core/types/increment-metadata.js +138 -0
  104. package/dist/core/types/increment-metadata.js.map +1 -0
  105. package/dist/hooks/lib/invoke-translator-skill.d.ts +60 -0
  106. package/dist/hooks/lib/invoke-translator-skill.d.ts.map +1 -0
  107. package/dist/hooks/lib/invoke-translator-skill.js +201 -0
  108. package/dist/hooks/lib/invoke-translator-skill.js.map +1 -0
  109. package/dist/hooks/lib/translate-file.d.ts +59 -0
  110. package/dist/hooks/lib/translate-file.d.ts.map +1 -0
  111. package/dist/hooks/lib/translate-file.js +350 -0
  112. package/dist/hooks/lib/translate-file.js.map +1 -0
  113. package/dist/locales/en/cli.json +3 -1
  114. package/dist/metrics/calculators/change-failure-rate.d.ts +22 -0
  115. package/dist/metrics/calculators/change-failure-rate.d.ts.map +1 -0
  116. package/dist/metrics/calculators/change-failure-rate.js +70 -0
  117. package/dist/metrics/calculators/change-failure-rate.js.map +1 -0
  118. package/dist/metrics/calculators/deployment-frequency.d.ts +20 -0
  119. package/dist/metrics/calculators/deployment-frequency.d.ts.map +1 -0
  120. package/dist/metrics/calculators/deployment-frequency.js +61 -0
  121. package/dist/metrics/calculators/deployment-frequency.js.map +1 -0
  122. package/dist/metrics/calculators/lead-time.d.ts +22 -0
  123. package/dist/metrics/calculators/lead-time.d.ts.map +1 -0
  124. package/dist/metrics/calculators/lead-time.js +82 -0
  125. package/dist/metrics/calculators/lead-time.js.map +1 -0
  126. package/dist/metrics/calculators/mttr.d.ts +21 -0
  127. package/dist/metrics/calculators/mttr.d.ts.map +1 -0
  128. package/dist/metrics/calculators/mttr.js +60 -0
  129. package/dist/metrics/calculators/mttr.js.map +1 -0
  130. package/dist/metrics/dora-calculator.d.ts +24 -0
  131. package/dist/metrics/dora-calculator.d.ts.map +1 -0
  132. package/dist/metrics/dora-calculator.js +104 -0
  133. package/dist/metrics/dora-calculator.js.map +1 -0
  134. package/dist/metrics/github-client.d.ts +51 -0
  135. package/dist/metrics/github-client.d.ts.map +1 -0
  136. package/dist/metrics/github-client.js +133 -0
  137. package/dist/metrics/github-client.js.map +1 -0
  138. package/dist/metrics/types.d.ts +112 -0
  139. package/dist/metrics/types.d.ts.map +1 -0
  140. package/dist/metrics/types.js +10 -0
  141. package/dist/metrics/types.js.map +1 -0
  142. package/dist/metrics/utils/percentile.d.ts +25 -0
  143. package/dist/metrics/utils/percentile.d.ts.map +1 -0
  144. package/dist/metrics/utils/percentile.js +46 -0
  145. package/dist/metrics/utils/percentile.js.map +1 -0
  146. package/dist/metrics/utils/tier-classifier.d.ts +61 -0
  147. package/dist/metrics/utils/tier-classifier.d.ts.map +1 -0
  148. package/dist/metrics/utils/tier-classifier.js +100 -0
  149. package/dist/metrics/utils/tier-classifier.js.map +1 -0
  150. package/dist/utils/auth-helpers.d.ts +58 -0
  151. package/dist/utils/auth-helpers.d.ts.map +1 -0
  152. package/dist/utils/auth-helpers.js +108 -0
  153. package/dist/utils/auth-helpers.js.map +1 -0
  154. package/dist/utils/env-file.d.ts +88 -0
  155. package/dist/utils/env-file.d.ts.map +1 -0
  156. package/dist/utils/env-file.js +180 -0
  157. package/dist/utils/env-file.js.map +1 -0
  158. package/dist/utils/plugin-detection.d.ts +50 -0
  159. package/dist/utils/plugin-detection.d.ts.map +1 -0
  160. package/dist/utils/plugin-detection.js +229 -0
  161. package/dist/utils/plugin-detection.js.map +1 -0
  162. package/dist/utils/secrets-loader.d.ts +88 -0
  163. package/dist/utils/secrets-loader.d.ts.map +1 -0
  164. package/dist/utils/secrets-loader.js +271 -0
  165. package/dist/utils/secrets-loader.js.map +1 -0
  166. package/dist/utils/translation.d.ts +187 -0
  167. package/dist/utils/translation.d.ts.map +1 -0
  168. package/dist/utils/translation.js +414 -0
  169. package/dist/utils/translation.js.map +1 -0
  170. package/package.json +28 -44
  171. package/plugins/specweave/.claude-plugin/plugin.json +3 -3
  172. package/plugins/specweave/agents/pm/AGENT.md +330 -54
  173. package/plugins/specweave/agents/test-aware-planner/AGENT.md +1035 -0
  174. package/plugins/specweave/agents/test-aware-planner/templates/README.md +118 -0
  175. package/plugins/specweave/agents/test-aware-planner/templates/task-non-testable.md.template +24 -0
  176. package/plugins/specweave/agents/test-aware-planner/templates/task-testable.md.template +53 -0
  177. package/plugins/specweave/agents/test-aware-planner/templates/tasks-frontmatter.md.template +11 -0
  178. package/plugins/specweave/commands/README.md +88 -163
  179. package/plugins/specweave/commands/specweave-abandon.md +314 -0
  180. package/plugins/specweave/commands/specweave-check-tests.md +546 -0
  181. package/plugins/specweave/commands/{do.md → specweave-do.md} +5 -5
  182. package/plugins/specweave/commands/{done.md → specweave-done.md} +2 -0
  183. package/plugins/specweave/commands/{increment.md → specweave-increment.md} +231 -4
  184. package/plugins/specweave/commands/specweave-pause.md +189 -0
  185. package/plugins/specweave/commands/specweave-qa.md +245 -0
  186. package/plugins/specweave/commands/specweave-resume.md +216 -0
  187. package/plugins/specweave/commands/specweave-status.md +397 -0
  188. package/plugins/specweave/commands/specweave-sync-tasks.md +256 -0
  189. package/plugins/specweave/commands/{translate.md → specweave-translate.md} +3 -3
  190. package/plugins/specweave/commands/specweave-update-scope.md +351 -0
  191. package/plugins/specweave/commands/{validate.md → specweave-validate.md} +2 -0
  192. package/plugins/specweave/commands/specweave.md +21 -21
  193. package/plugins/specweave/hooks/docs-changed.sh +23 -3
  194. package/plugins/specweave/hooks/human-input-required.sh +23 -3
  195. package/plugins/specweave/hooks/post-increment-planning.sh +335 -0
  196. package/plugins/specweave/hooks/post-task-completion.sh +161 -1
  197. package/plugins/specweave/hooks/pre-implementation.sh +23 -3
  198. package/plugins/specweave/skills/SKILLS-INDEX.md +1 -1
  199. package/plugins/specweave/skills/brownfield-analyzer/SKILL.md +9 -9
  200. package/plugins/specweave/skills/increment-planner/SKILL.md +400 -212
  201. package/plugins/specweave/skills/increment-quality-judge-v2/SKILL.md +499 -0
  202. package/plugins/specweave/skills/plugin-detector/SKILL.md +114 -1
  203. package/plugins/specweave/skills/project-kickstarter/SKILL.md +74 -1
  204. package/plugins/specweave/skills/{rfc-generator → spec-generator}/SKILL.md +22 -29
  205. package/plugins/specweave/skills/specweave-detector/SKILL.md +3 -3
  206. package/plugins/specweave/skills/specweave-framework/SKILL.md +2 -2
  207. package/plugins/specweave-ado/.claude-plugin/plugin.json +18 -4
  208. package/plugins/specweave-ado/agents/ado-manager/AGENT.md +426 -0
  209. package/plugins/specweave-ado/commands/close-workitem.md +52 -0
  210. package/plugins/specweave-ado/commands/create-workitem.md +53 -0
  211. package/plugins/specweave-ado/commands/status.md +53 -0
  212. package/plugins/specweave-ado/commands/sync.md +55 -0
  213. package/plugins/specweave-ado/lib/ado-client.ts +361 -0
  214. package/plugins/specweave-ado/reference/ado-specweave-mapping.md +552 -0
  215. package/plugins/specweave-ado/skills/ado-sync/SKILL.md +344 -193
  216. package/plugins/specweave-docs/skills/docusaurus/SKILL.md +73 -0
  217. package/plugins/specweave-github/agents/github-manager/AGENT.md +49 -0
  218. package/plugins/specweave-github/commands/{github-close-issue.md → close-issue.md} +1 -1
  219. package/plugins/specweave-github/commands/{github-create-issue.md → create-issue.md} +1 -1
  220. package/plugins/specweave-github/commands/{github-status.md → status.md} +1 -1
  221. package/plugins/specweave-github/commands/{github-sync-tasks.md → sync-tasks.md} +1 -1
  222. package/plugins/specweave-github/commands/{github-sync.md → sync.md} +1 -1
  223. package/plugins/specweave-github/reference/github-specweave-mapping.md +377 -0
  224. package/plugins/specweave-github/skills/github-sync/SKILL.md +11 -3
  225. package/plugins/specweave-infrastructure/commands/{specweave.monitor-setup.md → monitor-setup.md} +5 -0
  226. package/plugins/specweave-infrastructure/commands/{specweave.slo-implement.md → slo-implement.md} +5 -0
  227. package/plugins/specweave-jira/agents/jira-manager/AGENT.md +380 -0
  228. package/plugins/specweave-jira/commands/{specweave.sync-jira.md → sync.md} +1 -1
  229. package/plugins/specweave-jira/reference/jira-specweave-mapping.md +508 -0
  230. package/plugins/specweave-ml/commands/ml-deploy.md +1 -1
  231. package/plugins/specweave-ml/commands/ml-evaluate.md +1 -1
  232. package/plugins/specweave-ml/commands/ml-explain.md +1 -1
  233. package/plugins/specweave-ml/commands/{specweave.ml-pipeline.md → ml-pipeline.md} +5 -0
  234. package/src/templates/AGENTS.md.template +652 -1
  235. package/src/templates/CLAUDE.md.template +36 -21
  236. package/src/templates/COMPLETION-REPORT.template.md +128 -0
  237. package/src/templates/README.md.template +17 -16
  238. package/src/templates/docs/README.md +11 -9
  239. package/src/templates/docs/spec-template.md +229 -0
  240. package/dist/adapters/copilot/adapter.d.ts +0 -86
  241. package/dist/adapters/copilot/adapter.d.ts.map +0 -1
  242. package/dist/adapters/copilot/adapter.js +0 -396
  243. package/dist/adapters/copilot/adapter.js.map +0 -1
  244. package/plugins/.specweave/logs/hooks-debug.log +0 -24
  245. package/plugins/.specweave/logs/last-hook-fire +0 -1
  246. package/plugins/.specweave/logs/last-todowrite-time +0 -1
  247. package/plugins/.specweave/logs/tasks.log +0 -6
  248. package/plugins/specweave/commands/inc.md +0 -85
  249. package/plugins/specweave/commands/list-increments.md +0 -180
  250. package/src/adapters/README.md +0 -311
  251. package/src/adapters/adapter-base.ts +0 -182
  252. package/src/adapters/adapter-interface.ts +0 -166
  253. package/src/adapters/adapter-loader.ts +0 -259
  254. package/src/adapters/agents-md-generator.ts +0 -228
  255. package/src/adapters/claude/README.md +0 -233
  256. package/src/adapters/claude/adapter.ts +0 -468
  257. package/src/adapters/claude-md-generator.ts +0 -377
  258. package/src/adapters/codex/README.md +0 -105
  259. package/src/adapters/codex/adapter.ts +0 -333
  260. package/src/adapters/copilot/README.md +0 -240
  261. package/src/adapters/copilot/adapter.ts +0 -444
  262. package/src/adapters/cursor/.cursor/context/docs-context.md +0 -62
  263. package/src/adapters/cursor/.cursor/context/increments-context.md +0 -71
  264. package/src/adapters/cursor/.cursor/context/strategy-context.md +0 -73
  265. package/src/adapters/cursor/.cursor/context/tests-context.md +0 -89
  266. package/src/adapters/cursor/README.md +0 -283
  267. package/src/adapters/cursor/adapter.ts +0 -451
  268. package/src/adapters/doc-generator.ts +0 -331
  269. package/src/adapters/gemini/README.md +0 -97
  270. package/src/adapters/gemini/adapter.ts +0 -298
  271. package/src/adapters/generic/README.md +0 -277
  272. package/src/adapters/generic/adapter.ts +0 -359
  273. package/src/adapters/registry.yaml +0 -187
  274. /package/plugins/specweave/commands/{costs.md → specweave-costs.md} +0 -0
  275. /package/plugins/specweave/commands/{next.md → specweave-next.md} +0 -0
  276. /package/plugins/specweave/commands/{progress.md → specweave-progress.md} +0 -0
  277. /package/plugins/specweave/commands/{sync-docs.md → specweave-sync-docs.md} +0 -0
  278. /package/plugins/specweave/commands/{tdd-cycle.md → specweave-tdd-cycle.md} +0 -0
  279. /package/plugins/specweave/commands/{tdd-green.md → specweave-tdd-green.md} +0 -0
  280. /package/plugins/specweave/commands/{tdd-red.md → specweave-tdd-red.md} +0 -0
  281. /package/plugins/specweave/commands/{tdd-refactor.md → specweave-tdd-refactor.md} +0 -0
@@ -1,89 +0,0 @@
1
- # @tests - Test Strategy Context
2
-
3
- This file is loaded when you type `@tests` in Cursor.
4
-
5
- ## What This Provides
6
-
7
- Quick access to test documentation:
8
- - Test strategy (E2E, unit, integration)
9
- - Test coverage matrix (TC-0001 → test files)
10
- - Test cases (YAML format for skills)
11
- - Acceptance criteria validation
12
-
13
- ## Usage
14
-
15
- ```
16
- @tests show me test strategy
17
- @tests what tests exist for authentication?
18
- @tests map TC-0001 to test file
19
- ```
20
-
21
- ## Files Loaded
22
-
23
- When `@tests` is used, Cursor should load:
24
-
25
- ```
26
- .specweave/increments/####-feature/tests.md # Test strategy
27
- tests/ # Actual test code
28
- ├── e2e/ # Playwright E2E tests
29
- │ └── auth.spec.ts
30
- ├── unit/ # Unit tests
31
- │ └── auth-utils.test.ts
32
- └── integration/ # Integration tests
33
- └── auth-api.test.ts
34
- ```
35
-
36
- ## Test Coverage Matrix
37
-
38
- **tests.md contains mapping: TC-0001 → test file**
39
-
40
- Example:
41
- ```markdown
42
- | TC ID | Acceptance Criteria | Test Type | Location | Priority |
43
- |---------|-------------------------|-----------|------------------------|----------|
44
- | TC-0001 | Valid login redirects | E2E | tests/e2e/auth.spec.ts | P1 |
45
- | TC-0002 | Invalid password errors | E2E | tests/e2e/auth.spec.ts | P1 |
46
- ```
47
-
48
- ## Four Levels of Test Cases
49
-
50
- ### Level 1: Specification (TC-0001 in spec.md)
51
- ```markdown
52
- - [ ] **TC-0001**: Valid credentials → redirect to dashboard
53
- ```
54
-
55
- ### Level 2: Feature Test Strategy (tests.md)
56
- Mapping TC-0001 to test implementation
57
-
58
- ### Level 3: Skill Test Cases (for SpecWeave skills)
59
- YAML format in src/skills/{name}/test-cases/
60
-
61
- ### Level 4: Code Tests (Playwright, Jest, etc.)
62
- ```typescript
63
- test('TC-0001: Valid Login Flow', async ({ page }) => {
64
- // Implementation
65
- });
66
- ```
67
-
68
- ## Context Precision
69
-
70
- **Load test strategy for current increment only**
71
-
72
- If working on auth increment:
73
- ```
74
- .specweave/increments/0002-user-auth/tests.md
75
- tests/e2e/auth.spec.ts
76
- tests/unit/auth-utils.test.ts
77
- ```
78
-
79
- Don't load ALL tests from ALL increments.
80
-
81
- ## Example Workflow
82
-
83
- User: `@tests what's the test coverage for authentication?`
84
-
85
- You:
86
- 1. Load .specweave/increments/0002-user-auth/tests.md
87
- 2. Read test coverage matrix
88
- 3. Load referenced test files (auth.spec.ts)
89
- 4. Summarize: "TC-0001 to TC-0008 covered. 8/8 E2E tests in auth.spec.ts. All P1 tests passing."
@@ -1,283 +0,0 @@
1
- # Cursor Adapter
2
-
3
- **Automation Level**: Semi (Good experience with @ shortcuts and Composer)
4
-
5
- ## Overview
6
-
7
- The Cursor adapter provides **semi-automation** for SpecWeave by teaching Cursor's AI how to **behave like** it has Claude Code's skills and agents, even without native support.
8
-
9
- ## Key Insight: Simulating Anthropic's Standards
10
-
11
- **Anthropic Sets Standards** (MCP, Skills, Agents) that provide superior results. For Cursor, we provide **"implementation guides"** that teach the AI how to act like it has these capabilities.
12
-
13
- Example:
14
- ```markdown
15
- # In .cursorrules:
16
- ## What is a SpecWeave Skill?
17
- A skill is a specialized capability that activates automatically when relevant.
18
-
19
- **In Claude Code**: Skills are native (.claude/skills/)
20
- **In Cursor**: You simulate by reading relevant workflow instructions
21
-
22
- ## increment-planner Skill
23
- When user says "create increment":
24
- 2. Auto-increment number
25
- 3. Create spec.md (act as PM role)
26
- 4. Create plan.md (act as Architect role)
27
- 5. Create tasks.md
28
- ```
29
-
30
- This is **meta-documentation** - teaching the AI how to behave!
31
-
32
- ## What This Adapter Provides
33
-
34
- ### 🔍 Progressive Disclosure (NEW in v0.3.8)
35
-
36
- SpecWeave now includes **SKILLS-INDEX.md** - enabling Cursor to efficiently discover and use all 35+ skills!
37
-
38
- **How it works**:
39
- 1. Read `.claude/skills/SKILLS-INDEX.md` (referenced in AGENTS.md)
40
- 2. Match task to activation keywords (e.g., "feature planning" → increment-planner)
41
- 3. Load specific SKILL.md when relevant
42
- 4. Follow proven workflows
43
-
44
- **Benefits**:
45
- - ✅ **90% token savings** (5k vs 50k tokens - load only what you need)
46
- - ✅ **Full skill access** - All 35+ skills now efficiently accessible!
47
- - ✅ **Consistent output** - Follow SpecWeave best practices every time
48
-
49
- **Example**:
50
- ```markdown
51
- # From AGENTS.md, Cursor learns about:
52
- .claude/skills/SKILLS-INDEX.md # Single-file skill reference
53
-
54
- # When user asks: "Plan a new feature for auth"
55
- # 1. Read SKILLS-INDEX.md → Find "increment-planner" (matches "feature planning")
56
- # 2. Load .claude/skills/increment-planner/SKILL.md
57
- # 3. Follow the increment planning workflow
58
- # Result: Proper spec.md, plan.md, tasks.md creation
59
- ```
60
-
61
- **Note**: While Claude Code activates skills automatically, Cursor simulates this by following the progressive disclosure pattern documented in AGENTS.md.
62
-
63
- ### .cursorrules (Workflow Instructions)
64
- - **What**: Complete workflow guide for SpecWeave
65
- - **How**: Teaches Cursor to act like skills/agents
66
- - **Example**: When to adopt PM vs Architect perspective
67
- - **Benefit**: Semi-automated feature creation
68
-
69
- ### @ Context Shortcuts
70
- | Shortcut | Loads | Use Case |
71
- |----------|-------|----------|
72
- | `@increments` | Current increment files | "What are we working on?" |
73
- | `@docs` | Architecture documentation | "Show me system design" |
74
- | `@strategy` | Business requirements | "What are the requirements?" |
75
- | `@tests` | Test strategy and cases | "What tests exist?" |
76
-
77
- **Usage**: Type `@increments show current tasks` in Cursor chat
78
-
79
- ### Composer Multi-File Editing
80
- - Edit spec.md, plan.md, tasks.md simultaneously
81
- - Maintain consistency across files
82
- - Fast iteration on designs
83
-
84
- ## How It Works
85
-
86
- ### Simulating Skills
87
-
88
- **Claude Code (automatic)**:
89
- ```typescript
90
- // Skills auto-activate
91
- User: "create increment for auth"
92
- → specweave-detector activates
93
- → skill-router routes to increment-planner
94
- → increment-planner creates increment
95
- ```
96
-
97
- **Cursor (manual simulation)**:
98
- ```typescript
99
- // You follow .cursorrules instructions
100
- User: "create increment for auth"
101
- → You read .cursorrules
102
- → Follow workflow: check config → create folders → create files
103
- → Act like increment-planner by following those steps
104
- ```
105
-
106
- ### Simulating Agents
107
-
108
- **Claude Code (automatic)**:
109
- ```typescript
110
- Task({ subagent_type: "pm", prompt: "create spec" })
111
- → PM agent invoked with separate context window
112
- ```
113
-
114
- **Cursor (manual adoption)**:
115
- ```typescript
116
- User: "act as PM and create spec"
117
- → You adopt PM perspective:
118
- - Focus on WHAT/WHY (not HOW)
119
- - Technology-agnostic requirements
120
- - User stories + acceptance criteria
121
- → Create spec.md following PM role
122
- ```
123
-
124
- **Pro Tip**: .cursorrules defines each role's responsibilities clearly
125
-
126
- ## Installation
127
-
128
- ```bash
129
- # Install SpecWeave with Cursor adapter
130
- npx specweave init my-project --adapter cursor
131
-
132
- # Files created:
133
- # .cursorrules (workflow instructions)
134
- # .cursor/context/*.md (@ shortcut targets)
135
- ```
136
-
137
- ## Directory Structure
138
-
139
- ```
140
- .cursorrules # Main workflow instructions
141
- .cursor/
142
- ├── README.md # This file
143
- └── context/ # @ shortcut files
144
- ├── increments-context.md
145
- ├── docs-context.md
146
- ├── strategy-context.md
147
- └── tests-context.md
148
- ```
149
-
150
- ## Usage Examples
151
-
152
- ### Example 1: Create Feature
153
-
154
- **User**: "Create increment for user authentication"
155
-
156
- **Cursor** (following .cursorrules):
157
- 2. ✅ Find next increment number (0003)
158
- 3. ✅ Create folder: `.specweave/increments/0003-user-authentication/`
159
- 4. ✅ Act as PM: Create spec.md (WHAT/WHY, user stories, acceptance criteria)
160
- 5. ✅ Act as Architect: Create plan.md (HOW, technical design, components)
161
- 6. ✅ Create tasks.md (implementation checklist)
162
- 7. ✅ Create context-manifest.yaml (list files to load - 70%+ token savings)
163
-
164
- **Result**: Complete increment ready for implementation!
165
-
166
- ### Example 2: Use @ Shortcuts
167
-
168
- **User**: "@increments what's the current task?"
169
-
170
- **Cursor**:
171
- 1. ✅ Loads current increment's spec.md, plan.md, tasks.md
172
- 2. ✅ Reads tasks.md → Find first unchecked task
173
- 3. ✅ Response: "Currently on T003: Implement OAuth2 authentication flow"
174
-
175
- ### Example 3: Multi-File Edit with Composer
176
-
177
- **User**: *Opens Composer (Cmd+I)*
178
- "Update spec.md and plan.md to add Google OAuth login"
179
-
180
- **Cursor**:
181
- 1. ✅ Edits spec.md → Add FR-003 (Google OAuth requirement)
182
- 2. ✅ Edits plan.md → Add OAuth implementation section
183
- 3. ✅ Maintains consistency between both files
184
-
185
- ### Example 4: Adopt Agent Role
186
-
187
- **User**: "Act as DevOps agent and create Terraform for Hetzner"
188
-
189
- **Cursor** (adopting DevOps role):
190
- 1. ✅ Focus on infrastructure (not application code)
191
- 2. ✅ Create Terraform files (provider.tf, main.tf, variables.tf)
192
- 3. ✅ Add monitoring, logging, security configs
193
- 4. ✅ Document deployment process
194
-
195
- ## Context Loading (70%+ Token Savings)
196
-
197
- **.cursorrules teaches Cursor**:
198
-
199
- ```markdown
200
- ## CRITICAL: Context Manifest
201
-
202
- **Always read context-manifest.yaml first!**
203
-
204
- Example:
205
- ```yaml
206
- spec_sections:
207
- - .specweave/docs/internal/strategy/auth/spec.md
208
- documentation:
209
- - .specweave/docs/internal/architecture/auth-design.md
210
- ```
211
-
212
- **ONLY load these 2 files**, not entire .specweave/docs/ folder!
213
-
214
- **Why?**
215
- - Full specs: 500+ pages (50k tokens)
216
- - Manifest files: 50 pages (5k tokens)
217
- - Savings: 90% = 45k tokens saved!
218
- ```
219
-
220
- ## Comparison: Cursor vs Claude Code
221
-
222
- | Feature | Claude Code | Cursor |
223
- |---------|-------------|--------|
224
- | **Skills** | Native auto-activation | Simulated via .cursorrules |
225
- | **Agents** | Separate context windows | Manual role adoption |
226
- | **Hooks** | Auto-execute on events | Not available |
227
- | **Commands** | Native slash commands | Workflow instructions |
228
- | **Context** | MCP protocol | Manual loading via @ shortcuts |
229
- | **File Access** | Native tools | Native (Composer) |
230
- | **Automation** | Full | Semi |
231
-
232
- **Cursor = Good experience** (70-80% of Claude Code's capabilities)
233
-
234
- ## Limitations
235
-
236
- ❌ **No auto-activation** - Must explicitly request workflows
237
- ❌ **No separate context windows** - All context shared
238
- ❌ **No hooks** - Can't auto-update docs on events (see workaround below)
239
- ⚠️ **Manual role adoption** - Must say "act as PM"
240
-
241
- ✅ **But Composer + @ shortcuts provide great UX!**
242
-
243
- ### Documentation Update Workaround
244
-
245
- Since Cursor doesn't have hooks, you MUST manually update documentation after every task.
246
-
247
- **See the comprehensive guide in AGENTS.md** (section: "Documentation Updates - CRITICAL FOR NON-CLAUDE TOOLS")
248
-
249
- **Quick checklist after completing any task**:
250
- 1. Update `.specweave/increments/{id}/tasks.md` (mark tasks complete)
251
- 2. Update `.specweave/docs/internal/architecture/` (HLD/LLD/ADRs)
252
- 3. Update `.specweave/docs/internal/strategy/` (PRDs if requirements changed)
253
- 4. Update `README.md` (user-facing changes)
254
- 5. Update `CHANGELOG.md` (version history)
255
-
256
- ## Tips & Tricks
257
-
258
- ### 1. Always Mention Context-Manifest
259
- "Read context-manifest.yaml and load only files listed there"
260
-
261
- ### 2. Be Explicit About Roles
262
- "Act as PM agent and create spec" (not just "create spec")
263
-
264
- ### 3. Use @ Shortcuts
265
- Faster than typing full file paths
266
-
267
- ### 4. Use Composer for Multi-File Edits
268
- Cmd+I → Edit multiple files at once
269
-
270
- ### 5. Reference .cursorrules
271
- If Cursor forgets workflow: "Follow the workflow in .cursorrules"
272
-
273
- ## Related Documentation
274
-
275
- - [SPECWEAVE.md](../../SPECWEAVE.md) - Complete development guide
276
- - [.cursorrules](.cursorrules) - Cursor workflow instructions (READ THIS!)
277
- - [Adapter Architecture](../README.md) - Multi-tool design philosophy
278
-
279
- ---
280
-
281
- **Status**: Active (v0.2.0-beta.1+)
282
- **Market Share**: ~30% (Cursor users)
283
- **Priority**: P1 (high impact adapter)