oh-my-design-cli 0.1.2 → 1.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.
- package/.claude/hooks/post-edit-watch.cjs +99 -0
- package/.claude/hooks/session-end-foldin.cjs +96 -0
- package/.claude/hooks/session-state-loader.cjs +64 -0
- package/.claude/hooks/skill-activation.cjs +73 -0
- package/.claude/settings.json +55 -0
- package/.claude/skills/skill-rules.json +87 -0
- package/AGENTS.md +111 -0
- package/README.md +75 -202
- package/agents/AGENT.md +53 -0
- package/agents/omd-3d-blender.md +269 -0
- package/agents/omd-a11y-auditor.md +97 -0
- package/agents/omd-asset-curator.md +260 -0
- package/agents/omd-critic.md +181 -0
- package/agents/omd-master.md +548 -0
- package/agents/omd-microcopy.md +63 -0
- package/agents/omd-persona-tester.md +118 -0
- package/agents/omd-ui-junior.md +129 -0
- package/agents/omd-ux-engineer.md +265 -0
- package/agents/omd-ux-researcher.md +62 -0
- package/agents/omd-ux-writer.md +181 -0
- package/data/opt-out-corpus.json +141 -0
- package/data/reference-fingerprints.json +1495 -0
- package/dist/bin/oh-my-design.js +3 -818
- package/dist/bin/oh-my-design.js.map +1 -1
- package/dist/install-skills-SVIYKXOE.js +442 -0
- package/dist/install-skills-SVIYKXOE.js.map +1 -0
- package/package.json +23 -23
- package/scripts/context.cjs +91 -0
- package/scripts/postinstall.cjs +54 -0
- package/skills/omd-apply/SKILL.md +64 -53
- package/skills/omd-harness/SKILL.md +271 -0
- package/skills/omd-learn/SKILL.md +55 -35
- package/skills/omd-remember/SKILL.md +93 -15
- package/skills/omd-sync/SKILL.md +140 -16
- package/dist/chunk-6YNSV3VY.js +0 -35
- package/dist/chunk-6YNSV3VY.js.map +0 -1
- package/dist/chunk-MHFYGZSO.js +0 -337
- package/dist/chunk-MHFYGZSO.js.map +0 -1
- package/dist/chunk-N2JG6N4Q.js +0 -264
- package/dist/chunk-N2JG6N4Q.js.map +0 -1
- package/dist/chunk-OOQQEUGX.js +0 -46
- package/dist/chunk-OOQQEUGX.js.map +0 -1
- package/dist/chunk-OR5DHENY.js +0 -250
- package/dist/chunk-OR5DHENY.js.map +0 -1
- package/dist/customizer-CM76752R.js +0 -8
- package/dist/customizer-CM76752R.js.map +0 -1
- package/dist/index.d.ts +0 -559
- package/dist/index.js +0 -3113
- package/dist/index.js.map +0 -1
- package/dist/init-UMM4XIV5.js +0 -675
- package/dist/init-UMM4XIV5.js.map +0 -1
- package/dist/install-skills-CM6VXFZJ.js +0 -152
- package/dist/install-skills-CM6VXFZJ.js.map +0 -1
- package/dist/learn-33LHKEJA.js +0 -140
- package/dist/learn-33LHKEJA.js.map +0 -1
- package/dist/reference-YMNAOXJQ.js +0 -47
- package/dist/reference-YMNAOXJQ.js.map +0 -1
- package/dist/reference-parser-TM3CJPNE.js +0 -10
- package/dist/reference-parser-TM3CJPNE.js.map +0 -1
- package/dist/remember-UAFA5B2O.js +0 -78
- package/dist/remember-UAFA5B2O.js.map +0 -1
- package/dist/sync-FDYRKNFE.js +0 -417
- package/dist/sync-FDYRKNFE.js.map +0 -1
- package/dist/templates/templates/design-md.hbs +0 -44
- package/dist/templates/templates/partials/agent-prompt-guide.hbs +0 -28
- package/dist/templates/templates/partials/color-palette.hbs +0 -49
- package/dist/templates/templates/partials/component-stylings.hbs +0 -28
- package/dist/templates/templates/partials/depth-elevation.hbs +0 -31
- package/dist/templates/templates/partials/dos-donts.hbs +0 -13
- package/dist/templates/templates/partials/layout.hbs +0 -30
- package/dist/templates/templates/partials/responsive.hbs +0 -25
- package/dist/templates/templates/partials/shadcn-tokens.hbs +0 -64
- package/dist/templates/templates/partials/typography.hbs +0 -43
- package/dist/templates/templates/partials/visual-theme.hbs +0 -26
package/dist/index.d.ts
DELETED
|
@@ -1,559 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
type Mood = 'clean' | 'warm' | 'bold' | 'minimal' | 'playful' | 'dark';
|
|
4
|
-
type Roundness = 'sharp' | 'moderate' | 'rounded' | 'pill';
|
|
5
|
-
type Density = 'compact' | 'comfortable' | 'spacious';
|
|
6
|
-
type TypographyStyle = 'geometric' | 'humanist' | 'monospace' | 'serif-accent';
|
|
7
|
-
type DepthStyle = 'flat' | 'subtle' | 'layered' | 'dramatic';
|
|
8
|
-
type ComponentName = 'button' | 'card' | 'dialog' | 'dropdown' | 'table' | 'input' | 'navigation' | 'badge' | 'floating-button' | 'toast' | 'tabs' | 'select';
|
|
9
|
-
interface UserPreferences {
|
|
10
|
-
mood: Mood;
|
|
11
|
-
primaryColor: string;
|
|
12
|
-
roundness: Roundness;
|
|
13
|
-
density: Density;
|
|
14
|
-
typography: TypographyStyle;
|
|
15
|
-
depth: DepthStyle;
|
|
16
|
-
darkMode: boolean;
|
|
17
|
-
components: ComponentName[];
|
|
18
|
-
preset?: string;
|
|
19
|
-
}
|
|
20
|
-
interface ColorScale {
|
|
21
|
-
50: string;
|
|
22
|
-
100: string;
|
|
23
|
-
200: string;
|
|
24
|
-
300: string;
|
|
25
|
-
400: string;
|
|
26
|
-
500: string;
|
|
27
|
-
600: string;
|
|
28
|
-
700: string;
|
|
29
|
-
800: string;
|
|
30
|
-
900: string;
|
|
31
|
-
950: string;
|
|
32
|
-
}
|
|
33
|
-
interface SemanticColor {
|
|
34
|
-
base: string;
|
|
35
|
-
foreground: string;
|
|
36
|
-
}
|
|
37
|
-
interface ColorTokens {
|
|
38
|
-
primary: SemanticColor & {
|
|
39
|
-
scale: ColorScale;
|
|
40
|
-
};
|
|
41
|
-
secondary: SemanticColor;
|
|
42
|
-
accent: SemanticColor;
|
|
43
|
-
muted: SemanticColor;
|
|
44
|
-
destructive: SemanticColor;
|
|
45
|
-
background: string;
|
|
46
|
-
foreground: string;
|
|
47
|
-
card: SemanticColor;
|
|
48
|
-
popover: SemanticColor;
|
|
49
|
-
border: string;
|
|
50
|
-
input: string;
|
|
51
|
-
ring: string;
|
|
52
|
-
chart: [string, string, string, string, string];
|
|
53
|
-
}
|
|
54
|
-
interface TypographyTokens {
|
|
55
|
-
fontFamily: {
|
|
56
|
-
sans: string;
|
|
57
|
-
mono: string;
|
|
58
|
-
heading: string;
|
|
59
|
-
};
|
|
60
|
-
scale: {
|
|
61
|
-
xs: string;
|
|
62
|
-
sm: string;
|
|
63
|
-
base: string;
|
|
64
|
-
lg: string;
|
|
65
|
-
xl: string;
|
|
66
|
-
'2xl': string;
|
|
67
|
-
'3xl': string;
|
|
68
|
-
'4xl': string;
|
|
69
|
-
};
|
|
70
|
-
weight: {
|
|
71
|
-
normal: number;
|
|
72
|
-
medium: number;
|
|
73
|
-
semibold: number;
|
|
74
|
-
bold: number;
|
|
75
|
-
};
|
|
76
|
-
lineHeight: {
|
|
77
|
-
tight: number;
|
|
78
|
-
normal: number;
|
|
79
|
-
relaxed: number;
|
|
80
|
-
};
|
|
81
|
-
letterSpacing: {
|
|
82
|
-
tight: string;
|
|
83
|
-
normal: string;
|
|
84
|
-
wide: string;
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
interface SpacingTokens {
|
|
88
|
-
baseUnit: number;
|
|
89
|
-
scale: number[];
|
|
90
|
-
sectionGap: string;
|
|
91
|
-
componentPadding: {
|
|
92
|
-
sm: string;
|
|
93
|
-
md: string;
|
|
94
|
-
lg: string;
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
interface RadiusTokens {
|
|
98
|
-
none: string;
|
|
99
|
-
sm: string;
|
|
100
|
-
md: string;
|
|
101
|
-
lg: string;
|
|
102
|
-
xl: string;
|
|
103
|
-
full: string;
|
|
104
|
-
}
|
|
105
|
-
interface ShadowTokens {
|
|
106
|
-
none: string;
|
|
107
|
-
sm: string;
|
|
108
|
-
md: string;
|
|
109
|
-
lg: string;
|
|
110
|
-
xl: string;
|
|
111
|
-
}
|
|
112
|
-
interface BorderTokens {
|
|
113
|
-
width: string;
|
|
114
|
-
style: string;
|
|
115
|
-
color: string;
|
|
116
|
-
}
|
|
117
|
-
interface ComponentTokens {
|
|
118
|
-
description: string;
|
|
119
|
-
variants: Record<string, {
|
|
120
|
-
background: string;
|
|
121
|
-
foreground: string;
|
|
122
|
-
border?: string;
|
|
123
|
-
shadow?: string;
|
|
124
|
-
radius?: string;
|
|
125
|
-
padding?: string;
|
|
126
|
-
}>;
|
|
127
|
-
states: {
|
|
128
|
-
hover?: string;
|
|
129
|
-
active?: string;
|
|
130
|
-
disabled?: string;
|
|
131
|
-
focus?: string;
|
|
132
|
-
};
|
|
133
|
-
sizes?: Record<string, {
|
|
134
|
-
height: string;
|
|
135
|
-
padding: string;
|
|
136
|
-
fontSize: string;
|
|
137
|
-
}>;
|
|
138
|
-
}
|
|
139
|
-
interface DesignTokens {
|
|
140
|
-
name: string;
|
|
141
|
-
colors: ColorTokens;
|
|
142
|
-
typography: TypographyTokens;
|
|
143
|
-
spacing: SpacingTokens;
|
|
144
|
-
radius: RadiusTokens;
|
|
145
|
-
shadows: ShadowTokens;
|
|
146
|
-
borders: BorderTokens;
|
|
147
|
-
components: Partial<Record<ComponentName, ComponentTokens>>;
|
|
148
|
-
darkColors?: ColorTokens;
|
|
149
|
-
}
|
|
150
|
-
interface Preset {
|
|
151
|
-
name: string;
|
|
152
|
-
displayName: string;
|
|
153
|
-
description: string;
|
|
154
|
-
preferences: Partial<UserPreferences>;
|
|
155
|
-
tokenOverrides?: Partial<DesignTokens>;
|
|
156
|
-
dosAndDonts?: {
|
|
157
|
-
dos: string[];
|
|
158
|
-
donts: string[];
|
|
159
|
-
};
|
|
160
|
-
}
|
|
161
|
-
interface TemplateContext extends DesignTokens {
|
|
162
|
-
preferences: UserPreferences;
|
|
163
|
-
presetName?: string;
|
|
164
|
-
generatedAt: string;
|
|
165
|
-
version: string;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
declare function resolveTokens(prefs: UserPreferences): DesignTokens;
|
|
169
|
-
|
|
170
|
-
declare function renderDesignMd(context: TemplateContext): string;
|
|
171
|
-
|
|
172
|
-
declare function generateComponentTokens(componentNames: ComponentName[], tokens: DesignTokens): Array<{
|
|
173
|
-
name: ComponentName;
|
|
174
|
-
title: string;
|
|
175
|
-
} & ComponentTokens>;
|
|
176
|
-
|
|
177
|
-
interface ShadcnTheme {
|
|
178
|
-
light: Record<string, string>;
|
|
179
|
-
dark?: Record<string, string>;
|
|
180
|
-
}
|
|
181
|
-
declare function mapToShadcn(tokens: DesignTokens): ShadcnTheme;
|
|
182
|
-
declare function shadcnToCss(theme: ShadcnTheme): string;
|
|
183
|
-
|
|
184
|
-
interface ReferenceEntry {
|
|
185
|
-
id: string;
|
|
186
|
-
name: string;
|
|
187
|
-
category: string;
|
|
188
|
-
designMd: string;
|
|
189
|
-
colors: ExtractedColors;
|
|
190
|
-
typography: ExtractedTypography;
|
|
191
|
-
radius: string;
|
|
192
|
-
mood: string;
|
|
193
|
-
}
|
|
194
|
-
interface ExtractedColors {
|
|
195
|
-
primary: string;
|
|
196
|
-
primaryName: string;
|
|
197
|
-
background: string;
|
|
198
|
-
foreground: string;
|
|
199
|
-
accent?: string;
|
|
200
|
-
border?: string;
|
|
201
|
-
}
|
|
202
|
-
interface ExtractedTypography {
|
|
203
|
-
primary: string;
|
|
204
|
-
mono?: string;
|
|
205
|
-
headingWeight: string;
|
|
206
|
-
}
|
|
207
|
-
declare function loadReference(id: string): ReferenceEntry;
|
|
208
|
-
declare function listReferences(): Array<{
|
|
209
|
-
id: string;
|
|
210
|
-
name: string;
|
|
211
|
-
category: string;
|
|
212
|
-
primaryColor: string;
|
|
213
|
-
}>;
|
|
214
|
-
|
|
215
|
-
interface CustomOverrides {
|
|
216
|
-
primaryColor?: string;
|
|
217
|
-
headingWeight?: string;
|
|
218
|
-
borderRadius?: string;
|
|
219
|
-
fontFamily?: string;
|
|
220
|
-
darkMode: boolean;
|
|
221
|
-
additionalNotes?: string;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
/**
|
|
225
|
-
* Apply user overrides to a reference DESIGN.md.
|
|
226
|
-
*
|
|
227
|
-
* Strategy:
|
|
228
|
-
* - "as-is": return the original DESIGN.md content with minimal additions
|
|
229
|
-
* - "customized": perform text-level replacements for color/font/radius/weight
|
|
230
|
-
* and append a customization summary + shadcn CSS variables block
|
|
231
|
-
*
|
|
232
|
-
* This is intentionally NOT an AI call. It's deterministic string transformation.
|
|
233
|
-
*/
|
|
234
|
-
declare function applyOverrides(ref: ReferenceEntry, overrides: CustomOverrides, mode: 'as-is' | 'customized', components?: string[]): {
|
|
235
|
-
designMd: string;
|
|
236
|
-
shadcnCss: string;
|
|
237
|
-
previewData: PreviewData;
|
|
238
|
-
};
|
|
239
|
-
interface PreviewData {
|
|
240
|
-
name: string;
|
|
241
|
-
basedOn: string;
|
|
242
|
-
primary: string;
|
|
243
|
-
background: string;
|
|
244
|
-
foreground: string;
|
|
245
|
-
font: string;
|
|
246
|
-
headingWeight: string;
|
|
247
|
-
radius: string;
|
|
248
|
-
shadcnCss: string;
|
|
249
|
-
designMd: string;
|
|
250
|
-
colors: {
|
|
251
|
-
primary: string;
|
|
252
|
-
accent: string;
|
|
253
|
-
muted: string;
|
|
254
|
-
destructive: string;
|
|
255
|
-
border: string;
|
|
256
|
-
scale: Record<string, string>;
|
|
257
|
-
chart: string[];
|
|
258
|
-
};
|
|
259
|
-
darkMode: boolean;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
declare function generatePreviewHtml(data: PreviewData): string;
|
|
263
|
-
|
|
264
|
-
declare function getPreset(name: string): Preset | undefined;
|
|
265
|
-
declare function getAllPresets(): Preset[];
|
|
266
|
-
declare function mergeWithBase(preset: Preset): Required<Pick<Preset, 'preferences' | 'dosAndDonts'>>;
|
|
267
|
-
|
|
268
|
-
interface ManagedBlock {
|
|
269
|
-
version: number;
|
|
270
|
-
hash: string;
|
|
271
|
-
content: string;
|
|
272
|
-
rawStart: number;
|
|
273
|
-
rawEnd: number;
|
|
274
|
-
}
|
|
275
|
-
interface WriteBlockResult {
|
|
276
|
-
updated: string;
|
|
277
|
-
hash: string;
|
|
278
|
-
}
|
|
279
|
-
declare function hashContent(content: string): string;
|
|
280
|
-
declare function parseBlock(fileContent: string): ManagedBlock | null;
|
|
281
|
-
declare function hasDrift(block: ManagedBlock): boolean;
|
|
282
|
-
declare function writeBlock(fileContent: string, managedContent: string, version: number): WriteBlockResult;
|
|
283
|
-
|
|
284
|
-
declare const SYNC_LOCK_VERSION = 1;
|
|
285
|
-
declare const SYNC_LOCK_PATH = ".omd/sync.lock.json";
|
|
286
|
-
declare const TargetSchema: z.ZodObject<{
|
|
287
|
-
managed_hash: z.ZodString;
|
|
288
|
-
last_synced: z.ZodString;
|
|
289
|
-
}, "strip", z.ZodTypeAny, {
|
|
290
|
-
managed_hash: string;
|
|
291
|
-
last_synced: string;
|
|
292
|
-
}, {
|
|
293
|
-
managed_hash: string;
|
|
294
|
-
last_synced: string;
|
|
295
|
-
}>;
|
|
296
|
-
declare const SyncLockSchema: z.ZodObject<{
|
|
297
|
-
version: z.ZodNumber;
|
|
298
|
-
design_md_hash: z.ZodString;
|
|
299
|
-
targets: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
300
|
-
managed_hash: z.ZodString;
|
|
301
|
-
last_synced: z.ZodString;
|
|
302
|
-
}, "strip", z.ZodTypeAny, {
|
|
303
|
-
managed_hash: string;
|
|
304
|
-
last_synced: string;
|
|
305
|
-
}, {
|
|
306
|
-
managed_hash: string;
|
|
307
|
-
last_synced: string;
|
|
308
|
-
}>>;
|
|
309
|
-
}, "strip", z.ZodTypeAny, {
|
|
310
|
-
version: number;
|
|
311
|
-
design_md_hash: string;
|
|
312
|
-
targets: Record<string, {
|
|
313
|
-
managed_hash: string;
|
|
314
|
-
last_synced: string;
|
|
315
|
-
}>;
|
|
316
|
-
}, {
|
|
317
|
-
version: number;
|
|
318
|
-
design_md_hash: string;
|
|
319
|
-
targets: Record<string, {
|
|
320
|
-
managed_hash: string;
|
|
321
|
-
last_synced: string;
|
|
322
|
-
}>;
|
|
323
|
-
}>;
|
|
324
|
-
type SyncTarget = z.infer<typeof TargetSchema>;
|
|
325
|
-
type SyncLock = z.infer<typeof SyncLockSchema>;
|
|
326
|
-
declare function readLock(projectRoot: string): SyncLock | null;
|
|
327
|
-
declare function writeLock(projectRoot: string, lock: SyncLock): void;
|
|
328
|
-
declare function createLock(designMdHash: string): SyncLock;
|
|
329
|
-
declare function updateTarget(projectRoot: string, target: string, managedHash: string): SyncLock;
|
|
330
|
-
declare function updateDesignMdHash(projectRoot: string, designMdHash: string): SyncLock;
|
|
331
|
-
|
|
332
|
-
declare const MANAGED_BLOCK_VERSION = 1;
|
|
333
|
-
type ShimId = 'claude' | 'agents' | 'cursor';
|
|
334
|
-
type ShimMode = 'block' | 'whole';
|
|
335
|
-
interface Shim {
|
|
336
|
-
id: ShimId;
|
|
337
|
-
relPath: string;
|
|
338
|
-
mode: ShimMode;
|
|
339
|
-
render(): string;
|
|
340
|
-
}
|
|
341
|
-
declare const CLAUDE_SHIM: Shim;
|
|
342
|
-
declare const AGENTS_SHIM: Shim;
|
|
343
|
-
declare const CURSOR_SHIM: Shim;
|
|
344
|
-
declare const ALL_SHIMS: readonly Shim[];
|
|
345
|
-
type DriftAction = 'overwrite' | 'skip' | 'error';
|
|
346
|
-
interface WriteShimResult {
|
|
347
|
-
id: ShimId;
|
|
348
|
-
path: string;
|
|
349
|
-
hash: string;
|
|
350
|
-
status: 'created' | 'updated' | 'unchanged' | 'skipped-drift';
|
|
351
|
-
}
|
|
352
|
-
interface WriteShimsOptions {
|
|
353
|
-
onDrift?: DriftAction;
|
|
354
|
-
}
|
|
355
|
-
type InspectStatus = 'missing' | 'clean' | 'drifted' | 'out-of-date';
|
|
356
|
-
interface InspectResult {
|
|
357
|
-
id: ShimId;
|
|
358
|
-
path: string;
|
|
359
|
-
status: InspectStatus;
|
|
360
|
-
existing?: string;
|
|
361
|
-
rendered: string;
|
|
362
|
-
}
|
|
363
|
-
declare function inspectShim(projectRoot: string, shim: Shim): InspectResult;
|
|
364
|
-
declare function inspectAllShims(projectRoot: string): InspectResult[];
|
|
365
|
-
declare function writeShim(projectRoot: string, shim: Shim, opts?: WriteShimsOptions): WriteShimResult;
|
|
366
|
-
declare function writeAllShims(projectRoot: string, opts?: WriteShimsOptions): WriteShimResult[];
|
|
367
|
-
declare function refreshDesignMdHash(projectRoot: string): string | null;
|
|
368
|
-
|
|
369
|
-
declare const PREFERENCES_PATH = ".omd/preferences.md";
|
|
370
|
-
declare const PREFERENCES_SCHEMA = "omd.preferences/v1";
|
|
371
|
-
type PreferenceScope = 'visualTheme' | 'color' | 'typography' | 'spacing' | 'voice' | 'motion' | 'layout' | `components.${string}`;
|
|
372
|
-
type PreferenceSignal = 'user-correction' | 'user-statement' | 'inferred-from-revert' | 'inferred-from-edit';
|
|
373
|
-
type PreferenceConfidence = 'explicit' | 'inferred';
|
|
374
|
-
type PreferenceStatus = 'pending' | 'applied' | 'rejected' | 'superseded';
|
|
375
|
-
interface PreferenceMeta {
|
|
376
|
-
id: string;
|
|
377
|
-
timestamp: string;
|
|
378
|
-
scope: PreferenceScope;
|
|
379
|
-
signal: PreferenceSignal;
|
|
380
|
-
confidence: PreferenceConfidence;
|
|
381
|
-
status: PreferenceStatus;
|
|
382
|
-
source_agent?: string;
|
|
383
|
-
source_context?: string;
|
|
384
|
-
applied_design_md_hash?: string;
|
|
385
|
-
applied_at?: string;
|
|
386
|
-
rejected_reason?: string;
|
|
387
|
-
superseded_by?: string;
|
|
388
|
-
}
|
|
389
|
-
interface PreferenceEntry {
|
|
390
|
-
meta: PreferenceMeta;
|
|
391
|
-
heading: string;
|
|
392
|
-
body: string;
|
|
393
|
-
}
|
|
394
|
-
interface PreferencesFile {
|
|
395
|
-
schema: string;
|
|
396
|
-
design_md_hash_at_creation: string;
|
|
397
|
-
entries: PreferenceEntry[];
|
|
398
|
-
}
|
|
399
|
-
declare function generateId(): string;
|
|
400
|
-
declare function slugify(input: string, max?: number): string;
|
|
401
|
-
declare function inferScope(note: string): PreferenceScope;
|
|
402
|
-
declare function renderFile(file: PreferencesFile): string;
|
|
403
|
-
declare function parseFile(raw: string): PreferencesFile;
|
|
404
|
-
declare function readFile(projectRoot: string): PreferencesFile | null;
|
|
405
|
-
declare function writeFile(projectRoot: string, file: PreferencesFile): void;
|
|
406
|
-
interface CreateEntryInput {
|
|
407
|
-
note: string;
|
|
408
|
-
scope?: PreferenceScope;
|
|
409
|
-
signal?: PreferenceSignal;
|
|
410
|
-
confidence?: PreferenceConfidence;
|
|
411
|
-
source_agent?: string;
|
|
412
|
-
source_context?: string;
|
|
413
|
-
now?: Date;
|
|
414
|
-
}
|
|
415
|
-
declare function buildEntry(input: CreateEntryInput): PreferenceEntry;
|
|
416
|
-
interface UpdateStatusInput {
|
|
417
|
-
id: string;
|
|
418
|
-
status: PreferenceStatus;
|
|
419
|
-
applied_design_md_hash?: string;
|
|
420
|
-
rejected_reason?: string;
|
|
421
|
-
superseded_by?: string;
|
|
422
|
-
now?: Date;
|
|
423
|
-
}
|
|
424
|
-
declare function updateEntryStatus(projectRoot: string, input: UpdateStatusInput): PreferenceEntry;
|
|
425
|
-
declare function groupByScope(entries: PreferenceEntry[]): Map<PreferenceScope, PreferenceEntry[]>;
|
|
426
|
-
declare function filterByStatus(entries: PreferenceEntry[], status: PreferenceStatus): PreferenceEntry[];
|
|
427
|
-
declare function appendEntry(projectRoot: string, input: CreateEntryInput, designMdHashIfNew?: string): PreferenceEntry;
|
|
428
|
-
|
|
429
|
-
type AgentId = 'claude-code' | 'codex' | 'opencode' | 'cursor' | 'unknown';
|
|
430
|
-
declare function detectCallingAgent(): AgentId;
|
|
431
|
-
interface AgentPresence {
|
|
432
|
-
claudeCode: boolean;
|
|
433
|
-
codex: boolean;
|
|
434
|
-
opencode: boolean;
|
|
435
|
-
cursor: boolean;
|
|
436
|
-
}
|
|
437
|
-
declare function detectInstalledAgents(projectRoot: string): AgentPresence;
|
|
438
|
-
|
|
439
|
-
interface AxisSpec {
|
|
440
|
-
type: 'int' | 'float' | 'enum';
|
|
441
|
-
domain: [number, number];
|
|
442
|
-
unit?: string;
|
|
443
|
-
step?: number;
|
|
444
|
-
}
|
|
445
|
-
interface KeywordAxes {
|
|
446
|
-
[axis: string]: {
|
|
447
|
-
delta: number;
|
|
448
|
-
range: [number, number];
|
|
449
|
-
};
|
|
450
|
-
}
|
|
451
|
-
interface KeywordSpec {
|
|
452
|
-
group: 'tone' | 'density' | 'formality' | 'domain';
|
|
453
|
-
axes: KeywordAxes;
|
|
454
|
-
conflicts_with: string[];
|
|
455
|
-
voice_hints: string[];
|
|
456
|
-
coupled_axes?: string[];
|
|
457
|
-
sources?: string[];
|
|
458
|
-
}
|
|
459
|
-
interface Vocabulary {
|
|
460
|
-
version: number;
|
|
461
|
-
generated_at: string;
|
|
462
|
-
axis_registry: Record<string, AxisSpec>;
|
|
463
|
-
modifiers: Record<string, number>;
|
|
464
|
-
keywords: Record<string, KeywordSpec>;
|
|
465
|
-
}
|
|
466
|
-
interface SynonymsFile {
|
|
467
|
-
version: number;
|
|
468
|
-
map: Record<string, string>;
|
|
469
|
-
}
|
|
470
|
-
declare function loadVocabulary(): Vocabulary;
|
|
471
|
-
declare function loadSynonyms(): SynonymsFile;
|
|
472
|
-
interface ResolvedKeyword {
|
|
473
|
-
keyword: string;
|
|
474
|
-
modifier: number;
|
|
475
|
-
matchedAs: 'direct' | 'synonym';
|
|
476
|
-
synonymSource?: string;
|
|
477
|
-
}
|
|
478
|
-
declare function extractKeywords(description: string): ResolvedKeyword[];
|
|
479
|
-
interface ConflictResolution {
|
|
480
|
-
kept: ResolvedKeyword[];
|
|
481
|
-
dropped: Array<{
|
|
482
|
-
keyword: string;
|
|
483
|
-
reason: string;
|
|
484
|
-
}>;
|
|
485
|
-
warnings: string[];
|
|
486
|
-
}
|
|
487
|
-
declare function resolveConflicts(keywords: ResolvedKeyword[]): ConflictResolution;
|
|
488
|
-
interface DeltaSet {
|
|
489
|
-
axes: Record<string, {
|
|
490
|
-
value: number;
|
|
491
|
-
rangeUnion: [number, number];
|
|
492
|
-
sources: string[];
|
|
493
|
-
}>;
|
|
494
|
-
voiceHints: string[];
|
|
495
|
-
unresolved: string[];
|
|
496
|
-
warnings: string[];
|
|
497
|
-
droppedKeywords: Array<{
|
|
498
|
-
keyword: string;
|
|
499
|
-
reason: string;
|
|
500
|
-
}>;
|
|
501
|
-
matchedKeywords: ResolvedKeyword[];
|
|
502
|
-
}
|
|
503
|
-
declare function buildDeltaSet(description: string): DeltaSet;
|
|
504
|
-
declare function listKeywords(): string[];
|
|
505
|
-
|
|
506
|
-
interface ReferenceTag {
|
|
507
|
-
id: string;
|
|
508
|
-
color: string;
|
|
509
|
-
category: string;
|
|
510
|
-
keywords: string[];
|
|
511
|
-
}
|
|
512
|
-
interface RecommendHit {
|
|
513
|
-
id: string;
|
|
514
|
-
category: string;
|
|
515
|
-
color: string;
|
|
516
|
-
keywords: string[];
|
|
517
|
-
score: number;
|
|
518
|
-
matchedKeywords: string[];
|
|
519
|
-
matchedCategories: string[];
|
|
520
|
-
}
|
|
521
|
-
declare function loadReferenceTags(): ReferenceTag[];
|
|
522
|
-
interface RecommendOptions {
|
|
523
|
-
topK?: number;
|
|
524
|
-
diversityByCategory?: boolean;
|
|
525
|
-
}
|
|
526
|
-
declare function recommend(description: string, opts?: RecommendOptions): RecommendHit[];
|
|
527
|
-
|
|
528
|
-
interface StubStats {
|
|
529
|
-
hexMatches: number;
|
|
530
|
-
hexChanged: number;
|
|
531
|
-
hueShift: number;
|
|
532
|
-
satShift: number;
|
|
533
|
-
lightShift: number;
|
|
534
|
-
sourcesApplied: string[];
|
|
535
|
-
}
|
|
536
|
-
interface StubResult {
|
|
537
|
-
designMd: string;
|
|
538
|
-
stats: StubStats;
|
|
539
|
-
}
|
|
540
|
-
declare function applyDeltaStub(referenceMd: string, delta: DeltaSet): StubResult;
|
|
541
|
-
|
|
542
|
-
interface DeprecateOptions {
|
|
543
|
-
projectRoot: string;
|
|
544
|
-
previousReference?: string;
|
|
545
|
-
newReference: string;
|
|
546
|
-
preferencesReplayed?: number;
|
|
547
|
-
preferencesOrphaned?: number;
|
|
548
|
-
orphanFile?: string;
|
|
549
|
-
reason: string;
|
|
550
|
-
now?: Date;
|
|
551
|
-
}
|
|
552
|
-
interface DeprecateResult {
|
|
553
|
-
renamed: boolean;
|
|
554
|
-
from: string;
|
|
555
|
-
to: string;
|
|
556
|
-
}
|
|
557
|
-
declare function deprecateDesignMd(opts: DeprecateOptions): DeprecateResult;
|
|
558
|
-
|
|
559
|
-
export { AGENTS_SHIM, ALL_SHIMS, type AgentId, type AgentPresence, CLAUDE_SHIM, CURSOR_SHIM, type ComponentName, type ComponentTokens, type ConflictResolution, type DeltaSet, type Density, type DeprecateOptions, type DeprecateResult, type DepthStyle, type DesignTokens, type InspectResult, type InspectStatus, type KeywordSpec, MANAGED_BLOCK_VERSION, type ManagedBlock, type Mood, PREFERENCES_PATH, PREFERENCES_SCHEMA, type PreferenceConfidence, type PreferenceEntry, type PreferenceMeta, type PreferenceScope, type PreferenceSignal, type PreferenceStatus, type PreferencesFile, type Preset, type PreviewData, type RecommendHit, type RecommendOptions, type ReferenceEntry, type ReferenceTag, type ResolvedKeyword, type Roundness, SYNC_LOCK_PATH, SYNC_LOCK_VERSION, type ShadcnTheme, type Shim, type ShimId, type ShimMode, type StubResult, type StubStats, type SyncLock, type SyncTarget, type TemplateContext, type TypographyStyle, type UserPreferences, type Vocabulary, type WriteShimResult, appendEntry, applyDeltaStub, applyOverrides, buildDeltaSet, buildEntry, createLock, deprecateDesignMd, detectCallingAgent, detectInstalledAgents, extractKeywords, filterByStatus, generateComponentTokens, generateId as generatePreferenceId, generatePreviewHtml, getAllPresets, getPreset, groupByScope, hasDrift, hashContent, inferScope, inspectAllShims, inspectShim, listKeywords, listReferences, loadReference, loadReferenceTags, loadSynonyms, loadVocabulary, mapToShadcn, mergeWithBase, parseBlock, parseFile as parsePreferencesFile, readLock, readFile as readPreferencesFile, recommend, refreshDesignMdHash, renderDesignMd, renderFile as renderPreferencesFile, resolveConflicts, resolveTokens, shadcnToCss, slugify, updateDesignMdHash, updateEntryStatus, updateTarget, writeAllShims, writeBlock, writeLock, writeFile as writePreferencesFile, writeShim };
|