specweave 1.0.301 → 1.0.304
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-github/lib/github-ac-comment-poster.d.ts.map +1 -1
- package/dist/plugins/specweave-github/lib/github-ac-comment-poster.js +44 -25
- package/dist/plugins/specweave-github/lib/github-ac-comment-poster.js.map +1 -1
- package/dist/plugins/specweave-github/lib/github-feature-sync-cli.js +6 -0
- package/dist/plugins/specweave-github/lib/github-feature-sync-cli.js.map +1 -1
- package/dist/plugins/specweave-github/lib/github-feature-sync.d.ts +36 -1
- package/dist/plugins/specweave-github/lib/github-feature-sync.d.ts.map +1 -1
- package/dist/plugins/specweave-github/lib/github-feature-sync.js +266 -5
- package/dist/plugins/specweave-github/lib/github-feature-sync.js.map +1 -1
- package/dist/plugins/specweave-github/lib/user-story-content-builder.d.ts +2 -1
- package/dist/plugins/specweave-github/lib/user-story-content-builder.d.ts.map +1 -1
- package/dist/plugins/specweave-github/lib/user-story-content-builder.js +6 -4
- package/dist/plugins/specweave-github/lib/user-story-content-builder.js.map +1 -1
- package/dist/plugins/specweave-github/lib/user-story-issue-builder.d.ts.map +1 -1
- package/dist/plugins/specweave-github/lib/user-story-issue-builder.js +37 -17
- package/dist/plugins/specweave-github/lib/user-story-issue-builder.js.map +1 -1
- package/dist/src/cli/commands/refresh-plugins.d.ts.map +1 -1
- package/dist/src/cli/commands/refresh-plugins.js +9 -0
- package/dist/src/cli/commands/refresh-plugins.js.map +1 -1
- package/dist/src/cli/commands/sync-progress.d.ts.map +1 -1
- package/dist/src/cli/commands/sync-progress.js +72 -2
- package/dist/src/cli/commands/sync-progress.js.map +1 -1
- package/dist/src/config/types.d.ts +2 -2
- package/dist/src/core/increment/increment-utils.d.ts +27 -4
- package/dist/src/core/increment/increment-utils.d.ts.map +1 -1
- package/dist/src/core/increment/increment-utils.js +44 -17
- package/dist/src/core/increment/increment-utils.js.map +1 -1
- package/dist/src/core/increment/template-creator.d.ts +26 -0
- package/dist/src/core/increment/template-creator.d.ts.map +1 -1
- package/dist/src/core/increment/template-creator.js +179 -20
- package/dist/src/core/increment/template-creator.js.map +1 -1
- package/dist/src/importers/import-to-increment.d.ts +111 -0
- package/dist/src/importers/import-to-increment.d.ts.map +1 -0
- package/dist/src/importers/import-to-increment.js +223 -0
- package/dist/src/importers/import-to-increment.js.map +1 -0
- package/dist/src/importers/increment-external-ref-detector.d.ts +78 -0
- package/dist/src/importers/increment-external-ref-detector.d.ts.map +1 -0
- package/dist/src/importers/increment-external-ref-detector.js +130 -0
- package/dist/src/importers/increment-external-ref-detector.js.map +1 -0
- package/dist/src/init/research/types.d.ts +1 -1
- package/dist/src/sync/external-issue-auto-creator.d.ts.map +1 -1
- package/dist/src/sync/external-issue-auto-creator.js +28 -1
- package/dist/src/sync/external-issue-auto-creator.js.map +1 -1
- package/dist/src/sync/sync-coordinator.d.ts +6 -0
- package/dist/src/sync/sync-coordinator.d.ts.map +1 -1
- package/dist/src/sync/sync-coordinator.js +42 -2
- package/dist/src/sync/sync-coordinator.js.map +1 -1
- package/package.json +1 -1
- package/plugins/specweave/hooks/lib/update-active-increment.sh +2 -2
- package/plugins/specweave/hooks/lib/update-status-line.sh +2 -2
- package/plugins/specweave/hooks/stop-auto-v5.sh +28 -8
- package/plugins/specweave/hooks/stop-sync.sh +10 -5
- package/plugins/specweave/hooks/universal/fail-fast-wrapper.sh +8 -4
- package/plugins/specweave/hooks/user-prompt-submit.sh +130 -112
- package/plugins/specweave/hooks/v2/handlers/github-sync-handler.sh +6 -3
- package/plugins/specweave/hooks/v2/handlers/project-bridge-handler.sh +4 -3
- package/plugins/specweave/skills/auto/SKILL.md +5 -3
- package/plugins/specweave/skills/done/SKILL.md +9 -3
- package/plugins/specweave/skills/import/SKILL.md +186 -0
- package/plugins/specweave/skills/increment/SKILL.md +30 -16
- package/plugins/specweave/skills/pm/SKILL.md +29 -2
- package/plugins/specweave/skills/pm/phases/00-deep-interview.md +12 -0
- package/plugins/specweave/skills/team-lead/SKILL.md +4 -2
- package/plugins/specweave/skills/team-merge/SKILL.md +2 -2
- package/plugins/specweave-github/lib/github-ac-comment-poster.js +31 -19
- package/plugins/specweave-github/lib/github-ac-comment-poster.ts +44 -27
- package/plugins/specweave-github/lib/github-feature-sync-cli.js +5 -0
- package/plugins/specweave-github/lib/github-feature-sync-cli.ts +7 -1
- package/plugins/specweave-github/lib/github-feature-sync.js +274 -6
- package/plugins/specweave-github/lib/github-feature-sync.ts +353 -5
- package/plugins/specweave-github/lib/user-story-content-builder.js +6 -4
- package/plugins/specweave-github/lib/user-story-content-builder.ts +6 -4
- package/plugins/specweave-github/lib/user-story-issue-builder.js +26 -11
- package/plugins/specweave-github/lib/user-story-issue-builder.ts +37 -19
|
@@ -67,7 +67,7 @@ export const TEMPLATE_MARKERS = {
|
|
|
67
67
|
* ```
|
|
68
68
|
*/
|
|
69
69
|
export async function createIncrementTemplates(options) {
|
|
70
|
-
const { incrementId, title, description, projectId, boardId, type = 'feature', priority = 'P1', testMode = 'test-after', coverageTarget = 80, projectRoot = process.cwd(), } = options;
|
|
70
|
+
const { incrementId, title, description, projectId, boardId, type = 'feature', priority = 'P1', testMode = 'test-after', coverageTarget = 80, projectRoot = process.cwd(), externalSource, } = options;
|
|
71
71
|
const incrementsDir = path.join(projectRoot, '.specweave', 'increments');
|
|
72
72
|
const incrementPath = path.join(incrementsDir, incrementId);
|
|
73
73
|
const createdFiles = [];
|
|
@@ -91,21 +91,46 @@ export async function createIncrementTemplates(options) {
|
|
|
91
91
|
epic_id: null,
|
|
92
92
|
externalLinks: {},
|
|
93
93
|
};
|
|
94
|
+
// Add external source tracking for imported issues (v1.0.272)
|
|
95
|
+
if (externalSource) {
|
|
96
|
+
metadata.origin = 'external';
|
|
97
|
+
metadata.source_platform = externalSource.platform;
|
|
98
|
+
metadata.external_ref = externalSource.externalId;
|
|
99
|
+
metadata.externalLinks = {
|
|
100
|
+
[externalSource.platform]: {
|
|
101
|
+
url: externalSource.externalUrl,
|
|
102
|
+
synced: new Date().toISOString(),
|
|
103
|
+
},
|
|
104
|
+
};
|
|
105
|
+
}
|
|
94
106
|
fs.writeFileSync(metadataPath, JSON.stringify(metadata, null, 2));
|
|
95
107
|
createdFiles.push('metadata.json');
|
|
96
|
-
// 2. Create spec.md
|
|
108
|
+
// 2. Create spec.md — pre-filled from external source or template
|
|
97
109
|
const specPath = path.join(incrementPath, 'spec.md');
|
|
98
|
-
const specContent =
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
110
|
+
const specContent = externalSource
|
|
111
|
+
? generateExternalSpecContent({
|
|
112
|
+
incrementId,
|
|
113
|
+
title,
|
|
114
|
+
description: externalSource.description || description,
|
|
115
|
+
projectId,
|
|
116
|
+
boardId,
|
|
117
|
+
type,
|
|
118
|
+
priority: externalSource.priority || priority,
|
|
119
|
+
testMode,
|
|
120
|
+
coverageTarget,
|
|
121
|
+
externalSource,
|
|
122
|
+
})
|
|
123
|
+
: generateSpecTemplate({
|
|
124
|
+
incrementId,
|
|
125
|
+
title,
|
|
126
|
+
description,
|
|
127
|
+
projectId,
|
|
128
|
+
boardId,
|
|
129
|
+
type,
|
|
130
|
+
priority,
|
|
131
|
+
testMode,
|
|
132
|
+
coverageTarget,
|
|
133
|
+
});
|
|
109
134
|
fs.writeFileSync(specPath, specContent);
|
|
110
135
|
createdFiles.push('spec.md');
|
|
111
136
|
// 3. Create plan.md TEMPLATE
|
|
@@ -113,20 +138,29 @@ export async function createIncrementTemplates(options) {
|
|
|
113
138
|
const planContent = generatePlanTemplate({ title });
|
|
114
139
|
fs.writeFileSync(planPath, planContent);
|
|
115
140
|
createdFiles.push('plan.md');
|
|
116
|
-
// 4. Create tasks.md
|
|
141
|
+
// 4. Create tasks.md — derived from external ACs or template
|
|
117
142
|
const tasksPath = path.join(incrementPath, 'tasks.md');
|
|
118
|
-
const tasksContent =
|
|
143
|
+
const tasksContent = externalSource?.acceptanceCriteria?.length
|
|
144
|
+
? generateExternalTasksContent({ title, testMode, acceptanceCriteria: externalSource.acceptanceCriteria })
|
|
145
|
+
: generateTasksTemplate({ title, testMode });
|
|
119
146
|
fs.writeFileSync(tasksPath, tasksContent);
|
|
120
147
|
createdFiles.push('tasks.md');
|
|
148
|
+
const nextSteps = externalSource
|
|
149
|
+
? [
|
|
150
|
+
`Imported from ${externalSource.platform}: ${externalSource.externalUrl}`,
|
|
151
|
+
`Review and refine spec: /sw:do ${incrementId}`,
|
|
152
|
+
`Start working: /sw:auto ${incrementId}`,
|
|
153
|
+
]
|
|
154
|
+
: [
|
|
155
|
+
`Complete product specification: Tell Claude "Complete the spec for increment ${incrementId}"`,
|
|
156
|
+
`Design architecture: Tell Claude "Design architecture for increment ${incrementId}"`,
|
|
157
|
+
`Generate tasks: Tell Claude "Create tasks for increment ${incrementId}"`,
|
|
158
|
+
];
|
|
121
159
|
return {
|
|
122
160
|
success: true,
|
|
123
161
|
incrementPath,
|
|
124
162
|
createdFiles,
|
|
125
|
-
nextSteps
|
|
126
|
-
`Complete product specification: Tell Claude "Complete the spec for increment ${incrementId}"`,
|
|
127
|
-
`Design architecture: Tell Claude "Design architecture for increment ${incrementId}"`,
|
|
128
|
-
`Generate tasks: Tell Claude "Create tasks for increment ${incrementId}"`,
|
|
129
|
-
],
|
|
163
|
+
nextSteps,
|
|
130
164
|
};
|
|
131
165
|
}
|
|
132
166
|
catch (error) {
|
|
@@ -471,6 +505,131 @@ This will activate the test-aware planner which will:
|
|
|
471
505
|
- [ ] [T051] Verify all acceptance criteria
|
|
472
506
|
`;
|
|
473
507
|
}
|
|
508
|
+
/**
|
|
509
|
+
* Generate spec.md content pre-filled from an external issue.
|
|
510
|
+
*
|
|
511
|
+
* Unlike the template version, this generates real content from the
|
|
512
|
+
* external issue's title, description, and acceptance criteria.
|
|
513
|
+
*
|
|
514
|
+
* @since 1.0.272
|
|
515
|
+
*/
|
|
516
|
+
function generateExternalSpecContent(options) {
|
|
517
|
+
const { incrementId, title, description, projectId, boardId, type, priority, testMode, coverageTarget, externalSource, } = options;
|
|
518
|
+
const date = new Date().toISOString().split('T')[0];
|
|
519
|
+
const boardLine = boardId ? `**Board**: ${boardId}\n` : '';
|
|
520
|
+
const platformLabel = externalSource.platform === 'github' ? 'GitHub'
|
|
521
|
+
: externalSource.platform === 'jira' ? 'JIRA'
|
|
522
|
+
: 'Azure DevOps';
|
|
523
|
+
// Build acceptance criteria from external source
|
|
524
|
+
const acs = externalSource.acceptanceCriteria ?? [];
|
|
525
|
+
const acLines = acs.length > 0
|
|
526
|
+
? acs.map((ac, i) => `- [ ] **AC-US1-${String(i + 1).padStart(2, '0')}**: ${ac}`).join('\n')
|
|
527
|
+
: `- [ ] **AC-US1-01**: [Review and define acceptance criteria from imported issue]`;
|
|
528
|
+
// Build labels section
|
|
529
|
+
const labelsLine = externalSource.labels?.length
|
|
530
|
+
? `\n**Labels**: ${externalSource.labels.join(', ')}`
|
|
531
|
+
: '';
|
|
532
|
+
return `---
|
|
533
|
+
increment: ${incrementId}
|
|
534
|
+
title: "${title}"
|
|
535
|
+
type: ${type}
|
|
536
|
+
priority: ${priority}
|
|
537
|
+
status: planned
|
|
538
|
+
created: ${date}
|
|
539
|
+
structure: user-stories
|
|
540
|
+
test_mode: ${testMode}
|
|
541
|
+
coverage_target: ${coverageTarget}
|
|
542
|
+
source_platform: ${externalSource.platform}
|
|
543
|
+
external_ref: "${externalSource.externalId}"
|
|
544
|
+
---
|
|
545
|
+
|
|
546
|
+
# Feature: ${title}
|
|
547
|
+
|
|
548
|
+
<!-- IMPORTED FROM ${platformLabel}: ${externalSource.externalUrl} -->
|
|
549
|
+
|
|
550
|
+
## Overview
|
|
551
|
+
|
|
552
|
+
${description || `Imported from ${platformLabel}. See original issue for full context.`}
|
|
553
|
+
|
|
554
|
+
## External Source
|
|
555
|
+
|
|
556
|
+
- **Platform**: ${platformLabel}
|
|
557
|
+
- **URL**: ${externalSource.externalUrl}
|
|
558
|
+
- **External ID**: ${externalSource.externalId}
|
|
559
|
+
- **Import Date**: ${date}
|
|
560
|
+
|
|
561
|
+
## User Stories
|
|
562
|
+
|
|
563
|
+
### US-001: ${title} (${priority})
|
|
564
|
+
**Project**: ${projectId}
|
|
565
|
+
${boardLine}
|
|
566
|
+
**As a** user
|
|
567
|
+
**I want** ${title.toLowerCase()}
|
|
568
|
+
**So that** the issue tracked in ${platformLabel} is resolved${labelsLine}
|
|
569
|
+
|
|
570
|
+
**Acceptance Criteria**:
|
|
571
|
+
${acLines}
|
|
572
|
+
|
|
573
|
+
## Functional Requirements
|
|
574
|
+
|
|
575
|
+
${description ? `### FR-001: ${title}\n${description}` : `### FR-001: [To be defined from imported issue]`}
|
|
576
|
+
|
|
577
|
+
## Success Criteria
|
|
578
|
+
|
|
579
|
+
- All acceptance criteria from the imported ${platformLabel} issue are met
|
|
580
|
+
- Original issue can be closed/resolved after verification
|
|
581
|
+
`;
|
|
582
|
+
}
|
|
583
|
+
/**
|
|
584
|
+
* Generate tasks.md content derived from external acceptance criteria.
|
|
585
|
+
*
|
|
586
|
+
* Each AC becomes a task with a BDD test skeleton.
|
|
587
|
+
*
|
|
588
|
+
* @since 1.0.272
|
|
589
|
+
*/
|
|
590
|
+
function generateExternalTasksContent(options) {
|
|
591
|
+
const { title, acceptanceCriteria } = options;
|
|
592
|
+
const taskEntries = acceptanceCriteria.map((ac, i) => {
|
|
593
|
+
const taskNum = String(i + 1).padStart(3, '0');
|
|
594
|
+
return `#### T-${taskNum}: ${ac}
|
|
595
|
+
|
|
596
|
+
**Description**: Implement and verify: ${ac}
|
|
597
|
+
|
|
598
|
+
**References**: AC-US1-${String(i + 1).padStart(2, '0')}
|
|
599
|
+
|
|
600
|
+
**Test Plan**:
|
|
601
|
+
- **Tests**:
|
|
602
|
+
- **TC-${taskNum}**: Verify ${ac}
|
|
603
|
+
- Given the system is set up
|
|
604
|
+
- When the feature is implemented
|
|
605
|
+
- Then ${ac}
|
|
606
|
+
|
|
607
|
+
**Status**: [ ] Not Started`;
|
|
608
|
+
}).join('\n\n');
|
|
609
|
+
return `# Tasks: ${title}
|
|
610
|
+
|
|
611
|
+
<!-- IMPORTED — Tasks derived from external acceptance criteria -->
|
|
612
|
+
|
|
613
|
+
## Task Notation
|
|
614
|
+
|
|
615
|
+
- \`[T###]\`: Task ID
|
|
616
|
+
- \`[P]\`: Parallelizable
|
|
617
|
+
- \`[ ]\`: Not started
|
|
618
|
+
- \`[x]\`: Completed
|
|
619
|
+
- Model hints: haiku (simple), opus (default)
|
|
620
|
+
|
|
621
|
+
## Phase 1: Core Implementation
|
|
622
|
+
|
|
623
|
+
### US-001: ${title} (P1)
|
|
624
|
+
|
|
625
|
+
${taskEntries}
|
|
626
|
+
|
|
627
|
+
## Phase 2: Verification
|
|
628
|
+
|
|
629
|
+
- [ ] [T${String(acceptanceCriteria.length + 1).padStart(3, '0')}] Run all tests
|
|
630
|
+
- [ ] [T${String(acceptanceCriteria.length + 2).padStart(3, '0')}] Verify all acceptance criteria
|
|
631
|
+
`;
|
|
632
|
+
}
|
|
474
633
|
export default {
|
|
475
634
|
createIncrementTemplates,
|
|
476
635
|
isTemplateFile,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template-creator.js","sourceRoot":"","sources":["../../../../src/core/increment/template-creator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAE9D;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,4CAA4C;IAC5C,WAAW,EAAE,eAAe;IAC5B,oCAAoC;IACpC,SAAS,EAAE,aAAa;IACxB,+BAA+B;IAC/B,IAAI,EAAE,QAAQ;IACd,kCAAkC;IAClC,OAAO,EAAE,WAAW;IACpB,mCAAmC;IACnC,SAAS,EAAE,gCAAgC;IAC3C,oCAAoC;IACpC,SAAS,EAAE,eAAe;IAC1B,sCAAsC;IACtC,WAAW,EAAE,yBAAyB;IACtC,qCAAqC;IACrC,mBAAmB,EAAE,sBAAsB;IAC3C,kCAAkC;IAClC,mBAAmB,EAAE,iBAAiB;IACtC,kCAAkC;IAClC,mBAAmB,EAAE,oBAAoB;CAC1C,CAAC;
|
|
1
|
+
{"version":3,"file":"template-creator.js","sourceRoot":"","sources":["../../../../src/core/increment/template-creator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAE9D;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,4CAA4C;IAC5C,WAAW,EAAE,eAAe;IAC5B,oCAAoC;IACpC,SAAS,EAAE,aAAa;IACxB,+BAA+B;IAC/B,IAAI,EAAE,QAAQ;IACd,kCAAkC;IAClC,OAAO,EAAE,WAAW;IACpB,mCAAmC;IACnC,SAAS,EAAE,gCAAgC;IAC3C,oCAAoC;IACpC,SAAS,EAAE,eAAe;IAC1B,sCAAsC;IACtC,WAAW,EAAE,yBAAyB;IACtC,qCAAqC;IACrC,mBAAmB,EAAE,sBAAsB;IAC3C,kCAAkC;IAClC,mBAAmB,EAAE,iBAAiB;IACtC,kCAAkC;IAClC,mBAAmB,EAAE,oBAAoB;CAC1C,CAAC;AAuEF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAC5C,OAA8B;IAE9B,MAAM,EACJ,WAAW,EACX,KAAK,EACL,WAAW,EACX,SAAS,EACT,OAAO,EACP,IAAI,GAAG,SAAS,EAChB,QAAQ,GAAG,IAA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AAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAEhB,OAAO,YAAY,KAAK;;;;;;;;;;;;;;cAcZ,KAAK;;EAEjB,WAAW;;;;UAIH,MAAM,CAAC,kBAAkB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC;UACtD,MAAM,CAAC,kBAAkB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC;CAC/D,CAAC;AACF,CAAC;AAED,eAAe;IACb,wBAAwB;IACxB,cAAc;IACd,sBAAsB;IACtB,gBAAgB;CACjB,CAAC"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Import-to-Increment Converter
|
|
3
|
+
*
|
|
4
|
+
* Bridges the gap between ExternalItem (imported from GitHub/JIRA/ADO)
|
|
5
|
+
* and SpecWeave increment creation with platform-specific suffixes.
|
|
6
|
+
*
|
|
7
|
+
* @module import-to-increment
|
|
8
|
+
* @since 1.0.272
|
|
9
|
+
*/
|
|
10
|
+
import { type Platform } from '../sync/types.js';
|
|
11
|
+
import type { ExternalItem } from './external-importer.js';
|
|
12
|
+
/**
|
|
13
|
+
* Result of a single increment import.
|
|
14
|
+
*/
|
|
15
|
+
export interface ImportedIncrement {
|
|
16
|
+
/** Full increment ID (e.g., "0271G-fix-login-bug") */
|
|
17
|
+
incrementId: string;
|
|
18
|
+
/** Absolute path to created increment directory */
|
|
19
|
+
incrementPath: string;
|
|
20
|
+
/** Canonical external reference */
|
|
21
|
+
externalRef: string;
|
|
22
|
+
/** Source platform */
|
|
23
|
+
platform: Platform;
|
|
24
|
+
/** Files created in the increment */
|
|
25
|
+
createdFiles: string[];
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Result of a skipped (duplicate) import.
|
|
29
|
+
*/
|
|
30
|
+
export interface SkippedImport {
|
|
31
|
+
/** The external item that was skipped */
|
|
32
|
+
item: ExternalItem;
|
|
33
|
+
/** Canonical external reference */
|
|
34
|
+
externalRef: string;
|
|
35
|
+
/** Existing increment ID that already has this ref */
|
|
36
|
+
existingIncrementId: string;
|
|
37
|
+
/** Reason for skipping */
|
|
38
|
+
reason: string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Result of a batch import operation.
|
|
42
|
+
*/
|
|
43
|
+
export interface BatchImportResult {
|
|
44
|
+
/** Successfully created increments */
|
|
45
|
+
created: ImportedIncrement[];
|
|
46
|
+
/** Skipped duplicate imports */
|
|
47
|
+
skipped: SkippedImport[];
|
|
48
|
+
/** Errors encountered */
|
|
49
|
+
errors: Array<{
|
|
50
|
+
item: ExternalItem;
|
|
51
|
+
error: string;
|
|
52
|
+
}>;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Options for the import-to-increment converter.
|
|
56
|
+
*/
|
|
57
|
+
export interface ImportToIncrementOptions {
|
|
58
|
+
/** Project root directory */
|
|
59
|
+
projectRoot: string;
|
|
60
|
+
/** Target project ID (for per-project collision prevention) */
|
|
61
|
+
projectId?: string;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Converts external items (from GitHub/JIRA/ADO) into SpecWeave increments
|
|
65
|
+
* with platform-specific suffixes (G/J/A) and duplicate prevention.
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```typescript
|
|
69
|
+
* const converter = new ImportToIncrementConverter({
|
|
70
|
+
* projectRoot: '/path/to/project',
|
|
71
|
+
* projectId: 'my-app',
|
|
72
|
+
* });
|
|
73
|
+
*
|
|
74
|
+
* const result = await converter.createIncrement(externalItem);
|
|
75
|
+
* console.log(result.incrementId); // "0271G-fix-login-bug"
|
|
76
|
+
* ```
|
|
77
|
+
*/
|
|
78
|
+
export declare class ImportToIncrementConverter {
|
|
79
|
+
private projectRoot;
|
|
80
|
+
private projectId?;
|
|
81
|
+
private refDetector;
|
|
82
|
+
constructor(options: ImportToIncrementOptions);
|
|
83
|
+
/**
|
|
84
|
+
* Check if an external item has already been imported as an increment.
|
|
85
|
+
*
|
|
86
|
+
* @param item - External item to check
|
|
87
|
+
* @returns Existing increment ID if found, null otherwise
|
|
88
|
+
*/
|
|
89
|
+
checkDuplicate(item: ExternalItem): string | null;
|
|
90
|
+
/**
|
|
91
|
+
* Create a single increment from an external item.
|
|
92
|
+
*
|
|
93
|
+
* @param item - External item to import
|
|
94
|
+
* @returns Created increment details
|
|
95
|
+
* @throws Error if item is a duplicate (use checkDuplicate first) or creation fails
|
|
96
|
+
*/
|
|
97
|
+
createIncrement(item: ExternalItem): Promise<ImportedIncrement>;
|
|
98
|
+
/**
|
|
99
|
+
* Batch create increments from multiple external items.
|
|
100
|
+
* Automatically deduplicates and reports skipped items.
|
|
101
|
+
*
|
|
102
|
+
* @param items - External items to import
|
|
103
|
+
* @returns Batch result with created, skipped, and error arrays
|
|
104
|
+
*/
|
|
105
|
+
createIncrements(items: ExternalItem[]): Promise<BatchImportResult>;
|
|
106
|
+
/**
|
|
107
|
+
* Build a canonical external_ref string from an ExternalItem.
|
|
108
|
+
*/
|
|
109
|
+
private buildExternalRef;
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=import-to-increment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"import-to-increment.d.ts","sourceRoot":"","sources":["../../../src/importers/import-to-increment.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,OAAO,EAAc,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE3D;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,sDAAsD;IACtD,WAAW,EAAE,MAAM,CAAC;IACpB,mDAAmD;IACnD,aAAa,EAAE,MAAM,CAAC;IACtB,mCAAmC;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,sBAAsB;IACtB,QAAQ,EAAE,QAAQ,C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
|
+
* Import-to-Increment Converter
|
|
3
|
+
*
|
|
4
|
+
* Bridges the gap between ExternalItem (imported from GitHub/JIRA/ADO)
|
|
5
|
+
* and SpecWeave increment creation with platform-specific suffixes.
|
|
6
|
+
*
|
|
7
|
+
* @module import-to-increment
|
|
8
|
+
* @since 1.0.272
|
|
9
|
+
*/
|
|
10
|
+
import { IncrementNumberManager } from '../core/increment/increment-utils.js';
|
|
11
|
+
import { createIncrementTemplates } from '../core/increment/template-creator.js';
|
|
12
|
+
import { IncrementExternalRefDetector, formatExternalRef } from './increment-external-ref-detector.js';
|
|
13
|
+
import { SUFFIX_MAP } from '../sync/types.js';
|
|
14
|
+
/**
|
|
15
|
+
* Converts external items (from GitHub/JIRA/ADO) into SpecWeave increments
|
|
16
|
+
* with platform-specific suffixes (G/J/A) and duplicate prevention.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```typescript
|
|
20
|
+
* const converter = new ImportToIncrementConverter({
|
|
21
|
+
* projectRoot: '/path/to/project',
|
|
22
|
+
* projectId: 'my-app',
|
|
23
|
+
* });
|
|
24
|
+
*
|
|
25
|
+
* const result = await converter.createIncrement(externalItem);
|
|
26
|
+
* console.log(result.incrementId); // "0271G-fix-login-bug"
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export class ImportToIncrementConverter {
|
|
30
|
+
constructor(options) {
|
|
31
|
+
this.projectRoot = options.projectRoot;
|
|
32
|
+
this.projectId = options.projectId;
|
|
33
|
+
this.refDetector = new IncrementExternalRefDetector(options.projectRoot);
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Check if an external item has already been imported as an increment.
|
|
37
|
+
*
|
|
38
|
+
* @param item - External item to check
|
|
39
|
+
* @returns Existing increment ID if found, null otherwise
|
|
40
|
+
*/
|
|
41
|
+
checkDuplicate(item) {
|
|
42
|
+
const externalRef = this.buildExternalRef(item);
|
|
43
|
+
const match = this.refDetector.hasRef(externalRef);
|
|
44
|
+
return match ? match.incrementId : null;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Create a single increment from an external item.
|
|
48
|
+
*
|
|
49
|
+
* @param item - External item to import
|
|
50
|
+
* @returns Created increment details
|
|
51
|
+
* @throws Error if item is a duplicate (use checkDuplicate first) or creation fails
|
|
52
|
+
*/
|
|
53
|
+
async createIncrement(item) {
|
|
54
|
+
const externalRef = this.buildExternalRef(item);
|
|
55
|
+
// Check for duplicates
|
|
56
|
+
const existing = this.refDetector.hasRef(externalRef);
|
|
57
|
+
if (existing) {
|
|
58
|
+
throw new Error(`Duplicate import: ${externalRef} already imported as ${existing.incrementId} (${existing.location})`);
|
|
59
|
+
}
|
|
60
|
+
// Generate increment ID with platform suffix
|
|
61
|
+
const slug = slugify(item.title);
|
|
62
|
+
const platformSuffix = SUFFIX_MAP[item.platform];
|
|
63
|
+
const incrementId = IncrementNumberManager.generateIncrementId(slug, {
|
|
64
|
+
platformSuffix,
|
|
65
|
+
projectRoot: this.projectRoot,
|
|
66
|
+
projectId: this.projectId,
|
|
67
|
+
});
|
|
68
|
+
// Build external source info for template creator
|
|
69
|
+
const externalSource = {
|
|
70
|
+
platform: item.platform,
|
|
71
|
+
externalId: externalRef,
|
|
72
|
+
externalUrl: item.url,
|
|
73
|
+
title: item.title,
|
|
74
|
+
description: item.description,
|
|
75
|
+
acceptanceCriteria: item.acceptanceCriteria,
|
|
76
|
+
labels: item.labels,
|
|
77
|
+
priority: item.priority,
|
|
78
|
+
status: item.status,
|
|
79
|
+
};
|
|
80
|
+
// Map external priority to SpecWeave priority
|
|
81
|
+
const priority = item.priority ?? 'P2';
|
|
82
|
+
// Map external type to SpecWeave type
|
|
83
|
+
const type = mapExternalType(item.type);
|
|
84
|
+
// Create increment via template creator
|
|
85
|
+
const result = await createIncrementTemplates({
|
|
86
|
+
incrementId,
|
|
87
|
+
title: item.title,
|
|
88
|
+
description: item.description,
|
|
89
|
+
projectId: this.projectId || 'default',
|
|
90
|
+
type,
|
|
91
|
+
priority,
|
|
92
|
+
projectRoot: this.projectRoot,
|
|
93
|
+
externalSource,
|
|
94
|
+
});
|
|
95
|
+
if (!result.success) {
|
|
96
|
+
throw new Error(`Failed to create increment ${incrementId}: ${result.error}`);
|
|
97
|
+
}
|
|
98
|
+
return {
|
|
99
|
+
incrementId,
|
|
100
|
+
incrementPath: result.incrementPath,
|
|
101
|
+
externalRef,
|
|
102
|
+
platform: item.platform,
|
|
103
|
+
createdFiles: result.createdFiles,
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Batch create increments from multiple external items.
|
|
108
|
+
* Automatically deduplicates and reports skipped items.
|
|
109
|
+
*
|
|
110
|
+
* @param items - External items to import
|
|
111
|
+
* @returns Batch result with created, skipped, and error arrays
|
|
112
|
+
*/
|
|
113
|
+
async createIncrements(items) {
|
|
114
|
+
const result = {
|
|
115
|
+
created: [],
|
|
116
|
+
skipped: [],
|
|
117
|
+
errors: [],
|
|
118
|
+
};
|
|
119
|
+
// Pre-check all refs at once for efficiency
|
|
120
|
+
const refs = items.map(item => this.buildExternalRef(item));
|
|
121
|
+
const existingRefs = this.refDetector.checkRefs(refs);
|
|
122
|
+
for (let i = 0; i < items.length; i++) {
|
|
123
|
+
const item = items[i];
|
|
124
|
+
const ref = refs[i];
|
|
125
|
+
// Check duplicate
|
|
126
|
+
const existing = existingRefs.get(ref);
|
|
127
|
+
if (existing) {
|
|
128
|
+
result.skipped.push({
|
|
129
|
+
item,
|
|
130
|
+
externalRef: ref,
|
|
131
|
+
existingIncrementId: existing.incrementId,
|
|
132
|
+
reason: `Already imported as ${existing.incrementId} (${existing.location})`,
|
|
133
|
+
});
|
|
134
|
+
continue;
|
|
135
|
+
}
|
|
136
|
+
// Try to create
|
|
137
|
+
try {
|
|
138
|
+
const imported = await this.createIncrement(item);
|
|
139
|
+
result.created.push(imported);
|
|
140
|
+
}
|
|
141
|
+
catch (error) {
|
|
142
|
+
result.errors.push({
|
|
143
|
+
item,
|
|
144
|
+
error: error instanceof Error ? error.message : String(error),
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
return result;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Build a canonical external_ref string from an ExternalItem.
|
|
152
|
+
*/
|
|
153
|
+
buildExternalRef(item) {
|
|
154
|
+
switch (item.platform) {
|
|
155
|
+
case 'github': {
|
|
156
|
+
// GitHub IDs are formatted as "github#{owner/repo}#{number}"
|
|
157
|
+
const repo = item.sourceRepo || extractGitHubRepo(item.id);
|
|
158
|
+
const issueNumber = extractGitHubNumber(item.id);
|
|
159
|
+
return formatExternalRef('github', repo, issueNumber);
|
|
160
|
+
}
|
|
161
|
+
case 'jira': {
|
|
162
|
+
// JIRA IDs are the issue key (e.g., "PROJ-123")
|
|
163
|
+
const project = item.jiraProjectKey || extractJiraProject(item.id);
|
|
164
|
+
return formatExternalRef('jira', project, item.id);
|
|
165
|
+
}
|
|
166
|
+
case 'ado': {
|
|
167
|
+
// ADO IDs are work item numbers
|
|
168
|
+
const project = item.adoProjectName || 'default';
|
|
169
|
+
return formatExternalRef('ado', project, item.id);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Convert a title to a kebab-case slug suitable for increment folder names.
|
|
176
|
+
* Limits to 50 chars to keep folder names reasonable.
|
|
177
|
+
*/
|
|
178
|
+
function slugify(title) {
|
|
179
|
+
return title
|
|
180
|
+
.toLowerCase()
|
|
181
|
+
.replace(/[^a-z0-9\s-]/g, '') // Remove special chars
|
|
182
|
+
.replace(/\s+/g, '-') // Spaces to hyphens
|
|
183
|
+
.replace(/-+/g, '-') // Collapse multiple hyphens
|
|
184
|
+
.replace(/^-|-$/g, '') // Trim leading/trailing hyphens
|
|
185
|
+
.slice(0, 50) // Limit length
|
|
186
|
+
.replace(/-$/, ''); // Clean trailing hyphen after slice
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Map external item type to SpecWeave increment type.
|
|
190
|
+
*/
|
|
191
|
+
function mapExternalType(externalType) {
|
|
192
|
+
switch (externalType) {
|
|
193
|
+
case 'bug': return 'bug';
|
|
194
|
+
case 'feature': return 'feature';
|
|
195
|
+
case 'epic': return 'feature';
|
|
196
|
+
case 'user-story': return 'feature';
|
|
197
|
+
case 'task': return 'feature';
|
|
198
|
+
default: return 'feature';
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Extract owner/repo from a GitHub external ID.
|
|
203
|
+
* Input format: "github#owner/repo#123" or just a number.
|
|
204
|
+
*/
|
|
205
|
+
function extractGitHubRepo(id) {
|
|
206
|
+
const match = id.match(/github#([^#]+)#/);
|
|
207
|
+
return match ? match[1] : 'unknown/unknown';
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Extract issue number from a GitHub external ID.
|
|
211
|
+
*/
|
|
212
|
+
function extractGitHubNumber(id) {
|
|
213
|
+
const match = id.match(/#(\d+)$/);
|
|
214
|
+
return match ? match[1] : id.replace(/\D/g, '') || '0';
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Extract project key from a JIRA issue ID (e.g., "PROJ-123" → "PROJ").
|
|
218
|
+
*/
|
|
219
|
+
function extractJiraProject(id) {
|
|
220
|
+
const match = id.match(/^([A-Z]+)-/);
|
|
221
|
+
return match ? match[1] : 'UNKNOWN';
|
|
222
|
+
}
|
|
223
|
+
//# sourceMappingURL=import-to-increment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"import-to-increment.js","sourceRoot":"","sources":["../../../src/importers/import-to-increment.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,wBAAwB,EAA2B,MAAM,uCAAuC,CAAC;AAC1G,OAAO,EAAE,4BAA4B,EAAE,iBAAiB,EAAE,MAAM,sCAA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