specweave 0.28.17 → 0.28.19

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 (137) 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-github/lib/github-feature-sync.d.ts +6 -11
  6. package/dist/plugins/specweave-github/lib/github-feature-sync.d.ts.map +1 -1
  7. package/dist/plugins/specweave-github/lib/github-feature-sync.js +6 -11
  8. package/dist/plugins/specweave-github/lib/github-feature-sync.js.map +1 -1
  9. package/dist/plugins/specweave-github/lib/github-increment-sync-cli.d.ts +19 -0
  10. package/dist/plugins/specweave-github/lib/github-increment-sync-cli.d.ts.map +1 -0
  11. package/dist/plugins/specweave-github/lib/github-increment-sync-cli.js +380 -0
  12. package/dist/plugins/specweave-github/lib/github-increment-sync-cli.js.map +1 -0
  13. package/dist/plugins/specweave-github/lib/increment-issue-builder.d.ts +92 -0
  14. package/dist/plugins/specweave-github/lib/increment-issue-builder.d.ts.map +1 -0
  15. package/dist/plugins/specweave-github/lib/increment-issue-builder.js +349 -0
  16. package/dist/plugins/specweave-github/lib/increment-issue-builder.js.map +1 -0
  17. package/dist/plugins/specweave-jira/lib/jira-board-resolver.d.ts +50 -0
  18. package/dist/plugins/specweave-jira/lib/jira-board-resolver.d.ts.map +1 -0
  19. package/dist/plugins/specweave-jira/lib/jira-board-resolver.js +84 -0
  20. package/dist/plugins/specweave-jira/lib/jira-board-resolver.js.map +1 -0
  21. package/dist/src/cli/commands/import-external.d.ts.map +1 -1
  22. package/dist/src/cli/commands/import-external.js +12 -7
  23. package/dist/src/cli/commands/import-external.js.map +1 -1
  24. package/dist/src/cli/helpers/init/external-import.d.ts.map +1 -1
  25. package/dist/src/cli/helpers/init/external-import.js +122 -17
  26. package/dist/src/cli/helpers/init/external-import.js.map +1 -1
  27. package/dist/src/cli/helpers/issue-tracker/ado-area-selection.d.ts +65 -0
  28. package/dist/src/cli/helpers/issue-tracker/ado-area-selection.d.ts.map +1 -0
  29. package/dist/src/cli/helpers/issue-tracker/ado-area-selection.js +278 -0
  30. package/dist/src/cli/helpers/issue-tracker/ado-area-selection.js.map +1 -0
  31. package/dist/src/cli/helpers/issue-tracker/jira-board-selection.d.ts +64 -0
  32. package/dist/src/cli/helpers/issue-tracker/jira-board-selection.d.ts.map +1 -0
  33. package/dist/src/cli/helpers/issue-tracker/jira-board-selection.js +251 -0
  34. package/dist/src/cli/helpers/issue-tracker/jira-board-selection.js.map +1 -0
  35. package/dist/src/core/ac-test-validator-cli.js +4 -1
  36. package/dist/src/core/ac-test-validator-cli.js.map +1 -1
  37. package/dist/src/core/ac-test-validator.d.ts.map +1 -1
  38. package/dist/src/core/ac-test-validator.js +4 -1
  39. package/dist/src/core/ac-test-validator.js.map +1 -1
  40. package/dist/src/core/types/increment-metadata.d.ts +75 -0
  41. package/dist/src/core/types/increment-metadata.d.ts.map +1 -1
  42. package/dist/src/core/types/sync-profile.d.ts +137 -5
  43. package/dist/src/core/types/sync-profile.d.ts.map +1 -1
  44. package/dist/src/core/types/sync-profile.js +63 -0
  45. package/dist/src/core/types/sync-profile.js.map +1 -1
  46. package/dist/src/importers/external-importer.d.ts +25 -0
  47. package/dist/src/importers/external-importer.d.ts.map +1 -1
  48. package/dist/src/importers/github-importer.d.ts.map +1 -1
  49. package/dist/src/importers/github-importer.js +5 -3
  50. package/dist/src/importers/github-importer.js.map +1 -1
  51. package/dist/src/importers/item-converter.d.ts +51 -0
  52. package/dist/src/importers/item-converter.d.ts.map +1 -1
  53. package/dist/src/importers/item-converter.js +39 -12
  54. package/dist/src/importers/item-converter.js.map +1 -1
  55. package/dist/src/init/repo/types.d.ts +1 -1
  56. package/dist/src/living-docs/fs-id-allocator.d.ts +72 -3
  57. package/dist/src/living-docs/fs-id-allocator.d.ts.map +1 -1
  58. package/dist/src/living-docs/fs-id-allocator.js +142 -16
  59. package/dist/src/living-docs/fs-id-allocator.js.map +1 -1
  60. package/dist/src/locales/de/cli.json +14 -0
  61. package/dist/src/locales/es/cli.json +14 -0
  62. package/dist/src/locales/fr/cli.json +14 -0
  63. package/dist/src/locales/ja/cli.json +14 -0
  64. package/dist/src/locales/ko/cli.json +14 -0
  65. package/dist/src/locales/pt/cli.json +14 -0
  66. package/dist/src/locales/ru/cli.json +14 -0
  67. package/dist/src/locales/zh/cli.json +14 -0
  68. package/dist/src/utils/chalk-fallback.d.ts +38 -0
  69. package/dist/src/utils/chalk-fallback.d.ts.map +1 -0
  70. package/dist/src/utils/chalk-fallback.js +118 -0
  71. package/dist/src/utils/chalk-fallback.js.map +1 -0
  72. package/dist/src/utils/project-id-generator.d.ts +127 -0
  73. package/dist/src/utils/project-id-generator.d.ts.map +1 -0
  74. package/dist/src/utils/project-id-generator.js +228 -0
  75. package/dist/src/utils/project-id-generator.js.map +1 -0
  76. package/package.json +1 -1
  77. package/plugins/specweave/agents/pm/AGENT.md +202 -0
  78. package/plugins/specweave/commands/specweave-import-external.md +5 -3
  79. package/plugins/specweave/commands/specweave-sync-docs.md +6 -2
  80. package/plugins/specweave/hooks/pre-task-completion.sh +35 -17
  81. package/plugins/specweave/lib/vendor/core/ac-test-validator-cli.d.ts +16 -0
  82. package/plugins/specweave/lib/vendor/core/ac-test-validator-cli.js +121 -0
  83. package/plugins/specweave/lib/vendor/core/ac-test-validator-cli.js.map +1 -0
  84. package/plugins/specweave/lib/vendor/core/ac-test-validator.d.ts +111 -0
  85. package/plugins/specweave/lib/vendor/core/ac-test-validator.js +295 -0
  86. package/plugins/specweave/lib/vendor/core/ac-test-validator.js.map +1 -0
  87. package/plugins/specweave/lib/vendor/core/types/increment-metadata.d.ts +75 -0
  88. package/plugins/specweave/lib/vendor/utils/chalk-fallback.d.ts +38 -0
  89. package/plugins/specweave/lib/vendor/utils/chalk-fallback.js +118 -0
  90. package/plugins/specweave/lib/vendor/utils/chalk-fallback.js.map +1 -0
  91. package/plugins/specweave/lib/vendor/utils/fs-native.d.ts +179 -0
  92. package/plugins/specweave/lib/vendor/utils/fs-native.js +319 -0
  93. package/plugins/specweave/lib/vendor/utils/fs-native.js.map +1 -0
  94. package/plugins/specweave/skills/code-reviewer/SKILL.md +1 -1
  95. package/plugins/specweave/skills/docs-updater/SKILL.md +61 -0
  96. package/plugins/specweave/skills/increment-planner/SKILL.md +10 -335
  97. package/plugins/specweave/skills/increment-planner/templates/metadata.json +13 -0
  98. package/plugins/specweave/skills/increment-planner/templates/plan.md +50 -0
  99. package/plugins/specweave/skills/increment-planner/templates/spec-multi-project.md +86 -0
  100. package/plugins/specweave/skills/increment-planner/templates/spec-single-project.md +50 -0
  101. package/plugins/specweave/skills/increment-planner/templates/tasks-multi-project.md +86 -0
  102. package/plugins/specweave/skills/increment-planner/templates/tasks-single-project.md +48 -0
  103. package/plugins/specweave-ado/commands/specweave-ado-import-areas.md +358 -0
  104. package/plugins/specweave-alternatives/skills/architecture-alternatives/SKILL.md +1 -0
  105. package/plugins/specweave-alternatives/skills/bmad-method/SKILL.md +1 -0
  106. package/plugins/specweave-core/skills/code-quality/SKILL.md +1 -0
  107. package/plugins/specweave-core/skills/design-patterns/SKILL.md +1 -0
  108. package/plugins/specweave-core/skills/software-architecture/SKILL.md +1 -0
  109. package/plugins/specweave-github/commands/specweave-github-cleanup-duplicates.md +14 -10
  110. package/plugins/specweave-github/commands/specweave-github-sync.md +57 -0
  111. package/plugins/specweave-github/hooks/.specweave/logs/hooks-debug.log +68 -0
  112. package/plugins/specweave-github/lib/github-feature-sync.ts +6 -11
  113. package/plugins/specweave-github/lib/github-increment-sync-cli.js +343 -0
  114. package/plugins/specweave-github/lib/github-increment-sync-cli.ts +484 -0
  115. package/plugins/specweave-github/lib/increment-issue-builder.js +368 -0
  116. package/plugins/specweave-github/lib/increment-issue-builder.ts +471 -0
  117. package/plugins/specweave-github/skills/github-issue-standard/SKILL.md +19 -24
  118. package/plugins/specweave-infrastructure/agents/observability-engineer/AGENT.md +15 -23
  119. package/plugins/specweave-jira/commands/specweave-jira-import-boards.md +331 -0
  120. package/plugins/specweave-ml/agents/data-scientist/AGENT.md +16 -20
  121. package/plugins/specweave-ml/agents/ml-engineer/AGENT.md +18 -19
  122. package/plugins/specweave-ml/skills/{ml-pipeline-workflow → mlops-dag-builder}/SKILL.md +18 -14
  123. package/plugins/specweave-release/hooks/.specweave/logs/dora-tracking.log +102 -0
  124. package/plugins/specweave-ui/skills/browser-automation/SKILL.md +1 -1
  125. package/plugins/specweave-ui/skills/ui-testing/SKILL.md +10 -122
  126. package/dist/plugins/specweave-github/lib/epic-content-builder.d.ts +0 -70
  127. package/dist/plugins/specweave-github/lib/epic-content-builder.d.ts.map +0 -1
  128. package/dist/plugins/specweave-github/lib/epic-content-builder.js +0 -258
  129. package/dist/plugins/specweave-github/lib/epic-content-builder.js.map +0 -1
  130. package/dist/plugins/specweave-github/lib/github-epic-sync.d.ts +0 -83
  131. package/dist/plugins/specweave-github/lib/github-epic-sync.d.ts.map +0 -1
  132. package/dist/plugins/specweave-github/lib/github-epic-sync.js +0 -466
  133. package/dist/plugins/specweave-github/lib/github-epic-sync.js.map +0 -1
  134. package/plugins/specweave-github/lib/epic-content-builder.js +0 -265
  135. package/plugins/specweave-github/lib/epic-content-builder.ts +0 -376
  136. package/plugins/specweave-github/lib/github-epic-sync.js +0 -488
  137. package/plugins/specweave-github/lib/github-epic-sync.ts +0 -715
