specweave 0.23.16 → 0.24.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 (227) hide show
  1. package/.claude-plugin/marketplace.json +93 -38
  2. package/CLAUDE.md +159 -11
  3. package/dist/plugins/specweave-github/lib/github-spec-content-sync.d.ts.map +1 -1
  4. package/dist/plugins/specweave-github/lib/github-spec-content-sync.js +57 -0
  5. package/dist/plugins/specweave-github/lib/github-spec-content-sync.js.map +1 -1
  6. package/dist/src/cli/commands/sync-spec-content.js +3 -0
  7. package/dist/src/cli/commands/sync-spec-content.js.map +1 -1
  8. package/dist/src/cli/helpers/ado-area-path-mapper.d.ts +89 -0
  9. package/dist/src/cli/helpers/ado-area-path-mapper.d.ts.map +1 -0
  10. package/dist/src/cli/helpers/ado-area-path-mapper.js +213 -0
  11. package/dist/src/cli/helpers/ado-area-path-mapper.js.map +1 -0
  12. package/dist/src/cli/helpers/issue-tracker/ado-auto-discover.d.ts +29 -0
  13. package/dist/src/cli/helpers/issue-tracker/ado-auto-discover.d.ts.map +1 -0
  14. package/dist/src/cli/helpers/issue-tracker/ado-auto-discover.js +109 -0
  15. package/dist/src/cli/helpers/issue-tracker/ado-auto-discover.js.map +1 -0
  16. package/dist/src/cli/helpers/issue-tracker/ado.d.ts +1 -0
  17. package/dist/src/cli/helpers/issue-tracker/ado.d.ts.map +1 -1
  18. package/dist/src/cli/helpers/issue-tracker/ado.js +2 -0
  19. package/dist/src/cli/helpers/issue-tracker/ado.js.map +1 -1
  20. package/dist/src/cli/helpers/smart-filter.d.ts +83 -0
  21. package/dist/src/cli/helpers/smart-filter.d.ts.map +1 -0
  22. package/dist/src/cli/helpers/smart-filter.js +265 -0
  23. package/dist/src/cli/helpers/smart-filter.js.map +1 -0
  24. package/dist/src/core/progress/progress-tracker.d.ts +4 -1
  25. package/dist/src/core/progress/progress-tracker.d.ts.map +1 -1
  26. package/dist/src/core/progress/progress-tracker.js +33 -4
  27. package/dist/src/core/progress/progress-tracker.js.map +1 -1
  28. package/dist/src/core/qa/quality-gate-decider.d.ts +1 -1
  29. package/dist/src/core/qa/quality-gate-decider.js +2 -2
  30. package/dist/src/core/qa/quality-gate-decider.js.map +1 -1
  31. package/dist/src/core/qa/risk-calculator.d.ts +2 -2
  32. package/dist/src/core/qa/risk-calculator.js +2 -2
  33. package/dist/src/core/spec-content-sync.d.ts +1 -1
  34. package/dist/src/core/spec-content-sync.d.ts.map +1 -1
  35. package/dist/src/core/validators/ac-presence-validator.d.ts +56 -0
  36. package/dist/src/core/validators/ac-presence-validator.d.ts.map +1 -0
  37. package/dist/src/core/validators/ac-presence-validator.js +149 -0
  38. package/dist/src/core/validators/ac-presence-validator.js.map +1 -0
  39. package/dist/src/integrations/ado/ado-dependency-loader.d.ts +1 -1
  40. package/dist/src/integrations/ado/ado-dependency-loader.d.ts.map +1 -1
  41. package/dist/src/integrations/ado/ado-dependency-loader.js +39 -7
  42. package/dist/src/integrations/ado/ado-dependency-loader.js.map +1 -1
  43. package/dist/src/integrations/ado/area-path-mapper.d.ts +137 -0
  44. package/dist/src/integrations/ado/area-path-mapper.d.ts.map +1 -0
  45. package/dist/src/integrations/ado/area-path-mapper.js +267 -0
  46. package/dist/src/integrations/ado/area-path-mapper.js.map +1 -0
  47. package/dist/src/integrations/jira/filter-processor.d.ts +126 -0
  48. package/dist/src/integrations/jira/filter-processor.d.ts.map +1 -0
  49. package/dist/src/integrations/jira/filter-processor.js +207 -0
  50. package/dist/src/integrations/jira/filter-processor.js.map +1 -0
  51. package/dist/src/integrations/jira/jira-client.d.ts +13 -0
  52. package/dist/src/integrations/jira/jira-client.d.ts.map +1 -1
  53. package/dist/src/integrations/jira/jira-client.js +33 -0
  54. package/dist/src/integrations/jira/jira-client.js.map +1 -1
  55. package/dist/src/utils/ac-embedder.d.ts +63 -0
  56. package/dist/src/utils/ac-embedder.d.ts.map +1 -0
  57. package/dist/src/utils/ac-embedder.js +217 -0
  58. package/dist/src/utils/ac-embedder.js.map +1 -0
  59. package/dist/src/utils/env-manager.d.ts +86 -0
  60. package/dist/src/utils/env-manager.d.ts.map +1 -0
  61. package/dist/src/utils/env-manager.js +188 -0
  62. package/dist/src/utils/env-manager.js.map +1 -0
  63. package/package.json +1 -1
  64. package/plugins/specweave/.claude-plugin/plugin.json +1 -1
  65. package/plugins/specweave/agents/AGENTS-INDEX.md +1 -1
  66. package/plugins/specweave/agents/increment-quality-judge-v2/AGENT.md +9 -9
  67. package/plugins/specweave/commands/specweave-do.md +37 -0
  68. package/plugins/specweave/commands/specweave-done.md +159 -0
  69. package/plugins/specweave/commands/specweave-embed-acs.md +446 -0
  70. package/plugins/specweave/commands/specweave-next.md +148 -3
  71. package/plugins/specweave/commands/specweave-qa.md +2 -2
  72. package/plugins/specweave/hooks/lib/migrate-increment-work.sh +1 -1
  73. package/plugins/specweave/hooks/lib/migrate-increment-work.sh.bak +245 -0
  74. package/plugins/specweave/hooks/lib/sync-spec-content.sh +2 -2
  75. package/plugins/specweave/hooks/lib/sync-spec-content.sh.bak +149 -0
  76. package/plugins/specweave/hooks/lib/update-status-line.sh +34 -4
  77. package/plugins/specweave/hooks/lib/validate-spec-status.sh +1 -1
  78. package/plugins/specweave/hooks/lib/validate-spec-status.sh.bak +163 -0
  79. package/plugins/specweave/hooks/post-first-increment.sh +1 -1
  80. package/plugins/specweave/hooks/post-first-increment.sh.bak +61 -0
  81. package/plugins/specweave/hooks/post-spec-update.sh +1 -1
  82. package/plugins/specweave/hooks/post-spec-update.sh.bak +158 -0
  83. package/plugins/specweave/hooks/post-user-story-complete.sh +1 -1
  84. package/plugins/specweave/hooks/post-user-story-complete.sh.bak +179 -0
  85. package/plugins/specweave/hooks/pre-command-deduplication.sh +1 -1
  86. package/plugins/specweave/hooks/pre-command-deduplication.sh.bak +83 -0
  87. package/plugins/specweave/hooks/pre-increment-start.sh +168 -0
  88. package/plugins/specweave/hooks/user-prompt-submit.sh +1 -1
  89. package/plugins/specweave/hooks/user-prompt-submit.sh.bak +386 -0
  90. package/plugins/specweave/skills/SKILLS-INDEX.md +1 -1
  91. package/plugins/specweave/skills/specweave-framework/SKILL.md +1 -1
  92. package/plugins/specweave-ado/.claude-plugin/plugin.json +1 -1
  93. package/plugins/specweave-ado/agents/ado-manager/AGENT.md +23 -0
  94. package/plugins/specweave-ado/agents/ado-multi-project-mapper/AGENT.md +23 -0
  95. package/plugins/specweave-ado/agents/ado-sync-judge/AGENT.md +23 -0
  96. package/plugins/specweave-ado/commands/specweave-ado-import-projects.md +331 -0
  97. package/plugins/specweave-alternatives/.claude-plugin/plugin.json +10 -0
  98. package/plugins/specweave-alternatives/commands/alternatives-analyze.md +336 -0
  99. package/plugins/specweave-alternatives/skills/architecture-alternatives/SKILL.md +651 -0
  100. package/plugins/specweave-alternatives/skills/bmad-method/SKILL.md +420 -0
  101. package/plugins/specweave-alternatives/skills/spec-kit-expert/SKILL.md +487 -0
  102. package/plugins/specweave-backend/agents/database-optimizer/AGENT.md +23 -0
  103. package/plugins/specweave-backend/commands/api-scaffold.md +80 -0
  104. package/plugins/specweave-backend/commands/crud-generate.md +109 -0
  105. package/plugins/specweave-backend/commands/migration-generate.md +139 -0
  106. package/plugins/specweave-confluent/agents/confluent-architect/AGENT.md +23 -0
  107. package/plugins/specweave-confluent/commands/connector-deploy.md +154 -0
  108. package/plugins/specweave-confluent/commands/ksqldb-query.md +179 -0
  109. package/plugins/specweave-confluent/commands/schema-register.md +123 -0
  110. package/plugins/specweave-core/.claude-plugin/plugin.json +21 -0
  111. package/plugins/specweave-core/commands/architecture-review.md +288 -0
  112. package/plugins/specweave-core/commands/code-review.md +213 -0
  113. package/plugins/specweave-core/commands/refactor-plan.md +249 -0
  114. package/plugins/specweave-core/skills/code-quality/SKILL.md +157 -0
  115. package/plugins/specweave-core/skills/design-patterns/SKILL.md +244 -0
  116. package/plugins/specweave-core/skills/software-architecture/SKILL.md +83 -0
  117. package/plugins/specweave-cost-optimizer/.claude-plugin/plugin.json +22 -0
  118. package/plugins/specweave-cost-optimizer/commands/cost-analyze.md +360 -0
  119. package/plugins/specweave-cost-optimizer/commands/cost-optimize.md +480 -0
  120. package/plugins/specweave-cost-optimizer/skills/aws-cost-expert/SKILL.md +416 -0
  121. package/plugins/specweave-cost-optimizer/skills/cloud-pricing/SKILL.md +325 -0
  122. package/plugins/specweave-cost-optimizer/skills/cost-optimization/SKILL.md +337 -0
  123. package/plugins/specweave-diagrams/.claude-plugin/plugin.json +1 -1
  124. package/plugins/specweave-diagrams/agents/diagrams-architect/AGENT.md +23 -0
  125. package/plugins/specweave-diagrams/commands/diagrams-generate.md +168 -0
  126. package/plugins/specweave-docs/.claude-plugin/plugin.json +10 -0
  127. package/plugins/specweave-docs/commands/docs-generate.md +441 -0
  128. package/plugins/specweave-docs/commands/docs-init.md +334 -0
  129. package/plugins/specweave-docs/skills/docusaurus/SKILL.md +581 -0
  130. package/plugins/specweave-docs/skills/spec-driven-brainstorming/SKILL.md +689 -0
  131. package/plugins/specweave-docs/skills/technical-writing/SKILL.md +1039 -0
  132. package/plugins/specweave-docs-preview/.claude-plugin/plugin.json +1 -1
  133. package/plugins/specweave-figma/.claude-plugin/plugin.json +23 -0
  134. package/plugins/specweave-figma/commands/figma-import.md +690 -0
  135. package/plugins/specweave-figma/commands/figma-to-react.md +834 -0
  136. package/plugins/specweave-figma/commands/figma-tokens.md +815 -0
  137. package/plugins/specweave-frontend/.claude-plugin/plugin.json +21 -0
  138. package/plugins/specweave-frontend/agents/frontend-architect/AGENT.md +387 -0
  139. package/plugins/specweave-frontend/agents/frontend-architect/README.md +385 -0
  140. package/plugins/specweave-frontend/agents/frontend-architect/examples.md +590 -0
  141. package/plugins/specweave-frontend/agents/frontend-architect/templates/component-template.tsx +152 -0
  142. package/plugins/specweave-frontend/agents/frontend-architect/templates/hook-template.ts +311 -0
  143. package/plugins/specweave-frontend/agents/frontend-architect/templates/page-template.tsx +228 -0
  144. package/plugins/specweave-frontend/commands/component-generate.md +510 -0
  145. package/plugins/specweave-frontend/commands/design-system-init.md +494 -0
  146. package/plugins/specweave-frontend/commands/frontend-scaffold.md +207 -0
  147. package/plugins/specweave-frontend/commands/nextjs-setup.md +396 -0
  148. package/plugins/specweave-frontend/skills/design-system-architect/SKILL.md +278 -0
  149. package/plugins/specweave-frontend/skills/frontend/SKILL.md +420 -0
  150. package/plugins/specweave-frontend/skills/nextjs/SKILL.md +546 -0
  151. package/plugins/specweave-github/.claude-plugin/plugin.json +1 -1
  152. package/plugins/specweave-github/agents/github-manager/AGENT.md +23 -0
  153. package/plugins/specweave-github/agents/github-task-splitter/AGENT.md +25 -0
  154. package/plugins/specweave-github/agents/user-story-updater/AGENT.md +25 -0
  155. package/plugins/specweave-github/hooks/.specweave/logs/hooks-debug.log +194 -0
  156. package/plugins/specweave-github/lib/github-spec-content-sync.js +49 -0
  157. package/plugins/specweave-github/lib/github-spec-content-sync.ts +67 -0
  158. package/plugins/specweave-infrastructure/.claude-plugin/plugin.json +1 -1
  159. package/plugins/specweave-infrastructure/agents/devops/AGENT.md +26 -0
  160. package/plugins/specweave-infrastructure/agents/network-engineer/AGENT.md +26 -0
  161. package/plugins/specweave-infrastructure/agents/observability-engineer/AGENT.md +26 -0
  162. package/plugins/specweave-infrastructure/agents/performance-engineer/AGENT.md +26 -0
  163. package/plugins/specweave-infrastructure/agents/sre/AGENT.md +26 -0
  164. package/plugins/specweave-jira/.claude-plugin/plugin.json +1 -1
  165. package/plugins/specweave-jira/agents/jira-manager/AGENT.md +26 -0
  166. package/plugins/specweave-jira/commands/import-projects.js +183 -0
  167. package/plugins/specweave-jira/commands/import-projects.md +97 -0
  168. package/plugins/specweave-jira/commands/import-projects.ts +288 -0
  169. package/plugins/specweave-jira/commands/specweave-jira-import-projects.md +298 -0
  170. package/plugins/specweave-kafka/.claude-plugin/plugin.json +1 -1
  171. package/plugins/specweave-kafka/agents/kafka-architect/AGENT.md +26 -0
  172. package/plugins/specweave-kafka/agents/kafka-devops/AGENT.md +26 -0
  173. package/plugins/specweave-kafka/agents/kafka-observability/AGENT.md +26 -0
  174. package/plugins/specweave-kafka-streams/.claude-plugin/plugin.json +1 -1
  175. package/plugins/specweave-kubernetes/agents/kubernetes-architect/AGENT.md +26 -0
  176. package/plugins/specweave-kubernetes/commands/cluster-setup.md +262 -0
  177. package/plugins/specweave-kubernetes/commands/deployment-generate.md +242 -0
  178. package/plugins/specweave-kubernetes/commands/helm-scaffold.md +333 -0
  179. package/plugins/specweave-ml/.claude-plugin/plugin.json +3 -3
  180. package/plugins/specweave-ml/agents/data-scientist/AGENT.md +26 -0
  181. package/plugins/specweave-ml/agents/ml-engineer/AGENT.md +26 -0
  182. package/plugins/specweave-ml/agents/mlops-engineer/AGENT.md +26 -0
  183. package/plugins/specweave-mobile/agents/mobile-architect/AGENT.md +26 -0
  184. package/plugins/specweave-mobile/commands/app-scaffold.md +233 -0
  185. package/plugins/specweave-mobile/commands/build-config.md +256 -0
  186. package/plugins/specweave-mobile/commands/screen-generate.md +289 -0
  187. package/plugins/specweave-n8n/.claude-plugin/plugin.json +1 -1
  188. package/plugins/specweave-payments/agents/payment-integration/AGENT.md +26 -0
  189. package/plugins/specweave-plugin-dev/.claude-plugin/plugin.json +20 -0
  190. package/plugins/specweave-plugin-dev/commands/plugin-create.md +333 -0
  191. package/plugins/specweave-plugin-dev/commands/plugin-publish.md +339 -0
  192. package/plugins/specweave-plugin-dev/commands/plugin-test.md +293 -0
  193. package/plugins/specweave-plugin-dev/skills/claude-sdk/SKILL.md +162 -0
  194. package/plugins/specweave-plugin-dev/skills/marketplace-publishing/SKILL.md +263 -0
  195. package/plugins/specweave-plugin-dev/skills/plugin-development/SKILL.md +316 -0
  196. package/plugins/specweave-release/.claude-plugin/plugin.json +1 -1
  197. package/plugins/specweave-release/agents/release-manager/AGENT.md +27 -0
  198. package/plugins/specweave-release/commands/specweave-release-npm.md +110 -0
  199. package/plugins/specweave-release/hooks/.specweave/logs/dora-tracking.log +168 -0
  200. package/plugins/specweave-testing/.claude-plugin/plugin.json +21 -0
  201. package/plugins/specweave-testing/agents/qa-engineer/AGENT.md +797 -0
  202. package/plugins/specweave-testing/agents/qa-engineer/README.md +443 -0
  203. package/plugins/specweave-testing/agents/qa-engineer/templates/playwright-e2e-test.ts +470 -0
  204. package/plugins/specweave-testing/agents/qa-engineer/templates/test-data-factory.ts +507 -0
  205. package/plugins/specweave-testing/agents/qa-engineer/templates/vitest-unit-test.ts +400 -0
  206. package/plugins/specweave-testing/agents/qa-engineer/test-strategies.md +726 -0
  207. package/plugins/specweave-testing/commands/e2e-setup.md +1081 -0
  208. package/plugins/specweave-testing/commands/test-coverage.md +979 -0
  209. package/plugins/specweave-testing/commands/test-generate.md +1156 -0
  210. package/plugins/specweave-testing/commands/test-init.md +409 -0
  211. package/plugins/specweave-testing/skills/e2e-playwright/SKILL.md +769 -0
  212. package/plugins/specweave-testing/skills/tdd-expert/SKILL.md +934 -0
  213. package/plugins/specweave-testing/skills/unit-testing-expert/SKILL.md +1011 -0
  214. package/plugins/specweave-tooling/.claude-plugin/plugin.json +22 -0
  215. package/plugins/specweave-tooling/commands/specweave-tooling-skill-create.md +691 -0
  216. package/plugins/specweave-tooling/commands/specweave-tooling-skill-package.md +751 -0
  217. package/plugins/specweave-tooling/commands/specweave-tooling-skill-validate.md +858 -0
  218. package/plugins/specweave-ui/.claude-plugin/plugin.json +10 -0
  219. package/plugins/specweave-ui/commands/ui-automate.md +199 -0
  220. package/plugins/specweave-ui/commands/ui-inspect.md +70 -0
  221. package/plugins/specweave-ui/skills/browser-automation/SKILL.md +314 -0
  222. package/plugins/specweave-ui/skills/ui-testing/SKILL.md +716 -0
  223. package/plugins/specweave-ui/skills/visual-regression/SKILL.md +728 -0
  224. package/plugins/specweave/commands/check-hooks.md +0 -257
  225. package/plugins/specweave/commands/specweave-archive-increments.md +0 -82
  226. package/plugins/specweave/skills/plugin-expert/SKILL.md +0 -340
  227. /package/plugins/specweave/{agents/code-reviewer.md → skills/code-reviewer/SKILL.md} +0 -0
