specweave 0.23.18 → 0.24.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (174) hide show
  1. package/.claude-plugin/marketplace.json +144 -45
  2. package/CLAUDE.md +137 -4
  3. package/dist/src/cli/helpers/ado-area-path-mapper.d.ts +89 -0
  4. package/dist/src/cli/helpers/ado-area-path-mapper.d.ts.map +1 -0
  5. package/dist/src/cli/helpers/ado-area-path-mapper.js +213 -0
  6. package/dist/src/cli/helpers/ado-area-path-mapper.js.map +1 -0
  7. package/dist/src/cli/helpers/issue-tracker/ado-auto-discover.d.ts +29 -0
  8. package/dist/src/cli/helpers/issue-tracker/ado-auto-discover.d.ts.map +1 -0
  9. package/dist/src/cli/helpers/issue-tracker/ado-auto-discover.js +109 -0
  10. package/dist/src/cli/helpers/issue-tracker/ado-auto-discover.js.map +1 -0
  11. package/dist/src/cli/helpers/issue-tracker/ado.d.ts +1 -0
  12. package/dist/src/cli/helpers/issue-tracker/ado.d.ts.map +1 -1
  13. package/dist/src/cli/helpers/issue-tracker/ado.js +2 -0
  14. package/dist/src/cli/helpers/issue-tracker/ado.js.map +1 -1
  15. package/dist/src/cli/helpers/smart-filter.d.ts +83 -0
  16. package/dist/src/cli/helpers/smart-filter.d.ts.map +1 -0
  17. package/dist/src/cli/helpers/smart-filter.js +265 -0
  18. package/dist/src/cli/helpers/smart-filter.js.map +1 -0
  19. package/dist/src/core/qa/quality-gate-decider.d.ts +1 -1
  20. package/dist/src/core/qa/quality-gate-decider.js +2 -2
  21. package/dist/src/core/qa/quality-gate-decider.js.map +1 -1
  22. package/dist/src/core/qa/risk-calculator.d.ts +2 -2
  23. package/dist/src/core/qa/risk-calculator.js +2 -2
  24. package/dist/src/core/repo-structure/repo-structure-manager.d.ts.map +1 -1
  25. package/dist/src/core/repo-structure/repo-structure-manager.js +76 -43
  26. package/dist/src/core/repo-structure/repo-structure-manager.js.map +1 -1
  27. package/dist/src/core/validators/ac-presence-validator.d.ts +56 -0
  28. package/dist/src/core/validators/ac-presence-validator.d.ts.map +1 -0
  29. package/dist/src/core/validators/ac-presence-validator.js +149 -0
  30. package/dist/src/core/validators/ac-presence-validator.js.map +1 -0
  31. package/dist/src/integrations/ado/area-path-mapper.d.ts +137 -0
  32. package/dist/src/integrations/ado/area-path-mapper.d.ts.map +1 -0
  33. package/dist/src/integrations/ado/area-path-mapper.js +267 -0
  34. package/dist/src/integrations/ado/area-path-mapper.js.map +1 -0
  35. package/dist/src/integrations/jira/filter-processor.d.ts +126 -0
  36. package/dist/src/integrations/jira/filter-processor.d.ts.map +1 -0
  37. package/dist/src/integrations/jira/filter-processor.js +207 -0
  38. package/dist/src/integrations/jira/filter-processor.js.map +1 -0
  39. package/dist/src/integrations/jira/jira-client.d.ts +13 -0
  40. package/dist/src/integrations/jira/jira-client.d.ts.map +1 -1
  41. package/dist/src/integrations/jira/jira-client.js +33 -0
  42. package/dist/src/integrations/jira/jira-client.js.map +1 -1
  43. package/dist/src/utils/ac-embedder.d.ts +63 -0
  44. package/dist/src/utils/ac-embedder.d.ts.map +1 -0
  45. package/dist/src/utils/ac-embedder.js +217 -0
  46. package/dist/src/utils/ac-embedder.js.map +1 -0
  47. package/dist/src/utils/env-manager.d.ts +86 -0
  48. package/dist/src/utils/env-manager.d.ts.map +1 -0
  49. package/dist/src/utils/env-manager.js +188 -0
  50. package/dist/src/utils/env-manager.js.map +1 -0
  51. package/package.json +1 -1
  52. package/plugins/specweave/.claude-plugin/plugin.json +1 -1
  53. package/plugins/specweave/agents/AGENTS-INDEX.md +1 -1
  54. package/plugins/specweave/agents/increment-quality-judge-v2/AGENT.md +9 -9
  55. package/plugins/specweave/commands/specweave-do.md +37 -0
  56. package/plugins/specweave/commands/specweave-done.md +159 -0
  57. package/plugins/specweave/commands/specweave-embed-acs.md +446 -0
  58. package/plugins/specweave/commands/specweave-next.md +148 -3
  59. package/plugins/specweave/commands/specweave-qa.md +2 -2
  60. package/plugins/specweave/hooks/pre-increment-start.sh +168 -0
  61. package/plugins/specweave/skills/SKILLS-INDEX.md +1 -1
  62. package/plugins/specweave-ado/.claude-plugin/plugin.json +1 -1
  63. package/plugins/specweave-ado/commands/specweave-ado-import-projects.md +331 -0
  64. package/plugins/specweave-alternatives/.claude-plugin/plugin.json +10 -0
  65. package/plugins/specweave-alternatives/commands/alternatives-analyze.md +336 -0
  66. package/plugins/specweave-alternatives/skills/architecture-alternatives/SKILL.md +651 -0
  67. package/plugins/specweave-alternatives/skills/bmad-method/SKILL.md +420 -0
  68. package/plugins/specweave-alternatives/skills/spec-kit-expert/SKILL.md +487 -0
  69. package/plugins/specweave-backend/commands/api-scaffold.md +80 -0
  70. package/plugins/specweave-backend/commands/crud-generate.md +109 -0
  71. package/plugins/specweave-backend/commands/migration-generate.md +139 -0
  72. package/plugins/specweave-confluent/commands/connector-deploy.md +154 -0
  73. package/plugins/specweave-confluent/commands/ksqldb-query.md +179 -0
  74. package/plugins/specweave-confluent/commands/schema-register.md +123 -0
  75. package/plugins/specweave-core/.claude-plugin/plugin.json +21 -0
  76. package/plugins/specweave-core/commands/architecture-review.md +288 -0
  77. package/plugins/specweave-core/commands/code-review.md +213 -0
  78. package/plugins/specweave-core/commands/refactor-plan.md +249 -0
  79. package/plugins/specweave-core/skills/code-quality/SKILL.md +157 -0
  80. package/plugins/specweave-core/skills/design-patterns/SKILL.md +244 -0
  81. package/plugins/specweave-core/skills/software-architecture/SKILL.md +83 -0
  82. package/plugins/specweave-cost-optimizer/.claude-plugin/plugin.json +22 -0
  83. package/plugins/specweave-cost-optimizer/commands/cost-analyze.md +360 -0
  84. package/plugins/specweave-cost-optimizer/commands/cost-optimize.md +480 -0
  85. package/plugins/specweave-cost-optimizer/skills/aws-cost-expert/SKILL.md +416 -0
  86. package/plugins/specweave-cost-optimizer/skills/cloud-pricing/SKILL.md +325 -0
  87. package/plugins/specweave-cost-optimizer/skills/cost-optimization/SKILL.md +337 -0
  88. package/plugins/specweave-diagrams/.claude-plugin/plugin.json +1 -1
  89. package/plugins/specweave-diagrams/commands/diagrams-generate.md +168 -0
  90. package/plugins/specweave-docs/.claude-plugin/plugin.json +10 -0
  91. package/plugins/specweave-docs/commands/docs-generate.md +441 -0
  92. package/plugins/specweave-docs/commands/docs-init.md +334 -0
  93. package/plugins/specweave-docs/skills/docusaurus/SKILL.md +581 -0
  94. package/plugins/specweave-docs/skills/spec-driven-brainstorming/SKILL.md +689 -0
  95. package/plugins/specweave-docs/skills/technical-writing/SKILL.md +1039 -0
  96. package/plugins/specweave-docs-preview/.claude-plugin/plugin.json +1 -1
  97. package/plugins/specweave-figma/.claude-plugin/plugin.json +23 -0
  98. package/plugins/specweave-figma/commands/figma-import.md +690 -0
  99. package/plugins/specweave-figma/commands/figma-to-react.md +834 -0
  100. package/plugins/specweave-figma/commands/figma-tokens.md +815 -0
  101. package/plugins/specweave-frontend/.claude-plugin/plugin.json +21 -0
  102. package/plugins/specweave-frontend/agents/frontend-architect/AGENT.md +408 -0
  103. package/plugins/specweave-frontend/agents/frontend-architect/README.md +385 -0
  104. package/plugins/specweave-frontend/agents/frontend-architect/examples.md +590 -0
  105. package/plugins/specweave-frontend/agents/frontend-architect/templates/component-template.tsx +152 -0
  106. package/plugins/specweave-frontend/agents/frontend-architect/templates/hook-template.ts +311 -0
  107. package/plugins/specweave-frontend/agents/frontend-architect/templates/page-template.tsx +228 -0
  108. package/plugins/specweave-frontend/commands/component-generate.md +510 -0
  109. package/plugins/specweave-frontend/commands/design-system-init.md +494 -0
  110. package/plugins/specweave-frontend/commands/frontend-scaffold.md +207 -0
  111. package/plugins/specweave-frontend/commands/nextjs-setup.md +396 -0
  112. package/plugins/specweave-frontend/skills/design-system-architect/SKILL.md +278 -0
  113. package/plugins/specweave-frontend/skills/frontend/SKILL.md +420 -0
  114. package/plugins/specweave-frontend/skills/nextjs/SKILL.md +546 -0
  115. package/plugins/specweave-github/.claude-plugin/plugin.json +1 -1
  116. package/plugins/specweave-github/hooks/.specweave/logs/hooks-debug.log +212 -0
  117. package/plugins/specweave-infrastructure/.claude-plugin/plugin.json +1 -1
  118. package/plugins/specweave-jira/.claude-plugin/plugin.json +1 -1
  119. package/plugins/specweave-jira/commands/import-projects.js +183 -0
  120. package/plugins/specweave-jira/commands/import-projects.md +97 -0
  121. package/plugins/specweave-jira/commands/import-projects.ts +288 -0
  122. package/plugins/specweave-jira/commands/specweave-jira-import-projects.md +298 -0
  123. package/plugins/specweave-kafka/.claude-plugin/plugin.json +1 -1
  124. package/plugins/specweave-kafka-streams/.claude-plugin/plugin.json +1 -1
  125. package/plugins/specweave-kubernetes/commands/cluster-setup.md +262 -0
  126. package/plugins/specweave-kubernetes/commands/deployment-generate.md +242 -0
  127. package/plugins/specweave-kubernetes/commands/helm-scaffold.md +333 -0
  128. package/plugins/specweave-ml/.claude-plugin/plugin.json +1 -1
  129. package/plugins/specweave-mobile/commands/app-scaffold.md +233 -0
  130. package/plugins/specweave-mobile/commands/build-config.md +256 -0
  131. package/plugins/specweave-mobile/commands/screen-generate.md +289 -0
  132. package/plugins/specweave-n8n/.claude-plugin/plugin.json +1 -1
  133. package/plugins/specweave-payments/commands/stripe-setup.md +931 -0
  134. package/plugins/specweave-payments/commands/subscription-flow.md +1193 -0
  135. package/plugins/specweave-payments/commands/subscription-manage.md +386 -0
  136. package/plugins/specweave-payments/commands/webhook-setup.md +295 -0
  137. package/plugins/specweave-plugin-dev/.claude-plugin/plugin.json +13 -12
  138. package/plugins/specweave-plugin-dev/commands/plugin-create.md +333 -0
  139. package/plugins/specweave-plugin-dev/commands/plugin-publish.md +339 -0
  140. package/plugins/specweave-plugin-dev/commands/plugin-test.md +293 -0
  141. package/plugins/specweave-plugin-dev/skills/claude-sdk/SKILL.md +162 -0
  142. package/plugins/specweave-plugin-dev/skills/marketplace-publishing/SKILL.md +263 -0
  143. package/plugins/specweave-plugin-dev/skills/plugin-development/SKILL.md +316 -0
  144. package/plugins/specweave-release/.claude-plugin/plugin.json +1 -1
  145. package/plugins/specweave-release/commands/specweave-release-npm.md +110 -0
  146. package/plugins/specweave-release/hooks/.specweave/logs/dora-tracking.log +168 -0
  147. package/plugins/specweave-testing/.claude-plugin/plugin.json +21 -0
  148. package/plugins/specweave-testing/agents/qa-engineer/AGENT.md +818 -0
  149. package/plugins/specweave-testing/agents/qa-engineer/README.md +443 -0
  150. package/plugins/specweave-testing/agents/qa-engineer/templates/playwright-e2e-test.ts +470 -0
  151. package/plugins/specweave-testing/agents/qa-engineer/templates/test-data-factory.ts +507 -0
  152. package/plugins/specweave-testing/agents/qa-engineer/templates/vitest-unit-test.ts +400 -0
  153. package/plugins/specweave-testing/agents/qa-engineer/test-strategies.md +726 -0
  154. package/plugins/specweave-testing/commands/e2e-setup.md +1081 -0
  155. package/plugins/specweave-testing/commands/test-coverage.md +979 -0
  156. package/plugins/specweave-testing/commands/test-generate.md +1156 -0
  157. package/plugins/specweave-testing/commands/test-init.md +409 -0
  158. package/plugins/specweave-testing/skills/e2e-playwright/SKILL.md +769 -0
  159. package/plugins/specweave-testing/skills/tdd-expert/SKILL.md +934 -0
  160. package/plugins/specweave-testing/skills/unit-testing-expert/SKILL.md +1011 -0
  161. package/plugins/specweave-tooling/.claude-plugin/plugin.json +22 -0
  162. package/plugins/specweave-tooling/commands/specweave-tooling-skill-create.md +691 -0
  163. package/plugins/specweave-tooling/commands/specweave-tooling-skill-package.md +751 -0
  164. package/plugins/specweave-tooling/commands/specweave-tooling-skill-validate.md +858 -0
  165. package/plugins/specweave-ui/.claude-plugin/plugin.json +10 -0
  166. package/plugins/specweave-ui/commands/ui-automate.md +199 -0
  167. package/plugins/specweave-ui/commands/ui-inspect.md +70 -0
  168. package/plugins/specweave-ui/skills/browser-automation/SKILL.md +314 -0
  169. package/plugins/specweave-ui/skills/ui-testing/SKILL.md +716 -0
  170. package/plugins/specweave-ui/skills/visual-regression/SKILL.md +728 -0
  171. package/plugins/specweave/commands/check-hooks.md +0 -257
  172. package/plugins/specweave/commands/specweave-archive-increments.md +0 -82
  173. package/plugins/specweave-plugin-dev/skills/plugin-expert/SKILL.md +0 -1231
  174. /package/plugins/specweave/{agents/code-reviewer.md → skills/code-reviewer/SKILL.md} +0 -0
