specweave 0.1.8 → 0.3.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 (294) hide show
  1. package/CLAUDE.md +600 -0
  2. package/README.md +263 -88
  3. package/bin/install-all.sh +1 -1
  4. package/bin/install-commands.sh +3 -3
  5. package/bin/specweave.js +39 -9
  6. package/dist/adapters/adapter-base.d.ts +1 -1
  7. package/dist/adapters/adapter-base.d.ts.map +1 -1
  8. package/dist/adapters/adapter-base.js +6 -41
  9. package/dist/adapters/adapter-base.js.map +1 -1
  10. package/dist/adapters/adapter-interface.js +1 -2
  11. package/dist/adapters/adapter-interface.js.map +1 -1
  12. package/dist/adapters/adapter-loader.d.ts +86 -0
  13. package/dist/adapters/adapter-loader.d.ts.map +1 -0
  14. package/dist/adapters/adapter-loader.js +216 -0
  15. package/dist/adapters/adapter-loader.js.map +1 -0
  16. package/dist/adapters/agents-md-generator.d.ts +48 -0
  17. package/dist/adapters/agents-md-generator.d.ts.map +1 -0
  18. package/dist/adapters/agents-md-generator.js +132 -0
  19. package/dist/adapters/agents-md-generator.js.map +1 -0
  20. package/dist/adapters/claude/adapter.d.ts +2 -2
  21. package/dist/adapters/claude/adapter.d.ts.map +1 -1
  22. package/dist/adapters/claude/adapter.js +5 -42
  23. package/dist/adapters/claude/adapter.js.map +1 -1
  24. package/dist/adapters/claude-md-generator.d.ts +78 -0
  25. package/dist/adapters/claude-md-generator.d.ts.map +1 -0
  26. package/dist/adapters/claude-md-generator.js +246 -0
  27. package/dist/adapters/claude-md-generator.js.map +1 -0
  28. package/dist/adapters/codex/adapter.d.ts +50 -0
  29. package/dist/adapters/codex/adapter.d.ts.map +1 -0
  30. package/dist/adapters/codex/adapter.js +316 -0
  31. package/dist/adapters/codex/adapter.js.map +1 -0
  32. package/dist/adapters/copilot/adapter.d.ts +10 -9
  33. package/dist/adapters/copilot/adapter.d.ts.map +1 -1
  34. package/dist/adapters/copilot/adapter.js +35 -100
  35. package/dist/adapters/copilot/adapter.js.map +1 -1
  36. package/dist/adapters/cursor/adapter.d.ts +8 -6
  37. package/dist/adapters/cursor/adapter.d.ts.map +1 -1
  38. package/dist/adapters/cursor/adapter.js +47 -130
  39. package/dist/adapters/cursor/adapter.js.map +1 -1
  40. package/dist/adapters/doc-generator.d.ts +69 -0
  41. package/dist/adapters/doc-generator.d.ts.map +1 -0
  42. package/dist/adapters/doc-generator.js +247 -0
  43. package/dist/adapters/doc-generator.js.map +1 -0
  44. package/dist/adapters/gemini/adapter.d.ts +50 -0
  45. package/dist/adapters/gemini/adapter.d.ts.map +1 -0
  46. package/dist/adapters/gemini/adapter.js +281 -0
  47. package/dist/adapters/gemini/adapter.js.map +1 -0
  48. package/dist/adapters/generic/adapter.d.ts +7 -4
  49. package/dist/adapters/generic/adapter.d.ts.map +1 -1
  50. package/dist/adapters/generic/adapter.js +60 -59
  51. package/dist/adapters/generic/adapter.js.map +1 -1
  52. package/dist/cli/commands/init.d.ts +3 -1
  53. package/dist/cli/commands/init.d.ts.map +1 -1
  54. package/dist/cli/commands/init.js +272 -170
  55. package/dist/cli/commands/init.js.map +1 -1
  56. package/dist/cli/commands/install.d.ts.map +1 -1
  57. package/dist/cli/commands/install.js +22 -58
  58. package/dist/cli/commands/install.js.map +1 -1
  59. package/dist/cli/commands/list.d.ts.map +1 -1
  60. package/dist/cli/commands/list.js +27 -64
  61. package/dist/cli/commands/list.js.map +1 -1
  62. package/dist/core/credentials-manager.d.ts +90 -0
  63. package/dist/core/credentials-manager.d.ts.map +1 -0
  64. package/dist/core/credentials-manager.js +271 -0
  65. package/dist/core/credentials-manager.js.map +1 -0
  66. package/dist/core/project-structure-detector.d.ts +92 -0
  67. package/dist/core/project-structure-detector.d.ts.map +1 -0
  68. package/dist/core/project-structure-detector.js +289 -0
  69. package/dist/core/project-structure-detector.js.map +1 -0
  70. package/dist/core/rfc-generator-v2.d.ts +149 -0
  71. package/dist/core/rfc-generator-v2.d.ts.map +1 -0
  72. package/dist/core/rfc-generator-v2.js +399 -0
  73. package/dist/core/rfc-generator-v2.js.map +1 -0
  74. package/dist/core/rfc-generator.d.ts +147 -0
  75. package/dist/core/rfc-generator.d.ts.map +1 -0
  76. package/dist/core/rfc-generator.js +434 -0
  77. package/dist/core/rfc-generator.js.map +1 -0
  78. package/dist/integrations/ado/ado-client.d.ts +123 -0
  79. package/dist/integrations/ado/ado-client.d.ts.map +1 -0
  80. package/dist/integrations/ado/ado-client.js +398 -0
  81. package/dist/integrations/ado/ado-client.js.map +1 -0
  82. package/dist/integrations/jira/jira-client.d.ts +139 -0
  83. package/dist/integrations/jira/jira-client.d.ts.map +1 -0
  84. package/dist/integrations/jira/jira-client.js +386 -0
  85. package/dist/integrations/jira/jira-client.js.map +1 -0
  86. package/dist/integrations/jira/jira-incremental-mapper.d.ts +75 -0
  87. package/dist/integrations/jira/jira-incremental-mapper.d.ts.map +1 -0
  88. package/dist/integrations/jira/jira-incremental-mapper.js +474 -0
  89. package/dist/integrations/jira/jira-incremental-mapper.js.map +1 -0
  90. package/dist/integrations/jira/jira-mapper.d.ts +105 -0
  91. package/dist/integrations/jira/jira-mapper.d.ts.map +1 -0
  92. package/dist/integrations/jira/jira-mapper.js +494 -0
  93. package/dist/integrations/jira/jira-mapper.js.map +1 -0
  94. package/dist/testing/test-generator.d.ts +117 -0
  95. package/dist/testing/test-generator.d.ts.map +1 -0
  96. package/dist/testing/test-generator.js +370 -0
  97. package/dist/testing/test-generator.js.map +1 -0
  98. package/dist/utils/auto-install.d.ts +3 -0
  99. package/dist/utils/auto-install.d.ts.map +1 -1
  100. package/dist/utils/auto-install.js +16 -82
  101. package/dist/utils/auto-install.js.map +1 -1
  102. package/dist/utils/esm-helpers.d.ts +50 -0
  103. package/dist/utils/esm-helpers.d.ts.map +1 -0
  104. package/dist/utils/esm-helpers.js +57 -0
  105. package/dist/utils/esm-helpers.js.map +1 -0
  106. package/package.json +16 -7
  107. package/src/adapters/README.md +1 -2
  108. package/src/adapters/adapter-base.ts +6 -3
  109. package/src/adapters/adapter-loader.ts +261 -0
  110. package/src/adapters/agents-md-generator.ts +162 -0
  111. package/src/adapters/claude/README.md +6 -14
  112. package/src/adapters/claude/adapter.ts +4 -4
  113. package/src/adapters/claude-md-generator.ts +311 -0
  114. package/src/adapters/codex/README.md +105 -0
  115. package/src/adapters/codex/adapter.ts +333 -0
  116. package/src/adapters/copilot/adapter.ts +36 -65
  117. package/src/adapters/cursor/README.md +0 -2
  118. package/src/adapters/cursor/adapter.ts +46 -92
  119. package/src/adapters/doc-generator.ts +331 -0
  120. package/src/adapters/gemini/README.md +97 -0
  121. package/src/adapters/gemini/adapter.ts +298 -0
  122. package/src/adapters/generic/adapter.ts +61 -57
  123. package/src/adapters/registry.yaml +86 -25
  124. package/src/agents/devops/AGENT.md +16 -18
  125. package/src/agents/docs-writer/AGENT.md +2 -2
  126. package/src/agents/pm/AGENT.md +1 -50
  127. package/src/commands/README.md +134 -111
  128. package/src/commands/{build.md → specweave.do.md} +185 -72
  129. package/src/commands/{done.md → specweave.done.md} +3 -3
  130. package/src/commands/{inc.md → specweave.inc.md} +4 -4
  131. package/src/commands/specweave.increment.md +383 -0
  132. package/src/commands/specweave.md +430 -0
  133. package/src/commands/specweave.next.md +495 -0
  134. package/src/commands/specweave.progress.md +258 -0
  135. package/src/commands/specweave.sync-docs.md +665 -0
  136. package/src/commands/specweave.sync-github.md +269 -0
  137. package/src/commands/specweave.sync-jira.md +197 -0
  138. package/src/commands/{validate.md → specweave.validate.md} +4 -4
  139. package/src/hooks/README.md +19 -29
  140. package/src/hooks/post-task-completion.sh +25 -30
  141. package/src/skills/ado-sync/README.md +1 -36
  142. package/src/skills/bmad-method-expert/SKILL.md +1 -3
  143. package/src/skills/brownfield-analyzer/SKILL.md +429 -23
  144. package/src/skills/brownfield-onboarder/SKILL.md +221 -8
  145. package/src/skills/context-loader/SKILL.md +239 -617
  146. package/src/skills/context-optimizer/SKILL.md +0 -30
  147. package/src/skills/github-sync/SKILL.md +1 -19
  148. package/src/skills/increment-planner/SKILL.md +64 -18
  149. package/src/skills/increment-quality-judge/SKILL.md +1 -36
  150. package/src/skills/jira-sync/README.md +1 -38
  151. package/src/skills/role-orchestrator/README.md +1 -22
  152. package/src/skills/role-orchestrator/SKILL.md +1 -59
  153. package/src/skills/skill-router/SKILL.md +0 -18
  154. package/src/skills/spec-kit-expert/SKILL.md +1 -3
  155. package/src/skills/specweave-detector/SKILL.md +225 -275
  156. package/src/skills/task-builder/README.md +1 -7
  157. package/src/templates/AGENTS.md.template +334 -0
  158. package/src/templates/CLAUDE.md.template +131 -297
  159. package/src/templates/README.md.template +115 -23
  160. package/src/templates/environments/minimal/README.md +0 -1
  161. package/INSTALL.md +0 -848
  162. package/SPECWEAVE.md +0 -711
  163. package/src/adapters/copilot/.github/copilot/instructions.md +0 -376
  164. package/src/adapters/cursor/.cursorrules +0 -325
  165. package/src/adapters/generic/SPECWEAVE-MANUAL.md +0 -676
  166. package/src/commands/create-project.md +0 -528
  167. package/src/commands/generate-docs.md +0 -623
  168. package/src/commands/increment.md +0 -223
  169. package/src/commands/review-docs.md +0 -331
  170. package/src/commands/sync-github.md +0 -115
  171. package/src/skills/ado-sync/test-cases/test-1.yaml +0 -9
  172. package/src/skills/ado-sync/test-cases/test-2.yaml +0 -8
  173. package/src/skills/ado-sync/test-cases/test-3.yaml +0 -9
  174. package/src/skills/bmad-method-expert/test-cases/test-1-placeholder.yaml +0 -12
  175. package/src/skills/bmad-method-expert/test-cases/test-2-placeholder.yaml +0 -12
  176. package/src/skills/bmad-method-expert/test-cases/test-3-placeholder.yaml +0 -12
  177. package/src/skills/brownfield-analyzer/test-cases/test-1-basic-analysis.yaml +0 -48
  178. package/src/skills/brownfield-analyzer/test-cases/test-2-placeholder.yaml +0 -12
  179. package/src/skills/brownfield-analyzer/test-cases/test-3-placeholder.yaml +0 -12
  180. package/src/skills/brownfield-onboarder/test-cases/test-1-placeholder.yaml +0 -12
  181. package/src/skills/brownfield-onboarder/test-cases/test-2-placeholder.yaml +0 -12
  182. package/src/skills/brownfield-onboarder/test-cases/test-3-placeholder.yaml +0 -12
  183. package/src/skills/calendar-system/test-cases/test-1-placeholder.yaml +0 -12
  184. package/src/skills/calendar-system/test-cases/test-2-placeholder.yaml +0 -12
  185. package/src/skills/calendar-system/test-cases/test-3-placeholder.yaml +0 -12
  186. package/src/skills/context-loader/test-cases/test-1-basic-loading.yaml +0 -39
  187. package/src/skills/context-loader/test-cases/test-2-token-budget-exceeded.yaml +0 -44
  188. package/src/skills/context-loader/test-cases/test-3-section-anchors.yaml +0 -45
  189. package/src/skills/context-optimizer/test-cases/test-1-bug-fix-narrow.yaml +0 -97
  190. package/src/skills/context-optimizer/test-cases/test-2-feature-focused.yaml +0 -109
  191. package/src/skills/context-optimizer/test-cases/test-3-architecture-broad.yaml +0 -98
  192. package/src/skills/cost-optimizer/test-cases/test-1-basic-comparison.yaml +0 -75
  193. package/src/skills/cost-optimizer/test-cases/test-2-budget-constraint.yaml +0 -52
  194. package/src/skills/cost-optimizer/test-cases/test-3-scale-requirement.yaml +0 -63
  195. package/src/skills/cost-optimizer/test-results/README.md +0 -46
  196. package/src/skills/design-system-architect/test-cases/test-1-token-structure.yaml +0 -23
  197. package/src/skills/design-system-architect/test-cases/test-2-component-hierarchy.yaml +0 -24
  198. package/src/skills/design-system-architect/test-cases/test-3-accessibility-checklist.yaml +0 -23
  199. package/src/skills/diagrams-architect/test-cases/test-1-c4-context.yaml +0 -13
  200. package/src/skills/diagrams-architect/test-cases/test-2-sequence-diagram.yaml +0 -13
  201. package/src/skills/diagrams-architect/test-cases/test-3-er-diagram.yaml +0 -13
  202. package/src/skills/diagrams-generator/test-cases/test-1.yaml +0 -9
  203. package/src/skills/diagrams-generator/test-cases/test-2.yaml +0 -9
  204. package/src/skills/diagrams-generator/test-cases/test-3.yaml +0 -8
  205. package/src/skills/docs-updater/test-cases/test-1-placeholder.yaml +0 -12
  206. package/src/skills/docs-updater/test-cases/test-2-placeholder.yaml +0 -12
  207. package/src/skills/docs-updater/test-cases/test-3-placeholder.yaml +0 -12
  208. package/src/skills/dotnet-backend/test-cases/test-1-rest-api.yaml +0 -14
  209. package/src/skills/dotnet-backend/test-cases/test-2-authentication.yaml +0 -13
  210. package/src/skills/dotnet-backend/test-cases/test-3-minimal-api.yaml +0 -13
  211. package/src/skills/e2e-playwright/test-cases/TC-001-basic-navigation.yaml +0 -54
  212. package/src/skills/e2e-playwright/test-cases/TC-002-form-interaction.yaml +0 -64
  213. package/src/skills/e2e-playwright/test-cases/TC-003-specweave-integration.yaml +0 -74
  214. package/src/skills/e2e-playwright/test-cases/TC-004-accessibility-check.yaml +0 -98
  215. package/src/skills/figma-designer/test-cases/test-1-design-system.yaml +0 -13
  216. package/src/skills/figma-designer/test-cases/test-2-component-library.yaml +0 -13
  217. package/src/skills/figma-designer/test-cases/test-3-responsive-layout.yaml +0 -13
  218. package/src/skills/figma-implementer/test-cases/test-1-design-to-react.yaml +0 -13
  219. package/src/skills/figma-implementer/test-cases/test-2-storybook.yaml +0 -13
  220. package/src/skills/figma-implementer/test-cases/test-3-design-tokens.yaml +0 -13
  221. package/src/skills/figma-mcp-connector/test-cases/test-1-read-file-desktop.yaml +0 -22
  222. package/src/skills/figma-mcp-connector/test-cases/test-2-read-file-framelink.yaml +0 -21
  223. package/src/skills/figma-mcp-connector/test-cases/test-3-error-handling.yaml +0 -18
  224. package/src/skills/figma-to-code/test-cases/test-1-token-generation.yaml +0 -29
  225. package/src/skills/figma-to-code/test-cases/test-2-component-generation.yaml +0 -27
  226. package/src/skills/figma-to-code/test-cases/test-3-typescript-generation.yaml +0 -28
  227. package/src/skills/frontend/test-cases/test-1-react-component.yaml +0 -13
  228. package/src/skills/frontend/test-cases/test-2-form-validation.yaml +0 -13
  229. package/src/skills/frontend/test-cases/test-3-state-management.yaml +0 -13
  230. package/src/skills/github-sync/test-cases/test-1-placeholder.yaml +0 -12
  231. package/src/skills/github-sync/test-cases/test-2-placeholder.yaml +0 -12
  232. package/src/skills/github-sync/test-cases/test-3-placeholder.yaml +0 -12
  233. package/src/skills/hetzner-provisioner/test-cases/test-1-basic-provision.yaml +0 -71
  234. package/src/skills/hetzner-provisioner/test-cases/test-2-postgres-provision.yaml +0 -85
  235. package/src/skills/hetzner-provisioner/test-cases/test-3-ssl-config.yaml +0 -126
  236. package/src/skills/hetzner-provisioner/test-results/README.md +0 -259
  237. package/src/skills/increment-planner/test-cases/test-1-basic-feature.yaml +0 -27
  238. package/src/skills/increment-planner/test-cases/test-2-complex-feature.yaml +0 -30
  239. package/src/skills/increment-planner/test-cases/test-3-auto-numbering.yaml +0 -24
  240. package/src/skills/increment-quality-judge/test-cases/test-1-good-spec.yaml +0 -95
  241. package/src/skills/increment-quality-judge/test-cases/test-2-poor-spec.yaml +0 -108
  242. package/src/skills/increment-quality-judge/test-cases/test-3-export-suggestions.yaml +0 -87
  243. package/src/skills/jira-sync/test-cases/test-1.yaml +0 -9
  244. package/src/skills/jira-sync/test-cases/test-2.yaml +0 -9
  245. package/src/skills/jira-sync/test-cases/test-3.yaml +0 -10
  246. package/src/skills/nextjs/test-cases/test-1-app-router.yaml +0 -13
  247. package/src/skills/nextjs/test-cases/test-2-server-actions.yaml +0 -13
  248. package/src/skills/nextjs/test-cases/test-3-api-routes.yaml +0 -13
  249. package/src/skills/nodejs-backend/test-cases/test-1-express-api.yaml +0 -13
  250. package/src/skills/nodejs-backend/test-cases/test-2-prisma-orm.yaml +0 -13
  251. package/src/skills/nodejs-backend/test-cases/test-3-authentication.yaml +0 -13
  252. package/src/skills/notification-system/test-cases/test-1-placeholder.yaml +0 -12
  253. package/src/skills/notification-system/test-cases/test-2-placeholder.yaml +0 -12
  254. package/src/skills/notification-system/test-cases/test-3-placeholder.yaml +0 -12
  255. package/src/skills/python-backend/test-cases/test-1-fastapi-crud.yaml +0 -13
  256. package/src/skills/python-backend/test-cases/test-2-sqlalchemy.yaml +0 -13
  257. package/src/skills/python-backend/test-cases/test-3-authentication.yaml +0 -13
  258. package/src/skills/role-orchestrator/test-cases/test-1-simple-product.yaml +0 -98
  259. package/src/skills/role-orchestrator/test-cases/test-2-quality-gate-failure.yaml +0 -73
  260. package/src/skills/role-orchestrator/test-cases/test-3-security-workflow.yaml +0 -121
  261. package/src/skills/role-orchestrator/test-cases/test-4-parallel-execution.yaml +0 -145
  262. package/src/skills/role-orchestrator/test-cases/test-5-feedback-loops.yaml +0 -149
  263. package/src/skills/skill-creator/test-cases/test-1-placeholder.yaml +0 -12
  264. package/src/skills/skill-creator/test-cases/test-2-placeholder.yaml +0 -12
  265. package/src/skills/skill-creator/test-cases/test-3-placeholder.yaml +0 -12
  266. package/src/skills/skill-router/test-cases/test-1-basic-routing.yaml +0 -33
  267. package/src/skills/skill-router/test-cases/test-2-ambiguous-request.yaml +0 -42
  268. package/src/skills/skill-router/test-cases/test-3-nested-orchestration.yaml +0 -50
  269. package/src/skills/spec-driven-brainstorming/test-cases/TC-001-simple-idea-to-design.yaml +0 -148
  270. package/src/skills/spec-driven-brainstorming/test-cases/TC-002-complex-ultrathink-design.yaml +0 -190
  271. package/src/skills/spec-driven-brainstorming/test-cases/TC-003-unclear-requirements-socratic.yaml +0 -233
  272. package/src/skills/spec-driven-debugging/test-cases/TC-001-simple-auth-bug.yaml +0 -212
  273. package/src/skills/spec-driven-debugging/test-cases/TC-002-race-condition-ultrathink.yaml +0 -461
  274. package/src/skills/spec-driven-debugging/test-cases/TC-003-brownfield-missing-spec.yaml +0 -366
  275. package/src/skills/spec-kit-expert/test-cases/test-1-placeholder.yaml +0 -12
  276. package/src/skills/spec-kit-expert/test-cases/test-2-placeholder.yaml +0 -12
  277. package/src/skills/spec-kit-expert/test-cases/test-3-placeholder.yaml +0 -12
  278. package/src/skills/specweave-ado-mapper/test-cases/test-1-export-to-ado.yaml +0 -13
  279. package/src/skills/specweave-ado-mapper/test-cases/test-2-import-from-ado.yaml +0 -13
  280. package/src/skills/specweave-ado-mapper/test-cases/test-3-bidirectional-sync.yaml +0 -13
  281. package/src/skills/specweave-detector/test-cases/test-1-basic-detection.yaml +0 -37
  282. package/src/skills/specweave-detector/test-cases/test-2-missing-config.yaml +0 -37
  283. package/src/skills/specweave-detector/test-cases/test-3-non-specweave-project.yaml +0 -34
  284. package/src/skills/specweave-jira-mapper/test-cases/test-1-export-to-jira.yaml +0 -13
  285. package/src/skills/specweave-jira-mapper/test-cases/test-2-import-from-jira.yaml +0 -13
  286. package/src/skills/specweave-jira-mapper/test-cases/test-3-sync-status.yaml +0 -13
  287. package/src/skills/stripe-integrator/test-cases/test-1-placeholder.yaml +0 -12
  288. package/src/skills/stripe-integrator/test-cases/test-2-placeholder.yaml +0 -12
  289. package/src/skills/stripe-integrator/test-cases/test-3-placeholder.yaml +0 -12
  290. package/src/skills/task-builder/test-cases/test-1-placeholder.yaml +0 -12
  291. package/src/skills/task-builder/test-cases/test-2-placeholder.yaml +0 -12
  292. package/src/skills/task-builder/test-cases/test-3-placeholder.yaml +0 -12
  293. package/src/templates/config.yaml +0 -351
  294. /package/src/commands/{list-increments.md → specweave.list-increments.md} +0 -0
