@aiready/core 0.24.19 → 0.24.20

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 (39) hide show
  1. package/dist/chunk-3NEZ5M7Y.mjs +385 -340
  2. package/dist/chunk-5IVDH26E.mjs +142 -88
  3. package/dist/chunk-BE52N7T2.mjs +892 -0
  4. package/dist/chunk-GQMKSUA4.mjs +381 -336
  5. package/dist/chunk-LRM26BOB.mjs +381 -336
  6. package/dist/chunk-MOM3IXCA.mjs +146 -91
  7. package/dist/chunk-OT6FOHL4.mjs +144 -88
  8. package/dist/chunk-OVWWYI75.mjs +307 -0
  9. package/dist/chunk-U3IY2CFC.mjs +18 -22
  10. package/dist/chunk-WPFXQH5F.mjs +307 -0
  11. package/dist/chunk-WUDUSXUE.mjs +366 -0
  12. package/dist/chunk-YQATXOKD.mjs +36 -0
  13. package/dist/chunk-YVPVNRFQ.mjs +937 -0
  14. package/dist/client/index.mjs +2 -2
  15. package/dist/csharp-parser-JE5MWHQS.mjs +9 -0
  16. package/dist/csharp-parser-XW7WHE77.mjs +5 -9
  17. package/dist/go-parser-KTG4CGF5.mjs +5 -9
  18. package/dist/go-parser-T7PR6WJI.mjs +9 -0
  19. package/dist/index-CcP12wb-.d.mts +996 -693
  20. package/dist/index-CcP12wb-.d.ts +996 -693
  21. package/dist/index-DGbarGnr.d.mts +996 -693
  22. package/dist/index-DGbarGnr.d.ts +996 -693
  23. package/dist/index-slasaNzr.d.mts +998 -695
  24. package/dist/index-slasaNzr.d.ts +998 -695
  25. package/dist/index.d.mts +32 -1
  26. package/dist/index.d.ts +32 -1
  27. package/dist/index.js +35 -2
  28. package/dist/index.mjs +41 -9
  29. package/dist/java-parser-EOKMGQ6B.mjs +5 -9
  30. package/dist/java-parser-WGOXKULP.mjs +9 -0
  31. package/dist/python-parser-7NCR7VCQ.mjs +8 -0
  32. package/dist/python-parser-BCI7JVLF.mjs +4 -8
  33. package/dist/typescript-parser-3KYGSSY5.mjs +3 -0
  34. package/dist/typescript-parser-4BA4VYAF.mjs +3 -7
  35. package/dist/typescript-parser-FOUPHVFI.mjs +3 -7
  36. package/dist/typescript-parser-G3TSNR7O.mjs +7 -0
  37. package/dist/typescript-parser-RMNCTHRD.mjs +3 -7
  38. package/dist/typescript-parser-WALISXF4.mjs +7 -0
  39. package/package.json +11 -10
@@ -4,10 +4,10 @@ import { z } from 'zod';
4
4
  * Severity levels for all AIReady issues.
5
5
  */
6
6
  declare enum Severity {
7
- Critical = "critical",
8
- Major = "major",
9
- Minor = "minor",
10
- Info = "info"
7
+ Critical = 'critical',
8
+ Major = 'major',
9
+ Minor = 'minor',
10
+ Info = 'info',
11
11
  }
12
12
  /** Zod schema for Severity enum */
13
13
  declare const SeveritySchema: z.ZodEnum<typeof Severity>;
@@ -16,20 +16,20 @@ declare const SeveritySchema: z.ZodEnum<typeof Severity>;
16
16
  * Used everywhere as the single source of truth for tool identification.
17
17
  */
18
18
  declare enum ToolName {
19
- PatternDetect = "pattern-detect",
20
- ContextAnalyzer = "context-analyzer",
21
- NamingConsistency = "naming-consistency",
22
- AiSignalClarity = "ai-signal-clarity",
23
- AgentGrounding = "agent-grounding",
24
- TestabilityIndex = "testability-index",
25
- DocDrift = "doc-drift",
26
- DependencyHealth = "dependency-health",
27
- ChangeAmplification = "change-amplification",
28
- CognitiveLoad = "cognitive-load",
29
- PatternEntropy = "pattern-entropy",
30
- ConceptCohesion = "concept-cohesion",
31
- SemanticDistance = "semantic-distance",
32
- ContractEnforcement = "contract-enforcement"
19
+ PatternDetect = 'pattern-detect',
20
+ ContextAnalyzer = 'context-analyzer',
21
+ NamingConsistency = 'naming-consistency',
22
+ AiSignalClarity = 'ai-signal-clarity',
23
+ AgentGrounding = 'agent-grounding',
24
+ TestabilityIndex = 'testability-index',
25
+ DocDrift = 'doc-drift',
26
+ DependencyHealth = 'dependency-health',
27
+ ChangeAmplification = 'change-amplification',
28
+ CognitiveLoad = 'cognitive-load',
29
+ PatternEntropy = 'pattern-entropy',
30
+ ConceptCohesion = 'concept-cohesion',
31
+ SemanticDistance = 'semantic-distance',
32
+ ContractEnforcement = 'contract-enforcement',
33
33
  }
34
34
  /** Zod schema for ToolName enum */
35
35
  declare const ToolNameSchema: z.ZodEnum<typeof ToolName>;
@@ -41,25 +41,25 @@ declare const FRIENDLY_TOOL_NAMES: Record<ToolName, string>;
41
41
  * Standardized issue types across all AIReady tools.
42
42
  */
43
43
  declare enum IssueType {
44
- DuplicatePattern = "duplicate-pattern",
45
- PatternInconsistency = "pattern-inconsistency",
46
- ContextFragmentation = "context-fragmentation",
47
- DependencyHealth = "dependency-health",
48
- CircularDependency = "circular-dependency",
49
- DocDrift = "doc-drift",
50
- NamingInconsistency = "naming-inconsistency",
51
- NamingQuality = "naming-quality",
52
- ArchitectureInconsistency = "architecture-inconsistency",
53
- DeadCode = "dead-code",
54
- MissingTypes = "missing-types",
55
- MagicLiteral = "magic-literal",
56
- BooleanTrap = "boolean-trap",
57
- AiSignalClarity = "ai-signal-clarity",
58
- LowTestability = "low-testability",
59
- AgentNavigationFailure = "agent-navigation-failure",
60
- AmbiguousApi = "ambiguous-api",
61
- ChangeAmplification = "change-amplification",
62
- ContractGap = "contract-gap"
44
+ DuplicatePattern = 'duplicate-pattern',
45
+ PatternInconsistency = 'pattern-inconsistency',
46
+ ContextFragmentation = 'context-fragmentation',
47
+ DependencyHealth = 'dependency-health',
48
+ CircularDependency = 'circular-dependency',
49
+ DocDrift = 'doc-drift',
50
+ NamingInconsistency = 'naming-inconsistency',
51
+ NamingQuality = 'naming-quality',
52
+ ArchitectureInconsistency = 'architecture-inconsistency',
53
+ DeadCode = 'dead-code',
54
+ MissingTypes = 'missing-types',
55
+ MagicLiteral = 'magic-literal',
56
+ BooleanTrap = 'boolean-trap',
57
+ AiSignalClarity = 'ai-signal-clarity',
58
+ LowTestability = 'low-testability',
59
+ AgentNavigationFailure = 'agent-navigation-failure',
60
+ AmbiguousApi = 'ambiguous-api',
61
+ ChangeAmplification = 'change-amplification',
62
+ ContractGap = 'contract-gap',
63
63
  }
64
64
  /** Zod schema for IssueType enum */
65
65
  declare const IssueTypeSchema: z.ZodEnum<typeof IssueType>;
@@ -67,9 +67,9 @@ declare const IssueTypeSchema: z.ZodEnum<typeof IssueType>;
67
67
  * Analysis processing status.
68
68
  */
69
69
  declare enum AnalysisStatus {
70
- Processing = "processing",
71
- Completed = "completed",
72
- Failed = "failed"
70
+ Processing = 'processing',
71
+ Completed = 'completed',
72
+ Failed = 'failed',
73
73
  }
74
74
  /** Zod schema for AnalysisStatus enum */
75
75
  declare const AnalysisStatusSchema: z.ZodEnum<typeof AnalysisStatus>;
@@ -77,10 +77,10 @@ declare const AnalysisStatusSchema: z.ZodEnum<typeof AnalysisStatus>;
77
77
  * AI Model Context Tiers.
78
78
  */
79
79
  declare enum ModelTier {
80
- Compact = "compact",
81
- Standard = "standard",
82
- Extended = "extended",
83
- Frontier = "frontier"
80
+ Compact = 'compact',
81
+ Standard = 'standard',
82
+ Extended = 'extended',
83
+ Frontier = 'frontier',
84
84
  }
85
85
  /** Zod schema for ModelTier enum */
86
86
  declare const ModelTierSchema: z.ZodEnum<typeof ModelTier>;
@@ -89,80 +89,92 @@ declare const ModelTierSchema: z.ZodEnum<typeof ModelTier>;
89
89
  * Common tool options
90
90
  */
91
91
  interface ToolOptions {
92
- /** Maximum number of results to return */
93
- maxResults?: number;
94
- /** Severity filter */
95
- severity?: 'info' | 'warning' | 'error' | 'critical';
96
- /** Output format */
97
- outputFormat?: 'json' | 'text' | 'html';
98
- /** Additional configuration */
99
- config?: Record<string, unknown>;
100
- /** Custom key-value pairs */
101
- [key: string]: any;
92
+ /** Maximum number of results to return */
93
+ maxResults?: number;
94
+ /** Severity filter */
95
+ severity?: 'info' | 'warning' | 'error' | 'critical';
96
+ /** Output format */
97
+ outputFormat?: 'json' | 'text' | 'html';
98
+ /** Additional configuration */
99
+ config?: Record<string, unknown>;
100
+ /** Custom key-value pairs */
101
+ [key: string]: any;
102
102
  }
103
103
  /**
104
104
  * Source code location schema.
105
105
  */
106
106
  /** Zod schema for Location object */
107
- declare const LocationSchema: z.ZodObject<{
107
+ declare const LocationSchema: z.ZodObject<
108
+ {
108
109
  file: z.ZodString;
109
110
  line: z.ZodNumber;
110
111
  column: z.ZodOptional<z.ZodNumber>;
111
112
  endLine: z.ZodOptional<z.ZodNumber>;
112
113
  endColumn: z.ZodOptional<z.ZodNumber>;
113
- }, z.core.$strip>;
114
+ },
115
+ z.core.$strip
116
+ >;
114
117
  type Location = z.infer<typeof LocationSchema>;
115
118
  /**
116
119
  * Scan options for tool providers
117
120
  */
118
121
  interface ScanOptions extends ToolOptions {
119
- /** Target output format */
120
- output?: string | {
122
+ /** Target output format */
123
+ output?:
124
+ | string
125
+ | {
121
126
  format: string;
122
127
  file?: string;
123
- };
124
- /** Visual format (json/console/html) */
125
- format?: 'json' | 'console' | 'html';
126
- /** Whether to run in parallel */
127
- parallel?: boolean;
128
+ };
129
+ /** Visual format (json/console/html) */
130
+ format?: 'json' | 'console' | 'html';
131
+ /** Whether to run in parallel */
132
+ parallel?: boolean;
128
133
  }
129
134
 
130
135
  /**
131
136
  * Standard Issue schema used across all tools.
132
137
  */
133
138
  /** Zod schema for Issue object */