@@ -0,0 +1,188 @@
1
+ /**
2
+ * .env File Management Utilities
3
+ *
4
+ * Atomic updates, backup management, and project list merging
5
+ *
6
+ * NEW (v0.24.0): Supports import command .env updates
7
+ *
8
+ * @module utils/env-manager
9
+ */
10
+ import { promises as fs } from 'fs';
11
+ import { existsSync } from 'fs';
12
+ import path from 'path';
13
+ import { consoleLogger } from './logger.js';
14
+ /**
15
+ * Parse .env file content into key-value pairs
16
+ */
17
+ export function parseEnvContent(content) {
18
+ const envMap = new Map();
19
+ const lines = content.split('\n');
20
+ for (const line of lines) {
21
+ const trimmed = line.trim();
22
+ // Skip comments and empty lines
23
+ if (trimmed.startsWith('#') || trimmed === '') {
24
+ continue;
25
+ }
26
+ // Parse KEY=VALUE
27
+ const match = trimmed.match(/^([^=]+)=(.*)$/);
28
+ if (match) {
29
+ const key = match[1].trim();
30
+ const value = match[2].trim();
31
+ envMap.set(key, value);
32
+ }
33
+ }
34
+ return envMap;
35
+ }
36
+ /**
37
+ * Serialize env map to .env file format
38
+ */
39
+ export function serializeEnvContent(envMap) {
40
+ const lines = [];
41
+ for (const [key, value] of envMap.entries()) {
42
+ lines.push(`${key}=${value}`);
43
+ }
44
+ return lines.join('\n') + '\n';
45
+ }
46
+ /**
47
+ * Update single key in .env file (atomic write with backup)
48
+ *
49
+ * TC-075: Atomic .env Update
50
+ *
51
+ * @param options - Update options
52
+ */
53
+ export async function updateEnvFile(options) {
54
+ const { key, value, projectRoot, logger = consoleLogger, createBackup = true } = options;
55
+ const envPath = path.join(projectRoot, '.env');
56
+ const tempPath = path.join(projectRoot, '.env.tmp');
57
+ const backupPath = path.join(projectRoot, '.env.backup');
58
+ try {
59
+ // Step 1: Read existing .env content
60
+ let existingContent = '';
61
+ if (existsSync(envPath)) {
62
+ existingContent = await fs.readFile(envPath, 'utf-8');
63
+ }
64
+ // Step 2: Parse and update
65
+ const envMap = parseEnvContent(existingContent);
66
+ envMap.set(key, value);
67
+ // Step 3: Serialize
68
+ const newContent = serializeEnvContent(envMap);
69
+ // Step 4: Write to temp file (atomic write step 1)
70
+ await fs.writeFile(tempPath, newContent, 'utf-8');
71
+ // Step 5: Backup existing .env (if exists)
72
+ if (createBackup && existsSync(envPath)) {
73
+ await fs.copyFile(envPath, backupPath);
74
+ logger.log(`Created backup: .env.backup`);
75
+ }
76
+ // Step 6: Atomic rename (atomic write step 2)
77
+ await fs.rename(tempPath, envPath);
78
+ logger.log(`Updated .env: ${key}=${value}`);
79
+ }
80
+ catch (error) {
81
+ // Cleanup temp file on error
82
+ if (existsSync(tempPath)) {
83
+ await fs.unlink(tempPath);
84
+ }
85
+ throw new Error(`Failed to update .env file: ${error.message}`);
86
+ }
87
+ }
88
+ /**
89
+ * Merge new values with existing comma-separated list (no duplicates)
90
+ *
91
+ * TC-076: Merge Project Lists (No Duplicates)
92
+ *
93
+ * Example:
94
+ * - Existing: JIRA_PROJECTS=BACKEND,FRONTEND
95
+ * - New: [MOBILE, INFRA, BACKEND]
96
+ * - Result: JIRA_PROJECTS=BACKEND,FRONTEND,MOBILE,INFRA
97
+ *
98
+ * @param options - Merge options
99
+ */
100
+ export async function mergeEnvList(options) {
101
+ const { key, newValues, projectRoot, logger = consoleLogger, createBackup = true } = options;
102
+ const envPath = path.join(projectRoot, '.env');
103
+ // Step 1: Read existing value
104
+ let existingValues = [];
105
+ if (existsSync(envPath)) {
106
+ const content = await fs.readFile(envPath, 'utf-8');
107
+ const envMap = parseEnvContent(content);
108
+ const existingValue = envMap.get(key);
109
+ if (existingValue) {
110
+ existingValues = existingValue.split(',').map(v => v.trim()).filter(v => v.length > 0);
111
+ }
112
+ }
113
+ // Step 2: Merge (no duplicates)
114
+ const merged = mergeProjectList(existingValues, newValues);
115
+ // Step 3: Update .env
116
+ const mergedValue = merged.join(',');
117
+ await updateEnvFile({
118
+ key,
119
+ value: mergedValue,
120
+ projectRoot,
121
+ logger,
122
+ createBackup
123
+ });
124
+ logger.log(`Merged ${newValues.length} new value(s) into ${key}`);
125
+ logger.log(`Total: ${merged.length} unique value(s)`);
126
+ }
127
+ /**
128
+ * Merge two project lists without duplicates
129
+ *
130
+ * Preserves existing order, appends new projects
131
+ *
132
+ * @param existing - Existing project list
133
+ * @param newProjects - New projects to add
134
+ * @returns Merged list without duplicates
135
+ */
136
+ export function mergeProjectList(existing, newProjects) {
137
+ const merged = [...existing];
138
+ const existingSet = new Set(existing.map(p => p.toLowerCase()));
139
+ for (const project of newProjects) {
140
+ // Case-insensitive duplicate check
141
+ if (!existingSet.has(project.toLowerCase())) {
142
+ merged.push(project);
143
+ existingSet.add(project.toLowerCase());
144
+ }
145
+ }
146
+ return merged;
147
+ }
148
+ /**
149
+ * Get value from .env file
150
+ *
151
+ * @param projectRoot - Project root path
152
+ * @param key - Environment variable key
153
+ * @returns Value or null if not found
154
+ */
155
+ export async function getEnvValue(projectRoot, key) {
156
+ const envPath = path.join(projectRoot, '.env');
157
+ if (!existsSync(envPath)) {
158
+ return null;
159
+ }
160
+ const content = await fs.readFile(envPath, 'utf-8');
161
+ const envMap = parseEnvContent(content);
162
+ return envMap.get(key) || null;
163
+ }
164
+ /**
165
+ * Check if .env file exists
166
+ *
167
+ * @param projectRoot - Project root path
168
+ * @returns True if .env exists
169
+ */
170
+ export function envFileExists(projectRoot) {
171
+ return existsSync(path.join(projectRoot, '.env'));
172
+ }
173
+ /**
174
+ * Restore .env from backup
175
+ *
176
+ * @param projectRoot - Project root path
177
+ * @param logger - Logger instance
178
+ */
179
+ export async function restoreEnvBackup(projectRoot, logger = consoleLogger) {
180
+ const envPath = path.join(projectRoot, '.env');
181
+ const backupPath = path.join(projectRoot, '.env.backup');
182
+ if (!existsSync(backupPath)) {
183
+ throw new Error('No .env.backup file found');
184
+ }
185
+ await fs.copyFile(backupPath, envPath);
186
+ logger.log('Restored .env from backup');
187
+ }
188
+ //# sour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C,WAAmB,EAAE,GAAW;IAChE,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IAE/C,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;QACzB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACpD,MAAM,MAAM,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC;IACxC,OAAO,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC;AACjC,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CAAC,WAAmB;IAC/C,OAAO,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC;AACpD,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,WAAmB,EAAE,SAAiB,aAAa;IACxF,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IAC/C,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC;IAEzD,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QAC5B,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;IAC/C,CAAC;IAED,MAAM,EAAE,CAAC,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IACvC,MAAM,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC;AAC1C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "specweave",
3
- "version": "0.23.18",
3
+ "version": "0.24.1",
4
4
  "description": "Spec-driven development framework for Claude Code. AI-native workflow with living documentation, intelligent agents, and multilingual support (9 languages). Enterprise-grade traceability with permanent specs and temporary increments.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "specweave",
