specweave 0.28.19 → 0.28.22
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.
- package/dist/plugins/specweave-ado/lib/ado-spec-sync.d.ts +16 -0
- package/dist/plugins/specweave-ado/lib/ado-spec-sync.d.ts.map +1 -1
- package/dist/plugins/specweave-ado/lib/ado-spec-sync.js +63 -3
- package/dist/plugins/specweave-ado/lib/ado-spec-sync.js.map +1 -1
- package/dist/plugins/specweave-ado/lib/ado-status-sync.d.ts +12 -3
- package/dist/plugins/specweave-ado/lib/ado-status-sync.d.ts.map +1 -1
- package/dist/plugins/specweave-ado/lib/ado-status-sync.js +37 -3
- package/dist/plugins/specweave-ado/lib/ado-status-sync.js.map +1 -1
- package/dist/plugins/specweave-github/lib/github-increment-sync-cli.d.ts +8 -6
- package/dist/plugins/specweave-github/lib/github-increment-sync-cli.d.ts.map +1 -1
- package/dist/plugins/specweave-github/lib/github-increment-sync-cli.js +230 -165
- package/dist/plugins/specweave-github/lib/github-increment-sync-cli.js.map +1 -1
- package/dist/plugins/specweave-github/lib/github-status-sync.d.ts +10 -0
- package/dist/plugins/specweave-github/lib/github-status-sync.d.ts.map +1 -1
- package/dist/plugins/specweave-github/lib/github-status-sync.js +40 -2
- package/dist/plugins/specweave-github/lib/github-status-sync.js.map +1 -1
- package/dist/plugins/specweave-github/lib/increment-issue-builder.d.ts +2 -0
- package/dist/plugins/specweave-github/lib/increment-issue-builder.d.ts.map +1 -1
- package/dist/plugins/specweave-github/lib/increment-issue-builder.js +25 -5
- package/dist/plugins/specweave-github/lib/increment-issue-builder.js.map +1 -1
- package/dist/plugins/specweave-jira/lib/jira-spec-sync.d.ts +12 -0
- package/dist/plugins/specweave-jira/lib/jira-spec-sync.d.ts.map +1 -1
- package/dist/plugins/specweave-jira/lib/jira-spec-sync.js +57 -5
- package/dist/plugins/specweave-jira/lib/jira-spec-sync.js.map +1 -1
- package/dist/plugins/specweave-jira/lib/jira-status-sync.d.ts +5 -1
- package/dist/plugins/specweave-jira/lib/jira-status-sync.d.ts.map +1 -1
- package/dist/plugins/specweave-jira/lib/jira-status-sync.js +12 -4
- package/dist/plugins/specweave-jira/lib/jira-status-sync.js.map +1 -1
- package/dist/src/cli/commands/init.d.ts.map +1 -1
- package/dist/src/cli/commands/init.js +7 -3
- package/dist/src/cli/commands/init.js.map +1 -1
- package/dist/src/cli/helpers/init/external-import.d.ts.map +1 -1
- package/dist/src/cli/helpers/init/external-import.js +193 -23
- package/dist/src/cli/helpers/init/external-import.js.map +1 -1
- package/dist/src/cli/helpers/init/jira-ado-auto-detect.d.ts +115 -0
- package/dist/src/cli/helpers/init/jira-ado-auto-detect.d.ts.map +1 -0
- package/dist/src/cli/helpers/init/jira-ado-auto-detect.js +590 -0
- package/dist/src/cli/helpers/init/jira-ado-auto-detect.js.map +1 -0
- package/dist/src/cli/helpers/init/language-selection.js +1 -1
- package/dist/src/cli/helpers/init/language-selection.js.map +1 -1
- package/dist/src/cli/helpers/init/repository-setup.js +1 -1
- package/dist/src/cli/helpers/init/repository-setup.js.map +1 -1
- package/dist/src/config/types.d.ts +6 -6
- package/dist/src/core/background/index.d.ts +11 -0
- package/dist/src/core/background/index.d.ts.map +1 -0
- package/dist/src/core/background/index.js +11 -0
- package/dist/src/core/background/index.js.map +1 -0
- package/dist/src/core/background/job-manager.d.ts +65 -0
- package/dist/src/core/background/job-manager.d.ts.map +1 -0
- package/dist/src/core/background/job-manager.js +192 -0
- package/dist/src/core/background/job-manager.js.map +1 -0
- package/dist/src/core/background/types.d.ts +59 -0
- package/dist/src/core/background/types.d.ts.map +1 -0
- package/dist/src/core/background/types.js +8 -0
- package/dist/src/core/background/types.js.map +1 -0
- package/dist/src/core/repo-structure/multi-repo-configurator.d.ts +25 -0
- package/dist/src/core/repo-structure/multi-repo-configurator.d.ts.map +1 -0
- package/dist/src/core/repo-structure/multi-repo-configurator.js +614 -0
- package/dist/src/core/repo-structure/multi-repo-configurator.js.map +1 -0
- package/dist/src/core/repo-structure/prompt-consolidator.d.ts.map +1 -1
- package/dist/src/core/repo-structure/prompt-consolidator.js +6 -36
- package/dist/src/core/repo-structure/prompt-consolidator.js.map +1 -1
- package/dist/src/core/repo-structure/repo-initializer.d.ts +40 -0
- package/dist/src/core/repo-structure/repo-initializer.d.ts.map +1 -0
- package/dist/src/core/repo-structure/repo-initializer.js +260 -0
- package/dist/src/core/repo-structure/repo-initializer.js.map +1 -0
- package/dist/src/core/repo-structure/repo-structure-manager.d.ts +3 -37
- package/dist/src/core/repo-structure/repo-structure-manager.d.ts.map +1 -1
- package/dist/src/core/repo-structure/repo-structure-manager.js +23 -803
- package/dist/src/core/repo-structure/repo-structure-manager.js.map +1 -1
- package/dist/src/core/types/spec-metadata.d.ts +2 -0
- package/dist/src/core/types/spec-metadata.d.ts.map +1 -1
- package/dist/src/importers/import-coordinator.d.ts +20 -0
- package/dist/src/importers/import-coordinator.d.ts.map +1 -1
- package/dist/src/importers/import-coordinator.js.map +1 -1
- package/dist/src/init/architecture/types.d.ts +2 -2
- package/dist/src/init/compliance/types.d.ts +1 -1
- package/package.json +1 -1
- package/plugins/specweave/commands/specweave-jobs.md +160 -0
- package/plugins/specweave-ado/lib/ado-spec-sync.js +59 -3
- package/plugins/specweave-ado/lib/ado-spec-sync.ts +72 -3
- package/plugins/specweave-ado/lib/ado-status-sync.js +35 -3
- package/plugins/specweave-ado/lib/ado-status-sync.ts +48 -4
- package/plugins/specweave-github/hooks/.specweave/logs/hooks-debug.log +6 -0
- package/plugins/specweave-github/lib/github-increment-sync-cli.js +268 -155
- package/plugins/specweave-github/lib/github-increment-sync-cli.ts +313 -209
- package/plugins/specweave-github/lib/github-status-sync.js +37 -1
- package/plugins/specweave-github/lib/github-status-sync.ts +60 -4
- package/plugins/specweave-github/lib/increment-issue-builder.js +26 -5
- package/plugins/specweave-github/lib/increment-issue-builder.ts +36 -5
- package/plugins/specweave-jira/lib/jira-spec-sync.js +53 -5
- package/plugins/specweave-jira/lib/jira-spec-sync.ts +87 -7
- package/plugins/specweave-jira/lib/jira-status-sync.js +9 -3
- package/plugins/specweave-jira/lib/jira-status-sync.ts +15 -6
- package/plugins/specweave-release/commands/specweave-release-npm.md +187 -8
- package/plugins/specweave-release/hooks/.specweave/logs/dora-tracking.log +9 -0
|
@@ -223,6 +223,9 @@ export class AdoSpecSync {
|
|
|
223
223
|
const featureDescription = this.generateFeatureDescription(spec);
|
|
224
224
|
const tags = [`spec:${spec.metadata.id}`, `priority:${spec.metadata.priority}`].join('; ');
|
|
225
225
|
|
|
226
|
+
// Determine work item type (supports Bug for bug-type specs)
|
|
227
|
+
const workItemType = this.mapTypeToAdo(spec.metadata.type, 'Feature');
|
|
228
|
+
|
|
226
229
|
const payload = [
|
|
227
230
|
{
|
|
228
231
|
op: 'add',
|
|
@@ -237,12 +240,18 @@ export class AdoSpecSync {
|
|
|
237
240
|
{
|
|
238
241
|
op: 'add',
|
|
239
242
|
path: '/fields/System.WorkItemType',
|
|
240
|
-
value:
|
|
243
|
+
value: workItemType
|
|
241
244
|
},
|
|
242
245
|
{
|
|
243
246
|
op: 'add',
|
|
244
247
|
path: '/fields/System.Tags',
|
|
245
248
|
value: tags
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
// Set native ADO Priority field (P0→1, P1→2, P2→3, P3→4)
|
|
252
|
+
op: 'add',
|
|
253
|
+
path: '/fields/Microsoft.VSTS.Common.Priority',
|
|
254
|
+
value: this.mapPriorityToAdo(spec.metadata.priority)
|
|
246
255
|
}
|
|
247
256
|
];
|
|
248
257
|
|
|
@@ -335,7 +344,8 @@ export class AdoSpecSync {
|
|
|
335
344
|
title: storyTitle,
|
|
336
345
|
description: storyDescription,
|
|
337
346
|
parentId: featureId,
|
|
338
|
-
tags: [`user-story`, `spec:${spec.metadata.id}`, `priority:${us.priority}`].join('; ')
|
|
347
|
+
tags: [`user-story`, `spec:${spec.metadata.id}`, `priority:${us.priority}`].join('; '),
|
|
348
|
+
priority: us.priority
|
|
339
349
|
});
|
|
340
350
|
|
|
341
351
|
created.push(us.id);
|
|
@@ -510,7 +520,12 @@ ${acList}
|
|
|
510
520
|
description: string;
|
|
511
521
|
parentId: number;
|
|
512
522
|
tags: string;
|
|
523
|
+
priority?: string;
|
|
524
|
+
type?: string;
|
|
513
525
|
}): Promise<AdoUserStory> {
|
|
526
|
+
// Determine work item type (supports Bug for bug-type stories)
|
|
527
|
+
const workItemType = this.mapTypeToAdo(story.type, 'User Story');
|
|
528
|
+
|
|
514
529
|
const payload = [
|
|
515
530
|
{
|
|
516
531
|
op: 'add',
|
|
@@ -525,13 +540,19 @@ ${acList}
|
|
|
525
540
|
{
|
|
526
541
|
op: 'add',
|
|
527
542
|
path: '/fields/System.WorkItemType',
|
|
528
|
-
value:
|
|
543
|
+
value: workItemType
|
|
529
544
|
},
|
|
530
545
|
{
|
|
531
546
|
op: 'add',
|
|
532
547
|
path: '/fields/System.Tags',
|
|
533
548
|
value: story.tags
|
|
534
549
|
},
|
|
550
|
+
{
|
|
551
|
+
// Set native ADO Priority field
|
|
552
|
+
op: 'add',
|
|
553
|
+
path: '/fields/Microsoft.VSTS.Common.Priority',
|
|
554
|
+
value: this.mapPriorityToAdo(story.priority)
|
|
555
|
+
},
|
|
535
556
|
{
|
|
536
557
|
op: 'add',
|
|
537
558
|
path: '/relations/-',
|
|
@@ -590,4 +611,52 @@ ${acList}
|
|
|
590
611
|
|
|
591
612
|
await this.client.patch(`/wit/workitems/${storyId}?api-version=7.0`, payload);
|
|
592
613
|
}
|
|
614
|
+
|
|
615
|
+
/**
|
|
616
|
+
* Map SpecWeave priority to ADO priority value
|
|
617
|
+
*
|
|
618
|
+
* ADO Priority field uses 1-4 scale:
|
|
619
|
+
* - 1 = Highest (P0)
|
|
620
|
+
* - 2 = High (P1)
|
|
621
|
+
* - 3 = Medium (P2)
|
|
622
|
+
* - 4 = Low (P3)
|
|
623
|
+
*/
|
|
624
|
+
private mapPriorityToAdo(priority?: string): number {
|
|
625
|
+
if (!priority) return 3; // Default to Medium
|
|
626
|
+
|
|
627
|
+
const map: Record<string, number> = {
|
|
628
|
+
P0: 1,
|
|
629
|
+
P1: 2,
|
|
630
|
+
P2: 3,
|
|
631
|
+
P3: 4,
|
|
632
|
+
p0: 1,
|
|
633
|
+
p1: 2,
|
|
634
|
+
p2: 3,
|
|
635
|
+
p3: 4
|
|
636
|
+
};
|
|
637
|
+
|
|
638
|
+
return map[priority] || 3;
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
/**
|
|
642
|
+
* Map SpecWeave type to ADO work item type
|
|
643
|
+
*
|
|
644
|
+
* Supports: Feature, User Story, Bug, Task
|
|
645
|
+
*/
|
|
646
|
+
private mapTypeToAdo(type?: string, defaultType: string = 'Feature'): string {
|
|
647
|
+
if (!type) return defaultType;
|
|
648
|
+
|
|
649
|
+
const normalizedType = type.toLowerCase();
|
|
650
|
+
|
|
651
|
+
const map: Record<string, string> = {
|
|
652
|
+
bug: 'Bug',
|
|
653
|
+
feature: 'Feature',
|
|
654
|
+
epic: 'Feature',
|
|
655
|
+
story: 'User Story',
|
|
656
|
+
task: 'Task',
|
|
657
|
+
enhancement: 'Feature'
|
|
658
|
+
};
|
|
659
|
+
|
|
660
|
+
return map[normalizedType] || defaultType;
|
|
661
|
+
}
|
|
593
662
|
}
|
|
@@ -31,12 +31,13 @@ class AdoStatusSync {
|
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
33
|
/**
|
|
34
|
-
* Update ADO work item state
|
|
34
|
+
* Update ADO work item state and tags
|
|
35
35
|
*
|
|
36
|
-
* Uses JSON Patch format to update System.State
|
|
36
|
+
* Uses JSON Patch format to update System.State and System.Tags fields.
|
|
37
|
+
* Tags are appended to existing tags, not replaced.
|
|
37
38
|
*
|
|
38
39
|
* @param workItemId - ADO work item ID (e.g., 123)
|
|
39
|
-
* @param status - Desired status
|
|
40
|
+
* @param status - Desired status with state and optional tags
|
|
40
41
|
*/
|
|
41
42
|
async updateStatus(workItemId, status) {
|
|
42
43
|
const patch = [
|
|
@@ -46,11 +47,42 @@ class AdoStatusSync {
|
|
|
46
47
|
value: status.state
|
|
47
48
|
}
|
|
48
49
|
];
|
|
50
|
+
if (status.tags && status.tags.length > 0) {
|
|
51
|
+
const currentTags = await this.getCurrentTags(workItemId);
|
|
52
|
+
const statusTagPatterns = ["Planning", "In Progress", "Paused", "Completed", "Abandoned", "On Hold"];
|
|
53
|
+
const preservedTags = currentTags.filter(
|
|
54
|
+
(tag) => !statusTagPatterns.some((pattern) => tag.toLowerCase() === pattern.toLowerCase())
|
|
55
|
+
);
|
|
56
|
+
const allTags = [.../* @__PURE__ */ new Set([...preservedTags, ...status.tags])];
|
|
57
|
+
patch.push({
|
|
58
|
+
op: "add",
|
|
59
|
+
path: "/fields/System.Tags",
|
|
60
|
+
value: allTags.join("; ")
|
|
61
|
+
});
|
|
62
|
+
}
|
|
49
63
|
await this.client.patch(
|
|
50
64
|
`/wit/workitems/${workItemId}?api-version=7.0`,
|
|
51
65
|
patch
|
|
52
66
|
);
|
|
53
67
|
}
|
|
68
|
+
/**
|
|
69
|
+
* Get current tags from ADO work item
|
|
70
|
+
*
|
|
71
|
+
* @param workItemId - ADO work item ID
|
|
72
|
+
* @returns Array of current tags
|
|
73
|
+
*/
|
|
74
|
+
async getCurrentTags(workItemId) {
|
|
75
|
+
try {
|
|
76
|
+
const response = await this.client.get(
|
|
77
|
+
`/wit/workitems/${workItemId}?api-version=7.0&$select=System.Tags`
|
|
78
|
+
);
|
|
79
|
+
const tagsString = response.data.fields?.["System.Tags"] || "";
|
|
80
|
+
if (!tagsString) return [];
|
|
81
|
+
return tagsString.split(";").map((tag) => tag.trim()).filter(Boolean);
|
|
82
|
+
} catch {
|
|
83
|
+
return [];
|
|
84
|
+
}
|
|
85
|
+
}
|
|
54
86
|
/**
|
|
55
87
|
* Post comment about status change to ADO work item
|
|
56
88
|
*
|
|
@@ -18,6 +18,7 @@ import axios, { AxiosInstance } from 'axios';
|
|
|
18
18
|
*/
|
|
19
19
|
export interface ExternalStatus {
|
|
20
20
|
state: string; // e.g., "New", "Active", "Closed"
|
|
21
|
+
tags?: string[]; // Status tags from config (e.g., ["Planning"], ["In Progress"])
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
/**
|
|
@@ -69,16 +70,17 @@ export class AdoStatusSync {
|
|
|
69
70
|
}
|
|
70
71
|
|
|
71
72
|
/**
|
|
72
|
-
* Update ADO work item state
|
|
73
|
+
* Update ADO work item state and tags
|
|
73
74
|
*
|
|
74
|
-
* Uses JSON Patch format to update System.State
|
|
75
|
+
* Uses JSON Patch format to update System.State and System.Tags fields.
|
|
76
|
+
* Tags are appended to existing tags, not replaced.
|
|
75
77
|
*
|
|
76
78
|
* @param workItemId - ADO work item ID (e.g., 123)
|
|
77
|
-
* @param status - Desired status
|
|
79
|
+
* @param status - Desired status with state and optional tags
|
|
78
80
|
*/
|
|
79
81
|
async updateStatus(workItemId: number, status: ExternalStatus): Promise<void> {
|
|
80
82
|
// ADO uses JSON Patch format for updates
|
|
81
|
-
const patch = [
|
|
83
|
+
const patch: Array<{ op: string; path: string; value: string }> = [
|
|
82
84
|
{
|
|
83
85
|
op: 'add',
|
|
84
86
|
path: '/fields/System.State',
|
|
@@ -86,12 +88,54 @@ export class AdoStatusSync {
|
|
|
86
88
|
}
|
|
87
89
|
];
|
|
88
90
|
|
|
91
|
+
// Add status tags if provided
|
|
92
|
+
if (status.tags && status.tags.length > 0) {
|
|
93
|
+
// Fetch current tags to preserve them
|
|
94
|
+
const currentTags = await this.getCurrentTags(workItemId);
|
|
95
|
+
|
|
96
|
+
// Remove old status tags (tags that match known status patterns)
|
|
97
|
+
const statusTagPatterns = ['Planning', 'In Progress', 'Paused', 'Completed', 'Abandoned', 'On Hold'];
|
|
98
|
+
const preservedTags = currentTags.filter(
|
|
99
|
+
tag => !statusTagPatterns.some(pattern => tag.toLowerCase() === pattern.toLowerCase())
|
|
100
|
+
);
|
|
101
|
+
|
|
102
|
+
// Combine preserved tags with new status tags
|
|
103
|
+
const allTags = [...new Set([...preservedTags, ...status.tags])];
|
|
104
|
+
|
|
105
|
+
patch.push({
|
|
106
|
+
op: 'add',
|
|
107
|
+
path: '/fields/System.Tags',
|
|
108
|
+
value: allTags.join('; ')
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
|
|
89
112
|
await this.client.patch(
|
|
90
113
|
`/wit/workitems/${workItemId}?api-version=7.0`,
|
|
91
114
|
patch
|
|
92
115
|
);
|
|
93
116
|
}
|
|
94
117
|
|
|
118
|
+
/**
|
|
119
|
+
* Get current tags from ADO work item
|
|
120
|
+
*
|
|
121
|
+
* @param workItemId - ADO work item ID
|
|
122
|
+
* @returns Array of current tags
|
|
123
|
+
*/
|
|
124
|
+
private async getCurrentTags(workItemId: number): Promise<string[]> {
|
|
125
|
+
try {
|
|
126
|
+
const response = await this.client.get(
|
|
127
|
+
`/wit/workitems/${workItemId}?api-version=7.0&$select=System.Tags`
|
|
128
|
+
);
|
|
129
|
+
|
|
130
|
+
const tagsString = response.data.fields?.['System.Tags'] || '';
|
|
131
|
+
if (!tagsString) return [];
|
|
132
|
+
|
|
133
|
+
return tagsString.split(';').map((tag: string) => tag.trim()).filter(Boolean);
|
|
134
|
+
} catch {
|
|
135
|
+
return [];
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
95
139
|
/**
|
|
96
140
|
* Post comment about status change to ADO work item
|
|
97
141
|
*
|
|
@@ -1230,3 +1230,9 @@
|
|
|
1230
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
1231
|
[Wed Nov 26 08:52:36 EST 2025] [GitHub] 🔗 GitHub sync hook fired
|
|
1232
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
|
|
1233
|
+
[Wed Nov 26 12:29:20 EST 2025] [GitHub] 🔗 GitHub sync hook fired
|
|
1234
|
+
[Wed Nov 26 12:29: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
|
|
1235
|
+
[Wed Nov 26 12:29:21 EST 2025] [GitHub] 🔗 GitHub sync hook fired
|
|
1236
|
+
[Wed Nov 26 12:29:21 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
|
|
1237
|
+
[Wed Nov 26 12:29:21 EST 2025] [GitHub] 🔗 GitHub sync hook fired
|
|
1238
|
+
[Wed Nov 26 12:29:21 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
|