@aiready/core 0.24.18 → 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 (40) hide show
  1. package/dist/chunk-3NEZ5M7Y.mjs +937 -0
  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 +362 -0
  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.js +5 -1
  15. package/dist/client/index.mjs +2 -2
  16. package/dist/csharp-parser-JE5MWHQS.mjs +9 -0
  17. package/dist/csharp-parser-XW7WHE77.mjs +5 -9
  18. package/dist/go-parser-KTG4CGF5.mjs +5 -9
  19. package/dist/go-parser-T7PR6WJI.mjs +9 -0
  20. package/dist/index-CcP12wb-.d.mts +996 -693
  21. package/dist/index-CcP12wb-.d.ts +996 -693
  22. package/dist/index-DGbarGnr.d.mts +996 -693
  23. package/dist/index-DGbarGnr.d.ts +996 -693
  24. package/dist/index-slasaNzr.d.mts +1612 -0
  25. package/dist/index-slasaNzr.d.ts +1612 -0
  26. package/dist/index.d.mts +32 -1
  27. package/dist/index.d.ts +32 -1
  28. package/dist/index.js +61 -7
  29. package/dist/index.mjs +58 -12
  30. package/dist/java-parser-EOKMGQ6B.mjs +5 -9
  31. package/dist/java-parser-WGOXKULP.mjs +9 -0
  32. package/dist/python-parser-7NCR7VCQ.mjs +8 -0
  33. package/dist/python-parser-BCI7JVLF.mjs +4 -8
  34. package/dist/typescript-parser-3KYGSSY5.mjs +3 -0
  35. package/dist/typescript-parser-4BA4VYAF.mjs +3 -7
  36. package/dist/typescript-parser-FOUPHVFI.mjs +3 -0
  37. package/dist/typescript-parser-G3TSNR7O.mjs +7 -0
  38. package/dist/typescript-parser-RMNCTHRD.mjs +3 -7
  39. package/dist/typescript-parser-WALISXF4.mjs +7 -0
  40. package/package.json +14 -11
@@ -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
- critical: "critical";
353
- major: "major";
354
- any: "any";
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
- html: "html";
368
- console: "console";
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
+ critical: 'critical';
452
+ major: 'major';
453
+ any: 'any';
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
+ html: 'html';
476
+ console: 'console';
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,154 +1008,166 @@ 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
+ /** Inferred domain/area this export belongs to (e.g., "auth", "database") */
1053
+ inferredDomain?: string;
1054
+ /** Associated documentation */
1055
+ documentation?: {
1056
+ content: string;
1057
+ type: 'jsdoc' | 'docstring' | 'comment' | 'xml-doc';
860
1058
  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
- /** Inferred domain/area this export belongs to (e.g., "auth", "database") */
884
- inferredDomain?: string;
885
- /** Associated documentation */
886
- documentation?: {
887
- content: string;
888
- type: 'jsdoc' | 'docstring' | 'comment' | 'xml-doc';
889
- loc?: SourceRange;
890
- isStale?: boolean;
891
- };
1059
+ isStale?: boolean;
1060
+ };
892
1061
  }
893
1062
  /**
894
1063
  * Parse result containing exports and imports
895
1064
  */
896
1065
  interface ParseResult {
897
- exports: ExportInfo[];
898
- imports: FileImport[];
899
- /** Language of the parsed file */
900
- language: Language;
901
- /** Any parse warnings (non-fatal) */
902
- warnings?: string[];
1066
+ exports: ExportInfo[];
1067
+ imports: FileImport[];
1068
+ /** Language of the parsed file */
1069
+ language: Language;
1070
+ /** Any parse warnings (non-fatal) */
1071
+ warnings?: string[];
903
1072
  }
904
1073
  /**
905
1074
  * Naming convention rules per language
906
1075
  */