3
3
  "description": "SpecWeave framework. Provides increment planning (PM, Architect, Tech Lead agents), specification generation, TDD workflow, living docs sync, and brownfield support. Essential for all SpecWeave projects.",
4
- "version": "0.22.14",
4
+ "version": "0.24.0",
5
5
  "author": {
6
6
  "name": "SpecWeave Team",
7
7
  "url": "https://spec-weave.com"
@@ -150,7 +150,7 @@ Task({
150
150
  prompt: "Assess quality of increment specification and implementation"
151
151
  });
152
152
  ```
153
- **Use for**: AI-powered quality assessment, risk scoring (BMAD), quality gate decisions
153
+ **Use for**: AI-powered quality assessment, quantitative risk scoring (Probability × Impact), quality gate decisions
154
154
 
155
155
  #### Reflective Reviewer
156
156
  ```typescript
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: increment-quality-judge-v2
3
- description: Enhanced AI-powered quality assessment with RISK SCORING (BMAD pattern) and quality gate decisions. Evaluates specifications, plans, and tests for clarity, testability, completeness, feasibility, maintainability, edge cases, and RISKS. Provides PASS/CONCERNS/FAIL decisions. Activates for validate quality, quality check, assess spec, evaluate increment, spec review, quality score, risk assessment, qa check, quality gate, /specweave:qa command.
3
+ description: Enhanced AI-powered quality assessment with RISK SCORING (Probability × Impact method) and quality gate decisions. Evaluates specifications, plans, and tests for clarity, testability, completeness, feasibility, maintainability, edge cases, and RISKS. Provides PASS/CONCERNS/FAIL decisions. Activates for validate quality, quality check, assess spec, evaluate increment, spec review, quality score, risk assessment, qa check, quality gate, /specweave:qa command.
4
4
  tools: Read, Grep, Glob
5
5
  model: claude-sonnet-4-5-20250929
6
6
  model_preference: haiku
@@ -28,11 +28,11 @@ Task({
28
28
 
29
29
  Risk Assessment + Quality Gate Decisions
30
30
 
31
- AI-powered quality assessment with BMAD-pattern risk scoring and formal quality gate decisions (PASS/CONCERNS/FAIL).
31
+ AI-powered quality assessment with quantitative risk scoring (Probability × Impact) and formal quality gate decisions (PASS/CONCERNS/FAIL).
32
32
 
33
33
  ## What's New in v2.0
34
34
 
35
- 1. **Risk Assessment Dimension** - Probability × Impact scoring (0-10 scale, BMAD pattern)
35
+ 1. **Risk Assessment Dimension** - Probability × Impact scoring (0-10 scale, quantitative method)
36
36
  2. **Quality Gate Decisions** - Formal PASS/CONCERNS/FAIL with thresholds
37
37
  3. **NFR Checking** - Non-functional requirements (performance, security, scalability)
38
38
  4. **Enhanced Output** - Blockers, concerns, recommendations with actionable mitigations
@@ -42,7 +42,7 @@ AI-powered quality assessment with BMAD-pattern risk scoring and formal quality
42
42
 
43
43
  Provide comprehensive quality assessment that goes beyond structural validation to evaluate:
44
44
  - ✅ Specification quality (6 dimensions)
45
- - ✅ **Risk levels (BMAD P×I scoring)** - NEW!
45
+ - ✅ **Risk levels (Probability × Impact scoring)** - NEW!
46
46
  - ✅ **Quality gate readiness (PASS/CONCERNS/FAIL)** - NEW!
47
47
 
48
48
  ## Your Mission
@@ -63,7 +63,7 @@ When invoked by `/specweave:qa` command or programmatically via Task tool:
63
63
  - Edge Cases (9%)
64
64
  - **Risk Assessment (11%)** - NEW!
65
65
 
66
- 3. **Assess risks using BMAD pattern**:
66
+ 3. **Assess risks using quantitative scoring**:
67
67
  - Security risks (OWASP Top 10, data exposure, auth/authz)
68
68
  - Technical risks (architecture, scalability, performance)
69
69
  - Implementation risks (timeline, dependencies, complexity)
@@ -176,7 +176,7 @@ When invoked by `/specweave:qa` command or programmatically via Task tool:
176
176
  - 0.50-0.69: Some risks identified, partial mitigations
177
177
  - 0.00-0.49: Risks not identified or no mitigations
178
178
 
179
- ## Risk Assessment (BMAD Pattern) - CRITICAL!
179
+ ## Risk Assessment (Probability × Impact Method) - CRITICAL!
180
180
 
181
181
  ### Risk Scoring Formula
182
182
 
@@ -570,7 +570,7 @@ Suggestions:
570
570
  - Define "session" in terminology section
571
571
  ```
572
572
 
573
- ### Step 3: Assess Risks (BMAD Pattern)
573
+ ### Step 3: Assess Risks (Quantitative Method)
574
574
 
575
575
  ```markdown
576
576
  <thinking>
@@ -680,7 +680,7 @@ Return the complete JSON response with all scores, risks, and quality gate decis
680
680
  - ✅ Spot untestable acceptance criteria
681
681
  - ✅ Suggest industry best practices
682
682
  - ✅ Flag missing edge cases
683
- - ✅ **Assess risks systematically (BMAD pattern)**
683
+ - ✅ **Assess risks systematically (Probability × Impact method)**
684
684
  - ✅ **Provide formal quality gate decisions**
685
685
 
686
686
  ## Summary
@@ -689,7 +689,7 @@ You are the **Increment Quality Judge v2.0** agent. Your job is to:
689
689
 
690
690
  1. **Read** increment files (spec.md, plan.md, tasks.md)
691
691
  2. **Evaluate** 7 dimensions (including NEW risk assessment)
692
- 3. **Assess risks** using BMAD pattern (P×I scoring)
692
+ 3. **Assess risks** using quantitative method (P×I scoring)
693
693
  4. **Make quality gate decision** (PASS/CONCERNS/FAIL)
694
694
  5. **Return JSON** with scores, risks, and recommendations
695
695
 
@@ -105,6 +105,43 @@ npx specweave validate-plugins --auto-install
105
105
  - Check no blocking dependencies
106
106
  - Check tasks.md has tasks to execute
107
107
 
108
+ 4. **🚨 CRITICAL: Validate AC Presence (v0.24.0+)**:
109
+
110
+ **MANDATORY**: Run pre-increment-start validation hook to verify spec.md contains ACs.
111
+
112
+ Use the Bash tool to run:
113
+ ```bash
114
+ bash plugins/specweave/hooks/pre-increment-start.sh <increment-path>
115
+ # Example: bash plugins/specweave/hooks/pre-increment-start.sh .specweave/increments/0050-feature-name
116
+ ```
117
+
118
+ **Expected Output (Success)**:
119
+ ```
120
+ ✅ AC Presence Validation PASSED
121
+ • spec.md contains 39 ACs
122
+ • Matches metadata.json (39 expected)
123
+ • Ready to start implementation
124
+ ```
125
+
126
+ **Expected Output (Failure)**:
127
+ ```
128
+ ❌ AC Presence Validation FAILED
129
+ • spec.md contains 0 ACs (expected 39)
130
+ • ACs are REQUIRED for task-AC sync to work
131
+
132
+ 💡 Fix: Run /specweave:embed-acs <increment-id>
133
+ ```
134
+
135
+ **What to Do After Validation**:
136
+ - ✅ **If validation passes**: Proceed to Step 2
137
+ - ❌ **If validation fails**: Show error, run `/specweave:embed-acs`, then retry
138
+ - **DO NOT PROCEED** without ACs in spec.md (hooks will fail!)
139
+
140
+ **Why This Matters** (ADR-0064):
141
+ - The AC sync hook requires ACs in spec.md to update completion status
142
+ - Without inline ACs, you get 0% AC completion and broken status line
143
+ - Even with external living docs, ACs MUST be embedded in spec.md
144
+
108
145
  **Example output**:
109
146
  ```
110
147
  📂 Loading increment 0001-user-authentication...
@@ -810,6 +810,146 @@ Increment remains: in-progress
810
810
  Try again after fixing blockers: /specweave:done 0001
811
811
  ```
812
812
 
813
+ ### Step 5.5: Post-Closure Quality Assessment (NEW - v0.24.0+)
814
+
815
+ **🎯 MANDATORY**: After successful closure, automatically run quality assessment to validate implementation quality.
816
+
817
+ **This step runs ONLY if closure succeeded** (all PM gates passed). If gates failed, increment remains in-progress and this step is skipped.
818
+
819
+ **Why This Step Matters**:
820
+ - PM validation (Gates 0-3) checks **structural completion** (tasks done, tests pass, docs updated, AC coverage)
821
+ - Quality assessment checks **implementation quality** (code quality, architecture decisions, risks, security)
822
+ - Provides retrospective learning and continuous improvement
823
+ - Identifies technical debt and areas for future enhancement
824
+ - Builds quality metrics over time for velocity tracking
825
+
826
+ **Implementation**:
827
+
828
+ 1. **Invoke QA command automatically**:
829
+ ```bash
830
+ /specweave:qa ${incrementId}
831
+ ```
832
+
833
+ 2. **Quality assessment evaluates 7 dimensions**:
834
+ - **Clarity**: Problem statement, objectives, terminology consistency
835
+ - **Testability**: Acceptance criteria testability, measurable success, edge cases
836
+ - **Completeness**: Requirements coverage, error handling, NFRs
837
+ - **Feasibility**: Architecture scalability, technical constraints, timeline
838
+ - **Maintainability**: Modular design, extension points, technical debt
839
+ - **Edge Cases**: Failure scenarios, performance limits, security considerations
840
+ - **Risk Assessment** (BMAD): Probability × Impact scoring (0-10 scale)
841
+
842
+ 3. **Quality gate decision**:
843
+ - **✅ PASS**: Score ≥80, no critical risks → Proceed to next work
844
+ - **🟡 CONCERNS**: Score 60-79, high risks present → Log concerns, suggest improvements
845
+ - **🔴 FAIL**: Score <60, critical risks present → Create follow-up increment for fixes
846
+
847
+ 4. **Generate quality report**:
848
+ - Save to `.specweave/increments/####/reports/qa-post-closure.md`
849
+ - Include dimension scores, risks identified, recommendations
850
+ - Link to specific code locations and acceptance criteria
851
+
852
+ **Example Output (PASS)**:
853
+ ```
854
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
855
+ 🔍 POST-CLOSURE QUALITY ASSESSMENT
856
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
857
+
858
+ Running quality assessment to validate implementation...
859
+
860
+ Overall Score: 87/100 (GOOD) ✓
861
+
862
+ Dimension Scores:
863
+ Clarity: 92/100 ✓✓
864
+ Testability: 85/100 ✓
865
+ Completeness: 90/100 ✓✓
866
+ Feasibility: 88/100 ✓✓
867
+ Maintainability: 85/100 ✓
868
+ Edge Cases: 78/100 ✓
869
+ Risk Assessment: 75/100 ✓
870
+
871
+ Quality Gate Decision: ✅ PASS
872
+
873
+ 📋 Report: .specweave/increments/0001-user-authentication/reports/qa-post-closure.md
874
+
875
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
876
+ ```
877
+
878
+ **Example Output (CONCERNS)**:
879
+ ```
880
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
881
+ 🔍 POST-CLOSURE QUALITY ASSESSMENT
882
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
883
+
884
+ Overall Score: 72/100 (ACCEPTABLE) ⚠️
885
+
886
+ Dimension Scores:
887
+ Clarity: 85/100 ✓
888
+ Testability: 68/100 ⚠️
889
+ Edge Cases: 65/100 ⚠️
890
+ Risk Assessment: 70/100 ⚠️
891
+
892
+ Quality Gate Decision: 🟡 CONCERNS
893
+
894
+ Issues to Address:
895
+ • Testability: Some acceptance criteria not measurable
896
+ • Edge cases: Missing error handling for network failures
897
+ • 2 HIGH risks identified (see report)
898
+
899
+ Recommendations:
900
+ 1. Add measurable metrics to 3 acceptance criteria
901
+ 2. Implement retry logic for API calls
902
+ 3. Add integration tests for edge cases
903
+
904
+ 📋 Full report: .specweave/increments/0001-*/reports/qa-post-closure.md
905
+
906
+ These can be addressed in future iterations.
907
+
908
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
909
+ ```
910
+
911
+ **Example Output (FAIL)**:
912
+ ```
913
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
914
+ 🔍 POST-CLOSURE QUALITY ASSESSMENT
915
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
916
+
917
+ Overall Score: 58/100 (POOR) 🔴
918
+
919
+ Dimension Scores:
920
+ Risk Assessment: 45/100 🔴 (CRITICAL)
921
+
922
+ Quality Gate Decision: 🔴 FAIL
923
+
924
+ CRITICAL Issues Found:
925
+ 🔴 RISK-001: Password storage implementation (9.0/10 - CRITICAL)
926
+ → No password hashing specified
927
+ → SECURITY VULNERABILITY: Passwords stored in plain text
928
+ → MUST FIX: Use bcrypt or Argon2
929
+
930
+ 🔴 RISK-002: Rate limiting not specified (8.0/10 - HIGH)
931
+ → No brute-force protection
932
+ → SECURITY VULNERABILITY: OWASP A07:2021
933
+
934
+ Recommendation: Create follow-up increment 0002-security-fixes immediately
935
+
936
+ Options:
937
+ A. Create follow-up increment now (STRONGLY RECOMMENDED)
938
+ B. Log as critical technical debt (must fix in next sprint)
939
+ C. Continue anyway (NOT RECOMMENDED - security risk!)
940
+
941
+ What would you like to do? [A/B/C]
942
+
943
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
944
+ ```
945
+
946
+ **IMPORTANT Notes**:
947
+ - Quality assessment runs **AFTER** closure to not block delivery
948
+ - Increment is already closed and can be deployed
949
+ - QA provides learning, continuous improvement, and technical debt identification
950
+ - Critical issues trigger follow-up increment creation for fixes
951
+ - Quality metrics tracked over time for velocity and quality trends
952
+
813
953
  ### Step 6: Handle Incomplete Work
814
954
 
815
955
  **If increment cannot close due to scope creep**:
@@ -865,6 +1005,25 @@ PM Approval: ✅ APPROVED
865
1005
 
866
1006
  🎉 Increment 0001 closed successfully!
867
1007
 
1008
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1009
+ 🔍 POST-CLOSURE QUALITY ASSESSMENT
1010
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1011
+
1012
+ Running quality assessment to validate implementation...
1013
+
1014
+ Overall Score: 87/100 (GOOD) ✓
1015
+
1016
+ Dimension Scores:
1017
+ Clarity: 92/100 ✓✓
1018
+ Testability: 85/100 ✓
1019
+ Risk Assessment: 75/100 ✓
1020
+
1021
+ Quality Gate Decision: ✅ PASS
1022
+
1023
+ 📋 Report: .specweave/increments/0001-user-authentication/reports/qa-post-closure.md
1024
+
1025
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1026
+
868
1027
  Next: /specweave:increment "Next feature"
869
1028
  ```
870
1029