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