@@ -0,0 +1,358 @@
1
+ ---
2
+ name: specweave-ado:import-areas
3
+ description: Import Azure DevOps area paths from a project and map them to SpecWeave projects. Creates 2-level directory structure with area path-based organization.
4
+ ---
5
+
6
+ # Import ADO Area Paths Command
7
+
8
+ You are an Azure DevOps integration expert. Help the user import area paths from an ADO project and map them to SpecWeave projects.
9
+
10
+ ## Command Usage
11
+
12
+ ```bash
13
+ /specweave-ado:import-areas # Interactive mode (prompts for project)
14
+ /specweave-ado:import-areas --project MyProduct # Specific ADO project
15
+ /specweave-ado:import-areas --dry-run # Preview without creating directories
16
+ /specweave-ado:import-areas --include-children # Include child area paths
17
+ ```
18
+
19
+ ## Your Task
20
+
21
+ When the user runs this command:
22
+
23
+ ### Step 1: Validate Prerequisites
24
+
25
+ 1. **Check ADO credentials** exist in `.env`:
26
+ - `AZURE_DEVOPS_PAT`
27
+ - `AZURE_DEVOPS_ORG`
28
+ - `AZURE_DEVOPS_PROJECT`
29
+
30
+ 2. **Check config.json** for existing area path mapping:
31
+ - If `sync.profiles.*.config.areaPathMapping` exists, warn user
32
+
33
+ ### Step 2: Get Project Name
34
+
35
+ **If `--project` flag provided:**
36
+ - Use the provided project name
37
+
38
+ **If no flag (interactive mode):**
39
+ ```
40
+ 🔷 Azure DevOps Area Path Import
41
+
42
+ Enter the ADO project name to import area paths from:
43
+ > MyProduct
44
+
45
+ Fetching area paths from project MyProduct...
46
+ ```
47
+
48
+ ### Step 3: Fetch and Display Area Paths
49
+
50
+ ```typescript
51
+ import { fetchAreaPathsForProject } from '../lib/ado-board-resolver';
52
+
53
+ const areaPaths = await fetchAreaPathsForProject(
54
+ process.env.AZURE_DEVOPS_ORG,
55
+ 'MyProduct',
56
+ process.env.AZURE_DEVOPS_PAT
57
+ );
58
+ ```
59
+
60
+ **Display area paths:**
61
+ ```
62
+ Found 6 area paths in project MyProduct:
63
+
64
+ 1. ☑ MyProduct\Frontend (45 active items)
65
+ 2. ☑ MyProduct\Backend (78 active items)
66
+ 3. ☑ MyProduct\Mobile (23 active items)
67
+ 4. ☑ MyProduct\DevOps (12 active items)
68
+ 5. ☐ MyProduct\Archive (0 items) [deselected - archive]
69
+ 6. ☐ MyProduct (root) [deselected - root level]
70
+
71
+ Select area paths to import (Space to toggle, Enter to confirm)
72
+ ```
73
+
74
+ ### Step 4: Map Area Paths to SpecWeave Projects
75
+
76
+ For each selected area path, prompt for SpecWeave project ID:
77
+
78
+ ```
79
+ 🏷️ Mapping area paths to SpecWeave projects:
80
+
81
+ Area path "MyProduct\Frontend" → SpecWeave project ID: [fe]
82
+ → Include child area paths? [Y/n]: y
83
+ → Keywords for auto-classification (optional): frontend, ui, angular, css
84
+
85
+ Area path "MyProduct\Backend" → SpecWeave project ID: [be]
86
+ → Include child area paths? [Y/n]: y
87
+ → Keywords for auto-classification (optional): api, server, database, c#
88
+
89
+ Area path "MyProduct\Mobile" → SpecWeave project ID: [mobile]
90
+ → Include child area paths? [Y/n]: y
91
+ → Keywords for auto-classification (optional): ios, android, xamarin
92
+
93
+ Area path "MyProduct\DevOps" → SpecWeave project ID: [devops]
94
+ → Include child area paths? [Y/n]: y
95
+ → Keywords for auto-classification (optional): infrastructure, ci, cd, terraform
96
+ ```
97
+
98
+ **Project ID validation:**
99
+ - Must be lowercase, alphanumeric with hyphens
100
+ - Must not collide with existing project IDs
101
+ - If collision detected, suggest prefixed version: `myproduct-fe` instead of `fe`
102
+
103
+ ### Step 5: Create Directory Structure
104
+
105
+ Create 2-level directory structure:
106
+
107
+ ```
108
+ .specweave/docs/internal/specs/
109
+ └── ADO-myproduct/ ← Level 1: ADO project
110
+ ├── fe/ ← Level 2: SpecWeave project
111
+ │ └── .gitkeep
112
+ ├── be/
113
+ │ └── .gitkeep
114
+ ├── mobile/
115
+ │ └── .gitkeep
116
+ └── devops/
117
+ └── .gitkeep
118
+ ```
119
+
120
+ ### Step 6: Update config.json
121
+
122
+ Add area path mapping to config:
123
+
124
+ ```json
125
+ {
126
+ "sync": {
127
+ "profiles": {
128
+ "ado-default": {
129
+ "provider": "ado",
130
+ "config": {
131
+ "organization": "myorg",
132
+ "areaPathMapping": {
133
+ "project": "MyProduct",
134
+ "mappings": [
135
+ {
136
+ "areaPath": "MyProduct\\Frontend",
137
+ "specweaveProject": "fe",
138
+ "includeChildren": true,
139
+ "keywords": ["frontend", "ui", "angular", "css"]
140
+ },
141
+ {
142
+ "areaPath": "MyProduct\\Backend",
143
+ "specweaveProject": "be",
144
+ "includeChildren": true,
145
+ "keywords": ["api", "server", "database", "c#"]
146
+ },
147
+ {
148
+ "areaPath": "MyProduct\\Mobile",
149
+ "specweaveProject": "mobile",
150
+ "includeChildren": true,
151
+ "keywords": ["ios", "android", "xamarin"]
152
+ },
153
+ {
154
+ "areaPath": "MyProduct\\DevOps",
155
+ "specweaveProject": "devops",
156
+ "includeChildren": true,
157
+ "keywords": ["infrastructure", "ci", "cd", "terraform"]
158
+ }
159
+ ]
160
+ }
161
+ }
162
+ }
163
+ }
164
+ },
165
+ "multiProject": {
166
+ "enabled": true,
167
+ "activeProject": "fe",
168
+ "projects": {
169
+ "fe": {
170
+ "name": "Frontend",
171
+ "externalTools": {
172
+ "ado": {
173
+ "areaPath": "MyProduct\\Frontend",
174
+ "project": "MyProduct"
175
+ }
176
+ }
177
+ },
178
+ "be": {
179
+ "name": "Backend",
180
+ "externalTools": {
181
+ "ado": {
182
+ "areaPath": "MyProduct\\Backend",
183
+ "project": "MyProduct"
184
+ }
185
+ }
186
+ },
187
+ "mobile": {
188
+ "name": "Mobile",
189
+ "externalTools": {
190
+ "ado": {
191
+ "areaPath": "MyProduct\\Mobile",
192
+ "project": "MyProduct"
193
+ }
194
+ }
195
+ },
196
+ "devops": {
197
+ "name": "DevOps",
198
+ "externalTools": {
199
+ "ado": {
200
+ "areaPath": "MyProduct\\DevOps",
201
+ "project": "MyProduct"
202
+ }
203
+ }
204
+ }
205
+ }
206
+ }
207
+ }
208
+ ```
209
+
210
+ ### Step 7: Display Summary
211
+
212
+ ```
213
+ ✅ Azure DevOps Area Paths Import Complete!
214
+
215
+ 🔷 ADO Project: MyProduct
216
+ 📁 Created: .specweave/docs/internal/specs/ADO-myproduct/
217
+
218
+ Area paths imported:
219
+ ✓ MyProduct\Frontend → fe (includes children)
220
+ Keywords: frontend, ui, angular, css
221
+ ✓ MyProduct\Backend → be (includes children)
222
+ Keywords: api, server, database, c#
223
+ ✓ MyProduct\Mobile → mobile (includes children)
224
+ Keywords: ios, android, xamarin
225
+ ✓ MyProduct\DevOps → devops (includes children)
226
+ Keywords: infrastructure, ci, cd, terraform
227
+
228
+ 💡 Next steps:
229
+ 1. Use /specweave:switch-project fe to switch active project
230
+ 2. Create increment: /specweave:increment "feature name"
231
+ 3. User stories will auto-sync to the correct area path based on keywords
232
+
233
+ 📖 Documentation: .specweave/docs/internal/architecture/adr/0143-jira-ado-multi-level-project-mapping.md
234
+ ```
235
+
236
+ ## Examples
237
+
238
+ ### Example 1: Interactive Import
239
+ ```
240
+ User: /specweave-ado:import-areas
241
+
242
+ You:
243
+ 🔷 Azure DevOps Area Path Import
244
+
245
+ Enter the ADO project name: MyProduct
246
+ Fetching area paths...
247
+
248
+ Found 4 area paths:
249
+ ☑ MyProduct\Frontend
250
+ ☑ MyProduct\Backend
251
+ ☑ MyProduct\Mobile
252
+ ☐ MyProduct (root) [deselected]
253
+
254
+ Mapping to SpecWeave projects:
255
+ MyProduct\Frontend → fe
256
+ MyProduct\Backend → be
257
+ MyProduct\Mobile → mobile
258
+
259
+ ✅ Import complete! 3 area paths mapped.
260
+ ```
261
+
262
+ ### Example 2: Dry Run
263
+ ```
264
+ User: /specweave-ado:import-areas --project MyProduct --dry-run
265
+
266
+ You:
267
+ 🔷 Azure DevOps Area Path Import (DRY RUN)
268
+
269
+ Would import from project: MyProduct
270
+
271
+ Would create:
272
+ .specweave/docs/internal/specs/ADO-myproduct/
273
+ .specweave/docs/internal/specs/ADO-myproduct/fe/
274
+ .specweave/docs/internal/specs/ADO-myproduct/be/
275
+ .specweave/docs/internal/specs/ADO-myproduct/mobile/
276
+
277
+ Would update config.json with area path mapping.
278
+
279
+ No changes made (dry run).
280
+ ```
281
+
282
+ ### Example 3: Already Configured
283
+ ```
284
+ User: /specweave-ado:import-areas
285
+
286
+ You:
287
+ ⚠️ Area path mapping already exists for project MyProduct
288
+
289
+ Current mappings:
290
+ MyProduct\Frontend → fe
291
+ MyProduct\Backend → be
292
+
293
+ Do you want to:
294
+ 1. Add more area paths
295
+ 2. Replace existing mapping
296
+ 3. Cancel
297
+
298
+ > 1
299
+
300
+ Fetching additional area paths...
301
+ ☐ MyProduct\Frontend (already mapped)
302
+ ☐ MyProduct\Backend (already mapped)
303
+ ☑ MyProduct\Mobile (new)
304
+ ☑ MyProduct\DevOps (new)
305
+
306
+ Added:
307
+ MyProduct\Mobile → mobile
308
+ MyProduct\DevOps → devops
309
+
310
+ ✅ Updated! Now 4 area paths mapped.
311
+ ```
312
+
313
+ ## Error Handling
314
+
315
+ **Missing credentials:**
316
+ ```
317
+ ❌ Azure DevOps credentials not found
318
+
319
+ Please add to .env:
320
+ AZURE_DEVOPS_PAT=your_personal_access_token
321
+ AZURE_DEVOPS_ORG=your_organization
322
+ AZURE_DEVOPS_PROJECT=your_project
323
+
324
+ Or run: specweave init . (to configure Azure DevOps)
325
+ ```
326
+
327
+ **Project not found:**
328
+ ```
329
+ ❌ ADO project "INVALID" not found in organization "myorg"
330
+
331
+ Available projects you have access to:
332
+ - MyProduct (My Product Development)
333
+ - Infrastructure (DevOps & Infrastructure)
334
+ - Legacy (Legacy Systems)
335
+
336
+ Tip: Use /specweave-ado:import-areas --project MyProduct
337
+ ```
338
+
339
+ **No area paths found:**
340
+ ```
341
+ ⚠️ No child area paths found in project MyProduct
342
+
343
+ The project only has the root area path. This means:
344
+ 1. Teams aren't using area paths for organization
345
+ 2. You can create area paths in ADO Project Settings
346
+
347
+ Suggestions:
348
+ - Use single-project mode (no area path mapping)
349
+ - Create area paths in ADO: Project Settings → Work → Areas
350
+ - Run this command again after creating area paths
351
+ ```
352
+
353
+ ## Related Commands
354
+
355
+ - `/specweave-ado:import-projects` - Import multiple ADO projects
356
+ - `/specweave-ado:sync` - Sync increments with ADO
357
+ - `/specweave:switch-project` - Switch active SpecWeave project
358
+ - `/specweave:init-multiproject` - Initialize multi-project mode
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: architecture-alternatives
3
3
  description: Software architecture patterns and alternatives expert. Covers monolith vs microservices, serverless, event-driven, CQRS, hexagonal architecture, clean architecture, DDD, and architecture decision frameworks. Activates for architecture patterns, monolith, microservices, serverless, event-driven, CQRS, hexagonal architecture, clean architecture, DDD, architecture decisions, system design, scalability patterns.
