@aiready/cli 0.9.47 → 0.10.0
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 +7 -7
- package/.turbo/turbo-test.log +5 -6
- package/dist/{chunk-6FOVC2OE.mjs → chunk-EQ2HQSTJ.mjs} +83 -61
- package/dist/cli.js +102 -75
- package/dist/cli.mjs +30 -25
- package/dist/index.js +83 -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/__tests__/cli.test.ts +6 -6
- package/src/commands/scan.ts +27 -22
- package/src/commands/visualize.ts +3 -3
- package/src/index.ts +108 -92
- 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-MEXEG3IJ.mjs +0 -389
- 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/cli.js
CHANGED
|
@@ -87,8 +87,11 @@ async function analyzeUnified(options) {
|
|
|
87
87
|
if (options.progressCallback) {
|
|
88
88
|
options.progressCallback({ tool: "patterns", data: patternResult });
|
|
89
89
|
}
|
|
90
|
-
result.
|
|
91
|
-
|
|
90
|
+
result.patternDetect = {
|
|
91
|
+
results: sortBySeverity(patternResult.results),
|
|
92
|
+
summary: patternResult.summary || {},
|
|
93
|
+
duplicates: patternResult.duplicates || []
|
|
94
|
+
};
|
|
92
95
|
result.summary.totalIssues += patternResult.results.reduce(
|
|
93
96
|
(sum, file) => sum + file.issues.length,
|
|
94
97
|
0
|
|
@@ -99,13 +102,18 @@ async function analyzeUnified(options) {
|
|
|
99
102
|
if (options.progressCallback) {
|
|
100
103
|
options.progressCallback({ tool: "context", data: contextResults });
|
|
101
104
|
}
|
|
102
|
-
|
|
105
|
+
const sorted = contextResults.sort((a, b) => {
|
|
103
106
|
const severityDiff = (severityOrder[b.severity] || 0) - (severityOrder[a.severity] || 0);
|
|
104
107
|
if (severityDiff !== 0) return severityDiff;
|
|
105
108
|
if (a.tokenCost !== b.tokenCost) return b.tokenCost - a.tokenCost;
|
|
106
109
|
return b.fragmentationScore - a.fragmentationScore;
|
|
107
110
|
});
|
|
108
|
-
|
|
111
|
+
const { generateSummary: genContextSummary } = await import("@aiready/context-analyzer");
|
|
112
|
+
result.contextAnalyzer = {
|
|
113
|
+
results: sorted,
|
|
114
|
+
summary: genContextSummary(sorted)
|
|
115
|
+
};
|
|
116
|
+
result.summary.totalIssues += sorted.length;
|
|
109
117
|
}
|
|
110
118
|
if (tools.includes("consistency")) {
|
|
111
119
|
const consistencyOptions = {
|
|
@@ -118,10 +126,10 @@ async function analyzeUnified(options) {
|
|
|
118
126
|
if (options.progressCallback) {
|
|
119
127
|
options.progressCallback({ tool: "consistency", data: report });
|
|
120
128
|
}
|
|
121
|
-
|
|
122
|
-
report.results
|
|
123
|
-
|
|
124
|
-
|
|
129
|
+
result.consistency = {
|
|
130
|
+
results: report.results ? sortBySeverity(report.results) : [],
|
|
131
|
+
summary: report.summary
|
|
132
|
+
};
|
|
125
133
|
result.summary.totalIssues += report.summary.totalIssues;
|
|
126
134
|
}
|
|
127
135
|
if (tools.includes("doc-drift")) {
|
|
@@ -135,7 +143,10 @@ async function analyzeUnified(options) {
|
|
|
135
143
|
if (options.progressCallback) {
|
|
136
144
|
options.progressCallback({ tool: "doc-drift", data: report });
|
|
137
145
|
}
|
|
138
|
-
result.docDrift =
|
|
146
|
+
result.docDrift = {
|
|
147
|
+
results: report.results || [],
|
|
148
|
+
summary: report.summary || {}
|
|
149
|
+
};
|
|
139
150
|
result.summary.totalIssues += report.issues?.length || 0;
|
|
140
151
|
}
|
|
141
152
|
if (tools.includes("deps-health")) {
|
|
@@ -149,10 +160,13 @@ async function analyzeUnified(options) {
|
|
|
149
160
|
if (options.progressCallback) {
|
|
150
161
|
options.progressCallback({ tool: "deps-health", data: report });
|
|
151
162
|
}
|
|
152
|
-
result.
|
|
163
|
+
result.dependencyHealth = {
|
|
164
|
+
results: report.results || [],
|
|
165
|
+
summary: report.summary || {}
|
|
166
|
+
};
|
|
153
167
|
result.summary.totalIssues += report.issues?.length || 0;
|
|
154
168
|
}
|
|
155
|
-
if (tools.includes("
|
|
169
|
+
if (tools.includes("ai-signal-clarity")) {
|
|
156
170
|
const { analyzeAiSignalClarity } = await import("@aiready/ai-signal-clarity");
|
|
157
171
|
const report = await analyzeAiSignalClarity({
|
|
158
172
|
rootDir: options.rootDir,
|
|
@@ -161,15 +175,18 @@ async function analyzeUnified(options) {
|
|
|
161
175
|
onProgress: options.onProgress
|
|
162
176
|
});
|
|
163
177
|
if (options.progressCallback) {
|
|
164
|
-
options.progressCallback({ tool: "
|
|
178
|
+
options.progressCallback({ tool: "ai-signal-clarity", data: report });
|
|
165
179
|
}
|
|
166
|
-
result.aiSignalClarity =
|
|
180
|
+
result.aiSignalClarity = {
|
|
181
|
+
results: report.results || [],
|
|
182
|
+
summary: report.summary || {}
|
|
183
|
+
};
|
|
167
184
|
result.summary.totalIssues += report.results?.reduce(
|
|
168
185
|
(sum, r) => sum + (r.issues?.length || 0),
|
|
169
186
|
0
|
|
170
187
|
) || 0;
|
|
171
188
|
}
|
|
172
|
-
if (tools.includes("grounding")) {
|
|
189
|
+
if (tools.includes("agent-grounding")) {
|
|
173
190
|
const { analyzeAgentGrounding } = await import("@aiready/agent-grounding");
|
|
174
191
|
const report = await analyzeAgentGrounding({
|
|
175
192
|
rootDir: options.rootDir,
|
|
@@ -178,9 +195,12 @@ async function analyzeUnified(options) {
|
|
|
178
195
|
onProgress: options.onProgress
|
|
179
196
|
});
|
|
180
197
|
if (options.progressCallback) {
|
|
181
|
-
options.progressCallback({ tool: "grounding", data: report });
|
|
198
|
+
options.progressCallback({ tool: "agent-grounding", data: report });
|
|
182
199
|
}
|
|
183
|
-
result.
|
|
200
|
+
result.agentGrounding = {
|
|
201
|
+
results: report.results || [],
|
|
202
|
+
summary: report.summary || {}
|
|
203
|
+
};
|
|
184
204
|
result.summary.totalIssues += report.issues?.length || 0;
|
|
185
205
|
}
|
|
186
206
|
if (tools.includes("testability")) {
|
|
@@ -194,10 +214,13 @@ async function analyzeUnified(options) {
|
|
|
194
214
|
if (options.progressCallback) {
|
|
195
215
|
options.progressCallback({ tool: "testability", data: report });
|
|
196
216
|
}
|
|
197
|
-
result.testability =
|
|
217
|
+
result.testability = {
|
|
218
|
+
results: report.results || [],
|
|
219
|
+
summary: report.summary || {}
|
|
220
|
+
};
|
|
198
221
|
result.summary.totalIssues += report.issues?.length || 0;
|
|
199
222
|
}
|
|
200
|
-
if (tools.includes("
|
|
223
|
+
if (tools.includes("change-amplification")) {
|
|
201
224
|
const { analyzeChangeAmplification } = await import("@aiready/change-amplification");
|
|
202
225
|
const report = await analyzeChangeAmplification({
|
|
203
226
|
rootDir: options.rootDir,
|
|
@@ -206,9 +229,12 @@ async function analyzeUnified(options) {
|
|
|
206
229
|
onProgress: options.onProgress
|
|
207
230
|
});
|
|
208
231
|
if (options.progressCallback) {
|
|
209
|
-
options.progressCallback({ tool: "
|
|
232
|
+
options.progressCallback({ tool: "change-amplification", data: report });
|
|
210
233
|
}
|
|
211
|
-
result.changeAmplification =
|
|
234
|
+
result.changeAmplification = {
|
|
235
|
+
results: report.results || [],
|
|
236
|
+
summary: report.summary || {}
|
|
237
|
+
};
|
|
212
238
|
result.summary.totalIssues += report.summary?.totalIssues || 0;
|
|
213
239
|
}
|
|
214
240
|
result.summary.executionTime = Date.now() - startTime;
|
|
@@ -216,14 +242,14 @@ async function analyzeUnified(options) {
|
|
|
216
242
|
}
|
|
217
243
|
async function scoreUnified(results, options) {
|
|
218
244
|
const toolScores = /* @__PURE__ */ new Map();
|
|
219
|
-
if (results.
|
|
245
|
+
if (results.patternDetect) {
|
|
220
246
|
const { calculatePatternScore } = await import("@aiready/pattern-detect");
|
|
221
247
|
try {
|
|
222
248
|
const patternScore = calculatePatternScore(
|
|
223
|
-
results.duplicates,
|
|
224
|
-
results.
|
|
249
|
+
results.patternDetect.duplicates,
|
|
250
|
+
results.patternDetect.results?.length || 0
|
|
225
251
|
);
|
|
226
|
-
const wastedTokens = results.duplicates.reduce(
|
|
252
|
+
const wastedTokens = results.patternDetect.duplicates.reduce(
|
|
227
253
|
(sum, d) => sum + (d.tokenCost || 0),
|
|
228
254
|
0
|
|
229
255
|
);
|
|
@@ -241,10 +267,10 @@ async function scoreUnified(results, options) {
|
|
|
241
267
|
void err;
|
|
242
268
|
}
|
|
243
269
|
}
|
|
244
|
-
if (results.
|
|
245
|
-
const {
|
|
270
|
+
if (results.contextAnalyzer) {
|
|
271
|
+
const { calculateContextScore } = await import("@aiready/context-analyzer");
|
|
246
272
|
try {
|
|
247
|
-
const ctxSummary =
|
|
273
|
+
const ctxSummary = results.contextAnalyzer.summary;
|
|
248
274
|
const contextScore = calculateContextScore(ctxSummary);
|
|
249
275
|
contextScore.tokenBudget = (0, import_core.calculateTokenBudget)({
|
|
250
276
|
totalContextTokens: ctxSummary.totalTokens,
|
|
@@ -279,10 +305,10 @@ async function scoreUnified(results, options) {
|
|
|
279
305
|
void err;
|
|
280
306
|
}
|
|
281
307
|
}
|
|
282
|
-
if (results.
|
|
308
|
+
if (results.agentGrounding) {
|
|
283
309
|
const { calculateGroundingScore } = await import("@aiready/agent-grounding");
|
|
284
310
|
try {
|
|
285
|
-
const agScore = calculateGroundingScore(results.
|
|
311
|
+
const agScore = calculateGroundingScore(results.agentGrounding);
|
|
286
312
|
toolScores.set("agent-grounding", agScore);
|
|
287
313
|
} catch (err) {
|
|
288
314
|
void err;
|
|
@@ -300,10 +326,10 @@ async function scoreUnified(results, options) {
|
|
|
300
326
|
if (results.docDrift) {
|
|
301
327
|
toolScores.set("doc-drift", {
|
|
302
328
|
toolName: "doc-drift",
|
|
303
|
-
score: results.docDrift.summary.score,
|
|
304
|
-
rawMetrics: results.docDrift.
|
|
329
|
+
score: results.docDrift.summary.score || results.docDrift.summary.totalScore || 0,
|
|
330
|
+
rawMetrics: results.docDrift.summary,
|
|
305
331
|
factors: [],
|
|
306
|
-
recommendations: (results.docDrift.recommendations || []).map(
|
|
332
|
+
recommendations: (results.docDrift.summary.recommendations || []).map(
|
|
307
333
|
(action) => ({
|
|
308
334
|
action,
|
|
309
335
|
estimatedImpact: 5,
|
|
@@ -312,34 +338,30 @@ async function scoreUnified(results, options) {
|
|
|
312
338
|
)
|
|
313
339
|
});
|
|
314
340
|
}
|
|
315
|
-
if (results.
|
|
341
|
+
if (results.dependencyHealth) {
|
|
316
342
|
toolScores.set("dependency-health", {
|
|
317
343
|
toolName: "dependency-health",
|
|
318
|
-
score: results.
|
|
319
|
-
rawMetrics: results.
|
|
344
|
+
score: results.dependencyHealth.summary.score || 0,
|
|
345
|
+
rawMetrics: results.dependencyHealth.summary,
|
|
320
346
|
factors: [],
|
|
321
|
-
recommendations: (results.
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
})
|
|
327
|
-
)
|
|
347
|
+
recommendations: (results.dependencyHealth.summary.recommendations || []).map((action) => ({
|
|
348
|
+
action,
|
|
349
|
+
estimatedImpact: 5,
|
|
350
|
+
priority: "medium"
|
|
351
|
+
}))
|
|
328
352
|
});
|
|
329
353
|
}
|
|
330
354
|
if (results.changeAmplification) {
|
|
331
355
|
toolScores.set("change-amplification", {
|
|
332
356
|
toolName: "change-amplification",
|
|
333
|
-
score: results.changeAmplification.summary.score,
|
|
334
|
-
rawMetrics: results.changeAmplification.
|
|
357
|
+
score: results.changeAmplification.summary.score || 0,
|
|
358
|
+
rawMetrics: results.changeAmplification.summary,
|
|
335
359
|
factors: [],
|
|
336
|
-
recommendations: (results.changeAmplification.recommendations || []).map(
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
})
|
|
342
|
-
)
|
|
360
|
+
recommendations: (results.changeAmplification.summary.recommendations || []).map((action) => ({
|
|
361
|
+
action,
|
|
362
|
+
estimatedImpact: 5,
|
|
363
|
+
priority: "medium"
|
|
364
|
+
}))
|
|
343
365
|
});
|
|
344
366
|
}
|
|
345
367
|
if (toolScores.size === 0) {
|
|
@@ -596,12 +618,12 @@ async function scanAction(directory, options) {
|
|
|
596
618
|
"patterns",
|
|
597
619
|
"context",
|
|
598
620
|
"consistency",
|
|
599
|
-
"
|
|
600
|
-
"grounding",
|
|
621
|
+
"ai-signal-clarity",
|
|
622
|
+
"agent-grounding",
|
|
601
623
|
"testability",
|
|
602
624
|
"doc-drift",
|
|
603
625
|
"deps-health",
|
|
604
|
-
"
|
|
626
|
+
"change-amplification"
|
|
605
627
|
],
|
|
606
628
|
include: void 0,
|
|
607
629
|
exclude: void 0,
|
|
@@ -619,7 +641,11 @@ async function scanAction(directory, options) {
|
|
|
619
641
|
if (options.profile) {
|
|
620
642
|
switch (options.profile.toLowerCase()) {
|
|
621
643
|
case "agentic":
|
|
622
|
-
profileTools = [
|
|
644
|
+
profileTools = [
|
|
645
|
+
"ai-signal-clarity",
|
|
646
|
+
"agent-grounding",
|
|
647
|
+
"testability"
|
|
648
|
+
];
|
|
623
649
|
break;
|
|
624
650
|
case "cost":
|
|
625
651
|
profileTools = ["patterns", "context"];
|
|
@@ -628,7 +654,7 @@ async function scanAction(directory, options) {
|
|
|
628
654
|
profileTools = ["consistency", "testability"];
|
|
629
655
|
break;
|
|
630
656
|
case "onboarding":
|
|
631
|
-
profileTools = ["context", "consistency", "grounding"];
|
|
657
|
+
profileTools = ["context", "consistency", "agent-grounding"];
|
|
632
658
|
break;
|
|
633
659
|
default:
|
|
634
660
|
console.log(
|
|
@@ -941,21 +967,22 @@ async function scanAction(directory, options) {
|
|
|
941
967
|
console.log(
|
|
942
968
|
` Total issues (all tools): ${import_chalk3.default.bold(String(results.summary.totalIssues || 0))}`
|
|
943
969
|
);
|
|
944
|
-
if (results.
|
|
970
|
+
if (results.patternDetect) {
|
|
945
971
|
console.log(
|
|
946
|
-
` Duplicate patterns found: ${import_chalk3.default.bold(String(results.duplicates
|
|
972
|
+
` Duplicate patterns found: ${import_chalk3.default.bold(String(results.patternDetect.duplicates?.length || 0))}`
|
|
947
973
|
);
|
|
948
|
-
if (results.patterns)
|
|
949
974
|
console.log(
|
|
950
|
-
` Pattern files with issues: ${import_chalk3.default.bold(String(results.
|
|
975
|
+
` Pattern files with issues: ${import_chalk3.default.bold(String(results.patternDetect.results.length || 0))}`
|
|
951
976
|
);
|
|
952
|
-
|
|
977
|
+
}
|
|
978
|
+
if (results.contextAnalyzer)
|
|
953
979
|
console.log(
|
|
954
|
-
` Context issues: ${import_chalk3.default.bold(String(results.
|
|
980
|
+
` Context issues: ${import_chalk3.default.bold(String(results.contextAnalyzer.results.length || 0))}`
|
|
981
|
+
);
|
|
982
|
+
if (results.consistency)
|
|
983
|
+
console.log(
|
|
984
|
+
` Consistency issues: ${import_chalk3.default.bold(String(results.consistency.summary?.totalIssues || 0))}`
|
|
955
985
|
);
|
|
956
|
-
console.log(
|
|
957
|
-
` Consistency issues: ${import_chalk3.default.bold(String(results.consistency?.summary?.totalIssues || 0))}`
|
|
958
|
-
);
|
|
959
986
|
if (results.changeAmplification)
|
|
960
987
|
console.log(
|
|
961
988
|
` Change amplification: ${import_chalk3.default.bold(String(results.changeAmplification.summary?.score || 0))}/100`
|
|
@@ -1177,8 +1204,8 @@ async function scanAction(directory, options) {
|
|
|
1177
1204
|
`::notice::AI Readiness Score: ${scoringResult.overall}/100 (threshold: ${threshold})`
|
|
1178
1205
|
);
|
|
1179
1206
|
}
|
|
1180
|
-
if (results.
|
|
1181
|
-
const criticalPatterns = results.
|
|
1207
|
+
if (results.patternDetect) {
|
|
1208
|
+
const criticalPatterns = results.patternDetect.results.flatMap(
|
|
1182
1209
|
(p) => p.issues.filter((i) => i.severity === "critical")
|
|
1183
1210
|
);
|
|
1184
1211
|
criticalPatterns.slice(0, 10).forEach((issue) => {
|
|
@@ -1199,21 +1226,21 @@ async function scanAction(directory, options) {
|
|
|
1199
1226
|
const minSeverity = severityLevels[failOnLevel] || 4;
|
|
1200
1227
|
let criticalCount = 0;
|
|
1201
1228
|
let majorCount = 0;
|
|
1202
|
-
if (results.
|
|
1203
|
-
results.
|
|
1229
|
+
if (results.patternDetect) {
|
|
1230
|
+
results.patternDetect.results.forEach((p) => {
|
|
1204
1231
|
p.issues.forEach((i) => {
|
|
1205
1232
|
if (i.severity === "critical") criticalCount++;
|
|
1206
1233
|
if (i.severity === "major") majorCount++;
|
|
1207
1234
|
});
|
|
1208
1235
|
});
|
|
1209
1236
|
}
|
|
1210
|
-
if (results.
|
|
1211
|
-
results.
|
|
1237
|
+
if (results.contextAnalyzer) {
|
|
1238
|
+
results.contextAnalyzer.results.forEach((c) => {
|
|
1212
1239
|
if (c.severity === "critical") criticalCount++;
|
|
1213
1240
|
if (c.severity === "major") majorCount++;
|
|
1214
1241
|
});
|
|
1215
1242
|
}
|
|
1216
|
-
if (results.consistency
|
|
1243
|
+
if (results.consistency) {
|
|
1217
1244
|
results.consistency.results.forEach((r) => {
|
|
1218
1245
|
r.issues?.forEach((i) => {
|
|
1219
1246
|
if (i.severity === "critical") criticalCount++;
|
|
@@ -1865,11 +1892,11 @@ Or specify a custom report:
|
|
|
1865
1892
|
let devServerStarted = false;
|
|
1866
1893
|
if (useDevMode) {
|
|
1867
1894
|
try {
|
|
1868
|
-
const
|
|
1895
|
+
const localWebDir = (0, import_path7.resolve)(dirPath, "packages/visualizer");
|
|
1869
1896
|
let webDir = "";
|
|
1870
1897
|
let visualizerAvailable = false;
|
|
1871
|
-
if ((0, import_fs5.existsSync)(
|
|
1872
|
-
webDir =
|
|
1898
|
+
if ((0, import_fs5.existsSync)(localWebDir)) {
|
|
1899
|
+
webDir = localWebDir;
|
|
1873
1900
|
visualizerAvailable = true;
|
|
1874
1901
|
} else {
|
|
1875
1902
|
const nodemodulesLocations = [
|
package/dist/cli.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
__require,
|
|
4
4
|
analyzeUnified,
|
|
5
5
|
scoreUnified
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-EQ2HQSTJ.mjs";
|
|
7
7
|
|
|
8
8
|
// src/cli.ts
|
|
9
9
|
import { Command } from "commander";
|
|
@@ -268,12 +268,12 @@ async function scanAction(directory, options) {
|
|
|
268
268
|
"patterns",
|
|
269
269
|
"context",
|
|
270
270
|
"consistency",
|
|
271
|
-
"
|
|
272
|
-
"grounding",
|
|
271
|
+
"ai-signal-clarity",
|
|
272
|
+
"agent-grounding",
|
|
273
273
|
"testability",
|
|
274
274
|
"doc-drift",
|
|
275
275
|
"deps-health",
|
|
276
|
-
"
|
|
276
|
+
"change-amplification"
|
|
277
277
|
],
|
|
278
278
|
include: void 0,
|
|
279
279
|
exclude: void 0,
|
|
@@ -291,7 +291,11 @@ async function scanAction(directory, options) {
|
|
|
291
291
|
if (options.profile) {
|
|
292
292
|
switch (options.profile.toLowerCase()) {
|
|
293
293
|
case "agentic":
|
|
294
|
-
profileTools = [
|
|
294
|
+
profileTools = [
|
|
295
|
+
"ai-signal-clarity",
|
|
296
|
+
"agent-grounding",
|
|
297
|
+
"testability"
|
|
298
|
+
];
|
|
295
299
|
break;
|
|
296
300
|
case "cost":
|
|
297
301
|
profileTools = ["patterns", "context"];
|
|
@@ -300,7 +304,7 @@ async function scanAction(directory, options) {
|
|
|
300
304
|
profileTools = ["consistency", "testability"];
|
|
301
305
|
break;
|
|
302
306
|
case "onboarding":
|
|
303
|
-
profileTools = ["context", "consistency", "grounding"];
|
|
307
|
+
profileTools = ["context", "consistency", "agent-grounding"];
|
|
304
308
|
break;
|
|
305
309
|
default:
|
|
306
310
|
console.log(
|
|
@@ -613,21 +617,22 @@ async function scanAction(directory, options) {
|
|
|
613
617
|
console.log(
|
|
614
618
|
` Total issues (all tools): ${chalk3.bold(String(results.summary.totalIssues || 0))}`
|
|
615
619
|
);
|
|
616
|
-
if (results.
|
|
620
|
+
if (results.patternDetect) {
|
|
617
621
|
console.log(
|
|
618
|
-
` Duplicate patterns found: ${chalk3.bold(String(results.duplicates
|
|
622
|
+
` Duplicate patterns found: ${chalk3.bold(String(results.patternDetect.duplicates?.length || 0))}`
|
|
619
623
|
);
|
|
620
|
-
if (results.patterns)
|
|
621
624
|
console.log(
|
|
622
|
-
` Pattern files with issues: ${chalk3.bold(String(results.
|
|
625
|
+
` Pattern files with issues: ${chalk3.bold(String(results.patternDetect.results.length || 0))}`
|
|
623
626
|
);
|
|
624
|
-
|
|
627
|
+
}
|
|
628
|
+
if (results.contextAnalyzer)
|
|
625
629
|
console.log(
|
|
626
|
-
` Context issues: ${chalk3.bold(String(results.
|
|
630
|
+
` Context issues: ${chalk3.bold(String(results.contextAnalyzer.results.length || 0))}`
|
|
631
|
+
);
|
|
632
|
+
if (results.consistency)
|
|
633
|
+
console.log(
|
|
634
|
+
` Consistency issues: ${chalk3.bold(String(results.consistency.summary?.totalIssues || 0))}`
|
|
627
635
|
);
|
|
628
|
-
console.log(
|
|
629
|
-
` Consistency issues: ${chalk3.bold(String(results.consistency?.summary?.totalIssues || 0))}`
|
|
630
|
-
);
|
|
631
636
|
if (results.changeAmplification)
|
|
632
637
|
console.log(
|
|
633
638
|
` Change amplification: ${chalk3.bold(String(results.changeAmplification.summary?.score || 0))}/100`
|
|
@@ -849,8 +854,8 @@ async function scanAction(directory, options) {
|
|
|
849
854
|
`::notice::AI Readiness Score: ${scoringResult.overall}/100 (threshold: ${threshold})`
|
|
850
855
|
);
|
|
851
856
|
}
|
|
852
|
-
if (results.
|
|
853
|
-
const criticalPatterns = results.
|
|
857
|
+
if (results.patternDetect) {
|
|
858
|
+
const criticalPatterns = results.patternDetect.results.flatMap(
|
|
854
859
|
(p) => p.issues.filter((i) => i.severity === "critical")
|
|
855
860
|
);
|
|
856
861
|
criticalPatterns.slice(0, 10).forEach((issue) => {
|
|
@@ -871,21 +876,21 @@ async function scanAction(directory, options) {
|
|
|
871
876
|
const minSeverity = severityLevels[failOnLevel] || 4;
|
|
872
877
|
let criticalCount = 0;
|
|
873
878
|
let majorCount = 0;
|
|
874
|
-
if (results.
|
|
875
|
-
results.
|
|
879
|
+
if (results.patternDetect) {
|
|
880
|
+
results.patternDetect.results.forEach((p) => {
|
|
876
881
|
p.issues.forEach((i) => {
|
|
877
882
|
if (i.severity === "critical") criticalCount++;
|
|
878
883
|
if (i.severity === "major") majorCount++;
|
|
879
884
|
});
|
|
880
885
|
});
|
|
881
886
|
}
|
|
882
|
-
if (results.
|
|
883
|
-
results.
|
|
887
|
+
if (results.contextAnalyzer) {
|
|
888
|
+
results.contextAnalyzer.results.forEach((c) => {
|
|
884
889
|
if (c.severity === "critical") criticalCount++;
|
|
885
890
|
if (c.severity === "major") majorCount++;
|
|
886
891
|
});
|
|
887
892
|
}
|
|
888
|
-
if (results.consistency
|
|
893
|
+
if (results.consistency) {
|
|
889
894
|
results.consistency.results.forEach((r) => {
|
|
890
895
|
r.issues?.forEach((i) => {
|
|
891
896
|
if (i.severity === "critical") criticalCount++;
|
|
@@ -1558,11 +1563,11 @@ Or specify a custom report:
|
|
|
1558
1563
|
let devServerStarted = false;
|
|
1559
1564
|
if (useDevMode) {
|
|
1560
1565
|
try {
|
|
1561
|
-
const
|
|
1566
|
+
const localWebDir = resolvePath7(dirPath, "packages/visualizer");
|
|
1562
1567
|
let webDir = "";
|
|
1563
1568
|
let visualizerAvailable = false;
|
|
1564
|
-
if (existsSync2(
|
|
1565
|
-
webDir =
|
|
1569
|
+
if (existsSync2(localWebDir)) {
|
|
1570
|
+
webDir = localWebDir;
|
|
1566
1571
|
visualizerAvailable = true;
|
|
1567
1572
|
} else {
|
|
1568
1573
|
const nodemodulesLocations = [
|