907
1076
  interface NamingConvention {
908
- /** Allowed variable naming patterns */
909
- variablePattern: RegExp;
910
- /** Allowed function naming patterns */
911
- functionPattern: RegExp;
912
- /** Allowed class naming patterns */
913
- classPattern: RegExp;
914
- /** Allowed constant naming patterns */
915
- constantPattern: RegExp;
916
- /** Allowed type naming patterns */
917
- typePattern?: RegExp;
918
- /** Allowed interface naming patterns */
919
- interfacePattern?: RegExp;
920
- /** Language-specific exceptions (e.g., __init__ in Python) */
921
- exceptions?: string[];
1077
+ /** Allowed variable naming patterns */
1078
+ variablePattern: RegExp;
1079
+ /** Allowed function naming patterns */
1080
+ functionPattern: RegExp;
1081
+ /** Allowed class naming patterns */
1082
+ classPattern: RegExp;
1083
+ /** Allowed constant naming patterns */
1084
+ constantPattern: RegExp;
1085
+ /** Allowed type naming patterns */
1086
+ typePattern?: RegExp;
1087
+ /** Allowed interface naming patterns */
1088
+ interfacePattern?: RegExp;
1089
+ /** Language-specific exceptions (e.g., __init__ in Python) */
1090
+ exceptions?: string[];
922
1091
  }
923
1092
  /**
924
1093
  * Language-specific configuration
925
1094
  */
926
1095
  interface LanguageConfig {
927
- language: Language;
928
- /** File extensions for this language */
929
- extensions: string[];
930
- /** Naming conventions */
931
- namingConventions: NamingConvention;
932
- /** Common abbreviations allowed */
933
- allowedAbbreviations?: string[];
934
- /** Language-specific keywords to ignore */
935
- keywords?: string[];
1096
+ language: Language;
1097
+ /** File extensions for this language */
1098
+ extensions: string[];
1099
+ /** Naming conventions */
1100
+ namingConventions: NamingConvention;
1101
+ /** Common abbreviations allowed */
1102
+ allowedAbbreviations?: string[];
1103
+ /** Language-specific keywords to ignore */
1104
+ keywords?: string[];
936
1105
  }
937
1106
  /**
938
1107
  * Abstract interface for language parsers
939
1108
  * Each language implementation should implement this interface
940
1109
  */
941
1110
  interface LanguageParser {
942
- /** Language this parser handles */
943
- readonly language: Language;
944
- /** File extensions this parser supports */
945
- readonly extensions: string[];
946
- /**
947
- * Parse source code and extract structure
948
- * @param code - Source code to parse
949
- * @param filePath - Path to the file (for context)
950
- * @returns Parse result with exports and imports
951
- * @throws ParseError if code has syntax errors
952
- */
953
- parse(code: string, filePath: string): ParseResult;
954
- /**
955
- * Get naming conventions for this language
956
- */
957
- getNamingConventions(): NamingConvention;
958
- /**
959
- * Initialize the parser (e.g. load WASM)
960
- */
961
- initialize(): Promise<void>;
962
- /**
963
- * Check if this parser can handle a file
964
- * @param filePath - File path to check
965
- */
966
- canHandle(filePath: string): boolean;
967
- /**
968
- * Parse the source code into a language-specific AST
969
- * @param code - Source code to parse
970
- * @param filePath - Path to the file
971
- */
972
- getAST(code: string, filePath: string): Promise<any>;
973
- /**
974
- * Analyze structural metadata for a node (e.g. purity)
975
- * @param node - The AST node to analyze (language specific)
976
- * @param code - The original source code
977
- */
978
- analyzeMetadata(node: any, code: string): Partial<ExportInfo>;
1111
+ /** Language this parser handles */
1112
+ readonly language: Language;
1113
+ /** File extensions this parser supports */
1114
+ readonly extensions: string[];
1115
+ /**
1116
+ * Parse source code and extract structure
1117
+ * @param code - Source code to parse
1118
+ * @param filePath - Path to the file (for context)
1119
+ * @returns Parse result with exports and imports
1120
+ * @throws ParseError if code has syntax errors
1121
+ */
1122
+ parse(code: string, filePath: string): ParseResult;
1123
+ /**
1124
+ * Get naming conventions for this language
1125
+ */
1126
+ getNamingConventions(): NamingConvention;
1127
+ /**
1128
+ * Initialize the parser (e.g. load WASM)
1129
+ */
1130
+ initialize(): Promise<void>;
1131
+ /**
1132
+ * Check if this parser can handle a file
1133
+ * @param filePath - File path to check
1134
+ */
1135
+ canHandle(filePath: string): boolean;
1136
+ /**
1137
+ * Parse the source code into a language-specific AST
1138
+ * @param code - Source code to parse
1139
+ * @param filePath - Path to the file
1140
+ */
1141
+ getAST(code: string, filePath: string): Promise<any>;
1142
+ /**
1143
+ * Analyze structural metadata for a node (e.g. purity)
1144
+ * @param node - The AST node to analyze (language specific)
1145
+ * @param code - The original source code
1146
+ */
1147
+ analyzeMetadata(node: any, code: string): Partial<ExportInfo>;
979
1148
  }
