specweave 0.28.17 → 0.28.20

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 (204) hide show
  1. package/dist/plugins/specweave-ado/lib/ado-board-resolver.d.ts +94 -0
  2. package/dist/plugins/specweave-ado/lib/ado-board-resolver.d.ts.map +1 -0
  3. package/dist/plugins/specweave-ado/lib/ado-board-resolver.js +219 -0
  4. package/dist/plugins/specweave-ado/lib/ado-board-resolver.js.map +1 -0
  5. package/dist/plugins/specweave-ado/lib/ado-spec-sync.d.ts +16 -0
  6. package/dist/plugins/specweave-ado/lib/ado-spec-sync.d.ts.map +1 -1
  7. package/dist/plugins/specweave-ado/lib/ado-spec-sync.js +63 -3
  8. package/dist/plugins/specweave-ado/lib/ado-spec-sync.js.map +1 -1
  9. package/dist/plugins/specweave-ado/lib/ado-status-sync.d.ts +12 -3
  10. package/dist/plugins/specweave-ado/lib/ado-status-sync.d.ts.map +1 -1
  11. package/dist/plugins/specweave-ado/lib/ado-status-sync.js +37 -3
  12. package/dist/plugins/specweave-ado/lib/ado-status-sync.js.map +1 -1
  13. package/dist/plugins/specweave-github/lib/github-feature-sync.d.ts +6 -11
  14. package/dist/plugins/specweave-github/lib/github-feature-sync.d.ts.map +1 -1
  15. package/dist/plugins/specweave-github/lib/github-feature-sync.js +6 -11
  16. package/dist/plugins/specweave-github/lib/github-feature-sync.js.map +1 -1
  17. package/dist/plugins/specweave-github/lib/github-increment-sync-cli.d.ts +21 -0
  18. package/dist/plugins/specweave-github/lib/github-increment-sync-cli.d.ts.map +1 -0
  19. package/dist/plugins/specweave-github/lib/github-increment-sync-cli.js +445 -0
  20. package/dist/plugins/specweave-github/lib/github-increment-sync-cli.js.map +1 -0
  21. package/dist/plugins/specweave-github/lib/github-status-sync.d.ts +10 -0
  22. package/dist/plugins/specweave-github/lib/github-status-sync.d.ts.map +1 -1
  23. package/dist/plugins/specweave-github/lib/github-status-sync.js +40 -2
  24. package/dist/plugins/specweave-github/lib/github-status-sync.js.map +1 -1
  25. package/dist/plugins/specweave-github/lib/increment-issue-builder.d.ts +94 -0
  26. package/dist/plugins/specweave-github/lib/increment-issue-builder.d.ts.map +1 -0
  27. package/dist/plugins/specweave-github/lib/increment-issue-builder.js +369 -0
  28. package/dist/plugins/specweave-github/lib/increment-issue-builder.js.map +1 -0
  29. package/dist/plugins/specweave-jira/lib/jira-board-resolver.d.ts +50 -0
  30. package/dist/plugins/specweave-jira/lib/jira-board-resolver.d.ts.map +1 -0
  31. package/dist/plugins/specweave-jira/lib/jira-board-resolver.js +84 -0
  32. package/dist/plugins/specweave-jira/lib/jira-board-resolver.js.map +1 -0
  33. package/dist/plugins/specweave-jira/lib/jira-spec-sync.d.ts +12 -0
  34. package/dist/plugins/specweave-jira/lib/jira-spec-sync.d.ts.map +1 -1
  35. package/dist/plugins/specweave-jira/lib/jira-spec-sync.js +57 -5
  36. package/dist/plugins/specweave-jira/lib/jira-spec-sync.js.map +1 -1
  37. package/dist/plugins/specweave-jira/lib/jira-status-sync.d.ts +5 -1
  38. package/dist/plugins/specweave-jira/lib/jira-status-sync.d.ts.map +1 -1
  39. package/dist/plugins/specweave-jira/lib/jira-status-sync.js +12 -4
  40. package/dist/plugins/specweave-jira/lib/jira-status-sync.js.map +1 -1
  41. package/dist/src/cli/commands/import-external.d.ts.map +1 -1
  42. package/dist/src/cli/commands/import-external.js +12 -7
  43. package/dist/src/cli/commands/import-external.js.map +1 -1
  44. package/dist/src/cli/helpers/init/external-import.d.ts.map +1 -1
  45. package/dist/src/cli/helpers/init/external-import.js +308 -36
  46. package/dist/src/cli/helpers/init/external-import.js.map +1 -1
  47. package/dist/src/cli/helpers/init/jira-ado-auto-detect.d.ts +115 -0
  48. package/dist/src/cli/helpers/init/jira-ado-auto-detect.d.ts.map +1 -0
  49. package/dist/src/cli/helpers/init/jira-ado-auto-detect.js +590 -0
  50. package/dist/src/cli/helpers/init/jira-ado-auto-detect.js.map +1 -0
  51. package/dist/src/cli/helpers/issue-tracker/ado-area-selection.d.ts +65 -0
  52. package/dist/src/cli/helpers/issue-tracker/ado-area-selection.d.ts.map +1 -0
  53. package/dist/src/cli/helpers/issue-tracker/ado-area-selection.js +278 -0
  54. package/dist/src/cli/helpers/issue-tracker/ado-area-selection.js.map +1 -0
  55. package/dist/src/cli/helpers/issue-tracker/jira-board-selection.d.ts +64 -0
  56. package/dist/src/cli/helpers/issue-tracker/jira-board-selection.d.ts.map +1 -0
  57. package/dist/src/cli/helpers/issue-tracker/jira-board-selection.js +251 -0
  58. package/dist/src/cli/helpers/issue-tracker/jira-board-selection.js.map +1 -0
  59. package/dist/src/config/types.d.ts +6 -6
  60. package/dist/src/core/ac-test-validator-cli.js +4 -1
  61. package/dist/src/core/ac-test-validator-cli.js.map +1 -1
  62. package/dist/src/core/ac-test-validator.d.ts.map +1 -1
  63. package/dist/src/core/ac-test-validator.js +4 -1
  64. package/dist/src/core/ac-test-validator.js.map +1 -1
  65. package/dist/src/core/background/index.d.ts +11 -0
  66. package/dist/src/core/background/index.d.ts.map +1 -0
  67. package/dist/src/core/background/index.js +11 -0
  68. package/dist/src/core/background/index.js.map +1 -0
  69. package/dist/src/core/background/job-manager.d.ts +65 -0
  70. package/dist/src/core/background/job-manager.d.ts.map +1 -0
  71. package/dist/src/core/background/job-manager.js +192 -0
  72. package/dist/src/core/background/job-manager.js.map +1 -0
  73. package/dist/src/core/background/types.d.ts +59 -0
  74. package/dist/src/core/background/types.d.ts.map +1 -0
  75. package/dist/src/core/background/types.js +8 -0
  76. package/dist/src/core/background/types.js.map +1 -0
  77. package/dist/src/core/repo-structure/multi-repo-configurator.d.ts +25 -0
  78. package/dist/src/core/repo-structure/multi-repo-configurator.d.ts.map +1 -0
  79. package/dist/src/core/repo-structure/multi-repo-configurator.js +614 -0
  80. package/dist/src/core/repo-structure/multi-repo-configurator.js.map +1 -0
  81. package/dist/src/core/repo-structure/repo-initializer.d.ts +40 -0
  82. package/dist/src/core/repo-structure/repo-initializer.d.ts.map +1 -0
  83. package/dist/src/core/repo-structure/repo-initializer.js +252 -0
  84. package/dist/src/core/repo-structure/repo-initializer.js.map +1 -0
  85. package/dist/src/core/repo-structure/repo-structure-manager.d.ts +3 -37
  86. package/dist/src/core/repo-structure/repo-structure-manager.d.ts.map +1 -1
  87. package/dist/src/core/repo-structure/repo-structure-manager.js +23 -803
  88. package/dist/src/core/repo-structure/repo-structure-manager.js.map +1 -1
  89. package/dist/src/core/types/increment-metadata.d.ts +75 -0
  90. package/dist/src/core/types/increment-metadata.d.ts.map +1 -1
  91. package/dist/src/core/types/spec-metadata.d.ts +2 -0
  92. package/dist/src/core/types/spec-metadata.d.ts.map +1 -1
  93. package/dist/src/core/types/sync-profile.d.ts +137 -5
  94. package/dist/src/core/types/sync-profile.d.ts.map +1 -1
  95. package/dist/src/core/types/sync-profile.js +63 -0
  96. package/dist/src/core/types/sync-profile.js.map +1 -1
  97. package/dist/src/importers/external-importer.d.ts +25 -0
  98. package/dist/src/importers/external-importer.d.ts.map +1 -1
  99. package/dist/src/importers/github-importer.d.ts.map +1 -1
  100. package/dist/src/importers/github-importer.js +5 -3
  101. package/dist/src/importers/github-importer.js.map +1 -1
  102. package/dist/src/importers/import-coordinator.d.ts +20 -0
  103. package/dist/src/importers/import-coordinator.d.ts.map +1 -1
  104. package/dist/src/importers/import-coordinator.js.map +1 -1
  105. package/dist/src/importers/item-converter.d.ts +51 -0
  106. package/dist/src/importers/item-converter.d.ts.map +1 -1
  107. package/dist/src/importers/item-converter.js +39 -12
  108. package/dist/src/importers/item-converter.js.map +1 -1
  109. package/dist/src/init/architecture/types.d.ts +2 -2
  110. package/dist/src/init/compliance/types.d.ts +1 -1
  111. package/dist/src/init/repo/types.d.ts +1 -1
  112. package/dist/src/living-docs/fs-id-allocator.d.ts +72 -3
  113. package/dist/src/living-docs/fs-id-allocator.d.ts.map +1 -1
  114. package/dist/src/living-docs/fs-id-allocator.js +142 -16
  115. package/dist/src/living-docs/fs-id-allocator.js.map +1 -1
  116. package/dist/src/locales/de/cli.json +14 -0
  117. package/dist/src/locales/es/cli.json +14 -0
  118. package/dist/src/locales/fr/cli.json +14 -0
  119. package/dist/src/locales/ja/cli.json +14 -0
  120. package/dist/src/locales/ko/cli.json +14 -0
  121. package/dist/src/locales/pt/cli.json +14 -0
  122. package/dist/src/locales/ru/cli.json +14 -0
  123. package/dist/src/locales/zh/cli.json +14 -0
  124. package/dist/src/utils/chalk-fallback.d.ts +38 -0
  125. package/dist/src/utils/chalk-fallback.d.ts.map +1 -0
  126. package/dist/src/utils/chalk-fallback.js +118 -0
  127. package/dist/src/utils/chalk-fallback.js.map +1 -0
  128. package/dist/src/utils/project-id-generator.d.ts +127 -0
  129. package/dist/src/utils/project-id-generator.d.ts.map +1 -0
  130. package/dist/src/utils/project-id-generator.js +228 -0
  131. package/dist/src/utils/project-id-generator.js.map +1 -0
  132. package/package.json +1 -1
  133. package/plugins/specweave/agents/pm/AGENT.md +202 -0
  134. package/plugins/specweave/commands/specweave-import-external.md +5 -3
  135. package/plugins/specweave/commands/specweave-jobs.md +160 -0
  136. package/plugins/specweave/commands/specweave-sync-docs.md +6 -2
  137. package/plugins/specweave/hooks/pre-task-completion.sh +35 -17
  138. package/plugins/specweave/lib/vendor/core/ac-test-validator-cli.d.ts +16 -0
  139. package/plugins/specweave/lib/vendor/core/ac-test-validator-cli.js +121 -0
  140. package/plugins/specweave/lib/vendor/core/ac-test-validator-cli.js.map +1 -0
  141. package/plugins/specweave/lib/vendor/core/ac-test-validator.d.ts +111 -0
  142. package/plugins/specweave/lib/vendor/core/ac-test-validator.js +295 -0
  143. package/plugins/specweave/lib/vendor/core/ac-test-validator.js.map +1 -0
  144. package/plugins/specweave/lib/vendor/core/types/increment-metadata.d.ts +75 -0
  145. package/plugins/specweave/lib/vendor/utils/chalk-fallback.d.ts +38 -0
  146. package/plugins/specweave/lib/vendor/utils/chalk-fallback.js +118 -0
  147. package/plugins/specweave/lib/vendor/utils/chalk-fallback.js.map +1 -0
  148. package/plugins/specweave/lib/vendor/utils/fs-native.d.ts +179 -0
  149. package/plugins/specweave/lib/vendor/utils/fs-native.js +319 -0
  150. package/plugins/specweave/lib/vendor/utils/fs-native.js.map +1 -0
  151. package/plugins/specweave/skills/code-reviewer/SKILL.md +1 -1
  152. package/plugins/specweave/skills/docs-updater/SKILL.md +61 -0
  153. package/plugins/specweave/skills/increment-planner/SKILL.md +10 -335
  154. package/plugins/specweave/skills/increment-planner/templates/metadata.json +13 -0
  155. package/plugins/specweave/skills/increment-planner/templates/plan.md +50 -0
  156. package/plugins/specweave/skills/increment-planner/templates/spec-multi-project.md +86 -0
  157. package/plugins/specweave/skills/increment-planner/templates/spec-single-project.md +50 -0
  158. package/plugins/specweave/skills/increment-planner/templates/tasks-multi-project.md +86 -0
  159. package/plugins/specweave/skills/increment-planner/templates/tasks-single-project.md +48 -0
  160. package/plugins/specweave-ado/commands/specweave-ado-import-areas.md +358 -0
  161. package/plugins/specweave-ado/lib/ado-spec-sync.js +59 -3
  162. package/plugins/specweave-ado/lib/ado-spec-sync.ts +72 -3
  163. package/plugins/specweave-ado/lib/ado-status-sync.js +35 -3
  164. package/plugins/specweave-ado/lib/ado-status-sync.ts +48 -4
  165. package/plugins/specweave-alternatives/skills/architecture-alternatives/SKILL.md +1 -0
  166. package/plugins/specweave-alternatives/skills/bmad-method/SKILL.md +1 -0
  167. package/plugins/specweave-core/skills/code-quality/SKILL.md +1 -0
  168. package/plugins/specweave-core/skills/design-patterns/SKILL.md +1 -0
  169. package/plugins/specweave-core/skills/software-architecture/SKILL.md +1 -0
  170. package/plugins/specweave-github/commands/specweave-github-cleanup-duplicates.md +14 -10
  171. package/plugins/specweave-github/commands/specweave-github-sync.md +57 -0
  172. package/plugins/specweave-github/hooks/.specweave/logs/hooks-debug.log +74 -0
  173. package/plugins/specweave-github/lib/github-feature-sync.ts +6 -11
  174. package/plugins/specweave-github/lib/github-increment-sync-cli.js +456 -0
  175. package/plugins/specweave-github/lib/github-increment-sync-cli.ts +588 -0
  176. package/plugins/specweave-github/lib/github-status-sync.js +37 -1
  177. package/plugins/specweave-github/lib/github-status-sync.ts +60 -4
  178. package/plugins/specweave-github/lib/increment-issue-builder.js +389 -0
  179. package/plugins/specweave-github/lib/increment-issue-builder.ts +502 -0
  180. package/plugins/specweave-github/skills/github-issue-standard/SKILL.md +19 -24
  181. package/plugins/specweave-infrastructure/agents/observability-engineer/AGENT.md +15 -23
  182. package/plugins/specweave-jira/commands/specweave-jira-import-boards.md +331 -0
  183. package/plugins/specweave-jira/lib/jira-spec-sync.js +53 -5
  184. package/plugins/specweave-jira/lib/jira-spec-sync.ts +87 -7
  185. package/plugins/specweave-jira/lib/jira-status-sync.js +9 -3
  186. package/plugins/specweave-jira/lib/jira-status-sync.ts +15 -6
  187. package/plugins/specweave-ml/agents/data-scientist/AGENT.md +16 -20
  188. package/plugins/specweave-ml/agents/ml-engineer/AGENT.md +18 -19
  189. package/plugins/specweave-ml/skills/{ml-pipeline-workflow → mlops-dag-builder}/SKILL.md +18 -14
  190. package/plugins/specweave-release/hooks/.specweave/logs/dora-tracking.log +111 -0
  191. package/plugins/specweave-ui/skills/browser-automation/SKILL.md +1 -1
  192. package/plugins/specweave-ui/skills/ui-testing/SKILL.md +10 -122
  193. package/dist/plugins/specweave-github/lib/epic-content-builder.d.ts +0 -70
  194. package/dist/plugins/specweave-github/lib/epic-content-builder.d.ts.map +0 -1
  195. package/dist/plugins/specweave-github/lib/epic-content-builder.js +0 -258
  196. package/dist/plugins/specweave-github/lib/epic-content-builder.js.map +0 -1
  197. package/dist/plugins/specweave-github/lib/github-epic-sync.d.ts +0 -83
  198. package/dist/plugins/specweave-github/lib/github-epic-sync.d.ts.map +0 -1
  199. package/dist/plugins/specweave-github/lib/github-epic-sync.js +0 -466
  200. package/dist/plugins/specweave-github/lib/github-epic-sync.js.map +0 -1
  201. package/plugins/specweave-github/lib/epic-content-builder.js +0 -265
  202. package/plugins/specweave-github/lib/epic-content-builder.ts +0 -376
  203. package/plugins/specweave-github/lib/github-epic-sync.js +0 -488
  204. package/plugins/specweave-github/lib/github-epic-sync.ts +0 -715
