@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
@@ -0,0 +1,1612 @@
1
+ import { z } from 'zod';
2
+
3
+ /**
4
+ * Severity levels for all AIReady issues.
5
+ */
6
+ declare enum Severity {
7
+ Critical = 'critical',
8
+ Major = 'major',
9
+ Minor = 'minor',
10
+ Info = 'info',
11
+ }
12
+ /** Zod schema for Severity enum */
13
+ declare const SeveritySchema: z.ZodEnum<typeof Severity>;
14
+ /**
15
+ * Canonical Tool Names (IDs)
16
+ * Used everywhere as the single source of truth for tool identification.
17
+ */
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',
33
+ }
34
+ /** Zod schema for ToolName enum */
35
+ declare const ToolNameSchema: z.ZodEnum<typeof ToolName>;
36
+ /**
37
+ * Friendly labels for UI display
38
+ */
39
+ declare const FRIENDLY_TOOL_NAMES: Record<ToolName, string>;
40
+ /**
41
+ * Standardized issue types across all AIReady tools.
42
+ */
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',
63
+ }
64
+ /** Zod schema for IssueType enum */
65
+ declare const IssueTypeSchema: z.ZodEnum<typeof IssueType>;
66
+ /**
67
+ * Analysis processing status.
68
+ */
69
+ declare enum AnalysisStatus {
70
+ Processing = 'processing',
71
+ Completed = 'completed',
72
+ Failed = 'failed',
73
+ }
74
+ /** Zod schema for AnalysisStatus enum */
75
+ declare const AnalysisStatusSchema: z.ZodEnum<typeof AnalysisStatus>;
76
+ /**
77
+ * AI Model Context Tiers.
78
+ */
79
+ declare enum ModelTier {
80
+ Compact = 'compact',
81
+ Standard = 'standard',
82
+ Extended = 'extended',
83
+ Frontier = 'frontier',
84
+ }
85
+ /** Zod schema for ModelTier enum */
86
+ declare const ModelTierSchema: z.ZodEnum<typeof ModelTier>;
87
+
88
+ /**
89
+ * Common tool options
90
+ */
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;
102
+ }
103
+ /**
104
+ * Source code location schema.
105
+ */
106
+ /** Zod schema for Location object */
107
+ declare const LocationSchema: z.ZodObject<
108
+ {
109
+ file: z.ZodString;
110
+ line: z.ZodNumber;
111
+ column: z.ZodOptional<z.ZodNumber>;
112
+ endLine: z.ZodOptional<z.ZodNumber>;
113
+ endColumn: z.ZodOptional<z.ZodNumber>;
114
+ },
115
+ z.core.$strip
116
+ >;
117
+ type Location = z.infer<typeof LocationSchema>;
118
+ /**
119
+ * Scan options for tool providers
120
+ */
121
+ interface ScanOptions extends ToolOptions {
122
+ /** Target output format */
123
+ output?:
124
+ | string
125
+ | {
126
+ format: string;
127
+ file?: string;
128
+ };
129
+ /** Visual format (json/console/html) */
130
+ format?: 'json' | 'console' | 'html';
131
+ /** Whether to run in parallel */
132
+ parallel?: boolean;
133
+ }
134
+
135
+ /**
136
+ * Standard Issue schema used across all tools.
137
+ */
138
+ /** Zod schema for Issue object */
139
+ declare const IssueSchema: z.ZodObject<
140
+ {
141
+ type: z.ZodEnum<typeof IssueType>;
142
+ severity: z.ZodEnum<typeof Severity>;
143
+ message: z.ZodString;
144
+ location: z.ZodObject<
145
+ {
146
+ file: z.ZodString;
147
+ line: z.ZodNumber;
148
+ column: z.ZodOptional<z.ZodNumber>;
149
+ endLine: z.ZodOptional<z.ZodNumber>;
150
+ endColumn: z.ZodOptional<z.ZodNumber>;
151
+ },
152
+ z.core.$strip
153
+ >;
154
+ suggestion: z.ZodOptional<z.ZodString>;
155
+ },
156
+ z.core.$strip
157
+ >;
158
+ type Issue = z.infer<typeof IssueSchema>;
159
+ /**
160
+ * Issue overlay on the graph
161
+ */
162
+ interface IssueOverlay {
163
+ id: string;
164
+ type: string;
165
+ severity: string;
166
+ nodeIds: string[];
167
+ edgeIds?: string[];
168
+ message: string;
169
+ details?: string;
170
+ }
171
+
172
+ /**
173
+ * Standard Metrics schema.
174
+ */
175
+ /** Zod schema for Metrics object */
176
+ declare const MetricsSchema: z.ZodObject<
177
+ {
178
+ tokenCost: z.ZodOptional<z.ZodNumber>;
179
+ complexityScore: z.ZodOptional<z.ZodNumber>;
180
+ consistencyScore: z.ZodOptional<z.ZodNumber>;
181
+ docFreshnessScore: z.ZodOptional<z.ZodNumber>;
182
+ aiSignalClarityScore: z.ZodOptional<z.ZodNumber>;
183
+ agentGroundingScore: z.ZodOptional<z.ZodNumber>;
184
+ testabilityScore: z.ZodOptional<z.ZodNumber>;
185
+ docDriftScore: z.ZodOptional<z.ZodNumber>;
186
+ dependencyHealthScore: z.ZodOptional<z.ZodNumber>;
187
+ modelContextTier: z.ZodOptional<z.ZodEnum<typeof ModelTier>>;
188
+ estimatedMonthlyCost: z.ZodOptional<z.ZodNumber>;
189
+ estimatedDeveloperHours: z.ZodOptional<z.ZodNumber>;
190
+ comprehensionDifficultyIndex: z.ZodOptional<z.ZodNumber>;
191
+ totalSymbols: z.ZodOptional<z.ZodNumber>;
192
+ totalExports: z.ZodOptional<z.ZodNumber>;
193
+ },
194
+ z.core.$strip
195
+ >;
196
+ type Metrics = z.infer<typeof MetricsSchema>;
197
+
198
+ /**
199
+ * Individual file/module analysis result.
200
+ */
201
+ declare const AnalysisResultSchema: z.ZodObject<
202
+ {
203
+ fileName: z.ZodString;
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
+ {
227
+ tokenCost: z.ZodOptional<z.ZodNumber>;
228
+ complexityScore: z.ZodOptional<z.ZodNumber>;
229
+ consistencyScore: z.ZodOptional<z.ZodNumber>;
230
+ docFreshnessScore: z.ZodOptional<z.ZodNumber>;
231
+ aiSignalClarityScore: z.ZodOptional<z.ZodNumber>;
232
+ agentGroundingScore: z.ZodOptional<z.ZodNumber>;
233
+ testabilityScore: z.ZodOptional<z.ZodNumber>;
234
+ docDriftScore: z.ZodOptional<z.ZodNumber>;
235
+ dependencyHealthScore: z.ZodOptional<z.ZodNumber>;
236
+ modelContextTier: z.ZodOptional<z.ZodEnum<typeof ModelTier>>;
237
+ estimatedMonthlyCost: z.ZodOptional<z.ZodNumber>;
238
+ estimatedDeveloperHours: z.ZodOptional<z.ZodNumber>;
239
+ comprehensionDifficultyIndex: z.ZodOptional<z.ZodNumber>;
240
+ totalSymbols: z.ZodOptional<z.ZodNumber>;
241
+ totalExports: z.ZodOptional<z.ZodNumber>;
242
+ },
243
+ z.core.$strip
244
+ >;
245
+ },
246
+ z.core.$strip
247
+ >;
248
+ type AnalysisResult = z.infer<typeof AnalysisResultSchema>;
249
+ /**
250
+ * Standard spoke tool summary schema.
251
+ */
252
+ declare const SpokeSummarySchema: z.ZodObject<
253
+ {
254
+ totalFiles: z.ZodOptional<z.ZodNumber>;
255
+ totalIssues: z.ZodOptional<z.ZodNumber>;
256
+ criticalIssues: z.ZodOptional<z.ZodNumber>;
257
+ majorIssues: z.ZodOptional<z.ZodNumber>;
258
+ score: z.ZodOptional<z.ZodNumber>;
259
+ },
260
+ z.core.$catchall<z.ZodAny>
261
+ >;
262
+ type SpokeSummary = z.infer<typeof SpokeSummarySchema>;
263
+ /**
264
+ * Standard spoke tool output contract.
265
+ */
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
+ {
319
+ totalFiles: z.ZodOptional<z.ZodNumber>;
320
+ totalIssues: z.ZodOptional<z.ZodNumber>;
321
+ criticalIssues: z.ZodOptional<z.ZodNumber>;
322
+ majorIssues: z.ZodOptional<z.ZodNumber>;
323
+ score: z.ZodOptional<z.ZodNumber>;
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
+ >;
341
+ type SpokeOutput = z.infer<typeof SpokeOutputSchema>;
342
+ /**
343
+ * Master Unified Report contract (CLI -> Platform).
344
+ */
345
+ declare const UnifiedReportSchema: z.ZodObject<
346
+ {
347
+ summary: z.ZodObject<
348
+ {
349
+ totalFiles: z.ZodNumber;
350
+ totalIssues: z.ZodNumber;
351
+ criticalIssues: z.ZodNumber;
352
+ majorIssues: z.ZodNumber;
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
+ >;
439
+ type UnifiedReport = z.infer<typeof UnifiedReportSchema>;
440
+
441
+ /**
442
+ * Global AIReady Configuration Schema.
443
+ * Strict definition for aiready.json and related config files.
444
+ */
445
+ declare const AIReadyConfigSchema: z.ZodObject<
446
+ {
447
+ exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
448
+ threshold: z.ZodOptional<z.ZodNumber>;
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
+ >;
487
+ tools: z.ZodOptional<z.ZodRecord<z.ZodString, 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
+ >;
517
+
518
+ /**
519
+ * Shared types for graph-based visualizations
520
+ */
521
+
522
+ /**
523
+ * Base graph node compatible with d3-force simulation
524
+ */
525
+ interface BaseGraphNode {
526
+ id: string;
527
+ x?: number;
528
+ y?: number;
529
+ vx?: number;
530
+ vy?: number;
531
+ fx?: number | null;
532
+ fy?: number | null;
533
+ }
534
+ /**
535
+ * Base graph link compatible with d3-force simulation
536
+ */
537
+ interface BaseGraphLink {
538
+ source: string | BaseGraphNode;
539
+ target: string | BaseGraphNode;
540
+ index?: number;
541
+ }
542
+ /**
543
+ * Full graph node with all metadata
544
+ */
545
+ interface GraphNode extends BaseGraphNode {
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;
556
+ }
557
+ interface GraphEdge {
558
+ source: string;
559
+ target: string;
560
+ type?: string;
561
+ weight?: number;
562
+ }
563
+ interface GraphData {
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
+ };
582
+ }
583
+ /**
584
+ * Metadata about the graph
585
+ */
586
+ interface GraphMetadata$1 {
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;
605
+ }
606
+
607
+ /**
608
+ * Lead Source identifiers.
609
+ */
610
+ declare enum LeadSource {
611
+ ClawMoreHero = 'clawmore-hero',
612
+ ClawMoreWaitlist = 'clawmore-waitlist',
613
+ ClawMoreBeta = 'clawmore-beta',
614
+ AiReadyPlatform = 'aiready-platform',
615
+ }
616
+ /** Zod schema for LeadSource enum */
617
+ declare const LeadSourceSchema: z.ZodEnum<typeof LeadSource>;
618
+ /**
619
+ * Business Lead schema for waitlists and beta signups.
620
+ */
621
+ declare const LeadSchema: z.ZodObject<
622
+ {
623
+ id: z.ZodString;
624
+ email: z.ZodString;
625
+ name: z.ZodString;
626
+ interest: z.ZodDefault<z.ZodString>;
627
+ notes: z.ZodOptional<z.ZodString>;
628
+ timestamp: z.ZodString;
629
+ source: z.ZodEnum<typeof LeadSource>;
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
+ >;
642
+ type Lead = z.infer<typeof LeadSchema>;
643
+ /**
644
+ * Lead Submission (input from form)
645
+ */
646
+ declare const LeadSubmissionSchema: z.ZodObject<
647
+ {
648
+ source: z.ZodEnum<typeof LeadSource>;
649
+ email: z.ZodString;
650
+ name: z.ZodString;
651
+ interest: z.ZodDefault<z.ZodString>;
652
+ notes: z.ZodOptional<z.ZodString>;
653
+ },
654
+ z.core.$strip
655
+ >;
656
+ type LeadSubmission = z.infer<typeof LeadSubmissionSchema>;
657
+ /**
658
+ * Managed AWS Account metadata for the Account Vending Machine.
659
+ */
660
+ declare const ManagedAccountSchema: z.ZodObject<
661
+ {
662
+ id: z.ZodString;
663
+ accountId: z.ZodString;
664
+ userId: z.ZodString;
665
+ stripeSubscriptionId: z.ZodString;
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
+ >;
682
+ baseFeeCents: z.ZodDefault<z.ZodNumber>;
683
+ includedComputeCents: z.ZodDefault<z.ZodNumber>;
684
+ includedTokenCents: z.ZodDefault<z.ZodNumber>;
685
+ prepaidTokenBalanceCents: z.ZodDefault<z.ZodNumber>;
686
+ currentMonthlyTokenSpendCents: z.ZodDefault<z.ZodNumber>;
687
+ status: z.ZodDefault<
688
+ z.ZodEnum<{
689
+ warning: 'warning';
690
+ provisioning: 'provisioning';
691
+ active: 'active';
692
+ quarantined: 'quarantined';
693
+ suspended: 'suspended';
694
+ }>
695
+ >;
696
+ lastCostSyncAt: z.ZodOptional<z.ZodString>;
697
+ region: z.ZodDefault<z.ZodString>;
698
+ alertThresholds: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
699
+ },
700
+ z.core.$strip
701
+ >;
702
+ type ManagedAccount = z.infer<typeof ManagedAccountSchema>;
703
+
704
+ /**
705
+ * Location information in source code
706
+ */
707
+ interface SourceLocation {
708
+ line: number;
709
+ column: number;
710
+ }
711
+ /**
712
+ * Range information in source code
713
+ */
714
+ interface SourceRange {
715
+ start: SourceLocation;
716
+ end: SourceLocation;
717
+ }
718
+ type ExportType =
719
+ | 'function'
720
+ | 'class'
721
+ | 'interface'
722
+ | 'type'
723
+ | 'const'
724
+ | 'var'
725
+ | 'enum'
726
+ | 'module'
727
+ | 'unknown';
728
+ interface ExportWithImports {
729
+ name: string;
730
+ type: ExportType;
731
+ source?: string;
732
+ imports: string[];
733
+ dependencies: string[];
734
+ typeReferences: string[];
735
+ loc?: SourceRange;
736
+ }
737
+ /**
738
+ * Information about a single import declaration
739
+ */
740
+ interface FileImport {
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;
749
+ }
750
+ interface ASTNode {
751
+ type: string;
752
+ loc?: SourceRange;
753
+ }
754
+ /**
755
+ * AI token budget unit economics (v0.13+)
756
+ */
757
+ interface TokenBudget {
758
+ totalContextTokens: number;
759
+ estimatedResponseTokens?: number;
760
+ wastedTokens: {
761
+ total: number;
762
+ bySource: {
763
+ duplication: number;
764
+ fragmentation: number;
765
+ chattiness: number;
766
+ };
767
+ };
768
+ efficiencyRatio: number;
769
+ potentialRetrievableTokens: number;
770
+ }
771
+
772
+ /**
773
+ * AI readiness configuration
774
+ */
775
+ type AIReadyConfig = z.infer<typeof AIReadyConfigSchema>;
776
+ /**
777
+ * Legacy alias for Config
778
+ */
779
+ type Config = AIReadyConfig;
780
+ /**
781
+ * Result of a single tool execution
782
+ */
783
+ interface ToolOutput {
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;
794
+ }
795
+ /**
796
+ * Overall scan result
797
+ */
798
+ interface ScanResult {
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[];
815
+ }
816
+ /**
817
+ * Cost configuration for business impact analysis
818
+ */
819
+ interface CostConfig {
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;
828
+ }
829
+ /**
830
+ * Productivity impact metrics
831
+ */
832
+ interface ProductivityImpact {
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
+ >;
849
+ }
850
+ /**
851
+ * AI suggestion acceptance prediction
852
+ */
853
+ interface AcceptancePrediction {
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
+ }>;
865
+ }
866
+ /**
867
+ * Technical Value Chain summary
868
+ */
869
+ interface TechnicalValueChain {
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
+ };
900
+ }
901
+ /**
902
+ * Compatibility alias
903
+ */
904
+ type TechnicalValueChainSummary = TechnicalValueChain;
905
+ /**
906
+ * Code comprehension difficulty metrics
907
+ */
908
+ interface ComprehensionDifficulty {
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
+ };
922
+ }
923
+ /**
924
+ * Business impact metrics (v0.10+)
925
+ */
926
+ interface BusinessMetrics {
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;
935
+ }
936
+ /**
937
+ * Canonical file content structure
938
+ */
939
+ interface FileContent {
940
+ /** Absolute or relative file path */
941
+ file: string;
942
+ /** UTF-8 file content */
943
+ content: string;
944
+ }
945
+ /**
946
+ * Constants for tests and configuration stability
947
+ */
948
+ declare const GLOBAL_INFRA_OPTIONS: string[];
949
+ declare const GLOBAL_SCAN_OPTIONS: string[];
950
+ declare const COMMON_FINE_TUNING_OPTIONS: string[];
951
+
952
+ /**
953
+ * Analysis issue mapping to graph
954
+ */
955
+ type GraphIssueSeverity = Severity;
956
+ /**
957
+ * Graph metadata
958
+ */
959
+ interface GraphMetadata {
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;
982
+ }
983
+
984
+ /**
985
+ * Language-agnostic AST and parser interfaces for multi-language support
986
+ *
987
+ * This module provides abstractions for parsing different programming languages
988
+ * while maintaining a consistent interface for analysis tools.
989
+ */
990
+
991
+ /**
992
+ * Supported programming languages
993
+ */
994
+ declare enum Language {
995
+ TypeScript = 'typescript',
996
+ JavaScript = 'javascript',
997
+ Python = 'python',
998
+ Java = 'java',
999
+ Go = 'go',
1000
+ Rust = 'rust',
1001
+ CSharp = 'csharp',
1002
+ }
1003
+ /**
1004
+ * File extensions mapped to languages
1005
+ */
1006
+ declare const LANGUAGE_EXTENSIONS: Record<string, Language>;
1007
+ /**
1008
+ * Common AST node type (language-agnostic)
1009
+ */
1010
+ interface CommonASTNode {
1011
+ type: string;
1012
+ loc?: SourceRange;
1013
+ raw?: unknown;
1014
+ }
1015
+ /**
1016
+ * Export information (function, class, variable, etc.)
1017
+ */
1018
+ interface ExportInfo {
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';
1060
+ loc?: SourceRange;
1061
+ isStale?: boolean;
1062
+ };
1063
+ }
1064
+ /**
1065
+ * Parse result containing exports and imports
1066
+ */
1067
+ interface ParseResult {
1068
+ exports: ExportInfo[];
1069
+ imports: FileImport[];
1070
+ /** Language of the parsed file */
1071
+ language: Language;
1072
+ /** Any parse warnings (non-fatal) */
1073
+ warnings?: string[];
1074
+ }
1075
+ /**
1076
+ * Naming convention rules per language
1077
+ */
1078
+ interface NamingConvention {
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[];
1093
+ }
1094
+ /**
1095
+ * Language-specific configuration
1096
+ */
1097
+ interface LanguageConfig {
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[];
1107
+ }
1108
+ /**
1109
+ * Abstract interface for language parsers
1110
+ * Each language implementation should implement this interface
1111
+ */
1112
+ interface LanguageParser {
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>;
1150
+ }
1151
+ /**
1152
+ * Parser error with location information
1153
+ */
1154
+ declare class ParseError extends Error {
1155
+ readonly filePath: string;
1156
+ readonly loc?: SourceLocation | undefined;
1157
+ constructor(
1158
+ message: string,
1159
+ filePath: string,
1160
+ loc?: SourceLocation | undefined
1161
+ );
1162
+ }
1163
+ /**
1164
+ * Statistics about parsed code
1165
+ */
1166
+ interface ParseStatistics {
1167
+ language: Language;
1168
+ filesAnalyzed: number;
1169
+ totalExports: number;
1170
+ totalImports: number;
1171
+ parseErrors: number;
1172
+ warnings: number;
1173
+ }
1174
+
1175
+ /**
1176
+ * Shared rating helper functions for scoring and display.
1177
+ * Extracted to eliminate duplication between scoring.ts and CLI output modules.
1178
+ */
1179
+ /**
1180
+ * AI Readiness Rating categories.
1181
+ * Provides a high-level qualitative assessment based on the numeric score.
1182
+ */
1183
+ declare enum ReadinessRating {
1184
+ Excellent = 'Excellent',
1185
+ Good = 'Good',
1186
+ Fair = 'Fair',
1187
+ NeedsWork = 'Needs Work',
1188
+ Critical = 'Critical',
1189
+ }
1190
+ /**
1191
+ * Metadata for a given score range.
1192
+ */
1193
+ interface RatingMetadata {
1194
+ label: string;
1195
+ slug: string;
1196
+ emoji: string;
1197
+ rating: ReadinessRating;
1198
+ }
1199
+ /**
1200
+ * Get all metadata for a specific score.
1201
+ * Unified to remove structural duplication.
1202
+ *
1203
+ * @param score The numerical AI readiness score (0-100)
1204
+ * @returns Metadata object including label, slug, emoji, and rating category
1205
+ */
1206
+ declare function getRatingMetadata(score: number): RatingMetadata;
1207
+ /**
1208
+ * Get rating label from score
1209
+ * @param score The numerical AI readiness score (0-100)
1210
+ * @returns Human-readable rating label
1211
+ */
1212
+ declare function getRatingLabel(score: number): string;
1213
+ /**
1214
+ * Get rating slug from score (URL-friendly)
1215
+ * @param score The numerical score
1216
+ * @returns A kebab-case string (e.g., 'excellent', 'needs-work')
1217
+ */
1218
+ declare function getRatingSlug(score: number): string;
1219
+ /**
1220
+ * Get rating emoji from score
1221
+ * @param score The numerical score
1222
+ * @returns Emoji string for display
1223
+ */
1224
+ declare function getRatingEmoji(score: number): string;
1225
+ /**
1226
+ * Get tool emoji from score (alias for getRatingEmoji)
1227
+ * @param score The numerical score
1228
+ * @returns Emoji string for display
1229
+ */
1230
+ declare function getToolEmoji(score: number): string;
1231
+ /**
1232
+ * Get priority icon from priority level
1233
+ * @param priority Priority level string
1234
+ * @returns Emoji string for display
1235
+ */
1236
+ declare function getPriorityIcon(priority: string): string;
1237
+ /**
1238
+ * Convert numeric score to ReadinessRating enum
1239
+ * @param score The numerical AI readiness score (0-100)
1240
+ * @returns The corresponding ReadinessRating category
1241
+ */
1242
+ declare function getRating(score: number): ReadinessRating;
1243
+
1244
+ /**
1245
+ * Priority levels for actionable recommendations.
1246
+ * Used to sort and display fixes for the user.
1247
+ */
1248
+ declare enum RecommendationPriority {
1249
+ High = 'high',
1250
+ Medium = 'medium',
1251
+ Low = 'low',
1252
+ }
1253
+ /**
1254
+ * Output structure for a single tool's scoring analysis.
1255
+ */
1256
+ interface ToolScoringOutput {
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
+ }>;
1283
+ }
1284
+ /**
1285
+ * Consolidated scoring result across all tools.
1286
+ */
1287
+ interface ScoringResult {
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
+ };
1307
+ }
1308
+ /**
1309
+ * Configuration options for the scoring system.
1310
+ */
1311
+ interface ScoringConfig {
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
+ >;
1329
+ }
1330
+
1331
+ /**
1332
+ * Default weights for known tools.
1333
+ */
1334
+ declare const DEFAULT_TOOL_WEIGHTS: Record<string, number>;
1335
+ /**
1336
+ * Tool name normalization map.
1337
+ * Maps common shorthands and aliases to canonical tool IDs.
1338
+ */
1339
+ declare const TOOL_NAME_MAP: Record<string, string>;
1340
+ /**
1341
+ * Model context tiers for context-aware threshold calibration.
1342
+ */
1343
+ type ModelContextTier = 'compact' | 'standard' | 'extended' | 'frontier';
1344
+ /**
1345
+ * Scoring profiles for project-aware weighting adjustments.
1346
+ *
1347
+ * Different profiles prioritize different aspects of AI readiness based
1348
+ * on the project's primary focus.
1349
+ */
1350
+ declare enum ScoringProfile {
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',
1357
+ }
1358
+ /**
1359
+ * Project-type-aware tool weight presets for different profiles.
1360
+ */
1361
+ declare const SCORING_PROFILES: Record<ScoringProfile, Record<string, number>>;
1362
+ /**
1363
+ * Context budget thresholds per tier.
1364
+ *
1365
+ * "Ideal" represents target state. "Critical" represents failure state.
1366
+ */
1367
+ declare const CONTEXT_TIER_THRESHOLDS: Record<
1368
+ ModelContextTier,
1369
+ {
1370
+ idealTokens: number;
1371
+ criticalTokens: number;
1372
+ idealDepth: number;
1373
+ }
1374
+ >;
1375
+ /**
1376
+ * Project-size-adjusted minimum thresholds.
1377
+ *
1378
+ * Larger projects have slightly lower thresholds due to inherent complexity.
1379
+ */
1380
+ declare const SIZE_ADJUSTED_THRESHOLDS: Record<string, number>;
1381
+ /**
1382
+ * Determine project size tier based on the total number of files.
1383
+ *
1384
+ * @param fileCount Total number of files in the project
1385
+ * @returns A string identifier for the project size tier (xs, small, medium, large, enterprise)
1386
+ */
1387
+ declare function getProjectSizeTier(
1388
+ fileCount: number
1389
+ ): keyof typeof SIZE_ADJUSTED_THRESHOLDS;
1390
+ /**
1391
+ * Calculate the recommended minimum AI readiness threshold for a project.
1392
+ *
1393
+ * Threshold is adjusted based on project size and the model context tier targeted.
1394
+ *
1395
+ * @param fileCount Total number of files in the project
1396
+ * @param modelTier The model context tier targeted (compact, standard, extended, frontier)
1397
+ * @returns The recommended score threshold (0-100)
1398
+ */
1399
+ declare function getRecommendedThreshold(
1400
+ fileCount: number,
1401
+ modelTier?: ModelContextTier
1402
+ ): number;
1403
+ /**
1404
+ * Normalize a tool name from a shorthand or alias to its canonical ID.
1405
+ *
1406
+ * @param shortName The tool shorthand or alias name
1407
+ * @returns The canonical tool ID
1408
+ */
1409
+ declare function normalizeToolName(shortName: string): string;
1410
+ /**
1411
+ * Retrieve the weight for a specific tool, considering overrides and profiles.
1412
+ *
1413
+ * @param toolName The canonical tool ID
1414
+ * @param toolConfig Optional configuration for the tool containing a weight
1415
+ * @param cliOverride Optional weight override from the CLI
1416
+ * @param profile Optional scoring profile to use
1417
+ * @returns The weight to be used for this tool in overall scoring
1418
+ */
1419
+ declare function getToolWeight(
1420
+ toolName: string,
1421
+ toolConfig?: {
1422
+ scoreWeight?: number;
1423
+ },
1424
+ cliOverride?: number,
1425
+ profile?: ScoringProfile
1426
+ ): number;
1427
+ /**
1428
+ * Parse a comma-separated weight string from the CLI.
1429
+ *
1430
+ * Format: "tool1:weight1,tool2:weight2"
1431
+ *
1432
+ * @param weightStr The raw weight string from the CLI or config
1433
+ * @returns A Map of tool IDs to their parsed weights
1434
+ */
1435
+ declare function parseWeightString(weightStr?: string): Map<string, number>;
1436
+ /**
1437
+ * Calculate the overall consolidated AI Readiness Score.
1438
+ *
1439
+ * Orchestrates the weighted aggregation of all tool individual scores.
1440
+ *
1441
+ * @param toolOutputs Map of tool IDs to their individual scoring outputs
1442
+ * @param config Optional global configuration
1443
+ * @param cliWeights Optional weight overrides from the CLI
1444
+ * @returns Consolidate ScoringResult including overall score and rating
1445
+ */
1446
+ declare function calculateOverallScore(
1447
+ toolOutputs: Map<string, ToolScoringOutput>,
1448
+ config?: ScoringConfig,
1449
+ cliWeights?: Map<string, number>
1450
+ ): ScoringResult;
1451
+ /**
1452
+ * Convert score to rating with project-size and model awareness.
1453
+ *
1454
+ * Provides a more accurate rating by considering the target model's limits.
1455
+ *
1456
+ * @param score The numerical AI readiness score
1457
+ * @param fileCount Total number of files in the project
1458
+ * @param modelTier The model context tier being targeted
1459
+ * @returns The size-aware ReadinessRating
1460
+ */
1461
+ declare function getRatingWithContext(
1462
+ score: number,
1463
+ fileCount: number,
1464
+ modelTier?: ModelContextTier
1465
+ ): ReadinessRating;
1466
+ /**
1467
+ * Get display properties (emoji and color) for a given rating.
1468
+ *
1469
+ * @param rating The readiness rating category
1470
+ * @returns Object containing display emoji and color string
1471
+ */
1472
+ declare function getRatingDisplay(rating: ReadinessRating | string): {
1473
+ emoji: string;
1474
+ color: string;
1475
+ };
1476
+ /**
1477
+ * Format overall score for compact console display.
1478
+ *
1479
+ * @param result The consolidated scoring result
1480
+ * @returns Formatted string (e.g., "85/100 (Good) 👍")
1481
+ */
1482
+ declare function formatScore(result: ScoringResult): string;
1483
+ /**
1484
+ * Format detailed tool score for expanded console display.
1485
+ *
1486
+ * Includes breakdown of influencing factors and actionable recommendations.
1487
+ *
1488
+ * @param output The scoring output for a single tool
1489
+ * @returns Multi-line formatted string for console output
1490
+ */
1491
+ declare function formatToolScore(output: ToolScoringOutput): string;
1492
+
1493
+ /**
1494
+ * Visualization utilities for generating HTML from graph data
1495
+ */
1496
+
1497
+ /**
1498
+ * Generate HTML visualization from graph data
1499
+ * Creates an interactive HTML page with a canvas-based graph visualization
1500
+ *
1501
+ * @param graph - The graph data to visualize
1502
+ * @returns HTML string representing the interactive visualization
1503
+ */
1504
+ declare function generateHTML(graph: GraphData): string;
1505
+
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
+ };