specweave 0.17.13 → 0.17.15

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 (57) hide show
  1. package/CLAUDE.md +456 -0
  2. package/README.md +38 -1
  3. package/dist/src/cli/commands/cicd-monitor.d.ts +11 -0
  4. package/dist/src/cli/commands/cicd-monitor.d.ts.map +1 -0
  5. package/dist/src/cli/commands/cicd-monitor.js +154 -0
  6. package/dist/src/cli/commands/cicd-monitor.js.map +1 -0
  7. package/dist/src/cli/commands/validate-parent-repo.d.ts +8 -0
  8. package/dist/src/cli/commands/validate-parent-repo.d.ts.map +1 -0
  9. package/dist/src/cli/commands/validate-parent-repo.js +15 -0
  10. package/dist/src/cli/commands/validate-parent-repo.js.map +1 -0
  11. package/dist/src/cli/helpers/issue-tracker/types.d.ts +5 -0
  12. package/dist/src/cli/helpers/issue-tracker/types.d.ts.map +1 -1
  13. package/dist/src/cli/helpers/issue-tracker/types.js.map +1 -1
  14. package/dist/src/core/cicd/config-loader.d.ts +21 -0
  15. package/dist/src/core/cicd/config-loader.d.ts.map +1 -0
  16. package/dist/src/core/cicd/config-loader.js +190 -0
  17. package/dist/src/core/cicd/config-loader.js.map +1 -0
  18. package/dist/src/core/cicd/index.d.ts +12 -0
  19. package/dist/src/core/cicd/index.d.ts.map +1 -0
  20. package/dist/src/core/cicd/index.js +18 -0
  21. package/dist/src/core/cicd/index.js.map +1 -0
  22. package/dist/src/core/cicd/monitor-service.d.ts +92 -0
  23. package/dist/src/core/cicd/monitor-service.d.ts.map +1 -0
  24. package/dist/src/core/cicd/monitor-service.js +132 -0
  25. package/dist/src/core/cicd/monitor-service.js.map +1 -0
  26. package/dist/src/core/cicd/notifier.d.ts +102 -0
  27. package/dist/src/core/cicd/notifier.d.ts.map +1 -0
  28. package/dist/src/core/cicd/notifier.js +184 -0
  29. package/dist/src/core/cicd/notifier.js.map +1 -0
  30. package/dist/src/core/cicd/parent-repo-validator.d.ts +42 -0
  31. package/dist/src/core/cicd/parent-repo-validator.d.ts.map +1 -0
  32. package/dist/src/core/cicd/parent-repo-validator.js +201 -0
  33. package/dist/src/core/cicd/parent-repo-validator.js.map +1 -0
  34. package/dist/src/core/cicd/state-manager.d.ts +79 -0
  35. package/dist/src/core/cicd/state-manager.d.ts.map +1 -0
  36. package/dist/src/core/cicd/state-manager.js +197 -0
  37. package/dist/src/core/cicd/state-manager.js.map +1 -0
  38. package/dist/src/core/cicd/types.d.ts +119 -0
  39. package/dist/src/core/cicd/types.d.ts.map +1 -0
  40. package/dist/src/core/cicd/types.js +18 -0
  41. package/dist/src/core/cicd/types.js.map +1 -0
  42. package/dist/src/core/cicd/workflow-monitor.d.ts +98 -0
  43. package/dist/src/core/cicd/workflow-monitor.d.ts.map +1 -0
  44. package/dist/src/core/cicd/workflow-monitor.js +215 -0
  45. package/dist/src/core/cicd/workflow-monitor.js.map +1 -0
  46. package/dist/src/core/spec-content-sync.d.ts.map +1 -1
  47. package/dist/src/core/spec-content-sync.js +14 -6
  48. package/dist/src/core/spec-content-sync.js.map +1 -1
  49. package/package.json +2 -2
  50. package/plugins/specweave/agents/pm/AGENT.md +170 -2
  51. package/plugins/specweave/hooks/post-increment-planning.sh +89 -26
  52. package/plugins/specweave/hooks/user-prompt-submit.sh +4 -4
  53. package/plugins/specweave/skills/increment-planner/SKILL.md +15 -10
  54. package/plugins/specweave-ado/lib/ado-project-detector.js +32 -5
  55. package/plugins/specweave-ado/lib/ado-project-detector.ts +44 -5
  56. package/src/templates/AGENTS.md.template +55 -1
  57. package/src/templates/CLAUDE.md.template +51 -1