@@ -0,0 +1,65 @@
1
+ /**
2
+ * ADO Area Path Selection Helper (v0.29.0+)
3
+ *
4
+ * Provides UI prompts for selecting ADO area paths and mapping them to SpecWeave projects.
5
+ * Used during `specweave init` when user selects area path-based team organization.
6
+ *
7
+ * @module cli/helpers/issue-tracker/ado-area-selection
8
+ */
9
+ import type { AdoAreaPathMappingConfig } from '../../../core/types/sync-profile.js';
10
+ /**
11
+ * ADO organization strategy
12
+ */
13
+ export type AdoOrganizationStrategy = 'single-project' | 'area-path-based' | 'team-based' | 'multi-project';
14
+ /**
15
+ * Area path selection result
16
+ */
17
+ export interface AreaPathSelectionResult {
18
+ /** Selected organization strategy */
19
+ strategy: AdoOrganizationStrategy;
20
+ /** Area path mapping config (only for area-path-based strategy) */
21
+ areaPathMapping?: AdoAreaPathMappingConfig;
22
+ /** Selected project names (for multi-project strategy) */
23
+ projectNames?: string[];
24
+ /** Single project name (for single-project strategy) */
25
+ projectName?: string;
26
+ /** Teams (for team-based strategy, maps to area paths) */
27
+ teams?: string[];
28
+ }
29
+ /**
30
+ * Prompt user to select ADO organization strategy
31
+ *
32
+ * @param hasMultipleAreaPaths Whether the project has multiple area paths
33
+ * @returns Selected strategy
34
+ */
35
+ export declare function promptAdoOrganizationStrategy(hasMultipleAreaPaths: boolean): Promise<AdoOrganizationStrategy>;
36
+ /**
37
+ * Fetch and display area paths for an ADO project
38
+ * Prompts user to select area paths and map them to SpecWeave projects
39
+ *
40
+ * @param organization ADO organization name
41
+ * @param project ADO project name
42
+ * @param pat Personal Access Token
43
+ * @param projectRoot Path to SpecWeave project root (for existing project IDs)
44
+ * @returns Area path mapping configuration
45
+ */
46
+ export declare function promptAreaPathSelection(organization: string, project: string, pat: string, projectRoot: string): Promise<AdoAreaPathMappingConfig | null>;
47
+ /**
48
+ * Complete area path selection flow
49
+ * Orchestrates strategy selection and area path mapping
50
+ *
51
+ * @param credentials ADO credentials (partial)
52
+ * @param projectRoot Path to SpecWeave project root
53
+ * @returns Area path selection result
54
+ */
55
+ export declare function completeAreaPathSelectionFlow(credentials: {
56
+ organization: string;
57
+ project: string;
58
+ pat: string;
59
+ teams?: string[];
60
+ }, projectRoot: string): Promise<AreaPathSelectionResult>;
61
+ /**
62
+ * Display summary of area path mapping
63
+ */
64
+ export declare function displayAreaPathMappingSummary(mapping: AdoAreaPathMappingConfig): void;
65
+ //# sourceMappingURL=ado-area-selection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ado-area-selection.d.ts","sourceRoot":"","sources":["../../../../../src/cli/helpers/issue-tracker/ado-area-selection.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,OAAO,KAAK,EAAsB,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAWxG;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAC/B,gBAAgB,GAChB,iBAAiB,GACjB,YAAY,GACZ,eAAe,CAAC;AAEpB;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,qCAAqC;IACrC,QAAQ,EAAE,uBAAuB,CAAC;IAElC,mEAAmE;IACnE,eAAe,CAAC,EAAE,wBAAwB,CAAC;IAE3C,0DAA0D;IAC1D,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IAExB,wDAAwD;IACxD,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,0DAA0D;IAC1D,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CAClB;AAED;;;;;GAKG;AACH,wBAAsB,6BAA6B,CACjD,oBAAoB,EAAE,OAAO,GAC5B,OAAO,CAAC,uBAAuB,CAAC,CA6BlC;AAED;;;;;;;;;GASG;AACH,wBAAsB,uBAAuB,CAC3C,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,MAAM,EACf,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,wBAAwB,GAAG,IAAI,CAAC,CA2I1C;AAED;;;;;;;GAOG;AACH,wBAAsB,6BAA6B,CACjD,WAAW,EAAE;IACX,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CAClB,EACD,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,uBAAuB,CAAC,CAgGlC;AAED;;GAEG;AACH,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,wBAAwB,GAAG,IAAI,CAgBrF"}
@@ -0,0 +1,278 @@
1
+ /**
2
+ * ADO Area Path Selection Helper (v0.29.0+)
3
+ *
4
+ * Provides UI prompts for selecting ADO area paths and mapping them to SpecWeave projects.
5
+ * Used during `specweave init` when user selects area path-based team organization.
6
+ *
7
+ * @module cli/helpers/issue-tracker/ado-area-selection
8
+ */
9
+ import chalk from 'chalk';
10
+ import { select, checkbox, input, confirm } from '@inquirer/prompts';
11
+ import ora from 'ora';
12
+ import { fetchAreaPathsForProject, } from '../../../../plugins/specweave-ado/lib/ado-board-resolver.js';
13
+ import { generateProjectId, getExistingProjectIds, normalizeToProjectId, } from '../../../utils/project-id-generator.js';
14
+ /**
15
+ * Prompt user to select ADO organization strategy
16
+ *
17
+ * @param hasMultipleAreaPaths Whether the project has multiple area paths
18
+ * @returns Selected strategy
19
+ */
20
+ export async function promptAdoOrganizationStrategy(hasMultipleAreaPaths) {
21
+ console.log(chalk.cyan('\n🔷 Azure DevOps Project Organization\n'));
22
+ const defaultStrategy = hasMultipleAreaPaths ? 'area-path-based' : 'single-project';
23
+ const strategy = await select({
24
+ message: 'How do you want to organize work items?',
25
+ choices: [
26
+ {
27
+ name: 'Single project (all work at root level)',
28
+ value: 'single-project',
29
+ description: 'Best for small teams or single-product companies',
30
+ },
31
+ {
32
+ name: 'Area path-based teams (area paths → SpecWeave projects)',
33
+ value: 'area-path-based',
34
+ description: 'Best for enterprise teams using area paths for organization',
35
+ },
36
+ {
37
+ name: 'Team-based organization (teams → SpecWeave projects)',
38
+ value: 'team-based',
39
+ description: 'Best when teams have dedicated areas in ADO',
40
+ },
41
+ ],
42
+ default: defaultStrategy,
43
+ });
44
+ return strategy;
45
+ }
46
+ /**
47
+ * Fetch and display area paths for an ADO project
48
+ * Prompts user to select area paths and map them to SpecWeave projects
49
+ *
50
+ * @param organization ADO organization name
51
+ * @param project ADO project name
52
+ * @param pat Personal Access Token
53
+ * @param projectRoot Path to SpecWeave project root (for existing project IDs)
54
+ * @returns Area path mapping configuration
55
+ */
56
+ export async function promptAreaPathSelection(organization, project, pat, projectRoot) {
57
+ const spinner = ora(`Fetching area paths from project ${project}...`).start();
58
+ try {
59
+ // Fetch available area paths
60
+ const areaPaths = await fetchAreaPathsForProject(organization, project, pat);
61
+ spinner.succeed(`Found ${areaPaths.length} area path(s) in project ${project}`);
62
+ if (areaPaths.length === 0) {
63
+ console.log(chalk.yellow('\n⚠️ No area paths found in this project.'));
64
+ console.log(chalk.gray(' Using root level organization.\n'));
65
+ return null;
66
+ }
67
+ // Filter to show only top-level area paths (direct children of project root)
68
+ // Exclude the root itself
69
+ const topLevelPaths = areaPaths.filter((ap) => {
70
+ // Path format: "ProjectName" (root) or "ProjectName\\ChildArea"
71
+ const parts = ap.path.split('\\');
72
+ return parts.length === 2; // Direct child of root
73
+ });
74
+ if (topLevelPaths.length === 0) {
75
+ console.log(chalk.yellow('\n⚠️ No child area paths found (only root area exists).'));
76
+ console.log(chalk.gray(' You can create area paths in ADO and run this setup again.\n'));
77
+ return null;
78
+ }
79
+ // Show area paths and let user select
80
+ console.log(chalk.cyan('\n📋 Select area paths to map to SpecWeave projects:\n'));
81
+ // Filter out archive/inactive paths by default (uncheck them)
82
+ const isArchivePath = (areaPath) => areaPath.name.toLowerCase().includes('archive') ||
83
+ areaPath.name.toLowerCase().includes('inactive') ||
84
+ areaPath.name.toLowerCase().includes('deprecated') ||
85
+ areaPath.name.toLowerCase().includes('legacy');
86
+ const selectedPaths = await checkbox({
87
+ message: 'Select area paths (Space to toggle, Enter to confirm):',
88
+ choices: topLevelPaths.map((ap) => ({
89
+ name: `${ap.name}${ap.hasChildren ? ' (has sub-areas)' : ''}`,
90
+ value: ap.path,
91
+ checked: !isArchivePath(ap), // Pre-select non-archive paths
92
+ })),
93
+ });
94
+ if (selectedPaths.length === 0) {
95
+ console.log(chalk.yellow('\n⚠️ No area paths selected. Falling back to single-project mode.\n'));
96
+ return null;
97
+ }
98
+ // Get existing project IDs to prevent collisions
99
+ const existingIds = getExistingProjectIds(projectRoot);
100
+ // Map selected area paths to SpecWeave projects
101
+ console.log(chalk.cyan('\n🏷️ Mapping area paths to SpecWeave projects:\n'));
102
+ const areaPathMappings = [];
103
+ for (const pathStr of selectedPaths) {
104
+ const areaPath = areaPaths.find((ap) => ap.path === pathStr);
105
+ if (!areaPath)
106
+ continue;
107
+ // Suggest a project ID based on area path name
108
+ const suggestedId = generateProjectId({
109
+ externalContainer: project,
110
+ localName: areaPath.name,
111
+ provider: 'ado',
112
+ existingIds: [...existingIds, ...areaPathMappings.map((m) => m.specweaveProject)],
113
+ });
114
+ // Allow user to customize the project ID
115
+ const projectId = await input({
116
+ message: `SpecWeave project ID for "${areaPath.name}":`,
117
+ default: suggestedId.id,
118
+ validate: (val) => {
119
+ if (!val || val.trim() === '') {
120
+ return 'Project ID cannot be empty';
121
+ }
122
+ const normalized = normalizeToProjectId(val);
123
+ if (normalized !== val) {
124
+ return `Invalid format. Suggested: "${normalized}"`;
125
+ }
126
+ if (existingIds.includes(val) || areaPathMappings.some((m) => m.specweaveProject === val)) {
127
+ return `Project ID "${val}" already exists. Choose a different name.`;
128
+ }
129
+ return true;
130
+ },
131
+ });
132
+ // Ask about including child area paths
133
+ let includeChildren = true;
134
+ if (areaPath.hasChildren) {
135
+ includeChildren = await confirm({
136
+ message: `Include child area paths under "${areaPath.name}"?`,
137
+ default: true,
138
+ });
139
+ }
140
+ // Optional: Add keywords for auto-classification
141
+ const addKeywords = await confirm({
142
+ message: `Add keywords for auto-classification of user stories to ${projectId}?`,
143
+ default: false,
144
+ });
145
+ let keywords;
146
+ if (addKeywords) {
147
+ const keywordsInput = await input({
148
+ message: 'Keywords (comma-separated, e.g., "backend, api, database"):',
149
+ default: '',
150
+ });
151
+ keywords = keywordsInput
152
+ .split(',')
153
+ .map((k) => k.trim())
154
+ .filter((k) => k.length > 0);
155
+ }
156
+ areaPathMappings.push({
157
+ areaPath: areaPath.path,
158
+ specweaveProject: projectId,
159
+ includeChildren,
160
+ keywords,
161
+ });
162
+ console.log(chalk.green(` ✓ ${areaPath.path} → ${projectId}`));
163
+ }
164
+ console.log('');
165
+ return {
166
+ project,
167
+ mappings: areaPathMappings,
168
+ };
169
+ }
170
+ catch (error) {
171
+ spinner.fail('Failed to fetch area paths');
172
+ console.error(chalk.red(` Error: ${error.message}\n`));
173
+ return null;
174
+ }
175
+ }
176
+ /**
177
+ * Complete area path selection flow
178
+ * Orchestrates strategy selection and area path mapping
179
+ *
180
+ * @param credentials ADO credentials (partial)
181
+ * @param projectRoot Path to SpecWeave project root
182
+ * @returns Area path selection result
183
+ */
184
+ export async function completeAreaPathSelectionFlow(credentials, projectRoot) {
185
+ // Check if there are area paths in the project
186
+ const spinner = ora('Checking project structure...').start();
187
+ try {
188
+ const areaPaths = await fetchAreaPathsForProject(credentials.organization, credentials.project, credentials.pat);
189
+ const hasMultipleAreaPaths = areaPaths.filter((ap) => {
190
+ const parts = ap.path.split('\\');
191
+ return parts.length === 2; // Direct children
192
+ }).length > 0;
193
+ spinner.stop();
194
+ // Ask about organization strategy
195
+ const strategy = await promptAdoOrganizationStrategy(hasMultipleAreaPaths);
196
+ if (strategy === 'single-project') {
197
+ return {
198
+ strategy: 'single-project',
199
+ projectName: credentials.project,
200
+ };
201
+ }
202
+ if (strategy === 'team-based') {
203
+ // Team-based maps to area paths internally
204
+ // Ask user to enter team names if not already provided
205
+ let teams = credentials.teams || [];
206
+ if (teams.length === 0) {
207
+ const teamsInput = await input({
208
+ message: 'Enter team names (comma-separated):',
209
+ default: '',
210
+ });
211
+ teams = teamsInput
212
+ .split(',')
213
+ .map((t) => t.trim())
214
+ .filter((t) => t.length > 0);
215
+ }
216
+ if (teams.length === 0) {
217
+ console.log(chalk.yellow('\n⚠️ No teams specified. Falling back to single-project mode.\n'));
218
+ return {
219
+ strategy: 'single-project',
220
+ projectName: credentials.project,
221
+ };
222
+ }
223
+ return {
224
+ strategy: 'team-based',
225
+ projectName: credentials.project,
226
+ teams,
227
+ };
228
+ }
229
+ if (strategy === 'area-path-based') {
230
+ const areaPathMapping = await promptAreaPathSelection(credentials.organization, credentials.project, credentials.pat, projectRoot);
231
+ if (areaPathMapping && areaPathMapping.mappings.length > 0) {
232
+ return {
233
+ strategy: 'area-path-based',
234
+ areaPathMapping,
235
+ };
236
+ }
237
+ // Fall back to single-project if no area paths selected
238
+ return {
239
+ strategy: 'single-project',
240
+ projectName: credentials.project,
241
+ };
242
+ }
243
+ // multi-project (rare for ADO)
244
+ return {
245
+ strategy: 'single-project',
246
+ projectName: credentials.project,
247
+ };
248
+ }
249
+ catch (error) {
250
+ spinner.stop();
251
+ console.error(chalk.yellow(`\n⚠️ Could not analyze project structure: ${error.message}`));
252
+ console.log(chalk.gray(' Proceeding with single-project mode.\n'));
253
+ return {
254
+ strategy: 'single-project',
255
+ projectName: credentials.project,
256
+ };
257
+ }
258
+ }
259
+ /**
260
+ * Display summary of area path mapping
261
+ */
262
+ export function displayAreaPathMappingSummary(mapping) {
263
+ console.log(chalk.cyan.bold('\n🔷 ADO Area Path Mapping Summary\n'));
264
+ console.log(chalk.gray(` Project: ${mapping.project}`));
265
+ console.log(chalk.gray(` Area paths mapped: ${mapping.mappings.length}\n`));
266
+ for (const area of mapping.mappings) {
267
+ console.log(chalk.green(` ✓ ${area.areaPath}`));
268
+ console.log(chalk.gray(` → SpecWeave project: ${area.specweaveProject}`));
269
+ if (area.includeChildren) {
270
+ console.log(chalk.gray(` → Includes child areas: yes`));
271
+ }
272
+ if (area.keywords && area.keywords.length > 0) {
273
+ console.log(chalk.gray(` → Keywords: ${area.keywords.join(', ')}`));
274
+ }
275
+ }
276
+ console.log('');
277
+ }
278
+ //# sourceMappingURL=ado-area-selection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ado-area-selection.js","sourceRoot":"","sources":["../../../../../src/cli/helpers/issue-tracker/ado-area-selection.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,GAAG,MAAM,KAAK,CAAC;AAEtB,OAAO,EACL,wBAAwB,GAEzB,MAAM,6DAA6D,CAAC;AACrE,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,wCAAwC,CAAC;AA+BhD;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,6BAA6B,CACjD,oBAA6B;IAE7B,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,0CAA0C,CAAC,CAAC,CAAC;IAEpE,MAAM,eAAe,GACnB,oBAAoB,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,gBAAgB,CAAC;IAE9D,MAAM,QAAQ,GAAG,MAAM,MAAM,CAA0B;QACrD,OAAO,EAAE,yCAAyC;QAClD,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,yCAAyC;gBAC/C,KAAK,EAAE,gBAAgB;gBACvB,WAAW,EAAE,kDAAkD;aAChE;YACD;gBACE,IAAI,EAAE,yDAAyD;gBAC/D,KAAK,EAAE,iBAAiB;gBACxB,WAAW,EAAE,6DAA6D;aAC3E;YACD;gBACE,IAAI,EAAE,sDAAsD;gBAC5D,KAAK,EAAE,YAAY;gBACnB,WAAW,EAAE,6CAA6C;aAC3D;SACF;QACD,OAAO,EAAE,eAAe;KACzB,CAAC,CAAC;IAEH,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AI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC9C,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,oBAAoB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;QAC1E,CAAC;IACH,CAAC;IACD,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAClB,CAAC"}
@@ -0,0 +1,64 @@
1
+ /**
2
+ * JIRA Board Selection Helper (v0.29.0+)
3
+ *
4
+ * Provides UI prompts for selecting JIRA boards and mapping them to SpecWeave projects.
5
+ * Used during `specweave init` when user selects board-based team organization.
6
+ *
7
+ * @module cli/helpers/issue-tracker/jira-board-selection
8
+ */
9
+ import type { JiraBoardMappingConfig } from '../../../core/types/sync-profile.js';
10
+ import { JiraClient } from '../../../integrations/jira/jira-client.js';
11
+ /**
12
+ * JIRA organization strategy
13
+ */
14
+ export type JiraOrganizationStrategy = 'single-project' | 'board-based' | 'multi-project';
15
+ /**
16
+ * Board selection result
17
+ */
18
+ export interface BoardSelectionResult {
19
+ /** Selected organization strategy */
20
+ strategy: JiraOrganizationStrategy;
21
+ /** Board mapping config (only for board-based strategy) */
22
+ boardMapping?: JiraBoardMappingConfig;
23
+ /** Selected project keys (for multi-project strategy) */
24
+ projectKeys?: string[];
25
+ /** Single project key (for single-project strategy) */
26
+ projectKey?: string;
27
+ }
28
+ /**
29
+ * Prompt user to select JIRA organization strategy
30
+ *
31
+ * @param projectCount Number of projects user has access to
32
+ * @returns Selected strategy
33
+ */
34
+ export declare function promptOrganizationStrategy(projectCount: number): Promise<JiraOrganizationStrategy>;
35
+ /**
36
+ * Fetch and display boards for a JIRA project
37
+ * Prompts user to select boards and map them to SpecWeave projects
38
+ *
39
+ * @param client JIRA client for API calls
40
+ * @param projectKey JIRA project key (e.g., "CORE")
41
+ * @param projectRoot Path to SpecWeave project root (for existing project IDs)
42
+ * @returns Board mapping configuration
43
+ */
44
+ export declare function promptBoardSelection(client: JiraClient, projectKey: string, projectRoot: string): Promise<JiraBoardMappingConfig | null>;
45
+ /**
46
+ * Complete board selection flow
47
+ * Orchestrates strategy selection and board mapping
48
+ *
49
+ * @param credentials JIRA credentials (partial)
50
+ * @param selectedProjects Already selected JIRA projects
51
+ * @param projectRoot Path to SpecWeave project root
52
+ * @returns Board selection result
53
+ */
54
+ export declare function completeBoardSelectionFlow(credentials: {
55
+ domain: string;
56
+ email: string;
57
+ token: string;
58
+ instanceType: 'cloud' | 'server';
59
+ }, selectedProjects: string[], projectRoot: string): Promise<BoardSelectionResult>;
60
+ /**
61
+ * Display summary of board mapping
62
+ */
63
+ export declare function displayBoardMappingSummary(mapping: JiraBoardMappingConfig): void;
64
+ //# sourceMappingURL=jira-board-selection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jira-board-selection.d.ts","sourceRoot":"","sources":["../../../../../src/cli/helpers/issue-tracker/jira-board-selection.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,OAAO,KAAK,EAAoB,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AACpG,OAAO,EAAE,UAAU,EAAE,MAAM,2CAA2C,CAAC;AAQvE;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAChC,gBAAgB,GAChB,aAAa,GACb,eAAe,CAAC;AAEpB;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,qCAAqC;IACrC,QAAQ,EAAE,wBAAwB,CAAC;IAEnC,2DAA2D;IAC3D,YAAY,CAAC,EAAE,sBAAsB,CAAC;IAEtC,yDAAyD;IACzD,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IAEvB,uDAAuD;IACvD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;GAKG;AACH,wBAAsB,0BAA0B,CAC9C,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,wBAAwB,CAAC,CAgCnC;AAED;;;;;;;;GAQG;AACH,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,UAAU,EAClB,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,sBAAsB,GAAG,IAAI,CAAC,CAoHxC;AAED;;;;;;;;GAQG;AACH,wBAAsB,0BAA0B,CAC9C,WAAW,EAAE;IACX,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,OAAO,GAAG,QAAQ,CAAC;CAClC,EACD,gBAAgB,EAAE,MAAM,EAAE,EAC1B,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,oBAAoB,CAAC,CAwF/B;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,sBAAsB,GAAG,IAAI,CAahF"}