@aiready/cli 0.9.46 → 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.
Files changed (54) hide show
  1. package/.turbo/turbo-build.log +8 -8
  2. package/.turbo/turbo-test.log +6 -7
  3. package/dist/{chunk-6FOVC2OE.mjs → chunk-EQ2HQSTJ.mjs} +83 -61
  4. package/dist/cli.js +102 -75
  5. package/dist/cli.mjs +30 -25
  6. package/dist/index.js +83 -61
  7. package/dist/index.mjs +1 -1
  8. package/package.json +12 -12
  9. package/src/.aiready/aiready-report-20260304-234659.json +8288 -0
  10. package/src/.aiready/aiready-report-20260305-153847.json +8015 -0
  11. package/src/.aiready/aiready-report-20260305-154121.json +8015 -0
  12. package/src/.aiready/aiready-report-20260305-160026.json +8015 -0
  13. package/src/.aiready/aiready-report-20260305-160752.json +8015 -0
  14. package/src/.aiready/aiready-report-20260305-163858.json +8015 -0
  15. package/src/__tests__/cli.test.ts +6 -6
  16. package/src/commands/scan.ts +27 -22
  17. package/src/commands/visualize.ts +3 -3
  18. package/src/index.ts +108 -92
  19. package/dist/__tests__/cli.test.d.ts +0 -2
  20. package/dist/__tests__/cli.test.d.ts.map +0 -1
  21. package/dist/__tests__/cli.test.js +0 -52
  22. package/dist/__tests__/cli.test.js.map +0 -1
  23. package/dist/agent-grounding-DAOSU4MF.mjs +0 -7
  24. package/dist/chunk-2LXCBVPN.mjs +0 -109
  25. package/dist/chunk-3SG2GLFJ.mjs +0 -118
  26. package/dist/chunk-5GZDRZ3T.mjs +0 -126
  27. package/dist/chunk-DEZVFBPS.mjs +0 -111
  28. package/dist/chunk-G6SDH7ZS.mjs +0 -126
  29. package/dist/chunk-HLBKROD3.mjs +0 -237
  30. package/dist/chunk-JQG7ZATX.mjs +0 -211
  31. package/dist/chunk-LLJMKNBI.mjs +0 -243
  32. package/dist/chunk-M7O2MEM5.mjs +0 -211
  33. package/dist/chunk-MEXEG3IJ.mjs +0 -389
  34. package/dist/chunk-N4SLON5K.mjs +0 -152
  35. package/dist/chunk-OVELUOM6.mjs +0 -112
  36. package/dist/chunk-P3XAXCTK.mjs +0 -110
  37. package/dist/chunk-PDOONNSK.mjs +0 -228
  38. package/dist/chunk-QXQP6BMO.mjs +0 -109
  39. package/dist/chunk-RBWLQRKR.mjs +0 -39
  40. package/dist/chunk-XAF2EW5H.mjs +0 -46
  41. package/dist/chunk-Y6FXYEAI.mjs +0 -10
  42. package/dist/chunk-YIS6WTY5.mjs +0 -35
  43. package/dist/cli.d.mts +0 -1
  44. package/dist/cli.d.ts +0 -3
  45. package/dist/cli.d.ts.map +0 -1
  46. package/dist/cli.js.map +0 -1
  47. package/dist/deps-health-UWVYJ7FZ.mjs +0 -47
  48. package/dist/doc-drift-G7MGAZAE.mjs +0 -47
  49. package/dist/hallucination-risk-XU6E7IGN.mjs +0 -7
  50. package/dist/index.d.mts +0 -33
  51. package/dist/index.d.ts +0 -32
  52. package/dist/index.d.ts.map +0 -1
  53. package/dist/index.js.map +0 -1
  54. 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.patterns = sortBySeverity(patternResult.results);