134
- declare const IssueSchema: z.ZodObject<{
139
+ declare const IssueSchema: z.ZodObject<
140
+ {
135
141
  type: z.ZodEnum<typeof IssueType>;
136
142
  severity: z.ZodEnum<typeof Severity>;
137
143
  message: z.ZodString;
138
- location: z.ZodObject<{
144
+ location: z.ZodObject<
145
+ {
139
146
  file: z.ZodString;
140
147
  line: z.ZodNumber;
141
148
  column: z.ZodOptional<z.ZodNumber>;
142
149
  endLine: z.ZodOptional<z.ZodNumber>;
143
150
  endColumn: z.ZodOptional<z.ZodNumber>;
144
- }, z.core.$strip>;
151
+ },
152
+ z.core.$strip
153
+ >;
145
154
  suggestion: z.ZodOptional<z.ZodString>;
146
- }, z.core.$strip>;
155
+ },
156
+ z.core.$strip
157
+ >;
147
158
  type Issue = z.infer<typeof IssueSchema>;
148
159
  /**
149
160
  * Issue overlay on the graph
150
161
  */
151
162
  interface IssueOverlay {
152
- id: string;
153
- type: string;
154
- severity: string;
155
- nodeIds: string[];
156
- edgeIds?: string[];
157
- message: string;
158
- details?: string;
163
+ id: string;
164
+ type: string;
165
+ severity: string;
166
+ nodeIds: string[];
167
+ edgeIds?: string[];
168
+ message: string;
169
+ details?: string;
159
170
  }
160
171
 
161
172
  /**
162
173
  * Standard Metrics schema.
163
174
  */
164
175
  /** Zod schema for Metrics object */
