speccrew 0.6.69 → 0.7.1
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/.speccrew/agents/speccrew-task-worker.md +1 -1
- package/.speccrew/agents/speccrew-team-leader.md +336 -189
- package/.speccrew/skills/speccrew-agentflow-manager/SKILL.md +161 -0
- package/.speccrew/skills/speccrew-agentflow-manager/workflow.agentflow.xml +347 -0
- package/.speccrew/skills/speccrew-deploy-build/SKILL.md +3 -56
- package/.speccrew/skills/speccrew-deploy-build/workflow.agentflow.xml +125 -0
- package/.speccrew/skills/speccrew-deploy-migrate/SKILL.md +3 -64
- package/.speccrew/skills/speccrew-deploy-migrate/workflow.agentflow.xml +135 -0
- package/.speccrew/skills/speccrew-deploy-smoke-test/SKILL.md +4 -156
- package/.speccrew/skills/speccrew-deploy-smoke-test/workflow.agentflow.xml +178 -0
- package/.speccrew/skills/speccrew-deploy-startup/SKILL.md +3 -135
- package/.speccrew/skills/speccrew-deploy-startup/workflow.agentflow.xml +223 -0
- package/.speccrew/skills/speccrew-dev-backend/SKILL.md +10 -2
- package/.speccrew/skills/speccrew-dev-backend/workflow.agentflow.xml +254 -0
- package/.speccrew/skills/speccrew-dev-desktop-electron/SKILL.md +10 -2
- package/.speccrew/skills/speccrew-dev-desktop-electron/workflow.agentflow.xml +259 -0
- package/.speccrew/skills/speccrew-dev-desktop-tauri/SKILL.md +10 -2
- package/.speccrew/skills/speccrew-dev-desktop-tauri/workflow.agentflow.xml +245 -0
- package/.speccrew/skills/speccrew-dev-frontend/SKILL.md +10 -2
- package/.speccrew/skills/speccrew-dev-frontend/workflow.agentflow.xml +262 -0
- package/.speccrew/skills/speccrew-dev-mobile/SKILL.md +10 -2
- package/.speccrew/skills/speccrew-dev-mobile/workflow.agentflow.xml +244 -0
- package/.speccrew/skills/speccrew-dev-review-backend/SKILL.md +10 -2
- package/.speccrew/skills/speccrew-dev-review-backend/workflow.agentflow.xml +251 -0
- package/.speccrew/skills/speccrew-dev-review-desktop/SKILL.md +10 -2
- package/.speccrew/skills/speccrew-dev-review-desktop/workflow.agentflow.xml +214 -0
- package/.speccrew/skills/speccrew-dev-review-frontend/SKILL.md +10 -2
- package/.speccrew/skills/speccrew-dev-review-frontend/workflow.agentflow.xml +213 -0
- package/.speccrew/skills/speccrew-dev-review-mobile/SKILL.md +10 -2
- package/.speccrew/skills/speccrew-dev-review-mobile/workflow.agentflow.xml +214 -0
- package/.speccrew/skills/speccrew-fd-api-contract/SKILL.md +7 -1
- package/.speccrew/skills/speccrew-fd-api-contract/workflow.agentflow.xml +222 -0
- package/.speccrew/skills/speccrew-fd-feature-analyze/SKILL.md +7 -1
- package/.speccrew/skills/speccrew-fd-feature-analyze/workflow.agentflow.xml +223 -0
- package/.speccrew/skills/speccrew-fd-feature-design/SKILL.md +7 -1
- package/.speccrew/skills/speccrew-fd-feature-design/workflow.agentflow.xml +322 -0
- package/.speccrew/skills/speccrew-get-timestamp/SKILL.md +3 -39
- package/.speccrew/skills/speccrew-get-timestamp/workflow.agentflow.xml +43 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/SKILL.md +57 -508
- package/.speccrew/skills/{speccrew-knowledge-bizs-api-analyze-xml/SKILL.md → speccrew-knowledge-bizs-api-analyze/workflow.agentflow.xml} +1 -154
- package/.speccrew/skills/speccrew-knowledge-bizs-api-graph/SKILL.md +73 -283
- package/.speccrew/skills/{speccrew-knowledge-bizs-api-graph-xml/SKILL.md → speccrew-knowledge-bizs-api-graph/workflow.agentflow.xml} +0 -298
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/SKILL.md +931 -801
- package/.speccrew/skills/{speccrew-knowledge-bizs-dispatch-xml/SKILL.md → speccrew-knowledge-bizs-dispatch/workflow.agentflow.xml} +42 -272
- package/.speccrew/skills/speccrew-knowledge-bizs-identify-entries/SKILL.md +263 -71
- package/.speccrew/skills/{speccrew-knowledge-bizs-identify-entries-xml/SKILL.md → speccrew-knowledge-bizs-identify-entries/workflow.agentflow.xml} +8 -184
- package/.speccrew/skills/speccrew-knowledge-bizs-init-features/SKILL.md +200 -181
- package/.speccrew/skills/{speccrew-knowledge-bizs-init-features-xml/SKILL.md → speccrew-knowledge-bizs-init-features/workflow.agentflow.xml} +7 -134
- package/.speccrew/skills/speccrew-knowledge-bizs-module-classify/SKILL.md +5 -89
- package/.speccrew/skills/speccrew-knowledge-bizs-module-classify/workflow.agentflow.xml +129 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/SKILL.md +454 -326
- package/.speccrew/skills/{speccrew-knowledge-bizs-ui-analyze-xml/SKILL.md → speccrew-knowledge-bizs-ui-analyze/workflow.agentflow.xml} +8 -128
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-graph/SKILL.md +302 -247
- package/.speccrew/skills/{speccrew-knowledge-bizs-ui-graph-xml/SKILL.md → speccrew-knowledge-bizs-ui-graph/workflow.agentflow.xml} +7 -199
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-style-extract/SKILL.md +267 -156
- package/.speccrew/skills/{speccrew-knowledge-bizs-ui-style-extract-xml/SKILL.md → speccrew-knowledge-bizs-ui-style-extract/workflow.agentflow.xml} +7 -151
- package/.speccrew/skills/speccrew-knowledge-graph-query/SKILL.md +3 -122
- package/.speccrew/skills/speccrew-knowledge-graph-query/workflow.agentflow.xml +106 -0
- package/.speccrew/skills/speccrew-knowledge-graph-write/SKILL.md +3 -80
- package/.speccrew/skills/speccrew-knowledge-graph-write/workflow.agentflow.xml +152 -0
- package/.speccrew/skills/speccrew-knowledge-module-summarize/SKILL.md +371 -265
- package/.speccrew/skills/{speccrew-knowledge-module-summarize-xml/SKILL.md → speccrew-knowledge-module-summarize/workflow.agentflow.xml} +7 -197
- package/.speccrew/skills/speccrew-knowledge-system-summarize/SKILL.md +45 -333
- package/.speccrew/skills/{speccrew-knowledge-system-summarize-xml/SKILL.md → speccrew-knowledge-system-summarize/workflow.agentflow.xml} +0 -177
- package/.speccrew/skills/speccrew-knowledge-techs-dispatch/SKILL.md +174 -727
- package/.speccrew/skills/{speccrew-knowledge-techs-dispatch-xml/SKILL.md → speccrew-knowledge-techs-dispatch/workflow.agentflow.xml} +10 -351
- package/.speccrew/skills/speccrew-knowledge-techs-generate/SKILL.md +20 -150
- package/.speccrew/skills/{speccrew-knowledge-techs-generate-xml/SKILL.md → speccrew-knowledge-techs-generate/workflow.agentflow.xml} +0 -169
- package/.speccrew/skills/speccrew-knowledge-techs-generate-conventions/SKILL.md +75 -587
- package/.speccrew/skills/{speccrew-knowledge-techs-generate-conventions-xml/SKILL.md → speccrew-knowledge-techs-generate-conventions/workflow.agentflow.xml} +0 -153
- package/.speccrew/skills/speccrew-knowledge-techs-generate-quality/SKILL.md +463 -297
- package/.speccrew/skills/{speccrew-knowledge-techs-generate-quality-xml/SKILL.md → speccrew-knowledge-techs-generate-quality/workflow.agentflow.xml} +0 -164
- package/.speccrew/skills/speccrew-knowledge-techs-generate-ui-style/SKILL.md +57 -292
- package/.speccrew/skills/{speccrew-knowledge-techs-generate-ui-style-xml/SKILL.md → speccrew-knowledge-techs-generate-ui-style/workflow.agentflow.xml} +2 -193
- package/.speccrew/skills/speccrew-knowledge-techs-index/SKILL.md +49 -335
- package/.speccrew/skills/{speccrew-knowledge-techs-index-xml/SKILL.md → speccrew-knowledge-techs-index/workflow.agentflow.xml} +0 -167
- package/.speccrew/skills/speccrew-knowledge-techs-init/SKILL.md +28 -109
- package/.speccrew/skills/{speccrew-knowledge-techs-init-xml/SKILL.md → speccrew-knowledge-techs-init/workflow.agentflow.xml} +0 -189
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/SKILL.md +3 -487
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/workflow.agentflow.xml +278 -0
- package/.speccrew/skills/speccrew-pm-knowledge-detector/SKILL.md +3 -71
- package/.speccrew/skills/speccrew-pm-knowledge-detector/workflow.agentflow.xml +108 -0
- package/.speccrew/skills/speccrew-pm-module-initializer/SKILL.md +3 -107
- package/.speccrew/skills/speccrew-pm-module-initializer/workflow.agentflow.xml +139 -0
- package/.speccrew/skills/speccrew-pm-module-matcher/SKILL.md +3 -115
- package/.speccrew/skills/speccrew-pm-module-matcher/workflow.agentflow.xml +146 -0
- package/.speccrew/skills/speccrew-pm-requirement-analysis/SKILL.md +3 -343
- package/.speccrew/skills/speccrew-pm-requirement-analysis/workflow.agentflow.xml +174 -0
- package/.speccrew/skills/speccrew-pm-requirement-assess/SKILL.md +3 -91
- package/.speccrew/skills/speccrew-pm-requirement-assess/workflow.agentflow.xml +173 -0
- package/.speccrew/skills/speccrew-pm-requirement-clarify/SKILL.md +3 -224
- package/.speccrew/skills/speccrew-pm-requirement-clarify/workflow.agentflow.xml +159 -0
- package/.speccrew/skills/speccrew-pm-requirement-model/SKILL.md +3 -275
- package/.speccrew/skills/speccrew-pm-requirement-model/workflow.agentflow.xml +210 -0
- package/.speccrew/skills/speccrew-pm-requirement-simple/SKILL.md +3 -76
- package/.speccrew/skills/speccrew-pm-requirement-simple/workflow.agentflow.xml +120 -0
- package/.speccrew/skills/speccrew-pm-sub-prd-generate/SKILL.md +7 -1
- package/.speccrew/skills/speccrew-pm-sub-prd-generate/workflow.agentflow.xml +218 -0
- package/.speccrew/skills/speccrew-sd-backend/SKILL.md +7 -1
- package/.speccrew/skills/speccrew-sd-backend/workflow.agentflow.xml +264 -0
- package/.speccrew/skills/speccrew-sd-desktop/SKILL.md +7 -1
- package/.speccrew/skills/speccrew-sd-desktop/workflow.agentflow.xml +288 -0
- package/.speccrew/skills/speccrew-sd-framework-evaluate/SKILL.md +7 -1
- package/.speccrew/skills/speccrew-sd-framework-evaluate/workflow.agentflow.xml +235 -0
- package/.speccrew/skills/speccrew-sd-frontend/SKILL.md +7 -1
- package/.speccrew/skills/speccrew-sd-frontend/workflow.agentflow.xml +299 -0
- package/.speccrew/skills/speccrew-sd-mobile/SKILL.md +7 -1
- package/.speccrew/skills/speccrew-sd-mobile/workflow.agentflow.xml +301 -0
- package/.speccrew/skills/speccrew-test-case-design/SKILL.md +165 -284
- package/.speccrew/skills/speccrew-test-case-design/workflow.agentflow.xml +210 -0
- package/.speccrew/skills/speccrew-test-code-gen/SKILL.md +204 -324
- package/.speccrew/skills/speccrew-test-code-gen/workflow.agentflow.xml +265 -0
- package/.speccrew/skills/speccrew-test-reporter/SKILL.md +205 -184
- package/.speccrew/skills/speccrew-test-reporter/workflow.agentflow.xml +284 -0
- package/.speccrew/skills/speccrew-test-runner/SKILL.md +242 -241
- package/.speccrew/skills/speccrew-test-runner/workflow.agentflow.xml +314 -0
- package/bin/cli.js +8 -1
- package/lib/commands/init.js +11 -3
- package/lib/commands/update.js +11 -3
- package/lib/commands/validate.js +565 -0
- package/lib/utils.js +43 -0
- package/package.json +1 -1
- package/workspace-template/docs/rules/{xml-workflow-spec.md → agentflow-spec.md} +5 -5
- package/workspace-template/scripts/validate-agentflow.js +637 -0
- package/.speccrew/agents/speccrew-team-leader-xml.md +0 -480
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/STATUS-FORMATS.md +0 -99
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/batch-orchestrator.js +0 -176
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/get-next-batch.js +0 -150
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/get-pending-features.js +0 -106
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/mark-stale.js +0 -249
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/merge-features.js +0 -300
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/process-batch-results.js +0 -915
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/update-feature-status.js +0 -226
- package/.speccrew/skills/speccrew-knowledge-bizs-init-features/examples/features.json +0 -34
- package/.speccrew/skills/speccrew-knowledge-bizs-init-features/scripts/generate-inventory.js +0 -1087
- package/.speccrew/skills/speccrew-knowledge-bizs-init-features/scripts/test-inventory.js +0 -26
- package/.speccrew/skills/speccrew-knowledge-techs-dispatch/STATUS-FORMATS.md +0 -550
|
@@ -1,226 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Update the status of a feature in a features-*.json file.
|
|
5
|
-
*
|
|
6
|
-
* Updates the analyzed status, timestamps, and notes for a specific feature
|
|
7
|
-
* within a features-*.json file. Matches by fileName and sourcePath.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
const fs = require('fs');
|
|
11
|
-
const path = require('path');
|
|
12
|
-
|
|
13
|
-
// Parse command line arguments
|
|
14
|
-
function parseArgs() {
|
|
15
|
-
const args = process.argv.slice(2);
|
|
16
|
-
const result = {
|
|
17
|
-
sourceFile: null,
|
|
18
|
-
fileName: null,
|
|
19
|
-
featureSourcePath: null,
|
|
20
|
-
analyzed: null,
|
|
21
|
-
setStarted: false,
|
|
22
|
-
setCompleted: false,
|
|
23
|
-
analysisNotes: null,
|
|
24
|
-
status: null
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
for (let i = 0; i < args.length; i++) {
|
|
28
|
-
const arg = args[i];
|
|
29
|
-
switch (arg) {
|
|
30
|
-
case '--sourceFile':
|
|
31
|
-
case '-SourceFile':
|
|
32
|
-
result.sourceFile = args[++i];
|
|
33
|
-
break;
|
|
34
|
-
case '--fileName':
|
|
35
|
-
case '-FileName':
|
|
36
|
-
result.fileName = args[++i];
|
|
37
|
-
break;
|
|
38
|
-
case '--featureSourcePath':
|
|
39
|
-
case '-FeatureSourcePath':
|
|
40
|
-
result.featureSourcePath = args[++i];
|
|
41
|
-
break;
|
|
42
|
-
case '--analyzed':
|
|
43
|
-
case '-Analyzed':
|
|
44
|
-
result.analyzed = args[++i];
|
|
45
|
-
break;
|
|
46
|
-
case '--setStarted':
|
|
47
|
-
case '-SetStarted':
|
|
48
|
-
result.setStarted = true;
|
|
49
|
-
break;
|
|
50
|
-
case '--setCompleted':
|
|
51
|
-
case '-SetCompleted':
|
|
52
|
-
result.setCompleted = true;
|
|
53
|
-
break;
|
|
54
|
-
case '--analysisNotes':
|
|
55
|
-
case '-AnalysisNotes':
|
|
56
|
-
result.analysisNotes = args[++i];
|
|
57
|
-
break;
|
|
58
|
-
case '--status':
|
|
59
|
-
case '-Status':
|
|
60
|
-
result.status = args[++i];
|
|
61
|
-
break;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
return result;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
// Helper function to safely set property on object
|
|
69
|
-
function setFeatureProperty(obj, propertyName, value) {
|
|
70
|
-
obj[propertyName] = value;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
// Helper function to format timestamp
|
|
74
|
-
function getTimestamp() {
|
|
75
|
-
const now = new Date();
|
|
76
|
-
const year = now.getFullYear();
|
|
77
|
-
const month = String(now.getMonth() + 1).padStart(2, '0');
|
|
78
|
-
const day = String(now.getDate()).padStart(2, '0');
|
|
79
|
-
const hours = String(now.getHours()).padStart(2, '0');
|
|
80
|
-
const minutes = String(now.getMinutes()).padStart(2, '0');
|
|
81
|
-
const seconds = String(now.getSeconds()).padStart(2, '0');
|
|
82
|
-
return `${year}-${month}-${day}-${hours}${minutes}${seconds}`;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
function main() {
|
|
86
|
-
try {
|
|
87
|
-
const args = parseArgs();
|
|
88
|
-
|
|
89
|
-
if (!args.sourceFile || !args.fileName || args.analyzed === null) {
|
|
90
|
-
console.error('Error: --sourceFile, --fileName, and --analyzed are required');
|
|
91
|
-
process.exit(1);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
// Check if file exists
|
|
95
|
-
const sourceFilePath = path.resolve(args.sourceFile);
|
|
96
|
-
if (!fs.existsSync(sourceFilePath)) {
|
|
97
|
-
console.error(`Source file not found: ${args.sourceFile}`);
|
|
98
|
-
process.exit(1);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
// Acquire file lock to prevent concurrent access
|
|
102
|
-
const lockPath = `${sourceFilePath}.lock`;
|
|
103
|
-
const maxRetries = 30;
|
|
104
|
-
let retryCount = 0;
|
|
105
|
-
let lockAcquired = false;
|
|
106
|
-
|
|
107
|
-
while (!lockAcquired && retryCount < maxRetries) {
|
|
108
|
-
try {
|
|
109
|
-
// Try to create lock file exclusively
|
|
110
|
-
const fd = fs.openSync(lockPath, 'wx');
|
|
111
|
-
fs.closeSync(fd);
|
|
112
|
-
lockAcquired = true;
|
|
113
|
-
} catch (error) {
|
|
114
|
-
retryCount++;
|
|
115
|
-
if (retryCount >= maxRetries) {
|
|
116
|
-
const errorMsg = `Failed to acquire file lock for '${sourceFilePath}' after ${maxRetries} attempts (waited ${maxRetries} seconds). The file may be locked by another process.`;
|
|
117
|
-
console.warn(errorMsg);
|
|
118
|
-
// Return error object instead of exiting
|
|
119
|
-
const errorResult = {
|
|
120
|
-
success: false,
|
|
121
|
-
error: errorMsg,
|
|
122
|
-
sourceFile: args.sourceFile,
|
|
123
|
-
fileName: args.fileName,
|
|
124
|
-
retryCount: retryCount
|
|
125
|
-
};
|
|
126
|
-
console.log(JSON.stringify(errorResult, null, 2));
|
|
127
|
-
process.exit(0);
|
|
128
|
-
}
|
|
129
|
-
if (retryCount % 5 === 0) {
|
|
130
|
-
console.warn(`Waiting for file lock on '${sourceFilePath}'... (attempt ${retryCount} of ${maxRetries})`);
|
|
131
|
-
}
|
|
132
|
-
// Wait 1 second before retry
|
|
133
|
-
const start = Date.now();
|
|
134
|
-
while (Date.now() - start < 1000) {
|
|
135
|
-
// Busy wait
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
try {
|
|
141
|
-
// Read the JSON file
|
|
142
|
-
const rawContent = fs.readFileSync(sourceFilePath, 'utf8');
|
|
143
|
-
const content = JSON.parse(rawContent);
|
|
144
|
-
|
|
145
|
-
// Convert Analyzed string to boolean
|
|
146
|
-
const analyzedBool = ['true', '1', '$true', 'True', 'TRUE'].includes(args.analyzed);
|
|
147
|
-
|
|
148
|
-
// Find and update the feature
|
|
149
|
-
let found = false;
|
|
150
|
-
if (content.features && Array.isArray(content.features)) {
|
|
151
|
-
for (let i = 0; i < content.features.length; i++) {
|
|
152
|
-
const feature = content.features[i];
|
|
153
|
-
|
|
154
|
-
// Match by fileName (and optionally sourcePath for disambiguation)
|
|
155
|
-
const nameMatch = feature.fileName === args.fileName;
|
|
156
|
-
const pathMatch = !args.featureSourcePath || feature.sourcePath === args.featureSourcePath;
|
|
157
|
-
|
|
158
|
-
if (nameMatch && pathMatch) {
|
|
159
|
-
setFeatureProperty(feature, 'analyzed', analyzedBool);
|
|
160
|
-
|
|
161
|
-
if (args.setStarted) {
|
|
162
|
-
setFeatureProperty(feature, 'startedAt', getTimestamp());
|
|
163
|
-
}
|
|
164
|
-
if (args.setCompleted) {
|
|
165
|
-
setFeatureProperty(feature, 'completedAt', getTimestamp());
|
|
166
|
-
}
|
|
167
|
-
if (args.analysisNotes !== null) {
|
|
168
|
-
setFeatureProperty(feature, 'analysisNotes', args.analysisNotes);
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
// Handle Status parameter with backward compatibility
|
|
172
|
-
if (args.status !== null) {
|
|
173
|
-
setFeatureProperty(feature, 'status', args.status);
|
|
174
|
-
// Backward compatibility: update analyzed based on status
|
|
175
|
-
if (args.status === 'completed') {
|
|
176
|
-
setFeatureProperty(feature, 'analyzed', true);
|
|
177
|
-
} else {
|
|
178
|
-
setFeatureProperty(feature, 'analyzed', false);
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
content.features[i] = feature;
|
|
183
|
-
found = true;
|
|
184
|
-
break;
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
if (!found) {
|
|
190
|
-
console.error(`Feature not found: FileName=${args.fileName}, SourcePath=${args.featureSourcePath}`);
|
|
191
|
-
// Clean up lock file before exit
|
|
192
|
-
try {
|
|
193
|
-
fs.unlinkSync(lockPath);
|
|
194
|
-
} catch (e) {
|
|
195
|
-
// Ignore
|
|
196
|
-
}
|
|
197
|
-
process.exit(1);
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
// Update counters
|
|
201
|
-
content.analyzedCount = content.features.filter(f => f.analyzed === true).length;
|
|
202
|
-
content.pendingCount = content.features.filter(f => f.analyzed === false).length;
|
|
203
|
-
|
|
204
|
-
// Write back to file using atomic write (temp file + rename)
|
|
205
|
-
const tempFile = `${sourceFilePath}.tmp`;
|
|
206
|
-
fs.writeFileSync(tempFile, JSON.stringify(content, null, 2), 'utf8');
|
|
207
|
-
fs.renameSync(tempFile, sourceFilePath);
|
|
208
|
-
|
|
209
|
-
console.warn(`Updated feature: ${args.fileName} (analyzed=${analyzedBool})`);
|
|
210
|
-
} finally {
|
|
211
|
-
// Release lock - remove lock file
|
|
212
|
-
try {
|
|
213
|
-
if (fs.existsSync(lockPath)) {
|
|
214
|
-
fs.unlinkSync(lockPath);
|
|
215
|
-
}
|
|
216
|
-
} catch (e) {
|
|
217
|
-
// Ignore cleanup errors
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
} catch (error) {
|
|
221
|
-
console.error(`Error: ${error.message}`);
|
|
222
|
-
process.exit(1);
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
main();
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"platformName": "Web Frontend",
|
|
3
|
-
"platformType": "web",
|
|
4
|
-
"platformSubtype": "vue",
|
|
5
|
-
"sourcePath": "frontend-web/src/views",
|
|
6
|
-
"techStack": ["vue", "typescript"],
|
|
7
|
-
"modules": ["system"],
|
|
8
|
-
"totalFiles": 25,
|
|
9
|
-
"analyzedCount": 0,
|
|
10
|
-
"pendingCount": 25,
|
|
11
|
-
"generatedAt": "2024-01-15-103000",
|
|
12
|
-
"features": [
|
|
13
|
-
{
|
|
14
|
-
"fileName": "index",
|
|
15
|
-
"sourcePath": "frontend-web/src/views/system/user/index.vue",
|
|
16
|
-
"documentPath": "speccrew-workspace/knowledges/bizs/web-vue/src/views/system/user/index.md",
|
|
17
|
-
"module": "system",
|
|
18
|
-
"analyzed": false,
|
|
19
|
-
"startedAt": null,
|
|
20
|
-
"completedAt": null,
|
|
21
|
-
"analysisNotes": null
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"fileName": "UserForm",
|
|
25
|
-
"sourcePath": "frontend-web/src/views/system/user/UserForm.vue",
|
|
26
|
-
"documentPath": "speccrew-workspace/knowledges/bizs/web-vue/src/views/system/user/UserForm.md",
|
|
27
|
-
"module": "system",
|
|
28
|
-
"analyzed": false,
|
|
29
|
-
"startedAt": null,
|
|
30
|
-
"completedAt": null,
|
|
31
|
-
"analysisNotes": null
|
|
32
|
-
}
|
|
33
|
-
]
|
|
34
|
-
}
|