specweave 0.17.7 → 0.17.8

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 (89) hide show
  1. package/CLAUDE.md +365 -9
  2. package/dist/plugins/specweave/lib/hooks/sync-living-docs.d.ts +9 -4
  3. package/dist/plugins/specweave/lib/hooks/sync-living-docs.d.ts.map +1 -1
  4. package/dist/plugins/specweave/lib/hooks/sync-living-docs.js +82 -12
  5. package/dist/plugins/specweave/lib/hooks/sync-living-docs.js.map +1 -1
  6. package/dist/plugins/specweave-github/lib/github-spec-content-sync.d.ts +2 -2
  7. package/dist/plugins/specweave-github/lib/github-spec-content-sync.d.ts.map +1 -1
  8. package/dist/plugins/specweave-github/lib/github-spec-content-sync.js +69 -10
  9. package/dist/plugins/specweave-github/lib/github-spec-content-sync.js.map +1 -1
  10. package/dist/src/cli/commands/detect-project.d.ts +9 -0
  11. package/dist/src/cli/commands/detect-project.d.ts.map +1 -0
  12. package/dist/src/cli/commands/detect-project.js +85 -0
  13. package/dist/src/cli/commands/detect-project.js.map +1 -0
  14. package/dist/src/cli/commands/detect-specs.d.ts +9 -0
  15. package/dist/src/cli/commands/detect-specs.d.ts.map +1 -0
  16. package/dist/src/cli/commands/detect-specs.js +73 -0
  17. package/dist/src/cli/commands/detect-specs.js.map +1 -0
  18. package/dist/src/cli/commands/init.d.ts.map +1 -1
  19. package/dist/src/cli/commands/init.js +8 -15
  20. package/dist/src/cli/commands/init.js.map +1 -1
  21. package/dist/src/core/living-docs/content-classifier.d.ts +83 -0
  22. package/dist/src/core/living-docs/content-classifier.d.ts.map +1 -0
  23. package/dist/src/core/living-docs/content-classifier.js +393 -0
  24. package/dist/src/core/living-docs/content-classifier.js.map +1 -0
  25. package/dist/src/core/living-docs/content-distributor.d.ts +126 -0
  26. package/dist/src/core/living-docs/content-distributor.d.ts.map +1 -0
  27. package/dist/src/core/living-docs/content-distributor.js +339 -0
  28. package/dist/src/core/living-docs/content-distributor.js.map +1 -0
  29. package/dist/src/core/living-docs/content-parser.d.ts +140 -0
  30. package/dist/src/core/living-docs/content-parser.d.ts.map +1 -0
  31. package/dist/src/core/living-docs/content-parser.js +316 -0
  32. package/dist/src/core/living-docs/content-parser.js.map +1 -0
  33. package/dist/src/core/living-docs/cross-linker.d.ts +126 -0
  34. package/dist/src/core/living-docs/cross-linker.d.ts.map +1 -0
  35. package/dist/src/core/living-docs/cross-linker.js +374 -0
  36. package/dist/src/core/living-docs/cross-linker.js.map +1 -0
  37. package/dist/src/core/living-docs/index.d.ts +89 -0
  38. package/dist/src/core/living-docs/index.d.ts.map +1 -0
  39. package/dist/src/core/living-docs/index.js +169 -0
  40. package/dist/src/core/living-docs/index.js.map +1 -0
  41. package/dist/src/core/living-docs/project-detector.d.ts +103 -0
  42. package/dist/src/core/living-docs/project-detector.d.ts.map +1 -0
  43. package/dist/src/core/living-docs/project-detector.js +314 -0
  44. package/dist/src/core/living-docs/project-detector.js.map +1 -0
  45. package/dist/src/core/repo-structure/prompt-consolidator.d.ts +1 -1
  46. package/dist/src/core/repo-structure/prompt-consolidator.d.ts.map +1 -1
  47. package/dist/src/core/repo-structure/prompt-consolidator.js +51 -22
  48. package/dist/src/core/repo-structure/prompt-consolidator.js.map +1 -1
  49. package/dist/src/core/repo-structure/repo-structure-manager.d.ts +2 -0
  50. package/dist/src/core/repo-structure/repo-structure-manager.d.ts.map +1 -1
  51. package/dist/src/core/repo-structure/repo-structure-manager.js +126 -62
  52. package/dist/src/core/repo-structure/repo-structure-manager.js.map +1 -1
  53. package/dist/src/core/spec-content-sync.d.ts +6 -0
  54. package/dist/src/core/spec-content-sync.d.ts.map +1 -1
  55. package/dist/src/core/spec-content-sync.js +25 -7
  56. package/dist/src/core/spec-content-sync.js.map +1 -1
  57. package/dist/src/core/spec-detector.d.ts +54 -0
  58. package/dist/src/core/spec-detector.d.ts.map +1 -0
  59. package/dist/src/core/spec-detector.js +197 -0
  60. package/dist/src/core/spec-detector.js.map +1 -0
  61. package/dist/src/core/spec-identifier-detector.d.ts +49 -0
  62. package/dist/src/core/spec-identifier-detector.d.ts.map +1 -0
  63. package/dist/src/core/spec-identifier-detector.js +198 -0
  64. package/dist/src/core/spec-identifier-detector.js.map +1 -0
  65. package/dist/src/core/types/spec-identifier.d.ts +67 -0
  66. package/dist/src/core/types/spec-identifier.d.ts.map +1 -0
  67. package/dist/src/core/types/spec-identifier.js +23 -0
  68. package/dist/src/core/types/spec-identifier.js.map +1 -0
  69. package/dist/src/utils/docs-preview/config-generator.d.ts.map +1 -1
  70. package/dist/src/utils/docs-preview/config-generator.js +11 -0
  71. package/dist/src/utils/docs-preview/config-generator.js.map +1 -1
  72. package/package.json +1 -1
  73. package/plugins/specweave/.claude-plugin/plugin.json +1 -1
  74. package/plugins/specweave/lib/hooks/sync-living-docs.js +61 -5
  75. package/plugins/specweave/lib/hooks/sync-living-docs.ts +102 -13
  76. package/plugins/specweave-ado/.claude-plugin/plugin.json +1 -1
  77. package/plugins/specweave-docs-preview/commands/preview.md +11 -11
  78. package/plugins/specweave-github/.claude-plugin/plugin.json +1 -1
  79. package/plugins/specweave-github/hooks/post-task-completion.sh +59 -30
  80. package/plugins/specweave-github/lib/github-spec-content-sync.js +55 -6
  81. package/plugins/specweave-github/lib/github-spec-content-sync.ts +84 -12
  82. package/plugins/specweave-jira/.claude-plugin/plugin.json +1 -1
  83. package/plugins/specweave-mobile/.claude-plugin/plugin.json +1 -4
  84. package/plugins/specweave-release/.claude-plugin/plugin.json +3 -15
  85. package/src/templates/AGENTS.md.template +297 -0
  86. package/plugins/specweave/plugin.json +0 -22
  87. package/plugins/specweave-ado/plugin.json +0 -20
  88. package/plugins/specweave-github/plugin.json +0 -19
  89. package/plugins/specweave-jira/plugin.json +0 -20