980
1149
  /**
981
1150
  * Parser error with location information
982
1151
  */
983
1152
  declare class ParseError extends Error {
984
- readonly filePath: string;
985
- readonly loc?: SourceLocation | undefined;
986
- constructor(message: string, filePath: string, loc?: SourceLocation | undefined);
1153
+ readonly filePath: string;
1154
+ readonly loc?: SourceLocation | undefined;
1155
+ constructor(
1156
+ message: string,
1157
+ filePath: string,
1158
+ loc?: SourceLocation | undefined
1159
+ );
987
1160
  }
988
1161
  /**
989
1162
  * Statistics about parsed code
990
1163
  */
991
1164
  interface ParseStatistics {
992
- language: Language;
993
- filesAnalyzed: number;
994
- totalExports: number;
995
- totalImports: number;
996
- parseErrors: number;
997
- warnings: number;
1165
+ language: Language;
1166
+ filesAnalyzed: number;
1167
+ totalExports: number;
1168
+ totalImports: number;
1169
+ parseErrors: number;
1170
+ warnings: number;
998
1171
  }
999
1172
 
1000
1173
  /**
@@ -1006,20 +1179,20 @@ interface ParseStatistics {
1006
1179
  * Provides a high-level qualitative assessment based on the numeric score.
1007
1180
  */
1008
1181
  declare enum ReadinessRating {
1009
- Excellent = "Excellent",
1010
- Good = "Good",
1011
- Fair = "Fair",
1012
- NeedsWork = "Needs Work",
1013
- Critical = "Critical"
1182
+ Excellent = 'Excellent',
1183
+ Good = 'Good',
1184
+ Fair = 'Fair',
1185
+ NeedsWork = 'Needs Work',
1186
+ Critical = 'Critical',
1014
1187
  }
1015
1188
  /**
1016
1189
  * Metadata for a given score range.
1017
1190
  */
1018
1191
  interface RatingMetadata {
1019
- label: string;
1020
- slug: string;
1021
- emoji: string;
1022
- rating: ReadinessRating;
1192
+ label: string;
1193
+ slug: string;
1194
+ emoji: string;
1195
+ rating: ReadinessRating;
1023
1196
  }
1024
1197
  /**
1025
1198
  * Get all metadata for a specific score.
@@ -1071,83 +1244,86 @@ declare function getRating(score: number): ReadinessRating;
1071
1244
  * Used to sort and display fixes for the user.
1072
1245
  */
1073
1246
  declare enum RecommendationPriority {
1074
- High = "high",
1075
- Medium = "medium",
1076
- Low = "low"
1247
+ High = 'high',
1248
+ Medium = 'medium',
1249
+ Low = 'low',
1077
1250
  }
1078
1251
  /**
1079
1252
  * Output structure for a single tool's scoring analysis.
1080
1253
  */
