@aiready/cli 0.9.38 โ†’ 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.
@@ -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,12 +322,12 @@ export async function scanAction(directory: string, options: ScanOptions) {
318
322
  }
319
323
  }
320
324
 
321
- // Hallucination risk score
322
- if (results.hallucination) {
323
- const { calculateHallucinationScore } = await import('@aiready/hallucination-risk');
325
+ // AI signal clarity score
326
+ if (results.aiSignalClarity) {
327
+ const { calculateHallucinationScore } = await import('@aiready/ai-signal-clarity');
324
328
  try {
325
- const hrScore = calculateHallucinationScore(results.hallucination);
326
- toolScores.set('hallucination-risk', hrScore);
329
+ const hrScore = calculateHallucinationScore(results.aiSignalClarity);
330
+ toolScores.set('ai-signal-clarity', hrScore);
327
331
  } catch (err) {
328
332
  // ignore
329
333
  }
@@ -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' | 'hallucination' | 'grounding' | 'testability')[];
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,9 +26,10 @@ export interface UnifiedAnalysisResult {
26
26
  consistency?: ConsistencyReport;
27
27
  docDrift?: any;
28
28
  deps?: any;
29
- hallucination?: any;
29
+ aiSignalClarity?: any;
30
30
  grounding?: any;
31
31
  testability?: any;
32
+ changeAmplification?: any;
32
33
  summary: {
33
34
  totalIssues: number;
34
35
  toolsRun: string[];
@@ -173,18 +174,18 @@ export async function analyzeUnified(
173
174
  result.summary.totalIssues += report.issues?.length || 0;
174
175
  }
175
176
 
176
- // Run Hallucination Risk analysis
177
- if (tools.includes('hallucination')) {
178
- const { analyzeHallucinationRisk } = await import('@aiready/hallucination-risk');
179
- const report = await analyzeHallucinationRisk({
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({
180
181
  rootDir: options.rootDir,
181
182
  include: options.include,
182
183
  exclude: options.exclude,
183
184
  });
184
185
  if (options.progressCallback) {
185
- options.progressCallback({ tool: 'hallucination', data: report });
186
+ options.progressCallback({ tool: 'aiSignalClarity', data: report });
186
187
  }
187
- result.hallucination = report;
188
+ result.aiSignalClarity = report;
188
189
  result.summary.totalIssues += report.results?.reduce((sum: number, r: any) => sum + (r.issues?.length || 0), 0) || 0;
189
190
  }
190
191
 
@@ -218,6 +219,21 @@ export async function analyzeUnified(
218
219
  result.summary.totalIssues += report.issues?.length || 0;
219
220
  }
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
+
221
237
  result.summary.executionTime = Date.now() - startTime;
222
238
  return result;
223
239
  }
@@ -250,8 +266,8 @@ export function generateUnifiedSummary(result: UnifiedAnalysisResult): string {
250
266
  output += `๐Ÿ“ฆ Dependency Health: ${result.deps.issues?.length || 0} issues\n`;
251
267
  }
252
268
 
253
- if (result.hallucination) {
254
- output += `๐Ÿง  Hallucination Risk: ${result.hallucination.summary?.totalSignals || 0} signals\n`;
269
+ if (result.aiSignalClarity) {
270
+ output += `๐Ÿง  AI Signal Clarity: ${result.aiSignalClarity.summary?.totalSignals || 0} signals\n`;
255
271
  }
256
272
 
257
273
  if (result.grounding) {
@@ -262,5 +278,9 @@ export function generateUnifiedSummary(result: UnifiedAnalysisResult): string {
262
278
  output += `๐Ÿงช Testability Index: ${result.testability.issues?.length || 0} issues\n`;
263
279
  }
264
280
 
281
+ if (result.changeAmplification) {
282
+ output += `๐Ÿ’ฅ Change Amplification: ${result.changeAmplification.summary?.totalIssues || 0} cascading risks\n`;
283
+ }
284
+
265
285
  return output;
266
286
  }