4
+ allowed-tools: Read, Grep, Glob
4
5
  ---
5
6
 
6
7
  # Architecture Alternatives Expert Skill
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: bmad-method
3
3
  description: BMAD (Best, Most Appropriate, Design) technology decision framework expert. Helps evaluate technology alternatives, analyze tradeoffs, calculate TCO, assess vendor lock-in, and make data-driven architecture decisions. Activates for technology choices, stack decisions, database selection, cloud provider comparison, framework evaluation, architecture decisions, BMAD, best practices, most appropriate, design decisions, technology tradeoffs.
4
+ allowed-tools: Read, Grep, Glob
4
5
  ---
5
6
 
6
7
  # BMAD Method Expert Skill
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: code-quality
3
3
  description: Expert code quality engineering covering clean code principles, SOLID, DRY, KISS, YAGNI, code smells, refactoring patterns, static analysis, linting, code coverage, mutation testing, and software craftsmanship. Activates for code quality, clean code, SOLID principles, code smells, refactoring, technical debt, code review, linting, eslint, prettier, static analysis, code coverage.
4
+ allowed-tools: Read, Grep, Glob
4
5
  ---
5
6
 
6
7
  # Code Quality Expert
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: design-patterns
3
3
  description: Expert knowledge of Gang of Four (GoF) design patterns including creational (Singleton, Factory, Builder, Prototype), structural (Adapter, Decorator, Proxy, Facade), and behavioral (Strategy, Observer, Command, Template Method, Chain of Responsibility). Modern TypeScript/JavaScript implementations with real-world use cases. Activates for design patterns, factory pattern, singleton, strategy pattern, observer pattern, decorator pattern, adapter pattern, builder pattern, proxy pattern, facade pattern, template method.
