@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.
- package/.turbo/turbo-build.log +10 -10
- package/.turbo/turbo-test.log +4 -4
- package/README.md +27 -287
- package/dist/chunk-M7O2MEM5.mjs +211 -0
- package/dist/chunk-PDOONNSK.mjs +228 -0
- package/dist/cli.js +38 -15
- package/dist/cli.mjs +21 -11
- package/dist/index.js +24 -7
- package/dist/index.mjs +1 -1
- package/package.json +12 -11
- package/src/cli.ts +15 -1
- package/src/commands/{hallucination-risk.ts โ ai-signal-clarity.ts} +5 -5
- package/src/commands/change-amplification.ts +3 -0
- package/src/commands/index.ts +3 -2
- package/src/commands/scan.ts +13 -9
- package/src/index.ts +30 -10
package/src/commands/index.ts
CHANGED
|
@@ -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 {
|
|
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';
|
package/src/commands/scan.ts
CHANGED
|
@@ -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', '
|
|
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) =>
|
|
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 = ['
|
|
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
|
-
//
|
|
322
|
-
if (results.
|
|
323
|
-
const { calculateHallucinationScore } = await import('@aiready/
|
|
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.
|
|
326
|
-
toolScores.set('
|
|
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:
|
|
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,9 +26,10 @@ export interface UnifiedAnalysisResult {
|
|
|
26
26
|
consistency?: ConsistencyReport;
|
|
27
27
|
docDrift?: any;
|
|
28
28
|
deps?: any;
|
|
29
|
-
|
|
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
|
|
177
|
-
if (tools.includes('
|
|
178
|
-
const {
|
|
179
|
-
const report = await
|
|
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: '
|
|
186
|
+
options.progressCallback({ tool: 'aiSignalClarity', data: report });
|
|
186
187
|
}
|
|
187
|
-
result.
|
|
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.
|
|
254
|
-
output += `๐ง
|
|
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
|
}
|