@titan-design/style-profile 0.0.0

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.
@@ -0,0 +1,617 @@
1
+ import * as zod from 'zod';
2
+ import { z } from 'zod';
3
+
4
+ declare const ExampleSchema: z.ZodObject<{
5
+ good: z.ZodOptional<z.ZodString>;
6
+ bad: z.ZodOptional<z.ZodString>;
7
+ source: z.ZodOptional<z.ZodString>;
8
+ }, z.core.$strip>;
9
+ declare const StabilitySchema: z.ZodEnum<{
10
+ high: "high";
11
+ medium: "medium";
12
+ low: "low";
13
+ }>;
14
+ declare const FixabilitySchema: z.ZodEnum<{
15
+ safe: "safe";
16
+ "maybe-incorrect": "maybe-incorrect";
17
+ "requires-input": "requires-input";
18
+ "not-fixable": "not-fixable";
19
+ }>;
20
+ declare const StyleRuleSchema: z.ZodObject<{
21
+ convention: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString>]>;
22
+ confidence: z.ZodNumber;
23
+ stability: z.ZodOptional<z.ZodEnum<{
24
+ high: "high";
25
+ medium: "medium";
26
+ low: "low";
27
+ }>>;
28
+ fixability: z.ZodOptional<z.ZodEnum<{
29
+ safe: "safe";
30
+ "maybe-incorrect": "maybe-incorrect";
31
+ "requires-input": "requires-input";
32
+ "not-fixable": "not-fixable";
33
+ }>>;
34
+ description: z.ZodOptional<z.ZodString>;
35
+ examples: z.ZodOptional<z.ZodArray<z.ZodObject<{
36
+ good: z.ZodOptional<z.ZodString>;
37
+ bad: z.ZodOptional<z.ZodString>;
38
+ source: z.ZodOptional<z.ZodString>;
39
+ }, z.core.$strip>>>;
40
+ extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
41
+ }, z.core.$strip>;
42
+ type StyleRule = z.infer<typeof StyleRuleSchema>;
43
+ type Stability = z.infer<typeof StabilitySchema>;
44
+ type Fixability = z.infer<typeof FixabilitySchema>;
45
+
46
+ declare const SCHEMA_VERSION = "1.0.0";
47
+ declare const SeverityThresholdsSchema: z.ZodObject<{
48
+ error: z.ZodNumber;
49
+ warn: z.ZodNumber;
50
+ info: z.ZodNumber;
51
+ }, z.core.$strip>;
52
+ declare const DEFAULT_SEVERITY_THRESHOLDS: {
53
+ readonly error: 0.85;
54
+ readonly warn: 0.6;
55
+ readonly info: 0.4;
56
+ };
57
+ declare const ProfileSchema: z.ZodObject<{
58
+ $schema: z.ZodOptional<z.ZodString>;
59
+ schemaVersion: z.ZodString;
60
+ author: z.ZodString;
61
+ generated: z.ZodString;
62
+ sources: z.ZodArray<z.ZodString>;
63
+ naming: z.ZodRecord<z.ZodString, z.ZodObject<{
64
+ convention: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString>]>;
65
+ confidence: z.ZodNumber;
66
+ stability: z.ZodOptional<z.ZodEnum<{
67
+ high: "high";
68
+ medium: "medium";
69
+ low: "low";
70
+ }>>;
71
+ fixability: z.ZodOptional<z.ZodEnum<{
72
+ safe: "safe";
73
+ "maybe-incorrect": "maybe-incorrect";
74
+ "requires-input": "requires-input";
75
+ "not-fixable": "not-fixable";
76
+ }>>;
77
+ description: z.ZodOptional<z.ZodString>;
78
+ examples: z.ZodOptional<z.ZodArray<z.ZodObject<{
79
+ good: z.ZodOptional<z.ZodString>;
80
+ bad: z.ZodOptional<z.ZodString>;
81
+ source: z.ZodOptional<z.ZodString>;
82
+ }, z.core.$strip>>>;
83
+ extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
84
+ }, z.core.$strip>>;
85
+ structure: z.ZodRecord<z.ZodString, z.ZodObject<{
86
+ convention: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString>]>;
87
+ confidence: z.ZodNumber;
88
+ stability: z.ZodOptional<z.ZodEnum<{
89
+ high: "high";
90
+ medium: "medium";
91
+ low: "low";
92
+ }>>;
93
+ fixability: z.ZodOptional<z.ZodEnum<{
94
+ safe: "safe";
95
+ "maybe-incorrect": "maybe-incorrect";
96
+ "requires-input": "requires-input";
97
+ "not-fixable": "not-fixable";
98
+ }>>;
99
+ description: z.ZodOptional<z.ZodString>;
100
+ examples: z.ZodOptional<z.ZodArray<z.ZodObject<{
101
+ good: z.ZodOptional<z.ZodString>;
102
+ bad: z.ZodOptional<z.ZodString>;
103
+ source: z.ZodOptional<z.ZodString>;
104
+ }, z.core.$strip>>>;
105
+ extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
106
+ }, z.core.$strip>>;
107
+ documentation: z.ZodRecord<z.ZodString, z.ZodObject<{
108
+ convention: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString>]>;
109
+ confidence: z.ZodNumber;
110
+ stability: z.ZodOptional<z.ZodEnum<{
111
+ high: "high";
112
+ medium: "medium";
113
+ low: "low";
114
+ }>>;
115
+ fixability: z.ZodOptional<z.ZodEnum<{
116
+ safe: "safe";
117
+ "maybe-incorrect": "maybe-incorrect";
118
+ "requires-input": "requires-input";
119
+ "not-fixable": "not-fixable";
120
+ }>>;
121
+ description: z.ZodOptional<z.ZodString>;
122
+ examples: z.ZodOptional<z.ZodArray<z.ZodObject<{
123
+ good: z.ZodOptional<z.ZodString>;
124
+ bad: z.ZodOptional<z.ZodString>;
125
+ source: z.ZodOptional<z.ZodString>;
126
+ }, z.core.$strip>>>;
127
+ extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
128
+ }, z.core.$strip>>;
129
+ errorHandling: z.ZodRecord<z.ZodString, z.ZodObject<{
130
+ convention: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString>]>;
131
+ confidence: z.ZodNumber;
132
+ stability: z.ZodOptional<z.ZodEnum<{
133
+ high: "high";
134
+ medium: "medium";
135
+ low: "low";
136
+ }>>;
137
+ fixability: z.ZodOptional<z.ZodEnum<{
138
+ safe: "safe";
139
+ "maybe-incorrect": "maybe-incorrect";
140
+ "requires-input": "requires-input";
141
+ "not-fixable": "not-fixable";
142
+ }>>;
143
+ description: z.ZodOptional<z.ZodString>;
144
+ examples: z.ZodOptional<z.ZodArray<z.ZodObject<{
145
+ good: z.ZodOptional<z.ZodString>;
146
+ bad: z.ZodOptional<z.ZodString>;
147
+ source: z.ZodOptional<z.ZodString>;
148
+ }, z.core.$strip>>>;
149
+ extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
150
+ }, z.core.$strip>>;
151
+ formatting: z.ZodRecord<z.ZodString, z.ZodObject<{
152
+ convention: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString>]>;
153
+ confidence: z.ZodNumber;
154
+ stability: z.ZodOptional<z.ZodEnum<{
155
+ high: "high";
156
+ medium: "medium";
157
+ low: "low";
158
+ }>>;
159
+ fixability: z.ZodOptional<z.ZodEnum<{
160
+ safe: "safe";
161
+ "maybe-incorrect": "maybe-incorrect";
162
+ "requires-input": "requires-input";
163
+ "not-fixable": "not-fixable";
164
+ }>>;
165
+ description: z.ZodOptional<z.ZodString>;
166
+ examples: z.ZodOptional<z.ZodArray<z.ZodObject<{
167
+ good: z.ZodOptional<z.ZodString>;
168
+ bad: z.ZodOptional<z.ZodString>;
169
+ source: z.ZodOptional<z.ZodString>;
170
+ }, z.core.$strip>>>;
171
+ extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
172
+ }, z.core.$strip>>;
173
+ patterns: z.ZodRecord<z.ZodString, z.ZodObject<{
174
+ convention: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString>]>;
175
+ confidence: z.ZodNumber;
176
+ stability: z.ZodOptional<z.ZodEnum<{
177
+ high: "high";
178
+ medium: "medium";
179
+ low: "low";
180
+ }>>;
181
+ fixability: z.ZodOptional<z.ZodEnum<{
182
+ safe: "safe";
183
+ "maybe-incorrect": "maybe-incorrect";
184
+ "requires-input": "requires-input";
185
+ "not-fixable": "not-fixable";
186
+ }>>;
187
+ description: z.ZodOptional<z.ZodString>;
188
+ examples: z.ZodOptional<z.ZodArray<z.ZodObject<{
189
+ good: z.ZodOptional<z.ZodString>;
190
+ bad: z.ZodOptional<z.ZodString>;
191
+ source: z.ZodOptional<z.ZodString>;
192
+ }, z.core.$strip>>>;
193
+ extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
194
+ }, z.core.$strip>>;
195
+ idioms: z.ZodObject<{
196
+ detected: z.ZodArray<z.ZodObject<{
197
+ name: z.ZodString;
198
+ description: z.ZodString;
199
+ frequency: z.ZodNumber;
200
+ confidence: z.ZodNumber;
201
+ example: z.ZodOptional<z.ZodString>;
202
+ }, z.core.$strip>>;
203
+ }, z.core.$strip>;
204
+ antiPatterns: z.ZodObject<{
205
+ acknowledged: z.ZodArray<z.ZodObject<{
206
+ pattern: z.ZodString;
207
+ reason: z.ZodString;
208
+ deprecated: z.ZodOptional<z.ZodBoolean>;
209
+ }, z.core.$strip>>;
210
+ }, z.core.$strip>;
211
+ overrides: z.ZodArray<z.ZodObject<{
212
+ files: z.ZodArray<z.ZodString>;
213
+ naming: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
214
+ convention: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString>]>;
215
+ confidence: z.ZodNumber;
216
+ stability: z.ZodOptional<z.ZodEnum<{
217
+ high: "high";
218
+ medium: "medium";
219
+ low: "low";
220
+ }>>;
221
+ fixability: z.ZodOptional<z.ZodEnum<{
222
+ safe: "safe";
223
+ "maybe-incorrect": "maybe-incorrect";
224
+ "requires-input": "requires-input";
225
+ "not-fixable": "not-fixable";
226
+ }>>;
227
+ description: z.ZodOptional<z.ZodString>;
228
+ examples: z.ZodOptional<z.ZodArray<z.ZodObject<{
229
+ good: z.ZodOptional<z.ZodString>;
230
+ bad: z.ZodOptional<z.ZodString>;
231
+ source: z.ZodOptional<z.ZodString>;
232
+ }, z.core.$strip>>>;
233
+ extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
234
+ }, z.core.$strip>>>;
235
+ structure: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
236
+ convention: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString>]>;
237
+ confidence: z.ZodNumber;
238
+ stability: z.ZodOptional<z.ZodEnum<{
239
+ high: "high";
240
+ medium: "medium";
241
+ low: "low";
242
+ }>>;
243
+ fixability: z.ZodOptional<z.ZodEnum<{
244
+ safe: "safe";
245
+ "maybe-incorrect": "maybe-incorrect";
246
+ "requires-input": "requires-input";
247
+ "not-fixable": "not-fixable";
248
+ }>>;
249
+ description: z.ZodOptional<z.ZodString>;
250
+ examples: z.ZodOptional<z.ZodArray<z.ZodObject<{
251
+ good: z.ZodOptional<z.ZodString>;
252
+ bad: z.ZodOptional<z.ZodString>;
253
+ source: z.ZodOptional<z.ZodString>;
254
+ }, z.core.$strip>>>;
255
+ extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
256
+ }, z.core.$strip>>>;
257
+ documentation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
258
+ convention: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString>]>;
259
+ confidence: z.ZodNumber;
260
+ stability: z.ZodOptional<z.ZodEnum<{
261
+ high: "high";
262
+ medium: "medium";
263
+ low: "low";
264
+ }>>;
265
+ fixability: z.ZodOptional<z.ZodEnum<{
266
+ safe: "safe";
267
+ "maybe-incorrect": "maybe-incorrect";
268
+ "requires-input": "requires-input";
269
+ "not-fixable": "not-fixable";
270
+ }>>;
271
+ description: z.ZodOptional<z.ZodString>;
272
+ examples: z.ZodOptional<z.ZodArray<z.ZodObject<{
273
+ good: z.ZodOptional<z.ZodString>;
274
+ bad: z.ZodOptional<z.ZodString>;
275
+ source: z.ZodOptional<z.ZodString>;
276
+ }, z.core.$strip>>>;
277
+ extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
278
+ }, z.core.$strip>>>;
279
+ errorHandling: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
280
+ convention: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString>]>;
281
+ confidence: z.ZodNumber;
282
+ stability: z.ZodOptional<z.ZodEnum<{
283
+ high: "high";
284
+ medium: "medium";
285
+ low: "low";
286
+ }>>;
287
+ fixability: z.ZodOptional<z.ZodEnum<{
288
+ safe: "safe";
289
+ "maybe-incorrect": "maybe-incorrect";
290
+ "requires-input": "requires-input";
291
+ "not-fixable": "not-fixable";
292
+ }>>;
293
+ description: z.ZodOptional<z.ZodString>;
294
+ examples: z.ZodOptional<z.ZodArray<z.ZodObject<{
295
+ good: z.ZodOptional<z.ZodString>;
296
+ bad: z.ZodOptional<z.ZodString>;
297
+ source: z.ZodOptional<z.ZodString>;
298
+ }, z.core.$strip>>>;
299
+ extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
300
+ }, z.core.$strip>>>;
301
+ formatting: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
302
+ convention: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString>]>;
303
+ confidence: z.ZodNumber;
304
+ stability: z.ZodOptional<z.ZodEnum<{
305
+ high: "high";
306
+ medium: "medium";
307
+ low: "low";
308
+ }>>;
309
+ fixability: z.ZodOptional<z.ZodEnum<{
310
+ safe: "safe";
311
+ "maybe-incorrect": "maybe-incorrect";
312
+ "requires-input": "requires-input";
313
+ "not-fixable": "not-fixable";
314
+ }>>;
315
+ description: z.ZodOptional<z.ZodString>;
316
+ examples: z.ZodOptional<z.ZodArray<z.ZodObject<{
317
+ good: z.ZodOptional<z.ZodString>;
318
+ bad: z.ZodOptional<z.ZodString>;
319
+ source: z.ZodOptional<z.ZodString>;
320
+ }, z.core.$strip>>>;
321
+ extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
322
+ }, z.core.$strip>>>;
323
+ patterns: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
324
+ convention: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString>]>;
325
+ confidence: z.ZodNumber;
326
+ stability: z.ZodOptional<z.ZodEnum<{
327
+ high: "high";
328
+ medium: "medium";
329
+ low: "low";
330
+ }>>;
331
+ fixability: z.ZodOptional<z.ZodEnum<{
332
+ safe: "safe";
333
+ "maybe-incorrect": "maybe-incorrect";
334
+ "requires-input": "requires-input";
335
+ "not-fixable": "not-fixable";
336
+ }>>;
337
+ description: z.ZodOptional<z.ZodString>;
338
+ examples: z.ZodOptional<z.ZodArray<z.ZodObject<{
339
+ good: z.ZodOptional<z.ZodString>;
340
+ bad: z.ZodOptional<z.ZodString>;
341
+ source: z.ZodOptional<z.ZodString>;
342
+ }, z.core.$strip>>>;
343
+ extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
344
+ }, z.core.$strip>>>;
345
+ }, z.core.$strip>>;
346
+ severityThresholds: z.ZodDefault<z.ZodObject<{
347
+ error: z.ZodNumber;
348
+ warn: z.ZodNumber;
349
+ info: z.ZodNumber;
350
+ }, z.core.$strip>>;
351
+ }, z.core.$strip>;
352
+ type Profile = z.infer<typeof ProfileSchema>;
353
+ type SeverityThresholds = z.infer<typeof SeverityThresholdsSchema>;
354
+ declare const PROFILE_CATEGORIES: readonly ["naming", "structure", "documentation", "errorHandling", "formatting", "patterns"];
355
+ type ProfileCategory = (typeof PROFILE_CATEGORIES)[number];
356
+ type Severity = "error" | "warn" | "info" | "off";
357
+
358
+ declare function readProfile(filePath: string): Promise<Profile>;
359
+ declare function writeProfile(filePath: string, profile: unknown): Promise<void>;
360
+ declare function validateProfile(data: unknown): zod.ZodSafeParseResult<{
361
+ schemaVersion: string;
362
+ author: string;
363
+ generated: string;
364
+ sources: string[];
365
+ naming: Record<string, {
366
+ convention: string | number | boolean | string[];
367
+ confidence: number;
368
+ stability?: "high" | "medium" | "low" | undefined;
369
+ fixability?: "safe" | "maybe-incorrect" | "requires-input" | "not-fixable" | undefined;
370
+ description?: string | undefined;
371
+ examples?: {
372
+ good?: string | undefined;
373
+ bad?: string | undefined;
374
+ source?: string | undefined;
375
+ }[] | undefined;
376
+ extensions?: Record<string, unknown> | undefined;
377
+ }>;
378
+ structure: Record<string, {
379
+ convention: string | number | boolean | string[];
380
+ confidence: number;
381
+ stability?: "high" | "medium" | "low" | undefined;
382
+ fixability?: "safe" | "maybe-incorrect" | "requires-input" | "not-fixable" | undefined;
383
+ description?: string | undefined;
384
+ examples?: {
385
+ good?: string | undefined;
386
+ bad?: string | undefined;
387
+ source?: string | undefined;
388
+ }[] | undefined;
389
+ extensions?: Record<string, unknown> | undefined;
390
+ }>;
391
+ documentation: Record<string, {
392
+ convention: string | number | boolean | string[];
393
+ confidence: number;
394
+ stability?: "high" | "medium" | "low" | undefined;
395
+ fixability?: "safe" | "maybe-incorrect" | "requires-input" | "not-fixable" | undefined;
396
+ description?: string | undefined;
397
+ examples?: {
398
+ good?: string | undefined;
399
+ bad?: string | undefined;
400
+ source?: string | undefined;
401
+ }[] | undefined;
402
+ extensions?: Record<string, unknown> | undefined;
403
+ }>;
404
+ errorHandling: Record<string, {
405
+ convention: string | number | boolean | string[];
406
+ confidence: number;
407
+ stability?: "high" | "medium" | "low" | undefined;
408
+ fixability?: "safe" | "maybe-incorrect" | "requires-input" | "not-fixable" | undefined;
409
+ description?: string | undefined;
410
+ examples?: {
411
+ good?: string | undefined;
412
+ bad?: string | undefined;
413
+ source?: string | undefined;
414
+ }[] | undefined;
415
+ extensions?: Record<string, unknown> | undefined;
416
+ }>;
417
+ formatting: Record<string, {
418
+ convention: string | number | boolean | string[];
419
+ confidence: number;
420
+ stability?: "high" | "medium" | "low" | undefined;
421
+ fixability?: "safe" | "maybe-incorrect" | "requires-input" | "not-fixable" | undefined;
422
+ description?: string | undefined;
423
+ examples?: {
424
+ good?: string | undefined;
425
+ bad?: string | undefined;
426
+ source?: string | undefined;
427
+ }[] | undefined;
428
+ extensions?: Record<string, unknown> | undefined;
429
+ }>;
430
+ patterns: Record<string, {
431
+ convention: string | number | boolean | string[];
432
+ confidence: number;
433
+ stability?: "high" | "medium" | "low" | undefined;
434
+ fixability?: "safe" | "maybe-incorrect" | "requires-input" | "not-fixable" | undefined;
435
+ description?: string | undefined;
436
+ examples?: {
437
+ good?: string | undefined;
438
+ bad?: string | undefined;
439
+ source?: string | undefined;
440
+ }[] | undefined;
441
+ extensions?: Record<string, unknown> | undefined;
442
+ }>;
443
+ idioms: {
444
+ detected: {
445
+ name: string;
446
+ description: string;
447
+ frequency: number;
448
+ confidence: number;
449
+ example?: string | undefined;
450
+ }[];
451
+ };
452
+ antiPatterns: {
453
+ acknowledged: {
454
+ pattern: string;
455
+ reason: string;
456
+ deprecated?: boolean | undefined;
457
+ }[];
458
+ };
459
+ overrides: {
460
+ files: string[];
461
+ naming?: Record<string, {
462
+ convention: string | number | boolean | string[];
463
+ confidence: number;
464
+ stability?: "high" | "medium" | "low" | undefined;
465
+ fixability?: "safe" | "maybe-incorrect" | "requires-input" | "not-fixable" | undefined;
466
+ description?: string | undefined;
467
+ examples?: {
468
+ good?: string | undefined;
469
+ bad?: string | undefined;
470
+ source?: string | undefined;
471
+ }[] | undefined;
472
+ extensions?: Record<string, unknown> | undefined;
473
+ }> | undefined;
474
+ structure?: Record<string, {
475
+ convention: string | number | boolean | string[];
476
+ confidence: number;
477
+ stability?: "high" | "medium" | "low" | undefined;
478
+ fixability?: "safe" | "maybe-incorrect" | "requires-input" | "not-fixable" | undefined;
479
+ description?: string | undefined;
480
+ examples?: {
481
+ good?: string | undefined;
482
+ bad?: string | undefined;
483
+ source?: string | undefined;
484
+ }[] | undefined;
485
+ extensions?: Record<string, unknown> | undefined;
486
+ }> | undefined;
487
+ documentation?: Record<string, {
488
+ convention: string | number | boolean | string[];
489
+ confidence: number;
490
+ stability?: "high" | "medium" | "low" | undefined;
491
+ fixability?: "safe" | "maybe-incorrect" | "requires-input" | "not-fixable" | undefined;
492
+ description?: string | undefined;
493
+ examples?: {
494
+ good?: string | undefined;
495
+ bad?: string | undefined;
496
+ source?: string | undefined;
497
+ }[] | undefined;
498
+ extensions?: Record<string, unknown> | undefined;
499
+ }> | undefined;
500
+ errorHandling?: Record<string, {
501
+ convention: string | number | boolean | string[];
502
+ confidence: number;
503
+ stability?: "high" | "medium" | "low" | undefined;
504
+ fixability?: "safe" | "maybe-incorrect" | "requires-input" | "not-fixable" | undefined;
505
+ description?: string | undefined;
506
+ examples?: {
507
+ good?: string | undefined;
508
+ bad?: string | undefined;
509
+ source?: string | undefined;
510
+ }[] | undefined;
511
+ extensions?: Record<string, unknown> | undefined;
512
+ }> | undefined;
513
+ formatting?: Record<string, {
514
+ convention: string | number | boolean | string[];
515
+ confidence: number;
516
+ stability?: "high" | "medium" | "low" | undefined;
517
+ fixability?: "safe" | "maybe-incorrect" | "requires-input" | "not-fixable" | undefined;
518
+ description?: string | undefined;
519
+ examples?: {
520
+ good?: string | undefined;
521
+ bad?: string | undefined;
522
+ source?: string | undefined;
523
+ }[] | undefined;
524
+ extensions?: Record<string, unknown> | undefined;
525
+ }> | undefined;
526
+ patterns?: Record<string, {
527
+ convention: string | number | boolean | string[];
528
+ confidence: number;
529
+ stability?: "high" | "medium" | "low" | undefined;
530
+ fixability?: "safe" | "maybe-incorrect" | "requires-input" | "not-fixable" | undefined;
531
+ description?: string | undefined;
532
+ examples?: {
533
+ good?: string | undefined;
534
+ bad?: string | undefined;
535
+ source?: string | undefined;
536
+ }[] | undefined;
537
+ extensions?: Record<string, unknown> | undefined;
538
+ }> | undefined;
539
+ }[];
540
+ severityThresholds: {
541
+ error: number;
542
+ warn: number;
543
+ info: number;
544
+ };
545
+ $schema?: string | undefined;
546
+ }>;
547
+
548
+ interface Migration {
549
+ from: string;
550
+ to: string;
551
+ migrate: (profile: Record<string, unknown>) => Record<string, unknown>;
552
+ }
553
+ declare function registerMigration(migration: Migration): void;
554
+
555
+ declare function migrateProfile(profile: Record<string, unknown>): Record<string, unknown>;
556
+
557
+ interface GeneratedFile {
558
+ path: string;
559
+ content: string;
560
+ }
561
+
562
+ declare function generateSkillFiles(profile: Profile): GeneratedFile[];
563
+
564
+ declare function generateClaudeRules(profile: Profile): GeneratedFile[];
565
+
566
+ interface ClaudeHook {
567
+ event: "PreToolUse" | "PostToolUse";
568
+ matcher: string;
569
+ command: string;
570
+ }
571
+ interface ClaudeSettingsHooks {
572
+ hooks: ClaudeHook[];
573
+ }
574
+ declare function generateHooksConfig(_profile: Profile): ClaudeSettingsHooks;
575
+
576
+ declare function generateEslintExport(profile: Profile): GeneratedFile;
577
+
578
+ declare function toEslintSeverity(confidence: number, thresholds: SeverityThresholds): Severity | null;
579
+ declare function severityRank(s: Severity): number;
580
+ declare function buildNamingConventionRule(profile: Profile): [string, unknown] | null;
581
+ declare function buildImportOrderRule(profile: Profile): [string, unknown] | null;
582
+ declare function buildFunctionLengthRule(profile: Profile): [string, unknown] | null;
583
+ declare function buildFileNamingRule(profile: Profile): [string, unknown] | null;
584
+ declare function buildJsdocRules(profile: Profile): Array<[string, unknown]>;
585
+
586
+ declare function generateRuffExport(profile: Profile): GeneratedFile;
587
+
588
+ declare function generateMarkdownExport(profile: Profile): GeneratedFile;
589
+
590
+ declare function generateEditorConfigExport(profile: Profile): GeneratedFile;
591
+
592
+ type ExportFormat = "skill" | "claude-rules" | "hooks" | "eslint" | "ruff" | "markdown" | "editorconfig";
593
+ declare const SUPPORTED_FORMATS: ExportFormat[];
594
+ declare function exportProfile(profile: Profile, format: ExportFormat): GeneratedFile[];
595
+
596
+ interface RuleEntry {
597
+ category: string;
598
+ name: string;
599
+ convention: unknown;
600
+ confidence: number;
601
+ stability?: string;
602
+ description?: string;
603
+ examples?: Array<{
604
+ good?: string;
605
+ bad?: string;
606
+ source?: string;
607
+ }>;
608
+ extensions?: Record<string, unknown>;
609
+ }
610
+ type ExtractedRule = RuleEntry;
611
+ declare function extractAllRules(profile: Profile): RuleEntry[];
612
+ declare function getTopRules(profile: Profile, count?: number): RuleEntry[];
613
+ declare function getRulesForCategory(profile: Profile, category: string): RuleEntry[];
614
+ declare function getRulesByCategory(profile: Profile): Map<string, RuleEntry[]>;
615
+ declare function detectLanguages(profile: Profile): string[];
616
+
617
+ export { DEFAULT_SEVERITY_THRESHOLDS, ExampleSchema, type ExportFormat, type ExtractedRule, type Fixability, FixabilitySchema, type GeneratedFile, PROFILE_CATEGORIES, type Profile, type ProfileCategory, ProfileSchema, type RuleEntry, SCHEMA_VERSION, SUPPORTED_FORMATS, type Severity, type SeverityThresholds, type Stability, StabilitySchema, type StyleRule, StyleRuleSchema, buildFileNamingRule, buildFunctionLengthRule, buildImportOrderRule, buildJsdocRules, buildNamingConventionRule, detectLanguages, exportProfile, extractAllRules, generateClaudeRules, generateEditorConfigExport, generateEslintExport, generateHooksConfig, generateMarkdownExport, generateRuffExport, generateSkillFiles, getRulesByCategory, getRulesForCategory, getTopRules, migrateProfile, readProfile, registerMigration, severityRank, toEslintSeverity, validateProfile, writeProfile };