4
+ allowed-tools: Read, Grep, Glob
4
5
  ---
5
6
 
6
7
  # Design Patterns Expert
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: software-architecture
3
3
  description: Expert software architecture covering architectural patterns (microservices, monolith, event-driven, CQRS), scalability, distributed systems, CAP theorem, database architecture, API design, system design, domain-driven design (DDD), hexagonal architecture, and architecture decision records (ADRs). Activates for software architecture, system design, microservices, monolith, event-driven, CQRS, scalability, distributed systems, CAP theorem, DDD, hexagonal architecture, ADR.
4
+ allowed-tools: Read, Grep, Glob
4
5
  ---
5
6
 
6
7
  # Software Architecture Expert
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: specweave-github:cleanup-duplicates
3
- description: Clean up duplicate GitHub issues for an Epic. Finds issues with duplicate titles and closes all except the first created issue.
3
+ description: Clean up duplicate GitHub issues for a Feature. Finds issues with duplicate titles and closes all except the first created issue.
4
4
  justification: |
5
5
  CRITICAL INCIDENT RESPONSE TOOL - DO NOT DELETE!
6
6
 
@@ -193,33 +193,37 @@ The original issue (#250) contains the same content and should be used for track
193
193
 
194
194
  ## Related Commands
195
195
 
196
- - `/specweave-github:sync-epic` - Sync Epic (now with duplicate detection!)
196
+ - `/specweave-github:sync` - Sync Feature to GitHub (with duplicate detection)
197
197
  - `/specweave:validate` - Validate increment completeness
198
198
  - `gh issue list` - View all issues (GitHub CLI)
199
199
 
200
200
  ## Implementation
201
201
 
202
- **File**: `plugins/specweave-github/lib/github-epic-sync.ts`
202
+ **File**: `plugins/specweave-github/lib/duplicate-detector.ts`
203
203
 
204
- **Method**: `cleanupDuplicates(epicId: string, dryRun: boolean)`
204
+ **Class**: `DuplicateDetector`
205
205
 
206
- **Algorithm**:
207
- 1. Search GitHub for all issues with Epic ID
206
+ **Algorithm** (3-phase protection):
207
+ 1. **Detection**: Search GitHub for existing issues matching pattern
208
+ 2. **Verification**: Count check to detect duplicates after creation
209
+ 3. **Reflection**: Auto-close duplicates automatically
210
+
211
+ For manual cleanup:
212
+ 1. Search GitHub for all issues with Feature ID
208
213
  2. Group by title (Map<string, number[]>)
209
214
  3. Filter groups with >1 issue (duplicates)
210
215
  4. For each duplicate group:
211
216
  - Keep first issue (lowest number)
212
217
  - Close others with gh CLI
213
- 5. Update Epic README frontmatter
214
218
 
215
219
  ## Next Steps
216
220
 
217
221
  After cleanup:
218
222
 
219
223
  1. **Verify cleanup**: `gh issue list --search "[FS-031]"`
220
- 2. **Check Epic README**: Verify frontmatter has correct issue numbers
221
- 3. **Re-run sync**: `/specweave-github:sync-epic FS-031` (should show no duplicates)
222
- 4. **Enable duplicate detection**: Already enabled in v0.18.0+
224
+ 2. **Check Feature FEATURE.md**: Verify frontmatter has correct issue numbers
225
+ 3. **Re-run sync**: `/specweave-github:sync` (should show no duplicates)
226
+ 4. **Duplicate detection**: Automatically enabled via DuplicateDetector
223
227
 
224
228
  ---
225
229
 
@@ -5,6 +5,63 @@ description: Synchronize SpecWeave increment with GitHub issue (Multi-Project Su
5
5
 
6
6
  # Sync Increment with GitHub Issue (Multi-Project)
7
7
 
8
+ ## ⚠️ CRITICAL: Sync Routing (Read First!)
9
+
10
+ **Before executing ANY sync, you MUST determine the correct sync path:**
11
+
12
+ ### Step 0: Detect Project Structure
13
+
14
+ ```bash
15
+ # Check for living docs structure
16
+ if [ -d ".specweave/docs/internal/specs" ] && [ -n "$(ls -A .specweave/docs/internal/specs/*/FEATURE.md 2>/dev/null)" ]; then
17
+ echo "✅ Living docs found → Use Feature Sync"
18
+ else
19
+ echo "⚠️ No living docs → Use Increment Sync (brownfield)"
20
+ fi
21
+ ```
22
+
23
+ ### Sync Path Decision:
24
+
25
+ | Structure | Command | Issue Format |
26
+ |-----------|---------|--------------|
27
+ | **Living docs exist** (`.specweave/docs/internal/specs/FS-XXX/`) | Use `github-feature-sync-cli.ts` | `[FS-XXX][US-YYY] Title` |
28
+ | **Increment only** (brownfield, no living docs) | Use `github-increment-sync-cli.ts` | `[FS-XXX] Title` with ACs |
29
+
30
+ ### For Brownfield Projects (No Living Docs):
31
+
32
+ Use the Increment Sync CLI directly:
33
+
34
+ ```bash
35
+ # Set token
36
+ export GITHUB_TOKEN=$(grep GITHUB_TOKEN .env | cut -d'=' -f2)
37
+
38
+ # Run increment sync
39
+ node dist/plugins/specweave-github/lib/github-increment-sync-cli.js <increment-id>
40
+
41
+ # Example
42
+ node dist/plugins/specweave-github/lib/github-increment-sync-cli.js 0002
43
+ ```
44
+
45
+ This creates issues with:
46
+ - ✅ Proper format: `[FS-002] Increment Title`
47
+ - ✅ User Stories listed with checkbox headers
48
+ - ✅ All ACs as checkable items
49
+ - ✅ Links to increment files
50
+
51
+ ### For Projects with Living Docs:
52
+
53
+ Use the Feature Sync CLI:
54
+
55
+ ```bash
56
+ # Run feature sync
57
+ node dist/plugins/specweave-github/lib/github-feature-sync-cli.js <feature-id>
58
+
59
+ # Example
60
+ node dist/plugins/specweave-github/lib/github-feature-sync-cli.js FS-062
61
+ ```
62
+
63
+ ---
64
+
8
65
  Synchronize the current state of a SpecWeave increment with its GitHub issue across multiple repositories. Supports multi-profile management, time range filtering, and rate limit protection.
9
66
 
10
67
  ## Usage
@@ -1162,3 +1162,71 @@
1162
1162
  [Wed Nov 26 01:29:07 EST 2025] [GitHub] ⚠️ sync-spec-content CLI not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-github/hooks/dist/src/cli/commands/sync-spec-content.js, skipping sync
1163
1163
  [Wed Nov 26 01:29:07 EST 2025] [GitHub] 🔗 GitHub sync hook fired
1164
1164
  [Wed Nov 26 01:29:07 EST 2025] [GitHub] ⚠️ sync-spec-content CLI not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-github/hooks/dist/src/cli/commands/sync-spec-content.js, skipping sync
1165
+ [Wed Nov 26 02:36:06 EST 2025] [GitHub] 🔗 GitHub sync hook fired
1166
+ [Wed Nov 26 02:36:06 EST 2025] [GitHub] ⚠️ sync-spec-content CLI not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-github/hooks/dist/src/cli/commands/sync-spec-content.js, skipping sync
1167
+ [Wed Nov 26 02:36:06 EST 2025] [GitHub] 🔗 GitHub sync hook fired
1168
+ [Wed Nov 26 02:36:06 EST 2025] [GitHub] ⚠️ sync-spec-content CLI not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-github/hooks/dist/src/cli/commands/sync-spec-content.js, skipping sync
1169
+ [Wed Nov 26 02:36:06 EST 2025] [GitHub] 🔗 GitHub sync hook fired
1170
+ [Wed Nov 26 02:36:06 EST 2025] [GitHub] ⚠️ sync-spec-content CLI not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-github/hooks/dist/src/cli/commands/sync-spec-content.js, skipping sync
1171
+ [Wed Nov 26 02:36:06 EST 2025] [GitHub] 🔗 GitHub sync hook fired
1172
+ [Wed Nov 26 02:36:06 EST 2025] [GitHub] ⚠️ sync-spec-content CLI not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-github/hooks/dist/src/cli/commands/sync-spec-content.js, skipping sync
1173
+ [Wed Nov 26 02:36:06 EST 2025] [GitHub] 🔗 GitHub sync hook fired
1174
+ [Wed Nov 26 02:36:06 EST 2025] [GitHub] ⚠️ sync-spec-content CLI not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-github/hooks/dist/src/cli/commands/sync-spec-content.js, skipping sync
1175
+ [Wed Nov 26 03:25:15 EST 2025] [GitHub] 🔗 GitHub sync hook fired
1176
+ [Wed Nov 26 03:25:15 EST 2025] [GitHub] ⚠️ sync-spec-content CLI not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-github/hooks/dist/src/cli/commands/sync-spec-content.js, skipping sync
1177
+ [Wed Nov 26 03:25:15 EST 2025] [GitHub] 🔗 GitHub sync hook fired
1178
+ [Wed Nov 26 03:25:15 EST 2025] [GitHub] ⚠️ sync-spec-content CLI not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-github/hooks/dist/src/cli/commands/sync-spec-content.js, skipping sync
1179
+ [Wed Nov 26 03:25:16 EST 2025] [GitHub] 🔗 GitHub sync hook fired
1180
+ [Wed Nov 26 03:25:16 EST 2025] [GitHub] ⚠️ sync-spec-content CLI not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-github/hooks/dist/src/cli/commands/sync-spec-content.js, skipping sync
1181
+ [Wed Nov 26 03:27:50 EST 2025] [GitHub] 🔗 GitHub sync hook fired
1182
+ [Wed Nov 26 03:27:50 EST 2025] [GitHub] ⚠️ sync-spec-content CLI not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-github/hooks/dist/src/cli/commands/sync-spec-content.js, skipping sync
1183
+ [Wed Nov 26 03:27:50 EST 2025] [GitHub] 🔗 GitHub sync hook fired
1184
+ [Wed Nov 26 03:27:50 EST 2025] [GitHub] ⚠️ sync-spec-content CLI not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-github/hooks/dist/src/cli/commands/sync-spec-content.js, skipping sync
1185
+ [Wed Nov 26 03:27:50 EST 2025] [GitHub] 🔗 GitHub sync hook fired
1186
+ [Wed Nov 26 03:27:50 EST 2025] [GitHub] ⚠️ sync-spec-content CLI not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-github/hooks/dist/src/cli/commands/sync-spec-content.js, skipping sync
1187
+ [Wed Nov 26 03:47:12 EST 2025] [GitHub] 🔗 GitHub sync hook fired
1188
+ [Wed Nov 26 03:47:12 EST 2025] [GitHub] ⚠️ sync-spec-content CLI not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-github/hooks/dist/src/cli/commands/sync-spec-content.js, skipping sync
1189
+ [Wed Nov 26 03:47:12 EST 2025] [GitHub] 🔗 GitHub sync hook fired
1190
+ [Wed Nov 26 03:47:12 EST 2025] [GitHub] ⚠️ sync-spec-content CLI not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-github/hooks/dist/src/cli/commands/sync-spec-content.js, skipping sync
1191
+ [Wed Nov 26 03:47:12 EST 2025] [GitHub] 🔗 GitHub sync hook fired
1192
+ [Wed Nov 26 03:47:12 EST 2025] [GitHub] ⚠️ sync-spec-content CLI not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-github/hooks/dist/src/cli/commands/sync-spec-content.js, skipping sync
1193
+ [Wed Nov 26 03:47:12 EST 2025] [GitHub] 🔗 GitHub sync hook fired
1194
+ [Wed Nov 26 03:47:12 EST 2025] [GitHub] ⚠️ sync-spec-content CLI not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-github/hooks/dist/src/cli/commands/sync-spec-content.js, skipping sync
1195
+ [Wed Nov 26 03:47:13 EST 2025] [GitHub] 🔗 GitHub sync hook fired
1196
+ [Wed Nov 26 03:47:13 EST 2025] [GitHub] ⚠️ sync-spec-content CLI not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-github/hooks/dist/src/cli/commands/sync-spec-content.js, skipping sync
1197
+ [Wed Nov 26 03:47:13 EST 2025] [GitHub] 🔗 GitHub sync hook fired
1198
+ [Wed Nov 26 03:47:13 EST 2025] [GitHub] ⚠️ sync-spec-content CLI not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-github/hooks/dist/src/cli/commands/sync-spec-content.js, skipping sync
1199
+ [Wed Nov 26 03:47:13 EST 2025] [GitHub] 🔗 GitHub sync hook fired
1200
+ [Wed Nov 26 03:47:13 EST 2025] [GitHub] ⚠️ sync-spec-content CLI not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-github/hooks/dist/src/cli/commands/sync-spec-content.js, skipping sync
1201
+ [Wed Nov 26 03:47:13 EST 2025] [GitHub] 🔗 GitHub sync hook fired
1202
+ [Wed Nov 26 03:47:13 EST 2025] [GitHub] ⚠️ sync-spec-content CLI not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-github/hooks/dist/src/cli/commands/sync-spec-content.js, skipping sync
1203
+ [Wed Nov 26 03:47:22 EST 2025] [GitHub] 🔗 GitHub sync hook fired
1204
+ [Wed Nov 26 03:47:22 EST 2025] [GitHub] ⚠️ sync-spec-content CLI not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-github/hooks/dist/src/cli/commands/sync-spec-content.js, skipping sync
1205
+ [Wed Nov 26 03:47:22 EST 2025] [GitHub] 🔗 GitHub sync hook fired
1206
+ [Wed Nov 26 03:47:22 EST 2025] [GitHub] ⚠️ sync-spec-content CLI not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-github/hooks/dist/src/cli/commands/sync-spec-content.js, skipping sync
1207
+ [Wed Nov 26 03:47:22 EST 2025] [GitHub] 🔗 GitHub sync hook fired
1208
+ [Wed Nov 26 03:47:22 EST 2025] [GitHub] ⚠️ sync-spec-content CLI not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-github/hooks/dist/src/cli/commands/sync-spec-content.js, skipping sync
1209
+ [Wed Nov 26 03:52:20 EST 2025] [GitHub] 🔗 GitHub sync hook fired
1210
+ [Wed Nov 26 03:52:20 EST 2025] [GitHub] ⚠️ sync-spec-content CLI not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-github/hooks/dist/src/cli/commands/sync-spec-content.js, skipping sync
1211
+ [Wed Nov 26 03:52:20 EST 2025] [GitHub] 🔗 GitHub sync hook fired
1212
+ [Wed Nov 26 03:52:20 EST 2025] [GitHub] ⚠️ sync-spec-content CLI not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-github/hooks/dist/src/cli/commands/sync-spec-content.js, skipping sync
1213
+ [Wed Nov 26 03:52:20 EST 2025] [GitHub] 🔗 GitHub sync hook fired
1214
+ [Wed Nov 26 03:52:20 EST 2025] [GitHub] ⚠️ sync-spec-content CLI not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-github/hooks/dist/src/cli/commands/sync-spec-content.js, skipping sync
1215
+ [Wed Nov 26 08:47:37 EST 2025] [GitHub] 🔗 GitHub sync hook fired
1216
+ [Wed Nov 26 08:47:37 EST 2025] [GitHub] ⚠️ sync-spec-content CLI not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-github/hooks/dist/src/cli/commands/sync-spec-content.js, skipping sync
1217
+ [Wed Nov 26 08:47:37 EST 2025] [GitHub] 🔗 GitHub sync hook fired
1218
+ [Wed Nov 26 08:47:37 EST 2025] [GitHub] ⚠️ sync-spec-content CLI not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-github/hooks/dist/src/cli/commands/sync-spec-content.js, skipping sync
1219
+ [Wed Nov 26 08:47:37 EST 2025] [GitHub] 🔗 GitHub sync hook fired
1220
+ [Wed Nov 26 08:47:37 EST 2025] [GitHub] ⚠️ sync-spec-content CLI not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-github/hooks/dist/src/cli/commands/sync-spec-content.js, skipping sync
1221
+ [Wed Nov 26 08:50:09 EST 2025] [GitHub] 🔗 GitHub sync hook fired
1222
+ [Wed Nov 26 08:50:09 EST 2025] [GitHub] ⚠️ sync-spec-content CLI not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-github/hooks/dist/src/cli/commands/sync-spec-content.js, skipping sync
1223
+ [Wed Nov 26 08:50:09 EST 2025] [GitHub] 🔗 GitHub sync hook fired
1224
+ [Wed Nov 26 08:50:09 EST 2025] [GitHub] ⚠️ sync-spec-content CLI not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-github/hooks/dist/src/cli/commands/sync-spec-content.js, skipping sync
1225
+ [Wed Nov 26 08:50:09 EST 2025] [GitHub] 🔗 GitHub sync hook fired
1226
+ [Wed Nov 26 08:50:09 EST 2025] [GitHub] ⚠️ sync-spec-content CLI not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-github/hooks/dist/src/cli/commands/sync-spec-content.js, skipping sync
1227
+ [Wed Nov 26 08:52:35 EST 2025] [GitHub] 🔗 GitHub sync hook fired
1228
+ [Wed Nov 26 08:52:35 EST 2025] [GitHub] ⚠️ sync-spec-content CLI not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-github/hooks/dist/src/cli/commands/sync-spec-content.js, skipping sync
1229
+ [Wed Nov 26 08:52:35 EST 2025] [GitHub] 🔗 GitHub sync hook fired
1230
+ [Wed Nov 26 08:52:35 EST 2025] [GitHub] ⚠️ sync-spec-content CLI not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-github/hooks/dist/src/cli/commands/sync-spec-content.js, skipping sync
1231
+ [Wed Nov 26 08:52:36 EST 2025] [GitHub] 🔗 GitHub sync hook fired
1232
+ [Wed Nov 26 08:52:36 EST 2025] [GitHub] ⚠️ sync-spec-content CLI not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-github/hooks/dist/src/cli/commands/sync-spec-content.js, skipping sync
@@ -1,18 +1,13 @@
1
1
  /**
2
2
  * GitHub Feature Sync - Universal Hierarchy Implementation
3
3
  *
4
- * Architecture (CORRECT):
5
- * - Feature (FS-033) → GitHub Milestone (Container)
6
- * - User Story (US-001, US-002, etc.) → GitHub Issue (Trackable item)
7
- * - Tasks (T-001, T-002, etc.) → Checkboxes in User Story issue body
4
+ * Architecture:
5
+ * - Feature (FS-XXX) → GitHub Milestone (Container)
6
+ * - User Story (US-XXX) → GitHub Issue with format [FS-XXX][US-YYY] Title
7
+ * - Tasks (T-XXX) → Checkboxes in User Story issue body
8
8
  *
9
- * This implements the TRUE Universal Hierarchy architecture for GitHub.
10
- *
11
- * Key Differences from old github-epic-sync.ts:
12
- * - ❌ OLD: Feature/Increment → GitHub Issue (WRONG!)
13
- * - ✅ NEW: User Story → GitHub Issue (CORRECT!)
14
- * - ✅ Creates ONE issue PER user story file (not one per increment)
15
- * - ✅ Reads us-*.md files from specs/{project}/FS-XXX/
9
+ * This implements the Universal Hierarchy architecture for GitHub sync.
10
+ * Creates ONE issue PER user story file from specs/{project}/FS-XXX/us-*.md
16
11
  */
17
12
 
18
13
  import { readdir, readFile, writeFile } from 'fs/promises';