@aiready/cli 0.9.36 โ†’ 0.9.39

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/dist/cli.mjs CHANGED
@@ -1,13 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
+ __require,
3
4
  analyzeUnified
4
- } from "./chunk-N4SLON5K.mjs";
5
- import "./chunk-RBWLQRKR.mjs";
6
- import "./chunk-YIS6WTY5.mjs";
7
- import "./chunk-XAF2EW5H.mjs";
8
- import {
9
- __require
10
- } from "./chunk-Y6FXYEAI.mjs";
5
+ } from "./chunk-PDOONNSK.mjs";
11
6
 
12
7
  // src/cli.ts
13
8
  import { Command } from "commander";
@@ -59,7 +54,7 @@ function findLatestScanReport(dirPath) {
59
54
  }
60
55
  function warnIfGraphCapExceeded(report, dirPath) {
61
56
  try {
62
- const { loadConfig } = __require("@aiready/core");
57
+ const { loadConfig: loadConfig4 } = __require("@aiready/core");
63
58
  let graphConfig = { maxNodes: 400, maxEdges: 600 };
64
59
  const configPath = resolvePath(dirPath, "aiready.json");
65
60
  if (existsSync(configPath)) {
@@ -145,7 +140,7 @@ async function scanAction(directory, options) {
145
140
  const resolvedDir = resolvePath2(process.cwd(), directory || ".");
146
141
  try {
147
142
  const defaults = {
148
- tools: ["patterns", "context", "consistency", "hallucination", "grounding", "testability", "doc-drift", "deps-health"],
143
+ tools: ["patterns", "context", "consistency", "aiSignalClarity", "grounding", "testability", "doc-drift", "deps-health"],
149
144
  include: void 0,
150
145
  exclude: void 0,
151
146
  output: {
@@ -153,11 +148,15 @@ async function scanAction(directory, options) {
153
148
  file: void 0
154
149
  }
155
150
  };
156
- let profileTools = options.tools ? options.tools.split(",").map((t) => t.trim()) : void 0;
151
+ let profileTools = options.tools ? options.tools.split(",").map((t) => {
152
+ const tool = t.trim();
153
+ if (tool === "hallucination" || tool === "hallucination-risk") return "aiSignalClarity";
154
+ return tool;
155
+ }) : void 0;
157
156
  if (options.profile) {
158
157
  switch (options.profile.toLowerCase()) {
159
158
  case "agentic":
160
- profileTools = ["hallucination", "grounding", "testability"];
159
+ profileTools = ["aiSignalClarity", "grounding", "testability"];
161
160
  break;
162
161
  case "cost":
163
162
  profileTools = ["patterns", "context"];
@@ -365,27 +364,27 @@ async function scanAction(directory, options) {
365
364
  } catch (err) {
366
365
  }
367
366
  }
368
- if (finalOptions.tools.includes("hallucination") || finalOptions.tools.includes("hallucination-risk")) {
367
+ if (results.aiSignalClarity) {
368
+ const { calculateHallucinationScore } = await import("@aiready/ai-signal-clarity");
369
369
  try {
370
- const { hallucinationRiskAction: hallucinationRiskAction2 } = await import("./hallucination-risk-XU6E7IGN.mjs");
371
- const hrScore = await hallucinationRiskAction2(resolvedDir, { ...finalOptions, output: "json" });
372
- if (hrScore) toolScores.set("hallucination-risk", hrScore);
370
+ const hrScore = calculateHallucinationScore(results.aiSignalClarity);
371
+ toolScores.set("ai-signal-clarity", hrScore);
373
372
  } catch (err) {
374
373
  }
375
374
  }
376
- if (finalOptions.tools.includes("grounding") || finalOptions.tools.includes("agent-grounding")) {
375
+ if (results.grounding) {
376
+ const { calculateGroundingScore } = await import("@aiready/agent-grounding");
377
377
  try {
378
- const { agentGroundingAction: agentGroundingAction2 } = await import("./agent-grounding-DAOSU4MF.mjs");
379
- const agScore = await agentGroundingAction2(resolvedDir, { ...finalOptions, output: "json" });
380
- if (agScore) toolScores.set("agent-grounding", agScore);
378
+ const agScore = calculateGroundingScore(results.grounding);
379
+ toolScores.set("agent-grounding", agScore);
381
380
  } catch (err) {
382
381
  }
383
382
  }
384
- if (finalOptions.tools.includes("testability")) {
383
+ if (results.testability) {
384
+ const { calculateTestabilityScore } = await import("@aiready/testability");
385
385
  try {
386
- const { testabilityAction: testabilityAction2 } = await import("./testability-VDZJZ4MF.mjs");
387
- const tbScore = await testabilityAction2(resolvedDir, { ...finalOptions, output: "json" });
388
- if (tbScore) toolScores.set("testability", tbScore);
386
+ const tbScore = calculateTestabilityScore(results.testability);
387
+ toolScores.set("testability", tbScore);
389
388
  } catch (err) {
390
389
  }
391
390
  }
@@ -571,7 +570,7 @@ EXAMPLES:
571
570
  $ aiready scan --output json --output-file report.json
572
571
 
573
572
  PROFILES:
574
- agentic: hallucination, grounding, testability
573
+ agentic: aiSignalClarity, grounding, testability
575
574
  cost: patterns, context
576
575
  security: consistency, testability
577
576
  onboarding: context, consistency, grounding
@@ -1225,6 +1224,21 @@ NOTES:
1225
1224
  - Same options as 'visualize'. Use --serve to host the static HTML, or --dev for live reload.
1226
1225
  `;
1227
1226
 
1227
+ // src/commands/ai-signal-clarity.ts
1228
+ import chalk7 from "chalk";
1229
+ import { loadConfig, mergeConfigWithDefaults } from "@aiready/core";
1230
+
1231
+ // src/commands/agent-grounding.ts
1232
+ import chalk8 from "chalk";
1233
+ import { loadConfig as loadConfig2, mergeConfigWithDefaults as mergeConfigWithDefaults2 } from "@aiready/core";
1234
+
1235
+ // src/commands/testability.ts
1236
+ import chalk9 from "chalk";
1237
+ import { loadConfig as loadConfig3, mergeConfigWithDefaults as mergeConfigWithDefaults3 } from "@aiready/core";
1238
+
1239
+ // src/commands/change-amplification.ts
1240
+ import { changeAmplificationAction } from "@aiready/change-amplification/dist/cli.js";
1241
+
1228
1242
  // src/cli.ts
1229
1243
  var getDirname = () => {
1230
1244
  if (typeof __dirname !== "undefined") return __dirname;
@@ -1268,7 +1282,7 @@ VERSION: ${packageJson.version}
1268
1282
  DOCUMENTATION: https://aiready.dev/docs/cli
1269
1283
  GITHUB: https://github.com/caopengau/aiready-cli
1270
1284
  LANDING: https://github.com/caopengau/aiready-landing`);
1271
- program.command("scan").description("Run comprehensive AI-readiness analysis (patterns + context + consistency)").argument("[directory]", "Directory to analyze", ".").option("-t, --tools <tools>", "Tools to run (comma-separated: patterns,context,consistency,hallucination,grounding,testability)").option("--profile <type>", "Scan profile to use (agentic, cost, security, onboarding)").option("--compare-to <path>", "Compare results against a previous AIReady report JSON").option("--include <patterns>", "File patterns to include (comma-separated)").option("--exclude <patterns>", "File patterns to exclude (comma-separated)").option("-o, --output <format>", "Output format: console, json", "json").option("--output-file <path>", "Output file path (for json)").option("--no-score", "Disable calculating AI Readiness Score (enabled by default)").option("--weights <weights>", "Custom scoring weights").option("--threshold <score>", "Fail CI/CD if score below threshold (0-100)").option("--ci", "CI mode: GitHub Actions annotations, no colors, fail on threshold").option("--fail-on <level>", "Fail on issues: critical, major, any", "critical").addHelpText("after", scanHelpText).action(async (directory, options) => {
1285
+ program.command("scan").description("Run comprehensive AI-readiness analysis (patterns + context + consistency)").argument("[directory]", "Directory to analyze", ".").option("-t, --tools <tools>", "Tools to run (comma-separated: patterns,context,consistency,doc-drift,deps-health,aiSignalClarity,grounding,testability,changeAmplification)").option("--profile <type>", "Scan profile to use (agentic, cost, security, onboarding)").option("--compare-to <path>", "Compare results against a previous AIReady report JSON").option("--include <patterns>", "File patterns to include (comma-separated)").option("--exclude <patterns>", "File patterns to exclude (comma-separated)").option("-o, --output <format>", "Output format: console, json", "json").option("--output-file <path>", "Output file path (for json)").option("--no-score", "Disable calculating AI Readiness Score (enabled by default)").option("--weights <weights>", "Custom scoring weights").option("--threshold <score>", "Fail CI/CD if score below threshold (0-100)").option("--ci", "CI mode: GitHub Actions annotations, no colors, fail on threshold").option("--fail-on <level>", "Fail on issues: critical, major, any", "critical").addHelpText("after", scanHelpText).action(async (directory, options) => {
1272
1286
  await scanAction(directory, options);
1273
1287
  });
1274
1288
  program.command("patterns").description("Detect duplicate code patterns that confuse AI models").argument("[directory]", "Directory to analyze", ".").option("-s, --similarity <number>", "Minimum similarity score (0-1)", "0.40").option("-l, --min-lines <number>", "Minimum lines to consider", "5").option("--max-candidates <number>", "Maximum candidates per block (performance tuning)").option("--min-shared-tokens <number>", "Minimum shared tokens for candidates (performance tuning)").option("--full-scan", "Disable smart defaults for comprehensive analysis (slower)").option("--include <patterns>", "File patterns to include (comma-separated)").option("--exclude <patterns>", "File patterns to exclude (comma-separated)").option("-o, --output <format>", "Output format: console, json", "console").option("--output-file <path>", "Output file path (for json)").option("--score", "Calculate and display AI Readiness Score for patterns (0-100)").addHelpText("after", patternsHelpText).action(async (directory, options) => {
@@ -1286,4 +1300,7 @@ program.command("visualise").description("Alias for visualize (British spelling)
1286
1300
  program.command("visualize").description("Generate interactive visualization from an AIReady report").argument("[directory]", "Directory to analyze", ".").option("--report <path>", "Report path (auto-detects latest .aiready/aiready-report-*.json if not provided)").option("-o, --output <path>", "Output HTML path (relative to directory)", "packages/visualizer/visualization.html").option("--open", "Open generated HTML in default browser").option("--serve [port]", "Start a local static server to serve the visualization (optional port number)", false).option("--dev", "Start Vite dev server (live reload) for interactive development", false).addHelpText("after", visualizeHelpText).action(async (directory, options) => {
1287
1301
  await visualizeAction(directory, options);
1288
1302
  });
1303
+ program.command("change-amplification").description("Analyze graph metrics for change amplification").argument("[directory]", "Directory to analyze", ".").option("--include <patterns>", "File patterns to include (comma-separated)").option("--exclude <patterns>", "File patterns to exclude (comma-separated)").option("-o, --output <format>", "Output format: console, json", "console").option("--output-file <path>", "Output file path (for json)").action(async (directory, options) => {
1304
+ await changeAmplificationAction(directory, options);
1305
+ });
1289
1306
  program.parse();
package/dist/index.js CHANGED
@@ -141,6 +141,58 @@ async function analyzeUnified(options) {
141
141
  result.deps = report;
142
142
  result.summary.totalIssues += report.issues?.length || 0;
143
143
  }
144
+ if (tools.includes("aiSignalClarity")) {
145
+ const { analyzeAiSignalClarity } = await import("@aiready/ai-signal-clarity");
146
+ const report = await analyzeAiSignalClarity({
147
+ rootDir: options.rootDir,
148
+ include: options.include,
149
+ exclude: options.exclude
150
+ });
151
+ if (options.progressCallback) {
152
+ options.progressCallback({ tool: "aiSignalClarity", data: report });
153
+ }
154
+ result.aiSignalClarity = report;
155
+ result.summary.totalIssues += report.results?.reduce((sum, r) => sum + (r.issues?.length || 0), 0) || 0;
156
+ }
157
+ if (tools.includes("grounding")) {
158
+ const { analyzeAgentGrounding } = await import("@aiready/agent-grounding");
159
+ const report = await analyzeAgentGrounding({
160
+ rootDir: options.rootDir,
161
+ include: options.include,
162
+ exclude: options.exclude
163
+ });
164
+ if (options.progressCallback) {
165
+ options.progressCallback({ tool: "grounding", data: report });
166
+ }
167
+ result.grounding = report;
168
+ result.summary.totalIssues += report.issues?.length || 0;
169
+ }
170
+ if (tools.includes("testability")) {
171
+ const { analyzeTestability } = await import("@aiready/testability");
172
+ const report = await analyzeTestability({
173
+ rootDir: options.rootDir,
174
+ include: options.include,
175
+ exclude: options.exclude
176
+ });
177
+ if (options.progressCallback) {
178
+ options.progressCallback({ tool: "testability", data: report });
179
+ }
180
+ result.testability = report;
181
+ result.summary.totalIssues += report.issues?.length || 0;
182
+ }
183
+ if (tools.includes("changeAmplification")) {
184
+ const { analyzeChangeAmplification } = await import("@aiready/change-amplification");
185
+ const report = await analyzeChangeAmplification({
186
+ rootDir: options.rootDir,
187
+ include: options.include,
188
+ exclude: options.exclude
189
+ });
190
+ if (options.progressCallback) {
191
+ options.progressCallback({ tool: "changeAmplification", data: report });
192
+ }
193
+ result.changeAmplification = report;
194
+ result.summary.totalIssues += report.summary?.totalIssues || 0;
195
+ }
144
196
  result.summary.executionTime = Date.now() - startTime;
145
197
  return result;
146
198
  }
@@ -176,6 +228,22 @@ function generateUnifiedSummary(result) {
176
228
  }
177
229
  if (result.deps) {
178
230
  output += `\u{1F4E6} Dependency Health: ${result.deps.issues?.length || 0} issues
231
+ `;
232
+ }
233
+ if (result.aiSignalClarity) {
234
+ output += `\u{1F9E0} AI Signal Clarity: ${result.aiSignalClarity.summary?.totalSignals || 0} signals
235
+ `;
236
+ }
237
+ if (result.grounding) {
238
+ output += `\u{1F9ED} Agent Grounding: ${result.grounding.issues?.length || 0} issues
239
+ `;
240
+ }
241
+ if (result.testability) {
242
+ output += `\u{1F9EA} Testability Index: ${result.testability.issues?.length || 0} issues
243
+ `;
244
+ }
245
+ if (result.changeAmplification) {
246
+ output += `\u{1F4A5} Change Amplification: ${result.changeAmplification.summary?.totalIssues || 0} cascading risks
179
247
  `;
180
248
  }
181
249
  return output;
package/dist/index.mjs CHANGED
@@ -1,8 +1,7 @@
1
1
  import {
2
2
  analyzeUnified,
3
3
  generateUnifiedSummary
4
- } from "./chunk-N4SLON5K.mjs";
5
- import "./chunk-Y6FXYEAI.mjs";
4
+ } from "./chunk-PDOONNSK.mjs";
6
5
  export {
7
6
  analyzeUnified,
8
7
  generateUnifiedSummary
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiready/cli",
3
- "version": "0.9.36",
3
+ "version": "0.9.39",
4
4
  "description": "Unified CLI for AIReady analysis tools",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -11,16 +11,17 @@
11
11
  "dependencies": {
12
12
  "chalk": "^5.3.0",
13
13
  "commander": "^14.0.0",
14
- "@aiready/consistency": "0.8.27",
15
- "@aiready/context-analyzer": "0.9.31",
16
- "@aiready/core": "0.9.28",
17
- "@aiready/deps": "0.1.1",
18
- "@aiready/agent-grounding": "0.1.1",
19
- "@aiready/doc-drift": "0.1.1",
20
- "@aiready/pattern-detect": "0.11.27",
21
- "@aiready/testability": "0.1.1",
22
- "@aiready/visualizer": "0.1.33",
23
- "@aiready/hallucination-risk": "0.1.1"
14
+ "@aiready/agent-grounding": "0.1.4",
15
+ "@aiready/core": "0.9.31",
16
+ "@aiready/context-analyzer": "0.9.34",
17
+ "@aiready/consistency": "0.8.30",
18
+ "@aiready/visualizer": "0.1.36",
19
+ "@aiready/doc-drift": "0.1.4",
20
+ "@aiready/pattern-detect": "0.11.30",
21
+ "@aiready/deps": "0.1.4",
22
+ "@aiready/ai-signal-clarity": "0.1.4",
23
+ "@aiready/change-amplification": "0.1.4",
24
+ "@aiready/testability": "0.1.4"
24
25
  },
25
26
  "devDependencies": {
26
27
  "@types/node": "^24.0.0",
package/src/cli.ts CHANGED
@@ -15,6 +15,7 @@ import {
15
15
  visualizeAction,
16
16
  visualizeHelpText,
17
17
  visualiseHelpText,
18
+ changeAmplificationAction,
18
19
  } from './commands';
19
20
 
20
21
  const getDirname = () => {
@@ -72,7 +73,7 @@ program
72
73
  .command('scan')
73
74
  .description('Run comprehensive AI-readiness analysis (patterns + context + consistency)')
74
75
  .argument('[directory]', 'Directory to analyze', '.')
75
- .option('-t, --tools <tools>', 'Tools to run (comma-separated: patterns,context,consistency,hallucination,grounding,testability)')
76
+ .option('-t, --tools <tools>', 'Tools to run (comma-separated: patterns,context,consistency,doc-drift,deps-health,aiSignalClarity,grounding,testability,changeAmplification)')
76
77
  .option('--profile <type>', 'Scan profile to use (agentic, cost, security, onboarding)')
77
78
  .option('--compare-to <path>', 'Compare results against a previous AIReady report JSON')
78
79
  .option('--include <patterns>', 'File patterns to include (comma-separated)')
@@ -174,4 +175,17 @@ program
174
175
  await visualizeAction(directory, options);
175
176
  });
176
177
 
178
+ // Change Amplification command
179
+ program
180
+ .command('change-amplification')
181
+ .description('Analyze graph metrics for change amplification')
182
+ .argument('[directory]', 'Directory to analyze', '.')
183
+ .option('--include <patterns>', 'File patterns to include (comma-separated)')
184
+ .option('--exclude <patterns>', 'File patterns to exclude (comma-separated)')
185
+ .option('-o, --output <format>', 'Output format: console, json', 'console')
186
+ .option('--output-file <path>', 'Output file path (for json)')
187
+ .action(async (directory, options) => {
188
+ await changeAmplificationAction(directory, options);
189
+ });
190
+
177
191
  program.parse();
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Hallucination risk command for unified CLI
2
+ * AI signal clarity command for unified CLI
3
3
  */
4
4
 
5
5
  import chalk from 'chalk';
@@ -8,18 +8,18 @@ import { join } from 'path';
8
8
  import { resolveOutputPath, loadConfig, mergeConfigWithDefaults } from '@aiready/core';
9
9
  import type { ToolScoringOutput } from '@aiready/core';
10
10
 
11
- export async function hallucinationRiskAction(
11
+ export async function aiSignalClarityAction(
12
12
  directory: string,
13
13
  options: any,
14
14
  ): Promise<ToolScoringOutput | undefined> {
15
- const { analyzeHallucinationRisk, calculateHallucinationScore } = await import('@aiready/hallucination-risk');
15
+ const { analyzeAiSignalClarity, calculateHallucinationScore } = await import('@aiready/ai-signal-clarity');
16
16
 
17
17
  const config = await loadConfig(directory);
18
18
  const merged = mergeConfigWithDefaults(config, {
19
19
  minSeverity: 'info',
20
20
  });
21
21
 
22
- const report = await analyzeHallucinationRisk({
22
+ const report = await analyzeAiSignalClarity({
23
23
  rootDir: directory,
24
24
  minSeverity: options.minSeverity ?? merged.minSeverity ?? 'info',
25
25
  include: options.include,
@@ -41,7 +41,7 @@ export async function hallucinationRiskAction(
41
41
  severe: chalk.bgRed.white,
42
42
  };
43
43
  const color = ratingColors[summary.rating] ?? chalk.white;
44
- console.log(` ๐Ÿง  Hallucination Risk: ${chalk.bold(scoring.score + '/100')} (${color(summary.rating)})`);
44
+ console.log(` ๐Ÿง  AI Signal Clarity: ${chalk.bold(scoring.score + '/100')} (${color(summary.rating)})`);
45
45
  console.log(` Top Risk: ${chalk.italic(summary.topRisk)}`);
46
46
  if (summary.totalSignals > 0) {
47
47
  console.log(chalk.dim(` ${summary.criticalSignals} critical ${summary.majorSignals} major ${summary.minorSignals} minor signals`));
@@ -0,0 +1,3 @@
1
+ import { changeAmplificationAction } from '@aiready/change-amplification/dist/cli.js';
2
+
3
+ export { changeAmplificationAction };
@@ -7,6 +7,7 @@ export { patternsAction, patternsHelpText } from './patterns';
7
7
  export { contextAction } from './context';
8
8
  export { consistencyAction } from './consistency';
9
9
  export { visualizeAction, visualizeHelpText, visualiseHelpText } from './visualize';
10
- export { hallucinationRiskAction } from './hallucination-risk';
10
+ export { aiSignalClarityAction } from './ai-signal-clarity';
11
11
  export { agentGroundingAction } from './agent-grounding';
12
- export { testabilityAction } from './testability';
12
+ export { testabilityAction } from './testability';
13
+ export { changeAmplificationAction } from './change-amplification';
@@ -49,7 +49,7 @@ export async function scanAction(directory: string, options: ScanOptions) {
49
49
  try {
50
50
  // Define defaults
51
51
  const defaults = {
52
- tools: ['patterns', 'context', 'consistency', 'hallucination', 'grounding', 'testability', 'doc-drift', 'deps-health'],
52
+ tools: ['patterns', 'context', 'consistency', 'aiSignalClarity', 'grounding', 'testability', 'doc-drift', 'deps-health'],
53
53
  include: undefined,
54
54
  exclude: undefined,
55
55
  output: {
@@ -58,11 +58,15 @@ export async function scanAction(directory: string, options: ScanOptions) {
58
58
  },
59
59
  };
60
60
 
61
- let profileTools = options.tools ? options.tools.split(',').map((t: string) => t.trim()) : undefined;
61
+ let profileTools = options.tools ? options.tools.split(',').map((t: string) => {
62
+ const tool = t.trim();
63
+ if (tool === 'hallucination' || tool === 'hallucination-risk') return 'aiSignalClarity';
64
+ return tool;
65
+ }) : undefined;
62
66
  if (options.profile) {
63
67
  switch (options.profile.toLowerCase()) {
64
68
  case 'agentic':
65
- profileTools = ['hallucination', 'grounding', 'testability'];
69
+ profileTools = ['aiSignalClarity', 'grounding', 'testability'];
66
70
  break;
67
71
  case 'cost':
68
72
  profileTools = ['patterns', 'context'];
@@ -318,36 +322,36 @@ export async function scanAction(directory: string, options: ScanOptions) {
318
322
  }
319
323
  }
320
324
 
321
- // Hallucination risk score
322
- if (finalOptions.tools.includes('hallucination') || finalOptions.tools.includes('hallucination-risk')) {
325
+ // AI signal clarity score
326
+ if (results.aiSignalClarity) {
327
+ const { calculateHallucinationScore } = await import('@aiready/ai-signal-clarity');
323
328
  try {
324
- const { hallucinationRiskAction } = await import('./hallucination-risk');
325
- const hrScore = await hallucinationRiskAction(resolvedDir, { ...finalOptions, output: 'json' });
326
- if (hrScore) toolScores.set('hallucination-risk', hrScore);
329
+ const hrScore = calculateHallucinationScore(results.aiSignalClarity);
330
+ toolScores.set('ai-signal-clarity', hrScore);
327
331
  } catch (err) {
328
- // ignore if spoke not installed yet
332
+ // ignore
329
333
  }
330
334
  }
331
335
 
332
336
  // Agent grounding score
333
- if (finalOptions.tools.includes('grounding') || finalOptions.tools.includes('agent-grounding')) {
337
+ if (results.grounding) {
338
+ const { calculateGroundingScore } = await import('@aiready/agent-grounding');
334
339
  try {
335
- const { agentGroundingAction } = await import('./agent-grounding');
336
- const agScore = await agentGroundingAction(resolvedDir, { ...finalOptions, output: 'json' });
337
- if (agScore) toolScores.set('agent-grounding', agScore);
340
+ const agScore = calculateGroundingScore(results.grounding);
341
+ toolScores.set('agent-grounding', agScore);
338
342
  } catch (err) {
339
- // ignore if spoke not installed yet
343
+ // ignore
340
344
  }
341
345
  }
342
346
 
343
347
  // Testability score
344
- if (finalOptions.tools.includes('testability')) {
348
+ if (results.testability) {
349
+ const { calculateTestabilityScore } = await import('@aiready/testability');
345
350
  try {
346
- const { testabilityAction } = await import('./testability');
347
- const tbScore = await testabilityAction(resolvedDir, { ...finalOptions, output: 'json' });
348
- if (tbScore) toolScores.set('testability', tbScore);
351
+ const tbScore = calculateTestabilityScore(results.testability);
352
+ toolScores.set('testability', tbScore);
349
353
  } catch (err) {
350
- // ignore if spoke not installed yet
354
+ // ignore
351
355
  }
352
356
  }
353
357
 
@@ -572,7 +576,7 @@ EXAMPLES:
572
576
  $ aiready scan --output json --output-file report.json
573
577
 
574
578
  PROFILES:
575
- agentic: hallucination, grounding, testability
579
+ agentic: aiSignalClarity, grounding, testability
576
580
  cost: patterns, context
577
581
  security: consistency, testability
578
582
  onboarding: context, consistency, grounding
package/src/index.ts CHANGED
@@ -9,7 +9,7 @@ import type { ConsistencyReport } from '@aiready/consistency';
9
9
  import type { ConsistencyOptions } from '@aiready/consistency';
10
10
 
11
11
  export interface UnifiedAnalysisOptions extends ScanOptions {
12
- tools?: ('patterns' | 'context' | 'consistency' | 'doc-drift' | 'deps-health')[];
12
+ tools?: ('patterns' | 'context' | 'consistency' | 'doc-drift' | 'deps-health' | 'aiSignalClarity' | 'grounding' | 'testability' | 'changeAmplification')[];
13
13
  minSimilarity?: number;
14
14
  minLines?: number;
15
15
  maxCandidatesPerBlock?: number;
@@ -26,6 +26,10 @@ export interface UnifiedAnalysisResult {
26
26
  consistency?: ConsistencyReport;
27
27
  docDrift?: any;
28
28
  deps?: any;
29
+ aiSignalClarity?: any;
30
+ grounding?: any;
31
+ testability?: any;
32
+ changeAmplification?: any;
29
33
  summary: {
30
34
  totalIssues: number;
31
35
  toolsRun: string[];
@@ -170,6 +174,66 @@ export async function analyzeUnified(
170
174
  result.summary.totalIssues += report.issues?.length || 0;
171
175
  }
172
176
 
177
+ // Run AI Signal Clarity analysis
178
+ if (tools.includes('aiSignalClarity')) {
179
+ const { analyzeAiSignalClarity } = await import('@aiready/ai-signal-clarity');
180
+ const report = await analyzeAiSignalClarity({
181
+ rootDir: options.rootDir,
182
+ include: options.include,
183
+ exclude: options.exclude,
184
+ });
185
+ if (options.progressCallback) {
186
+ options.progressCallback({ tool: 'aiSignalClarity', data: report });
187
+ }
188
+ result.aiSignalClarity = report;
189
+ result.summary.totalIssues += report.results?.reduce((sum: number, r: any) => sum + (r.issues?.length || 0), 0) || 0;
190
+ }
191
+
192
+ // Run Agent Grounding analysis
193
+ if (tools.includes('grounding')) {
194
+ const { analyzeAgentGrounding } = await import('@aiready/agent-grounding');
195
+ const report = await analyzeAgentGrounding({
196
+ rootDir: options.rootDir,
197
+ include: options.include,
198
+ exclude: options.exclude,
199
+ });
200
+ if (options.progressCallback) {
201
+ options.progressCallback({ tool: 'grounding', data: report });
202
+ }
203
+ result.grounding = report;
204
+ result.summary.totalIssues += report.issues?.length || 0;
205
+ }
206
+
207
+ // Run Testability analysis
208
+ if (tools.includes('testability')) {
209
+ const { analyzeTestability } = await import('@aiready/testability');
210
+ const report = await analyzeTestability({
211
+ rootDir: options.rootDir,
212
+ include: options.include,
213
+ exclude: options.exclude,
214
+ });
215
+ if (options.progressCallback) {
216
+ options.progressCallback({ tool: 'testability', data: report });
217
+ }
218
+ result.testability = report;
219
+ result.summary.totalIssues += report.issues?.length || 0;
220
+ }
221
+
222
+ // Run Change Amplification analysis
223
+ if (tools.includes('changeAmplification')) {
224
+ const { analyzeChangeAmplification } = await import('@aiready/change-amplification');
225
+ const report = await analyzeChangeAmplification({
226
+ rootDir: options.rootDir,
227
+ include: options.include,
228
+ exclude: options.exclude,
229
+ });
230
+ if (options.progressCallback) {
231
+ options.progressCallback({ tool: 'changeAmplification', data: report });
232
+ }
233
+ result.changeAmplification = report;
234
+ result.summary.totalIssues += report.summary?.totalIssues || 0;
235
+ }
236
+
173
237
  result.summary.executionTime = Date.now() - startTime;
174
238
  return result;
175
239
  }
@@ -202,5 +266,21 @@ export function generateUnifiedSummary(result: UnifiedAnalysisResult): string {
202
266
  output += `๐Ÿ“ฆ Dependency Health: ${result.deps.issues?.length || 0} issues\n`;
203
267
  }
204
268
 
269
+ if (result.aiSignalClarity) {
270
+ output += `๐Ÿง  AI Signal Clarity: ${result.aiSignalClarity.summary?.totalSignals || 0} signals\n`;
271
+ }
272
+
273
+ if (result.grounding) {
274
+ output += `๐Ÿงญ Agent Grounding: ${result.grounding.issues?.length || 0} issues\n`;
275
+ }
276
+
277
+ if (result.testability) {
278
+ output += `๐Ÿงช Testability Index: ${result.testability.issues?.length || 0} issues\n`;
279
+ }
280
+
281
+ if (result.changeAmplification) {
282
+ output += `๐Ÿ’ฅ Change Amplification: ${result.changeAmplification.summary?.totalIssues || 0} cascading risks\n`;
283
+ }
284
+
205
285
  return output;
206
286
  }