@aiready/cli 0.10.4 → 0.10.6
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 +3 -3
- package/dist/chunk-VQCWYJYJ.mjs +438 -0
- package/dist/cli.js +100 -82
- package/dist/cli.mjs +29 -28
- package/dist/index.js +92 -74
- package/dist/index.mjs +1 -1
- package/package.json +12 -12
- package/src/.aiready/aiready-report-20260306-213155.json +24657 -0
- package/src/.aiready/aiready-report-20260306-213925.json +24657 -0
- package/src/commands/scan.ts +31 -29
- package/src/index.ts +112 -93
package/dist/index.js
CHANGED
|
@@ -86,11 +86,13 @@ async function analyzeUnified(options) {
|
|
|
86
86
|
if (options.progressCallback) {
|
|
87
87
|
options.progressCallback({ tool: "patterns", data: patternResult });
|
|
88
88
|
}
|
|
89
|
-
|
|
89
|
+
const output = {
|
|
90
90
|
results: sortBySeverity(patternResult.results),
|
|
91
91
|
summary: patternResult.summary || {},
|
|
92
92
|
duplicates: patternResult.duplicates || []
|
|
93
93
|
};
|
|
94
|
+
result[import_core.ToolName.PatternDetect] = output;
|
|
95
|
+
result.patternDetect = output;
|
|
94
96
|
result.summary.totalIssues += patternResult.results.reduce(
|
|
95
97
|
(sum, file) => sum + file.issues.length,
|
|
96
98
|
0
|
|
@@ -108,10 +110,12 @@ async function analyzeUnified(options) {
|
|
|
108
110
|
return b.fragmentationScore - a.fragmentationScore;
|
|
109
111
|
});
|
|
110
112
|
const { generateSummary: genContextSummary } = await import("@aiready/context-analyzer");
|
|
111
|
-
|
|
113
|
+
const output = {
|
|
112
114
|
results: sorted,
|
|
113
115
|
summary: genContextSummary(sorted)
|
|
114
116
|
};
|
|
117
|
+
result[import_core.ToolName.ContextAnalyzer] = output;
|
|
118
|
+
result.contextAnalyzer = output;
|
|
115
119
|
result.summary.totalIssues += sorted.length;
|
|
116
120
|
}
|
|
117
121
|
if (tools.includes("consistency")) {
|
|
@@ -125,7 +129,7 @@ async function analyzeUnified(options) {
|
|
|
125
129
|
if (options.progressCallback) {
|
|
126
130
|
options.progressCallback({ tool: "consistency", data: report });
|
|
127
131
|
}
|
|
128
|
-
result.
|
|
132
|
+
result[import_core.ToolName.NamingConsistency] = {
|
|
129
133
|
results: report.results ? sortBySeverity(report.results) : [],
|
|
130
134
|
summary: report.summary
|
|
131
135
|
};
|
|
@@ -142,7 +146,7 @@ async function analyzeUnified(options) {
|
|
|
142
146
|
if (options.progressCallback) {
|
|
143
147
|
options.progressCallback({ tool: "doc-drift", data: report });
|
|
144
148
|
}
|
|
145
|
-
result.
|
|
149
|
+
result[import_core.ToolName.DocDrift] = {
|
|
146
150
|
results: report.results || report.issues || [],
|
|
147
151
|
summary: report.summary || {}
|
|
148
152
|
};
|
|
@@ -160,7 +164,7 @@ async function analyzeUnified(options) {
|
|
|
160
164
|
if (options.progressCallback) {
|
|
161
165
|
options.progressCallback({ tool: "deps-health", data: report });
|
|
162
166
|
}
|
|
163
|
-
result.
|
|
167
|
+
result[import_core.ToolName.DependencyHealth] = {
|
|
164
168
|
results: report.results || report.issues || [],
|
|
165
169
|
summary: report.summary || {}
|
|
166
170
|
};
|
|
@@ -178,7 +182,7 @@ async function analyzeUnified(options) {
|
|
|
178
182
|
if (options.progressCallback) {
|
|
179
183
|
options.progressCallback({ tool: "ai-signal-clarity", data: report });
|
|
180
184
|
}
|
|
181
|
-
result.
|
|
185
|
+
result[import_core.ToolName.AiSignalClarity] = {
|
|
182
186
|
...report,
|
|
183
187
|
results: report.results || report.issues || [],
|
|
184
188
|
summary: report.summary || {}
|
|
@@ -199,7 +203,7 @@ async function analyzeUnified(options) {
|
|
|
199
203
|
if (options.progressCallback) {
|
|
200
204
|
options.progressCallback({ tool: "agent-grounding", data: report });
|
|
201
205
|
}
|
|
202
|
-
result.
|
|
206
|
+
result[import_core.ToolName.AgentGrounding] = {
|
|
203
207
|
...report,
|
|
204
208
|
results: report.results || report.issues || [],
|
|
205
209
|
summary: report.summary || {}
|
|
@@ -217,7 +221,7 @@ async function analyzeUnified(options) {
|
|
|
217
221
|
if (options.progressCallback) {
|
|
218
222
|
options.progressCallback({ tool: "testability", data: report });
|
|
219
223
|
}
|
|
220
|
-
result.
|
|
224
|
+
result[import_core.ToolName.TestabilityIndex] = {
|
|
221
225
|
...report,
|
|
222
226
|
results: report.results || report.issues || [],
|
|
223
227
|
summary: report.summary || {}
|
|
@@ -235,7 +239,7 @@ async function analyzeUnified(options) {
|
|
|
235
239
|
if (options.progressCallback) {
|
|
236
240
|
options.progressCallback({ tool: "change-amplification", data: report });
|
|
237
241
|
}
|
|
238
|
-
result.
|
|
242
|
+
result[import_core.ToolName.ChangeAmplification] = {
|
|
239
243
|
results: report.results || [],
|
|
240
244
|
summary: report.summary || {}
|
|
241
245
|
};
|
|
@@ -246,14 +250,15 @@ async function analyzeUnified(options) {
|
|
|
246
250
|
}
|
|
247
251
|
async function scoreUnified(results, options) {
|
|
248
252
|
const toolScores = /* @__PURE__ */ new Map();
|
|
249
|
-
if (results.
|
|
253
|
+
if (results[import_core.ToolName.PatternDetect]) {
|
|
254
|
+
const data = results[import_core.ToolName.PatternDetect];
|
|
250
255
|
const { calculatePatternScore } = await import("@aiready/pattern-detect");
|
|
251
256
|
try {
|
|
252
257
|
const patternScore = calculatePatternScore(
|
|
253
|
-
|
|
254
|
-
|
|
258
|
+
data.duplicates,
|
|
259
|
+
data.results?.length || 0
|
|
255
260
|
);
|
|
256
|
-
const wastedTokens =
|
|
261
|
+
const wastedTokens = data.duplicates.reduce(
|
|
257
262
|
(sum, d) => sum + (d.tokenCost || 0),
|
|
258
263
|
0
|
|
259
264
|
);
|
|
@@ -266,15 +271,16 @@ async function scoreUnified(results, options) {
|
|
|
266
271
|
chattiness: 0
|
|
267
272
|
}
|
|
268
273
|
});
|
|
269
|
-
toolScores.set(
|
|
274
|
+
toolScores.set(import_core.ToolName.PatternDetect, patternScore);
|
|
270
275
|
} catch (err) {
|
|
271
276
|
void err;
|
|
272
277
|
}
|
|
273
278
|
}
|
|
274
|
-
if (results.
|
|
279
|
+
if (results[import_core.ToolName.ContextAnalyzer]) {
|
|
280
|
+
const data = results[import_core.ToolName.ContextAnalyzer];
|
|
275
281
|
const { calculateContextScore } = await import("@aiready/context-analyzer");
|
|
276
282
|
try {
|
|
277
|
-
const ctxSummary =
|
|
283
|
+
const ctxSummary = data.summary;
|
|
278
284
|
const contextScore = calculateContextScore(ctxSummary);
|
|
279
285
|
contextScore.tokenBudget = (0, import_core.calculateTokenBudget)({
|
|
280
286
|
totalContextTokens: ctxSummary.totalTokens,
|
|
@@ -284,56 +290,62 @@ async function scoreUnified(results, options) {
|
|
|
284
290
|
chattiness: 0
|
|
285
291
|
}
|
|
286
292
|
});
|
|
287
|
-
toolScores.set(
|
|
293
|
+
toolScores.set(import_core.ToolName.ContextAnalyzer, contextScore);
|
|
288
294
|
} catch (err) {
|
|
289
295
|
void err;
|
|
290
296
|
}
|
|
291
297
|
}
|
|
292
|
-
if (results.
|
|
298
|
+
if (results[import_core.ToolName.NamingConsistency]) {
|
|
299
|
+
const data = results[import_core.ToolName.NamingConsistency];
|
|
293
300
|
const { calculateConsistencyScore } = await import("@aiready/consistency");
|
|
294
301
|
try {
|
|
295
|
-
const issues =
|
|
296
|
-
const totalFiles =
|
|
302
|
+
const issues = data.results?.flatMap((r) => r.issues) || [];
|
|
303
|
+
const totalFiles = data.summary?.filesAnalyzed || 0;
|
|
297
304
|
const consistencyScore = calculateConsistencyScore(issues, totalFiles);
|
|
298
|
-
toolScores.set(
|
|
305
|
+
toolScores.set(import_core.ToolName.NamingConsistency, consistencyScore);
|
|
299
306
|
} catch (err) {
|
|
300
307
|
void err;
|
|
301
308
|
}
|
|
302
309
|
}
|
|
303
|
-
if (results.
|
|
310
|
+
if (results[import_core.ToolName.AiSignalClarity]) {
|
|
304
311
|
const { calculateAiSignalClarityScore } = await import("@aiready/ai-signal-clarity");
|
|
305
312
|
try {
|
|
306
|
-
const hrScore = calculateAiSignalClarityScore(
|
|
307
|
-
|
|
313
|
+
const hrScore = calculateAiSignalClarityScore(
|
|
314
|
+
results[import_core.ToolName.AiSignalClarity]
|
|
315
|
+
);
|
|
316
|
+
toolScores.set(import_core.ToolName.AiSignalClarity, hrScore);
|
|
308
317
|
} catch (err) {
|
|
309
318
|
void err;
|
|
310
319
|
}
|
|
311
320
|
}
|
|
312
|
-
if (results.
|
|
321
|
+
if (results[import_core.ToolName.AgentGrounding]) {
|
|
313
322
|
const { calculateGroundingScore } = await import("@aiready/agent-grounding");
|
|
314
323
|
try {
|
|
315
|
-
const agScore = calculateGroundingScore(results.
|
|
316
|
-
toolScores.set(
|
|
324
|
+
const agScore = calculateGroundingScore(results[import_core.ToolName.AgentGrounding]);
|
|
325
|
+
toolScores.set(import_core.ToolName.AgentGrounding, agScore);
|
|
317
326
|
} catch (err) {
|
|
318
327
|
void err;
|
|
319
328
|
}
|
|
320
329
|
}
|
|
321
|
-
if (results.
|
|
330
|
+
if (results[import_core.ToolName.TestabilityIndex]) {
|
|
322
331
|
const { calculateTestabilityScore } = await import("@aiready/testability");
|
|
323
332
|
try {
|
|
324
|
-
const tbScore = calculateTestabilityScore(
|
|
325
|
-
|
|
333
|
+
const tbScore = calculateTestabilityScore(
|
|
334
|
+
results[import_core.ToolName.TestabilityIndex]
|
|
335
|
+
);
|
|
336
|
+
toolScores.set(import_core.ToolName.TestabilityIndex, tbScore);
|
|
326
337
|
} catch (err) {
|
|
327
338
|
void err;
|
|
328
339
|
}
|
|
329
340
|
}
|
|
330
|
-
if (results.
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
341
|
+
if (results[import_core.ToolName.DocDrift]) {
|
|
342
|
+
const data = results[import_core.ToolName.DocDrift];
|
|
343
|
+
toolScores.set(import_core.ToolName.DocDrift, {
|
|
344
|
+
toolName: import_core.ToolName.DocDrift,
|
|
345
|
+
score: data.summary.score || data.summary.totalScore || 0,
|
|
346
|
+
rawMetrics: data.summary,
|
|
335
347
|
factors: [],
|
|
336
|
-
recommendations: (
|
|
348
|
+
recommendations: (data.summary.recommendations || []).map(
|
|
337
349
|
(action) => ({
|
|
338
350
|
action,
|
|
339
351
|
estimatedImpact: 5,
|
|
@@ -342,30 +354,36 @@ async function scoreUnified(results, options) {
|
|
|
342
354
|
)
|
|
343
355
|
});
|
|
344
356
|
}
|
|
345
|
-
if (results.
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
357
|
+
if (results[import_core.ToolName.DependencyHealth]) {
|
|
358
|
+
const data = results[import_core.ToolName.DependencyHealth];
|
|
359
|
+
toolScores.set(import_core.ToolName.DependencyHealth, {
|
|
360
|
+
toolName: import_core.ToolName.DependencyHealth,
|
|
361
|
+
score: data.summary.score || 0,
|
|
362
|
+
rawMetrics: data.summary,
|
|
350
363
|
factors: [],
|
|
351
|
-
recommendations: (
|
|
352
|
-
action
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
364
|
+
recommendations: (data.summary.recommendations || []).map(
|
|
365
|
+
(action) => ({
|
|
366
|
+
action,
|
|
367
|
+
estimatedImpact: 5,
|
|
368
|
+
priority: "medium"
|
|
369
|
+
})
|
|
370
|
+
)
|
|
356
371
|
});
|
|
357
372
|
}
|
|
358
|
-
if (results.
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
373
|
+
if (results[import_core.ToolName.ChangeAmplification]) {
|
|
374
|
+
const data = results[import_core.ToolName.ChangeAmplification];
|
|
375
|
+
toolScores.set(import_core.ToolName.ChangeAmplification, {
|
|
376
|
+
toolName: import_core.ToolName.ChangeAmplification,
|
|
377
|
+
score: data.summary.score || 0,
|
|
378
|
+
rawMetrics: data.summary,
|
|
363
379
|
factors: [],
|
|
364
|
-
recommendations: (
|
|
365
|
-
action
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
380
|
+
recommendations: (data.summary.recommendations || []).map(
|
|
381
|
+
(action) => ({
|
|
382
|
+
action,
|
|
383
|
+
estimatedImpact: 5,
|
|
384
|
+
priority: "medium"
|
|
385
|
+
})
|
|
386
|
+
)
|
|
369
387
|
});
|
|
370
388
|
}
|
|
371
389
|
if (toolScores.size === 0) {
|
|
@@ -398,40 +416,40 @@ function generateUnifiedSummary(result) {
|
|
|
398
416
|
output += ` Execution time: ${(summary.executionTime / 1e3).toFixed(2)}s
|
|
399
417
|
|
|
400
418
|
`;
|
|
401
|
-
if (result.
|
|
402
|
-
output += `\u{1F50D} Pattern Analysis: ${result.
|
|
419
|
+
if (result[import_core.ToolName.PatternDetect]) {
|
|
420
|
+
output += `\u{1F50D} Pattern Analysis: ${result[import_core.ToolName.PatternDetect].results.length} issues
|
|
403
421
|
`;
|
|
404
422
|
}
|
|
405
|
-
if (result.
|
|
406
|
-
output += `\u{1F9E0} Context Analysis: ${result.
|
|
423
|
+
if (result[import_core.ToolName.ContextAnalyzer]) {
|
|
424
|
+
output += `\u{1F9E0} Context Analysis: ${result[import_core.ToolName.ContextAnalyzer].results.length} issues
|
|
407
425
|
`;
|
|
408
426
|
}
|
|
409
|
-
if (result.
|
|
410
|
-
output += `\u{1F3F7}\uFE0F Consistency Analysis: ${result.
|
|
427
|
+
if (result[import_core.ToolName.NamingConsistency]) {
|
|
428
|
+
output += `\u{1F3F7}\uFE0F Consistency Analysis: ${result[import_core.ToolName.NamingConsistency].summary.totalIssues} issues
|
|
411
429
|
`;
|
|
412
430
|
}
|
|
413
|
-
if (result.
|
|
414
|
-
output += `\u{1F4DD} Doc Drift Analysis: ${result.
|
|
431
|
+
if (result[import_core.ToolName.DocDrift]) {
|
|
432
|
+
output += `\u{1F4DD} Doc Drift Analysis: ${result[import_core.ToolName.DocDrift].results?.length || 0} issues
|
|
415
433
|
`;
|
|
416
434
|
}
|
|
417
|
-
if (result.
|
|
418
|
-
output += `\u{1F4E6} Dependency Health: ${result.
|
|
435
|
+
if (result[import_core.ToolName.DependencyHealth]) {
|
|
436
|
+
output += `\u{1F4E6} Dependency Health: ${result[import_core.ToolName.DependencyHealth].results?.length || 0} issues
|
|
419
437
|
`;
|
|
420
438
|
}
|
|
421
|
-
if (result.
|
|
422
|
-
output += `\u{1F9E0} AI Signal Clarity: ${result.
|
|
439
|
+
if (result[import_core.ToolName.AiSignalClarity]) {
|
|
440
|
+
output += `\u{1F9E0} AI Signal Clarity: ${result[import_core.ToolName.AiSignalClarity].summary?.totalSignals || 0} signals
|
|
423
441
|
`;
|
|
424
442
|
}
|
|
425
|
-
if (result.
|
|
426
|
-
output += `\u{1F9ED} Agent Grounding: ${result.
|
|
443
|
+
if (result[import_core.ToolName.AgentGrounding]) {
|
|
444
|
+
output += `\u{1F9ED} Agent Grounding: ${result[import_core.ToolName.AgentGrounding].results?.length || 0} issues
|
|
427
445
|
`;
|
|
428
446
|
}
|
|
429
|
-
if (result.
|
|
430
|
-
output += `\u{1F9EA} Testability Index: ${result.
|
|
447
|
+
if (result[import_core.ToolName.TestabilityIndex]) {
|
|
448
|
+
output += `\u{1F9EA} Testability Index: ${result[import_core.ToolName.TestabilityIndex].results?.length || 0} issues
|
|
431
449
|
`;
|
|
432
450
|
}
|
|
433
|
-
if (result.
|
|
434
|
-
output += `\u{1F4A5} Change Amplification: ${result.
|
|
451
|
+
if (result[import_core.ToolName.ChangeAmplification]) {
|
|
452
|
+
output += `\u{1F4A5} Change Amplification: ${result[import_core.ToolName.ChangeAmplification].summary?.totalIssues || 0} cascading risks
|
|
435
453
|
`;
|
|
436
454
|
}
|
|
437
455
|
return output;
|
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aiready/cli",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.6",
|
|
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/core": "0.19.
|
|
15
|
-
"@aiready/agent-grounding": "0.9.
|
|
16
|
-
"@aiready/consistency": "0.16.
|
|
17
|
-
"@aiready/
|
|
18
|
-
"@aiready/
|
|
19
|
-
"@aiready/
|
|
20
|
-
"@aiready/
|
|
21
|
-
"@aiready/
|
|
22
|
-
"@aiready/
|
|
23
|
-
"@aiready/
|
|
24
|
-
"@aiready/
|
|
14
|
+
"@aiready/core": "0.19.5",
|
|
15
|
+
"@aiready/agent-grounding": "0.9.5",
|
|
16
|
+
"@aiready/consistency": "0.16.5",
|
|
17
|
+
"@aiready/context-analyzer": "0.17.5",
|
|
18
|
+
"@aiready/deps": "0.9.5",
|
|
19
|
+
"@aiready/ai-signal-clarity": "0.9.5",
|
|
20
|
+
"@aiready/change-amplification": "0.9.5",
|
|
21
|
+
"@aiready/visualizer": "0.2.6",
|
|
22
|
+
"@aiready/doc-drift": "0.9.5",
|
|
23
|
+
"@aiready/pattern-detect": "0.12.5",
|
|
24
|
+
"@aiready/testability": "0.2.5"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/node": "^24.0.0",
|