riazmo commited on
Commit
b143d69
Β·
verified Β·
1 Parent(s): d2d4fa3

Upload CONTEXT.md

Browse files
Files changed (1) hide show
  1. docs/CONTEXT.md +420 -0
docs/CONTEXT.md ADDED
@@ -0,0 +1,420 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Design System Extractor v2 β€” Master Context File
2
+
3
+ > **Upload this file to refresh Claude's context when continuing work on this project.**
4
+
5
+ ---
6
+
7
+ ## 🎯 Project Goal
8
+
9
+ Build a **semi-automated, human-in-the-loop agentic system** that:
10
+ 1. Reverse-engineers a design system from a live website
11
+ 2. Reconstructs and upgrades it into a modern, scalable design system
12
+ 3. Outputs production-ready JSON tokens
13
+
14
+ **Philosophy:** This is a design-aware co-pilot, NOT a magic button. Humans decide, agents propose.
15
+
16
+ ---
17
+
18
+ ## πŸ—οΈ Architecture Overview
19
+
20
+ ```
21
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
22
+ β”‚ TECH STACK β”‚
23
+ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
24
+ β”‚ Frontend: Gradio (long-scroll, sectioned UI with live preview) β”‚
25
+ β”‚ Orchestration: LangGraph (agent state management & workflow) β”‚
26
+ β”‚ Models: HuggingFace Inference API (see model assignments below) β”‚
27
+ β”‚ Hosting: Hugging Face Spaces β”‚
28
+ β”‚ Storage: HF Spaces persistent storage β”‚
29
+ β”‚ Output: Platform-agnostic JSON tokens β”‚
30
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
31
+ ```
32
+
33
+ ---
34
+
35
+ ## 🧠 Model Assignments
36
+
37
+ ### Stage 2: Multi-Agent Analysis (NEW!)
38
+
39
+ | Agent | Role | Model | Provider | Cost |
40
+ |-------|------|-------|----------|------|
41
+ | **LLM 1** | Design Analyst 1 | `Qwen/Qwen2.5-72B-Instruct` | Novita | $0.29/M in, $0.59/M out |
42
+ | **LLM 2** | Design Analyst 2 | `meta-llama/Llama-3.3-70B-Instruct` | Novita | $0.59/M in, $0.79/M out |
43
+ | **HEAD** | Compiler | `meta-llama/Llama-3.3-70B-Instruct` | Novita | $0.59/M in, $0.79/M out |
44
+ | **Rules** | Calculations | None (Rule-based) | β€” | FREE |
45
+
46
+ **Architecture:**
47
+ ```
48
+ LLM 1 (Qwen) ─┐
49
+ β”œβ”€β”€> HEAD (Llama) ──> Final Recommendations
50
+ LLM 2 (Llama) β”€β”˜
51
+ Rules β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
52
+ ```
53
+
54
+ LLM 1 and LLM 2 run in **PARALLEL** via LangGraph, then HEAD compiles results.
55
+
56
+ ### Other Agents
57
+
58
+ | Agent | Role | Model | Provider | Why |
59
+ |-------|------|-------|----------|-----|
60
+ | **Agent 1** | Crawler & Extractor | None (Rule-based) | β€” | Pure CSS extraction, no LLM needed |
61
+ | **Agent 2** | Normalizer | `microsoft/Phi-3.5-mini-instruct` | Novita | Fast, great structured output |
62
+ | **Agent 4** | Generator | `mistralai/Codestral-22B-v0.1` | Novita | Code specialist, JSON formatting |
63
+
64
+ ### Provider Configuration
65
+
66
+ Default provider: **Novita** (configurable in `config/agents.yaml`)
67
+
68
+ Available providers (via HuggingFace Inference Providers):
69
+ - **novita** - Default, good balance
70
+ - **groq** - Fastest
71
+ - **cerebras** - Ultra-fast
72
+ - **sambanova** - Good for Llama
73
+ - **together** - Wide model selection
74
+
75
+ ### Cost Tracking
76
+
77
+ Estimated cost per Stage 2 analysis: **~$0.05**
78
+ - Free tier: $0.10/month
79
+ - Pro tier: $2.00/month ($9/mo subscription)
80
+
81
+ ---
82
+
83
+ ## πŸ€– Agent Personas
84
+
85
+ ### Agent 1: Website Crawler & Extractor
86
+ - **Persona:** Meticulous Design Archaeologist
87
+ - **Tool:** Playwright
88
+ - **Job:**
89
+ - Auto-discover 10+ pages from base URL
90
+ - Crawl Desktop (1440px) + Mobile (375px) separately
91
+ - Scroll to bottom + wait for network idle
92
+ - Extract: colors, typography, spacing, radius, shadows
93
+ - **Output:** Raw tokens with frequency, context, confidence
94
+
95
+ ### Agent 2: Token Normalizer & Structurer
96
+ - **Persona:** Design System Librarian
97
+ - **Job:**
98
+ - Clean noisy extraction, dedupe
99
+ - Infer naming patterns
100
+ - Tag tokens as: `detected` | `inferred` | `low-confidence`
101
+ - **Output:** Structured token sets with metadata
102
+
103
+ ### Agent 3: Design System Best Practices Advisor
104
+ - **Persona:** Senior Staff Design Systems Architect
105
+ - **Job:**
106
+ - Research modern DS patterns (Material, Polaris, Carbon, etc.)
107
+ - Propose upgrade OPTIONS (not decisions)
108
+ - Suggest: type scales (3 options), spacing (8px), color ramps (AA compliant), naming conventions
109
+ - **Output:** Option sets with rationale
110
+
111
+ ### Agent 4: Plugin & JSON Generator
112
+ - **Persona:** Automation Engineer
113
+ - **Job:**
114
+ - Convert finalized tokens to Figma-compatible JSON
115
+ - Generate: typography, color (with tints/shades), spacing variables
116
+ - Maintain Desktop + Mobile + version metadata
117
+ - **Output:** Production-ready JSON
118
+
119
+ ---
120
+
121
+ ## πŸ–₯️ UI Stages (3 Stages)
122
+
123
+ ### Stage 1: Extraction Review
124
+ - **Purpose:** Trust building
125
+ - **Shows:** Token tables, color swatches, font previews, confidence indicators
126
+ - **Human Actions:** Accept/reject tokens, flag anomalies, toggle Desktop↔Mobile
127
+
128
+ ### Stage 2: Upgrade Playground (MOST IMPORTANT)
129
+ - **Purpose:** Decision-making through live visuals
130
+ - **Shows:** Side-by-side option selector + live preview
131
+ - **Human Actions:** Select type scale A/B/C, spacing system, color ramps β€” preview updates instantly
132
+
133
+ ### Stage 3: Final Review & Export
134
+ - **Purpose:** Confidence before export
135
+ - **Shows:** Token preview, JSON tree, diff view (original vs final)
136
+ - **Human Actions:** Download JSON, save version, label version
137
+
138
+ ---
139
+
140
+ ## πŸ“ Project Structure
141
+
142
+ ```
143
+ design-system-extractor/
144
+ β”œβ”€β”€ app.py # Gradio main entry point
145
+ β”œβ”€β”€ requirements.txt
146
+ β”œβ”€β”€ README.md
147
+ β”‚
148
+ β”œβ”€β”€ config/
149
+ β”‚ β”œβ”€β”€ .env.example # Environment variables template
150
+ β”‚ β”œβ”€β”€ agents.yaml # Agent personas & configurations
151
+ β”‚ └── settings.py # Application settings
152
+ β”‚
153
+ β”œβ”€β”€ agents/
154
+ β”‚ β”œβ”€β”€ __init__.py
155
+ β”‚ β”œβ”€β”€ state.py # LangGraph state definitions
156
+ β”‚ β”œβ”€β”€ graph.py # LangGraph workflow orchestration
157
+ β”‚ β”œβ”€β”€ crawler.py # Agent 1: Website crawler
158
+ β”‚ β”œβ”€β”€ extractor.py # Agent 1: Token extraction
159
+ β”‚ β”œβ”€β”€ normalizer.py # Agent 2: Token normalization
160
+ β”‚ β”œβ”€β”€ advisor.py # Agent 3: Best practices
161
+ β”‚ └── generator.py # Agent 4: JSON generator
162
+ β”‚
163
+ β”œβ”€β”€ core/
164
+ β”‚ β”œβ”€β”€ __init__.py
165
+ β”‚ β”œβ”€β”€ browser.py # Playwright browser management
166
+ β”‚ β”œβ”€β”€ css_parser.py # CSS/computed style extraction
167
+ β”‚ β”œβ”€β”€ color_utils.py # Color analysis, contrast, ramps
168
+ β”‚ β”œβ”€β”€ typography_utils.py # Type scale detection & generation
169
+ β”‚ β”œβ”€β”€ spacing_utils.py # Spacing pattern detection
170
+ β”‚ └── token_schema.py # Token data structures (Pydantic)
171
+ β”‚
172
+ β”œβ”€β”€ ui/
173
+ β”‚ β”œβ”€β”€ __init__.py
174
+ β”‚ β”œβ”€β”€ components.py # Reusable Gradio components
175
+ β”‚ β”œβ”€β”€ stage1_extraction.py # Stage 1 UI
176
+ β”‚ β”œβ”€β”€ stage2_upgrade.py # Stage 2 UI
177
+ β”‚ β”œβ”€β”€ stage3_export.py # Stage 3 UI
178
+ β”‚ └── preview_generator.py # HTML preview generation
179
+ β”‚
180
+ β”œβ”€β”€ templates/
181
+ β”‚ β”œβ”€β”€ preview.html # Live preview base template
182
+ β”‚ └── specimen.html # Design system specimen template
183
+ β”‚
184
+ β”œβ”€β”€ storage/
185
+ β”‚ └── persistence.py # HF Spaces storage management
186
+ β”‚
187
+ β”œβ”€β”€ tests/
188
+ β”‚ β”œβ”€β”€ test_crawler.py
189
+ β”‚ β”œβ”€β”€ test_extractor.py
190
+ β”‚ └── test_normalizer.py
191
+ β”‚
192
+ └── docs/
193
+ β”œβ”€β”€ CONTEXT.md # THIS FILE - upload for context refresh
194
+ └── API.md # API documentation
195
+ ```
196
+
197
+ ---
198
+
199
+ ## πŸ”§ Key Technical Decisions
200
+
201
+ | Decision | Choice | Rationale |
202
+ |----------|--------|-----------|
203
+ | Viewports | Fixed 1440px + 375px | Simplicity, covers main use cases |
204
+ | Scrolling | Bottom + network idle | Captures lazy-loaded content |
205
+ | Infinite scroll | Skip | Avoid complexity |
206
+ | Modals | Manual trigger | User decides what to capture |
207
+ | Color ramps | 5-10 shades, AA compliant | Industry standard |
208
+ | Type scales | 3 options (1.25, 1.333, 1.414) | User selects |
209
+ | Spacing | 8px base system | Modern standard |
210
+ | ML models | Minimal, rule-based preferred | Simplicity, reliability |
211
+ | Versioning | HF Spaces persistent storage | Built-in, free |
212
+ | Preview | Gradio + iframe (best for dynamic) | Smooth updates |
213
+
214
+ ---
215
+
216
+ ## πŸ“Š Token Schema (Core Data Structures)
217
+
218
+ ```python
219
+ class TokenSource(Enum):
220
+ DETECTED = "detected" # Directly found in CSS
221
+ INFERRED = "inferred" # Derived from patterns
222
+ UPGRADED = "upgraded" # User-selected improvement
223
+
224
+ class Confidence(Enum):
225
+ HIGH = "high" # 10+ occurrences
226
+ MEDIUM = "medium" # 3-9 occurrences
227
+ LOW = "low" # 1-2 occurrences
228
+
229
+ class Viewport(Enum):
230
+ DESKTOP = "desktop" # 1440px
231
+ MOBILE = "mobile" # 375px
232
+ ```
233
+
234
+ ### Token Types:
235
+ - **ColorToken:** value, frequency, contexts, elements, contrast ratios
236
+ - **TypographyToken:** family, size, weight, line-height, elements
237
+ - **SpacingToken:** value, frequency, contexts, fits_base_8
238
+ - **RadiusToken:** value, frequency, elements
239
+ - **ShadowToken:** value, frequency, elements
240
+
241
+ ---
242
+
243
+ ## πŸ”„ LangGraph Workflow
244
+
245
+ ```
246
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
247
+ β”‚ START β”‚
248
+ β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
249
+ β”‚
250
+ β–Ό
251
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
252
+ β”‚ URL Input β”‚
253
+ β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
254
+ β”‚
255
+ β–Ό
256
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
257
+ β”‚ Agent 1: Discover β”‚
258
+ β”‚ (find pages) β”‚
259
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
260
+ β”‚
261
+ β–Ό
262
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
263
+ β”‚ HUMAN: Confirm pages │◄─── Checkpoint 1
264
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
265
+ β”‚
266
+ β–Ό
267
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
268
+ β”‚ Agent 1: Extract β”‚
269
+ β”‚ (crawl & extract) β”‚
270
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
271
+ β”‚
272
+ β–Ό
273
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
274
+ β”‚ Agent 2: Normalize β”‚
275
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
276
+ β”‚
277
+ β–Ό
278
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
279
+ β”‚ HUMAN: Review tokens │◄─── Checkpoint 2 (Stage 1 UI)
280
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
281
+ β”‚
282
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
283
+ β”‚ β”‚
284
+ β–Ό β–Ό
285
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
286
+ β”‚ Agent 3: Advise β”‚ β”‚ (parallel) β”‚
287
+ β”‚ (best practices) β”‚ β”‚ β”‚
288
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
289
+ β”‚
290
+ β–Ό
291
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
292
+ β”‚ HUMAN: Select options │◄─── Checkpoint 3 (Stage 2 UI)
293
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
294
+ β”‚
295
+ β–Ό
296
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
297
+ β”‚ Agent 4: Generate β”‚
298
+ β”‚ (final JSON) β”‚
299
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
300
+ β”‚
301
+ β–Ό
302
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
303
+ β”‚ HUMAN: Export │◄─── Checkpoint 4 (Stage 3 UI)
304
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
305
+ β”‚
306
+ β–Ό
307
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”
308
+ β”‚ END β”‚
309
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
310
+ ```
311
+
312
+ ---
313
+
314
+ ## 🚦 Human-in-the-Loop Rules
315
+
316
+ 1. **No irreversible automation**
317
+ 2. **Agents propose β†’ Humans decide**
318
+ 3. **Every auto action must be:**
319
+ - Visible
320
+ - Reversible
321
+ - Previewed
322
+
323
+ ---
324
+
325
+ ## πŸ“¦ Output JSON Format
326
+
327
+ ```json
328
+ {
329
+ "metadata": {
330
+ "source_url": "https://example.com",
331
+ "extracted_at": "2025-01-23T10:00:00Z",
332
+ "version": "v1-recovered",
333
+ "viewport": "desktop"
334
+ },
335
+ "colors": {
336
+ "primary": {
337
+ "50": { "value": "#e6f2ff", "source": "upgraded" },
338
+ "500": { "value": "#007bff", "source": "detected" },
339
+ "900": { "value": "#001a33", "source": "upgraded" }
340
+ }
341
+ },
342
+ "typography": {
343
+ "heading-xl": {
344
+ "fontFamily": "Inter",
345
+ "fontSize": "32px",
346
+ "fontWeight": 700,
347
+ "lineHeight": "1.2",
348
+ "source": "detected"
349
+ }
350
+ },
351
+ "spacing": {
352
+ "xs": { "value": "4px", "source": "upgraded" },
353
+ "sm": { "value": "8px", "source": "detected" },
354
+ "md": { "value": "16px", "source": "detected" }
355
+ }
356
+ }
357
+ ```
358
+
359
+ ---
360
+
361
+ ## πŸ› οΈ Implementation Phases
362
+
363
+ ### Phase 1 (Current)
364
+ - [x] Project structure
365
+ - [x] Configuration files
366
+ - [ ] Token schema (Pydantic models)
367
+ - [ ] Agent 1: Crawler
368
+ - [ ] Agent 1: Extractor
369
+ - [ ] Agent 2: Normalizer
370
+ - [ ] Stage 1 UI
371
+ - [ ] LangGraph basic workflow
372
+
373
+ ### Phase 2
374
+ - [ ] Agent 3: Advisor
375
+ - [ ] Stage 2 UI (Upgrade Playground)
376
+ - [ ] Live preview system
377
+
378
+ ### Phase 3
379
+ - [ ] Agent 4: Generator
380
+ - [ ] Stage 3 UI
381
+ - [ ] Export functionality
382
+
383
+ ### Phase 4
384
+ - [ ] Full LangGraph orchestration
385
+ - [ ] HF Spaces deployment
386
+ - [ ] Persistent storage
387
+
388
+ ---
389
+
390
+ ## πŸ”‘ Environment Variables
391
+
392
+ ```env
393
+ # Required
394
+ HF_TOKEN=your_huggingface_token
395
+
396
+ # Model Configuration (defaults shown β€” diverse providers)
397
+ AGENT2_MODEL=microsoft/Phi-3.5-mini-instruct # Microsoft - Fast naming
398
+ AGENT3_MODEL=meta-llama/Llama-3.1-70B-Instruct # Meta - Strong reasoning
399
+ AGENT4_MODEL=mistralai/Codestral-22B-v0.1 # Mistral - Code/JSON
400
+
401
+ # Optional
402
+ DEBUG=true
403
+ LOG_LEVEL=INFO
404
+ ```
405
+
406
+ ---
407
+
408
+ ## πŸ“ Notes for Claude
409
+
410
+ When continuing this project:
411
+ 1. **Check current phase** in Implementation Phases section
412
+ 2. **Review agent personas** in agents.yaml for consistent behavior
413
+ 3. **Follow token schema** defined in core/token_schema.py
414
+ 4. **Maintain LangGraph state** consistency across agents
415
+ 5. **Use Gradio components** from ui/components.py for consistency
416
+ 6. **Test with** real websites before deployment
417
+
418
+ ---
419
+
420
+ *Last updated: 2025-01-23*