@aiready/cli 0.9.47 → 0.10.2
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/.turbo/turbo-build.log +8 -8
- package/.turbo/turbo-test.log +6 -7
- package/dist/{chunk-6FOVC2OE.mjs → chunk-EQ2HQSTJ.mjs} +83 -61
- package/dist/{chunk-MEXEG3IJ.mjs → chunk-VUCNUYI7.mjs} +90 -62
- package/dist/cli.js +105 -75
- package/dist/cli.mjs +30 -25
- package/dist/index.js +86 -61
- package/dist/index.mjs +1 -1
- package/package.json +12 -12
- package/src/.aiready/aiready-report-20260305-153847.json +8015 -0
- package/src/.aiready/aiready-report-20260305-154121.json +8015 -0
- package/src/.aiready/aiready-report-20260305-160026.json +8015 -0
- package/src/.aiready/aiready-report-20260305-160752.json +8015 -0
- package/src/.aiready/aiready-report-20260305-163858.json +8015 -0
- package/src/.aiready/aiready-report-20260305-171001.json +8317 -0
- package/src/.aiready/aiready-report-20260305-201337.json +8317 -0
- package/src/__tests__/cli.test.ts +6 -6
- package/src/commands/scan.ts +27 -22
- package/src/commands/visualize.ts +3 -3
- package/src/index.ts +109 -90
- package/dist/__tests__/cli.test.d.ts +0 -2
- package/dist/__tests__/cli.test.d.ts.map +0 -1
- package/dist/__tests__/cli.test.js +0 -52
- package/dist/__tests__/cli.test.js.map +0 -1
- package/dist/agent-grounding-DAOSU4MF.mjs +0 -7
- package/dist/chunk-2LXCBVPN.mjs +0 -109
- package/dist/chunk-3SG2GLFJ.mjs +0 -118
- package/dist/chunk-5GZDRZ3T.mjs +0 -126
- package/dist/chunk-DEZVFBPS.mjs +0 -111
- package/dist/chunk-G6SDH7ZS.mjs +0 -126
- package/dist/chunk-HLBKROD3.mjs +0 -237
- package/dist/chunk-JQG7ZATX.mjs +0 -211
- package/dist/chunk-LLJMKNBI.mjs +0 -243
- package/dist/chunk-M7O2MEM5.mjs +0 -211
- package/dist/chunk-N4SLON5K.mjs +0 -152
- package/dist/chunk-OVELUOM6.mjs +0 -112
- package/dist/chunk-P3XAXCTK.mjs +0 -110
- package/dist/chunk-PDOONNSK.mjs +0 -228
- package/dist/chunk-QXQP6BMO.mjs +0 -109
- package/dist/chunk-RBWLQRKR.mjs +0 -39
- package/dist/chunk-XAF2EW5H.mjs +0 -46
- package/dist/chunk-Y6FXYEAI.mjs +0 -10
- package/dist/chunk-YIS6WTY5.mjs +0 -35
- package/dist/cli.d.mts +0 -1
- package/dist/cli.d.ts +0 -3
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/deps-health-UWVYJ7FZ.mjs +0 -47
- package/dist/doc-drift-G7MGAZAE.mjs +0 -47
- package/dist/hallucination-risk-XU6E7IGN.mjs +0 -7
- package/dist/index.d.mts +0 -33
- package/dist/index.d.ts +0 -32
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/testability-VDZJZ4MF.mjs +0 -7
package/dist/index.js
CHANGED
|
@@ -86,8 +86,11 @@ async function analyzeUnified(options) {
|
|
|
86
86
|
if (options.progressCallback) {
|
|
87
87
|
options.progressCallback({ tool: "patterns", data: patternResult });
|
|
88
88
|
}
|
|
89
|
-
result.
|
|
90
|
-
|
|
89
|
+
result.patternDetect = {
|
|
90
|
+
results: sortBySeverity(patternResult.results),
|
|
91
|
+
summary: patternResult.summary || {},
|
|
92
|
+
duplicates: patternResult.duplicates || []
|
|
93
|
+
};
|
|
91
94
|
result.summary.totalIssues += patternResult.results.reduce(
|
|
92
95
|
(sum, file) => sum + file.issues.length,
|
|
93
96
|
0
|
|
@@ -98,13 +101,18 @@ async function analyzeUnified(options) {
|
|
|
98
101
|
if (options.progressCallback) {
|
|
99
102
|
options.progressCallback({ tool: "context", data: contextResults });
|
|
100
103
|
}
|
|
101
|
-
|
|
104
|
+
const sorted = contextResults.sort((a, b) => {
|
|
102
105
|
const severityDiff = (severityOrder[b.severity] || 0) - (severityOrder[a.severity] || 0);
|
|
103
106
|
if (severityDiff !== 0) return severityDiff;
|
|
104
107
|
if (a.tokenCost !== b.tokenCost) return b.tokenCost - a.tokenCost;
|
|
105
108
|
return b.fragmentationScore - a.fragmentationScore;
|
|
106
109
|
});
|
|
107
|
-
|
|
110
|
+
const { generateSummary: genContextSummary } = await import("@aiready/context-analyzer");
|
|
111
|
+
result.contextAnalyzer = {
|
|
112
|
+
results: sorted,
|
|
113
|
+
summary: genContextSummary(sorted)
|
|
114
|
+
};
|
|
115
|
+
result.summary.totalIssues += sorted.length;
|
|
108
116
|
}
|
|
109
117
|
if (tools.includes("consistency")) {
|
|
110
118
|
const consistencyOptions = {
|
|
@@ -117,10 +125,10 @@ async function analyzeUnified(options) {
|
|
|
117
125
|
if (options.progressCallback) {
|
|
118
126
|
options.progressCallback({ tool: "consistency", data: report });
|
|
119
127
|
}
|
|
120
|
-
|
|
121
|
-
report.results
|
|
122
|
-
|
|
123
|
-
|
|
128
|
+
result.consistency = {
|
|
129
|
+
results: report.results ? sortBySeverity(report.results) : [],
|
|
130
|
+
summary: report.summary
|
|
131
|
+
};
|
|
124
132
|
result.summary.totalIssues += report.summary.totalIssues;
|
|
125
133
|
}
|
|
126
134
|
if (tools.includes("doc-drift")) {
|
|
@@ -134,7 +142,10 @@ async function analyzeUnified(options) {
|
|
|
134
142
|
if (options.progressCallback) {
|
|
135
143
|
options.progressCallback({ tool: "doc-drift", data: report });
|
|
136
144
|
}
|
|
137
|
-
result.docDrift =
|
|
145
|
+
result.docDrift = {
|
|
146
|
+
results: report.results || [],
|
|
147
|
+
summary: report.summary || {}
|
|
148
|
+
};
|
|
138
149
|
result.summary.totalIssues += report.issues?.length || 0;
|
|
139
150
|
}
|
|
140
151
|
if (tools.includes("deps-health")) {
|
|
@@ -148,10 +159,13 @@ async function analyzeUnified(options) {
|
|
|
148
159
|
if (options.progressCallback) {
|
|
149
160
|
options.progressCallback({ tool: "deps-health", data: report });
|
|
150
161
|
}
|
|
151
|
-
result.
|
|
162
|
+
result.dependencyHealth = {
|
|
163
|
+
results: report.results || [],
|
|
164
|
+
summary: report.summary || {}
|
|
165
|
+
};
|
|
152
166
|
result.summary.totalIssues += report.issues?.length || 0;
|
|
153
167
|
}
|
|
154
|
-
if (tools.includes("
|
|
168
|
+
if (tools.includes("ai-signal-clarity")) {
|
|
155
169
|
const { analyzeAiSignalClarity } = await import("@aiready/ai-signal-clarity");
|
|
156
170
|
const report = await analyzeAiSignalClarity({
|
|
157
171
|
rootDir: options.rootDir,
|
|
@@ -160,15 +174,19 @@ async function analyzeUnified(options) {
|
|
|
160
174
|
onProgress: options.onProgress
|
|
161
175
|
});
|
|
162
176
|
if (options.progressCallback) {
|
|
163
|
-
options.progressCallback({ tool: "
|
|
177
|
+
options.progressCallback({ tool: "ai-signal-clarity", data: report });
|
|
164
178
|
}
|
|
165
|
-
result.aiSignalClarity =
|
|
179
|
+
result.aiSignalClarity = {
|
|
180
|
+
...report,
|
|
181
|
+
results: report.results || [],
|
|
182
|
+
summary: report.summary || {}
|
|
183
|
+
};
|
|
166
184
|
result.summary.totalIssues += report.results?.reduce(
|
|
167
185
|
(sum, r) => sum + (r.issues?.length || 0),
|
|
168
186
|
0
|
|
169
187
|
) || 0;
|
|
170
188
|
}
|
|
171
|
-
if (tools.includes("grounding")) {
|
|
189
|
+
if (tools.includes("agent-grounding")) {
|
|
172
190
|
const { analyzeAgentGrounding } = await import("@aiready/agent-grounding");
|
|
173
191
|
const report = await analyzeAgentGrounding({
|
|
174
192
|
rootDir: options.rootDir,
|
|
@@ -177,9 +195,13 @@ async function analyzeUnified(options) {
|
|
|
177
195
|
onProgress: options.onProgress
|
|
178
196
|
});
|
|
179
197
|
if (options.progressCallback) {
|
|
180
|
-
options.progressCallback({ tool: "grounding", data: report });
|
|
198
|
+
options.progressCallback({ tool: "agent-grounding", data: report });
|
|
181
199
|
}
|
|
182
|
-
result.
|
|
200
|
+
result.agentGrounding = {
|
|
201
|
+
...report,
|
|
202
|
+
results: report.results || [],
|
|
203
|
+
summary: report.summary || {}
|
|
204
|
+
};
|
|
183
205
|
result.summary.totalIssues += report.issues?.length || 0;
|
|
184
206
|
}
|
|
185
207
|
if (tools.includes("testability")) {
|
|
@@ -193,10 +215,14 @@ async function analyzeUnified(options) {
|
|
|
193
215
|
if (options.progressCallback) {
|
|
194
216
|
options.progressCallback({ tool: "testability", data: report });
|
|
195
217
|
}
|
|
196
|
-
result.testability =
|
|
218
|
+
result.testability = {
|
|
219
|
+
...report,
|
|
220
|
+
results: report.results || [],
|
|
221
|
+
summary: report.summary || {}
|
|
222
|
+
};
|
|
197
223
|
result.summary.totalIssues += report.issues?.length || 0;
|
|
198
224
|
}
|
|
199
|
-
if (tools.includes("
|
|
225
|
+
if (tools.includes("change-amplification")) {
|
|
200
226
|
const { analyzeChangeAmplification } = await import("@aiready/change-amplification");
|
|
201
227
|
const report = await analyzeChangeAmplification({
|
|
202
228
|
rootDir: options.rootDir,
|
|
@@ -205,9 +231,12 @@ async function analyzeUnified(options) {
|
|
|
205
231
|
onProgress: options.onProgress
|
|
206
232
|
});
|
|
207
233
|
if (options.progressCallback) {
|
|
208
|
-
options.progressCallback({ tool: "
|
|
234
|
+
options.progressCallback({ tool: "change-amplification", data: report });
|
|
209
235
|
}
|
|
210
|
-
result.changeAmplification =
|
|
236
|
+
result.changeAmplification = {
|
|
237
|
+
results: report.results || [],
|
|
238
|
+
summary: report.summary || {}
|
|
239
|
+
};
|
|
211
240
|
result.summary.totalIssues += report.summary?.totalIssues || 0;
|
|
212
241
|
}
|
|
213
242
|
result.summary.executionTime = Date.now() - startTime;
|
|
@@ -215,14 +244,14 @@ async function analyzeUnified(options) {
|
|
|
215
244
|
}
|
|
216
245
|
async function scoreUnified(results, options) {
|
|
217
246
|
const toolScores = /* @__PURE__ */ new Map();
|
|
218
|
-
if (results.
|
|
247
|
+
if (results.patternDetect) {
|
|
219
248
|
const { calculatePatternScore } = await import("@aiready/pattern-detect");
|
|
220
249
|
try {
|
|
221
250
|
const patternScore = calculatePatternScore(
|
|
222
|
-
results.duplicates,
|
|
223
|
-
results.
|
|
251
|
+
results.patternDetect.duplicates,
|
|
252
|
+
results.patternDetect.results?.length || 0
|
|
224
253
|
);
|
|
225
|
-
const wastedTokens = results.duplicates.reduce(
|
|
254
|
+
const wastedTokens = results.patternDetect.duplicates.reduce(
|
|
226
255
|
(sum, d) => sum + (d.tokenCost || 0),
|
|
227
256
|
0
|
|
228
257
|
);
|
|
@@ -240,10 +269,10 @@ async function scoreUnified(results, options) {
|
|
|
240
269
|
void err;
|
|
241
270
|
}
|
|
242
271
|
}
|
|
243
|
-
if (results.
|
|
244
|
-
const {
|
|
272
|
+
if (results.contextAnalyzer) {
|
|
273
|
+
const { calculateContextScore } = await import("@aiready/context-analyzer");
|
|
245
274
|
try {
|
|
246
|
-
const ctxSummary =
|
|
275
|
+
const ctxSummary = results.contextAnalyzer.summary;
|
|
247
276
|
const contextScore = calculateContextScore(ctxSummary);
|
|
248
277
|
contextScore.tokenBudget = (0, import_core.calculateTokenBudget)({
|
|
249
278
|
totalContextTokens: ctxSummary.totalTokens,
|
|
@@ -278,10 +307,10 @@ async function scoreUnified(results, options) {
|
|
|
278
307
|
void err;
|
|
279
308
|
}
|
|
280
309
|
}
|
|
281
|
-
if (results.
|
|
310
|
+
if (results.agentGrounding) {
|
|
282
311
|
const { calculateGroundingScore } = await import("@aiready/agent-grounding");
|
|
283
312
|
try {
|
|
284
|
-
const agScore = calculateGroundingScore(results.
|
|
313
|
+
const agScore = calculateGroundingScore(results.agentGrounding);
|
|
285
314
|
toolScores.set("agent-grounding", agScore);
|
|
286
315
|
} catch (err) {
|
|
287
316
|
void err;
|
|
@@ -299,10 +328,10 @@ async function scoreUnified(results, options) {
|
|
|
299
328
|
if (results.docDrift) {
|
|
300
329
|
toolScores.set("doc-drift", {
|
|
301
330
|
toolName: "doc-drift",
|
|
302
|
-
score: results.docDrift.summary.score,
|
|
303
|
-
rawMetrics: results.docDrift.
|
|
331
|
+
score: results.docDrift.summary.score || results.docDrift.summary.totalScore || 0,
|
|
332
|
+
rawMetrics: results.docDrift.summary,
|
|
304
333
|
factors: [],
|
|
305
|
-
recommendations: (results.docDrift.recommendations || []).map(
|
|
334
|
+
recommendations: (results.docDrift.summary.recommendations || []).map(
|
|
306
335
|
(action) => ({
|
|
307
336
|
action,
|
|
308
337
|
estimatedImpact: 5,
|
|
@@ -311,34 +340,30 @@ async function scoreUnified(results, options) {
|
|
|
311
340
|
)
|
|
312
341
|
});
|
|
313
342
|
}
|
|
314
|
-
if (results.
|
|
343
|
+
if (results.dependencyHealth) {
|
|
315
344
|
toolScores.set("dependency-health", {
|
|
316
345
|
toolName: "dependency-health",
|
|
317
|
-
score: results.
|
|
318
|
-
rawMetrics: results.
|
|
346
|
+
score: results.dependencyHealth.summary.score || 0,
|
|
347
|
+
rawMetrics: results.dependencyHealth.summary,
|
|
319
348
|
factors: [],
|
|
320
|
-
recommendations: (results.
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
})
|
|
326
|
-
)
|
|
349
|
+
recommendations: (results.dependencyHealth.summary.recommendations || []).map((action) => ({
|
|
350
|
+
action,
|
|
351
|
+
estimatedImpact: 5,
|
|
352
|
+
priority: "medium"
|
|
353
|
+
}))
|
|
327
354
|
});
|
|
328
355
|
}
|
|
329
356
|
if (results.changeAmplification) {
|
|
330
357
|
toolScores.set("change-amplification", {
|
|
331
358
|
toolName: "change-amplification",
|
|
332
|
-
score: results.changeAmplification.summary.score,
|
|
333
|
-
rawMetrics: results.changeAmplification.
|
|
359
|
+
score: results.changeAmplification.summary.score || 0,
|
|
360
|
+
rawMetrics: results.changeAmplification.summary,
|
|
334
361
|
factors: [],
|
|
335
|
-
recommendations: (results.changeAmplification.recommendations || []).map(
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
})
|
|
341
|
-
)
|
|
362
|
+
recommendations: (results.changeAmplification.summary.recommendations || []).map((action) => ({
|
|
363
|
+
action,
|
|
364
|
+
estimatedImpact: 5,
|
|
365
|
+
priority: "medium"
|
|
366
|
+
}))
|
|
342
367
|
});
|
|
343
368
|
}
|
|
344
369
|
if (toolScores.size === 0) {
|
|
@@ -371,12 +396,12 @@ function generateUnifiedSummary(result) {
|
|
|
371
396
|
output += ` Execution time: ${(summary.executionTime / 1e3).toFixed(2)}s
|
|
372
397
|
|
|
373
398
|
`;
|
|
374
|
-
if (result.
|
|
375
|
-
output += `\u{1F50D} Pattern Analysis: ${result.
|
|
399
|
+
if (result.patternDetect) {
|
|
400
|
+
output += `\u{1F50D} Pattern Analysis: ${result.patternDetect.results.length} issues
|
|
376
401
|
`;
|
|
377
402
|
}
|
|
378
|
-
if (result.
|
|
379
|
-
output += `\u{1F9E0} Context Analysis: ${result.
|
|
403
|
+
if (result.contextAnalyzer) {
|
|
404
|
+
output += `\u{1F9E0} Context Analysis: ${result.contextAnalyzer.results.length} issues
|
|
380
405
|
`;
|
|
381
406
|
}
|
|
382
407
|
if (result.consistency) {
|
|
@@ -384,23 +409,23 @@ function generateUnifiedSummary(result) {
|
|
|
384
409
|
`;
|
|
385
410
|
}
|
|
386
411
|
if (result.docDrift) {
|
|
387
|
-
output += `\u{1F4DD} Doc Drift Analysis: ${result.docDrift.
|
|
412
|
+
output += `\u{1F4DD} Doc Drift Analysis: ${result.docDrift.results?.length || 0} issues
|
|
388
413
|
`;
|
|
389
414
|
}
|
|
390
|
-
if (result.
|
|
391
|
-
output += `\u{1F4E6} Dependency Health: ${result.
|
|
415
|
+
if (result.dependencyHealth) {
|
|
416
|
+
output += `\u{1F4E6} Dependency Health: ${result.dependencyHealth.results?.length || 0} issues
|
|
392
417
|
`;
|
|
393
418
|
}
|
|
394
419
|
if (result.aiSignalClarity) {
|
|
395
420
|
output += `\u{1F9E0} AI Signal Clarity: ${result.aiSignalClarity.summary?.totalSignals || 0} signals
|
|
396
421
|
`;
|
|
397
422
|
}
|
|
398
|
-
if (result.
|
|
399
|
-
output += `\u{1F9ED} Agent Grounding: ${result.
|
|
423
|
+
if (result.agentGrounding) {
|
|
424
|
+
output += `\u{1F9ED} Agent Grounding: ${result.agentGrounding.results?.length || 0} issues
|
|
400
425
|
`;
|
|
401
426
|
}
|
|
402
427
|
if (result.testability) {
|
|
403
|
-
output += `\u{1F9EA} Testability Index: ${result.testability.
|
|
428
|
+
output += `\u{1F9EA} Testability Index: ${result.testability.results?.length || 0} issues
|
|
404
429
|
`;
|
|
405
430
|
}
|
|
406
431
|
if (result.changeAmplification) {
|
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aiready/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.2",
|
|
4
4
|
"description": "Unified CLI for AIReady analysis tools",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -11,17 +11,17 @@
|
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"chalk": "^5.3.0",
|
|
13
13
|
"commander": "^14.0.0",
|
|
14
|
-
"@aiready/
|
|
15
|
-
"@aiready/
|
|
16
|
-
"@aiready/
|
|
17
|
-
"@aiready/
|
|
18
|
-
"@aiready/
|
|
19
|
-
"@aiready/
|
|
20
|
-
"@aiready/change-amplification": "0.
|
|
21
|
-
"@aiready/
|
|
22
|
-
"@aiready/
|
|
23
|
-
"@aiready/pattern-detect": "0.
|
|
24
|
-
"@aiready/
|
|
14
|
+
"@aiready/context-analyzer": "0.17.2",
|
|
15
|
+
"@aiready/agent-grounding": "0.9.2",
|
|
16
|
+
"@aiready/core": "0.19.2",
|
|
17
|
+
"@aiready/deps": "0.9.2",
|
|
18
|
+
"@aiready/doc-drift": "0.9.2",
|
|
19
|
+
"@aiready/consistency": "0.16.2",
|
|
20
|
+
"@aiready/change-amplification": "0.9.2",
|
|
21
|
+
"@aiready/testability": "0.2.2",
|
|
22
|
+
"@aiready/ai-signal-clarity": "0.9.2",
|
|
23
|
+
"@aiready/pattern-detect": "0.12.2",
|
|
24
|
+
"@aiready/visualizer": "0.2.2"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/node": "^24.0.0",
|