@@ -0,0 +1,374 @@
1
+ /**
2
+ * Cross-Linker for Intelligent Living Docs Sync
3
+ *
4
+ * Generates cross-references between related documents for traceability.
5
+ *
6
+ * @module living-docs/cross-linker
7
+ */
8
+ import fs from 'fs-extra';
9
+ import path from 'path';
10
+ import { ContentCategory } from './content-classifier.js';
11
+ /**
12
+ * Link types
13
+ */
14
+ export var LinkType;
15
+ (function (LinkType) {
16
+ LinkType["Implements"] = "implements";
17
+ LinkType["DependsOn"] = "depends-on";
18
+ LinkType["References"] = "references";
19
+ LinkType["RelatedTo"] = "related-to";
20
+ LinkType["DefinedIn"] = "defined-in";
21
+ LinkType["TestsFor"] = "tests-for";
22
+ })(LinkType || (LinkType = {}));
23
+ /**
24
+ * Cross-Linker class
25
+ */
26
+ export class CrossLinker {
27
+ constructor(options = {}) {
28
+ this.options = {
29
+ basePath: options.basePath || path.join(process.cwd(), '.specweave', 'docs', 'internal'),
30
+ generateBacklinks: options.generateBacklinks ?? true,
31
+ updateExisting: options.updateExisting ?? true,
32
+ dryRun: options.dryRun ?? false,
33
+ };
34
+ this.links = [];
35
+ }
36
+ /**
37
+ * Generate cross-links for distributed files
38
+ */
39
+ async generateLinks(result) {
40
+ this.links = [];
41
+ // Group files by category
42
+ const byCategory = this.groupByCategory(result);
43
+ // Generate links between categories
44
+ await this.generateArchitectureLinks(byCategory);
45
+ await this.generateOperationsLinks(byCategory);
46
+ await this.generateDeliveryLinks(byCategory);
47
+ await this.generateStrategyLinks(byCategory);
48
+ // Generate backlinks if enabled
49
+ if (this.options.generateBacklinks) {
50
+ await this.generateBacklinks();
51
+ }
52
+ // Update documents with links
53
+ if (this.options.updateExisting && !this.options.dryRun) {
54
+ await this.updateDocuments();
55
+ }
56
+ return this.links;
57
+ }
58
+ /**
59
+ * Group files by category
60
+ */
61
+ groupByCategory(result) {
62
+ const groups = new Map();
63
+ const allFiles = [...result.created, ...result.updated];
64
+ for (const file of allFiles) {
65
+ if (!groups.has(file.category)) {
66
+ groups.set(file.category, []);
67
+ }
68
+ groups.get(file.category).push(file);
69
+ }
70
+ return groups;
71
+ }
72
+ /**
73
+ * Generate links from specs to architecture
74
+ */
75
+ async generateArchitectureLinks(groups) {
76
+ const specs = groups.get(ContentCategory.UserStory) || [];
77
+ const architecture = groups.get(ContentCategory.Architecture) || [];
78
+ const adrs = groups.get(ContentCategory.ADR) || [];
79
+ // Link specs to architecture docs
80
+ for (const spec of specs) {
81
+ for (const arch of architecture) {
82
+ if (await this.documentsRelated(spec.path, arch.path)) {
83
+ this.links.push({
84
+ source: spec.path,
85
+ target: arch.path,
86
+ type: LinkType.Implements,
87
+ description: 'User story implements architecture design',
88
+ });
89
+ }
90
+ }
91
+ // Link specs to ADRs
92
+ for (const adr of adrs) {
93
+ if (await this.documentsRelated(spec.path, adr.path)) {
94
+ this.links.push({
95
+ source: spec.path,
96
+ target: adr.path,
97
+ type: LinkType.References,
98
+ description: 'User story references architecture decision',
99
+ });
100
+ }
101
+ }
102
+ }
103
+ }
104
+ /**
105
+ * Generate links from operations to architecture
106
+ */
107
+ async generateOperationsLinks(groups) {
108
+ const operations = groups.get(ContentCategory.Operations) || [];
109
+ const architecture = groups.get(ContentCategory.Architecture) || [];
110
+ for (const ops of operations) {
111
+ for (const arch of architecture) {
112
+ if (await this.documentsRelated(ops.path, arch.path)) {
113
+ this.links.push({
114
+ source: ops.path,
115
+ target: arch.path,
116
+ type: LinkType.DependsOn,
117
+ description: 'Operational procedure depends on architecture',
118
+ });
119
+ }
120
+ }
121
+ }
122
+ }
123
+ /**
124
+ * Generate links from delivery to specs
125
+ */
126
+ async generateDeliveryLinks(groups) {
127
+ const delivery = groups.get(ContentCategory.Delivery) || [];
128
+ const specs = groups.get(ContentCategory.UserStory) || [];
129
+ for (const del of delivery) {
130
+ for (const spec of specs) {
131
+ if (await this.documentsRelated(del.path, spec.path)) {
132
+ this.links.push({
133
+ source: del.path,
134
+ target: spec.path,
135
+ type: LinkType.TestsFor,
136
+ description: 'Test strategy covers user story',
137
+ });
138
+ }
139
+ }
140
+ }
141
+ }
142
+ /**
143
+ * Generate links from strategy to specs
144
+ */
145
+ async generateStrategyLinks(groups) {
146
+ const strategy = groups.get(ContentCategory.Strategy) || [];
147
+ const specs = groups.get(ContentCategory.UserStory) || [];
148
+ for (const strat of strategy) {
149
+ for (const spec of specs) {
150
+ if (await this.documentsRelated(strat.path, spec.path)) {
151
+ this.links.push({
152
+ source: strat.path,
153
+ target: spec.path,
154
+ type: LinkType.DefinedIn,
155
+ description: 'Business requirement defined in strategy',
156
+ });
157
+ }
158
+ }
159
+ }
160
+ }
161
+ /**
162
+ * Check if two documents are related (heuristic)
163
+ */
164
+ async documentsRelated(path1, path2) {
165
+ try {
166
+ // Extract key terms from filenames
167
+ const name1 = path.basename(path1, '.md').toLowerCase();
168
+ const name2 = path.basename(path2, '.md').toLowerCase();
169
+ // Simple heuristic: if they share significant words
170
+ const words1 = name1.split(/[-_]/).filter((w) => w.length > 3);
171
+ const words2 = name2.split(/[-_]/).filter((w) => w.length > 3);
172
+ const sharedWords = words1.filter((w) => words2.includes(w));
173
+ // If 2+ shared words, consider related
174
+ if (sharedWords.length >= 2) {
175
+ return true;
176
+ }
177
+ // Check content for cross-references (more expensive)
178
+ if (fs.existsSync(path1) && fs.existsSync(path2)) {
179
+ const content1 = await fs.readFile(path1, 'utf-8');
180
+ const content2 = await fs.readFile(path2, 'utf-8');
181
+ // Check if path1 mentions path2's filename
182
+ const name2Clean = path.basename(path2, '.md');
183
+ if (content1.toLowerCase().includes(name2Clean.toLowerCase())) {
184
+ return true;
185
+ }
186
+ // Check if path2 mentions path1's filename
187
+ const name1Clean = path.basename(path1, '.md');
188
+ if (content2.toLowerCase().includes(name1Clean.toLowerCase())) {
189
+ return true;
190
+ }
191
+ }
192
+ return false;
193
+ }
194
+ catch (error) {
195
+ return false;
196
+ }
197
+ }
198
+ /**
199
+ * Generate backlinks (bidirectional)
200
+ */
201
+ async generateBacklinks() {
202
+ const backlinks = [];
203
+ for (const link of this.links) {
204
+ // Create reverse link
205
+ backlinks.push({
206
+ source: link.target,
207
+ target: link.source,
208
+ type: this.getReverseType(link.type),
209
+ description: this.getReverseDescription(link),
210
+ });
211
+ }
212
+ this.links.push(...backlinks);
213
+ }
214
+ /**
215
+ * Get reverse link type
216
+ */
217
+ getReverseType(type) {
218
+ const reverseMap = {
219
+ [LinkType.Implements]: LinkType.DefinedIn,
220
+ [LinkType.DependsOn]: LinkType.DefinedIn,
221
+ [LinkType.References]: LinkType.References,
222
+ [LinkType.RelatedTo]: LinkType.RelatedTo,
223
+ [LinkType.DefinedIn]: LinkType.Implements,
224
+ [LinkType.TestsFor]: LinkType.DefinedIn,
225
+ };
226
+ return reverseMap[type] || LinkType.RelatedTo;
227
+ }
228
+ /**
229
+ * Get reverse description
230
+ */
231
+ getReverseDescription(link) {
232
+ const name = path.basename(link.source, '.md').replace(/-/g, ' ');
233
+ return `Referenced by ${name}`;
234
+ }
235
+ /**
236
+ * Update documents with generated links
237
+ */
238
+ async updateDocuments() {
239
+ // Group links by source file
240
+ const linksBySource = new Map();
241
+ for (const link of this.links) {
242
+ if (!linksBySource.has(link.source)) {
243
+ linksBySource.set(link.source, []);
244
+ }
245
+ linksBySource.get(link.source).push(link);
246
+ }
247
+ // Update each source file
248
+ for (const [sourcePath, links] of linksBySource.entries()) {
249
+ await this.updateDocument(sourcePath, links);
250
+ }
251
+ }
252
+ /**
253
+ * Update a single document with links
254
+ */
255
+ async updateDocument(filePath, links) {
256
+ if (!fs.existsSync(filePath)) {
257
+ return;
258
+ }
259
+ try {
260
+ let content = await fs.readFile(filePath, 'utf-8');
261
+ // Check if links section already exists
262
+ const linksSection = '\n\n## Related Documents\n\n';
263
+ const hasLinksSection = content.includes('## Related Documents');
264
+ if (hasLinksSection) {
265
+ // Update existing section
266
+ const regex = /## Related Documents\n\n[\s\S]*?(?=\n## |\n---|\n\*\*Source\*\*|$)/;
267
+ content = content.replace(regex, linksSection + this.generateLinksMarkdown(links));
268
+ }
269
+ else {
270
+ // Add new section before footer
271
+ const footerIndex = content.lastIndexOf('\n---\n');
272
+ if (footerIndex !== -1) {
273
+ const before = content.substring(0, footerIndex);
274
+ const after = content.substring(footerIndex);
275
+ content = before + linksSection + this.generateLinksMarkdown(links) + '\n' + after;
276
+ }
277
+ else {
278
+ // No footer - append to end
279
+ content += linksSection + this.generateLinksMarkdown(links);
280
+ }
281
+ }
282
+ // Write updated content
283
+ await fs.writeFile(filePath, content, 'utf-8');
284
+ }
285
+ catch (error) {
286
+ console.warn(`Failed to update links in ${filePath}:`, error);
287
+ }
288
+ }
289
+ /**
290
+ * Generate markdown for links section
291
+ */
292
+ generateLinksMarkdown(links) {
293
+ let markdown = '';
294
+ // Group by type
295
+ const byType = new Map();
296
+ for (const link of links) {
297
+ if (!byType.has(link.type)) {
298
+ byType.set(link.type, []);
299
+ }
300
+ byType.get(link.type).push(link);
301
+ }
302
+ // Generate sections for each type
303
+ for (const [type, typeLinks] of byType.entries()) {
304
+ markdown += `### ${this.getLinkTypeTitle(type)}\n\n`;
305
+ for (const link of typeLinks) {
306
+ const relativePath = this.getRelativePath(link.source, link.target);
307
+ const title = path.basename(link.target, '.md').replace(/-/g, ' ');
308
+ markdown += `- [${title}](${relativePath})`;
309
+ if (link.description) {
310
+ markdown += ` - ${link.description}`;
311
+ }
312
+ markdown += '\n';
313
+ }
314
+ markdown += '\n';
315
+ }
316
+ return markdown;
317
+ }
318
+ /**
319
+ * Get link type display title
320
+ */
321
+ getLinkTypeTitle(type) {
322
+ const titles = {
323
+ [LinkType.Implements]: 'Implements',
324
+ [LinkType.DependsOn]: 'Depends On',
325
+ [LinkType.References]: 'References',
326
+ [LinkType.RelatedTo]: 'Related To',
327
+ [LinkType.DefinedIn]: 'Defined In',
328
+ [LinkType.TestsFor]: 'Tests For',
329
+ };
330
+ return titles[type] || type;
331
+ }
332
+ /**
333
+ * Get relative path from source to target
334
+ */
335
+ getRelativePath(source, target) {
336
+ const sourceDir = path.dirname(source);
337
+ return path.relative(sourceDir, target);
338
+ }
339
+ /**
340
+ * Get all links
341
+ */
342
+ getLinks() {
343
+ return this.links;
344
+ }
345
+ /**
346
+ * Get links for a specific file
347
+ */
348
+ getLinksFor(filePath) {
349
+ return this.links.filter((link) => link.source === filePath);
350
+ }
351
+ /**
352
+ * Get statistics
353
+ */
354
+ getStatistics() {
355
+ const stats = {
356
+ total: this.links.length,
357
+ byType: {},
358
+ bidirectional: 0,
359
+ };
360
+ for (const link of this.links) {
361
+ stats.byType[link.type] = (stats.byType[link.type] || 0) + 1;
362
+ }
363
+ // Count bidirectional (simplified)
364
+ stats.bidirectional = this.links.filter((link) => this.links.some((l) => l.source === link.target && l.target === link.source)).length / 2;
365
+ return stats;
366
+ }
367
+ }
368
+ /**
369
+ * Factory function to create linker
370
+ */
371
+ export function createCrossLinker(options) {
372
+ return new CrossLinker(options);
373
+ }
374
+ //# sourceMappingURL=cross-linker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cross-linker.js","sourceRoot":"","sources":["../../../../src/core/living-docs/cross-linker.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAY1D;;GAEG;AACH,MAAM,CAAN,IAAY,QAOX;AAPD,WAAY,QAAQ;IAClB,qCAAyB,CAAA;IACzB,oCAAwB,CAAA;IACxB,qCAAyB,CAAA;IACzB,oCAAwB,CAAA;IACxB,oCAAwB,CAAA;IACxB,kCAAsB,CAAA;AACxB,CAAC,EAPW,QAAQ,KAAR,QAAQ,QAOnB;AAYD;;GAEG;AACH,MAAM,OAAO,WAAW;IAItB,YAAY,UAAyB,EAAE;QACrC,IAAI,CAAC,OAAO,GAAG;YACb,QAAQ,EACN,OAAO,CAAC,QAAQ,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,UAAU,CAAC;YAChF,iBAAiB,EAAE,OAAO,CAAC,iBAAiB,IAAI,IAAI;YACpD,cAAc,EAAE,OAAO,CAAC,cAAc,IAAI,IAAI;YAC9C,MAAM,EAAE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AAM,KAAK,IAAI,CAAC,MAAM,CAAC,CAC7E,CAAC,MAAM,GAAG,CAAC,CAAC;QAEb,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AAED;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAAuB;IACvD,OAAO,IAAI,WAAW,CAAC,OAAO,CAAC,CAAC;AAClC,CAAC"}
@@ -0,0 +1,89 @@
1
+ /**
2
+ * Intelligent Living Docs Sync - Main Orchestrator
3
+ *
4
+ * Coordinates all components for intelligent spec distribution.
5
+ *
6
+ * @module living-docs
7
+ */
8
+ import { ContentParser, ParsedSpec, ParserOptions } from './content-parser.js';
9
+ import { ContentClassifier, ClassificationResult } from './content-classifier.js';
10
+ import { ProjectDetector, ProjectContext, DetectorOptions } from './project-detector.js';
11
+ import { ContentDistributor, DistributionResult, DistributorOptions } from './content-distributor.js';
12
+ import { CrossLinker, CrossLink, LinkerOptions } from './cross-linker.js';
13
+ /**
14
+ * Intelligent Sync options
15
+ */
16
+ export interface IntelligentSyncOptions {
17
+ parser?: ParserOptions;
18
+ detector?: DetectorOptions;
19
+ distributor?: DistributorOptions;
20
+ linker?: LinkerOptions;
21
+ dryRun?: boolean;
22
+ verbose?: boolean;
23
+ }
24
+ /**
25
+ * Complete sync result
26
+ */
27
+ export interface IntelligentSyncResult {
28
+ incrementId: string;
29
+ project: ProjectContext;
30
+ spec: ParsedSpec;
31
+ classifications: ClassificationResult[];
32
+ distribution: DistributionResult;
33
+ links: CrossLink[];
34
+ duration: number;
35
+ success: boolean;
36
+ errors: string[];
37
+ }
38
+ /**
39
+ * Intelligent Living Docs Sync Orchestrator
40
+ */
41
+ export declare class IntelligentLivingDocsSync {
42
+ private parser;
43
+ private classifier;
44
+ private detector;
45
+ private distributor;
46
+ private linker;
47
+ private options;
48
+ constructor(options?: IntelligentSyncOptions);
49
+ /**
50
+ * Sync increment spec to living docs
51
+ */
52
+ syncIncrement(incrementId: string): Promise<IntelligentSyncResult>;
53
+ /**
54
+ * Load and parse increment spec
55
+ */
56
+ private loadAndParseSpec;
57
+ /**
58
+ * Generate index files for categories
59
+ */
60
+ private generateIndexFiles;
61
+ /**
62
+ * Logging helper
63
+ */
64
+ private log;
65
+ /**
66
+ * Get component instances (for testing/advanced usage)
67
+ */
68
+ getComponents(): {
69
+ parser: ContentParser;
70
+ classifier: ContentClassifier;
71
+ detector: ProjectDetector;
72
+ distributor: ContentDistributor;
73
+ linker: CrossLinker;
74
+ };
75
+ }
76
+ /**
77
+ * Factory function to create sync orchestrator
78
+ */
79
+ export declare function createIntelligentSync(options?: IntelligentSyncOptions): IntelligentLivingDocsSync;
80
+ /**
81
+ * Convenience function to sync an increment
82
+ */
83
+ export declare function syncIncrement(incrementId: string, options?: IntelligentSyncOptions): Promise<IntelligentSyncResult>;
84
+ export * from './content-parser.js';
85
+ export * from './content-classifier.js';
86
+ export * from './project-detector.js';
87
+ export * from './content-distributor.js';
88
+ export * from './cross-linker.js';
89
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/living-docs/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,EACL,aAAa,EACb,UAAU,EAEV,aAAa,EACd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EAErB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,eAAe,EACf,cAAc,EAEd,eAAe,EAChB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAElB,kBAAkB,EACnB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,WAAW,EACX,SAAS,EAET,aAAa,EACd,MAAM,mBAAmB,CAAC;AAE3B;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,WAAW,CAAC,EAAE,kBAAkB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c,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,169 @@
1
+ /**
2
+ * Intelligent Living Docs Sync - Main Orchestrator
3
+ *
4
+ * Coordinates all components for intelligent spec distribution.
5
+ *
6
+ * @module living-docs
7
+ */
8
+ import fs from 'fs-extra';
9
+ import path from 'path';
10
+ import { createContentParser, } from './content-parser.js';
11
+ import { createContentClassifier, } from './content-classifier.js';
12
+ import { createProjectDetector, } from './project-detector.js';
13
+ import { createContentDistributor, } from './content-distributor.js';
14
+ import { createCrossLinker, } from './cross-linker.js';
15
+ /**
16
+ * Intelligent Living Docs Sync Orchestrator
17
+ */
18
+ export class IntelligentLivingDocsSync {
19
+ constructor(options = {}) {
20
+ this.options = options;
21
+ // Initialize components
22
+ this.parser = createContentParser(options.parser);
23
+ this.classifier = createContentClassifier();
24
+ this.detector = createProjectDetector(options.detector);
25
+ this.distributor = createContentDistributor(options.distributor);
26
+ this.linker = createCrossLinker(options.linker);
27
+ }
28
+ /**
29
+ * Sync increment spec to living docs
30
+ */
31
+ async syncIncrement(incrementId) {
32
+ const startTime = Date.now();
33
+ const errors = [];
34
+ try {
35
+ this.log(`🚀 Starting intelligent sync for increment: ${incrementId}`);
36
+ // 1. Load and parse spec
37
+ this.log('📖 Step 1: Parsing spec.md...');
38
+ const spec = await this.loadAndParseSpec(incrementId);
39
+ this.log(` ✅ Parsed ${spec.sections.length} top-level sections`);
40
+ // 2. Classify sections
41
+ this.log('🔍 Step 2: Classifying sections...');
42
+ const flatSections = this.parser.flattenSections(spec.sections);
43
+ const classifications = this.classifier.classifyAll(flatSections);
44
+ const stats = this.classifier.getStatistics(classifications);
45
+ this.log(` ✅ Classified ${classifications.length} sections`);
46
+ this.log(` Average confidence: ${(stats.averageConfidence * 100).toFixed(1)}%`);
47
+ this.log(` Low confidence (<60%): ${stats.lowConfidence}`);
48
+ // 3. Detect project
49
+ this.log('🎯 Step 3: Detecting project...');
50
+ const project = this.detector.detectProject(incrementId, spec);
51
+ this.log(` ✅ Project: ${project.name} (${(project.confidence * 100).toFixed(1)}% confidence)`);
52
+ if (project.reasoning.length > 0) {
53
+ this.log(` Reasoning: ${project.reasoning.join(', ')}`);
54
+ }
55
+ // 4. Ensure project structure exists
56
+ await this.detector.createProjectStructure(project.id);
57
+ // 5. Distribute content
58
+ this.log('📦 Step 4: Distributing content...');
59
+ const distribution = await this.distributor.distribute(incrementId, spec, classifications, project);
60
+ const distStats = this.distributor.getStatistics(distribution);
61
+ this.log(` ✅ Distribution complete:`);
62
+ this.log(` Created: ${distribution.summary.filesCreated} files`);
63
+ this.log(` Updated: ${distribution.summary.filesUpdated} files`);
64
+ this.log(` Skipped: ${distribution.summary.filesSkipped} files (unchanged)`);
65
+ this.log(` Errors: ${distribution.summary.errors}`);
66
+ this.log(` Total size: ${(distStats.totalSize / 1024).toFixed(1)} KB`);
67
+ if (distribution.errors.length > 0) {
68
+ errors.push(...distribution.errors.map((e) => e.error));
69
+ }
70
+ // 6. Generate cross-links
71
+ this.log('🔗 Step 5: Generating cross-links...');
72
+ const links = await this.linker.generateLinks(distribution);
73
+ const linkStats = this.linker.getStatistics();
74
+ this.log(` ✅ Generated ${links.length} cross-links`);
75
+ this.log(` Bidirectional: ${linkStats.bidirectional}`);
76
+ this.log(` By type: ${JSON.stringify(linkStats.byType)}`);
77
+ // 7. Generate index files
78
+ this.log('📑 Step 6: Generating index files...');
79
+ await this.generateIndexFiles(distribution, project.id);
80
+ this.log(` ✅ Index files generated`);
81
+ const duration = Date.now() - startTime;
82
+ this.log(`✅ Intelligent sync complete in ${duration}ms`);
83
+ return {
84
+ incrementId,
85
+ project,
86
+ spec,
87
+ classifications,
88
+ distribution,
89
+ links,
90
+ duration,
91
+ success: distribution.errors.length === 0,
92
+ errors,
93
+ };
94
+ }
95
+ catch (error) {
96
+ errors.push(String(error));
97
+ const duration = Date.now() - startTime;
98
+ this.log(`❌ Intelligent sync failed: ${error}`);
99
+ throw new Error(`Intelligent sync failed: ${error}`);
100
+ }
101
+ }
102
+ /**
103
+ * Load and parse increment spec
104
+ */
105
+ async loadAndParseSpec(incrementId) {
106
+ const specPath = path.join(process.cwd(), '.specweave', 'increments', incrementId, 'spec.md');
107
+ if (!fs.existsSync(specPath)) {
108
+ throw new Error(`Spec not found: ${specPath}`);
109
+ }
110
+ const markdown = await fs.readFile(specPath, 'utf-8');
111
+ return this.parser.parse(markdown, specPath);
112
+ }
113
+ /**
114
+ * Generate index files for categories
115
+ */
116
+ async generateIndexFiles(distribution, projectId) {
117
+ const allFiles = [...distribution.created, ...distribution.updated];
118
+ const byCategory = new Map();
119
+ for (const file of allFiles) {
120
+ if (!byCategory.has(file.category)) {
121
+ byCategory.set(file.category, []);
122
+ }
123
+ byCategory.get(file.category).push(file);
124
+ }
125
+ for (const [category, files] of byCategory.entries()) {
126
+ await this.distributor.generateIndex(category, projectId, files);
127
+ }
128
+ }
129
+ /**
130
+ * Logging helper
131
+ */
132
+ log(message) {
133
+ if (this.options.verbose) {
134
+ console.log(message);
135
+ }
136
+ }
137
+ /**
138
+ * Get component instances (for testing/advanced usage)
139
+ */
140
+ getComponents() {
141
+ return {
142
+ parser: this.parser,
143
+ classifier: this.classifier,
144
+ detector: this.detector,
145
+ distributor: this.distributor,
146
+ linker: this.linker,
147
+ };
148
+ }
149
+ }
150
+ /**
151
+ * Factory function to create sync orchestrator
152
+ */
153
+ export function createIntelligentSync(options) {
154
+ return new IntelligentLivingDocsSync(options);
155
+ }
156
+ /**
157
+ * Convenience function to sync an increment
158
+ */
159
+ export async function syncIncrement(incrementId, options) {
160
+ const sync = createIntelligentSync(options);
161
+ return sync.syncIncrement(incrementId);
162
+ }
163
+ // Re-export all types and classes
164
+ export * from './content-parser.js';
165
+ export * from './content-classifier.js';
166
+ export * from './project-detector.js';
167
+ export * from './content-distributor.js';
168
+ export * from './cross-linker.js';
169
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/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