@@ -202,7 +202,7 @@ export class AdoProjectDetector {
202
202
  const candidates = this.analyzeContent(content);
203
203
 
204
204
  // High confidence: Auto-select
205
- if (candidates[0]?.confidence > 0.7) {
205
+ if (candidates[0]?.confidence >= 0.7) {
206
206
  return {
207
207
  primary: candidates[0].project,
208
208
  confidence: candidates[0].confidence,
@@ -211,10 +211,10 @@ export class AdoProjectDetector {
211
211
  }
212
212
 
213
213
  // Medium confidence: Primary with secondary projects
214
- if (candidates[0]?.confidence > 0.4) {
214
+ if (candidates[0]?.confidence >= 0.4) {
215
215
  const secondary = candidates
216
216
  .slice(1)
217
- .filter(c => c.confidence > 0.3)
217
+ .filter(c => c.confidence >= 0.3)
218
218
  .map(c => c.project);
219
219
 
220
220
  return {
@@ -299,7 +299,7 @@ export class AdoProjectDetector {
299
299
  const candidates = this.analyzeContent(content);
300
300
 
301
301
  // Get all projects with meaningful confidence
302
- const significantProjects = candidates.filter(c => c.confidence > 0.3);
302
+ const significantProjects = candidates.filter(c => c.confidence >= 0.3);
303
303
 
304
304
  if (significantProjects.length === 0) {
305
305
  return {
@@ -330,13 +330,52 @@ export class AdoProjectDetector {
330
330
  */
331
331
  mapToAreaPath(content: string, project: string): string {
332
332
  const areaPaths = process.env.AZURE_DEVOPS_AREA_PATHS?.split(',').map(a => a.trim()) || [];
333
+ const lowerContent = content.toLowerCase();
333
334
 
335
+ // First try exact area path name match
334
336
  for (const areaPath of areaPaths) {
335
- if (content.toLowerCase().includes(areaPath.toLowerCase())) {
337
+ if (lowerContent.includes(areaPath.toLowerCase())) {
336
338
  return `${project}\\${areaPath}`;
337
339
  }
338
340
  }
339
341
 
342
+ // Try keyword-based detection using PROJECT_KEYWORDS
343
+ // Map area paths to common project types
344
+ const areaPathKeywordMap: { [key: string]: string[] } = {
345
+ 'Frontend': ['WebApp', 'frontend'],
346
+ 'Backend': ['backend', 'api', 'server'],
347
+ 'Mobile': ['MobileApp', 'mobile', 'ios', 'android'],
348
+ 'Infrastructure': ['Platform', 'infrastructure'],
349
+ 'Data': ['DataService', 'data', 'analytics']
350
+ };
351
+
352
+ let bestMatch = { areaPath: '', confidence: 0 };
353
+
354
+ for (const areaPath of areaPaths) {
355
+ // Get related project types for this area path
356
+ const relatedTypes = areaPathKeywordMap[areaPath] || [areaPath];
357
+ let matchCount = 0;
358
+
359
+ for (const projectType of relatedTypes) {
360
+ // Check if this project type has keywords defined
361
+ const keywords = this.projectKeywords[projectType] || [];
362
+ for (const keyword of keywords) {
363
+ if (lowerContent.includes(keyword.toLowerCase())) {
364
+ matchCount++;
365
+ }
366
+ }
367
+ }
368
+
369
+ if (matchCount > bestMatch.confidence) {
370
+ bestMatch = { areaPath, confidence: matchCount };
371
+ }
372
+ }
373
+
374
+ // Return best match if confidence is high enough
375
+ if (bestMatch.confidence >= 2) {
376
+ return `${project}\\${bestMatch.areaPath}`;
377
+ }
378
+
340
379
  // Default area path
341
380
  return project;
342
381
  }
@@ -22,6 +22,11 @@ This is a **SpecWeave project** where specifications and documentation are the s
22
22
 
23
23
  ## Project Structure
24
24
 
25
+ **IMPORTANT**: This project uses {MONOREPO_OR_SINGLE} mode.
26
+
27
+ {#IF_SINGLE_PROJECT}
28
+ ### Single Project Structure
29
+
25
30
  ```
26
31
  .specweave/
27
32
  ├── increments/ # Feature increments (auto-numbered)
@@ -36,7 +41,8 @@ This is a **SpecWeave project** where specifications and documentation are the s
36
41
  │ └── reports/ # Analysis, completion reports
37
42
  ├── docs/internal/
38
43
  │ ├── strategy/ # Business specs (WHAT, WHY)
39
- │ ├── specs/ # Feature specifications (detailed requirements)
44
+ │ ├── specs/ # Feature specifications (living docs)
45
+ │ │ └── default/ # ✅ All specs in default project
40
46
  │ ├── architecture/ # Technical design (HOW)
41
47
  │ ├── delivery/ # Roadmap, CI/CD, guides
42
48
  │ ├── operations/ # Runbooks, SLOs
@@ -55,6 +61,54 @@ plugins/ # Optional plugins (extended capabilities)
55
61
  ├── agents/ # Plugin-specific agents
56
62
  └── commands/ # Plugin-specific commands
57
63
  ```
64
+ {#ENDIF}
65
+
66
+ {#IF_MULTI_PROJECT}
67
+ ### Multi-Project Structure (v0.16.11+ Flattened)
68
+
69
+ **CRITICAL**: Specs are organized by project with FLATTENED structure (v0.16.11+).
70
+
71
+ ```
72
+ .specweave/
73
+ ├── docs/internal/
74
+ │ ├── strategy/ # Cross-project strategy
75
+ │ ├── specs/ # ✅ FLATTENED structure (v0.16.11+)
76
+ │ │ ├── backend/ # Backend project specs
77
+ │ │ │ ├── spec-001-api-auth.md
78
+ │ │ │ └── spec-002-data-layer.md
79
+ │ │ ├── frontend/ # Frontend project specs
80
+ │ │ │ ├── spec-001-user-dashboard.md
81
+ │ │ │ └── spec-002-dark-mode.md
82
+ │ │ ├── mobile/ # Mobile project specs (if applicable)
83
+ │ │ │ └── spec-001-push-notifications.md
84
+ │ │ └── _parent/ # Parent repo specs (multi-repo only)
85
+ │ │ └── spec-001-system-architecture.md
86
+ │ ├── architecture/ # System-wide technical design
87
+ │ ├── delivery/ # Cross-project delivery
88
+ │ ├── operations/ # Cross-project operations
89
+ │ └── governance/ # Cross-project governance
90
+ ├── increments/
91
+ │ ├── 0001-backend-auth/ # Backend increment
92
+ │ ├── 0002-frontend-ui/ # Frontend increment
93
+ │ └── 0003-mobile-push/ # Mobile increment
94
+ └── ...
95
+ ```
96
+
97
+ **Living Docs Path Format**:
98
+ - ✅ **CORRECT** (v0.16.11+): `.specweave/docs/internal/specs/{project-id}/spec-NNN-name.md`
99
+ - ❌ **OLD** (v0.8.0-v0.16.10): `.specweave/docs/internal/projects/{project-id}/specs/...` (DEPRECATED)
100
+
101
+ **Project Detection** (automatic):
102
+ - **From increment name**: `0001-backend-auth` → project: `backend`
103
+ - **From tech stack**: React/Next.js → `frontend`, ASP.NET/Node.js → `backend`
104
+ - **From config**: `multiProject.activeProject` in `.specweave/config.json`
105
+ - **Fallback**: Uses `default` project
106
+
107
+ **When creating living docs specs**:
108
+ 1. Detect project from increment name or tech stack
109
+ 2. Use flattened path: `specs/{project-id}/spec-NNN-name.md`
110
+ 3. Never use old nested structure: `projects/{project-id}/specs/...`
111
+ {#ENDIF}
58
112
 
59
113
  **CRITICAL**: Always read `context-manifest.yaml` first! Only load files listed there.
60
114
 
@@ -289,13 +289,19 @@ Config: Auto-detected from project files
289
289
 
290
290
  ## Project Structure
291
291
 
292
+ **IMPORTANT**: This project uses {MONOREPO_OR_SINGLE} mode.
293
+
294
+ {#IF_SINGLE_PROJECT}
295
+ ### Single Project Structure
296
+
292
297
  ```
293
298
  {PROJECT_NAME}/
294
299
  ├── .specweave/
295
300
  │ ├── docs/ # Strategic documentation
296
301
  │ │ ├── internal/
297
302
  │ │ │ ├── strategy/ # Business specs (WHAT, WHY)
298
- │ │ │ ├── specs/ # Feature specifications (detailed requirements)
303
+ │ │ │ ├── specs/ # Feature specifications (living docs)
304
+ │ │ │ │ └── default/ # ✅ All specs in default project
299
305
  │ │ │ ├── architecture/ # Technical design (HOW)
300
306
  │ │ │ ├── delivery/ # Guides, roadmap, CI/CD
301
307
  │ │ │ ├── operations/ # Runbooks, monitoring
@@ -319,6 +325,50 @@ Config: Auto-detected from project files
319
325
  ├── CLAUDE.md # This file
320
326
  └── src/ # Your source code
321
327
  ```
328
+ {#ENDIF}
329
+
330
+ {#IF_MULTI_PROJECT}
331
+ ### Multi-Project Structure (v0.16.11+ Flattened)
332
+
333
+ **CRITICAL**: Specs are organized by project with FLATTENED structure (v0.16.11+).
334
+
335
+ ```
336
+ {PROJECT_NAME}/
337
+ ├── .specweave/
338
+ │ ├── docs/internal/
339
+ │ │ ├── strategy/ # Cross-project strategy
340
+ │ │ ├── specs/ # ✅ FLATTENED structure (v0.16.11+)
341
+ │ │ │ ├── backend/ # Backend project specs
342
+ │ │ │ │ ├── spec-001-api-auth.md
343
+ │ │ │ │ └── spec-002-data-layer.md
344
+ │ │ │ ├── frontend/ # Frontend project specs
345
+ │ │ │ │ ├── spec-001-user-dashboard.md
346
+ │ │ │ │ └── spec-002-dark-mode.md
347
+ │ │ │ ├── mobile/ # Mobile project specs (if applicable)
348
+ │ │ │ │ └── spec-001-push-notifications.md
349
+ │ │ │ └── _parent/ # Parent repo specs (multi-repo only)
350
+ │ │ │ └── spec-001-system-architecture.md
351
+ │ │ ├── architecture/ # System-wide technical design
352
+ │ │ ├── delivery/ # Cross-project delivery
353
+ │ │ ├── operations/ # Cross-project operations
354
+ │ │ └── governance/ # Cross-project governance
355
+ │ ├── increments/
356
+ │ │ ├── 0001-backend-auth/ # Backend increment
357
+ │ │ ├── 0002-frontend-ui/ # Frontend increment
358
+ │ │ └── 0003-mobile-push/ # Mobile increment
359
+ │ └── ...
360
+ ```
361
+
362
+ **Living Docs Path Format**:
363
+ - ✅ **CORRECT** (v0.16.11+): `.specweave/docs/internal/specs/{project-id}/spec-NNN-name.md`
364
+ - ❌ **OLD** (v0.8.0-v0.16.10): `.specweave/docs/internal/projects/{project-id}/specs/...` (DEPRECATED)
365
+
366
+ **Project Detection** (automatic):
367
+ - **From increment name**: `0001-backend-auth` → project: `backend`
368
+ - **From tech stack**: React/Next.js → `frontend`, ASP.NET/Node.js → `backend`
369
+ - **From config**: `multiProject.activeProject` in `.specweave/config.json`
370
+ - **Fallback**: Uses `default` project
371
+ {#ENDIF}
322
372
 
323
373
  ---
324
374