package/SPECWEAVE.md DELETED
@@ -1,711 +0,0 @@
1
- # SpecWeave - Spec-Driven Development Framework
2
-
3
- **THIS FILE IS YOUR QUICK REFERENCE GUIDE**
4
-
5
- **Note**: `CLAUDE.md` symlink exists for backward compatibility and points to this file.
6
-
7
- This file contains quick reference for developing with SpecWeave:
8
- - Core principles and project structure
9
- - Quick reference tables (agents, skills, commands)
10
- - Links to detailed guides (loaded on-demand by agents)
11
-
12
- **For detailed workflows**: See `.specweave/docs/internal/delivery/guides/`
13
-
14
- ---
15
-
16
- ## Using SpecWeave with Slash Commands (CRITICAL)
17
-
18
- **IMPORTANT**: SpecWeave uses **EXPLICIT SLASH COMMANDS** - no auto-activation, no proactive detection!
19
-
20
- ### How SpecWeave Works
21
-
22
- SpecWeave follows the **spec-kit approach**: You MUST use slash commands explicitly.
23
-
24
- **To use SpecWeave**: Type a slash command (e.g., `/inc "Feature description"`)
25
-
26
- ### Quick Command Reference
27
-
28
- **Core Workflow** (4 commands):
29
-
30
- | Alias | Full Command | Purpose | Example |
31
- |-------|--------------|---------|---------|
32
- | `/inc` | `/increment` | **Plan Product Increment** (PM-led) | `/inc "User auth"` |
33
- | - | `/build` | Execute implementation (hooks after every task) | `/build 0001` |
34
- | - | `/validate` | Validate quality (optional LLM judge) | `/validate 0001 --quality` |
35
- | - | `/done` | Close increment (PM validates 3 gates) | `/done 0001` |
36
-
37
- **Supporting Commands**:
38
- - `/create-project` - Initialize SpecWeave project
39
- - `/list-increments` - List all increments
40
- - `/review-docs` - Review docs vs code
41
- - `/generate-docs` - Generate doc site
42
- - `/sync-github` - Sync to GitHub
43
-
44
- **Why ONE Alias (/inc)?**
45
- - ✅ `/inc` is THE most used command (every new feature starts here)
46
- - ✅ Append-only increment workflow: 0001 → 0002 → 0003 → ...
47
- - ✅ Other commands used once per increment (no aliases needed)
48
- - ✅ Clear and explicit workflow
49
-
50
- ### Typical Workflow
51
-
52
- ```bash
53
- # 1. Initialize project
54
- npx specweave init my-saas
55
-
56
- # 2. Plan your first increment (use /inc - the ONLY alias!)
57
- /inc "User authentication with JWT and RBAC"
58
-
59
- # 3. Review generated docs
60
- # spec.md, plan.md, tasks.md (auto-generated!), tests.md
61
-
62
- # 4. Build it (hooks run after EVERY task)
63
- /build 0001
64
-
65
- # 5. Validate quality (optional)
66
- /validate 0001 --quality
67
-
68
- # 6. Close when done (PM validates: tasks ✅ + tests ✅ + docs ✅)
69
- /done 0001
70
-
71
- # 7. Repeat for next feature
72
- /inc "Payment processing"
73
- ```
74
-
75
- **Remember**: Type `/inc` first, THEN build! Otherwise you lose all SpecWeave benefits (specs, architecture, auto-generated tasks, test strategy).
76
-
77
- ---
78
-
79
- ## Project Philosophy
80
-
81
- **SpecWeave** is a specification-first AI development framework where **specifications and documentation are the SOURCE OF TRUTH**. Code is the expression of these specifications in a particular language.
82
-
83
- ### Core Principles
84
-
85
- 1. **Specification Before Implementation** - Define WHAT and WHY before HOW
86
- 2. **Living Documentation** - Specs evolve with code, never diverge
87
- 3. **Regression Prevention** - Document existing code before modification
88
- 4. **Test-Validated Features** - Every feature proven through automated tests
89
- 5. **Scalable from Solo to Enterprise** - Modular structure that grows with project size
90
- 6. **Context Precision** - Load only relevant specs (70%+ token reduction)
91
- 7. **Auto-Role Routing** - Skills detect and route to appropriate expertise automatically
92
- 8. **Closed-Loop Validation** - E2E tests must tell the truth (no false positives)
93
- 9. **🔄 Meta-Capability** - Agents build agents, skills build skills, SpecWeave builds SpecWeave
94
-
95
- **See**: [.specweave/docs/internal/architecture/meta-capability.md](.specweave/docs/internal/architecture/meta-capability.md) for complete meta-capability documentation
96
-
97
- ---
98
-
99
- ## Documentation Approaches
100
-
101
- **SpecWeave supports TWO approaches**:
102
-
103
- 1. **Comprehensive Upfront** (Enterprise/Production) - 500-600+ page specifications before coding
104
- 2. **Incremental/Evolutionary** (Startup/Iterative) - Build documentation as you go
105
-
106
- Both approaches use the same framework, tools, and 5-pillar documentation structure.
107
-
108
- **See**: [.specweave/docs/internal/strategy/README.md](.specweave/docs/internal/strategy/README.md) for choosing your approach
109
-
110
- ---
111
-
112
- ## 🚨 CRITICAL: File Organization (Keep Root Clean!)
113
-
114
- **MANDATORY**: ALL AI-generated supporting files MUST go into increment folders - NEVER in project root!
115
-
116
- **✅ ALLOWED in Root**:
117
- - `CLAUDE.md` (ONLY file SpecWeave adds to user's project)
118
- - User's existing files (unchanged)
119
-
120
- **❌ NEVER Create in Root**:
121
- - Logs → `.specweave/increments/{id}/logs/`
122
- - Scripts → `.specweave/increments/{id}/scripts/`
123
- - Reports → `.specweave/increments/{id}/reports/`
124
-
125
- **Example**:
126
- ```
127
- ❌ WRONG: ✅ CORRECT:
128
- project-root/ .specweave/increments/0001-auth/
129
- ├── analysis.md ├── reports/analysis.md
130
- ├── script.py ├── scripts/script.py
131
- └── errors.log └── logs/errors.log
132
- ```
133
-
134
- **Benefits**: Complete traceability, easy cleanup, clear context, no root clutter
135
-
136
- ---
137
-
138
- ## Quick Reference: Directory Structure
139
-
140
- ```
141
- your-project/
142
- ├── .specweave/ # Framework internals
143
- │ ├── config.yaml # Project configuration
144
- │ ├── docs/ # 5-pillar documentation
145
- │ │ ├── internal/
146
- │ │ │ ├── strategy/ # Business specs (WHAT, WHY)
147
- │ │ │ ├── architecture/ # Technical design (HOW)
148
- │ │ │ ├── delivery/ # Roadmap, CI/CD, guides
149
- │ │ │ ├── operations/ # Runbooks, SLOs
150
- │ │ │ └── governance/ # Security, compliance
151
- │ │ └── public/ # Published docs
152
- │ ├── increments/ # Features (auto-numbered)
153
- │ │ └── 0001-feature-name/
154
- │ │ ├── spec.md # WHAT & WHY (< 250 lines)
155
- │ │ ├── plan.md # HOW (< 500 lines)
156
- │ │ ├── tasks.md # Implementation checklist
157
- │ │ ├── tests.md # Test strategy
158
- │ │ ├── context-manifest.yaml # What to load (70%+ token reduction)
159
- │ │ ├── logs/ # ✅ Execution logs, errors, AI sessions
160
- │ │ ├── scripts/ # ✅ Helper scripts (migration, setup, validation)
161
- │ │ └── reports/ # ✅ Analysis, completion, performance reports
162
- │ └── tests/ # Centralized test repository
163
-
164
- ├── .claude/ # Installed components
165
- │ ├── agents/ # Installed agents (selective)
166
- │ ├── skills/ # Installed skills (selective)
167
- │ └── commands/ # Slash commands
168
-
169
- ├── CLAUDE.md # This file (ONLY file we add)
170
- └── src/ # Your source code (unchanged)
171
- ```
172
-
173
- **See**: [.specweave/docs/internal/delivery/guides/development-workflow.md](.specweave/docs/internal/delivery/guides/development-workflow.md) for complete development workflow
174
-
175
- ---
176
-
177
- ## Installation
178
-
179
- **Initialize New Project**:
180
- ```bash
181
- npx specweave init # Auto-detects tech stack
182
- npx specweave init --type python # Specify tech stack
183
- ```
184
-
185
- **Selective Installation** (Recommended for user projects):
186
- ```bash
187
- npx specweave install --detect # Install only relevant agents/skills
188
- npx specweave install pm --local # Install specific component
189
- npx specweave list --installed # See what's installed
190
- ```
191
-
192
- **Token Savings**: 60-71% reduction vs installing all components!
193
-
194
- **Required Model**: Claude Sonnet 4.5 (`claude-sonnet-4-5-20250929`)
195
-
196
- **See**: [Installation Guide](#) for complete installation instructions
197
-
198
- ---
199
-
200
- ## Quick Reference: Slash Commands (MUST USE!)
201
-
202
- **CRITICAL**: SpecWeave uses **EXPLICIT SLASH COMMANDS** - type them to activate the framework!
203
-
204
- ### Core Workflow (4 Commands)
205
-
206
- | Command | Alias | Purpose | Example |
207
- |---------|-------|---------|---------|
208
- | `/increment` | `/inc` | Plan Product Increment (PM-led, auto-generates tasks) | `/inc "user authentication"` |
209
- | `/build` | - | Execute implementation (hooks after EVERY task) | `/build 0001` |
210
- | `/validate` | - | Validate quality (optional LLM judge) | `/validate 0001 --quality` |
211
- | `/done` | - | Close increment (PM validates 3 gates: tasks, tests, docs) | `/done 0001` |
212
-
213
- ### Supporting Commands
214
-
215
- | Command | Purpose | Example |
216
- |---------|---------|---------|
217
- | `/create-project` | Bootstrap new SpecWeave project | `/create-project --type python` |
218
- | `/list-increments` | List all increments with status | `/list-increments` |
219
- **All commands are framework-agnostic** (adapt to detected tech stack)
220
-
221
- **See**: [Command Reference](.claude/commands/) for all available commands
222
-
223
- ---
224
-
225
- ## Quick Reference: Core Agents
226
-
227
- **Core Agents** (Complex workflows, separate context):
228
-
229
- | Agent | Purpose | Activates When |
230
- |-------|---------|----------------|
231
- | `pm` | Product requirements, user stories | Planning features, requirements analysis |
232
- | `architect` | System design, ADRs, architecture | Technical design, architecture decisions |
233
- | `diagrams-architect` | Mermaid diagrams (C4, sequence, ER) | Creating diagrams (invoked by diagrams-generator skill) |
234
- | `security` | Threat modeling, security review | Security concerns, vulnerability assessment |
235
- | `qa-lead` | Test strategy, test cases | Testing, quality assurance |
236
- | `devops` | Infrastructure, deployment | Deployment, CI/CD, infrastructure |
237
- | `sre` | Incident response, troubleshooting | Production incidents, debugging |
238
- | `tech-lead` | Code review, best practices | Code review, refactoring |
239
- | `docs-writer` | Documentation creation | Writing docs, API documentation |
240
- | `performance` | Performance optimization, profiling | Performance issues, optimization |
241
-
242
- **Invoke via**: `Task` tool with `subagent_type` parameter
243
-
244
- **See**: [src/agents/](src/agents/) for all available agents
245
-
246
- ---
247
-
248
- ## Quick Reference: Core Skills
249
-
250
- **Framework Skills** (Core functionality):
251
-
252
- | Skill | Purpose | Activates When |
253
- |-------|---------|----------------|
254
- | `specweave-detector` | Slash command documentation | User asks about SpecWeave commands |
255
- | `increment-planner` | Plan features with context | `/inc` or `/increment` command |
256
- | `skill-router` | Route to appropriate skills | Ambiguous requests |
257
- | `context-loader` | Load context selectively | Working on increments |
258
- | `diagrams-generator` | Coordinate diagram creation | "create diagram", "draw diagram", C4, sequence, ER |
259
-
260
- **Technology Skills** (Implementation knowledge):
261
-
262
- | Skill | Purpose | Activates When |
263
- |-------|---------|----------------|
264
- | `nextjs` | Next.js App Router, Server Components | NextJS, Next.js, App Router |
265
- | `nodejs-backend` | Node.js/Express/NestJS APIs | Node.js, Express, NestJS |
266
- | `python-backend` | FastAPI/Django APIs | Python backend, FastAPI, Django |
267
- | `dotnet-backend` | ASP.NET Core APIs | .NET, C#, ASP.NET Core |
268
- | `frontend` | React/Vue/Angular frontend | React, Vue, Angular components |
269
- | `figma-implementer` | Figma to code conversion | Figma to code, implement design |
270
- | `figma-designer` | Figma design creation | Create Figma design, design system |
271
-
272
- **Integration Skills** (External tools):
273
-
274
- | Skill | Purpose | Activates When |
275
- |-------|---------|----------------|
276
- | `jira-sync` | Sync with JIRA | JIRA integration |
277
- | `ado-sync` | Sync with Azure DevOps | ADO integration |
278
- | `github-sync` | Sync with GitHub | GitHub integration |
279
- | `hetzner-provisioner` | Hetzner deployment | Deploying to Hetzner |
280
- | `cost-optimizer` | Infrastructure cost analysis | Cloud provider selection |
281
- | `specweave-jira-mapper` | SpecWeave ↔ JIRA mapping | JIRA sync, export to JIRA |
282
- | `specweave-ado-mapper` | SpecWeave ↔ ADO mapping | ADO sync, export to ADO |
283
-
284
- **Quality & Optimization Skills** (NEW):
285
-
286
- | Skill | Purpose | Activates When |
287
- |-------|---------|----------------|
288
- | `increment-quality-judge` | AI-powered quality assessment (LLM-as-judge) | Validate quality, quality check, assess spec |
289
- | `context-optimizer` | Second-pass context cleanup (80%+ reduction) | Optimize context, reduce tokens, smart context |
290
-
291
- **Skills activate automatically** based on description matching
292
-
293
- **See**: [src/skills/](src/skills/) for all available skills
294
-
295
- ---
296
-
297
- ## Quick Reference: Increment Lifecycle
298
-
299
- **Status Progression**:
300
- ```
301
- backlog → planned → in-progress → completed → closed
302
- ```
303
-
304
- **WIP Limits**:
305
- - Framework development: 2-3 in progress
306
- - User projects (solo): 1-2 in progress
307
- - User projects (team): 3-5 in progress
308
-
309
- **Naming Convention**: 4-digit format (0001-9999), e.g., `0001-feature-name`, `0042-user-auth`, `0123-payment-flow`
310
-
311
- **Commands**:
312
- ```bash
313
- /inc "feature name" # Plan increment (PM-led, auto-generates tasks)
314
- /build 0001 # Execute implementation (hooks after EVERY task)
315
- /validate 0001 --quality # Validate quality (optional)
316
- /done 0001 # Close increment (PM validates 3 gates)
317
- ```
318
-
319
- **See**: [Increment Lifecycle Guide](.specweave/docs/internal/delivery/guides/increment-lifecycle.md) for complete lifecycle management
320
-
321
- ---
322
-
323
- ## Quick Reference: Testing
324
-
325
- **Four Levels of Test Cases**:
326
-
327
- 1. **Specification** (`.specweave/docs/internal/strategy/`) - TC-0001 acceptance criteria
328
- 2. **Feature** (`.specweave/increments/0001-feature-name/tests.md`) - Test coverage matrix
329
- 3. **Skill** (`src/skills/{name}/test-cases/`) - 3+ YAML test cases (MANDATORY)
330
- 4. **Code** (`tests/`) - Automated tests (Unit, Integration, E2E)
331
-
332
- **Requirements**:
333
- - ✅ Minimum 3 test cases per skill
334
- - ✅ E2E tests (Playwright) when UI exists
335
- - ✅ >80% coverage for critical paths
336
- - ✅ Tests MUST tell the truth (no false positives)
337
-
338
- **See**: [Testing Strategy Guide](.specweave/docs/internal/delivery/guides/testing-strategy.md) for complete testing philosophy
339
-
340
- ---
341
-
342
- ## Quick Reference: Deployment
343
-
344
- **Deployment Target Detection**:
345
-
346
- Agents ask about deployment ONLY when:
347
- - User mentions "deploy", "production", "hosting"
348
- - DevOps agent is invoked
349
- - Infrastructure code is needed
350
-
351
- **Supported Targets**:
352
- - Local (Docker Compose)
353
- - Hetzner Cloud (cheapest)
354
- - Railway (easiest)
355
- - Vercel (best for Next.js)
356
- - AWS/Azure/GCP (enterprise)
357
-
358
- **Configuration**: `.specweave/config.yaml`
359
-
360
- **See**: [Deployment Intelligence Guide](.specweave/docs/internal/delivery/guides/deployment-intelligence.md) for complete deployment workflow
361
-
362
- ---
363
-
364
- ## Quick Reference: C4 Diagrams
365
-
366
- **C4 Model Levels**:
367
-
368
- | Level | SpecWeave Equivalent | Location |
369
- |-------|----------------------|----------|
370
- | C4-1: Context | HLD Context Diagram | `.specweave/docs/internal/architecture/diagrams/` |
371
- | C4-2: Container | HLD Component Diagram | `.specweave/docs/internal/architecture/diagrams/` |
372
- | C4-3: Component | LLD Component Diagram | `.specweave/docs/internal/architecture/diagrams/{module}/` |
373
- | C4-4: Code | Source code + UML | Code comments or separate docs |
374
-
375
- **CRITICAL**: C4 diagrams start DIRECTLY with `C4Context` (NO `mermaid` keyword!)
376
-
377
- **See**: [Diagram Conventions Guide](.specweave/docs/internal/delivery/guides/diagram-conventions.md) for complete diagram rules
378
-
379
- ---
380
-
381
- ## Quick Reference: Validation
382
-
383
- **Increment Validation** runs automatically on document save:
384
-
385
- **120 validation rules** across 4 categories:
386
- 1. **Consistency** (47 rules) - Spec ↔ Plan ↔ Tasks alignment
387
- 2. **Completeness** (23 rules) - All required sections present
388
- 3. **Quality** (31 rules) - Technology-agnostic, testable criteria
389
- 4. **Traceability** (19 rules) - TC-0001 → tests.md coverage
390
-
391
- **Validation happens automatically** when documents are saved. For manual quality assessment, ask Claude to "validate quality of increment 0001" to invoke the `increment-quality-judge` skill.
392
-
393
- **See**: [Increment Validation Guide](.specweave/docs/internal/delivery/guides/increment-validation.md) for complete validation workflow
394
-
395
- ---
396
-
397
- ## Detailed Guides (On-Demand Loading)
398
-
399
- **For complete details, agents load guides from** `.specweave/docs/internal/delivery/guides/`:
400
-
401
- | Guide | Purpose | Loaded By |
402
- |-------|---------|-----------|
403
- | [increment-lifecycle.md](. specweave/docs/internal/delivery/guides/increment-lifecycle.md) | Complete increment lifecycle management | `increment-planner` |
404
- | [increment-validation.md](.specweave/docs/internal/delivery/guides/increment-validation.md) | Validation workflow and rules | `increment-validator` |
405
- | [development-workflow.md](.specweave/docs/internal/delivery/guides/development-workflow.md) | Greenfield and brownfield workflows | When starting development |
406
- | [deployment-intelligence.md](.specweave/docs/internal/delivery/guides/deployment-intelligence.md) | Deployment target detection and infrastructure | `devops` agent |
407
- | [testing-strategy.md](.specweave/docs/internal/delivery/guides/testing-strategy.md) | Complete testing philosophy (4 levels) | `qa-lead` agent |
408
- | [test-import.md](.specweave/docs/internal/delivery/guides/test-import.md) | Importing existing tests | `test-importer` skill |
409
- | [diagram-conventions.md](.specweave/docs/internal/delivery/guides/diagram-conventions.md) | C4 diagrams and Mermaid syntax | `diagrams-architect` skill |
410
- | [diagram-svg-generation.md](.specweave/docs/internal/delivery/guides/diagram-svg-generation.md) | SVG generation for production docs | When building docs site |
411
-
412
- **Agents automatically load relevant guides when activated** - you don't need to manage this manually.
413
-
414
- ---
415
-
416
- ## Agents vs Skills: When to Use Which
417
-
418
- | Create Agent When | Create Skill When |
419
- |-------------------|-------------------|
420
- | Complex, multi-step workflows | Simple, focused tasks |
421
- | Needs separate context window | Can share main context |
422
- | Distinct personality/role needed | Capability extension |
423
- | Tool restrictions by role | All tools acceptable |
424
- | Long-running tasks | Quick operations |
425
- | **Example**: Security audit, PM planning | **Example**: Next.js knowledge, diagram creation |
426
-
427
- **Agents** (9 total): PM, Architect, Security, QA Lead, DevOps, SRE, Tech Lead, Docs Writer, Performance
428
- **Skills** (30+ total): Technology stacks (Next.js, Node.js, Python, .NET, Frontend), Integrations (JIRA, ADO, GitHub), Utilities (diagrams, Figma, cost optimizer)
429
-
430
- **Agents**: Invoked via `Task` tool with `subagent_type`
431
- **Skills**: Activate automatically based on description
432
-
433
- ---
434
-
435
- ## Source of Truth: src/ Folder
436
-
437
- **CRITICAL RULE**: All SpecWeave framework components (agents, skills, commands, hooks) MUST be created in `src/` folder first, then installed to `.claude/` via install script.
438
-
439
- ```
440
- src/
441
- ├── agents/ # ✅ Source of truth for ALL agents
442
- ├── skills/ # ✅ Source of truth for ALL skills
443
- ├── commands/ # ✅ Source of truth for ALL slash commands
444
- ├── hooks/ # ✅ Source of truth for ALL hooks
445
- └── templates/ # ✅ ONLY files for user's project root
446
- ```
447
-
448
- **Installation Flow**:
449
- 1. Create in `src/agents/{name}/` or `src/skills/{name}/`
450
- 2. Run `npm run install:agents` or `npm run install:skills`
451
- 3. Components copied to `.claude/`
452
-
453
- **User Projects**: Can create custom agents/skills in `.claude/` or `~/.claude/`
454
-
455
- ---
456
-
457
- ## Naming Conventions
458
-
459
- **Increments**: 4-digit format `0001-9999` (e.g., `0001-skills-framework`, `0042-user-auth`, `0123-payment-flow`)
460
- - Always zero-padded to 4 digits
461
- - Duplicate detection prevents conflicts
462
- - Examples: `0001-core-framework`, `0002-multi-tool-support`, `0003-deployment-pipeline`
463
- **Modules**: `lowercase-kebab-case` (e.g., `payments/stripe/`)
464
- **ADRs**: 4-digit format `0001-decision-title.md` (e.g., `0001-tech-stack.md`, `0042-database-choice.md`)
465
- **Test Cases**: `TC-0001`, `TC-0002` format for traceability
466
-
467
- ---
468
-
469
- ## Development Workflow Summary
470
-
471
- ### Greenfield Projects
472
-
473
- **Option A: Comprehensive Upfront** (Enterprise)
474
- 1. Create 500-600+ page specifications (`.specweave/docs/internal/strategy/`)
475
- 2. Design architecture (`.specweave/docs/internal/architecture/`)
476
- 3. Plan features in increments
477
- 4. Implement with context manifests
478
-
479
- **Option B: Incremental** (Startup)
480
- 1. Start with overview (10-20 pages)
481
- 2. Build documentation as you go
482
- 3. Add modules/specs as features are planned
483
-
484
- **See**: [Development Workflow Guide](.specweave/docs/internal/delivery/guides/development-workflow.md) for complete workflow
485
-
486
- ### Brownfield Projects
487
-
488
- 1. **Analyze** existing code (`brownfield-analyzer` skill)
489
- 2. **Document** current behavior (retroactive specs + ADRs)
490
- 3. **Create tests** for current functionality (user reviews)
491
- 4. **Plan modifications** (new increment)
492
- 5. **Implement** with regression monitoring
493
-
494
- **See**: [Development Workflow Guide](.specweave/docs/internal/delivery/guides/development-workflow.md) for brownfield details
495
-
496
- ---
497
-
498
- ## Git Workflow
499
-
500
- **Branch naming**: `features/{increment-id}-{short-name}` (use 4-digit format without leading zeros in branch name for brevity)
501
-
502
- **Workflow**:
503
- 1. Create increment folder (`.specweave/increments/0002-name/`)
504
- 2. Create feature branch (`git checkout -b features/002-name` or `features/0002-name`)
505
- 3. Implement in src/ (agents, skills, etc.)
506
- 4. Commit regularly
507
- 5. Create PR when complete
508
- 6. Merge to develop
509
-
510
- **NEVER commit directly to `develop` or `main`**
511
-
512
- **Note**: Branch names can use either `features/002-name` (3-digit for brevity) or `features/0002-name` (4-digit for consistency), but increment folders MUST always use 4-digit format.
513
-
514
- ---
515
-
516
- ## Context Precision (80%+ Token Reduction)
517
-
518
- ### Pass 1: Context Loader (70% reduction)
519
-
520
- **Context Manifests** (`.specweave/increments/0001-feature-name/context-manifest.yaml`):
521
-
522
- ```yaml
523
- spec_sections:
524
- - .specweave/docs/internal/strategy/auth/spec.md
525
- documentation:
526
- - .specweave/docs/internal/architecture/auth-design.md
527
- - .specweave/docs/internal/architecture/adr/0003-auth-method.md
528
- max_context_tokens: 10000
529
- ```
530
-
531
- **Result**: 150k tokens → 45k tokens (70% reduction)
532
-
533
- ### Pass 2: Context Optimizer (80%+ total reduction) 🆕
534
-
535
- **Smart cleanup based on user intent**:
536
-
537
- ```typescript
538
- User: "Fix login bug in authentication"
539
-
540
- Analyzer detects:
541
- • Task: Bug fix (narrow scope)
542
- • Domain: Authentication
543
- • Scope: Single endpoint
544
-
545
- Removes unneeded:
546
- ❌ payment-spec.md (different domain)
547
- ❌ PM agent (not needed for bug fix)
548
- ❌ Frontend skills (backend task)
549
-
550
- Keeps relevant:
551
- ✅ auth-spec.md (core domain)
552
- ✅ nodejs-backend skill
553
- ✅ Tech Lead agent
554
-
555
- Result: 45k → 27k tokens (additional 40% reduction)
556
- Total: 150k → 27k (82% total reduction)
557
- ```
558
-
559
- **Benefits**:
560
- - Two-pass optimization (manifest + intent)
561
- - 80%+ total token reduction
562
- - Scales to enterprise (500-1000+ page specs)
563
- - Automatic, no manual intervention
564
-
565
- **Loaded by**: `context-loader` (Pass 1) + `context-optimizer` (Pass 2)
566
-
567
- ---
568
-
569
- ## Quality Assurance (AI-Powered Quality Judge)
570
-
571
- **Optional AI-powered quality assessment** beyond rule-based validation:
572
-
573
- ### How to Use
574
-
575
- **Activate the `increment-quality-judge` skill** by asking:
576
- - "Validate quality of increment 0001"
577
- - "Quality check for increment 0003"
578
- - "Assess spec quality for authentication feature"
579
- - "How good is the spec for increment 0002?"
580
-
581
- The skill will evaluate:
582
- - **Clarity**: Are requirements clear and unambiguous?
583
- - **Testability**: Can acceptance criteria be tested?
584
- - **Completeness**: Are edge cases covered?
585
- - **Feasibility**: Is the plan technically sound?
586
- - **Maintainability**: Is the design sustainable?
587
- - **Architecture**: Are design decisions justified?
588
-
589
- **Example Output**:
590
- ```
591
- 🔍 Quality Assessment: Increment 0002-user-authentication
592
-
593
- Overall Score: 87/100 (GOOD)
594
-
595
- Dimension Scores:
596
- • Clarity: 92/100 ✓✓
597
- • Testability: 78/100 ✓ (Needs improvement)
598
- • Completeness: 90/100 ✓✓
599
- • Feasibility: 88/100 ✓✓
600
- • Maintainability: 85/100 ✓
601
- • Edge Cases: 72/100 ⚠️ (Action needed)
602
-
603
- Issues Found: 2 major, 1 minor
604
- Suggestions: 3 high priority improvements
605
- ```
606
-
607
- **Features**:
608
- - 6-dimension quality scoring
609
- - Actionable suggestions with examples
610
- - LLM-as-Judge pattern for nuanced assessment
611
- - Complements rule-based validation
612
-
613
- **Configuration**: `.specweave/config.yaml` → `validation.quality_judge`
614
-
615
- **Provided by**: `increment-quality-judge` skill
616
-
617
- ---
618
-
619
- ## Auto-Refinement (Feedback Loops) 🆕
620
-
621
- **Automatic quality improvement** through iterative refinement:
622
-
623
- ### How It Works
624
-
625
- ```
626
- Agent generates output
627
-
628
- Validate (rule-based + LLM-judge)
629
-
630
- Score < threshold? ──No──→ ✅ Accept
631
- ↓ Yes
632
- Generate feedback with issues
633
-
634
- Agent regenerates with feedback
635
- ↓ (max 3 attempts)
636
- Score improved? ──→ ✅ Accept best result
637
- ```
638
-
639
- ### Example: PM Agent with Auto-Refinement
640
-
641
- ```markdown
642
- Attempt 1/3: Generating requirements...
643
- Validation: 0.72/1.00 ⚠️ (Below threshold)
644
- Issues: Acceptance criteria not testable, missing rate limiting
645
-
646
- Attempt 2/3: Refining with feedback...
647
- Validation: 0.85/1.00 ✅ (Above threshold)
648
- Improvements: Testable criteria added, rate limiting specified
649
-
650
- ✅ Final Result: Requirements validated (0.85/1.00)
651
- ```
652
-
653
- **Features**:
654
- - Max 3 refinement attempts per agent
655
- - Stops when quality threshold met (0.80 default)
656
- - Applies to PM, Architect, QA Lead agents
657
- - Shows progress and improvements
658
- - Optional (can disable per agent)
659
-
660
- **Configuration**: `.specweave/config.yaml` → `role_orchestrator.feedback_loops`
661
-
662
- **Provided by**: `role-orchestrator` skill
663
-
664
- ---
665
-
666
- ## Summary
667
-
668
- **SpecWeave** replaces vibe coding with **Spec-Driven Development**:
669
-
670
- 1. ✅ **Specifications are SOURCE OF TRUTH** - Code expresses specs
671
- 2. ✅ **Framework-agnostic** - Works with ANY language/framework
672
- 3. ✅ **Flexible documentation** - Comprehensive upfront OR incremental
673
- 4. ✅ **Context precision** - 80%+ token reduction (two-pass optimization), scales 500-1000+ pages 🆕
674
- 5. ✅ **Auto-role routing** - Skills detect expertise automatically
675
- 6. ✅ **Deployment intelligence** - Asks about target before infrastructure
676
- 7. ✅ **Test-validated** - 3+ tests per skill, E2E when UI exists
677
- 8. ✅ **Living documentation** - Auto-update via Claude hooks
678
- 9. ✅ **Brownfield-ready** - Analyze, document, then modify safely
679
- 10. ✅ **Production-ready** - Supports enterprise scale
680
- 11. ✅ **Quality assurance** - LLM-as-judge validation with 6-dimension scoring 🆕
681
- 12. ✅ **Auto-refinement** - Feedback loops improve specs/designs automatically 🆕
682
-
683
- **This framework enables building software at ANY scale, with ANY tech stack, with confidence, clarity, minimal context usage, and automatic quality improvement.**
684
-
685
- ---
686
-
687
- **Quick Start**:
688
-
689
- **CRITICAL**: SpecWeave uses **EXPLICIT SLASH COMMANDS** - type `/inc` to activate!
690
-
691
- ```bash
692
- # Initialize project
693
- npx specweave init my-project
694
-
695
- # Plan your first increment (use slash command!)
696
- /inc "feature description"
697
-
698
- # Typical workflow (append-only increments: 0001 → 0002 → 0003)
699
- 1. /inc "feature" → PM creates specs + plan + auto-generates tasks
700
- 2. /build 0001 → Execute implementation (hooks after EVERY task)
701
- 3. /validate 0001 --quality → Optional quality check
702
- 4. /done 0001 → PM validates 3 gates (tasks ✅ + tests ✅ + docs ✅)
703
- ```
704
-
705
- **Remember**: Type `/inc` first to plan, THEN `/build` to implement! Otherwise you lose all SpecWeave benefits (specs, architecture, test strategy).
706
-
707
- **Need help?**: Type `/inc` to see examples, or ask about specific workflows.
708
-
709
- **SpecWeave Documentation**: https://spec-weave.com
710
-
711
- **Last Updated**: Auto-updated via `post-task-completion` hook