165
- declare const MetricsSchema: z.ZodObject<{
176
+ declare const MetricsSchema: z.ZodObject<
177
+ {
166
178
  tokenCost: z.ZodOptional<z.ZodNumber>;
167
179
  complexityScore: z.ZodOptional<z.ZodNumber>;
168
180
  consistencyScore: z.ZodOptional<z.ZodNumber>;
@@ -178,28 +190,40 @@ declare const MetricsSchema: z.ZodObject<{
178
190
  comprehensionDifficultyIndex: z.ZodOptional<z.ZodNumber>;
179
191
  totalSymbols: z.ZodOptional<z.ZodNumber>;
180
192
  totalExports: z.ZodOptional<z.ZodNumber>;
181
- }, z.core.$strip>;
193
+ },
194
+ z.core.$strip
195
+ >;
182
196
  type Metrics = z.infer<typeof MetricsSchema>;
183
197
 
184
198
  /**
185
199
  * Individual file/module analysis result.
186
200
  */
187
- declare const AnalysisResultSchema: z.ZodObject<{
201
+ declare const AnalysisResultSchema: z.ZodObject<
202
+ {
188
203
  fileName: z.ZodString;
189
- issues: z.ZodArray<z.ZodObject<{
190
- type: z.ZodEnum<typeof IssueType>;
191
- severity: z.ZodEnum<typeof Severity>;
192
- message: z.ZodString;
193
- location: z.ZodObject<{
194
- file: z.ZodString;
195
- line: z.ZodNumber;
196
- column: z.ZodOptional<z.ZodNumber>;
197
- endLine: z.ZodOptional<z.ZodNumber>;
198
- endColumn: z.ZodOptional<z.ZodNumber>;
199
- }, z.core.$strip>;
200
- suggestion: z.ZodOptional<z.ZodString>;
201
- }, z.core.$strip>>;
202
- metrics: z.ZodObject<{
204
+ issues: z.ZodArray<
205
+ z.ZodObject<
206
+ {
207
+ type: z.ZodEnum<typeof IssueType>;
208
+ severity: z.ZodEnum<typeof Severity>;
209
+ message: z.ZodString;
210
+ location: z.ZodObject<
211
+ {
212
+ file: z.ZodString;
213
+ line: z.ZodNumber;
214
+ column: z.ZodOptional<z.ZodNumber>;
215
+ endLine: z.ZodOptional<z.ZodNumber>;
216
+ endColumn: z.ZodOptional<z.ZodNumber>;
217
+ },
218
+ z.core.$strip
219
+ >;
220
+ suggestion: z.ZodOptional<z.ZodString>;
221
+ },
222
+ z.core.$strip
223
+ >
224
+ >;
225
+ metrics: z.ZodObject<
226
+ {
203
227
  tokenCost: z.ZodOptional<z.ZodNumber>;
204
228
  complexityScore: z.ZodOptional<z.ZodNumber>;
205
229
  consistencyScore: z.ZodOptional<z.ZodNumber>;
@@ -215,176 +239,281 @@ declare const AnalysisResultSchema: z.ZodObject<{
215
239
  comprehensionDifficultyIndex: z.ZodOptional<z.ZodNumber>;
216
240
  totalSymbols: z.ZodOptional<z.ZodNumber>;
217
241
  totalExports: z.ZodOptional<z.ZodNumber>;
218
- }, z.core.$strip>;
219
- }, z.core.$strip>;
242
+ },
243
+ z.core.$strip
244
+ >;
245
+ },
246
+ z.core.$strip
247
+ >;
220
248
  type AnalysisResult = z.infer<typeof AnalysisResultSchema>;
221
249
  /**
222
250
  * Standard spoke tool summary schema.
223
251
  */
224
- declare const SpokeSummarySchema: z.ZodObject<{
252
+ declare const SpokeSummarySchema: z.ZodObject<
253
+ {
225
254
  totalFiles: z.ZodOptional<z.ZodNumber>;
226
255
  totalIssues: z.ZodOptional<z.ZodNumber>;
227
256
  criticalIssues: z.ZodOptional<z.ZodNumber>;
228
257
  majorIssues: z.ZodOptional<z.ZodNumber>;
229
258
  score: z.ZodOptional<z.ZodNumber>;
230
- }, z.core.$catchall<z.ZodAny>>;
259
+ },
260
+ z.core.$catchall<z.ZodAny>
261
+ >;
231
262
  type SpokeSummary = z.infer<typeof SpokeSummarySchema>;
232
263
  /**
233
264
  * Standard spoke tool output contract.
234
265
  */
235
- declare const SpokeOutputSchema: z.ZodObject<{
236
- results: z.ZodArray<z.ZodObject<{
237
- fileName: z.ZodString;
238
- issues: z.ZodArray<z.ZodObject<{
239
- type: z.ZodEnum<typeof IssueType>;
240
- severity: z.ZodEnum<typeof Severity>;
241
- message: z.ZodString;
242
- location: z.ZodObject<{
243
- file: z.ZodString;
244
- line: z.ZodNumber;
245
- column: z.ZodOptional<z.ZodNumber>;
246
- endLine: z.ZodOptional<z.ZodNumber>;
247
- endColumn: z.ZodOptional<z.ZodNumber>;
248
- }, z.core.$strip>;
249
- suggestion: z.ZodOptional<z.ZodString>;
250
- }, z.core.$strip>>;
251
- metrics: z.ZodObject<{
252
- tokenCost: z.ZodOptional<z.ZodNumber>;
253
- complexityScore: z.ZodOptional<z.ZodNumber>;
254
- consistencyScore: z.ZodOptional<z.ZodNumber>;
255
- docFreshnessScore: z.ZodOptional<z.ZodNumber>;
256
- aiSignalClarityScore: z.ZodOptional<z.ZodNumber>;
257
- agentGroundingScore: z.ZodOptional<z.ZodNumber>;
258
- testabilityScore: z.ZodOptional<z.ZodNumber>;
259
- docDriftScore: z.ZodOptional<z.ZodNumber>;
260
- dependencyHealthScore: z.ZodOptional<z.ZodNumber>;
261
- modelContextTier: z.ZodOptional<z.ZodEnum<typeof ModelTier>>;
262
- estimatedMonthlyCost: z.ZodOptional<z.ZodNumber>;
263
- estimatedDeveloperHours: z.ZodOptional<z.ZodNumber>;
264
- comprehensionDifficultyIndex: z.ZodOptional<z.ZodNumber>;
265
- totalSymbols: z.ZodOptional<z.ZodNumber>;
266
- totalExports: z.ZodOptional<z.ZodNumber>;
267
- }, z.core.$strip>;
268
- }, z.core.$strip>>;
269
- summary: z.ZodObject<{
266
+ declare const SpokeOutputSchema: z.ZodObject<
267
+ {
268
+ results: z.ZodArray<
269
+ z.ZodObject<
270
+ {
271
+ fileName: z.ZodString;
272
+ issues: z.ZodArray<
273
+ z.ZodObject<
274
+ {
275
+ type: z.ZodEnum<typeof IssueType>;
276
+ severity: z.ZodEnum<typeof Severity>;
277
+ message: z.ZodString;
278
+ location: z.ZodObject<
279
+ {
280
+ file: z.ZodString;
281
+ line: z.ZodNumber;
282
+ column: z.ZodOptional<z.ZodNumber>;
283
+ endLine: z.ZodOptional<z.ZodNumber>;
284
+ endColumn: z.ZodOptional<z.ZodNumber>;
285
+ },
286
+ z.core.$strip
287
+ >;
288
+ suggestion: z.ZodOptional<z.ZodString>;
289
+ },
290
+ z.core.$strip
291
+ >
292
+ >;
293
+ metrics: z.ZodObject<
294
+ {
295
+ tokenCost: z.ZodOptional<z.ZodNumber>;
296
+ complexityScore: z.ZodOptional<z.ZodNumber>;
297
+ consistencyScore: z.ZodOptional<z.ZodNumber>;
298
+ docFreshnessScore: z.ZodOptional<z.ZodNumber>;
299
+ aiSignalClarityScore: z.ZodOptional<z.ZodNumber>;
300
+ agentGroundingScore: z.ZodOptional<z.ZodNumber>;
301
+ testabilityScore: z.ZodOptional<z.ZodNumber>;
302
+ docDriftScore: z.ZodOptional<z.ZodNumber>;
303
+ dependencyHealthScore: z.ZodOptional<z.ZodNumber>;
304
+ modelContextTier: z.ZodOptional<z.ZodEnum<typeof ModelTier>>;
305
+ estimatedMonthlyCost: z.ZodOptional<z.ZodNumber>;
306
+ estimatedDeveloperHours: z.ZodOptional<z.ZodNumber>;
307
+ comprehensionDifficultyIndex: z.ZodOptional<z.ZodNumber>;
308
+ totalSymbols: z.ZodOptional<z.ZodNumber>;
309
+ totalExports: z.ZodOptional<z.ZodNumber>;
310
+ },
311
+ z.core.$strip
312
+ >;
313
+ },
314
+ z.core.$strip
315
+ >
316
+ >;
317
+ summary: z.ZodObject<
318
+ {
270
319
  totalFiles: z.ZodOptional<z.ZodNumber>;
271
320
  totalIssues: z.ZodOptional<z.ZodNumber>;
272
321
  criticalIssues: z.ZodOptional<z.ZodNumber>;
273
322
  majorIssues: z.ZodOptional<z.ZodNumber>;
274
323
  score: z.ZodOptional<z.ZodNumber>;
275
- }, z.core.$catchall<z.ZodAny>>;
276
- metadata: z.ZodOptional<z.ZodObject<{
277
- toolName: z.ZodString;
278
- version: z.ZodOptional<z.ZodString>;
279
- timestamp: z.ZodOptional<z.ZodString>;
280
- config: z.ZodOptional<z.ZodAny>;
281
- }, z.core.$catchall<z.ZodAny>>>;
282
- }, z.core.$strip>;
324
+ },
325
+ z.core.$catchall<z.ZodAny>
326
+ >;
327
+ metadata: z.ZodOptional<
328
+ z.ZodObject<
329
+ {
330
+ toolName: z.ZodString;
331
+ version: z.ZodOptional<z.ZodString>;
332
+ timestamp: z.ZodOptional<z.ZodString>;
333
+ config: z.ZodOptional<z.ZodAny>;
334
+ },
335
+ z.core.$catchall<z.ZodAny>
336
+ >
337
+ >;
338
+ },
339
+ z.core.$strip
340
+ >;
283
341
  type SpokeOutput = z.infer<typeof SpokeOutputSchema>;
284
342
  /**
285
343
  * Master Unified Report contract (CLI -> Platform).
286
344
  */
287
- declare const UnifiedReportSchema: z.ZodObject<{
288
- summary: z.ZodObject<{
345
+ declare const UnifiedReportSchema: z.ZodObject<
346
+ {
347
+ summary: z.ZodObject<
348
+ {
289
349
  totalFiles: z.ZodNumber;
290
350
  totalIssues: z.ZodNumber;
291
351
  criticalIssues: z.ZodNumber;
292
352
  majorIssues: z.ZodNumber;
293
- businessImpact: z.ZodOptional<z.ZodObject<{
294
- estimatedMonthlyWaste: z.ZodOptional<z.ZodNumber>;
295
- potentialSavings: z.ZodOptional<z.ZodNumber>;
296
- productivityHours: z.ZodOptional<z.ZodNumber>;
297
- }, z.core.$strip>>;
298
- }, z.core.$strip>;
299
- results: z.ZodArray<z.ZodObject<{
300
- fileName: z.ZodString;
301
- issues: z.ZodArray<z.ZodObject<{
302
- type: z.ZodEnum<typeof IssueType>;
303
- severity: z.ZodEnum<typeof Severity>;
304
- message: z.ZodString;
305
- location: z.ZodObject<{
306
- file: z.ZodString;
307
- line: z.ZodNumber;
308
- column: z.ZodOptional<z.ZodNumber>;
309
- endLine: z.ZodOptional<z.ZodNumber>;
310
- endColumn: z.ZodOptional<z.ZodNumber>;
311
- }, z.core.$strip>;
312
- suggestion: z.ZodOptional<z.ZodString>;
313
- }, z.core.$strip>>;
314
- metrics: z.ZodObject<{
315
- tokenCost: z.ZodOptional<z.ZodNumber>;
316
- complexityScore: z.ZodOptional<z.ZodNumber>;
317
- consistencyScore: z.ZodOptional<z.ZodNumber>;
318
- docFreshnessScore: z.ZodOptional<z.ZodNumber>;
319
- aiSignalClarityScore: z.ZodOptional<z.ZodNumber>;
320
- agentGroundingScore: z.ZodOptional<z.ZodNumber>;
321
- testabilityScore: z.ZodOptional<z.ZodNumber>;
322
- docDriftScore: z.ZodOptional<z.ZodNumber>;
323
- dependencyHealthScore: z.ZodOptional<z.ZodNumber>;
324
- modelContextTier: z.ZodOptional<z.ZodEnum<typeof ModelTier>>;
325
- estimatedMonthlyCost: z.ZodOptional<z.ZodNumber>;
326
- estimatedDeveloperHours: z.ZodOptional<z.ZodNumber>;
327
- comprehensionDifficultyIndex: z.ZodOptional<z.ZodNumber>;
328
- totalSymbols: z.ZodOptional<z.ZodNumber>;
329
- totalExports: z.ZodOptional<z.ZodNumber>;
330
- }, z.core.$strip>;
331
- }, z.core.$strip>>;
332
- scoring: z.ZodOptional<z.ZodObject<{
333
- overall: z.ZodNumber;
334
- rating: z.ZodString;
335
- timestamp: z.ZodString;
336
- breakdown: z.ZodArray<z.ZodObject<{
337
- toolName: z.ZodUnion<readonly [z.ZodEnum<typeof ToolName>, z.ZodString]>;
338
- score: z.ZodNumber;
339
- }, z.core.$catchall<z.ZodAny>>>;
340
- }, z.core.$strip>>;
341
- }, z.core.$catchall<z.ZodAny>>;
353
+ businessImpact: z.ZodOptional<
354
+ z.ZodObject<
355
+ {
356
+ estimatedMonthlyWaste: z.ZodOptional<z.ZodNumber>;
357
+ potentialSavings: z.ZodOptional<z.ZodNumber>;
358
+ productivityHours: z.ZodOptional<z.ZodNumber>;
359
+ },
360
+ z.core.$strip
361
+ >
362
+ >;
363
+ },
364
+ z.core.$strip
365
+ >;
366
+ results: z.ZodArray<
367
+ z.ZodObject<
368
+ {
369
+ fileName: z.ZodString;
370
+ issues: z.ZodArray<
371
+ z.ZodObject<
372
+ {
373
+ type: z.ZodEnum<typeof IssueType>;
374
+ severity: z.ZodEnum<typeof Severity>;
375
+ message: z.ZodString;
376
+ location: z.ZodObject<
377
+ {
378
+ file: z.ZodString;
379
+ line: z.ZodNumber;
380
+ column: z.ZodOptional<z.ZodNumber>;
381
+ endLine: z.ZodOptional<z.ZodNumber>;
382
+ endColumn: z.ZodOptional<z.ZodNumber>;
383
+ },
384
+ z.core.$strip
385
+ >;
386
+ suggestion: z.ZodOptional<z.ZodString>;
387
+ },
388
+ z.core.$strip
389
+ >
390
+ >;
391
+ metrics: z.ZodObject<
392
+ {
393
+ tokenCost: z.ZodOptional<z.ZodNumber>;
394
+ complexityScore: z.ZodOptional<z.ZodNumber>;
395
+ consistencyScore: z.ZodOptional<z.ZodNumber>;
396
+ docFreshnessScore: z.ZodOptional<z.ZodNumber>;
397
+ aiSignalClarityScore: z.ZodOptional<z.ZodNumber>;
398
+ agentGroundingScore: z.ZodOptional<z.ZodNumber>;
399
+ testabilityScore: z.ZodOptional<z.ZodNumber>;
400
+ docDriftScore: z.ZodOptional<z.ZodNumber>;
401
+ dependencyHealthScore: z.ZodOptional<z.ZodNumber>;
402
+ modelContextTier: z.ZodOptional<z.ZodEnum<typeof ModelTier>>;
403
+ estimatedMonthlyCost: z.ZodOptional<z.ZodNumber>;
404
+ estimatedDeveloperHours: z.ZodOptional<z.ZodNumber>;
405
+ comprehensionDifficultyIndex: z.ZodOptional<z.ZodNumber>;
406
+ totalSymbols: z.ZodOptional<z.ZodNumber>;
407
+ totalExports: z.ZodOptional<z.ZodNumber>;
408
+ },
409
+ z.core.$strip
410
+ >;
411
+ },
412
+ z.core.$strip
413
+ >
414
+ >;
415
+ scoring: z.ZodOptional<
416
+ z.ZodObject<
417
+ {
418
+ overall: z.ZodNumber;
419
+ rating: z.ZodString;
420
+ timestamp: z.ZodString;
421
+ breakdown: z.ZodArray<
422
+ z.ZodObject<
423
+ {
424
+ toolName: z.ZodUnion<
425
+ readonly [z.ZodEnum<typeof ToolName>, z.ZodString]
426
+ >;
427
+ score: z.ZodNumber;
428
+ },
429
+ z.core.$catchall<z.ZodAny>
430
+ >
431
+ >;
432
+ },
433
+ z.core.$strip
434
+ >
435
+ >;
436
+ },
437
+ z.core.$catchall<z.ZodAny>
438
+ >;
342
439
  type UnifiedReport = z.infer<typeof UnifiedReportSchema>;
343
440
 
344
441
  /**
345
442
  * Global AIReady Configuration Schema.
346
443
  * Strict definition for aiready.json and related config files.
347
444
  */
348
- declare const AIReadyConfigSchema: z.ZodObject<{
445
+ declare const AIReadyConfigSchema: z.ZodObject<
446
+ {
349
447
  exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
350
448
  threshold: z.ZodOptional<z.ZodNumber>;
351
- failOn: z.ZodOptional<z.ZodEnum<{
352
- any: "any";
353
- critical: "critical";
354
- major: "major";
355
- none: "none";
356
- }>>;
357
- scan: z.ZodOptional<z.ZodObject<{
358
- include: z.ZodOptional<z.ZodArray<z.ZodString>>;
359
- exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
360
- parallel: z.ZodOptional<z.ZodBoolean>;
361
- deep: z.ZodOptional<z.ZodBoolean>;
362
- tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
363
- }, z.core.$strip>>;
364
- output: z.ZodOptional<z.ZodObject<{
365
- format: z.ZodOptional<z.ZodEnum<{
366
- json: "json";
367
- console: "console";
368
- html: "html";
369
- }>>;
370
- path: z.ZodOptional<z.ZodString>;
371
- saveTo: z.ZodOptional<z.ZodString>;
372
- showBreakdown: z.ZodOptional<z.ZodBoolean>;
373
- compareBaseline: z.ZodOptional<z.ZodString>;
374
- }, z.core.$strip>>;
449
+ failOn: z.ZodOptional<
450
+ z.ZodEnum<{
451
+ any: 'any';
452
+ critical: 'critical';
453
+ major: 'major';
454
+ none: 'none';
455
+ }>
456
+ >;
457
+ scan: z.ZodOptional<
458
+ z.ZodObject<
459
+ {
460
+ include: z.ZodOptional<z.ZodArray<z.ZodString>>;
461
+ exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
462
+ parallel: z.ZodOptional<z.ZodBoolean>;
463
+ deep: z.ZodOptional<z.ZodBoolean>;
464
+ tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
465
+ },
466
+ z.core.$strip
467
+ >
468
+ >;
469
+ output: z.ZodOptional<
470
+ z.ZodObject<
471
+ {
472
+ format: z.ZodOptional<
473
+ z.ZodEnum<{
474
+ json: 'json';
475
+ console: 'console';
476
+ html: 'html';
477
+ }>
478
+ >;
479
+ path: z.ZodOptional<z.ZodString>;
480
+ saveTo: z.ZodOptional<z.ZodString>;
481
+ showBreakdown: z.ZodOptional<z.ZodBoolean>;
482
+ compareBaseline: z.ZodOptional<z.ZodString>;
483
+ },
484
+ z.core.$strip
485
+ >
486
+ >;
375
487
  tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
376
- scoring: z.ZodOptional<z.ZodObject<{
377
- profile: z.ZodOptional<z.ZodString>;
378
- weights: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
379
- }, z.core.$strip>>;
380
- visualizer: z.ZodOptional<z.ZodObject<{
381
- groupingDirs: z.ZodOptional<z.ZodArray<z.ZodString>>;
382
- graph: z.ZodOptional<z.ZodObject<{
383
- maxNodes: z.ZodOptional<z.ZodNumber>;
384
- maxEdges: z.ZodOptional<z.ZodNumber>;
385
- }, z.core.$strip>>;
386
- }, z.core.$strip>>;
387
- }, z.core.$catchall<z.ZodAny>>;
488
+ scoring: z.ZodOptional<
489
+ z.ZodObject<
490
+ {
491
+ profile: z.ZodOptional<z.ZodString>;
492
+ weights: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
493
+ },
494
+ z.core.$strip
495
+ >
496
+ >;
497
+ visualizer: z.ZodOptional<
498
+ z.ZodObject<
499
+ {
500
+ groupingDirs: z.ZodOptional<z.ZodArray<z.ZodString>>;
501
+ graph: z.ZodOptional<
502
+ z.ZodObject<
503
+ {
504
+ maxNodes: z.ZodOptional<z.ZodNumber>;
505
+ maxEdges: z.ZodOptional<z.ZodNumber>;
506
+ },
507
+ z.core.$strip
508
+ >
509
+ >;
510
+ },
511
+ z.core.$strip
512
+ >
513
+ >;
514
+ },
515
+ z.core.$catchall<z.ZodAny>
516
+ >;
388
517
 
389
518
  /**
390
519
  * Shared types for graph-based visualizations
@@ -394,102 +523,103 @@ declare const AIReadyConfigSchema: z.ZodObject<{
394
523
  * Base graph node compatible with d3-force simulation
395
524
  */
396
525
  interface BaseGraphNode {
397
- id: string;
398
- x?: number;
399
- y?: number;
400
- vx?: number;
401
- vy?: number;
402
- fx?: number | null;
403
- fy?: number | null;
526
+ id: string;
527
+ x?: number;
528
+ y?: number;
529
+ vx?: number;
530
+ vy?: number;
531
+ fx?: number | null;
532
+ fy?: number | null;
404
533
  }
405
534
  /**
406
535
  * Base graph link compatible with d3-force simulation
407
536
  */
408
537
  interface BaseGraphLink {
409
- source: string | BaseGraphNode;
410
- target: string | BaseGraphNode;
411
- index?: number;
538
+ source: string | BaseGraphNode;
539
+ target: string | BaseGraphNode;
540
+ index?: number;
412
541
  }
413
542
  /**
414
543
  * Full graph node with all metadata
415
544
  */
416
545
  interface GraphNode extends BaseGraphNode {
417
- label: string;
418
- path?: string;
419
- size?: number;
420
- value?: number;
421
- color?: string;
422
- group?: string;
423
- title?: string;
424
- duplicates?: number;
425
- tokenCost?: number;
426
- severity?: string;
546
+ label: string;
547
+ path?: string;
548
+ size?: number;
549
+ value?: number;
550
+ color?: string;
551
+ group?: string;
552
+ title?: string;
553
+ duplicates?: number;
554
+ tokenCost?: number;
555
+ severity?: string;
427
556
  }
428
557
  interface GraphEdge {
429
- source: string;
430
- target: string;
431
- type?: string;
432
- weight?: number;
558
+ source: string;
559
+ target: string;
560
+ type?: string;
561
+ weight?: number;
433
562
  }
434
563
  interface GraphData {
435
- nodes: GraphNode[];
436
- edges: GraphEdge[];
437
- clusters?: {
438
- id: string;
439
- name: string;
440
- nodeIds: string[];
441
- }[];
442
- issues?: IssueOverlay[];
443
- metadata?: GraphMetadata$1;
444
- /** Whether the graph was truncated due to size limits */
445
- truncated?: {
446
- nodes: boolean;
447
- edges: boolean;
448
- nodeCount?: number;
449
- edgeCount?: number;
450
- nodeLimit?: number;
451
- edgeLimit?: number;
452
- };
564
+ nodes: GraphNode[];
565
+ edges: GraphEdge[];
566
+ clusters?: {
567
+ id: string;
568
+ name: string;
569
+ nodeIds: string[];
570
+ }[];
571
+ issues?: IssueOverlay[];
572
+ metadata?: GraphMetadata$1;
573
+ /** Whether the graph was truncated due to size limits */
574
+ truncated?: {
575
+ nodes: boolean;
576
+ edges: boolean;
577
+ nodeCount?: number;
578
+ edgeCount?: number;
579
+ nodeLimit?: number;
580
+ edgeLimit?: number;
581
+ };
453
582
  }
454
583
  /**
455
584
  * Metadata about the graph
456
585
  */
457
586
  interface GraphMetadata$1 {
458
- projectName?: string;
459
- timestamp?: string;
460
- totalFiles?: number;
461
- totalDependencies?: number;
462
- analysisTypes?: string[];
463
- totalLinesOfCode?: number;
464
- totalTokenCost?: number;
465
- averageComplexity?: number;
466
- criticalIssues?: number;
467
- majorIssues?: number;
468
- minorIssues?: number;
469
- infoIssues?: number;
470
- estimatedMonthlyCost?: number;
471
- estimatedDeveloperHours?: number;
472
- aiAcceptanceRate?: number;
473
- aiReadinessScore?: number;
474
- /** AI token budget unit economics (v0.13+) */
475
- tokenBudget?: any;
587
+ projectName?: string;
588
+ timestamp?: string;
589
+ totalFiles?: number;
590
+ totalDependencies?: number;
591
+ analysisTypes?: string[];
592
+ totalLinesOfCode?: number;
593
+ totalTokenCost?: number;
594
+ averageComplexity?: number;
595
+ criticalIssues?: number;
596
+ majorIssues?: number;
597
+ minorIssues?: number;
598
+ infoIssues?: number;
599
+ estimatedMonthlyCost?: number;
600
+ estimatedDeveloperHours?: number;
601
+ aiAcceptanceRate?: number;
602
+ aiReadinessScore?: number;
603
+ /** AI token budget unit economics (v0.13+) */
604
+ tokenBudget?: any;
476
605
  }
477
606
 
478
607
  /**
479
608
  * Lead Source identifiers.
480
609
  */
481
610
  declare enum LeadSource {
482
- ClawMoreHero = "clawmore-hero",
483
- ClawMoreWaitlist = "clawmore-waitlist",
484
- ClawMoreBeta = "clawmore-beta",
485
- AiReadyPlatform = "aiready-platform"
611
+ ClawMoreHero = 'clawmore-hero',
612
+ ClawMoreWaitlist = 'clawmore-waitlist',
613
+ ClawMoreBeta = 'clawmore-beta',
614
+ AiReadyPlatform = 'aiready-platform',
486
615
  }
487
616
  /** Zod schema for LeadSource enum */
488
617
  declare const LeadSourceSchema: z.ZodEnum<typeof LeadSource>;
489
618
  /**
490
619
  * Business Lead schema for waitlists and beta signups.
491
620
  */
492
- declare const LeadSchema: z.ZodObject<{
621
+ declare const LeadSchema: z.ZodObject<
622
+ {
493
623
  id: z.ZodString;
494
624
  email: z.ZodString;
495
625
  name: z.ZodString;
@@ -497,118 +627,146 @@ declare const LeadSchema: z.ZodObject<{
497
627
  notes: z.ZodOptional<z.ZodString>;
498
628
  timestamp: z.ZodString;
499
629
  source: z.ZodEnum<typeof LeadSource>;
500
- status: z.ZodDefault<z.ZodEnum<{
501
- new: "new";
502
- contacted: "contacted";
503
- qualified: "qualified";
504
- converted: "converted";
505
- archived: "archived";
506
- }>>;
507
- }, z.core.$strip>;
630
+ status: z.ZodDefault<
631
+ z.ZodEnum<{
632
+ new: 'new';
633
+ contacted: 'contacted';
634
+ qualified: 'qualified';
635
+ converted: 'converted';
636
+ archived: 'archived';
637
+ }>
638
+ >;
639
+ },
640
+ z.core.$strip
641
+ >;
508
642
  type Lead = z.infer<typeof LeadSchema>;
509
643
  /**
510
644
  * Lead Submission (input from form)
511
645
  */
512
- declare const LeadSubmissionSchema: z.ZodObject<{
646
+ declare const LeadSubmissionSchema: z.ZodObject<
647
+ {
513
648
  source: z.ZodEnum<typeof LeadSource>;
514
649
  email: z.ZodString;
515
650
  name: z.ZodString;
516
651
  interest: z.ZodDefault<z.ZodString>;
517
652
  notes: z.ZodOptional<z.ZodString>;
518
- }, z.core.$strip>;
653
+ },
654
+ z.core.$strip
655
+ >;
519
656
  type LeadSubmission = z.infer<typeof LeadSubmissionSchema>;
520
657
  /**
521
658
  * Managed AWS Account metadata for the Account Vending Machine.
522
659
  */
523
- declare const ManagedAccountSchema: z.ZodObject<{
660
+ declare const ManagedAccountSchema: z.ZodObject<
661
+ {
524
662
  id: z.ZodString;
525
663
  accountId: z.ZodString;
526
664
  userId: z.ZodString;
527
665
  stripeSubscriptionId: z.ZodString;
528
- tokenStrategy: z.ZodDefault<z.ZodEnum<{
529
- managed: "managed";
530
- byok: "byok";
531
- }>>;
532
- byokConfig: z.ZodOptional<z.ZodObject<{
533
- openaiKey: z.ZodOptional<z.ZodString>;
534
- anthropicKey: z.ZodOptional<z.ZodString>;
535
- openrouterKey: z.ZodOptional<z.ZodString>;
536
- }, z.core.$strip>>;
666
+ tokenStrategy: z.ZodDefault<
667
+ z.ZodEnum<{
668
+ managed: 'managed';
669
+ byok: 'byok';
670
+ }>
671
+ >;
672
+ byokConfig: z.ZodOptional<
673
+ z.ZodObject<
674
+ {
675
+ openaiKey: z.ZodOptional<z.ZodString>;
676
+ anthropicKey: z.ZodOptional<z.ZodString>;
677
+ openrouterKey: z.ZodOptional<z.ZodString>;
678
+ },
679
+ z.core.$strip
680
+ >
681
+ >;
537
682
  baseFeeCents: z.ZodDefault<z.ZodNumber>;
538
683
  includedComputeCents: z.ZodDefault<z.ZodNumber>;
539
684
  includedTokenCents: z.ZodDefault<z.ZodNumber>;
540
685
  prepaidTokenBalanceCents: z.ZodDefault<z.ZodNumber>;
541
686
  currentMonthlyTokenSpendCents: z.ZodDefault<z.ZodNumber>;
542
- status: z.ZodDefault<z.ZodEnum<{
543
- warning: "warning";
544
- provisioning: "provisioning";
545
- active: "active";
546
- quarantined: "quarantined";
547
- suspended: "suspended";
548
- }>>;
687
+ status: z.ZodDefault<
688
+ z.ZodEnum<{
689
+ warning: 'warning';
690
+ provisioning: 'provisioning';
691
+ active: 'active';
692
+ quarantined: 'quarantined';
693
+ suspended: 'suspended';
694
+ }>
695
+ >;
549
696
  lastCostSyncAt: z.ZodOptional<z.ZodString>;
550
697
  region: z.ZodDefault<z.ZodString>;
551
698
  alertThresholds: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
552
- }, z.core.$strip>;
699
+ },
700
+ z.core.$strip
701
+ >;
553
702
  type ManagedAccount = z.infer<typeof ManagedAccountSchema>;
554
703
 
555
704
  /**
556
705
  * Location information in source code
557
706
  */
558
707
  interface SourceLocation {
559
- line: number;
560
- column: number;
708
+ line: number;
709
+ column: number;
561
710
  }
562
711
  /**
563
712
  * Range information in source code
564
713
  */
565
714
  interface SourceRange {
566
- start: SourceLocation;
567
- end: SourceLocation;
715
+ start: SourceLocation;
716
+ end: SourceLocation;
568
717
  }
569
- type ExportType = 'function' | 'class' | 'interface' | 'type' | 'const' | 'var' | 'enum' | 'module' | 'unknown';
718
+ type ExportType =
719
+ | 'function'
720
+ | 'class'
721
+ | 'interface'
722
+ | 'type'
723
+ | 'const'
724
+ | 'var'
725
+ | 'enum'
726
+ | 'module'
727
+ | 'unknown';
570
728
  interface ExportWithImports {
571
- name: string;
572
- type: ExportType;
573
- source?: string;
574
- imports: string[];
575
- dependencies: string[];
576
- typeReferences: string[];
577
- loc?: SourceRange;
729
+ name: string;
730
+ type: ExportType;
731
+ source?: string;
732
+ imports: string[];
733
+ dependencies: string[];
734
+ typeReferences: string[];
735
+ loc?: SourceRange;
578
736
  }
579
737
  /**
580
738
  * Information about a single import declaration
581
739
  */
582
740
  interface FileImport {
583
- /** Module being imported from */
584
- source: string;
585
- /** What's being imported */
586
- specifiers: string[];
587
- /** Is this a type-only import (TypeScript) */
588
- isTypeOnly?: boolean;
589
- /** Location in source */
590
- loc?: SourceRange;
741
+ /** Module being imported from */
742
+ source: string;
743
+ /** What's being imported */
744
+ specifiers: string[];
745
+ /** Is this a type-only import (TypeScript) */
746
+ isTypeOnly?: boolean;
747
+ /** Location in source */
748
+ loc?: SourceRange;
591
749
  }
592
750
  interface ASTNode {
593
- type: string;
594
- loc?: SourceRange;
751
+ type: string;
752
+ loc?: SourceRange;
595
753
  }
596
754
  /**
597
755
  * AI token budget unit economics (v0.13+)
598
756
  */
599
757
  interface TokenBudget {
600
- totalContextTokens: number;
601
- estimatedResponseTokens?: number;
602
- wastedTokens: {
603
- total: number;
604
- bySource: {
605
- duplication: number;
606
- fragmentation: number;
607
- chattiness: number;
608
- };
758
+ totalContextTokens: number;
759
+ estimatedResponseTokens?: number;
760
+ wastedTokens: {
761
+ total: number;
762
+ bySource: {
763
+ duplication: number;
764
+ fragmentation: number;
765
+ chattiness: number;
609
766
  };
610
- efficiencyRatio: number;
611
- potentialRetrievableTokens: number;
767
+ };
768
+ efficiencyRatio: number;
769
+ potentialRetrievableTokens: number;
612
770
  }
613
771
 
614
772
  /**
@@ -623,119 +781,122 @@ type Config = AIReadyConfig;
623
781
  * Result of a single tool execution
624
782
  */
625
783
  interface ToolOutput {
626
- /** Unique name/ID of the tool */
627
- toolName: ToolName | string;
628
- /** Whether the tool ran successfully */
629
- success: boolean;
630
- /** List of issues found by the tool */
631
- issues: IssueType[] | any[];
632
- /** Numeric metrics produced by the tool */
633
- metrics: Metrics;
634
- /** Execution duration in milliseconds */
635
- duration?: number;
784
+ /** Unique name/ID of the tool */
785
+ toolName: ToolName | string;
786
+ /** Whether the tool ran successfully */
787
+ success: boolean;
788
+ /** List of issues found by the tool */
789
+ issues: IssueType[] | any[];
790
+ /** Numeric metrics produced by the tool */
791
+ metrics: Metrics;
792
+ /** Execution duration in milliseconds */
793
+ duration?: number;
636
794
  }
637
795
  /**
638
796
  * Overall scan result
639
797
  */
640
798
  interface ScanResult {
641
- /** ISO timestamp of the scan */
642
- timestamp: string;
643
- /** Root directory analyzed */
644
- rootDir: string;
645
- /** Number of files processed */
646
- filesAnalyzed: number;
647
- /** Total issues found across all tools */
648
- totalIssues: number;
649
- /** Breakdown of issue counts by type */
650
- issuesByType: Record<string, number>;
651
- /** Breakdown of issue counts by severity */
652
- issuesBySeverity: Record<Severity | string, number>;
653
- /** Final calculated AIReady score (0-100) */
654
- score: number;
655
- /** Individual tool outputs */
656
- tools: ToolOutput[];
799
+ /** ISO timestamp of the scan */
800
+ timestamp: string;
801
+ /** Root directory analyzed */
802
+ rootDir: string;
803
+ /** Number of files processed */
804
+ filesAnalyzed: number;
805
+ /** Total issues found across all tools */
806
+ totalIssues: number;
807
+ /** Breakdown of issue counts by type */
808
+ issuesByType: Record<string, number>;
809
+ /** Breakdown of issue counts by severity */
810
+ issuesBySeverity: Record<Severity | string, number>;
811
+ /** Final calculated AIReady score (0-100) */
812
+ score: number;
813
+ /** Individual tool outputs */
814
+ tools: ToolOutput[];
657
815
  }
658
816
  /**
659
817
  * Cost configuration for business impact analysis
660
818
  */
661
819
  interface CostConfig {
662
- /** Price in USD per 1,000 tokens */
663
- pricePer1KTokens: number;
664
- /** Average number of AI queries per developer per day */
665
- queriesPerDevPerDay: number;
666
- /** Total number of developers in the team */
667
- developerCount: number;
668
- /** Working days per month */
669
- daysPerMonth: number;
820
+ /** Price in USD per 1,000 tokens */
821
+ pricePer1KTokens: number;
822
+ /** Average number of AI queries per developer per day */
823
+ queriesPerDevPerDay: number;
824
+ /** Total number of developers in the team */
825
+ developerCount: number;
826
+ /** Working days per month */
827
+ daysPerMonth: number;
670
828
  }
671
829
  /**
672
830
  * Productivity impact metrics
673
831
  */
674
832
  interface ProductivityImpact {
675
- /** Estimated developer hours wasted on quality issues */
676
- totalHours: number;
677
- /** Developer hourly rate used for calculation */
678
- hourlyRate: number;
679
- /** Estimated total monthly cost of productivity loss */
680
- totalCost: number;
681
- /** Impact breakdown by severity */
682
- bySeverity: Record<Severity | string, {
683
- /** Hours lost for this severity level */
684
- hours: number;
685
- /** Cost associated with these hours */
686
- cost: number;
687
- }>;
833
+ /** Estimated developer hours wasted on quality issues */
834
+ totalHours: number;
835
+ /** Developer hourly rate used for calculation */
836
+ hourlyRate: number;
837
+ /** Estimated total monthly cost of productivity loss */
838
+ totalCost: number;
839
+ /** Impact breakdown by severity */
840
+ bySeverity: Record<
841
+ Severity | string,
842
+ {
843
+ /** Hours lost for this severity level */
844
+ hours: number;
845
+ /** Cost associated with these hours */
846
+ cost: number;
847
+ }
848
+ >;
688
849
  }
689
850
  /**
690
851
  * AI suggestion acceptance prediction
691
852
  */
692
853
  interface AcceptancePrediction {
693
- /** Predicted acceptance rate (0-1) */
694
- rate: number;
695
- /** Confidence level of the prediction (0-1) */
696
- confidence: number;
697
- /** Qualitative factors influencing the prediction */
698
- factors: Array<{
699
- /** Factor name */
700
- name: string;
701
- /** Impact weight (-100 to 100) */
702
- impact: number;
703
- }>;
854
+ /** Predicted acceptance rate (0-1) */
855
+ rate: number;
856
+ /** Confidence level of the prediction (0-1) */
857
+ confidence: number;
858
+ /** Qualitative factors influencing the prediction */
859
+ factors: Array<{
860
+ /** Factor name */
861
+ name: string;
862
+ /** Impact weight (-100 to 100) */
863
+ impact: number;
864
+ }>;
704
865
  }
705
866
  /**
706
867
  * Technical Value Chain summary
707
868
  */
708
869
  interface TechnicalValueChain {
709
- /** Overall business value score for the component */
710
- score?: number;
711
- /** Business logic density (e.g. core vs boilerplate) */
712
- density?: number;
713
- /** Data access layer complexity */
714
- complexity?: number;
715
- /** API surface area and exposure */
716
- surface?: number;
717
- /** Issue type associated with this chain */
718
- issueType?: string;
719
- /** Name of the leading technical metric */
720
- technicalMetric?: string;
721
- /** Raw value of the technical metric */
722
- technicalValue?: number;
723
- /** Impact on AI agents */
724
- aiImpact?: {
725
- description: string;
726
- scoreImpact: number;
727
- };
728
- /** Impact on developer experience */
729
- developerImpact?: {
730
- description: string;
731
- productivityLoss: number;
732
- };
733
- /** Predicted business outcome */
734
- businessOutcome?: {
735
- directCost: number;
736
- opportunityCost: number;
737
- riskLevel: 'low' | 'moderate' | 'high' | 'critical';
738
- };
870
+ /** Overall business value score for the component */
871
+ score?: number;
872
+ /** Business logic density (e.g. core vs boilerplate) */
873
+ density?: number;
874
+ /** Data access layer complexity */
875
+ complexity?: number;
876
+ /** API surface area and exposure */
877
+ surface?: number;
878
+ /** Issue type associated with this chain */
879
+ issueType?: string;
880
+ /** Name of the leading technical metric */
881
+ technicalMetric?: string;
882
+ /** Raw value of the technical metric */
883
+ technicalValue?: number;
884
+ /** Impact on AI agents */
885
+ aiImpact?: {
886
+ description: string;
887
+ scoreImpact: number;
888
+ };
889
+ /** Impact on developer experience */
890
+ developerImpact?: {
891
+ description: string;
892
+ productivityLoss: number;
893
+ };
894
+ /** Predicted business outcome */
895
+ businessOutcome?: {
896
+ directCost: number;
897
+ opportunityCost: number;
898
+ riskLevel: 'low' | 'moderate' | 'high' | 'critical';
899
+ };
739
900
  }
740
901
  /**
741
902
  * Compatibility alias
@@ -745,41 +906,41 @@ type TechnicalValueChainSummary = TechnicalValueChain;
745
906
  * Code comprehension difficulty metrics
746
907
  */
747
908
  interface ComprehensionDifficulty {
748
- /** Overall difficulty score (0-100) */
749
- score: number;
750
- /** Descriptive rating of difficulty */
751
- rating: 'trivial' | 'easy' | 'moderate' | 'difficult' | 'expert';
752
- /** Ratios and factors contributing to difficulty */
753
- factors: {
754
- /** Ratio of file tokens to model context limit */
755
- budgetRatio: number;
756
- /** Relative depth of dependency tree */
757
- depthRatio: number;
758
- /** Level of logical fragmentation */
759
- fragmentation: number;
760
- };
909
+ /** Overall difficulty score (0-100) */
910
+ score: number;
911
+ /** Descriptive rating of difficulty */
912
+ rating: 'trivial' | 'easy' | 'moderate' | 'difficult' | 'expert';
913
+ /** Ratios and factors contributing to difficulty */
914
+ factors: {
915
+ /** Ratio of file tokens to model context limit */
916
+ budgetRatio: number;
917
+ /** Relative depth of dependency tree */
918
+ depthRatio: number;
919
+ /** Level of logical fragmentation */
920
+ fragmentation: number;
921
+ };
761
922
  }
762
923
  /**
763
924
  * Business impact metrics (v0.10+)
764
925
  */
765
926
  interface BusinessMetrics {
766
- /** Predicted monthly cost of technical waste */
767
- estimatedMonthlyCost?: number;
768
- /** Estimated developer hours lost per month */
769
- estimatedDeveloperHours?: number;
770
- /** Predicted rate of AI suggestion acceptance */
771
- aiAcceptanceRate?: number;
772
- /** Overall AI readiness score */
773
- aiReadinessScore?: number;
927
+ /** Predicted monthly cost of technical waste */
928
+ estimatedMonthlyCost?: number;
929
+ /** Estimated developer hours lost per month */
930
+ estimatedDeveloperHours?: number;
931
+ /** Predicted rate of AI suggestion acceptance */
932
+ aiAcceptanceRate?: number;
933
+ /** Overall AI readiness score */
934
+ aiReadinessScore?: number;
774
935
  }
775
936
  /**
776
937
  * Canonical file content structure
777
938
  */
778
939
  interface FileContent {
779
- /** Absolute or relative file path */
780
- file: string;
781
- /** UTF-8 file content */
782
- content: string;
940
+ /** Absolute or relative file path */
941
+ file: string;
942
+ /** UTF-8 file content */
943
+ content: string;
783
944
  }
784
945
  /**
785
946
  * Constants for tests and configuration stability
@@ -796,28 +957,28 @@ type GraphIssueSeverity = Severity;
796
957
  * Graph metadata
797
958
  */
798
959
  interface GraphMetadata {
799
- /** Project name if available */
800
- projectName?: string;
801
- /** ISO timestamp of analysis */
802
- timestamp: string;
803
- /** Total number of files in the graph */
804
- totalFiles: number;
805
- /** Total dependency edges in the graph */
806
- totalDependencies: number;
807
- /** Types of analysis performed */
808
- analysisTypes: string[];
809
- /** Count of critical issues in graph nodes */
810
- criticalIssues: number;
811
- /** Count of major issues in graph nodes */
812
- majorIssues: number;
813
- /** Count of minor issues in graph nodes */
814
- minorIssues: number;
815
- /** Count of informational issues in graph nodes */
816
- infoIssues: number;
817
- /** AI token budget unit economics (v0.13+) */
818
- tokenBudget?: TokenBudget;
819
- /** Execution time in milliseconds */
820
- executionTime?: number;
960
+ /** Project name if available */
961
+ projectName?: string;
962
+ /** ISO timestamp of analysis */
963
+ timestamp: string;
964
+ /** Total number of files in the graph */
965
+ totalFiles: number;
966
+ /** Total dependency edges in the graph */
967
+ totalDependencies: number;
968
+ /** Types of analysis performed */
969
+ analysisTypes: string[];
970
+ /** Count of critical issues in graph nodes */
971
+ criticalIssues: number;
972
+ /** Count of major issues in graph nodes */
973
+ majorIssues: number;
974
+ /** Count of minor issues in graph nodes */
975
+ minorIssues: number;
976
+ /** Count of informational issues in graph nodes */
977
+ infoIssues: number;
978
+ /** AI token budget unit economics (v0.13+) */
979
+ tokenBudget?: TokenBudget;
980
+ /** Execution time in milliseconds */
981
+ executionTime?: number;
821
982
  }
822
983
 
823
984
  /**
@@ -831,13 +992,13 @@ interface GraphMetadata {
831
992
  * Supported programming languages
832
993
  */
833
994
  declare enum Language {
834
- TypeScript = "typescript",
835
- JavaScript = "javascript",
836
- Python = "python",
837
- Java = "java",
838
- Go = "go",
839
- Rust = "rust",
840
- CSharp = "csharp"
995
+ TypeScript = 'typescript',
996
+ JavaScript = 'javascript',
997
+ Python = 'python',
998
+ Java = 'java',
999
+ Go = 'go',
1000
+ Rust = 'rust',
1001
+ CSharp = 'csharp',
841
1002
  }
842
1003
  /**
843
1004
  * File extensions mapped to languages
@@ -847,156 +1008,168 @@ declare const LANGUAGE_EXTENSIONS: Record<string, Language>;
847
1008
  * Common AST node type (language-agnostic)
848
1009
  */
849
1010
  interface CommonASTNode {
850
- type: string;
851
- loc?: SourceRange;
852
- raw?: unknown;
1011
+ type: string;
1012
+ loc?: SourceRange;
1013
+ raw?: unknown;
853
1014
  }
854
1015
  /**
855
1016
  * Export information (function, class, variable, etc.)
856
1017
  */
857
1018
  interface ExportInfo {
858
- name: string;
859
- type: 'function' | 'class' | 'const' | 'type' | 'interface' | 'default' | 'variable' | 'all';
1019
+ name: string;
1020
+ type:
1021
+ | 'function'
1022
+ | 'class'
1023
+ | 'const'
1024
+ | 'type'
1025
+ | 'interface'
1026
+ | 'default'
1027
+ | 'variable'
1028
+ | 'all';
1029
+ loc?: SourceRange;
1030
+ /** Imports used within this export */
1031
+ imports?: string[];
1032
+ /** Dependencies on other exports in same file */
1033
+ dependencies?: string[];
1034
+ /** TypeScript types referenced */
1035
+ typeReferences?: string[];
1036
+ /** For methods: parent class name */
1037
+ parentClass?: string;
1038
+ /** For functions/methods: parameters */
1039
+ parameters?: string[];
1040
+ /** For classes/interfaces: number of methods and properties */
1041
+ methodCount?: number;
1042
+ propertyCount?: number;
1043
+ /** Visibility (public, private, protected) */
1044
+ visibility?: 'public' | 'private' | 'protected';
1045
+ /** Whether the value is a primitive (string, number, boolean) */
1046
+ isPrimitive?: boolean;
1047
+ /** Behavioral metadata for advanced metrics */
1048
+ isPure?: boolean;
1049
+ hasSideEffects?: boolean;
1050
+ /** Whether the export has explicit type annotations (TS only) */
1051
+ isTyped?: boolean;
1052
+ /** Source file for re-exports (e.g. export { foo } from './bar') */
1053
+ source?: string;
1054
+ /** Inferred domain/area this export belongs to (e.g., "auth", "database") */
1055
+ inferredDomain?: string;
1056
+ /** Associated documentation */
1057
+ documentation?: {
1058
+ content: string;
1059
+ type: 'jsdoc' | 'docstring' | 'comment' | 'xml-doc';
860
1060
  loc?: SourceRange;
861
- /** Imports used within this export */
862
- imports?: string[];
863
- /** Dependencies on other exports in same file */
864
- dependencies?: string[];
865
- /** TypeScript types referenced */
866
- typeReferences?: string[];
867
- /** For methods: parent class name */
868
- parentClass?: string;
869
- /** For functions/methods: parameters */
870
- parameters?: string[];
871
- /** For classes/interfaces: number of methods and properties */
872
- methodCount?: number;
873
- propertyCount?: number;
874
- /** Visibility (public, private, protected) */
875
- visibility?: 'public' | 'private' | 'protected';
876
- /** Whether the value is a primitive (string, number, boolean) */
877
- isPrimitive?: boolean;
878
- /** Behavioral metadata for advanced metrics */
879
- isPure?: boolean;
880
- hasSideEffects?: boolean;
881
- /** Whether the export has explicit type annotations (TS only) */
882
- isTyped?: boolean;
883
- /** Source file for re-exports (e.g. export { foo } from './bar') */
884
- source?: string;
885
- /** Inferred domain/area this export belongs to (e.g., "auth", "database") */
886
- inferredDomain?: string;
887
- /** Associated documentation */
888
- documentation?: {
889
- content: string;
890
- type: 'jsdoc' | 'docstring' | 'comment' | 'xml-doc';
891
- loc?: SourceRange;
892
- isStale?: boolean;
893
- };
1061
+ isStale?: boolean;
1062
+ };
894
1063
  }
895
1064
  /**
896
1065
  * Parse result containing exports and imports
897
1066
  */
898
1067
  interface ParseResult {
899
- exports: ExportInfo[];
900
- imports: FileImport[];
901
- /** Language of the parsed file */
902
- language: Language;
903
- /** Any parse warnings (non-fatal) */
904
- warnings?: string[];
1068
+ exports: ExportInfo[];
1069
+ imports: FileImport[];
1070
+ /** Language of the parsed file */
1071
+ language: Language;
1072
+ /** Any parse warnings (non-fatal) */
1073
+ warnings?: string[];
905
1074
  }
906
1075
  /**
907
1076
  * Naming convention rules per language
908
1077
  */
909
1078
  interface NamingConvention {
910
- /** Allowed variable naming patterns */
911
- variablePattern: RegExp;
912
- /** Allowed function naming patterns */
913
- functionPattern: RegExp;
914
- /** Allowed class naming patterns */
915
- classPattern: RegExp;
916
- /** Allowed constant naming patterns */
917
- constantPattern: RegExp;
918
- /** Allowed type naming patterns */
919
- typePattern?: RegExp;
920
- /** Allowed interface naming patterns */
921
- interfacePattern?: RegExp;
922
- /** Language-specific exceptions (e.g., __init__ in Python) */
923
- exceptions?: string[];
1079
+ /** Allowed variable naming patterns */
1080
+ variablePattern: RegExp;
1081
+ /** Allowed function naming patterns */
1082
+ functionPattern: RegExp;
1083
+ /** Allowed class naming patterns */
1084
+ classPattern: RegExp;
1085
+ /** Allowed constant naming patterns */
1086
+ constantPattern: RegExp;
1087
+ /** Allowed type naming patterns */
1088
+ typePattern?: RegExp;
1089
+ /** Allowed interface naming patterns */
1090
+ interfacePattern?: RegExp;
1091
+ /** Language-specific exceptions (e.g., __init__ in Python) */
1092
+ exceptions?: string[];
924
1093
  }
925
1094
  /**
926
1095
  * Language-specific configuration
927
1096
  */
928
1097
  interface LanguageConfig {
929
- language: Language;
930
- /** File extensions for this language */
931
- extensions: string[];
932
- /** Naming conventions */
933
- namingConventions: NamingConvention;
934
- /** Common abbreviations allowed */
935
- allowedAbbreviations?: string[];
936
- /** Language-specific keywords to ignore */
937
- keywords?: string[];
1098
+ language: Language;
1099
+ /** File extensions for this language */
1100
+ extensions: string[];
1101
+ /** Naming conventions */
1102
+ namingConventions: NamingConvention;
1103
+ /** Common abbreviations allowed */
1104
+ allowedAbbreviations?: string[];
1105
+ /** Language-specific keywords to ignore */
1106
+ keywords?: string[];
938
1107
  }
939
1108
  /**
940
1109
  * Abstract interface for language parsers
941
1110
  * Each language implementation should implement this interface
942
1111
  */
943
1112
  interface LanguageParser {
944
- /** Language this parser handles */
945
- readonly language: Language;
946
- /** File extensions this parser supports */
947
- readonly extensions: string[];
948
- /**
949
- * Parse source code and extract structure
950
- * @param code - Source code to parse
951
- * @param filePath - Path to the file (for context)
952
- * @returns Parse result with exports and imports
953
- * @throws ParseError if code has syntax errors
954
- */
955
- parse(code: string, filePath: string): ParseResult;
956
- /**
957
- * Get naming conventions for this language
958
- */
959
- getNamingConventions(): NamingConvention;
960
- /**
961
- * Initialize the parser (e.g. load WASM)
962
- */
963
- initialize(): Promise<void>;
964
- /**
965
- * Check if this parser can handle a file
966
- * @param filePath - File path to check
967
- */
968
- canHandle(filePath: string): boolean;
969
- /**
970
- * Parse the source code into a language-specific AST
971
- * @param code - Source code to parse
972
- * @param filePath - Path to the file
973
- */
974
- getAST(code: string, filePath: string): Promise<any>;
975
- /**
976
- * Analyze structural metadata for a node (e.g. purity)
977
- * @param node - The AST node to analyze (language specific)
978
- * @param code - The original source code
979
- */
980
- analyzeMetadata(node: any, code: string): Partial<ExportInfo>;
1113
+ /** Language this parser handles */
1114
+ readonly language: Language;
1115
+ /** File extensions this parser supports */
1116
+ readonly extensions: string[];
1117
+ /**
1118
+ * Parse source code and extract structure
1119
+ * @param code - Source code to parse
1120
+ * @param filePath - Path to the file (for context)
1121
+ * @returns Parse result with exports and imports
1122
+ * @throws ParseError if code has syntax errors
1123
+ */
1124
+ parse(code: string, filePath: string): ParseResult;
1125
+ /**
1126
+ * Get naming conventions for this language
1127
+ */
1128
+ getNamingConventions(): NamingConvention;
1129
+ /**
1130
+ * Initialize the parser (e.g. load WASM)
1131
+ */
1132
+ initialize(): Promise<void>;
1133
+ /**
1134
+ * Check if this parser can handle a file
1135
+ * @param filePath - File path to check
1136
+ */
1137
+ canHandle(filePath: string): boolean;
1138
+ /**
1139
+ * Parse the source code into a language-specific AST
1140
+ * @param code - Source code to parse
1141
+ * @param filePath - Path to the file
1142
+ */
1143
+ getAST(code: string, filePath: string): Promise<any>;
1144
+ /**
1145
+ * Analyze structural metadata for a node (e.g. purity)
1146
+ * @param node - The AST node to analyze (language specific)
1147
+ * @param code - The original source code
1148
+ */
1149
+ analyzeMetadata(node: any, code: string): Partial<ExportInfo>;
981
1150
  }
982
1151
  /**
983
1152
  * Parser error with location information
984
1153
  */
985
1154
  declare class ParseError extends Error {
986
- readonly filePath: string;
987
- readonly loc?: SourceLocation | undefined;
988
- constructor(message: string, filePath: string, loc?: SourceLocation | undefined);
1155
+ readonly filePath: string;
1156
+ readonly loc?: SourceLocation | undefined;
1157
+ constructor(
1158
+ message: string,
1159
+ filePath: string,
1160
+ loc?: SourceLocation | undefined
1161
+ );
989
1162
  }
990
1163
  /**
991
1164
  * Statistics about parsed code
992
1165
  */
993
1166
  interface ParseStatistics {
994
- language: Language;
995
- filesAnalyzed: number;
996
- totalExports: number;
997
- totalImports: number;
998
- parseErrors: number;
999
- warnings: number;
1167
+ language: Language;
1168
+ filesAnalyzed: number;
1169
+ totalExports: number;
1170
+ totalImports: number;
1171
+ parseErrors: number;
1172
+ warnings: number;
1000
1173
  }
1001
1174
 
1002
1175
  /**
@@ -1008,20 +1181,20 @@ interface ParseStatistics {
1008
1181
  * Provides a high-level qualitative assessment based on the numeric score.
1009
1182
  */
1010
1183
  declare enum ReadinessRating {
1011
- Excellent = "Excellent",
1012
- Good = "Good",
1013
- Fair = "Fair",
1014
- NeedsWork = "Needs Work",
1015
- Critical = "Critical"
1184
+ Excellent = 'Excellent',
1185
+ Good = 'Good',
1186
+ Fair = 'Fair',
1187
+ NeedsWork = 'Needs Work',
1188
+ Critical = 'Critical',
1016
1189
  }
1017
1190
  /**
1018
1191
  * Metadata for a given score range.
1019
1192
  */
1020
1193
  interface RatingMetadata {
1021
- label: string;
1022
- slug: string;
1023
- emoji: string;
1024
- rating: ReadinessRating;
1194
+ label: string;
1195
+ slug: string;
1196
+ emoji: string;
1197
+ rating: ReadinessRating;
1025
1198
  }
1026
1199
  /**
1027
1200
  * Get all metadata for a specific score.
@@ -1073,83 +1246,86 @@ declare function getRating(score: number): ReadinessRating;
1073
1246
  * Used to sort and display fixes for the user.
1074
1247
  */
1075
1248
  declare enum RecommendationPriority {
1076
- High = "high",
1077
- Medium = "medium",
1078
- Low = "low"
1249
+ High = 'high',
1250
+ Medium = 'medium',
1251
+ Low = 'low',
1079
1252
  }
1080
1253
  /**
1081
1254
  * Output structure for a single tool's scoring analysis.
1082
1255
  */
1083
1256
  interface ToolScoringOutput {
1084
- /** Unique tool identifier (e.g., "pattern-detect") */
1085
- toolName: string;
1086
- /** Normalized 0-100 score for this tool */
1087
- score: number;
1088
- /** AI token budget unit economics (v0.13+) */
1089
- tokenBudget?: any;
1090
- /** Raw metrics used to calculate the score */
1091
- rawMetrics: Record<string, any>;
1092
- /** Factors that influenced the score */
1093
- factors: Array<{
1094
- /** Human-readable name of the factor */
1095
- name: string;
1096
- /** Points contribution (positive or negative) */
1097
- impact: number;
1098
- /** Explanation of the factor's impact */
1099
- description: string;
1100
- }>;
1101
- /** Actionable recommendations with estimated impact */
1102
- recommendations: Array<{
1103
- /** The recommended action to take */
1104
- action: string;
1105
- /** Potential points increase if implemented */
1106
- estimatedImpact: number;
1107
- /** Implementation priority */
1108
- priority: RecommendationPriority | 'high' | 'medium' | 'low';
1109
- }>;
1257
+ /** Unique tool identifier (e.g., "pattern-detect") */
1258
+ toolName: string;
1259
+ /** Normalized 0-100 score for this tool */
1260
+ score: number;
1261
+ /** AI token budget unit economics (v0.13+) */
1262
+ tokenBudget?: any;
1263
+ /** Raw metrics used to calculate the score */
1264
+ rawMetrics: Record<string, any>;
1265
+ /** Factors that influenced the score */
1266
+ factors: Array<{
1267
+ /** Human-readable name of the factor */
1268
+ name: string;
1269
+ /** Points contribution (positive or negative) */
1270
+ impact: number;
1271
+ /** Explanation of the factor's impact */
1272
+ description: string;
1273
+ }>;
1274
+ /** Actionable recommendations with estimated impact */
1275
+ recommendations: Array<{
1276
+ /** The recommended action to take */
1277
+ action: string;
1278
+ /** Potential points increase if implemented */
1279
+ estimatedImpact: number;
1280
+ /** Implementation priority */
1281
+ priority: RecommendationPriority | 'high' | 'medium' | 'low';
1282
+ }>;
1110
1283
  }
1111
1284
  /**
1112
1285
  * Consolidated scoring result across all tools.
1113
1286
  */
1114
1287
  interface ScoringResult {
1115
- /** Overall AI Readiness Score (0-100) */
1116
- overall: number;
1117
- /** Rating category representing the overall readiness */
1118
- rating: string;
1119
- /** Timestamp of score calculation */
1120
- timestamp: string;
1121
- /** Tools that contributed to this score */
1122
- toolsUsed: string[];
1123
- /** Breakdown by individual tool */
1124
- breakdown: ToolScoringOutput[];
1125
- /** Internal calculation details for transparency */
1126
- calculation: {
1127
- /** Textual representation of the calculation formula */
1128
- formula: string;
1129
- /** Weights applied to each tool */
1130
- weights: Record<string, number>;
1131
- /** Simplified normalized formula output */
1132
- normalized: string;
1133
- };
1288
+ /** Overall AI Readiness Score (0-100) */
1289
+ overall: number;
1290
+ /** Rating category representing the overall readiness */
1291
+ rating: string;
1292
+ /** Timestamp of score calculation */
1293
+ timestamp: string;
1294
+ /** Tools that contributed to this score */
1295
+ toolsUsed: string[];
1296
+ /** Breakdown by individual tool */
1297
+ breakdown: ToolScoringOutput[];
1298
+ /** Internal calculation details for transparency */
1299
+ calculation: {
1300
+ /** Textual representation of the calculation formula */
1301
+ formula: string;
1302
+ /** Weights applied to each tool */
1303
+ weights: Record<string, number>;
1304
+ /** Simplified normalized formula output */
1305
+ normalized: string;
1306
+ };
1134
1307
  }
1135
1308
  /**
1136
1309
  * Configuration options for the scoring system.
1137
1310
  */
1138
1311
  interface ScoringConfig {
1139
- /** Minimum passing score (CLI will exit with non-zero if below) */
1140
- threshold?: number;
1141
- /** Whether to show the detailed tool-by-tool breakdown */
1142
- showBreakdown?: boolean;
1143
- /** Path to a baseline report JSON for trend comparison */
1144
- compareBaseline?: string;
1145
- /** Target file path to persist the calculated score */
1146
- saveTo?: string;
1147
- /** Scoring profile to use for weighting */
1148
- profile?: string;
1149
- /** Tool-specific configurations (e.g., weights) */
1150
- tools?: Record<string, {
1151
- scoreWeight?: number;
1152
- }>;
1312
+ /** Minimum passing score (CLI will exit with non-zero if below) */
1313
+ threshold?: number;
1314
+ /** Whether to show the detailed tool-by-tool breakdown */
1315
+ showBreakdown?: boolean;
1316
+ /** Path to a baseline report JSON for trend comparison */
1317
+ compareBaseline?: string;
1318
+ /** Target file path to persist the calculated score */
1319
+ saveTo?: string;
1320
+ /** Scoring profile to use for weighting */
1321
+ profile?: string;
1322
+ /** Tool-specific configurations (e.g., weights) */
1323
+ tools?: Record<
1324
+ string,
1325
+ {
1326
+ scoreWeight?: number;
1327
+ }
1328
+ >;
1153
1329
  }
1154
1330
 
1155
1331
  /**
@@ -1172,12 +1348,12 @@ type ModelContextTier = 'compact' | 'standard' | 'extended' | 'frontier';
1172
1348
  * on the project's primary focus.
1173
1349
  */
1174
1350
  declare enum ScoringProfile {
1175
- Default = "default",
1176
- Agentic = "agentic",// Focus on AI agent navigation and signal
1177
- Logic = "logic",// Focus on testability and complexity
1178
- UI = "ui",// Focus on consistency and context
1179
- Cost = "cost",// Focus on token waste reduction
1180
- Security = "security"
1351
+ Default = 'default',
1352
+ Agentic = 'agentic', // Focus on AI agent navigation and signal
1353
+ Logic = 'logic', // Focus on testability and complexity
1354
+ UI = 'ui', // Focus on consistency and context
1355
+ Cost = 'cost', // Focus on token waste reduction
1356
+ Security = 'security',
1181
1357
  }
1182
1358
  /**
1183
1359
  * Project-type-aware tool weight presets for different profiles.
@@ -1188,11 +1364,14 @@ declare const SCORING_PROFILES: Record<ScoringProfile, Record<string, number>>;
1188
1364
  *
1189
1365
  * "Ideal" represents target state. "Critical" represents failure state.
1190
1366
  */
1191
- declare const CONTEXT_TIER_THRESHOLDS: Record<ModelContextTier, {
1367
+ declare const CONTEXT_TIER_THRESHOLDS: Record<
1368
+ ModelContextTier,
1369
+ {
1192
1370
  idealTokens: number;
1193
1371
  criticalTokens: number;
1194
1372
  idealDepth: number;
1195
- }>;
1373
+ }
1374
+ >;
1196
1375
  /**
1197
1376
  * Project-size-adjusted minimum thresholds.
1198
1377
  *
@@ -1205,7 +1384,9 @@ declare const SIZE_ADJUSTED_THRESHOLDS: Record<string, number>;
1205
1384
  * @param fileCount Total number of files in the project
1206
1385
  * @returns A string identifier for the project size tier (xs, small, medium, large, enterprise)
1207
1386
  */
1208
- declare function getProjectSizeTier(fileCount: number): keyof typeof SIZE_ADJUSTED_THRESHOLDS;
1387
+ declare function getProjectSizeTier(
1388
+ fileCount: number
1389
+ ): keyof typeof SIZE_ADJUSTED_THRESHOLDS;
1209
1390
  /**
1210
1391
  * Calculate the recommended minimum AI readiness threshold for a project.
1211
1392
  *
@@ -1215,7 +1396,10 @@ declare function getProjectSizeTier(fileCount: number): keyof typeof SIZE_ADJUST
1215
1396
  * @param modelTier The model context tier targeted (compact, standard, extended, frontier)
1216
1397
  * @returns The recommended score threshold (0-100)
1217
1398
  */
1218
- declare function getRecommendedThreshold(fileCount: number, modelTier?: ModelContextTier): number;
1399
+ declare function getRecommendedThreshold(
1400
+ fileCount: number,
1401
+ modelTier?: ModelContextTier
1402
+ ): number;
1219
1403
  /**
1220
1404
  * Normalize a tool name from a shorthand or alias to its canonical ID.
1221
1405
  *
@@ -1232,9 +1416,14 @@ declare function normalizeToolName(shortName: string): string;
1232
1416
  * @param profile Optional scoring profile to use
1233
1417
  * @returns The weight to be used for this tool in overall scoring
1234
1418
  */
1235
- declare function getToolWeight(toolName: string, toolConfig?: {
1419
+ declare function getToolWeight(
1420
+ toolName: string,
1421
+ toolConfig?: {
1236
1422
  scoreWeight?: number;
1237
- }, cliOverride?: number, profile?: ScoringProfile): number;
1423
+ },
1424
+ cliOverride?: number,
1425
+ profile?: ScoringProfile
1426
+ ): number;
1238
1427
  /**
1239
1428
  * Parse a comma-separated weight string from the CLI.
1240
1429
  *
@@ -1254,7 +1443,11 @@ declare function parseWeightString(weightStr?: string): Map<string, number>;
1254
1443
  * @param cliWeights Optional weight overrides from the CLI
1255
1444
  * @returns Consolidate ScoringResult including overall score and rating
1256
1445
  */
1257
- declare function calculateOverallScore(toolOutputs: Map<string, ToolScoringOutput>, config?: ScoringConfig, cliWeights?: Map<string, number>): ScoringResult;
1446
+ declare function calculateOverallScore(
1447
+ toolOutputs: Map<string, ToolScoringOutput>,
1448
+ config?: ScoringConfig,
1449
+ cliWeights?: Map<string, number>
1450
+ ): ScoringResult;
1258
1451
  /**
1259
1452
  * Convert score to rating with project-size and model awareness.
1260
1453
  *
@@ -1265,7 +1458,11 @@ declare function calculateOverallScore(toolOutputs: Map<string, ToolScoringOutpu
1265
1458
  * @param modelTier The model context tier being targeted
1266
1459
  * @returns The size-aware ReadinessRating
1267
1460
  */
1268
- declare function getRatingWithContext(score: number, fileCount: number, modelTier?: ModelContextTier): ReadinessRating;
1461
+ declare function getRatingWithContext(
1462
+ score: number,
1463
+ fileCount: number,
1464
+ modelTier?: ModelContextTier
1465
+ ): ReadinessRating;
1269
1466
  /**
1270
1467
  * Get display properties (emoji and color) for a given rating.
1271
1468
  *
@@ -1273,8 +1470,8 @@ declare function getRatingWithContext(score: number, fileCount: number, modelTie
1273
1470
  * @returns Object containing display emoji and color string
1274
1471
  */
1275
1472
  declare function getRatingDisplay(rating: ReadinessRating | string): {
1276
- emoji: string;
1277
- color: string;
1473
+ emoji: string;
1474
+ color: string;
1278
1475
  };
1279
1476
  /**
1280
1477
  * Format overall score for compact console display.
@@ -1306,4 +1503,110 @@ declare function formatToolScore(output: ToolScoringOutput): string;
1306
1503
  */
1307
1504
  declare function generateHTML(graph: GraphData): string;
1308
1505
 
1309
- export { LeadSource as $, type AnalysisResult as A, type BusinessMetrics as B, type CostConfig as C, DEFAULT_TOOL_WEIGHTS as D, type ExportWithImports as E, type FileImport as F, GLOBAL_INFRA_OPTIONS as G, type GraphData as H, type Issue as I, type GraphEdge as J, type GraphIssueSeverity as K, Language as L, type Metrics as M, type NamingConvention as N, type GraphMetadata as O, type ProductivityImpact as P, type GraphNode as Q, type IssueOverlay as R, type ScanOptions as S, ToolName as T, IssueSchema as U, IssueType as V, IssueTypeSchema as W, LANGUAGE_EXTENSIONS as X, type LanguageConfig as Y, type Lead as Z, LeadSchema as _, type SpokeOutput as a, LeadSourceSchema as a0, type LeadSubmission as a1, LeadSubmissionSchema as a2, type Location as a3, LocationSchema as a4, type ManagedAccount as a5, ManagedAccountSchema as a6, MetricsSchema as a7, ModelTier as a8, ModelTierSchema as a9, getProjectSizeTier as aA, getRating as aB, getRatingDisplay as aC, getRatingEmoji as aD, getRatingLabel as aE, getRatingMetadata as aF, getRatingSlug as aG, getRatingWithContext as aH, getRecommendedThreshold as aI, getToolEmoji as aJ, getToolWeight as aK, normalizeToolName as aL, parseWeightString as aM, type BaseGraphLink as aN, type BaseGraphNode as aO, ParseError as aa, type ParseStatistics as ab, ReadinessRating as ac, RecommendationPriority as ad, SCORING_PROFILES as ae, SIZE_ADJUSTED_THRESHOLDS as af, type ScanResult as ag, type ScoringConfig as ah, ScoringProfile as ai, type ScoringResult as aj, SeveritySchema as ak, type SourceLocation as al, type SourceRange as am, SpokeOutputSchema as an, type SpokeSummary as ao, SpokeSummarySchema as ap, TOOL_NAME_MAP as aq, ToolNameSchema as ar, type ToolOutput as as, type UnifiedReport as at, UnifiedReportSchema as au, calculateOverallScore as av, formatScore as aw, formatToolScore as ax, generateHTML as ay, getPriorityIcon as az, type ToolScoringOutput as b, Severity as c, type ToolOptions as d, type AIReadyConfig as e, type TechnicalValueChain as f, type ModelContextTier as g, type TokenBudget as h, type AcceptancePrediction as i, type ComprehensionDifficulty as j, type TechnicalValueChainSummary as k, type LanguageParser as l, type ParseResult as m, type ExportInfo as n, AIReadyConfigSchema as o, type ASTNode as p, AnalysisResultSchema as q, AnalysisStatus as r, AnalysisStatusSchema as s, COMMON_FINE_TUNING_OPTIONS as t, CONTEXT_TIER_THRESHOLDS as u, type CommonASTNode as v, type Config as w, FRIENDLY_TOOL_NAMES as x, type FileContent as y, GLOBAL_SCAN_OPTIONS as z };
1506
+ export {
1507
+ LeadSource as $,
1508
+ type AnalysisResult as A,
1509
+ type BusinessMetrics as B,
1510
+ type CostConfig as C,
1511
+ DEFAULT_TOOL_WEIGHTS as D,
1512
+ type ExportWithImports as E,
1513
+ type FileImport as F,
1514
+ GLOBAL_INFRA_OPTIONS as G,
1515
+ type GraphData as H,
1516
+ type Issue as I,
1517
+ type GraphEdge as J,
1518
+ type GraphIssueSeverity as K,
1519
+ Language as L,
1520
+ type Metrics as M,
1521
+ type NamingConvention as N,
1522
+ type GraphMetadata as O,
1523
+ type ProductivityImpact as P,
1524
+ type GraphNode as Q,
1525
+ type IssueOverlay as R,
1526
+ type ScanOptions as S,
1527
+ ToolName as T,
1528
+ IssueSchema as U,
1529
+ IssueType as V,
1530
+ IssueTypeSchema as W,
1531
+ LANGUAGE_EXTENSIONS as X,
1532
+ type LanguageConfig as Y,
1533
+ type Lead as Z,
1534
+ LeadSchema as _,
1535
+ type SpokeOutput as a,
1536
+ LeadSourceSchema as a0,
1537
+ type LeadSubmission as a1,
1538
+ LeadSubmissionSchema as a2,
1539
+ type Location as a3,
1540
+ LocationSchema as a4,
1541
+ type ManagedAccount as a5,
1542
+ ManagedAccountSchema as a6,
1543
+ MetricsSchema as a7,
1544
+ ModelTier as a8,
1545
+ ModelTierSchema as a9,
1546
+ getProjectSizeTier as aA,
1547
+ getRating as aB,
1548
+ getRatingDisplay as aC,
1549
+ getRatingEmoji as aD,
1550
+ getRatingLabel as aE,
1551
+ getRatingMetadata as aF,
1552
+ getRatingSlug as aG,
1553
+ getRatingWithContext as aH,
1554
+ getRecommendedThreshold as aI,
1555
+ getToolEmoji as aJ,
1556
+ getToolWeight as aK,
1557
+ normalizeToolName as aL,
1558
+ parseWeightString as aM,
1559
+ type BaseGraphLink as aN,
1560
+ type BaseGraphNode as aO,
1561
+ ParseError as aa,
1562
+ type ParseStatistics as ab,
1563
+ ReadinessRating as ac,
1564
+ RecommendationPriority as ad,
1565
+ SCORING_PROFILES as ae,
1566
+ SIZE_ADJUSTED_THRESHOLDS as af,
1567
+ type ScanResult as ag,
1568
+ type ScoringConfig as ah,
1569
+ ScoringProfile as ai,
1570
+ type ScoringResult as aj,
1571
+ SeveritySchema as ak,
1572
+ type SourceLocation as al,
1573
+ type SourceRange as am,
1574
+ SpokeOutputSchema as an,
1575
+ type SpokeSummary as ao,
1576
+ SpokeSummarySchema as ap,
1577
+ TOOL_NAME_MAP as aq,
1578
+ ToolNameSchema as ar,
1579
+ type ToolOutput as as,
1580
+ type UnifiedReport as at,
1581
+ UnifiedReportSchema as au,
1582
+ calculateOverallScore as av,
1583
+ formatScore as aw,
1584
+ formatToolScore as ax,
1585
+ generateHTML as ay,
1586
+ getPriorityIcon as az,
1587
+ type ToolScoringOutput as b,
1588
+ Severity as c,
1589
+ type ToolOptions as d,
1590
+ type AIReadyConfig as e,
1591
+ type TechnicalValueChain as f,
1592
+ type ModelContextTier as g,
1593
+ type TokenBudget as h,
1594
+ type AcceptancePrediction as i,
1595
+ type ComprehensionDifficulty as j,
1596
+ type TechnicalValueChainSummary as k,
1597
+ type LanguageParser as l,
1598
+ type ParseResult as m,
1599
+ type ExportInfo as n,
1600
+ AIReadyConfigSchema as o,
1601
+ type ASTNode as p,
1602
+ AnalysisResultSchema as q,
1603
+ AnalysisStatus as r,
1604
+ AnalysisStatusSchema as s,
1605
+ COMMON_FINE_TUNING_OPTIONS as t,
1606
+ CONTEXT_TIER_THRESHOLDS as u,
1607
+ type CommonASTNode as v,
1608
+ type Config as w,
1609
+ FRIENDLY_TOOL_NAMES as x,
1610
+ type FileContent as y,
1611
+ GLOBAL_SCAN_OPTIONS as z,
1612
+ };