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
@@ -27,10 +27,20 @@ export declare class GitHubStatusSync {
27
27
  /**
28
28
  * Update GitHub issue status
29
29
  *
30
+ * Preserves existing labels that are not status-related.
31
+ * Only replaces labels that start with "status:" prefix.
32
+ *
30
33
  * @param issueNumber - GitHub issue number
31
34
  * @param status - New status (state and labels)
32
35
  */
33
36
  updateStatus(issueNumber: number, status: ExternalStatus): Promise<void>;
37
+ /**
38
+ * Get current labels from GitHub issue
39
+ *
40
+ * @param issueNumber - GitHub issue number
41
+ * @returns Array of current label names
42
+ */
43
+ private getCurrentLabels;
34
44
  /**
35
45
  * Post status change comment to GitHub issue
36
46
  *
@@ -1 +1 @@
1
- {"version":3,"file":"github-status-sync.d.ts","sourceRoot":"","sources":["../../../../plugins/specweave-github/lib/github-status-sync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,OAAO,CAAU;IACzB,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,IAAI,CAAS;gBAET,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;IAMtD;;;;;OAKG;IACU,SAAS,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAiBpE;;;;;OAKG;IACU,YAAY,CACvB,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,cAAc,GACrB,OAAO,CAAC,IAAI,CAAC;IAgBhB;;;;;;OAMG;IACU,iBAAiB,CAC5B,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,IAAI,CAAC;CAkBjB"}
1
+ {"version":3,"file":"github-status-sync.d.ts","sourceRoot":"","sources":["../../../../plugins/specweave-github/lib/github-status-sync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,OAAO,CAAU;IACzB,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,IAAI,CAAS;gBAET,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;IAMtD;;;;;OAKG;IACU,SAAS,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAiBpE;;;;;;;;OAQG;IACU,YAAY,CACvB,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,cAAc,GACrB,OAAO,CAAC,IAAI,CAAC;IA+ChB;;;;;OAKG;YACW,gBAAgB;IAgB9B;;;;;;OAMG;IACU,iBAAiB,CAC5B,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,IAAI,CAAC;CAkBjB"}
@@ -38,6 +38,9 @@ export class GitHubStatusSync {
38
38
  /**
39
39
  * Update GitHub issue status
40
40
  *
41
+ * Preserves existing labels that are not status-related.
42
+ * Only replaces labels that start with "status:" prefix.
43
+ *
41
44
  * @param issueNumber - GitHub issue number
42
45
  * @param status - New status (state and labels)
43
46
  */
@@ -48,12 +51,47 @@ export class GitHubStatusSync {
48
51
  issue_number: issueNumber,
49
52
  state: status.state
50
53
  };
51
- // Add labels if provided
54
+ // Merge labels - preserve non-status labels, replace status labels
52
55
  if (status.labels && status.labels.length > 0) {
53
- updateData.labels = status.labels;
56
+ // Fetch current labels to preserve non-status ones
57
+ const currentLabels = await this.getCurrentLabels(issueNumber);
58
+ // Filter out status-related labels (start with "status:")
59
+ const preservedLabels = currentLabels.filter(label => !label.startsWith('status:'));
60
+ // Get new status labels from the provided status
61
+ const newStatusLabels = status.labels.filter(label => label.startsWith('status:'));
62
+ // Get non-status labels from the provided status (e.g., priority, type)
63
+ const newOtherLabels = status.labels.filter(label => !label.startsWith('status:'));
64
+ // Combine: preserved non-status + new status + new other labels
65
+ const mergedLabels = [...new Set([
66
+ ...preservedLabels,
67
+ ...newStatusLabels,
68
+ ...newOtherLabels
69
+ ])];
70
+ updateData.labels = mergedLabels;
54
71
  }
55
72
  await this.octokit.rest.issues.update(updateData);
56
73
  }
