specweave 0.17.16 → 0.18.0
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/CLAUDE.md +405 -2495
- package/README.md +92 -2
- package/dist/plugins/specweave/lib/hooks/sync-living-docs.d.ts.map +1 -1
- package/dist/plugins/specweave/lib/hooks/sync-living-docs.js +188 -36
- package/dist/plugins/specweave/lib/hooks/sync-living-docs.js.map +1 -1
- package/dist/plugins/specweave-ado/lib/ado-status-sync.d.ts +54 -0
- package/dist/plugins/specweave-ado/lib/ado-status-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-ado/lib/ado-status-sync.js +86 -0
- package/dist/plugins/specweave-ado/lib/ado-status-sync.js.map +1 -0
- package/dist/plugins/specweave-github/lib/duplicate-detector.d.ts +139 -0
- package/dist/plugins/specweave-github/lib/duplicate-detector.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/duplicate-detector.js +389 -0
- package/dist/plugins/specweave-github/lib/duplicate-detector.js.map +1 -0
- package/dist/plugins/specweave-github/lib/enhanced-github-sync.d.ts +26 -0
- package/dist/plugins/specweave-github/lib/enhanced-github-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/enhanced-github-sync.js +249 -0
- package/dist/plugins/specweave-github/lib/enhanced-github-sync.js.map +1 -0
- package/dist/plugins/specweave-github/lib/github-client.d.ts +1 -1
- package/dist/plugins/specweave-github/lib/github-client.d.ts.map +1 -1
- package/dist/plugins/specweave-github/lib/github-client.js +25 -13
- package/dist/plugins/specweave-github/lib/github-client.js.map +1 -1
- package/dist/plugins/specweave-github/lib/github-epic-sync.d.ts +83 -0
- package/dist/plugins/specweave-github/lib/github-epic-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/github-epic-sync.js +451 -0
- package/dist/plugins/specweave-github/lib/github-epic-sync.js.map +1 -0
- package/dist/plugins/specweave-github/lib/github-status-sync.d.ts +43 -0
- package/dist/plugins/specweave-github/lib/github-status-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/github-status-sync.js +82 -0
- package/dist/plugins/specweave-github/lib/github-status-sync.js.map +1 -0
- package/dist/plugins/specweave-github/lib/task-sync.d.ts +5 -0
- package/dist/plugins/specweave-github/lib/task-sync.d.ts.map +1 -1
- package/dist/plugins/specweave-github/lib/task-sync.js +38 -2
- package/dist/plugins/specweave-github/lib/task-sync.js.map +1 -1
- package/dist/plugins/specweave-jira/lib/jira-epic-sync.d.ts +66 -0
- package/dist/plugins/specweave-jira/lib/jira-epic-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-jira/lib/jira-epic-sync.js +274 -0
- package/dist/plugins/specweave-jira/lib/jira-epic-sync.js.map +1 -0
- package/dist/plugins/specweave-jira/lib/jira-status-sync.d.ts +56 -0
- package/dist/plugins/specweave-jira/lib/jira-status-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-jira/lib/jira-status-sync.js +93 -0
- package/dist/plugins/specweave-jira/lib/jira-status-sync.js.map +1 -0
- package/dist/src/cli/helpers/issue-tracker/index.d.ts.map +1 -1
- package/dist/src/cli/helpers/issue-tracker/index.js +48 -3
- package/dist/src/cli/helpers/issue-tracker/index.js.map +1 -1
- package/dist/src/core/living-docs/hierarchy-mapper.d.ts +142 -0
- package/dist/src/core/living-docs/hierarchy-mapper.d.ts.map +1 -0
- package/dist/src/core/living-docs/hierarchy-mapper.js +453 -0
- package/dist/src/core/living-docs/hierarchy-mapper.js.map +1 -0
- package/dist/src/core/living-docs/index.d.ts +10 -84
- package/dist/src/core/living-docs/index.d.ts.map +1 -1
- package/dist/src/core/living-docs/index.js +10 -164
- package/dist/src/core/living-docs/index.js.map +1 -1
- package/dist/src/core/living-docs/spec-distributor.d.ts +106 -0
- package/dist/src/core/living-docs/spec-distributor.d.ts.map +1 -0
- package/dist/src/core/living-docs/spec-distributor.js +823 -0
- package/dist/src/core/living-docs/spec-distributor.js.map +1 -0
- package/dist/src/core/living-docs/types.d.ts +201 -0
- package/dist/src/core/living-docs/types.d.ts.map +1 -0
- package/dist/src/core/living-docs/types.js +15 -0
- package/dist/src/core/living-docs/types.js.map +1 -0
- package/dist/src/core/logging/prompt-logger.d.ts +70 -0
- package/dist/src/core/logging/prompt-logger.d.ts.map +1 -0
- package/dist/src/core/logging/prompt-logger.js +247 -0
- package/dist/src/core/logging/prompt-logger.js.map +1 -0
- package/dist/src/core/status-line/status-line-manager.d.ts +15 -24
- package/dist/src/core/status-line/status-line-manager.d.ts.map +1 -1
- package/dist/src/core/status-line/status-line-manager.js +33 -70
- package/dist/src/core/status-line/status-line-manager.js.map +1 -1
- package/dist/src/core/status-line/types.d.ts +19 -31
- package/dist/src/core/status-line/types.d.ts.map +1 -1
- package/dist/src/core/status-line/types.js +5 -9
- package/dist/src/core/status-line/types.js.map +1 -1
- package/dist/src/core/sync/conflict-resolver.d.ts +66 -0
- package/dist/src/core/sync/conflict-resolver.d.ts.map +1 -0
- package/dist/src/core/sync/conflict-resolver.js +108 -0
- package/dist/src/core/sync/conflict-resolver.js.map +1 -0
- package/dist/src/core/sync/enhanced-content-builder.d.ts +77 -0
- package/dist/src/core/sync/enhanced-content-builder.d.ts.map +1 -0
- package/dist/src/core/sync/enhanced-content-builder.js +199 -0
- package/dist/src/core/sync/enhanced-content-builder.js.map +1 -0
- package/dist/src/core/sync/label-detector.d.ts +66 -0
- package/dist/src/core/sync/label-detector.d.ts.map +1 -0
- package/dist/src/core/sync/label-detector.js +211 -0
- package/dist/src/core/sync/label-detector.js.map +1 -0
- package/dist/src/core/sync/retry-logic.d.ts +64 -0
- package/dist/src/core/sync/retry-logic.d.ts.map +1 -0
- package/dist/src/core/sync/retry-logic.js +165 -0
- package/dist/src/core/sync/retry-logic.js.map +1 -0
- package/dist/src/core/sync/spec-increment-mapper.d.ts +100 -0
- package/dist/src/core/sync/spec-increment-mapper.d.ts.map +1 -0
- package/dist/src/core/sync/spec-increment-mapper.js +424 -0
- package/dist/src/core/sync/spec-increment-mapper.js.map +1 -0
- package/dist/src/core/sync/status-cache.d.ts +91 -0
- package/dist/src/core/sync/status-cache.d.ts.map +1 -0
- package/dist/src/core/sync/status-cache.js +140 -0
- package/dist/src/core/sync/status-cache.js.map +1 -0
- package/dist/src/core/sync/status-mapper.d.ts +69 -0
- package/dist/src/core/sync/status-mapper.d.ts.map +1 -0
- package/dist/src/core/sync/status-mapper.js +90 -0
- package/dist/src/core/sync/status-mapper.js.map +1 -0
- package/dist/src/core/sync/status-sync-engine.d.ts +162 -0
- package/dist/src/core/sync/status-sync-engine.d.ts.map +1 -0
- package/dist/src/core/sync/status-sync-engine.js +347 -0
- package/dist/src/core/sync/status-sync-engine.js.map +1 -0
- package/dist/src/core/sync/sync-event-logger.d.ts +99 -0
- package/dist/src/core/sync/sync-event-logger.d.ts.map +1 -0
- package/dist/src/core/sync/sync-event-logger.js +103 -0
- package/dist/src/core/sync/sync-event-logger.js.map +1 -0
- package/dist/src/core/sync/workflow-detector.d.ts +95 -0
- package/dist/src/core/sync/workflow-detector.d.ts.map +1 -0
- package/dist/src/core/sync/workflow-detector.js +175 -0
- package/dist/src/core/sync/workflow-detector.js.map +1 -0
- package/dist/src/core/types/config.d.ts.map +1 -1
- package/dist/src/core/types/config.js +31 -0
- package/dist/src/core/types/config.js.map +1 -1
- package/dist/src/utils/github-url.d.ts +53 -0
- package/dist/src/utils/github-url.d.ts.map +1 -0
- package/dist/src/utils/github-url.js +90 -0
- package/dist/src/utils/github-url.js.map +1 -0
- package/dist/src/utils/spec-parser.d.ts +145 -0
- package/dist/src/utils/spec-parser.d.ts.map +1 -0
- package/dist/src/utils/spec-parser.js +640 -0
- package/dist/src/utils/spec-parser.js.map +1 -0
- package/package.json +1 -1
- package/plugins/specweave/agents/pm/AGENT.md +1 -1
- package/plugins/specweave/agents/pm/templates/increment-spec.md +158 -0
- package/plugins/specweave/agents/pm/templates/living-docs-spec.md +113 -0
- package/plugins/specweave/commands/specweave-done.md +163 -0
- package/plugins/specweave/hooks/lib/update-status-line.sh +79 -111
- package/plugins/specweave/hooks/post-increment-planning.sh +107 -35
- package/plugins/specweave/lib/hooks/sync-living-docs.js +139 -34
- package/plugins/specweave/lib/hooks/sync-living-docs.ts +234 -38
- package/plugins/specweave/skills/SKILLS-INDEX.md +4 -24
- package/plugins/specweave/skills/increment-planner/SKILL.md +94 -0
- package/plugins/specweave/skills/increment-work-router/SKILL.md +466 -0
- package/plugins/specweave-ado/lib/ado-status-sync.js +80 -0
- package/plugins/specweave-ado/lib/ado-status-sync.ts +121 -0
- package/plugins/specweave-github/commands/specweave-github-cleanup-duplicates.md +205 -0
- package/plugins/specweave-github/commands/specweave-github-sync-epic.md +248 -0
- package/plugins/specweave-github/lib/duplicate-detector.js +370 -0
- package/plugins/specweave-github/lib/duplicate-detector.ts +525 -0
- package/plugins/specweave-github/lib/enhanced-github-sync.js +220 -0
- package/plugins/specweave-github/lib/enhanced-github-sync.ts +322 -0
- package/plugins/specweave-github/lib/github-client.js +21 -10
- package/plugins/specweave-github/lib/github-client.ts +27 -16
- package/plugins/specweave-github/lib/github-epic-sync.js +489 -0
- package/plugins/specweave-github/lib/github-epic-sync.ts +690 -0
- package/plugins/specweave-github/lib/github-status-sync.js +71 -0
- package/plugins/specweave-github/lib/github-status-sync.ts +107 -0
- package/plugins/specweave-github/lib/task-sync.js +33 -2
- package/plugins/specweave-github/lib/task-sync.ts +44 -2
- package/plugins/specweave-jira/commands/specweave-jira-sync-epic.md +267 -0
- package/plugins/specweave-jira/lib/enhanced-jira-sync.ts.disabled +222 -0
- package/plugins/specweave-jira/lib/jira-epic-sync.js +304 -0
- package/plugins/specweave-jira/lib/jira-epic-sync.ts +459 -0
- package/plugins/specweave-jira/lib/jira-status-sync.js +79 -0
- package/plugins/specweave-jira/lib/jira-status-sync.ts +139 -0
- package/src/templates/AGENTS.md.template +88 -1
- package/src/templates/CLAUDE.md.template +49 -0
- package/plugins/specweave/skills/increment-quality-judge/SKILL.md +0 -524
- package/plugins/specweave/skills/plugin-installer/SKILL.md +0 -353
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GitHub URL Utilities
|
|
3
|
+
*
|
|
4
|
+
* Utilities for converting local file paths to GitHub URLs.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Convert local file path to GitHub URL
|
|
8
|
+
*
|
|
9
|
+
* @param localPath - Local file path (can start with ./ or be absolute)
|
|
10
|
+
* @param options - GitHub repository options
|
|
11
|
+
* @returns Full GitHub URL
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```typescript
|
|
15
|
+
* toGitHubUrl('.specweave/docs/internal/specs/default/FS-001/FEATURE.md', {
|
|
16
|
+
* owner: 'anton-abyzov',
|
|
17
|
+
* repo: 'specweave',
|
|
18
|
+
* branch: 'develop'
|
|
19
|
+
* });
|
|
20
|
+
* // => 'https://github.com/anton-abyzov/specweave/blob/develop/.specweave/docs/internal/specs/default/FS-001/FEATURE.md'
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export function toGitHubUrl(localPath, options) {
|
|
24
|
+
const { owner, repo, branch = 'develop' } = options;
|
|
25
|
+
// Remove leading ./ but keep .specweave folder name
|
|
26
|
+
let cleanPath = localPath.replace(/^\.\//, '');
|
|
27
|
+
// If path doesn't start with .specweave, add it
|
|
28
|
+
if (!cleanPath.startsWith('.specweave')) {
|
|
29
|
+
cleanPath = `.specweave/${cleanPath}`;
|
|
30
|
+
}
|
|
31
|
+
return `https://github.com/${owner}/${repo}/blob/${branch}/${cleanPath}`;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Convert local directory path to GitHub tree URL
|
|
35
|
+
*
|
|
36
|
+
* @param localPath - Local directory path
|
|
37
|
+
* @param options - GitHub repository options
|
|
38
|
+
* @returns Full GitHub tree URL
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```typescript
|
|
42
|
+
* toGitHubTreeUrl('.specweave/increments/0001-feature', {
|
|
43
|
+
* owner: 'anton-abyzov',
|
|
44
|
+
* repo: 'specweave',
|
|
45
|
+
* branch: 'develop'
|
|
46
|
+
* });
|
|
47
|
+
* // => 'https://github.com/anton-abyzov/specweave/tree/develop/.specweave/increments/0001-feature'
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
export function toGitHubTreeUrl(localPath, options) {
|
|
51
|
+
const { owner, repo, branch = 'develop' } = options;
|
|
52
|
+
// Remove leading ./ but keep .specweave folder name
|
|
53
|
+
let cleanPath = localPath.replace(/^\.\//, '');
|
|
54
|
+
// If path doesn't start with .specweave, add it
|
|
55
|
+
if (!cleanPath.startsWith('.specweave')) {
|
|
56
|
+
cleanPath = `.specweave/${cleanPath}`;
|
|
57
|
+
}
|
|
58
|
+
return `https://github.com/${owner}/${repo}/tree/${branch}/${cleanPath}`;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Get GitHub URL options from git remote
|
|
62
|
+
*
|
|
63
|
+
* @returns GitHub URL options or null if not a GitHub repository
|
|
64
|
+
*/
|
|
65
|
+
export async function getGitHubOptions() {
|
|
66
|
+
try {
|
|
67
|
+
const { execFile } = await import('child_process');
|
|
68
|
+
const { promisify } = await import('util');
|
|
69
|
+
const execFileAsync = promisify(execFile);
|
|
70
|
+
// Get remote URL
|
|
71
|
+
const { stdout } = await execFileAsync('git', ['remote', 'get-url', 'origin']);
|
|
72
|
+
const remoteUrl = stdout.trim();
|
|
73
|
+
// Parse GitHub URL (supports both HTTPS and SSH)
|
|
74
|
+
// HTTPS: https://github.com/owner/repo.git
|
|
75
|
+
// SSH: git@github.com:owner/repo.git
|
|
76
|
+
const match = remoteUrl.match(/github\.com[:/]([^/]+)\/(.+?)(?:\.git)?$/);
|
|
77
|
+
if (!match) {
|
|
78
|
+
return null;
|
|
79
|
+
}
|
|
80
|
+
const [, owner, repo] = match;
|
|
81
|
+
// Get current branch
|
|
82
|
+
const { stdout: branchOutput } = await execFileAsync('git', ['branch', '--show-current']);
|
|
83
|
+
const branch = branchOutput.trim() || 'develop';
|
|
84
|
+
return { owner, repo, branch };
|
|
85
|
+
}
|
|
86
|
+
catch (error) {
|
|
87
|
+
return null;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=github-url.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"github-url.js","sourceRoot":"","sources":["../../../src/utils/github-url.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,WAAW,CAAC,SAAiB,EAAE,OAAyB;IACtE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,GAAG,OAAO,CAAC;IAEpD,oDAAoD;IACpD,IAAI,SAAS,GAAG,SAAS,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IAE/C,gDAAgD;IAChD,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;QACxC,SAAS,GAAG,cAAc,SAAS,EAAE,CAAC;IACxC,CAAC;IAED,OAAO,sBAAsB,KAAK,IAAI,IAAI,SAAS,MAAM,IAAI,SAAS,EAAE,CAAC;AAC3E,CAAC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,eAAe,CAAC,SAAiB,EAAE,OAAyB;IAC1E,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,GAAG,OAAO,CAAC;IAEpD,oDAAoD;IACpD,IAAI,SAAS,GAAG,SAAS,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IAE/C,gDAAgD;IAChD,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;QACxC,SAAS,GAAG,cAAc,SAAS,EAAE,CAAC;IACxC,CAAC;IAED,OAAO,sBAAsB,KAAK,IAAI,IAAI,SAAS,MAAM,IAAI,SAAS,EAAE,CAAC;AAC3E,CAAC;AAED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:
|
|
7
|
+
* - Extract user stories from markdown
|
|
8
|
+
* - Parse increment specs (temporary, implementation-focused)
|
|
9
|
+
* - Parse living docs specs (permanent, epic-level)
|
|
10
|
+
* - Generate links to related documentation (avoid duplication)
|
|
11
|
+
* - Merge user stories intelligently
|
|
12
|
+
*
|
|
13
|
+
* @author SpecWeave Team
|
|
14
|
+
* @version 2.0.0
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* User story with acceptance criteria
|
|
18
|
+
*/
|
|
19
|
+
export interface UserStory {
|
|
20
|
+
id: string;
|
|
21
|
+
title: string;
|
|
22
|
+
description: string;
|
|
23
|
+
acceptanceCriteria: AcceptanceCriterion[];
|
|
24
|
+
implementedIn?: string;
|
|
25
|
+
status: 'pending' | 'in-progress' | 'complete';
|
|
26
|
+
epic?: string;
|
|
27
|
+
priority?: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Acceptance criterion
|
|
31
|
+
*/
|
|
32
|
+
export interface AcceptanceCriterion {
|
|
33
|
+
id: string;
|
|
34
|
+
description: string;
|
|
35
|
+
priority?: string;
|
|
36
|
+
testable: boolean;
|
|
37
|
+
completed: boolean;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Implementation history entry
|
|
41
|
+
*/
|
|
42
|
+
export interface ImplementationHistoryEntry {
|
|
43
|
+
increment: string;
|
|
44
|
+
stories: string[];
|
|
45
|
+
status: 'complete' | 'in-progress' | 'planned';
|
|
46
|
+
date?: string;
|
|
47
|
+
notes?: string;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Related documentation links
|
|
51
|
+
*/
|
|
52
|
+
export interface RelatedDocs {
|
|
53
|
+
architecture: string[];
|
|
54
|
+
adrs: string[];
|
|
55
|
+
strategy: string[];
|
|
56
|
+
operations: string[];
|
|
57
|
+
delivery: string[];
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* External tool links
|
|
61
|
+
*/
|
|
62
|
+
export interface ExternalLinks {
|
|
63
|
+
github?: string;
|
|
64
|
+
jira?: string;
|
|
65
|
+
ado?: string;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Increment spec structure (temporary, implementation-focused)
|
|
69
|
+
*/
|
|
70
|
+
export interface IncrementSpec {
|
|
71
|
+
id: string;
|
|
72
|
+
title: string;
|
|
73
|
+
overview: string;
|
|
74
|
+
implementsSpec?: string;
|
|
75
|
+
userStories: UserStory[];
|
|
76
|
+
outOfScope?: string[];
|
|
77
|
+
architecture?: string;
|
|
78
|
+
adrs?: string[];
|
|
79
|
+
priority?: string;
|
|
80
|
+
status?: string;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Living docs spec structure (permanent, epic-level)
|
|
84
|
+
*/
|
|
85
|
+
export interface LivingDocsSpec {
|
|
86
|
+
id: string;
|
|
87
|
+
title: string;
|
|
88
|
+
featureArea: string;
|
|
89
|
+
overview: string;
|
|
90
|
+
userStories: UserStory[];
|
|
91
|
+
implementationHistory: ImplementationHistoryEntry[];
|
|
92
|
+
relatedDocs: RelatedDocs;
|
|
93
|
+
externalLinks: ExternalLinks;
|
|
94
|
+
priority?: string;
|
|
95
|
+
status?: string;
|
|
96
|
+
created?: string;
|
|
97
|
+
lastUpdated?: string;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Parse increment spec.md into structured data
|
|
101
|
+
*
|
|
102
|
+
* Extracts user stories, acceptance criteria, and metadata.
|
|
103
|
+
* Discards architecture details (those belong in architecture/ folder).
|
|
104
|
+
*/
|
|
105
|
+
export declare function parseIncrementSpec(filePath: string): Promise<IncrementSpec>;
|
|
106
|
+
/**
|
|
107
|
+
* Parse living docs spec.md into structured data
|
|
108
|
+
*/
|
|
109
|
+
export declare function parseLivingDocsSpec(filePath: string): Promise<LivingDocsSpec>;
|
|
110
|
+
/**
|
|
111
|
+
* Extract user stories from markdown content
|
|
112
|
+
*
|
|
113
|
+
* Supports formats:
|
|
114
|
+
* - **US-001**: Description
|
|
115
|
+
* - ### US-001: Title
|
|
116
|
+
* - **US1**: Description (legacy)
|
|
117
|
+
*/
|
|
118
|
+
export declare function extractUserStories(markdown: string): UserStory[];
|
|
119
|
+
/**
|
|
120
|
+
* Generate links to related documentation (avoid duplication)
|
|
121
|
+
*
|
|
122
|
+
* Analyzes increment spec to find architecture references and generates
|
|
123
|
+
* proper links instead of duplicating content.
|
|
124
|
+
*/
|
|
125
|
+
export declare function generateRelatedDocsLinks(spec: IncrementSpec, projectRoot?: string): RelatedDocs;
|
|
126
|
+
/**
|
|
127
|
+
* Extract spec ID from increment ID
|
|
128
|
+
*
|
|
129
|
+
* Examples:
|
|
130
|
+
* - 0001-core-framework → SPEC-001
|
|
131
|
+
* - 0002-core-enhancements → SPEC-002 (if part of same spec)
|
|
132
|
+
* - 0005-cross-platform-cli → SPEC-001 (if part of core spec)
|
|
133
|
+
*/
|
|
134
|
+
export declare function extractSpecId(incrementId: string): string;
|
|
135
|
+
/**
|
|
136
|
+
* Merge user stories from increment into living docs
|
|
137
|
+
*
|
|
138
|
+
* Adds new stories, updates existing stories with completion status.
|
|
139
|
+
*/
|
|
140
|
+
export declare function mergeUserStories(existingStories: UserStory[], newStories: UserStory[], incrementId: string): UserStory[];
|
|
141
|
+
/**
|
|
142
|
+
* Write living docs spec to file
|
|
143
|
+
*/
|
|
144
|
+
export declare function writeLivingDocsSpec(filePath: string, spec: LivingDocsSpec): Promise<void>;
|
|
145
|
+
//# sourceMappingURL=spec-parser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spec-parser.d.ts","sourceRoot":"","sources":["../../../src/utils/spec-parser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AASH;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,mBAAmB,EAAE,CAA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