90
- result.duplicates = patternResult.duplicates;
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
- result.context = contextResults.sort((a, b) => {
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
- result.summary.totalIssues += result.context?.length || 0;
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
- if (report.results) {
121
- report.results = sortBySeverity(report.results);
122
- }
123
- result.consistency = report;
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 = report;
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.deps = report;
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("aiSignalClarity")) {
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,18 @@ async function analyzeUnified(options) {
160
174
  onProgress: options.onProgress
161
175
  });
162
176
  if (options.progressCallback) {
163
- options.progressCallback({ tool: "aiSignalClarity", data: report });
177
+ options.progressCallback({ tool: "ai-signal-clarity", data: report });
164
178
  }
165
- result.aiSignalClarity = report;
179
+ result.aiSignalClarity = {
180
+ results: report.results || [],
181
+ summary: report.summary || {}
182
+ };
166
183
  result.summary.totalIssues += report.results?.reduce(
167
184
  (sum, r) => sum + (r.issues?.length || 0),
168
185
  0
169
186
  ) || 0;
170
187
  }
171
- if (tools.includes("grounding")) {
188
+ if (tools.includes("agent-grounding")) {
172
189
  const { analyzeAgentGrounding } = await import("@aiready/agent-grounding");
173
190
  const report = await analyzeAgentGrounding({
174
191
  rootDir: options.rootDir,
@@ -177,9 +194,12 @@ async function analyzeUnified(options) {
177
194
  onProgress: options.onProgress
178
195
  });
179
196
  if (options.progressCallback) {
180
- options.progressCallback({ tool: "grounding", data: report });
197
+ options.progressCallback({ tool: "agent-grounding", data: report });
181
198
  }
182
- result.grounding = report;
199
+ result.agentGrounding = {
200
+ results: report.results || [],
201
+ summary: report.summary || {}
202
+ };
183
203
  result.summary.totalIssues += report.issues?.length || 0;
184
204
  }
185
205
  if (tools.includes("testability")) {
@@ -193,10 +213,13 @@ async function analyzeUnified(options) {
193
213
  if (options.progressCallback) {
194
214
  options.progressCallback({ tool: "testability", data: report });
195
215
  }
196
- result.testability = report;
216
+ result.testability = {
217
+ results: report.results || [],
218
+ summary: report.summary || {}
219
+ };
197
220
  result.summary.totalIssues += report.issues?.length || 0;
198
221
  }
199
- if (tools.includes("changeAmplification")) {
222
+ if (tools.includes("change-amplification")) {
200
223
  const { analyzeChangeAmplification } = await import("@aiready/change-amplification");
201
224
  const report = await analyzeChangeAmplification({
202
225
  rootDir: options.rootDir,
@@ -205,9 +228,12 @@ async function analyzeUnified(options) {
205
228
  onProgress: options.onProgress
206
229
  });
207
230
  if (options.progressCallback) {
208
- options.progressCallback({ tool: "changeAmplification", data: report });
231
+ options.progressCallback({ tool: "change-amplification", data: report });
209
232
  }
210
- result.changeAmplification = report;
233
+ result.changeAmplification = {
234
+ results: report.results || [],
235
+ summary: report.summary || {}
236
+ };
211
237
  result.summary.totalIssues += report.summary?.totalIssues || 0;
212
238
  }
213
239
  result.summary.executionTime = Date.now() - startTime;
@@ -215,14 +241,14 @@ async function analyzeUnified(options) {
215
241
  }
216
242
  async function scoreUnified(results, options) {
217
243
  const toolScores = /* @__PURE__ */ new Map();
218
- if (results.duplicates) {
244
+ if (results.patternDetect) {
219
245
  const { calculatePatternScore } = await import("@aiready/pattern-detect");
220
246
  try {
221
247
  const patternScore = calculatePatternScore(
222
- results.duplicates,
223
- results.patterns?.length || 0
248
+ results.patternDetect.duplicates,
249
+ results.patternDetect.results?.length || 0
224
250
  );
225
- const wastedTokens = results.duplicates.reduce(
251
+ const wastedTokens = results.patternDetect.duplicates.reduce(
226
252
  (sum, d) => sum + (d.tokenCost || 0),
227
253
  0
228
254
  );
@@ -240,10 +266,10 @@ async function scoreUnified(results, options) {
240
266
  void err;
241
267
  }
242
268
  }
243
- if (results.context) {
244
- const { generateSummary: genContextSummary, calculateContextScore } = await import("@aiready/context-analyzer");
269
+ if (results.contextAnalyzer) {
270
+ const { calculateContextScore } = await import("@aiready/context-analyzer");
245
271
  try {
246
- const ctxSummary = genContextSummary(results.context);
272
+ const ctxSummary = results.contextAnalyzer.summary;
247
273
  const contextScore = calculateContextScore(ctxSummary);
248
274
  contextScore.tokenBudget = (0, import_core.calculateTokenBudget)({
249
275
  totalContextTokens: ctxSummary.totalTokens,
@@ -278,10 +304,10 @@ async function scoreUnified(results, options) {
278
304
  void err;
279
305
  }
280
306
  }
281
- if (results.grounding) {
307
+ if (results.agentGrounding) {
282
308
  const { calculateGroundingScore } = await import("@aiready/agent-grounding");
283
309
  try {
284
- const agScore = calculateGroundingScore(results.grounding);
310
+ const agScore = calculateGroundingScore(results.agentGrounding);
285
311
  toolScores.set("agent-grounding", agScore);
286
312
  } catch (err) {
287
313
  void err;
@@ -299,10 +325,10 @@ async function scoreUnified(results, options) {
299
325
  if (results.docDrift) {
300
326
  toolScores.set("doc-drift", {
301
327
  toolName: "doc-drift",
302
- score: results.docDrift.summary.score,
303
- rawMetrics: results.docDrift.rawData,
328
+ score: results.docDrift.summary.score || results.docDrift.summary.totalScore || 0,
329
+ rawMetrics: results.docDrift.summary,
304
330
  factors: [],
305
- recommendations: (results.docDrift.recommendations || []).map(
331
+ recommendations: (results.docDrift.summary.recommendations || []).map(
306
332
  (action) => ({
307
333
  action,
308
334
  estimatedImpact: 5,
@@ -311,34 +337,30 @@ async function scoreUnified(results, options) {
311
337
  )
312
338
  });
313
339
  }
314
- if (results.deps) {
340
+ if (results.dependencyHealth) {
315
341
  toolScores.set("dependency-health", {
316
342
  toolName: "dependency-health",
317
- score: results.deps.summary.score,
318
- rawMetrics: results.deps.rawData,
343
+ score: results.dependencyHealth.summary.score || 0,
344
+ rawMetrics: results.dependencyHealth.summary,
319
345
  factors: [],
320
- recommendations: (results.deps.recommendations || []).map(
321
- (action) => ({
322
- action,
323
- estimatedImpact: 5,
324
- priority: "medium"
325
- })
326
- )
346
+ recommendations: (results.dependencyHealth.summary.recommendations || []).map((action) => ({
347
+ action,
348
+ estimatedImpact: 5,
349
+ priority: "medium"
350
+ }))
327
351
  });
328
352
  }
329
353
  if (results.changeAmplification) {
330
354
  toolScores.set("change-amplification", {
331
355
  toolName: "change-amplification",
332
- score: results.changeAmplification.summary.score,
333
- rawMetrics: results.changeAmplification.rawData,
356
+ score: results.changeAmplification.summary.score || 0,
357
+ rawMetrics: results.changeAmplification.summary,
334
358
  factors: [],
335
- recommendations: (results.changeAmplification.recommendations || []).map(
336
- (action) => ({
337
- action,
338
- estimatedImpact: 5,
339
- priority: "medium"
340
- })
341
- )
359
+ recommendations: (results.changeAmplification.summary.recommendations || []).map((action) => ({
360
+ action,
361
+ estimatedImpact: 5,
362
+ priority: "medium"
363
+ }))
342
364
  });
343
365
  }
344
366
  if (toolScores.size === 0) {
@@ -371,12 +393,12 @@ function generateUnifiedSummary(result) {
371
393
  output += ` Execution time: ${(summary.executionTime / 1e3).toFixed(2)}s
372
394
 
373
395
  `;
374
- if (result.patterns) {
375
- output += `\u{1F50D} Pattern Analysis: ${result.patterns.length} issues
396
+ if (result.patternDetect) {
397
+ output += `\u{1F50D} Pattern Analysis: ${result.patternDetect.results.length} issues
376
398
  `;
377
399
  }
378
- if (result.context) {
379
- output += `\u{1F9E0} Context Analysis: ${result.context.length} issues
400
+ if (result.contextAnalyzer) {
401
+ output += `\u{1F9E0} Context Analysis: ${result.contextAnalyzer.results.length} issues
380
402
  `;
381
403
  }
382
404
  if (result.consistency) {
@@ -384,23 +406,23 @@ function generateUnifiedSummary(result) {
384
406
  `;
385
407
  }
386
408
  if (result.docDrift) {
387
- output += `\u{1F4DD} Doc Drift Analysis: ${result.docDrift.issues?.length || 0} issues
409
+ output += `\u{1F4DD} Doc Drift Analysis: ${result.docDrift.results?.length || 0} issues
388
410
  `;
389
411
  }
390
- if (result.deps) {
391
- output += `\u{1F4E6} Dependency Health: ${result.deps.issues?.length || 0} issues
412
+ if (result.dependencyHealth) {
413
+ output += `\u{1F4E6} Dependency Health: ${result.dependencyHealth.results?.length || 0} issues
392
414
  `;
393
415
  }
394
416
  if (result.aiSignalClarity) {
395
417
  output += `\u{1F9E0} AI Signal Clarity: ${result.aiSignalClarity.summary?.totalSignals || 0} signals
396
418
  `;
397
419
  }
398
- if (result.grounding) {
399
- output += `\u{1F9ED} Agent Grounding: ${result.grounding.issues?.length || 0} issues
420
+ if (result.agentGrounding) {
421
+ output += `\u{1F9ED} Agent Grounding: ${result.agentGrounding.results?.length || 0} issues
400
422
  `;
401
423
  }
402
424
  if (result.testability) {
403
- output += `\u{1F9EA} Testability Index: ${result.testability.issues?.length || 0} issues
425
+ output += `\u{1F9EA} Testability Index: ${result.testability.results?.length || 0} issues
404
426
  `;
405
427
  }
406
428
  if (result.changeAmplification) {
package/dist/index.mjs CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  analyzeUnified,
3
3
  generateUnifiedSummary,
4
4
  scoreUnified
5
- } from "./chunk-6FOVC2OE.mjs";
5
+ } from "./chunk-EQ2HQSTJ.mjs";
6
6
  export {
7
7
  analyzeUnified,
8
8
  generateUnifiedSummary,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiready/cli",
3
- "version": "0.9.46",
3
+ "version": "0.10.0",
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.9.38",
15
- "@aiready/change-amplification": "0.1.11",
16
- "@aiready/doc-drift": "0.1.11",
17
- "@aiready/agent-grounding": "0.1.11",
18
- "@aiready/testability": "0.1.11",
19
- "@aiready/deps": "0.1.11",
20
- "@aiready/visualizer": "0.1.43",
21
- "@aiready/ai-signal-clarity": "0.1.11",
22
- "@aiready/context-analyzer": "0.9.41",
23
- "@aiready/pattern-detect": "0.11.37",
24
- "@aiready/consistency": "0.8.37"
14
+ "@aiready/consistency": "0.16.0",
15
+ "@aiready/core": "0.19.0",
16
+ "@aiready/context-analyzer": "0.17.0",
17
+ "@aiready/agent-grounding": "0.9.0",
18
+ "@aiready/visualizer": "0.2.0",
19
+ "@aiready/deps": "0.9.0",
20
+ "@aiready/testability": "0.2.0",
21
+ "@aiready/doc-drift": "0.9.0",
22
+ "@aiready/ai-signal-clarity": "0.9.0",
23
+ "@aiready/change-amplification": "0.9.0",
24
+ "@aiready/pattern-detect": "0.12.0"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@types/node": "^24.0.0",