74
+ /**
75
+ * Get current labels from GitHub issue
76
+ *
77
+ * @param issueNumber - GitHub issue number
78
+ * @returns Array of current label names
79
+ */
80
+ async getCurrentLabels(issueNumber) {
81
+ try {
82
+ const response = await this.octokit.rest.issues.get({
83
+ owner: this.owner,
84
+ repo: this.repo,
85
+ issue_number: issueNumber
86
+ });
87
+ return response.data.labels
88
+ .map((label) => (typeof label === 'string' ? label : label.name))
89
+ .filter(Boolean);
90
+ }
91
+ catch {
92
+ return [];
93
+ }
94
+ }
57
95
  /**
58
96
  * Post status change comment to GitHub issue
59
97
  *
@@ -1 +1 @@
1
- {"version":3,"file":"github-status-sync.js","sourceRoot":"","sources":["../../../../plugins/specweave-github/lib/github-status-sync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAOxC,MAAM,OAAO,gBAAgB;IAK3B,YAAY,KAAa,EAAE,KAAa,EAAE,IAAY;QACpD,IAAI,CAAC,OAAO,GAAG,IAAI,OAAO,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;QAC5C,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,SAAS,CAAC,WAAmB;QACxC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,C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AEtD,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC;YAC3C,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,YAAY,EAAE,WAAW;YACzB,IAAI;SACL,CAAC,CAAC;IACL,CAAC;CACF"}
1
+ {"version":3,"file":"github-status-sync.js","sourceRoot":"","sources":["../../../../plugins/specweave-github/lib/github-status-sync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAOxC,MAAM,OAAO,gBAAgB;IAK3B,YAAY,KAAa,EAAE,KAAa,EAAE,IAAY;QACpD,IAAI,CAAC,OAAO,GAAG,IAAI,OAAO,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;QAC5C,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,SAAS,CAAC,WAAmB;QACxC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC;YAClD,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,YAAY,EAAE,WAAW;SAC1B,CAAC,CAAC;QAEH,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,MAAM;aAChC,GAAG,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;aACrE,MAAM,CAAC,OAAO,CAAC,CAAC;QAEnB,OAAO;YACL,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC,KAAK;YAC1B,MAAM;SACP,CAAC;IACJ,CAAC;I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,WAAmB;QAChD,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC;gBAClD,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,YAAY,EAAE,WAAW;aAC1B,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC,MAAM;iBACxB,GAAG,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;iBACrE,MAAM,CAAC,OAAO,CAAa,CAAC;QACjC,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,EAAE,CAAC;QACZ,CAAC;IACH,CAAC;IAED;;;;;;OAMG;IACI,KAAK,CAAC,iBAAiB,CAC5B,WAAmB,EACnB,SAAiB,EACjB,SAAiB;QAEjB,MAAM,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;QAC3C,MAAM,IAAI,GAAG;;;cAGH,SAAS;YACX,SAAS;cACP,SAAS;;yDAEkC,CAAC;QAEtD,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC;YAC3C,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,YAAY,EAAE,WAAW;YACzB,IAAI;SACL,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -0,0 +1,94 @@
1
+ /**
2
+ * Increment Issue Builder - Generate GitHub issues from increment spec.md
3
+ *
4
+ * For brownfield projects without full living docs structure,
5
+ * this builder extracts User Stories and ACs directly from spec.md
6
+ * and generates properly formatted GitHub issues.
7
+ *
8
+ * Correct format: [FS-XXX][US-YYY] User Story Title
9
+ * With ACs as checkable items in issue body.
10
+ *
11
+ * @see ADR-0143 (GitHub Issue Format)
12
+ */
13
+ export interface IncrementFrontmatter {
14
+ increment: string;
15
+ feature_id?: string;
16
+ type?: string;
17
+ status?: string;
18
+ created?: string;
19
+ priority?: string;
20
+ }
21
+ export interface AcceptanceCriterion {
22
+ id: string;
23
+ description: string;
24
+ completed: boolean;
25
+ }
26
+ export interface UserStory {
27
+ id: string;
28
+ title: string;
29
+ asA: string;
30
+ iWant: string;
31
+ soThat: string;
32
+ acceptanceCriteria: AcceptanceCriterion[];
33
+ priority?: string;
34
+ }
35
+ export interface Task {
36
+ id: string;
37
+ title: string;
38
+ completed: boolean;
39
+ userStories: string[];
40
+ priority?: string;
41
+ description?: string;
42
+ }
43
+ export interface IncrementData {
44
+ frontmatter: IncrementFrontmatter;
45
+ title: string;
46
+ problemStatement: string;
47
+ userStories: UserStory[];
48
+ tasks: Task[];
49
+ outOfScope: string[];
50
+ }
51
+ export interface GitHubIssueContent {
52
+ title: string;
53
+ body: string;
54
+ labels: string[];
55
+ }
56
+ export declare class IncrementIssueBuilder {
57
+ private incrementPath;
58
+ private projectRoot;
59
+ constructor(incrementPath: string, projectRoot: string);
60
+ /**
61
+ * Parse increment spec.md and extract all data
62
+ */
63
+ parse(): Promise<IncrementData>;
64
+ /**
65
+ * Extract tasks from tasks.md
66
+ */
67
+ private extractTasks;
68
+ /**
69
+ * Extract a section by heading
70
+ */
71
+ private extractSection;
72
+ /**
73
+ * Extract user stories from spec.md
74
+ */
75
+ private extractUserStories;
76
+ /**
77
+ * Extract acceptance criteria from a user story block
78
+ */
79
+ private extractAcceptanceCriteria;
80
+ /**
81
+ * Build GitHub issue for a single user story
82
+ */
83
+ buildUserStoryIssue(story: UserStory, incrementData: IncrementData, githubRepo?: string): GitHubIssueContent;
84
+ /**
85
+ * Build GitHub issue for the entire increment (epic-style)
86
+ */
87
+ buildIncrementIssue(incrementData: IncrementData, githubRepo?: string): GitHubIssueContent;
88
+ /**
89
+ * Generate a feature ID if not present in frontmatter
90
+ * Uses date-based format: FS-YY-MM-DD
91
+ */
92
+ private generateFeatureId;
93
+ }
94
+ //# sourceMappingURL=increment-issue-builder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"increment-issue-builder.d.ts","sourceRoot":"","sources":["../../../../plugins/specweave-github/lib/increment-issue-builder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAOH,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,kBAAkB,EAAE,mBAAmB,EAAE,CAAC;IAC1C,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,oBAAoB,CAAC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,SAAS,EAAE,CAAC;IACzB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,qBAAa,qBAAqB;IAChC,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,WAAW,CAAS;gBAEhB,aAAa,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM;IAKtD;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,aAAa,CAAC;IAgDrC;;OAEG;YACW,YAAY;IAgE1B;;OAEG;IACH,OAAO,CAAC,cAAc;IAMtB;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAwC1B;;OAEG;IACH,OAAO,CAAC,yBAAyB;IAuBjC;;OAEG;IACH,mBAAmB,CACjB,KAAK,EAAE,SAAS,EAChB,aAAa,EAAE,aAAa,EAC5B,UAAU,CAAC,EAAE,MAAM,GAClB,kBAAkB;IA2FrB;;OAEG;IACH,mBAAmB,CACjB,aAAa,EAAE,aAAa,EAC5B,UAAU,CAAC,EAAE,MAAM,GAClB,kBAAkB;IAuGrB;;;OAGG;IACH,OAAO,CAAC,iBAAiB;CAkB1B"}
@@ -0,0 +1,369 @@
1
+ /**
2
+ * Increment Issue Builder - Generate GitHub issues from increment spec.md
3
+ *
4
+ * For brownfield projects without full living docs structure,
5
+ * this builder extracts User Stories and ACs directly from spec.md
6
+ * and generates properly formatted GitHub issues.
7
+ *
8
+ * Correct format: [FS-XXX][US-YYY] User Story Title
9
+ * With ACs as checkable items in issue body.
10
+ *
11
+ * @see ADR-0143 (GitHub Issue Format)
12
+ */
13
+ import { readFile } from 'fs/promises';
14
+ import { existsSync } from 'fs';
15
+ import * as path from 'path';
16
+ import * as yaml from 'yaml';
17
+ export class IncrementIssueBuilder {
18
+ constructor(incrementPath, projectRoot) {
19
+ this.incrementPath = incrementPath;
20
+ this.projectRoot = projectRoot;
21
+ }
22
+ /**
23
+ * Parse increment spec.md and extract all data
24
+ */
25
+ async parse() {
26
+ const specPath = path.join(this.incrementPath, 'spec.md');
27
+ if (!existsSync(specPath)) {
28
+ throw new Error(`spec.md not found at ${specPath}`);
29
+ }
30
+ const content = await readFile(specPath, 'utf-8');
31
+ // Extract YAML frontmatter
32
+ const frontmatterMatch = content.match(/^---\n([\s\S]*?)\n---/);
33
+ if (!frontmatterMatch) {
34
+ throw new Error('spec.md missing YAML frontmatter');
35
+ }
36
+ const frontmatter = yaml.parse(frontmatterMatch[1]);
37
+ const bodyContent = content.slice(frontmatterMatch[0].length).trim();
38
+ // Extract main title
39
+ const titleMatch = bodyContent.match(/^#\s+(.+)$/m);
40
+ const title = titleMatch ? titleMatch[1].trim() : frontmatter.increment;
41
+ // Extract problem statement
42
+ const problemStatement = this.extractSection(bodyContent, 'Problem Statement');
43
+ // Extract user stories
44
+ const userStories = this.extractUserStories(bodyContent);
45
+ // Extract out of scope
46
+ const outOfScopeSection = this.extractSection(bodyContent, 'Out of Scope');
47
+ const outOfScope = outOfScopeSection
48
+ .split('\n')
49
+ .filter(line => line.startsWith('-'))
50
+ .map(line => line.replace(/^-\s*/, '').trim());
51
+ // Extract tasks from tasks.md
52
+ const tasks = await this.extractTasks();
53
+ return {
54
+ frontmatter,
55
+ title,
56
+ problemStatement,
57
+ userStories,
58
+ tasks,
59
+ outOfScope,
60
+ };
61
+ }
62
+ /**
63
+ * Extract tasks from tasks.md
64
+ */
65
+ async extractTasks() {
66
+ const tasksPath = path.join(this.incrementPath, 'tasks.md');
67
+ if (!existsSync(tasksPath)) {
68
+ return [];
69
+ }
70
+ try {
71
+ const content = await readFile(tasksPath, 'utf-8');
72
+ const tasks = [];
73
+ // Split by task headers: ### T-XXX: Title
74
+ const taskBlocks = content.split(/(?=###\s+T-\d+)/);
75
+ for (const block of taskBlocks) {
76
+ const headerMatch = block.match(/###\s+(T-\d+):\s*(.+)/);
77
+ if (!headerMatch)
78
+ continue;
79
+ const id = headerMatch[1];
80
+ const title = headerMatch[2].trim();
81
+ // Extract status: **Status**: [x] completed or **Status**: [ ] pending
82
+ const statusMatch = block.match(/\*\*Status\*\*:\s*\[([x\s])\]/i);
83
+ const completed = statusMatch ? statusMatch[1].toLowerCase() === 'x' : false;
84
+ // Extract user stories: **User Story**: US-001 or **Satisfies ACs**: AC-US1-01
85
+ const userStoryMatch = block.match(/\*\*User Story\*\*:\s*([^\n]+)/i);
86
+ const satisfiesMatch = block.match(/\*\*Satisfies ACs?\*\*:\s*([^\n]+)/i);
87
+ let userStories = [];
88
+ if (userStoryMatch) {
89
+ userStories = userStoryMatch[1].split(',').map(s => s.trim());
90
+ }
91
+ else if (satisfiesMatch) {
92
+ // Extract US IDs from AC IDs (AC-US1-01 → US-001)
93
+ const acIds = satisfiesMatch[1].split(',').map(s => s.trim());
94
+ const usIds = new Set();
95
+ for (const ac of acIds) {
96
+ const usMatch = ac.match(/AC-(US\d+)-/i);
97
+ if (usMatch) {
98
+ usIds.add(usMatch[1]);
99
+ }
100
+ }
101
+ userStories = Array.from(usIds);
102
+ }
103
+ // Extract priority
104
+ const priorityMatch = block.match(/\*\*Priority\*\*:\s*(P\d)/i);
105
+ const priority = priorityMatch ? priorityMatch[1] : undefined;
106
+ tasks.push({
107
+ id,
108
+ title,
109
+ completed,
110
+ userStories,
111
+ priority,
112
+ });
113
+ }
114
+ return tasks;
115
+ }
116
+ catch {
117
+ return [];
118
+ }
119
+ }
120
+ /**
121
+ * Extract a section by heading
122
+ */
123
+ extractSection(content, heading) {
124
+ const regex = new RegExp(`##\\s+${heading}\\s*\\n([\\s\\S]*?)(?=\\n##\\s|$)`, 'i');
125
+ const match = content.match(regex);
126
+ return match ? match[1].trim() : '';
127
+ }
128
+ /**
129
+ * Extract user stories from spec.md
130
+ */
131
+ extractUserStories(content) {
132
+ const stories = [];
133
+ // Find User Stories section
134
+ const userStoriesSection = this.extractSection(content, 'User Stories');
135
+ if (!userStoriesSection) {
136
+ return stories;
137
+ }
138
+ // Split by ### US-XXX headers
139
+ const storyBlocks = userStoriesSection.split(/(?=###\s+US-\d+)/);
140
+ for (const block of storyBlocks) {
141
+ const headerMatch = block.match(/###\s+(US-\d+):\s*(.+)/);
142
+ if (!headerMatch)
143
+ continue;
144
+ const id = headerMatch[1];
145
+ const title = headerMatch[2].trim();
146
+ // Extract As a/I want/So that
147
+ const asAMatch = block.match(/\*\*As a\*\*\s+([^\n]+)/i);
148
+ const iWantMatch = block.match(/\*\*I want\*\*\s+([^\n]+)/i);
149
+ const soThatMatch = block.match(/\*\*So that\*\*\s+([^\n]+)/i);
150
+ // Extract Acceptance Criteria
151
+ const acceptanceCriteria = this.extractAcceptanceCriteria(block, id);
152
+ stories.push({
153
+ id,
154
+ title,
155
+ asA: asAMatch ? asAMatch[1].trim().replace(/,$/, '') : '',
156
+ iWant: iWantMatch ? iWantMatch[1].trim().replace(/,$/, '') : '',
157
+ soThat: soThatMatch ? soThatMatch[1].trim().replace(/\.$/, '') : '',
158
+ acceptanceCriteria,
159
+ });
160
+ }
161
+ return stories;
162
+ }
163
+ /**
164
+ * Extract acceptance criteria from a user story block
165
+ */
166
+ extractAcceptanceCriteria(block, userStoryId) {
167
+ const criteria = [];
168
+ // Pattern: - [x] **AC-US1-01**: Description or - [ ] **AC-US1-01**: Description
169
+ const acPattern = /-\s*\[([ x])\]\s*\*\*AC-(US\d+)-(\d+)\*\*:\s*(.+)/gi;
170
+ let match;
171
+ while ((match = acPattern.exec(block)) !== null) {
172
+ const completed = match[1].toLowerCase() === 'x';
173
+ const usNum = match[2];
174
+ const acNum = match[3];
175
+ const description = match[4].trim();
176
+ criteria.push({
177
+ id: `AC-${usNum}-${acNum}`,
178
+ description,
179
+ completed,
180
+ });
181
+ }
182
+ return criteria;
183
+ }
184
+ /**
185
+ * Build GitHub issue for a single user story
186
+ */
187
+ buildUserStoryIssue(story, incrementData, githubRepo) {
188
+ const featureId = incrementData.frontmatter.feature_id || this.generateFeatureId(incrementData);
189
+ const incrementId = incrementData.frontmatter.increment;
190
+ // Title format: [FS-XXX][US-YYY] User Story Title
191
+ const title = `[${featureId}][${story.id}] ${story.title}`;
192
+ // Build body
193
+ let body = '';
194
+ // Header with metadata
195
+ body += `**Feature**: ${featureId}\n`;
196
+ body += `**Status**: ${incrementData.frontmatter.status || 'planning'}\n`;
197
+ body += `**Priority**: P1\n`;
198
+ body += `\n---\n\n`;
199
+ // User Story description
200
+ body += `## User Story\n\n`;
201
+ if (story.asA && story.iWant && story.soThat) {
202
+ body += `**As a** ${story.asA}\n`;
203
+ body += `**I want** ${story.iWant}\n`;
204
+ body += `**So that** ${story.soThat}\n\n`;
205
+ }
206
+ else {
207
+ body += `${story.title}\n\n`;
208
+ }
209
+ body += `---\n\n`;
210
+ // Acceptance Criteria (checkable!)
211
+ body += `## Acceptance Criteria\n\n`;
212
+ if (story.acceptanceCriteria.length > 0) {
213
+ const completed = story.acceptanceCriteria.filter(ac => ac.completed).length;
214
+ const total = story.acceptanceCriteria.length;
215
+ const percentage = total > 0 ? Math.round((completed / total) * 100) : 0;
216
+ body += `Progress: ${completed}/${total} criteria met (${percentage}%)\n\n`;
217
+ for (const ac of story.acceptanceCriteria) {
218
+ const checkbox = ac.completed ? '[x]' : '[ ]';
219
+ body += `- ${checkbox} **${ac.id}**: ${ac.description}\n`;
220
+ }
221
+ body += '\n';
222
+ }
223
+ else {
224
+ body += `*No acceptance criteria defined*\n\n`;
225
+ }
226
+ body += `---\n\n`;
227
+ // Tasks for this user story
228
+ const storyTasks = incrementData.tasks.filter(t => t.userStories.includes(story.id) ||
229
+ t.userStories.some(us => us.toUpperCase() === story.id.toUpperCase()));
230
+ if (storyTasks.length > 0) {
231
+ body += `## Tasks\n\n`;
232
+ const completedTasks = storyTasks.filter(t => t.completed).length;
233
+ body += `Progress: ${completedTasks}/${storyTasks.length} tasks\n\n`;
234
+ for (const task of storyTasks) {
235
+ const checkbox = task.completed ? '[x]' : '[ ]';
236
+ body += `- ${checkbox} **${task.id}**: ${task.title}\n`;
237
+ }
238
+ body += '\n---\n\n';
239
+ }
240
+ // Link to increment
241
+ body += `## Implementation\n\n`;
242
+ if (githubRepo) {
243
+ body += `**Increment**: [${incrementId}](https://github.com/${githubRepo}/tree/develop/.specweave/increments/${incrementId})\n\n`;
244
+ }
245
+ else {
246
+ body += `**Increment**: ${incrementId}\n\n`;
247
+ }
248
+ body += `---\n\n`;
249
+ body += `🤖 Auto-synced by SpecWeave Increment Sync`;
250
+ // Labels
251
+ const labels = ['specweave', 'user-story'];
252
+ // Add type label if available
253
+ if (incrementData.frontmatter.type) {
254
+ labels.push(incrementData.frontmatter.type.toLowerCase());
255
+ }
256
+ // Add priority label (from story or default to p2)
257
+ const priority = story.priority?.toLowerCase() || incrementData.frontmatter.priority?.toLowerCase() || 'p2';
258
+ labels.push(priority);
259
+ return { title, body, labels };
260
+ }
261
+ /**
262
+ * Build GitHub issue for the entire increment (epic-style)
263
+ */
264
+ buildIncrementIssue(incrementData, githubRepo) {
265
+ const featureId = incrementData.frontmatter.feature_id || this.generateFeatureId(incrementData);
266
+ const incrementId = incrementData.frontmatter.increment;
267
+ // Title format: [FS-XXX] Increment Title
268
+ const title = `[${featureId}] ${incrementData.title}`;
269
+ // Build body
270
+ let body = '';
271
+ // Header with metadata
272
+ body += `**Increment**: ${incrementId}\n`;
273
+ body += `**Status**: ${incrementData.frontmatter.status || 'planning'}\n`;
274
+ body += `**Priority**: P0 (Critical)\n`;
275
+ // Calculate progress
276
+ const totalACs = incrementData.userStories.reduce((sum, us) => sum + us.acceptanceCriteria.length, 0);
277
+ const completedACs = incrementData.userStories.reduce((sum, us) => sum + us.acceptanceCriteria.filter(ac => ac.completed).length, 0);
278
+ const percentage = totalACs > 0 ? Math.round((completedACs / totalACs) * 100) : 0;
279
+ body += `**Progress**: ${completedACs}/${totalACs} ACs (${percentage}%)\n`;
280
+ body += `\n---\n\n`;
281
+ // Overview
282
+ body += `## Overview\n\n`;
283
+ body += incrementData.problemStatement || incrementData.title;
284
+ body += `\n\n---\n\n`;
285
+ // User Stories with ACs
286
+ body += `## User Stories\n\n`;
287
+ for (const story of incrementData.userStories) {
288
+ const usCompleted = story.acceptanceCriteria.filter(ac => ac.completed).length;
289
+ const usTotal = story.acceptanceCriteria.length;
290
+ const usCheckbox = usCompleted === usTotal && usTotal > 0 ? '[x]' : '[ ]';
291
+ body += `### ${usCheckbox} ${story.id}: ${story.title}\n\n`;
292
+ if (story.asA && story.iWant && story.soThat) {
293
+ body += `> **As a** ${story.asA}, **I want** ${story.iWant}, **So that** ${story.soThat}\n\n`;
294
+ }
295
+ body += `**Acceptance Criteria:**\n`;
296
+ for (const ac of story.acceptanceCriteria) {
297
+ const checkbox = ac.completed ? '[x]' : '[ ]';
298
+ body += `- ${checkbox} **${ac.id}**: ${ac.description}\n`;
299
+ }
300
+ body += '\n';
301
+ }
302
+ body += `---\n\n`;
303
+ // Tasks section
304
+ if (incrementData.tasks.length > 0) {
305
+ body += `## Tasks\n\n`;
306
+ const completedTasks = incrementData.tasks.filter(t => t.completed).length;
307
+ const totalTasks = incrementData.tasks.length;
308
+ const taskPercentage = totalTasks > 0 ? Math.round((completedTasks / totalTasks) * 100) : 0;
309
+ body += `Progress: ${completedTasks}/${totalTasks} tasks (${taskPercentage}%)\n\n`;
310
+ for (const task of incrementData.tasks) {
311
+ const checkbox = task.completed ? '[x]' : '[ ]';
312
+ body += `- ${checkbox} **${task.id}**: ${task.title}\n`;
313
+ if (task.priority || task.userStories.length > 0) {
314
+ const parts = [];
315
+ if (task.priority)
316
+ parts.push(`Priority: ${task.priority}`);
317
+ if (task.userStories.length > 0)
318
+ parts.push(`User ${task.userStories.length === 1 ? 'Story' : 'Stories'}: ${task.userStories.join(', ')}`);
319
+ body += ` - ${parts.join(' | ')}\n`;
320
+ }
321
+ }
322
+ body += '\n---\n\n';
323
+ }
324
+ // Links to increment files
325
+ body += `## SpecWeave Increment\n\n`;
326
+ if (githubRepo) {
327
+ body += `- **Spec**: [\`spec.md\`](https://github.com/${githubRepo}/blob/develop/.specweave/increments/${incrementId}/spec.md)\n`;
328
+ body += `- **Plan**: [\`plan.md\`](https://github.com/${githubRepo}/blob/develop/.specweave/increments/${incrementId}/plan.md)\n`;
329
+ body += `- **Tasks**: [\`tasks.md\`](https://github.com/${githubRepo}/blob/develop/.specweave/increments/${incrementId}/tasks.md)\n`;
330
+ }
331
+ else {
332
+ body += `- **Spec**: \`spec.md\`\n`;
333
+ body += `- **Plan**: \`plan.md\`\n`;
334
+ body += `- **Tasks**: \`tasks.md\`\n`;
335
+ }
336
+ body += `\n---\n\n`;
337
+ body += `🤖 Auto-synced by SpecWeave Increment Sync`;
338
+ // Labels
339
+ const labels = ['specweave', 'increment'];
340
+ // Add type label (default to 'enhancement' if not specified)
341
+ const typeLabel = incrementData.frontmatter.type?.toLowerCase() || 'enhancement';
342
+ labels.push(typeLabel);
343
+ // Add priority label (default to 'p2' if not specified)
344
+ const priority = incrementData.frontmatter.priority?.toLowerCase() || 'p2';
345
+ labels.push(priority);
346
+ return { title, body, labels };
347
+ }
348
+ /**
349
+ * Generate a feature ID if not present in frontmatter
350
+ * Uses date-based format: FS-YY-MM-DD
351
+ */
352
+ generateFeatureId(incrementData) {
353
+ // Try to extract increment number
354
+ const incrementNum = incrementData.frontmatter.increment.match(/^(\d+)/)?.[1];
355
+ if (incrementNum) {
356
+ return `FS-${incrementNum.padStart(3, '0')}`;
357
+ }
358
+ // Fallback to date-based
359
+ const created = incrementData.frontmatter.created;
360
+ if (created) {
361
+ const match = created.match(/^(\d{4})-(\d{2})-(\d{2})/);
362
+ if (match) {
363
+ return `FS-${match[1].slice(2)}-${match[2]}-${match[3]}`;
364
+ }
365
+ }
366
+ return 'FS-UNKNOWN';
367
+ }
368
+ }
369
+ //# sourceMappingURL=increment-issue-builder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"increment-issue-builder.js","sourceRoot":"","sources":["../../../../plugins/specweave-github/lib/increment-issue-builder.ts"],"names":[],"m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}
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Jira Board Resolution for Hierarchical Sync
3
+ *
4
+ * Resolves board names to board IDs for use in JQL queries.
5
+ * Supports Jira Agile (Software) boards.
6
+ */
7
+ import { JiraClient } from '../../../src/integrations/jira/jira-client.js';
8
+ /**
9
+ * Jira Board (Agile API)
10
+ */
11
+ export interface JiraBoard {
12
+ id: number;
13
+ name: string;
14
+ type: 'scrum' | 'kanban' | 'simple';
15
+ self: string;
16
+ location?: {
17
+ projectId: number;
18
+ projectKey: string;
19
+ projectName: string;
20
+ };
21
+ }
22
+ /**
23
+ * Fetch all boards for a Jira project
24
+ *
25
+ * Uses Jira Agile REST API: GET /rest/agile/1.0/board?projectKeyOrId={projectKey}
26
+ *
27
+ * @param client JiraClient instance
28
+ * @param projectKey Jira project key (e.g., "PROJECT-A")
29
+ * @returns Array of boards in the project
30
+ */
31
+ export declare function fetchBoardsForProject(client: JiraClient, projectKey: string): Promise<JiraBoard[]>;
32
+ /**
33
+ * Resolve board names to board IDs
34
+ *
35
+ * @param client JiraClient instance
36
+ * @param projectKey Jira project key
37
+ * @param boardNames Array of board names to resolve
38
+ * @returns Map of board name → board ID
39
+ */
40
+ export declare function resolveBoardNames(client: JiraClient, projectKey: string, boardNames: string[]): Promise<Map<string, number>>;
41
+ /**
42
+ * Get board IDs for a list of board names (helper function)
43
+ *
44
+ * @param client JiraClient instance
45
+ * @param projectKey Jira project key
46
+ * @param boardNames Array of board names
47
+ * @returns Array of board IDs (skips boards not found)
48
+ */
49
+ export declare function getBoardIds(client: JiraClient, projectKey: string, boardNames: string[]): Promise<number[]>;
50
+ //# sourceMappingURL=jira-board-resolver.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jira-board-resolver.d.ts","sourceRoot":"","sources":["../../../../plugins/specweave-jira/lib/jira-board-resolver.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,+CAA+C,CAAC;AAE3E;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE;QACT,SAAS,EAAE,MAAM,CAAC;QAClB,UAAU,EAAE,MAAM,CAAC;QACnB,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;CACH;AAED;;;;;;;;GAQG;AACH,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,UAAU,EAClB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,SAAS,EAAE,CAAC,CAmCtB;AAED;;;;;;;GAOG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,UAAU,EAClB,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAAE,GACnB,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAwB9B;AAED;;;;;;;GAOG;AACH,wBAAsB,WAAW,CAC/B,MAAM,EAAE,UAAU,EAClB,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAAE,GACnB,OAAO,CAAC,MAAM,EAAE,CAAC,CAGnB"}