riazmo commited on
Commit
ca31d8a
·
verified ·
1 Parent(s): ee7b64f

Delete config/agents.yaml

Browse files
Files changed (1) hide show
  1. config/agents.yaml +0 -547
config/agents.yaml DELETED
@@ -1,547 +0,0 @@
1
- # Agent Personas & Configuration
2
- # Design System Extractor v2
3
-
4
- # =============================================================================
5
- # MODEL CONFIGURATION
6
- # =============================================================================
7
- # Model assignments for each agent based on task complexity
8
- # =============================================================================
9
-
10
- models:
11
- # Agent 1: Crawler & Extractor — NO LLM NEEDED (Rule-based)
12
- agent_crawler:
13
- requires_llm: false
14
- notes: "Pure rule-based extraction using Playwright + CSS parsing"
15
-
16
- # Agent 2: Normalizer — LIGHT MODEL
17
- agent_normalizer:
18
- requires_llm: true
19
- primary_model: "Qwen/Qwen2.5-7B-Instruct"
20
- fallback_model: "microsoft/Phi-3-mini-4k-instruct"
21
- tasks:
22
- - "Suggest semantic token names from values"
23
- - "Explain duplicate detection rationale"
24
- - "Infer naming conventions from class names"
25
- temperature: 0.2 # Low temp for consistent naming
26
- max_tokens: 1024
27
- why_this_model: |
28
- 7B model is sufficient because:
29
- - Tasks are mostly pattern matching and naming
30
- - Doesn't require complex reasoning
31
- - Fast inference, good for iterative workflows
32
-
33
- # Agent 3: Advisor — STRONG MODEL (Key agent)
34
- agent_advisor:
35
- requires_llm: true
36
- primary_model: "Qwen/Qwen2.5-72B-Instruct"
37
- fallback_model: "mistralai/Mixtral-8x7B-Instruct-v0.1"
38
- budget_model: "Qwen/Qwen2.5-7B-Instruct" # If quota constrained
39
- tasks:
40
- - "Analyze extracted system for patterns and anti-patterns"
41
- - "Research and recommend type scales with rationale"
42
- - "Suggest spacing systems based on detected patterns"
43
- - "Identify accessibility issues and fixes"
44
- - "Compare against industry design systems"
45
- temperature: 0.4 # Moderate temp for creative recommendations
46
- max_tokens: 4096
47
- why_this_model: |
48
- 72B model is critical because:
49
- - Needs deep understanding of design systems
50
- - Must reason about trade-offs (pros/cons)
51
- - Should know Material, Polaris, Carbon, etc.
52
- - Quality of recommendations is user-facing
53
-
54
- # Agent 4: Generator — LIGHT MODEL
55
- agent_generator:
56
- requires_llm: true
57
- primary_model: "Qwen/Qwen2.5-7B-Instruct"
58
- fallback_model: "mistralai/Mistral-7B-Instruct-v0.3"
59
- tasks:
60
- - "Format tokens into Tokens Studio JSON"
61
- - "Generate CSS custom properties"
62
- - "Structure metadata correctly"
63
- temperature: 0.1 # Very low temp for consistent formatting
64
- max_tokens: 8192 # Larger for full JSON output
65
- why_this_model: |
66
- 7B model is sufficient because:
67
- - Structured output generation is formulaic
68
- - JSON schema is well-defined
69
- - Speed matters for export flow
70
-
71
- # =============================================================================
72
- # FREE TIER vs PRO RECOMMENDATIONS
73
- # =============================================================================
74
-
75
- tier_recommendations:
76
- free_tier:
77
- description: "For users without HF Pro subscription"
78
- agent2: "Qwen/Qwen2.5-7B-Instruct"
79
- agent3: "mistralai/Mixtral-8x7B-Instruct-v0.1" # Best free option for reasoning
80
- agent4: "Qwen/Qwen2.5-7B-Instruct"
81
- notes: "Quality will be slightly lower for Agent 3 recommendations"
82
-
83
- pro_tier:
84
- description: "For users with HF Pro subscription"
85
- agent2: "Qwen/Qwen2.5-7B-Instruct"
86
- agent3: "Qwen/Qwen2.5-72B-Instruct" # Full quality
87
- agent4: "Qwen/Qwen2.5-7B-Instruct"
88
- notes: "Best quality, especially for design system recommendations"
89
-
90
- # =============================================================================
91
- # AGENT 1: Website Crawler & Extractor
92
- # =============================================================================
93
- agent_crawler:
94
- name: "Design Archaeologist"
95
- persona: |
96
- You are a meticulous Design Archaeologist. Your job is to carefully excavate
97
- design decisions buried in website code. You approach each site with curiosity
98
- and systematic precision, documenting everything you find without judgment.
99
-
100
- You understand that live websites are often messy — accumulated decisions from
101
- multiple designers over years. Your role is to faithfully extract what exists,
102
- not to fix or improve it yet.
103
-
104
- responsibilities:
105
- - Auto-discover pages from base URL (minimum 10)
106
- - Include key templates: homepage, listing, detail, form, marketing, auth
107
- - Scroll pages fully (above + below fold)
108
- - Extract separately for Desktop (1440px) and Mobile (375px)
109
-
110
- extraction_targets:
111
- colors:
112
- - hex values
113
- - rgb/rgba values
114
- - usage frequency
115
- - context (background, text, border, etc.)
116
- typography:
117
- - font families
118
- - font sizes (px, rem, em)
119
- - line heights
120
- - font weights
121
- - letter spacing
122
- spacing:
123
- - margin values
124
- - padding values
125
- - gap values
126
- - infer base system (4px, 8px)
127
- other:
128
- - border radius
129
- - box shadows
130
- - layout signals (containers, grids)
131
-
132
- tools:
133
- - playwright (crawling, scrolling, computed styles)
134
- - css parsing (CSSOM)
135
-
136
- output_format:
137
- - raw extracted tokens
138
- - confidence score per token
139
- - desktop/mobile separated
140
- - errors and warnings logged
141
-
142
- guardrails:
143
- - Never modify or "fix" extracted values
144
- - Always preserve original CSS values
145
- - Log anomalies, don't hide them
146
- - Respect robots.txt (configurable)
147
-
148
- # =============================================================================
149
- # AGENT 2: Token Normalizer & Structurer
150
- # =============================================================================
151
- agent_normalizer:
152
- name: "Design System Librarian"
153
- persona: |
154
- You are a methodical Design System Librarian. Your expertise is in organizing
155
- chaotic information into structured, meaningful categories. You see patterns
156
- where others see noise.
157
-
158
- You are careful to distinguish between what you KNOW (detected) and what you
159
- THINK (inferred). You never overwrite the truth — you annotate it.
160
-
161
- responsibilities:
162
- - Clean noisy extraction data
163
- - Group and merge duplicates (with threshold tolerance)
164
- - Infer naming patterns from class names
165
- - Propose initial token names
166
- - Tag confidence levels
167
-
168
- naming_conventions:
169
- colors:
170
- pattern: "color.{role}.{shade}"
171
- example: "color.primary.500"
172
- roles:
173
- - primary
174
- - secondary
175
- - neutral
176
- - success
177
- - warning
178
- - error
179
- shades:
180
- - 50
181
- - 100
182
- - 200
183
- - 300
184
- - 400
185
- - 500
186
- - 600
187
- - 700
188
- - 800
189
- - 900
190
- typography:
191
- pattern: "font.{category}.{size}"
192
- example: "font.heading.lg"
193
- categories:
194
- - heading
195
- - body
196
- - label
197
- - caption
198
- sizes:
199
- - xs
200
- - sm
201
- - md
202
- - lg
203
- - xl
204
- - 2xl
205
- spacing:
206
- pattern: "space.{size}"
207
- example: "space.4, space.8"
208
- note: "based on pixel value / 4"
209
-
210
- tagging:
211
- detected: "Directly found in CSS, high confidence"
212
- inferred: "Derived from patterns, medium confidence"
213
- low_confidence: "Appears rarely or inconsistently"
214
-
215
- duplicate_threshold:
216
- colors: 3 # hex values within 3 steps are potential duplicates
217
- spacing: 2 # pixel values within 2px are potential duplicates
218
-
219
- guardrails:
220
- - Never overwrite extracted truth
221
- - Always mark inferred vs detected
222
- - Preserve original values alongside normalized
223
- - Flag conflicts, don't resolve them silently
224
-
225
- # =============================================================================
226
- # AGENT 3: Design System Best Practices Advisor
227
- # =============================================================================
228
- agent_advisor:
229
- name: "Senior Staff Design Systems Architect"
230
- persona: |
231
- You are a Senior Staff Design Systems Architect with 15+ years of experience
232
- building and scaling design systems at major tech companies. You've seen what
233
- works and what doesn't.
234
-
235
- Your role is to ADVISE, not DECIDE. You present options with clear rationale,
236
- letting humans make the final call. You respect existing decisions while
237
- offering paths to improvement.
238
-
239
- responsibilities:
240
- - Analyze extracted system for patterns and anti-patterns
241
- - Research modern design system best practices
242
- - Propose upgrade OPTIONS (never auto-apply)
243
- - Ensure accessibility compliance (AA minimum)
244
-
245
- research_sources:
246
- - Material Design (Google)
247
- - Polaris (Shopify)
248
- - Carbon (IBM)
249
- - Fluent (Microsoft)
250
- - Primer (GitHub)
251
- - Radix
252
- - Tailwind CSS
253
-
254
- upgrade_categories:
255
- typography_scales:
256
- - name: "Minor Third"
257
- ratio: 1.2
258
- description: "Subtle progression, good for dense UIs"
259
- - name: "Major Third"
260
- ratio: 1.25
261
- description: "Balanced, most popular choice"
262
- - name: "Perfect Fourth"
263
- ratio: 1.333
264
- description: "Strong hierarchy, good for marketing"
265
- - name: "Golden Ratio"
266
- ratio: 1.618
267
- description: "Dramatic, use sparingly"
268
-
269
- spacing_systems:
270
- - name: "4px base"
271
- scale: [4, 8, 12, 16, 20, 24, 32, 40, 48, 64]
272
- description: "Fine-grained control"
273
- - name: "8px base"
274
- scale: [4, 8, 16, 24, 32, 48, 64, 80, 96]
275
- description: "Industry standard, recommended"
276
- - name: "Tailwind"
277
- scale: [4, 8, 12, 16, 20, 24, 32, 40, 48, 56, 64, 80, 96]
278
- description: "Utility-first, comprehensive"
279
-
280
- naming_conventions:
281
- - name: "T-shirt sizes"
282
- example: "xs, sm, md, lg, xl, 2xl"
283
- pros: "Intuitive, easy to remember"
284
- cons: "Limited granularity"
285
- - name: "Numeric"
286
- example: "100, 200, 300, 400, 500"
287
- pros: "Extensible, precise"
288
- cons: "Less intuitive"
289
- - name: "Semantic"
290
- example: "caption, body, subhead, title, display"
291
- pros: "Meaningful, self-documenting"
292
- cons: "Harder to extend"
293
-
294
- color_ramps:
295
- shades: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900]
296
- aa_contrast_minimum: 4.5
297
- aaa_contrast_minimum: 7.0
298
-
299
- output_format:
300
- - option sets (never single recommendations)
301
- - rationale for each option
302
- - pros and cons
303
- - accessibility impact
304
- - migration effort estimate
305
-
306
- guardrails:
307
- - Never auto-apply changes
308
- - Always provide multiple options
309
- - Respect existing system, suggest improvements
310
- - Flag accessibility issues prominently
311
-
312
- # =============================================================================
313
- # AGENT 4: Plugin & JSON Generator
314
- # =============================================================================
315
- agent_generator:
316
- name: "Automation Engineer"
317
- persona: |
318
- You are a precise Automation Engineer. Your job is to transform design
319
- decisions into machine-readable formats that tools can consume. You care
320
- deeply about compatibility, versioning, and clean output.
321
-
322
- You understand that your output will be used by Figma plugins, CSS
323
- preprocessors, and design tools — so format matters.
324
-
325
- responsibilities:
326
- - Convert finalized tokens to standard formats
327
- - Generate color ramps with AA compliance
328
- - Maintain viewport separation (Desktop/Mobile)
329
- - Version all outputs
330
-
331
- output_formats:
332
- tokens_studio:
333
- description: "Compatible with Tokens Studio Figma plugin"
334
- extension: ".json"
335
- figma_variables:
336
- description: "Direct Figma Variables format"
337
- extension: ".json"
338
- css_variables:
339
- description: "CSS custom properties"
340
- extension: ".css"
341
- tailwind_config:
342
- description: "Tailwind CSS configuration"
343
- extension: ".js"
344
-
345
- token_structure:
346
- colors:
347
- include_ramps: true
348
- ramp_shades: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900]
349
- include_contrast: true
350
- typography:
351
- include_composite: true # font-family + size + weight + line-height
352
- include_individual: true
353
- spacing:
354
- base: 8
355
- include_negative: false
356
-
357
- metadata_fields:
358
- - source_url
359
- - extracted_at
360
- - version
361
- - viewport
362
- - token_source (detected/inferred/upgraded)
363
-
364
- guardrails:
365
- - Always include metadata
366
- - Validate JSON before output
367
- - Preserve source attribution on each token
368
- - Warn on potential conflicts
369
-
370
- # =============================================================================
371
- # LANGGRAPH WORKFLOW CONFIGURATION
372
- # =============================================================================
373
- workflow:
374
- name: "design_system_extraction"
375
-
376
- checkpoints:
377
- - id: "confirm_pages"
378
- description: "Human confirms discovered pages before crawling"
379
- required: true
380
- - id: "review_extraction"
381
- description: "Human reviews extracted tokens (Stage 1 UI)"
382
- required: true
383
- - id: "select_upgrades"
384
- description: "Human selects upgrade options (Stage 2 UI)"
385
- required: true
386
- - id: "approve_export"
387
- description: "Human approves final output (Stage 3 UI)"
388
- required: true
389
-
390
- parallel_nodes:
391
- - name: "viewport_extraction"
392
- description: "Extract Desktop and Mobile in parallel"
393
- agents: ["agent_crawler"]
394
- - name: "research_and_advise"
395
- description: "Agent 3 can research while human reviews Stage 1"
396
- agents: ["agent_advisor"]
397
-
398
- error_handling:
399
- retry_attempts: 3
400
- retry_delay_seconds: 5
401
- log_errors: true
402
- show_in_ui: true
403
-
404
- # =============================================================================
405
- # UI CONFIGURATION
406
- # =============================================================================
407
- ui:
408
- layout: "single_scroll"
409
-
410
- stages:
411
- stage1:
412
- name: "Extraction Review"
413
- purpose: "Trust building — see what was found"
414
- components:
415
- - token_tables
416
- - color_swatches
417
- - typography_samples
418
- - viewport_toggle
419
- - confidence_indicators
420
- - accept_reject_controls
421
-
422
- stage2:
423
- name: "Upgrade Playground"
424
- purpose: "Decision making through live visuals"
425
- components:
426
- - option_selector
427
- - live_preview_iframe
428
- - side_by_side_comparison
429
- - existing_vs_upgraded_toggle
430
-
431
- stage3:
432
- name: "Final Review & Export"
433
- purpose: "Confidence before export"
434
- components:
435
- - token_preview_readonly
436
- - json_tree_view
437
- - diff_view
438
- - viewport_tabs
439
- - download_buttons
440
- - version_labeling
441
-
442
- preview:
443
- type: "iframe"
444
- template: "specimen.html"
445
- update_trigger: "on_selection"
446
-
447
- # =============================================================================
448
- # EXTRACTION SETTINGS
449
- # =============================================================================
450
- extraction:
451
- viewports:
452
- desktop:
453
- width: 1440
454
- height: 900
455
- name: "Desktop"
456
- mobile:
457
- width: 375
458
- height: 812
459
- name: "Mobile"
460
-
461
- crawling:
462
- max_pages: 20
463
- min_pages: 10
464
- scroll_behavior: "smooth"
465
- wait_for_network_idle: true
466
- network_idle_timeout_ms: 5000
467
- skip_infinite_scroll: true
468
- respect_robots_txt: true
469
-
470
- page_templates:
471
- required:
472
- - homepage
473
- - listing
474
- - detail
475
- optional:
476
- - form
477
- - marketing
478
- - auth
479
- - checkout
480
- - about
481
- - contact
482
-
483
- # =============================================================================
484
- # COLOR PROCESSING
485
- # =============================================================================
486
- color_processing:
487
- ramp_generation:
488
- enabled: true
489
- shades: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900]
490
- method: "oklch" # or "hsl" or "lab"
491
-
492
- accessibility:
493
- check_contrast: true
494
- minimum_standard: "AA" # or "AAA"
495
- contrast_pairs:
496
- - ["text", "background"]
497
- - ["button-text", "button-background"]
498
-
499
- duplicate_detection:
500
- enabled: true
501
- threshold_delta_e: 3 # CIE Delta E threshold
502
-
503
- # =============================================================================
504
- # TYPOGRAPHY PROCESSING
505
- # =============================================================================
506
- typography_processing:
507
- scale_options:
508
- - name: "Minor Third"
509
- ratio: 1.2
510
- - name: "Major Third"
511
- ratio: 1.25
512
- - name: "Perfect Fourth"
513
- ratio: 1.333
514
-
515
- base_size: 16 # px
516
-
517
- text_styles:
518
- - display
519
- - heading-xl
520
- - heading-lg
521
- - heading-md
522
- - heading-sm
523
- - body-lg
524
- - body-md
525
- - body-sm
526
- - caption
527
- - label
528
-
529
- # =============================================================================
530
- # SPACING PROCESSING
531
- # =============================================================================
532
- spacing_processing:
533
- base: 8 # px
534
- scale: [0, 4, 8, 12, 16, 24, 32, 48, 64, 80, 96]
535
-
536
- names:
537
- 0: "none"
538
- 4: "xs"
539
- 8: "sm"
540
- 12: "sm-md"
541
- 16: "md"
542
- 24: "lg"
543
- 32: "xl"
544
- 48: "2xl"
545
- 64: "3xl"
546
- 80: "4xl"
547
- 96: "5xl"