1081
1254
  interface ToolScoringOutput {
1082
- /** Unique tool identifier (e.g., "pattern-detect") */
1083
- toolName: string;
1084
- /** Normalized 0-100 score for this tool */
1085
- score: number;
1086
- /** AI token budget unit economics (v0.13+) */
1087
- tokenBudget?: any;
1088
- /** Raw metrics used to calculate the score */
1089
- rawMetrics: Record<string, any>;
1090
- /** Factors that influenced the score */
1091
- factors: Array<{
1092
- /** Human-readable name of the factor */
1093
- name: string;
1094
- /** Points contribution (positive or negative) */
1095
- impact: number;
1096
- /** Explanation of the factor's impact */
1097
- description: string;
1098
- }>;
1099
- /** Actionable recommendations with estimated impact */
1100
- recommendations: Array<{
1101
- /** The recommended action to take */
1102
- action: string;
1103
- /** Potential points increase if implemented */
1104
- estimatedImpact: number;
1105
- /** Implementation priority */
1106
- priority: RecommendationPriority | 'high' | 'medium' | 'low';
1107
- }>;
1255
+ /** Unique tool identifier (e.g., "pattern-detect") */
1256
+ toolName: string;
1257
+ /** Normalized 0-100 score for this tool */
1258
+ score: number;
1259
+ /** AI token budget unit economics (v0.13+) */
1260
+ tokenBudget?: any;
1261
+ /** Raw metrics used to calculate the score */
1262
+ rawMetrics: Record<string, any>;
1263
+ /** Factors that influenced the score */
1264
+ factors: Array<{
1265
+ /** Human-readable name of the factor */
1266
+ name: string;
1267
+ /** Points contribution (positive or negative) */
1268
+ impact: number;
1269
+ /** Explanation of the factor's impact */
1270
+ description: string;
1271
+ }>;
1272
+ /** Actionable recommendations with estimated impact */
1273
+ recommendations: Array<{
1274
+ /** The recommended action to take */
1275
+ action: string;
1276
+ /** Potential points increase if implemented */
1277
+ estimatedImpact: number;
1278
+ /** Implementation priority */
1279
+ priority: RecommendationPriority | 'high' | 'medium' | 'low';
1280
+ }>;
1108
1281
  }
1109
1282
  /**
1110
1283
  * Consolidated scoring result across all tools.
1111
1284
  */
1112
1285
  interface ScoringResult {
1113
- /** Overall AI Readiness Score (0-100) */
1114
- overall: number;
1115
- /** Rating category representing the overall readiness */
1116
- rating: string;
1117
- /** Timestamp of score calculation */
1118
- timestamp: string;
1119
- /** Tools that contributed to this score */
1120
- toolsUsed: string[];
1121
- /** Breakdown by individual tool */
1122
- breakdown: ToolScoringOutput[];
1123
- /** Internal calculation details for transparency */
1124
- calculation: {
1125
- /** Textual representation of the calculation formula */
1126
- formula: string;
1127
- /** Weights applied to each tool */
1128
- weights: Record<string, number>;
1129
- /** Simplified normalized formula output */
1130
- normalized: string;
1131
- };
1286
+ /** Overall AI Readiness Score (0-100) */
1287
+ overall: number;
1288
+ /** Rating category representing the overall readiness */
1289
+ rating: string;
1290
+ /** Timestamp of score calculation */
1291
+ timestamp: string;
1292
+ /** Tools that contributed to this score */
1293
+ toolsUsed: string[];
1294
+ /** Breakdown by individual tool */
1295
+ breakdown: ToolScoringOutput[];
1296
+ /** Internal calculation details for transparency */
1297
+ calculation: {
1298
+ /** Textual representation of the calculation formula */
1299
+ formula: string;
1300
+ /** Weights applied to each tool */
1301
+ weights: Record<string, number>;
1302
+ /** Simplified normalized formula output */
1303
+ normalized: string;
1304
+ };
1132
1305
  }
1133
1306
  /**
1134
1307
  * Configuration options for the scoring system.
1135
1308
  */
