@aiready/cli 0.9.35 โ†’ 0.9.38

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/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')[];
12
+ tools?: ('patterns' | 'context' | 'consistency' | 'doc-drift' | 'deps-health' | 'hallucination' | 'grounding' | 'testability')[];
13
13
  minSimilarity?: number;
14
14
  minLines?: number;
15
15
  maxCandidatesPerBlock?: number;
@@ -24,6 +24,11 @@ export interface UnifiedAnalysisResult {
24
24
  duplicates?: DuplicatePattern[]; // Store actual duplicates for scoring
25
25
  context?: ContextAnalysisResult[];
26
26
  consistency?: ConsistencyReport;
27
+ docDrift?: any;
28
+ deps?: any;
29
+ hallucination?: any;
30
+ grounding?: any;
31
+ testability?: any;
27
32
  summary: {
28
33
  totalIssues: number;
29
34
  toolsRun: string[];
@@ -138,6 +143,81 @@ export async function analyzeUnified(
138
143
  result.summary.totalIssues += report.summary.totalIssues;
139
144
  }
140
145
 
146
+ // Run Documentation Drift analysis
147
+ if (tools.includes('doc-drift')) {
148
+ const { analyzeDocDrift } = await import('@aiready/doc-drift');
149
+ const report = await analyzeDocDrift({
150
+ rootDir: options.rootDir,
151
+ include: options.include,
152
+ exclude: options.exclude,
153
+ });
154
+ if (options.progressCallback) {
155
+ options.progressCallback({ tool: 'doc-drift', data: report });
156
+ }
157
+ result.docDrift = report;
158
+ result.summary.totalIssues += report.issues?.length || 0;
159
+ }
160
+
161
+ // Run Dependency Health analysis
162
+ if (tools.includes('deps-health')) {
163
+ const { analyzeDeps } = await import('@aiready/deps');
164
+ const report = await analyzeDeps({
165
+ rootDir: options.rootDir,
166
+ include: options.include,
167
+ exclude: options.exclude,
168
+ });
169
+ if (options.progressCallback) {
170
+ options.progressCallback({ tool: 'deps-health', data: report });
171
+ }
172
+ result.deps = report;
173
+ result.summary.totalIssues += report.issues?.length || 0;
174
+ }
175
+
176
+ // Run Hallucination Risk analysis
177
+ if (tools.includes('hallucination')) {
178
+ const { analyzeHallucinationRisk } = await import('@aiready/hallucination-risk');
179
+ const report = await analyzeHallucinationRisk({
180
+ rootDir: options.rootDir,
181
+ include: options.include,
182
+ exclude: options.exclude,
183
+ });
184
+ if (options.progressCallback) {
185
+ options.progressCallback({ tool: 'hallucination', data: report });
186
+ }
187
+ result.hallucination = report;
188
+ result.summary.totalIssues += report.results?.reduce((sum: number, r: any) => sum + (r.issues?.length || 0), 0) || 0;
189
+ }
190
+
191
+ // Run Agent Grounding analysis
192
+ if (tools.includes('grounding')) {
193
+ const { analyzeAgentGrounding } = await import('@aiready/agent-grounding');
194
+ const report = await analyzeAgentGrounding({
195
+ rootDir: options.rootDir,
196
+ include: options.include,
197
+ exclude: options.exclude,
198
+ });
199
+ if (options.progressCallback) {
200
+ options.progressCallback({ tool: 'grounding', data: report });
201
+ }
202
+ result.grounding = report;
203
+ result.summary.totalIssues += report.issues?.length || 0;
204
+ }
205
+
206
+ // Run Testability analysis
207
+ if (tools.includes('testability')) {
208
+ const { analyzeTestability } = await import('@aiready/testability');
209
+ const report = await analyzeTestability({
210
+ rootDir: options.rootDir,
211
+ include: options.include,
212
+ exclude: options.exclude,
213
+ });
214
+ if (options.progressCallback) {
215
+ options.progressCallback({ tool: 'testability', data: report });
216
+ }
217
+ result.testability = report;
218
+ result.summary.totalIssues += report.issues?.length || 0;
219
+ }
220
+
141
221
  result.summary.executionTime = Date.now() - startTime;
142
222
  return result;
143
223
  }
@@ -162,5 +242,25 @@ export function generateUnifiedSummary(result: UnifiedAnalysisResult): string {
162
242
  output += `๐Ÿท๏ธ Consistency Analysis: ${result.consistency.summary.totalIssues} issues\n`;
163
243
  }
164
244
 
245
+ if (result.docDrift) {
246
+ output += `๐Ÿ“ Doc Drift Analysis: ${result.docDrift.issues?.length || 0} issues\n`;
247
+ }
248
+
249
+ if (result.deps) {
250
+ output += `๐Ÿ“ฆ Dependency Health: ${result.deps.issues?.length || 0} issues\n`;
251
+ }
252
+
253
+ if (result.hallucination) {
254
+ output += `๐Ÿง  Hallucination Risk: ${result.hallucination.summary?.totalSignals || 0} signals\n`;
255
+ }
256
+
257
+ if (result.grounding) {
258
+ output += `๐Ÿงญ Agent Grounding: ${result.grounding.issues?.length || 0} issues\n`;
259
+ }
260
+
261
+ if (result.testability) {
262
+ output += `๐Ÿงช Testability Index: ${result.testability.issues?.length || 0} issues\n`;
263
+ }
264
+
165
265
  return output;
166
266
  }