@sudocode-ai/integration-speckit 0.1.14
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/id-generator.d.ts +149 -0
- package/dist/id-generator.d.ts.map +1 -0
- package/dist/id-generator.js +197 -0
- package/dist/id-generator.js.map +1 -0
- package/dist/index.d.ts +33 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1017 -0
- package/dist/index.js.map +1 -0
- package/dist/parser/index.d.ts +11 -0
- package/dist/parser/index.d.ts.map +1 -0
- package/dist/parser/index.js +16 -0
- package/dist/parser/index.js.map +1 -0
- package/dist/parser/markdown-utils.d.ts +138 -0
- package/dist/parser/markdown-utils.d.ts.map +1 -0
- package/dist/parser/markdown-utils.js +283 -0
- package/dist/parser/markdown-utils.js.map +1 -0
- package/dist/parser/plan-parser.d.ts +97 -0
- package/dist/parser/plan-parser.d.ts.map +1 -0
- package/dist/parser/plan-parser.js +286 -0
- package/dist/parser/plan-parser.js.map +1 -0
- package/dist/parser/spec-parser.d.ts +95 -0
- package/dist/parser/spec-parser.d.ts.map +1 -0
- package/dist/parser/spec-parser.js +250 -0
- package/dist/parser/spec-parser.js.map +1 -0
- package/dist/parser/supporting-docs.d.ts +119 -0
- package/dist/parser/supporting-docs.d.ts.map +1 -0
- package/dist/parser/supporting-docs.js +324 -0
- package/dist/parser/supporting-docs.js.map +1 -0
- package/dist/parser/tasks-parser.d.ts +171 -0
- package/dist/parser/tasks-parser.d.ts.map +1 -0
- package/dist/parser/tasks-parser.js +281 -0
- package/dist/parser/tasks-parser.js.map +1 -0
- package/dist/relationship-mapper.d.ts +165 -0
- package/dist/relationship-mapper.d.ts.map +1 -0
- package/dist/relationship-mapper.js +238 -0
- package/dist/relationship-mapper.js.map +1 -0
- package/dist/watcher.d.ts +137 -0
- package/dist/watcher.d.ts.map +1 -0
- package/dist/watcher.js +599 -0
- package/dist/watcher.js.map +1 -0
- package/dist/writer/index.d.ts +8 -0
- package/dist/writer/index.d.ts.map +1 -0
- package/dist/writer/index.js +10 -0
- package/dist/writer/index.js.map +1 -0
- package/dist/writer/spec-writer.d.ts +70 -0
- package/dist/writer/spec-writer.d.ts.map +1 -0
- package/dist/writer/spec-writer.js +261 -0
- package/dist/writer/spec-writer.js.map +1 -0
- package/dist/writer/tasks-writer.d.ts +47 -0
- package/dist/writer/tasks-writer.d.ts.map +1 -0
- package/dist/writer/tasks-writer.js +161 -0
- package/dist/writer/tasks-writer.js.map +1 -0
- package/package.json +42 -0
package/dist/watcher.js
ADDED
|
@@ -0,0 +1,599 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File watcher for Spec-Kit integration
|
|
3
|
+
*
|
|
4
|
+
* Watches the .specify directory for changes to spec files, plans, tasks,
|
|
5
|
+
* and supporting documents. Detects which entities were created, updated, or deleted.
|
|
6
|
+
*/
|
|
7
|
+
import chokidar from "chokidar";
|
|
8
|
+
import * as path from "path";
|
|
9
|
+
import { createHash } from "crypto";
|
|
10
|
+
import { existsSync, readFileSync, readdirSync } from "fs";
|
|
11
|
+
import { parseSpec } from "./parser/spec-parser.js";
|
|
12
|
+
import { parsePlan } from "./parser/plan-parser.js";
|
|
13
|
+
import { parseTasks } from "./parser/tasks-parser.js";
|
|
14
|
+
import { discoverSupportingDocs, } from "./parser/supporting-docs.js";
|
|
15
|
+
import { generateSpecId, generateTaskIssueId, parseSpecId, getFeatureSpecId, getFeaturePlanId, } from "./id-generator.js";
|
|
16
|
+
/**
|
|
17
|
+
* SpecKitWatcher monitors the .specify directory for changes
|
|
18
|
+
*
|
|
19
|
+
* Uses content hashing to detect actual changes vs just file touches.
|
|
20
|
+
* This prevents false positives from atomic writes and other file operations.
|
|
21
|
+
*/
|
|
22
|
+
export class SpecKitWatcher {
|
|
23
|
+
watcher = null;
|
|
24
|
+
entityHashes = new Map();
|
|
25
|
+
callback = null;
|
|
26
|
+
isProcessing = false;
|
|
27
|
+
isRelevantFile = null;
|
|
28
|
+
specifyPath;
|
|
29
|
+
specPrefix;
|
|
30
|
+
taskPrefix;
|
|
31
|
+
includeSupportingDocs;
|
|
32
|
+
includeConstitution;
|
|
33
|
+
constructor(options) {
|
|
34
|
+
this.specifyPath = options.specifyPath;
|
|
35
|
+
this.specPrefix = options.specPrefix || "sk";
|
|
36
|
+
this.taskPrefix = options.taskPrefix || "skt";
|
|
37
|
+
this.includeSupportingDocs = options.includeSupportingDocs !== false;
|
|
38
|
+
this.includeConstitution = options.includeConstitution !== false;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Update the cached hash for a specific entity after we wrote to it.
|
|
42
|
+
* This prevents the watcher from detecting our own writes as changes.
|
|
43
|
+
*/
|
|
44
|
+
updateEntityHash(entityId, hash) {
|
|
45
|
+
console.log(`[spec-kit-watcher] Updated hash for ${entityId} after outbound write`);
|
|
46
|
+
this.entityHashes.set(entityId, hash);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Remove an entity from the hash cache (after deletion)
|
|
50
|
+
*/
|
|
51
|
+
removeEntityHash(entityId) {
|
|
52
|
+
console.log(`[spec-kit-watcher] Removed hash for ${entityId} after outbound delete`);
|
|
53
|
+
this.entityHashes.delete(entityId);
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Start watching for changes
|
|
57
|
+
*
|
|
58
|
+
* @param callback - Function to call when changes are detected
|
|
59
|
+
*/
|
|
60
|
+
start(callback) {
|
|
61
|
+
if (this.watcher) {
|
|
62
|
+
console.warn("[spec-kit-watcher] Already watching");
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
this.callback = callback;
|
|
66
|
+
// Capture initial state
|
|
67
|
+
this.captureState();
|
|
68
|
+
// Watch paths - use directories instead of glob patterns for better compatibility
|
|
69
|
+
const watchPaths = [];
|
|
70
|
+
// Watch specs directory (chokidar will recursively watch subdirectories)
|
|
71
|
+
const specsDir = path.join(this.specifyPath, "specs");
|
|
72
|
+
if (existsSync(specsDir)) {
|
|
73
|
+
watchPaths.push(specsDir);
|
|
74
|
+
}
|
|
75
|
+
// Watch constitution
|
|
76
|
+
if (this.includeConstitution) {
|
|
77
|
+
const constitutionPath = path.join(this.specifyPath, "memory", "constitution.md");
|
|
78
|
+
if (existsSync(path.dirname(constitutionPath))) {
|
|
79
|
+
watchPaths.push(constitutionPath);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
if (watchPaths.length === 0) {
|
|
83
|
+
console.warn("[spec-kit-watcher] No paths to watch");
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
console.log(`[spec-kit-watcher] Watching paths:`, watchPaths);
|
|
87
|
+
// Only include .md, .json, .yaml, .yml files we care about
|
|
88
|
+
// Filter function to only process relevant files
|
|
89
|
+
const isRelevantFile = (filePath) => {
|
|
90
|
+
const ext = path.extname(filePath).toLowerCase();
|
|
91
|
+
if (ext === ".md")
|
|
92
|
+
return true;
|
|
93
|
+
if (this.includeSupportingDocs) {
|
|
94
|
+
if ([".json", ".yaml", ".yml"].includes(ext)) {
|
|
95
|
+
// Only include contract files
|
|
96
|
+
return filePath.includes("/contracts/");
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return false;
|
|
100
|
+
};
|
|
101
|
+
this.watcher = chokidar.watch(watchPaths, {
|
|
102
|
+
persistent: true,
|
|
103
|
+
ignoreInitial: true,
|
|
104
|
+
awaitWriteFinish: {
|
|
105
|
+
stabilityThreshold: 100, // Wait 100ms for writes to settle
|
|
106
|
+
pollInterval: 50,
|
|
107
|
+
},
|
|
108
|
+
// Note: Don't use 'ignored' patterns with chokidar v4 as they prevent directory scanning
|
|
109
|
+
// We filter files in handleFileChange/handleFileDeleted instead
|
|
110
|
+
});
|
|
111
|
+
// Store file filter for use in handlers
|
|
112
|
+
this.isRelevantFile = isRelevantFile;
|
|
113
|
+
this.watcher.on("ready", () => {
|
|
114
|
+
const watched = this.watcher?.getWatched() || {};
|
|
115
|
+
const dirs = Object.keys(watched);
|
|
116
|
+
console.log(`[spec-kit-watcher] ✓ Ready, watching ${dirs.length} directories in ${this.specifyPath}`);
|
|
117
|
+
});
|
|
118
|
+
this.watcher.on("change", (filePath) => this.handleFileChange(filePath));
|
|
119
|
+
this.watcher.on("add", (filePath) => this.handleFileChange(filePath));
|
|
120
|
+
this.watcher.on("unlink", (filePath) => this.handleFileDeleted(filePath));
|
|
121
|
+
this.watcher.on("error", (error) => {
|
|
122
|
+
console.error("[spec-kit-watcher] Error:", error);
|
|
123
|
+
});
|
|
124
|
+
console.log(`[spec-kit-watcher] Setting up watcher for ${this.specifyPath}...`);
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Stop watching for changes
|
|
128
|
+
*/
|
|
129
|
+
stop() {
|
|
130
|
+
if (this.watcher) {
|
|
131
|
+
this.watcher.close();
|
|
132
|
+
this.watcher = null;
|
|
133
|
+
this.callback = null;
|
|
134
|
+
console.log("[spec-kit-watcher] Stopped");
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Check if watcher is active
|
|
139
|
+
*/
|
|
140
|
+
isWatching() {
|
|
141
|
+
return this.watcher !== null;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Handle file change event
|
|
145
|
+
*
|
|
146
|
+
* Uses content hashing to detect actual changes - no explicit debouncing needed.
|
|
147
|
+
* Chokidar's awaitWriteFinish handles write settling, and hash comparison
|
|
148
|
+
* filters out false positives from atomic writes.
|
|
149
|
+
*/
|
|
150
|
+
handleFileChange(filePath) {
|
|
151
|
+
// Filter out non-relevant files
|
|
152
|
+
if (this.isRelevantFile && !this.isRelevantFile(filePath)) {
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
console.log(`[spec-kit-watcher] File changed: ${filePath}`);
|
|
156
|
+
this.processChanges();
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Handle file deleted event
|
|
160
|
+
*/
|
|
161
|
+
handleFileDeleted(filePath) {
|
|
162
|
+
// Filter out non-relevant files
|
|
163
|
+
if (this.isRelevantFile && !this.isRelevantFile(filePath)) {
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
console.log(`[spec-kit-watcher] File deleted: ${filePath}`);
|
|
167
|
+
this.processChanges();
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Process changes by comparing current state to cached hashes
|
|
171
|
+
*
|
|
172
|
+
* Uses isProcessing flag to prevent concurrent processing if multiple
|
|
173
|
+
* file events fire rapidly. Content hashing ensures only actual changes
|
|
174
|
+
* are reported.
|
|
175
|
+
*/
|
|
176
|
+
processChanges() {
|
|
177
|
+
// Prevent concurrent processing
|
|
178
|
+
if (this.isProcessing) {
|
|
179
|
+
console.log("[spec-kit-watcher] Already processing, skipping");
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
this.isProcessing = true;
|
|
183
|
+
try {
|
|
184
|
+
const changes = this.detectChanges();
|
|
185
|
+
if (changes.length > 0) {
|
|
186
|
+
console.log(`[spec-kit-watcher] Detected ${changes.length} entity change(s):`, changes.map((c) => `${c.change_type}:${c.entity_id}`).join(", "));
|
|
187
|
+
if (this.callback) {
|
|
188
|
+
this.callback(changes);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
else {
|
|
192
|
+
console.log("[spec-kit-watcher] No actual content changes (hashes match)");
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
catch (error) {
|
|
196
|
+
console.error("[spec-kit-watcher] Error processing changes:", error);
|
|
197
|
+
}
|
|
198
|
+
finally {
|
|
199
|
+
this.isProcessing = false;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Capture current state (entity hashes) for comparison
|
|
204
|
+
*/
|
|
205
|
+
captureState() {
|
|
206
|
+
console.log("[spec-kit-watcher] Capturing initial state...");
|
|
207
|
+
const entities = this.scanAllEntities();
|
|
208
|
+
this.entityHashes.clear();
|
|
209
|
+
for (const entity of entities) {
|
|
210
|
+
const hash = this.computeEntityHash(entity);
|
|
211
|
+
this.entityHashes.set(entity.id, hash);
|
|
212
|
+
}
|
|
213
|
+
console.log(`[spec-kit-watcher] Captured state with ${this.entityHashes.size} entities`);
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Detect changes by comparing current state to cached state
|
|
217
|
+
*/
|
|
218
|
+
detectChanges() {
|
|
219
|
+
const currentEntities = this.scanAllEntities();
|
|
220
|
+
const changes = [];
|
|
221
|
+
const now = new Date().toISOString();
|
|
222
|
+
const currentIds = new Set();
|
|
223
|
+
// Check for created and updated entities
|
|
224
|
+
for (const entity of currentEntities) {
|
|
225
|
+
currentIds.add(entity.id);
|
|
226
|
+
const newHash = this.computeEntityHash(entity);
|
|
227
|
+
const cachedHash = this.entityHashes.get(entity.id);
|
|
228
|
+
if (!cachedHash) {
|
|
229
|
+
// New entity
|
|
230
|
+
changes.push({
|
|
231
|
+
entity_id: entity.id,
|
|
232
|
+
entity_type: entity.type,
|
|
233
|
+
change_type: "created",
|
|
234
|
+
timestamp: entity.created_at || now,
|
|
235
|
+
data: entity,
|
|
236
|
+
});
|
|
237
|
+
this.entityHashes.set(entity.id, newHash);
|
|
238
|
+
}
|
|
239
|
+
else if (newHash !== cachedHash) {
|
|
240
|
+
// Updated entity
|
|
241
|
+
changes.push({
|
|
242
|
+
entity_id: entity.id,
|
|
243
|
+
entity_type: entity.type,
|
|
244
|
+
change_type: "updated",
|
|
245
|
+
timestamp: entity.updated_at || now,
|
|
246
|
+
data: entity,
|
|
247
|
+
});
|
|
248
|
+
this.entityHashes.set(entity.id, newHash);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
// Check for deleted entities
|
|
252
|
+
for (const [id] of this.entityHashes) {
|
|
253
|
+
if (!currentIds.has(id)) {
|
|
254
|
+
// Determine entity type from ID
|
|
255
|
+
const parsed = parseSpecId(id);
|
|
256
|
+
const entityType = parsed?.isTask ? "issue" : "spec";
|
|
257
|
+
changes.push({
|
|
258
|
+
entity_id: id,
|
|
259
|
+
entity_type: entityType,
|
|
260
|
+
change_type: "deleted",
|
|
261
|
+
timestamp: now,
|
|
262
|
+
});
|
|
263
|
+
this.entityHashes.delete(id);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
return changes;
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* Scan all entities in the .specify directory
|
|
270
|
+
*/
|
|
271
|
+
scanAllEntities() {
|
|
272
|
+
const entities = [];
|
|
273
|
+
// Scan specs directory
|
|
274
|
+
const specsDir = path.join(this.specifyPath, "specs");
|
|
275
|
+
if (existsSync(specsDir)) {
|
|
276
|
+
try {
|
|
277
|
+
const entries = readdirSync(specsDir, { withFileTypes: true });
|
|
278
|
+
for (const entry of entries) {
|
|
279
|
+
if (!entry.isDirectory())
|
|
280
|
+
continue;
|
|
281
|
+
// Feature directories match pattern like "001-auth", "002-payments"
|
|
282
|
+
const featureMatch = entry.name.match(/^(\d+)-/);
|
|
283
|
+
if (!featureMatch)
|
|
284
|
+
continue;
|
|
285
|
+
const featureNumber = featureMatch[1];
|
|
286
|
+
const featureDir = path.join(specsDir, entry.name);
|
|
287
|
+
// Parse spec.md
|
|
288
|
+
const specPath = path.join(featureDir, "spec.md");
|
|
289
|
+
if (existsSync(specPath)) {
|
|
290
|
+
const spec = parseSpec(specPath);
|
|
291
|
+
if (spec) {
|
|
292
|
+
const specId = generateSpecId(`specs/${entry.name}/spec.md`, this.specPrefix);
|
|
293
|
+
entities.push(this.specToExternalEntity(spec, specId, entry.name, "spec"));
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
// Parse plan.md
|
|
297
|
+
const planPath = path.join(featureDir, "plan.md");
|
|
298
|
+
if (existsSync(planPath)) {
|
|
299
|
+
const plan = parsePlan(planPath);
|
|
300
|
+
if (plan) {
|
|
301
|
+
const planId = generateSpecId(`specs/${entry.name}/plan.md`, this.specPrefix);
|
|
302
|
+
entities.push(this.planToExternalEntity(plan, planId, entry.name, featureNumber));
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
// Parse tasks.md - each task becomes an Issue
|
|
306
|
+
const tasksPath = path.join(featureDir, "tasks.md");
|
|
307
|
+
if (existsSync(tasksPath)) {
|
|
308
|
+
const tasksFile = parseTasks(tasksPath);
|
|
309
|
+
if (tasksFile) {
|
|
310
|
+
for (const task of tasksFile.tasks) {
|
|
311
|
+
const taskIssueId = generateTaskIssueId(featureNumber, task.taskId, this.taskPrefix);
|
|
312
|
+
entities.push(this.taskToExternalEntity(task, featureNumber, taskIssueId, tasksPath));
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
// Optionally include supporting docs
|
|
317
|
+
if (this.includeSupportingDocs) {
|
|
318
|
+
const docs = discoverSupportingDocs(featureDir);
|
|
319
|
+
if (docs.research) {
|
|
320
|
+
const docId = generateSpecId(`specs/${entry.name}/research.md`, this.specPrefix);
|
|
321
|
+
entities.push(this.supportingDocToExternalEntity(docs.research, docId, entry.name, featureNumber));
|
|
322
|
+
}
|
|
323
|
+
if (docs.dataModel) {
|
|
324
|
+
const docId = generateSpecId(`specs/${entry.name}/data-model.md`, this.specPrefix);
|
|
325
|
+
entities.push(this.supportingDocToExternalEntity(docs.dataModel, docId, entry.name, featureNumber));
|
|
326
|
+
}
|
|
327
|
+
for (const contract of docs.contracts) {
|
|
328
|
+
const docId = `${this.specPrefix}-${featureNumber}-contract-${contract.name}`;
|
|
329
|
+
entities.push(this.contractToExternalEntity(contract, docId, entry.name, featureNumber));
|
|
330
|
+
}
|
|
331
|
+
for (const other of docs.other) {
|
|
332
|
+
const docId = generateSpecId(`specs/${entry.name}/${other.fileName}.md`, this.specPrefix);
|
|
333
|
+
entities.push(this.supportingDocToExternalEntity(other, docId, entry.name, featureNumber));
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
catch (error) {
|
|
339
|
+
console.error("[spec-kit-watcher] Error scanning specs directory:", error);
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
// Include constitution.md if configured
|
|
343
|
+
if (this.includeConstitution) {
|
|
344
|
+
const constitutionPath = path.join(this.specifyPath, "memory", "constitution.md");
|
|
345
|
+
if (existsSync(constitutionPath)) {
|
|
346
|
+
const spec = parseSpec(constitutionPath);
|
|
347
|
+
if (spec) {
|
|
348
|
+
const constitutionId = `${this.specPrefix}-constitution`;
|
|
349
|
+
entities.push(this.specToExternalEntity(spec, constitutionId));
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
return entities;
|
|
354
|
+
}
|
|
355
|
+
/**
|
|
356
|
+
* Compute a hash for an entity to detect changes
|
|
357
|
+
*/
|
|
358
|
+
computeEntityHash(entity) {
|
|
359
|
+
const canonical = JSON.stringify({
|
|
360
|
+
id: entity.id,
|
|
361
|
+
type: entity.type,
|
|
362
|
+
title: entity.title,
|
|
363
|
+
description: entity.description,
|
|
364
|
+
status: entity.status,
|
|
365
|
+
priority: entity.priority,
|
|
366
|
+
});
|
|
367
|
+
return createHash("sha256").update(canonical).digest("hex");
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* Convert a parsed spec to ExternalEntity
|
|
371
|
+
*/
|
|
372
|
+
specToExternalEntity(spec, id, featureDirName, fileType = "spec") {
|
|
373
|
+
// Use directory-based title: "001-test-feature (spec)" instead of extracted title
|
|
374
|
+
const title = featureDirName
|
|
375
|
+
? `${featureDirName} (${fileType})`
|
|
376
|
+
: spec.title;
|
|
377
|
+
// Read raw file content (including frontmatter) instead of processed content
|
|
378
|
+
let rawContent = spec.content;
|
|
379
|
+
try {
|
|
380
|
+
rawContent = readFileSync(spec.filePath, "utf-8");
|
|
381
|
+
}
|
|
382
|
+
catch {
|
|
383
|
+
// Fall back to parsed content if file read fails
|
|
384
|
+
}
|
|
385
|
+
return {
|
|
386
|
+
id,
|
|
387
|
+
type: "spec",
|
|
388
|
+
title,
|
|
389
|
+
description: rawContent,
|
|
390
|
+
status: spec.status || undefined,
|
|
391
|
+
priority: this.statusToPriority(spec.status),
|
|
392
|
+
created_at: spec.createdAt?.toISOString(),
|
|
393
|
+
raw: {
|
|
394
|
+
rawTitle: spec.rawTitle,
|
|
395
|
+
featureBranch: spec.featureBranch,
|
|
396
|
+
metadata: Object.fromEntries(spec.metadata),
|
|
397
|
+
crossReferences: spec.crossReferences,
|
|
398
|
+
filePath: spec.filePath,
|
|
399
|
+
},
|
|
400
|
+
};
|
|
401
|
+
}
|
|
402
|
+
/**
|
|
403
|
+
* Convert a parsed plan to ExternalEntity
|
|
404
|
+
*/
|
|
405
|
+
planToExternalEntity(plan, id, featureDirName, featureNumber) {
|
|
406
|
+
// Use directory-based title: "001-test-feature (plan)" instead of extracted title
|
|
407
|
+
const title = featureDirName ? `${featureDirName} (plan)` : plan.title;
|
|
408
|
+
// Read raw file content (including frontmatter) instead of processed content
|
|
409
|
+
let rawContent = plan.content;
|
|
410
|
+
try {
|
|
411
|
+
rawContent = readFileSync(plan.filePath, "utf-8");
|
|
412
|
+
}
|
|
413
|
+
catch {
|
|
414
|
+
// Fall back to parsed content if file read fails
|
|
415
|
+
}
|
|
416
|
+
// Plan implements Spec relationship
|
|
417
|
+
const relationships = [];
|
|
418
|
+
if (featureNumber) {
|
|
419
|
+
const specId = getFeatureSpecId(featureNumber, this.specPrefix);
|
|
420
|
+
relationships.push({
|
|
421
|
+
targetId: specId,
|
|
422
|
+
targetType: "spec",
|
|
423
|
+
relationshipType: "implements",
|
|
424
|
+
});
|
|
425
|
+
}
|
|
426
|
+
return {
|
|
427
|
+
id,
|
|
428
|
+
type: "spec",
|
|
429
|
+
title,
|
|
430
|
+
description: rawContent,
|
|
431
|
+
status: plan.status || undefined,
|
|
432
|
+
priority: this.statusToPriority(plan.status),
|
|
433
|
+
created_at: plan.createdAt?.toISOString(),
|
|
434
|
+
relationships: relationships.length > 0 ? relationships : undefined,
|
|
435
|
+
raw: {
|
|
436
|
+
rawTitle: plan.rawTitle,
|
|
437
|
+
branch: plan.branch,
|
|
438
|
+
specReference: plan.specReference,
|
|
439
|
+
metadata: Object.fromEntries(plan.metadata),
|
|
440
|
+
crossReferences: plan.crossReferences,
|
|
441
|
+
filePath: plan.filePath,
|
|
442
|
+
},
|
|
443
|
+
};
|
|
444
|
+
}
|
|
445
|
+
/**
|
|
446
|
+
* Convert a parsed task to ExternalEntity (as issue)
|
|
447
|
+
*/
|
|
448
|
+
taskToExternalEntity(task, featureNumber, id, tasksFilePath) {
|
|
449
|
+
const status = task.completed ? "closed" : "open";
|
|
450
|
+
// Task implements Plan relationship
|
|
451
|
+
const planId = getFeaturePlanId(featureNumber, this.specPrefix);
|
|
452
|
+
const relationships = [
|
|
453
|
+
{
|
|
454
|
+
targetId: planId,
|
|
455
|
+
targetType: "spec",
|
|
456
|
+
relationshipType: "implements",
|
|
457
|
+
},
|
|
458
|
+
];
|
|
459
|
+
return {
|
|
460
|
+
id,
|
|
461
|
+
type: "issue",
|
|
462
|
+
title: `${task.taskId}: ${task.description}`,
|
|
463
|
+
description: task.description,
|
|
464
|
+
status,
|
|
465
|
+
priority: task.parallelizable ? 1 : 2,
|
|
466
|
+
relationships,
|
|
467
|
+
raw: {
|
|
468
|
+
taskId: task.taskId,
|
|
469
|
+
completed: task.completed,
|
|
470
|
+
parallelizable: task.parallelizable,
|
|
471
|
+
userStory: task.userStory,
|
|
472
|
+
phase: task.phase,
|
|
473
|
+
phaseName: task.phaseName,
|
|
474
|
+
lineNumber: task.lineNumber,
|
|
475
|
+
indentLevel: task.indentLevel,
|
|
476
|
+
rawLine: task.rawLine,
|
|
477
|
+
featureNumber,
|
|
478
|
+
tasksFilePath,
|
|
479
|
+
},
|
|
480
|
+
};
|
|
481
|
+
}
|
|
482
|
+
/**
|
|
483
|
+
* Convert a parsed supporting document to ExternalEntity
|
|
484
|
+
*/
|
|
485
|
+
supportingDocToExternalEntity(doc, id, featureDirName, featureNumber) {
|
|
486
|
+
// Use directory-based title: "001-test-feature (research)" instead of extracted title
|
|
487
|
+
const title = featureDirName
|
|
488
|
+
? `${featureDirName} (${doc.fileName})`
|
|
489
|
+
: doc.title;
|
|
490
|
+
// Read raw file content (including frontmatter) instead of processed content
|
|
491
|
+
let rawContent = doc.content;
|
|
492
|
+
try {
|
|
493
|
+
rawContent = readFileSync(doc.filePath, "utf-8");
|
|
494
|
+
}
|
|
495
|
+
catch {
|
|
496
|
+
// Fall back to parsed content if file read fails
|
|
497
|
+
}
|
|
498
|
+
// Supporting doc references Plan relationship
|
|
499
|
+
const relationships = [];
|
|
500
|
+
if (featureNumber) {
|
|
501
|
+
const planId = getFeaturePlanId(featureNumber, this.specPrefix);
|
|
502
|
+
relationships.push({
|
|
503
|
+
targetId: planId,
|
|
504
|
+
targetType: "spec",
|
|
505
|
+
relationshipType: "references",
|
|
506
|
+
});
|
|
507
|
+
}
|
|
508
|
+
return {
|
|
509
|
+
id,
|
|
510
|
+
type: "spec",
|
|
511
|
+
title,
|
|
512
|
+
description: rawContent,
|
|
513
|
+
relationships: relationships.length > 0 ? relationships : undefined,
|
|
514
|
+
raw: {
|
|
515
|
+
docType: doc.type,
|
|
516
|
+
metadata: Object.fromEntries(doc.metadata),
|
|
517
|
+
crossReferences: doc.crossReferences,
|
|
518
|
+
filePath: doc.filePath,
|
|
519
|
+
fileName: doc.fileName,
|
|
520
|
+
fileExtension: doc.fileExtension,
|
|
521
|
+
},
|
|
522
|
+
};
|
|
523
|
+
}
|
|
524
|
+
/**
|
|
525
|
+
* Convert a parsed contract to ExternalEntity
|
|
526
|
+
*/
|
|
527
|
+
contractToExternalEntity(contract, id, featureDirName, featureNumber) {
|
|
528
|
+
// Use directory-based title: "001-test-feature (contract-api)" instead of just contract name
|
|
529
|
+
const title = featureDirName
|
|
530
|
+
? `${featureDirName} (contract-${contract.name})`
|
|
531
|
+
: contract.name;
|
|
532
|
+
// Read raw file content for contracts
|
|
533
|
+
let rawContent = JSON.stringify(contract.data, null, 2);
|
|
534
|
+
try {
|
|
535
|
+
rawContent = readFileSync(contract.filePath, "utf-8");
|
|
536
|
+
}
|
|
537
|
+
catch {
|
|
538
|
+
// Fall back to stringified data if file read fails
|
|
539
|
+
}
|
|
540
|
+
// Contract references Plan relationship
|
|
541
|
+
const relationships = [];
|
|
542
|
+
if (featureNumber) {
|
|
543
|
+
const planId = getFeaturePlanId(featureNumber, this.specPrefix);
|
|
544
|
+
relationships.push({
|
|
545
|
+
targetId: planId,
|
|
546
|
+
targetType: "spec",
|
|
547
|
+
relationshipType: "references",
|
|
548
|
+
});
|
|
549
|
+
}
|
|
550
|
+
return {
|
|
551
|
+
id,
|
|
552
|
+
type: "spec",
|
|
553
|
+
title,
|
|
554
|
+
description: rawContent,
|
|
555
|
+
relationships: relationships.length > 0 ? relationships : undefined,
|
|
556
|
+
raw: {
|
|
557
|
+
contractName: contract.name,
|
|
558
|
+
format: contract.format,
|
|
559
|
+
data: contract.data,
|
|
560
|
+
filePath: contract.filePath,
|
|
561
|
+
},
|
|
562
|
+
};
|
|
563
|
+
}
|
|
564
|
+
/**
|
|
565
|
+
* Map spec-kit status to sudocode priority
|
|
566
|
+
*/
|
|
567
|
+
statusToPriority(status) {
|
|
568
|
+
if (!status)
|
|
569
|
+
return 2;
|
|
570
|
+
const statusLower = status.toLowerCase();
|
|
571
|
+
if (statusLower === "draft" || statusLower === "open") {
|
|
572
|
+
return 3;
|
|
573
|
+
}
|
|
574
|
+
if (statusLower === "in progress" ||
|
|
575
|
+
statusLower === "in_progress" ||
|
|
576
|
+
statusLower === "active") {
|
|
577
|
+
return 1;
|
|
578
|
+
}
|
|
579
|
+
if (statusLower === "complete" ||
|
|
580
|
+
statusLower === "completed" ||
|
|
581
|
+
statusLower === "done") {
|
|
582
|
+
return 2;
|
|
583
|
+
}
|
|
584
|
+
return 2;
|
|
585
|
+
}
|
|
586
|
+
/**
|
|
587
|
+
* Get current cached hashes (for testing/debugging)
|
|
588
|
+
*/
|
|
589
|
+
getEntityHashes() {
|
|
590
|
+
return new Map(this.entityHashes);
|
|
591
|
+
}
|
|
592
|
+
/**
|
|
593
|
+
* Force refresh of cached state (useful after external sync)
|
|
594
|
+
*/
|
|
595
|
+
refreshState() {
|
|
596
|
+
this.captureState();
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
//# sourceMappingURL=watcher.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"watcher.js","sourceRoot":"","sources":["../src/watcher.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,QAA4B,MAAM,UAAU,CAAC;AACpD,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,IAAI,CAAC;AAE3D,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAmB,MAAM,0BAA0B,CAAC;AACvE,OAAO,EACL,sBAAsB,GAGvB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,WAAW,EACX,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,mBAAmB,CAAC;AAuB3B;;;;;GAKG;AACH,MAAM,OAAO,cAAc;IACjB,OAAO,GAAqB,IAAI,CAAC;IACjC,YAAY,GAAwB,IAAI,GAAG,EAAE,CAAC;IAC9C,QAAQ,GAA0B,IAAI,CAAC;IACvC,YAAY,GAAG,KAAK,CAAC;IACrB,cAAc,GAA2C,IAAI,CAAC;IAErD,WAAW,CAAS;IACpB,UAAU,CAAS;IACnB,UAAU,CAAS;IACnB,qBAAqB,CAAU;IAC/B,mBAAmB,CAAU;IAE9C,YAAY,OAA8B;QACxC,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;QACvC,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,IAAI,CAAC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C7B,WAAW,KAAK,QAAQ,EACxB,CAAC;YACD,OAAO,CAAC,CAAC;QACX,CAAC;QACD,IACE,WAAW,KAAK,UAAU;YAC1B,WAAW,KAAK,WAAW;YAC3B,WAAW,KAAK,MAAM,EACtB,CAAC;YACD,OAAO,CAAC,CAAC;QACX,CAAC;QACD,OAAO,CAAC,CAAC;IACX,CAAC;IAED;;OAEG;IACH,eAAe;QACb,OAAO,IAAI,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACpC,CAAC;IAED;;OAEG;IACH,YAAY;QACV,IAAI,CAAC,YAAY,EAAE,CAAC;IACtB,CAAC;CACF"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Writers for Spec-Kit Integration
|
|
3
|
+
*
|
|
4
|
+
* Provides outbound sync capabilities (sudocode → spec-kit)
|
|
5
|
+
*/
|
|
6
|
+
export { updateTaskStatus, getTaskStatus, getAllTaskStatuses, type TaskUpdateResult, } from "./tasks-writer.js";
|
|
7
|
+
export { updateSpecContent, getSpecTitle, getSpecStatus, type SpecUpdates, type SpecUpdateResult, } from "./spec-writer.js";
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/writer/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EACL,gBAAgB,EAChB,aAAa,EACb,kBAAkB,EAClB,KAAK,gBAAgB,GACtB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACL,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACb,KAAK,WAAW,EAChB,KAAK,gBAAgB,GACtB,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Writers for Spec-Kit Integration
|
|
3
|
+
*
|
|
4
|
+
* Provides outbound sync capabilities (sudocode → spec-kit)
|
|
5
|
+
*/
|
|
6
|
+
// Tasks writer
|
|
7
|
+
export { updateTaskStatus, getTaskStatus, getAllTaskStatuses, } from "./tasks-writer.js";
|
|
8
|
+
// Spec writer
|
|
9
|
+
export { updateSpecContent, getSpecTitle, getSpecStatus, } from "./spec-writer.js";
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/writer/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAe;AACf,OAAO,EACL,gBAAgB,EAChB,aAAa,EACb,kBAAkB,GAEnB,MAAM,mBAAmB,CAAC;AAE3B,cAAc;AACd,OAAO,EACL,iBAAiB,EACjB,YAAY,EACZ,aAAa,GAGd,MAAM,kBAAkB,CAAC"}
|