1136
1309
  interface ScoringConfig {
1137
- /** Minimum passing score (CLI will exit with non-zero if below) */
1138
- threshold?: number;
1139
- /** Whether to show the detailed tool-by-tool breakdown */
1140
- showBreakdown?: boolean;
1141
- /** Path to a baseline report JSON for trend comparison */
1142
- compareBaseline?: string;
1143
- /** Target file path to persist the calculated score */
1144
- saveTo?: string;
1145
- /** Scoring profile to use for weighting */
1146
- profile?: string;
1147
- /** Tool-specific configurations (e.g., weights) */
1148
- tools?: Record<string, {
1149
- scoreWeight?: number;
1150
- }>;
1310
+ /** Minimum passing score (CLI will exit with non-zero if below) */
1311
+ threshold?: number;
1312
+ /** Whether to show the detailed tool-by-tool breakdown */
1313
+ showBreakdown?: boolean;
1314
+ /** Path to a baseline report JSON for trend comparison */
1315
+ compareBaseline?: string;
1316
+ /** Target file path to persist the calculated score */
1317
+ saveTo?: string;
1318
+ /** Scoring profile to use for weighting */
1319
+ profile?: string;
1320
+ /** Tool-specific configurations (e.g., weights) */
1321
+ tools?: Record<
1322
+ string,
1323
+ {
1324
+ scoreWeight?: number;
1325
+ }
1326
+ >;
1151
1327
  }
1152
1328
 
1153
1329
  /**
@@ -1170,12 +1346,12 @@ type ModelContextTier = 'compact' | 'standard' | 'extended' | 'frontier';
1170
1346
  * on the project's primary focus.
1171
1347
  */
1172
1348
  declare enum ScoringProfile {
1173
- Default = "default",
1174
- Agentic = "agentic",// Focus on AI agent navigation and signal
1175
- Logic = "logic",// Focus on testability and complexity
1176
- UI = "ui",// Focus on consistency and context
1177
- Cost = "cost",// Focus on token waste reduction
1178
- Security = "security"
1349
+ Default = 'default',
1350
+ Agentic = 'agentic', // Focus on AI agent navigation and signal
1351
+ Logic = 'logic', // Focus on testability and complexity
1352
+ UI = 'ui', // Focus on consistency and context
1353
+ Cost = 'cost', // Focus on token waste reduction
1354
+ Security = 'security',
1179
1355
  }
1180
1356
  /**
1181
1357
  * Project-type-aware tool weight presets for different profiles.
@@ -1186,11 +1362,14 @@ declare const SCORING_PROFILES: Record<ScoringProfile, Record<string, number>>;
1186
1362
  *
1187
1363
  * "Ideal" represents target state. "Critical" represents failure state.
1188
1364
  */
1189
- declare const CONTEXT_TIER_THRESHOLDS: Record<ModelContextTier, {
1365
+ declare const CONTEXT_TIER_THRESHOLDS: Record<
1366
+ ModelContextTier,
1367
+ {
1190
1368
  idealTokens: number;
1191
1369
  criticalTokens: number;
1192
1370
  idealDepth: number;
1193
- }>;
1371
+ }
1372
+ >;
1194
1373
  /**
1195
1374
  * Project-size-adjusted minimum thresholds.
1196
1375
  *
@@ -1203,7 +1382,9 @@ declare const SIZE_ADJUSTED_THRESHOLDS: Record<string, number>;
1203
1382
  * @param fileCount Total number of files in the project
1204
1383
  * @returns A string identifier for the project size tier (xs, small, medium, large, enterprise)
1205
1384
  */
1206
- declare function getProjectSizeTier(fileCount: number): keyof typeof SIZE_ADJUSTED_THRESHOLDS;
1385
+ declare function getProjectSizeTier(
1386
+ fileCount: number
1387
+ ): keyof typeof SIZE_ADJUSTED_THRESHOLDS;
1207
1388
  /**
1208
1389
  * Calculate the recommended minimum AI readiness threshold for a project.
1209
1390
  *
@@ -1213,7 +1394,10 @@ declare function getProjectSizeTier(fileCount: number): keyof typeof SIZE_ADJUST
1213
1394
  * @param modelTier The model context tier targeted (compact, standard, extended, frontier)
1214
1395
  * @returns The recommended score threshold (0-100)
1215
1396
  */