@@ -0,0 +1,331 @@
1
+ ---
2
+ name: specweave-ado:import-projects
3
+ description: Import additional Azure DevOps projects post-init with area path mapping, filtering, and dry-run preview
4
+ ---
5
+
6
+ # Import Azure DevOps Projects Command
7
+
8
+ You are an Azure DevOps project import expert. Help users add additional ADO projects to their SpecWeave workspace after initial setup.
9
+
10
+ ## Purpose
11
+
12
+ This command allows users to import additional Azure DevOps projects **after** initial SpecWeave setup (`specweave init`), with area path mapping, filtering, and dry-run preview.
13
+
14
+ **Use Cases**:
15
+ - Adding new ADO projects to existing workspace
16
+ - Importing projects from different organizations
17
+ - Selective import with area path granularity
18
+ - Multi-project organization (Backend, Frontend, Mobile, Infrastructure)
19
+
20
+ ## Command Syntax
21
+
22
+ ```bash
23
+ # Basic import (interactive)
24
+ /specweave-ado:import-projects
25
+
26
+ # With area path granularity
27
+ /specweave-ado:import-projects --granularity two-level
28
+
29
+ # Dry-run (preview)
30
+ /specweave-ado:import-projects --dry-run
31
+
32
+ # Resume interrupted import
33
+ /specweave-ado:import-projects --resume
34
+
35
+ # Combined
36
+ /specweave-ado:import-projects --granularity top-level --dry-run
37
+ ```
38
+
39
+ ## Your Task
40
+
41
+ When the user runs this command:
42
+
43
+ ### Step 1: Validate Prerequisites
44
+ ```typescript
45
+ import { readEnvFile, parseEnvFile } from '../../../src/utils/env-file.js';
46
+
47
+ // 1. Check if ADO credentials exist
48
+ const envContent = readEnvFile(process.cwd());
49
+ const parsed = parseEnvFile(envContent);
50
+
51
+ if (!parsed.AZURE_DEVOPS_PAT || !parsed.AZURE_DEVOPS_ORG) {
52
+ console.log('❌ Missing Azure DevOps credentials. Run `specweave init` first.');
53
+ return;
54
+ }
55
+
56
+ // 2. Get existing configuration
57
+ const org = parsed.AZURE_DEVOPS_ORG;
58
+ const existingProject = parsed.AZURE_DEVOPS_PROJECT;
59
+
60
+ console.log(`\n📋 Organization: ${org}`);
61
+ console.log(` Current project: ${existingProject || 'None'}\n`);
62
+ ```
63
+
64
+ ### Step 2: Fetch Available Projects
65
+ ```typescript
66
+ import { getProjectCount } from '../../../src/cli/helpers/project-count-fetcher.js';
67
+ import { AsyncProjectLoader } from '../../../src/cli/helpers/async-project-loader.js';
68
+
69
+ // Count check (< 1 second)
70
+ const countResult = await getProjectCount({
71
+ provider: 'ado',
72
+ credentials: {
73
+ organization: org,
74
+ pat: parsed.AZURE_DEVOPS_PAT
75
+ }
76
+ });
77
+
78
+ console.log(`✓ Found ${countResult.accessible} accessible project(s)`);
79
+
80
+ // Fetch all projects (with smart pagination)
81
+ const loader = new AsyncProjectLoader(
82
+ {
83
+ organization: org,
84
+ pat: parsed.AZURE_DEVOPS_PAT
85
+ },
86
+ 'ado',
87
+ {
88
+ batchSize: 50,
89
+ updateFrequency: 5,
90
+ showEta: true
91
+ }
92
+ );
93
+
94
+ const result = await loader.fetchAllProjects(countResult.accessible);
95
+ const allProjects = result.projects;
96
+ ```
97
+
98
+ ### Step 3: Area Path Mapping (Multi-Project Organization)
99
+ ```typescript
100
+ import { AreaPathMapper } from '../../../src/integrations/ado/area-path-mapper.js';
101
+
102
+ const { selectedProject } = await inquirer.prompt([{
103
+ type: 'list',
104
+ name: 'selectedProject',
105
+ message: 'Select ADO project to import area paths from:',
106
+ choices: allProjects.map(p => ({ name: p.name, value: p.name }))
107
+ }]);
108
+
109
+ const mapper = new AreaPathMapper({
110
+ credentials: { organization: org, pat: parsed.AZURE_DEVOPS_PAT },
111
+ project: selectedProject
112
+ });
113
+
114
+ // Fetch area path tree
115
+ const areaPathTree = await mapper.fetchAreaPaths();
116
+
117
+ // Get granularity suggestion
118
+ const suggestion = mapper.suggestGranularity(areaPathTree);
119
+ console.log(`\n💡 Suggestion: ${suggestion.suggested}`);
120
+ console.log(` ${suggestion.reasoning}\n`);
121
+
122
+ // Prompt for granularity (if not provided via CLI)
123
+ const granularity = args.granularity || await mapper.promptAreaPathGranularity(areaPathTree);
124
+
125
+ // Flatten area paths with selected granularity
126
+ const areaPaths = mapper.flattenAreaPaths(areaPathTree, granularity);
127
+
128
+ console.log(`\n📊 ${areaPaths.length} project(s) will be created from area paths:\n`);
129
+ areaPaths.forEach(ap => {
130
+ const projectId = mapper.mapToProjectId(ap.path);
131
+ console.log(` ✨ ${ap.path} → ${projectId}`);
132
+ });
133
+ ```
134
+
135
+ ### Step 4: Dry-Run or Execute
136
+ ```typescript
137
+ if (args.dryRun) {
138
+ console.log('\n🔎 DRY RUN: No changes will be made.\n');
139
+ console.log('The following projects would be configured:');
140
+ areaPaths.forEach(ap => {
141
+ const projectId = mapper.mapToProjectId(ap.path);
142
+ console.log(` ✨ ${projectId} (${ap.path})`);
143
+ });
144
+ console.log(`\nTotal: ${areaPaths.length} projects would be configured\n`);
145
+ return;
146
+ }
147
+
148
+ // Confirm import
149
+ const { confirmed } = await inquirer.prompt([{
150
+ type: 'confirm',
151
+ name: 'confirmed',
152
+ message: `Configure ${areaPaths.length} project(s) from area paths?`,
153
+ default: true
154
+ }]);
155
+
156
+ if (!confirmed) {
157
+ console.log('⏭️ Import cancelled.');
158
+ return;
159
+ }
160
+ ```
161
+
162
+ ### Step 5: Update Configuration
163
+ ```typescript
164
+ import { getConfigManager } from '../../../src/core/config/index.js';
165
+
166
+ const configManager = getConfigManager(process.cwd());
167
+
168
+ // Build area path configuration
169
+ const areaPathConfig: Record<string, string[]> = {};
170
+
171
+ for (const ap of areaPaths) {
172
+ const projectId = mapper.mapToProjectId(ap.path);
173
+ areaPathConfig[projectId] = [ap.path];
174
+ }
175
+
176
+ // Update configuration
177
+ await configManager.update({
178
+ issueTracker: {
179
+ provider: 'ado',
180
+ ado: {
181
+ organization: org,
182
+ project: selectedProject,
183
+ areaPathMapping: areaPathConfig,
184
+ granularity
185
+ }
186
+ }
187
+ });
188
+
189
+ // Update .env file
190
+ import { updateEnvFile } from '../../../src/utils/env-manager.js';
191
+
192
+ await updateEnvFile('AZURE_DEVOPS_PROJECT', selectedProject);
193
+
194
+ // Write area paths to .env (comma-separated)
195
+ const areaPathList = areaPaths.map(ap => ap.path).join(',');
196
+ await updateEnvFile('AZURE_DEVOPS_AREA_PATHS', areaPathList);
197
+
198
+ console.log('\n✅ Projects configured successfully!\n');
199
+ console.log(`Organization: ${org}`);
200
+ console.log(`Project: ${selectedProject}`);
201
+ console.log(`Granularity: ${granularity}`);
202
+ console.log(`\nArea paths configured:\n ${areaPathList.split(',').join('\n ')}\n`);
203
+ ```
204
+
205
+ ### Step 6: Resume Support
206
+ ```typescript
207
+ if (args.resume) {
208
+ const { CacheManager } = await import('../../../src/core/cache/cache-manager.js');
209
+ const cacheManager = new CacheManager(process.cwd());
210
+
211
+ const importState = await cacheManager.get('ado-import-state');
212
+
213
+ if (!importState) {
214
+ console.log('⚠️ No import state found. Use without --resume to start fresh.');
215
+ return;
216
+ }
217
+
218
+ console.log(`\n📂 Resuming from: ${importState.lastAreaPath} (${importState.completed}/${importState.total})`);
219
+
220
+ // Skip already-processed area paths
221
+ const remainingPaths = areaPaths.filter(ap => !importState.processed.includes(ap.path));
222
+
223
+ // Continue import with remaining paths
224
+ // (use same logic as Step 5)
225
+ }
226
+ ```
227
+
228
+ ## Examples
229
+
230
+ ### Example 1: Basic Import with Area Paths
231
+ **User**: `/specweave-ado:import-projects`
232
+
233
+ **Output**:
234
+ ```
235
+ 📋 Organization: mycompany
236
+ Current project: Platform
237
+
238
+ ✓ Found 5 accessible project(s)
239
+
240
+ Select ADO project to import area paths from:
241
+ > Platform
242
+
243
+ 💡 Suggestion: two-level
244
+ Balanced hierarchy (8 two-level areas). Recommended granularity.
245
+
246
+ Select area path granularity for project organization:
247
+ > Two-level (8 projects) - e.g., Backend-API, Backend-Database
248
+
249
+ 📊 8 project(s) will be created from area paths:
250
+
251
+ ✨ Platform/Backend/API → backend-api
252
+ ✨ Platform/Backend/Database → backend-database
253
+ ✨ Platform/Frontend/Web → frontend-web
254
+ ✨ Platform/Frontend/Admin → frontend-admin
255
+ ✨ Platform/Mobile/iOS → mobile-ios
256
+ ✨ Platform/Mobile/Android → mobile-android
257
+ ✨ Platform/Infrastructure/Cloud → infrastructure-cloud
258
+ ✨ Platform/Infrastructure/Network → infrastructure-network
259
+
260
+ Configure 8 project(s) from area paths? (Y/n)
261
+
262
+ ✅ Projects configured successfully!
263
+
264
+ Organization: mycompany
265
+ Project: Platform
266
+ Granularity: two-level
267
+
268
+ Area paths configured:
269
+ Platform/Backend/API
270
+ Platform/Backend/Database
271
+ Platform/Frontend/Web
272
+ Platform/Frontend/Admin
273
+ Platform/Mobile/iOS
274
+ Platform/Mobile/Android
275
+ Platform/Infrastructure/Cloud
276
+ Platform/Infrastructure/Network
277
+ ```
278
+
279
+ ### Example 2: Top-Level Only
280
+ **User**: `/specweave-ado:import-projects --granularity top-level`
281
+
282
+ **Output**:
283
+ ```
284
+ Select area path granularity: top-level (forced via CLI)
285
+
286
+ 📊 3 project(s) will be created from area paths:
287
+
288
+ ✨ Platform/Backend → backend
289
+ ✨ Platform/Frontend → frontend
290
+ ✨ Platform/Mobile → mobile
291
+ ```
292
+
293
+ ### Example 3: Dry-Run
294
+ **User**: `/specweave-ado:import-projects --dry-run`
295
+
296
+ **Output**:
297
+ ```
298
+ 🔎 DRY RUN: No changes will be made.
299
+
300
+ The following projects would be configured:
301
+ ✨ backend-api (Platform/Backend/API)
302
+ ✨ backend-database (Platform/Backend/Database)
303
+ ✨ frontend-web (Platform/Frontend/Web)
304
+
305
+ Total: 8 projects would be configured
306
+ ```
307
+
308
+ ## Important Notes
309
+
310
+ - **Multi-Project Organization**: Uses area paths to create logical project separation
311
+ - **Granularity Control**: Top-level, two-level, or full-tree based on hierarchy complexity
312
+ - **Atomic Updates**: Uses temp file + rename to prevent corruption
313
+ - **Progress Tracking**: Shows progress bar for large hierarchies (> 50 area paths)
314
+ - **Resume Support**: Interrupted imports can be resumed with `--resume`
315
+
316
+ ## Related Commands
317
+
318
+ - `/specweave:init` - Initial SpecWeave setup
319
+ - `/specweave-ado:sync` - Sync increments with ADO work items
320
+ - `/specweave-ado:refresh-cache` - Clear cached ADO data
321
+
322
+ ## Error Handling
323
+
324
+ - **Missing Credentials**: Prompt user to run `specweave init` first
325
+ - **API Errors**: Show clear error message with suggestion
326
+ - **No Area Paths**: Fallback to single-project mode
327
+ - **Permission Errors**: Check ADO PAT scopes
328
+
329
+ ---
330
+
331
+ **Multi-Project Excellence**: This command enables sophisticated multi-project organization in Azure DevOps using area paths, perfect for large teams with complex hierarchies.
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "specweave-alternatives",
3
+ "version": "0.24.0",
4
+ "description": "Technology stack alternatives analysis using BMAD method - Best, Most Appropriate, Design decisions for architecture choices",
5
+ "author": {
6
+ "name": "Anton Abyzov",
7
+ "email": "anton.abyzov@gmail.com"
8
+ },
9
+ "hooks": {}
10
+ }
@@ -0,0 +1,336 @@
1
+ # Alternatives Analyze - Technology Stack Decision Analysis
2
+
3
+ Analyze technology stack alternatives using the **BMAD** (Best, Most Appropriate, Design) framework. Make informed decisions about databases, frameworks, cloud providers, languages, and architectural patterns by evaluating tradeoffs, costs, and long-term implications.
4
+
5
+ ## Usage
6
+
7
+ ```
8
+ /specweave-alternatives:alternatives-analyze <category> [context] [options]
9
+ ```
10
+
11
+ ## What I Do
12
+
13
+ 1. **Identify Alternatives**: List all viable options for the technology category
14
+ 2. **BMAD Analysis**: Evaluate using Best/Most Appropriate/Design criteria
15
+ 3. **Tradeoff Matrix**: Compare pros/cons, costs, learning curve, ecosystem
16
+ 4. **Context Scoring**: Weight factors based on your specific requirements
17
+ 5. **Recommendation**: Provide data-driven recommendation with rationale
18
+
19
+ ## Technology Categories
20
+
21
+ ### 1. Databases
22
+ ```bash
23
+ /specweave-alternatives:alternatives-analyze database \
24
+ --requirements "high-throughput,strong-consistency,cloud-native" \
25
+ --scale "startup"
26
+ ```
27
+
28
+ **Analyzes**: PostgreSQL, MySQL, MongoDB, DynamoDB, Firestore, CockroachDB, Cassandra
29
+
30
+ ### 2. Backend Frameworks
31
+ ```bash
32
+ /specweave-alternatives:alternatives-analyze backend-framework \
33
+ --language typescript \
34
+ --requirements "fast-development,type-safe,good-orms"
35
+ ```
36
+
37
+ **Analyzes**: Express, Fastify, NestJS, Hono, Elysia, tRPC
38
+
39
+ ### 3. Frontend Frameworks
40
+ ```bash
41
+ /specweave-alternatives:alternatives-analyze frontend-framework \
42
+ --requirements "SEO,performance,large-team" \
43
+ --existing-stack "React"
44
+ ```
45
+
46
+ **Analyzes**: Next.js, Remix, Astro, SvelteKit, Nuxt, Gatsby
47
+
48
+ ### 4. Cloud Providers
49
+ ```bash
50
+ /specweave-alternatives:alternatives-analyze cloud-provider \
51
+ --workload "containerized-microservices" \
52
+ --scale "enterprise" \
53
+ --constraints "EU-data-residency"
54
+ ```
55
+
56
+ **Analyzes**: AWS, GCP, Azure, Hetzner, DigitalOcean, Fly.io
57
+
58
+ ### 5. Message Queues
59
+ ```bash
60
+ /specweave-alternatives:alternatives-analyze message-queue \
61
+ --requirements "exactly-once,high-throughput,stream-processing" \
62
+ --scale "100k-msgs-sec"
63
+ ```
64
+
65
+ **Analyzes**: Kafka, RabbitMQ, Redis Streams, AWS SQS, Google Pub/Sub, NATS
66
+
67
+ ### 6. Authentication
68
+ ```bash
69
+ /specweave-alternatives:alternatives-analyze auth \
70
+ --requirements "social-login,SSO,MFA,compliance" \
71
+ --constraints "GDPR,SOC2"
72
+ ```
73
+
74
+ **Analyzes**: Auth0, Clerk, Supabase Auth, Firebase Auth, AWS Cognito, custom JWT
75
+
76
+ ## BMAD Framework
77
+
78
+ ### **B**est - Industry Gold Standard
79
+ What is considered the **best practice** in the industry?
80
+
81
+ - **Criteria**: Battle-tested, widely adopted, comprehensive features
82
+ - **Examples**:
83
+ - Database: PostgreSQL (ACID compliance, robustness)
84
+ - Queue: Kafka (high throughput, durability)
85
+ - Cloud: AWS (feature breadth, enterprise tooling)
86
+
87
+ ### **M**ost Appropriate - Context Fit
88
+ What is **most appropriate** for YOUR specific context?
89
+
90
+ - **Criteria**: Team expertise, budget, timeline, scale
91
+ - **Factors**:
92
+ - **Team Size**: Startup (2-5) vs Scale-up (20-50) vs Enterprise (100+)
93
+ - **Budget**: Free tier vs $100/mo vs $10k/mo vs unlimited
94
+ - **Timeline**: POC (1 week) vs MVP (3 months) vs Production (1 year)
95
+ - **Scale**: 100 users vs 10k users vs 1M users
96
+
97
+ ### **D**esign - Architectural Alignment
98
+ How does this fit your **overall design** and long-term vision?
99
+
100
+ - **Criteria**: System coherence, vendor lock-in, migration path
101
+ - **Considerations**:
102
+ - **Vendor Lock-in**: Open-source vs proprietary
103
+ - **Migration Path**: Can you switch later? At what cost?
104
+ - **Ecosystem**: Libraries, tools, community support
105
+ - **Future-proofing**: Technology trajectory, maintenance
106
+
107
+ ## Analysis Output
108
+
109
+ ### Tradeoff Matrix
110
+
111
+ ```markdown
112
+ ## Database Alternatives Analysis
113
+
114
+ ### Context
115
+ - **Team Size**: 5 engineers (3 backend, 2 fullstack)
116
+ - **Current Stage**: Seed-funded startup
117
+ - **Scale**: 1,000 active users → 50,000 in 12 months
118
+ - **Budget**: $500/mo infrastructure
119
+ - **Constraints**: GDPR compliance required
120
+
121
+ ### Options Evaluated
122
+
123
+ | Option | Type | Cost/mo | Learn Curve | Maturity | Score |
124
+ |---------------|------------|---------|-------------|----------|-------|
125
+ | PostgreSQL | Relational | $25 | Medium | ⭐⭐⭐⭐⭐ | 92 |
126
+ | MongoDB | Document | $57 | Low | ⭐⭐⭐⭐ | 78 |
127
+ | DynamoDB | NoSQL | $50 | High | ⭐⭐⭐⭐ | 71 |
128
+ | Firestore | Document | $30 | Low | ⭐⭐⭐ | 68 |
129
+ | MySQL | Relational | $25 | Medium | ⭐⭐⭐⭐⭐ | 85 |
130
+
131
+ ### BMAD Analysis
132
+
133
+ #### Best: PostgreSQL
134
+ - ✅ **Strengths**: ACID compliance, JSON support, full-text search, PostGIS
135
+ - ✅ **Ecosystem**: Rich ORM support (Prisma, Drizzle, TypeORM)
136
+ - ✅ **Flexibility**: Relational + document (JSON columns)
137
+ - ⚠️ **Considerations**: Requires schema management
138
+
139
+ #### Most Appropriate: PostgreSQL (Supabase)
140
+ - ✅ **Team Fit**: SQL skills on team, Prisma ORM familiarity
141
+ - ✅ **Budget Fit**: $25/mo for 100GB database (within budget)
142
+ - ✅ **Timeline Fit**: Fast setup with Supabase (2 hours vs 2 days self-hosted)
143
+ - ✅ **Scale Fit**: Handles 50k users with vertical scaling
144
+ - ✅ **Compliance**: EU region available, GDPR-ready
145
+
146
+ #### Design: PostgreSQL with Migration Plan
147
+ - ✅ **No Lock-in**: Standard PostgreSQL (can migrate to RDS, self-hosted)
148
+ - ✅ **Ecosystem**: TypeScript-first with Prisma
149
+ - ✅ **Future Path**: Scale with read replicas, connection pooling (PgBouncer)
150
+ - ⚠️ **Migration Risk**: Low - standard SQL export/import
151
+
152
+ ### Recommendation
153
+
154
+ **Choose: PostgreSQL (hosted on Supabase)**
155
+
156
+ **Rationale:**
157
+ 1. ✅ Aligns with team's SQL expertise
158
+ 2. ✅ Fits budget ($25/mo vs $500 budget)
159
+ 3. ✅ Supports rapid development (Prisma ORM)
160
+ 4. ✅ No vendor lock-in (standard PostgreSQL)
161
+ 5. ✅ Clear scaling path (read replicas, PgBouncer)
162
+ 6. ✅ GDPR compliance out-of-the-box
163
+
164
+ **Alternative if requirements change:**
165
+ - **If need extreme scale**: Consider CockroachDB (distributed SQL)
166
+ - **If need real-time**: Consider Firestore + PostgreSQL hybrid
167
+ - **If team prefers NoSQL**: MongoDB Atlas (better maturity than DynamoDB for startups)
168
+
169
+ ### Implementation Path
170
+
171
+ 1. **Week 1**: Set up Supabase project, configure EU region
172
+ 2. **Week 2**: Design schema with Prisma, enable Row Level Security (RLS)
173
+ 3. **Week 3**: Implement connection pooling, set up backups
174
+ 4. **Week 4**: Load testing, optimize queries, add indexes
175
+
176
+ ### Long-term Monitoring
177
+
178
+ - **Metric**: Connection pool utilization
179
+ - **Alert**: >80% CPU on database
180
+ - **Review**: Quarterly review of costs vs scale
181
+ - **Trigger**: If cost >$200/mo OR latency >100ms p95, re-evaluate
182
+ ```
183
+
184
+ ## Options
185
+
186
+ ### Context Options
187
+ - `--scale <level>` - Startup, scale-up, enterprise (default: startup)
188
+ - `--team-size <number>` - Number of engineers
189
+ - `--budget <amount>` - Monthly budget for this component
190
+ - `--timeline <duration>` - Time to production (1 week, 1 month, 3 months, etc.)
191
+
192
+ ### Requirement Options
193
+ - `--requirements <list>` - Comma-separated requirements (e.g., "ACID,scalability,cost-effective")
194
+ - `--constraints <list>` - Hard constraints (e.g., "GDPR,open-source,EU-region")
195
+ - `--existing-stack <tech>` - Technologies already in use
196
+ - `--language <lang>` - Preferred programming language
197
+
198
+ ### Analysis Options
199
+ - `--format <format>` - Output format: markdown, json, html (default: markdown)
200
+ - `--depth <level>` - Analysis depth: quick, standard, deep (default: standard)
201
+ - `--include-costs` - Include detailed cost breakdown (default: true)
202
+ - `--include-migration` - Include migration complexity analysis (default: true)
203
+
204
+ ## Use Cases
205
+
206
+ ### 1. Green field Project Planning
207
+ Choose the right stack before writing any code.
208
+
209
+ ### 2. Technology Replacement
210
+ Evaluate alternatives when migrating away from legacy systems.
211
+
212
+ ### 3. Cost Optimization
213
+ Find cheaper alternatives that meet the same requirements.
214
+
215
+ ### 4. Scale Planning
216
+ Identify when current technology won't scale and what to migrate to.
217
+
218
+ ### 5. Team Skill Alignment
219
+ Choose technologies that match team expertise or learning goals.
220
+
221
+ ## Advanced Features
222
+
223
+ ### Multi-Criteria Decision Analysis (MCDA)
224
+
225
+ ```markdown
226
+ ### Weighted Criteria
227
+
228
+ | Criteria | Weight | PostgreSQL | MongoDB | DynamoDB |
229
+ |------------------|--------|------------|---------|----------|
230
+ | Cost | 25% | 9/10 | 6/10 | 7/10 |
231
+ | Performance | 20% | 8/10 | 8/10 | 9/10 |
232
+ | Developer UX | 20% | 9/10 | 8/10 | 6/10 |
233
+ | Scalability | 15% | 7/10 | 8/10 | 10/10 |
234
+ | Ecosystem | 10% | 10/10 | 8/10 | 7/10 |
235
+ | Learning Curve | 10% | 7/10 | 9/10 | 5/10 |
236
+ | **Total Score** | | **8.4** | **7.7** | **7.3** |
237
+ ```
238
+
239
+ ### Total Cost of Ownership (TCO)
240
+
241
+ ```markdown
242
+ ### 3-Year TCO Comparison
243
+
244
+ | Cost Component | PostgreSQL | MongoDB | DynamoDB |
245
+ |------------------------|------------|---------|----------|
246
+ | **Infrastructure** | | | |
247
+ | - Database hosting | $900 | $2,050 | $1,800 |
248
+ | - Backup storage | $120 | $240 | $360 |
249
+ | - Monitoring | $240 | $480 | $0 |
250
+ | **Engineering** | | | |
251
+ | - Initial setup | $4,000 | $3,000 | $6,000 |
252
+ | - Ongoing maintenance | $6,000 | $4,000 | $2,000 |
253
+ | - Migration risk | $0 | $8,000 | $15,000 |
254
+ | **Total 3-Year Cost** | **$11,260**| **$17,770** | **$25,160** |
255
+ ```
256
+
257
+ ### Risk Analysis
258
+
259
+ ```markdown
260
+ ### Risk Matrix
261
+
262
+ | Risk | Probability | Impact | Mitigation |
263
+ |-----------------------|-------------|--------|---------------------------------|
264
+ | Vendor shutdown | Low (5%) | High | Use open-source alternative |
265
+ | Cost explosion | Medium (30%)| High | Set up billing alerts, reserves |
266
+ | Performance issues | Low (10%) | Medium | Load testing, query optimization|
267
+ | Team knowledge gap | Medium (20%)| Medium | Training, pair programming |
268
+ | Lock-in constraints | High (60%) | Medium | Standard interfaces, abstraction|
269
+ ```
270
+
271
+ ## Examples
272
+
273
+ ### Analyze Database Options
274
+ ```bash
275
+ /specweave-alternatives:alternatives-analyze database \
276
+ --scale startup \
277
+ --budget 200 \
278
+ --requirements "ACID,JSON-support,full-text-search" \
279
+ --constraints "open-source,EU-hosting"
280
+ ```
281
+
282
+ ### Compare Cloud Providers
283
+ ```bash
284
+ /specweave-alternatives:alternatives-analyze cloud-provider \
285
+ --workload "containerized-apps" \
286
+ --scale "scale-up" \
287
+ --budget 5000 \
288
+ --constraints "multi-region,SOC2"
289
+ ```
290
+
291
+ ### Frontend Framework Decision
292
+ ```bash
293
+ /specweave-alternatives:alternatives-analyze frontend-framework \
294
+ --existing-stack React \
295
+ --requirements "SEO,SSR,static-generation" \
296
+ --team-size 8
297
+ ```
298
+
299
+ ### Message Queue Selection
300
+ ```bash
301
+ /specweave-alternatives:alternatives-analyze message-queue \
302
+ --scale enterprise \
303
+ --requirements "exactly-once,replay,stream-processing" \
304
+ --throughput "500k-msgs-sec"
305
+ ```
306
+
307
+ ## Related Commands
308
+
309
+ - `/specweave-alternatives:cost-compare` - Detailed cost comparison only
310
+ - `/specweave-alternatives:migration-plan` - Generate migration plan from A to B
311
+ - `/specweave-cost-optimizer:analyze` - Optimize costs for chosen stack
312
+
313
+ ## Best Practices
314
+
315
+ 1. **Start with Requirements**: Define hard requirements vs nice-to-haves
316
+ 2. **Include Team Context**: Consider team skills, not just technology merits
317
+ 3. **Plan for Change**: Evaluate migration difficulty even if not planning to migrate
318
+ 4. **Use Real Numbers**: Actual budget, actual scale, actual timeline
319
+ 5. **Re-evaluate Periodically**: Technology landscape changes, reassess every 12-18 months
320
+
321
+ ## Limitations
322
+
323
+ - **Analysis is point-in-time**: Technology landscape evolves rapidly
324
+ - **Costs are estimates**: Actual costs depend on usage patterns
325
+ - **Assumes typical use cases**: Edge cases may favor different technologies
326
+ - **Human judgment required**: Framework provides data, but final decision is yours
327
+
328
+ ## Activation Keywords
329
+
330
+ - "Which database should I use?"
331
+ - "Compare PostgreSQL vs MongoDB vs DynamoDB"
332
+ - "Best cloud provider for startups"
333
+ - "Should I use Next.js or Remix?"
334
+ - "Kafka vs RabbitMQ decision"
335
+ - "Technology stack recommendations"
336
+ - "BMAD method analysis"