1216
- declare function getRecommendedThreshold(fileCount: number, modelTier?: ModelContextTier): number;
1397
+ declare function getRecommendedThreshold(
1398
+ fileCount: number,
1399
+ modelTier?: ModelContextTier
1400
+ ): number;
1217
1401
  /**
1218
1402
  * Normalize a tool name from a shorthand or alias to its canonical ID.
1219
1403
  *
@@ -1230,9 +1414,14 @@ declare function normalizeToolName(shortName: string): string;
1230
1414
  * @param profile Optional scoring profile to use
1231
1415
  * @returns The weight to be used for this tool in overall scoring
1232
1416
  */
1233
- declare function getToolWeight(toolName: string, toolConfig?: {
1417
+ declare function getToolWeight(
1418
+ toolName: string,
1419
+ toolConfig?: {
1234
1420
  scoreWeight?: number;
1235
- }, cliOverride?: number, profile?: ScoringProfile): number;
1421
+ },
1422
+ cliOverride?: number,
1423
+ profile?: ScoringProfile
1424
+ ): number;
1236
1425
  /**
1237
1426
  * Parse a comma-separated weight string from the CLI.
1238
1427
  *
@@ -1252,7 +1441,11 @@ declare function parseWeightString(weightStr?: string): Map<string, number>;
1252
1441
  * @param cliWeights Optional weight overrides from the CLI
1253
1442
  * @returns Consolidate ScoringResult including overall score and rating
1254
1443
  */
1255
- declare function calculateOverallScore(toolOutputs: Map<string, ToolScoringOutput>, config?: ScoringConfig, cliWeights?: Map<string, number>): ScoringResult;
1444
+ declare function calculateOverallScore(
1445
+ toolOutputs: Map<string, ToolScoringOutput>,
1446
+ config?: ScoringConfig,
1447
+ cliWeights?: Map<string, number>
1448
+ ): ScoringResult;
1256
1449
  /**
1257
1450
  * Convert score to rating with project-size and model awareness.
1258
1451
  *
@@ -1263,7 +1456,11 @@ declare function calculateOverallScore(toolOutputs: Map<string, ToolScoringOutpu
1263
1456
  * @param modelTier The model context tier being targeted
1264
1457
  * @returns The size-aware ReadinessRating
1265
1458
  */
1266
- declare function getRatingWithContext(score: number, fileCount: number, modelTier?: ModelContextTier): ReadinessRating;
1459
+ declare function getRatingWithContext(
1460
+ score: number,
1461
+ fileCount: number,
1462
+ modelTier?: ModelContextTier
1463
+ ): ReadinessRating;
1267
1464
  /**
1268
1465
  * Get display properties (emoji and color) for a given rating.
1269
1466
  *
@@ -1271,8 +1468,8 @@ declare function getRatingWithContext(score: number, fileCount: number, modelTie
1271
1468
  * @returns Object containing display emoji and color string
1272
1469
  */
1273
1470
  declare function getRatingDisplay(rating: ReadinessRating | string): {
1274
- emoji: string;
1275
- color: string;
1471
+ emoji: string;
1472
+ color: string;
1276
1473
  };
1277
1474
  /**
1278
1475
  * Format overall score for compact console display.
@@ -1304,4 +1501,110 @@ declare function formatToolScore(output: ToolScoringOutput): string;
1304
1501
  */
1305
1502
  declare function generateHTML(graph: GraphData): string;
1306
1503
 
1307
- 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 };
1504
+ export {
1505
+ LeadSource as $,
1506
+ type AnalysisResult as A,
1507
+ type BusinessMetrics as B,
1508
+ type CostConfig as C,
1509
+ DEFAULT_TOOL_WEIGHTS as D,
1510
+ type ExportWithImports as E,
1511
+ type FileImport as F,
1512
+ GLOBAL_INFRA_OPTIONS as G,
1513
+ type GraphData as H,
1514
+ type Issue as I,
1515
+ type GraphEdge as J,
1516
+ type GraphIssueSeverity as K,
1517
+ Language as L,
1518
+ type Metrics as M,
1519
+ type NamingConvention as N,
1520
+ type GraphMetadata as O,
1521
+ type ProductivityImpact as P,
1522
+ type GraphNode as Q,
1523
+ type IssueOverlay as R,
1524
+ type ScanOptions as S,
1525
+ ToolName as T,
1526
+ IssueSchema as U,
1527
+ IssueType as V,
1528
+ IssueTypeSchema as W,
1529
+ LANGUAGE_EXTENSIONS as X,
1530
+ type LanguageConfig as Y,
1531
+ type Lead as Z,
1532
+ LeadSchema as _,
1533
+ type SpokeOutput as a,
1534
+ LeadSourceSchema as a0,
1535
+ type LeadSubmission as a1,
1536
+ LeadSubmissionSchema as a2,
1537
+ type Location as a3,
1538
+ LocationSchema as a4,
1539
+ type ManagedAccount as a5,
1540
+ ManagedAccountSchema as a6,
1541
+ MetricsSchema as a7,
1542
+ ModelTier as a8,
1543
+ ModelTierSchema as a9,
1544
+ getProjectSizeTier as aA,
1545
+ getRating as aB,
1546
+ getRatingDisplay as aC,
1547
+ getRatingEmoji as aD,
1548
+ getRatingLabel as aE,
1549
+ getRatingMetadata as aF,
1550
+ getRatingSlug as aG,
1551
+ getRatingWithContext as aH,
1552
+ getRecommendedThreshold as aI,
1553
+ getToolEmoji as aJ,
1554
+ getToolWeight as aK,
1555
+ normalizeToolName as aL,
1556
+ parseWeightString as aM,
1557
+ type BaseGraphLink as aN,
1558
+ type BaseGraphNode as aO,
1559
+ ParseError as aa,
1560
+ type ParseStatistics as ab,
1561
+ ReadinessRating as ac,
1562
+ RecommendationPriority as ad,
1563
+ SCORING_PROFILES as ae,
1564
+ SIZE_ADJUSTED_THRESHOLDS as af,
1565
+ type ScanResult as ag,
1566
+ type ScoringConfig as ah,
1567
+ ScoringProfile as ai,
1568
+ type ScoringResult as aj,
1569
+ SeveritySchema as ak,
1570
+ type SourceLocation as al,
1571
+ type SourceRange as am,
1572
+ SpokeOutputSchema as an,
1573
+ type SpokeSummary as ao,
1574
+ SpokeSummarySchema as ap,
1575
+ TOOL_NAME_MAP as aq,
1576
+ ToolNameSchema as ar,
1577
+ type ToolOutput as as,
1578
+ type UnifiedReport as at,
1579
+ UnifiedReportSchema as au,
1580
+ calculateOverallScore as av,
1581
+ formatScore as aw,
1582
+ formatToolScore as ax,
1583
+ generateHTML as ay,
1584
+ getPriorityIcon as az,
1585
+ type ToolScoringOutput as b,
1586
+ Severity as c,
1587
+ type ToolOptions as d,
1588
+ type AIReadyConfig as e,
1589
+ type TechnicalValueChain as f,
1590
+ type ModelContextTier as g,
1591
+ type TokenBudget as h,
1592
+ type AcceptancePrediction as i,
1593
+ type ComprehensionDifficulty as j,
1594
+ type TechnicalValueChainSummary as k,
1595
+ type LanguageParser as l,
1596
+ type ParseResult as m,
1597
+ type ExportInfo as n,
1598
+ AIReadyConfigSchema as o,
1599
+ type ASTNode as p,
1600
+ AnalysisResultSchema as q,
1601
+ AnalysisStatus as r,
1602
+ AnalysisStatusSchema as s,
1603
+ COMMON_FINE_TUNING_OPTIONS as t,
1604
+ CONTEXT_TIER_THRESHOLDS as u,
1605
+ type CommonASTNode as v,
1606
+ type Config as w,
1607
+ FRIENDLY_TOOL_NAMES as x,
1608
+ type FileContent as y,
1609
+ GLOBAL_SCAN_OPTIONS as z,
1610
+ };