@champpaba/claude-agent-kit 3.5.2 → 3.6.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/CHANGELOG.md +0 -0
- package/.claude/CLAUDE.md +103 -45
- package/.claude/agents/01-integration.md +0 -0
- package/.claude/agents/02-uxui-frontend.md +1 -1
- package/.claude/agents/03-test-debug.md +0 -0
- package/.claude/agents/04-frontend.md +0 -0
- package/.claude/agents/05-backend.md +0 -0
- package/.claude/agents/06-database.md +0 -0
- package/.claude/agents/07-ux-tester.md +18 -12
- package/.claude/agents/CLAUDE.md +18 -0
- package/.claude/agents/_shared/CLAUDE.md +11 -0
- package/.claude/agents/_shared/README.md +0 -0
- package/.claude/agents/_shared/agent-boundaries.md +0 -0
- package/.claude/agents/_shared/documentation-policy.md +0 -0
- package/.claude/agents/_shared/package-manager.md +0 -0
- package/.claude/agents/_shared/pre-work-checklist.md +45 -2
- package/.claude/commands/CLAUDE.md +20 -0
- package/.claude/commands/cdev.md +2 -2
- package/.claude/commands/csetup.md +0 -0
- package/.claude/commands/cstatus.md +0 -0
- package/.claude/commands/cview.md +0 -0
- package/.claude/commands/designsetup.md +0 -0
- package/.claude/commands/extract.md +22 -20
- package/.claude/commands/pageplan.md +0 -0
- package/.claude/commands/pstatus.md +0 -0
- package/.claude/contexts/_core/CLAUDE.md +11 -0
- package/.claude/contexts/_core/README.md +33 -0
- package/.claude/contexts/{patterns → _core}/code-standards.md +0 -0
- package/.claude/contexts/{patterns → _core}/development-principles.md +0 -0
- package/.claude/contexts/design/CLAUDE.md +17 -0
- package/.claude/contexts/design/accessibility.md +2 -2
- package/.claude/contexts/design/box-thinking.md +0 -0
- package/.claude/contexts/design/color-theory.md +2 -2
- package/.claude/contexts/design/index.md +0 -0
- package/.claude/contexts/design/layout.md +0 -0
- package/.claude/contexts/design/responsive.md +0 -0
- package/.claude/contexts/design/shadows.md +0 -0
- package/.claude/contexts/design/spacing.md +0 -0
- package/.claude/contexts/design/typography.md +0 -0
- package/.claude/contexts/domain/README.md +0 -0
- package/.claude/contexts/patterns/CLAUDE.md +13 -0
- package/.claude/contexts/patterns/agent-coordination.md +0 -0
- package/.claude/contexts/patterns/agent-discovery.md +0 -0
- package/.claude/contexts/patterns/animation-patterns.md +0 -0
- package/.claude/contexts/patterns/change-workflow.md +1 -1
- package/.claude/contexts/patterns/error-handling.md +0 -0
- package/.claude/contexts/patterns/error-recovery.md +0 -0
- package/.claude/contexts/patterns/frontend-component-strategy.md +0 -0
- package/.claude/contexts/patterns/git-workflow.md +0 -0
- package/.claude/contexts/patterns/logging.md +0 -0
- package/.claude/contexts/patterns/performance-optimization.md +1 -1
- package/.claude/contexts/patterns/task-breakdown.md +0 -0
- package/.claude/contexts/patterns/task-classification.md +0 -0
- package/.claude/contexts/patterns/tdd-classification.md +0 -0
- package/.claude/contexts/patterns/testing.md +0 -0
- package/.claude/contexts/patterns/ui-component-consistency.md +0 -0
- package/.claude/contexts/patterns/validation-framework.md +0 -0
- package/.claude/lib/CLAUDE.md +19 -0
- package/.claude/lib/README.md +1 -1
- package/.claude/lib/agent-executor.md +1 -1
- package/.claude/lib/agent-router.md +0 -0
- package/.claude/lib/context-loading-protocol.md +0 -0
- package/.claude/lib/design-validator.md +8 -8
- package/.claude/lib/detailed-guides/agent-system.md +0 -0
- package/.claude/lib/detailed-guides/best-practices-system.md +0 -0
- package/.claude/lib/detailed-guides/context-optimization.md +0 -0
- package/.claude/lib/detailed-guides/design-system.md +0 -0
- package/.claude/lib/detailed-guides/incremental-testing.md +0 -0
- package/.claude/lib/detailed-guides/page-planning.md +0 -0
- package/.claude/lib/detailed-guides/taskmaster-analysis.md +0 -0
- package/.claude/lib/document-loader.md +0 -0
- package/.claude/lib/feature-best-practices.md +0 -0
- package/.claude/lib/flags-updater.md +0 -0
- package/.claude/lib/handoff-protocol.md +0 -0
- package/.claude/lib/task-analyzer.md +2 -2
- package/.claude/lib/tdd-workflow.md +0 -0
- package/.claude/lib/validation-gates.md +0 -0
- package/.claude/settings.local.json +0 -0
- package/.claude/templates/PROJECT_STATUS.template.yml +0 -0
- package/.claude/templates/STYLE_GUIDE.template.md +0 -0
- package/.claude/templates/context-template.md +0 -0
- package/.claude/templates/design-context-template.md +0 -0
- package/.claude/templates/flags-template.json +0 -0
- package/.claude/templates/page-plan-example.md +0 -0
- package/.claude/templates/phases-sections/CLAUDE.md +13 -0
- package/.claude/templates/phases-sections/accessibility-test.md +0 -0
- package/.claude/templates/phases-sections/api-design.md +0 -0
- package/.claude/templates/phases-sections/backend-tests.md +0 -0
- package/.claude/templates/phases-sections/backend.md +0 -0
- package/.claude/templates/phases-sections/business-logic-validation.md +0 -0
- package/.claude/templates/phases-sections/component-tests.md +0 -0
- package/.claude/templates/phases-sections/contract-backend.md +0 -0
- package/.claude/templates/phases-sections/contract-frontend.md +0 -0
- package/.claude/templates/phases-sections/database.md +0 -0
- package/.claude/templates/phases-sections/e2e-tests.md +0 -0
- package/.claude/templates/phases-sections/fix-implementation.md +0 -0
- package/.claude/templates/phases-sections/frontend-integration.md +0 -0
- package/.claude/templates/phases-sections/frontend-mockup.md +0 -0
- package/.claude/templates/phases-sections/manual-flow-test.md +0 -0
- package/.claude/templates/phases-sections/manual-ux-test.md +0 -0
- package/.claude/templates/phases-sections/refactor-implementation.md +0 -0
- package/.claude/templates/phases-sections/refactor.md +0 -0
- package/.claude/templates/phases-sections/regression-tests.md +0 -0
- package/.claude/templates/phases-sections/responsive-test.md +0 -0
- package/.claude/templates/phases-sections/script-implementation.md +0 -0
- package/.claude/templates/phases-sections/test-coverage.md +0 -0
- package/.claude/templates/phases-sections/user-approval.md +0 -0
- package/.claude/templates/phases-sections/ux-testing.md +2 -2
- package/LICENSE +0 -0
- package/README.md +0 -0
- package/bin/CLAUDE.md +11 -0
- package/bin/cli.js +0 -0
- package/lib/CLAUDE.md +11 -0
- package/lib/helpers.js +0 -0
- package/lib/init.js +0 -0
- package/lib/update.js +0 -0
- package/package.json +3 -2
- package/skills/design-extract/CLAUDE.md +12 -0
- package/skills/design-extract/SKILL.md +76 -0
- package/skills/design-extract/references/CLAUDE.md +16 -0
- package/skills/design-extract/references/error-handling.md +161 -0
- package/skills/design-extract/references/extraction-steps.md +183 -0
- package/skills/design-extract/references/output-format.md +250 -0
- package/skills/design-extract/references/style-detection.md +137 -0
- package/skills/design-extract/templates/CLAUDE.md +11 -0
- package/skills/design-extract/templates/data.yaml.template +95 -0
- package/skills/design-setup/CLAUDE.md +11 -0
- package/skills/design-setup/SKILL.md +104 -0
- package/skills/design-setup/references/CLAUDE.md +11 -0
- package/skills/design-setup/references/data-yaml-schema.md +205 -0
- package/skills/design-setup/references/error-handling.md +157 -0
- package/skills/design-setup/references/generation-steps.md +192 -0
- package/skills/design-setup/references/interactive-workflow.md +151 -0
- package/skills/page-planner/CLAUDE.md +11 -0
- package/skills/page-planner/SKILL.md +112 -0
- package/skills/page-planner/references/CLAUDE.md +11 -0
- package/skills/page-planner/references/animation-patterns.md +169 -0
- package/skills/page-planner/references/generation-steps.md +166 -0
- package/skills/page-planner/references/wireframe-patterns.md +182 -0
- package/skills/page-planner/templates/CLAUDE.md +11 -0
- package/skills/page-planner/templates/page-plan.md +303 -0
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
# Error Handling
|
|
2
|
+
|
|
3
|
+
How to handle failures during design extraction.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Critical Errors (Stop Execution)
|
|
8
|
+
|
|
9
|
+
### Navigation Failures
|
|
10
|
+
|
|
11
|
+
If browser navigation fails:
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
❌ Failed to load URL: {url}
|
|
15
|
+
|
|
16
|
+
Error: {error.message}
|
|
17
|
+
|
|
18
|
+
Check:
|
|
19
|
+
- Is the URL accessible?
|
|
20
|
+
- Is agent-browser installed? (npm install -g agent-browser && agent-browser install)
|
|
21
|
+
- Is the site blocking automated access?
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
**Action:** Stop execution. Cannot proceed without page loaded.
|
|
25
|
+
|
|
26
|
+
### Browser Not Available
|
|
27
|
+
|
|
28
|
+
If agent-browser is not available:
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
❌ Browser automation not available
|
|
32
|
+
|
|
33
|
+
Required: agent-browser CLI
|
|
34
|
+
|
|
35
|
+
Setup:
|
|
36
|
+
npm install -g agent-browser && agent-browser install
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
**Action:** Stop execution. Provide setup instructions.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Non-Critical Errors (Continue with Fallbacks)
|
|
44
|
+
|
|
45
|
+
### Extraction Failures
|
|
46
|
+
|
|
47
|
+
If individual extraction steps fail:
|
|
48
|
+
|
|
49
|
+
| Extraction | Fallback |
|
|
50
|
+
|------------|----------|
|
|
51
|
+
| Colors | `{ backgrounds: [], texts: [], borders: [] }` |
|
|
52
|
+
| Typography | `{ h1: [], fonts: [], weights: [], sizes: [] }` |
|
|
53
|
+
| Shadows | `{ shadows: [], borderRadii: [] }` |
|
|
54
|
+
| Spacing | `{ grid_base: 8, common_values: [] }` |
|
|
55
|
+
| Components | `[]` (empty array) |
|
|
56
|
+
| Animations | `{ keyframes: [], transitions: [] }` |
|
|
57
|
+
|
|
58
|
+
Log warning and continue:
|
|
59
|
+
```
|
|
60
|
+
⚠️ Color extraction failed: {error.message}
|
|
61
|
+
Using fallback empty data
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Screenshot Failures
|
|
65
|
+
|
|
66
|
+
| Scenario | Fallback |
|
|
67
|
+
|----------|----------|
|
|
68
|
+
| Full-page screenshot fails | Try viewport-only screenshot |
|
|
69
|
+
| Component screenshot fails | Skip component, continue with others |
|
|
70
|
+
| All screenshots fail | Continue without screenshots, note in report |
|
|
71
|
+
|
|
72
|
+
### CORS/Security Errors
|
|
73
|
+
|
|
74
|
+
Some sites block stylesheet access:
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
⚠️ Cannot access stylesheet: {url}
|
|
78
|
+
Reason: CORS policy
|
|
79
|
+
Skipping external stylesheet
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
**Action:** Continue with inline styles and accessible stylesheets.
|
|
83
|
+
|
|
84
|
+
### Element Not Found
|
|
85
|
+
|
|
86
|
+
If expected elements don't exist:
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
⚠️ No buttons found on page
|
|
90
|
+
Skipping button extraction
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
**Action:** Mark section as `detected: false` in output YAML.
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## Partial Success Handling
|
|
98
|
+
|
|
99
|
+
### Coverage Calculation
|
|
100
|
+
|
|
101
|
+
Track what was successfully extracted:
|
|
102
|
+
|
|
103
|
+
```yaml
|
|
104
|
+
coverage:
|
|
105
|
+
total_sections: 17
|
|
106
|
+
detected_sections: 12
|
|
107
|
+
percentage: 71
|
|
108
|
+
missing:
|
|
109
|
+
- icons_imagery
|
|
110
|
+
- navigation_patterns
|
|
111
|
+
- loading_states
|
|
112
|
+
- feedback_states
|
|
113
|
+
- accessibility
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### Final Report with Warnings
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
120
|
+
✅ EXTRACTION COMPLETE (with warnings)
|
|
121
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
122
|
+
|
|
123
|
+
📊 Coverage: 12/17 sections (71%)
|
|
124
|
+
|
|
125
|
+
⚠️ Warnings:
|
|
126
|
+
- Color extraction partial: CORS blocked 2 stylesheets
|
|
127
|
+
- Button hover states: 1 of 3 failed
|
|
128
|
+
- Full-page screenshot failed, using viewport
|
|
129
|
+
|
|
130
|
+
📁 Output:
|
|
131
|
+
✓ design-system/extracted/example/data.yaml
|
|
132
|
+
⚠️ design-system/extracted/example/screenshots/ (partial)
|
|
133
|
+
|
|
134
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## Retry Strategy
|
|
140
|
+
|
|
141
|
+
For transient failures (network timeouts):
|
|
142
|
+
|
|
143
|
+
1. **First attempt:** Normal extraction
|
|
144
|
+
2. **If timeout:** Wait 2 seconds, retry once
|
|
145
|
+
3. **If still fails:** Use fallback data, continue
|
|
146
|
+
|
|
147
|
+
Do NOT retry indefinitely. Accept partial data over blocking on single failure.
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## User Communication
|
|
152
|
+
|
|
153
|
+
Always inform user of issues:
|
|
154
|
+
|
|
155
|
+
| Severity | Format |
|
|
156
|
+
|----------|--------|
|
|
157
|
+
| Critical | ❌ Error message, stop |
|
|
158
|
+
| Warning | ⚠️ Warning, continue |
|
|
159
|
+
| Info | ℹ️ Note, continue |
|
|
160
|
+
|
|
161
|
+
Never silently fail. User should know what succeeded and what didn't.
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
# Extraction Steps
|
|
2
|
+
|
|
3
|
+
Complete step-by-step guide for extracting design data from a website.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## STEP 0: Parse Input & Setup
|
|
8
|
+
|
|
9
|
+
### 0.1: Validate and Normalize URL
|
|
10
|
+
|
|
11
|
+
1. Check if URL argument is provided
|
|
12
|
+
- If missing, return error: "URL required. Usage: /extract https://airbnb.com"
|
|
13
|
+
2. Trim whitespace from URL
|
|
14
|
+
3. Add "https://" prefix if URL doesn't start with "http://" or "https://"
|
|
15
|
+
4. Parse hostname and auto-detect site name:
|
|
16
|
+
- Remove "www." prefix if present
|
|
17
|
+
- Remove top-level domain (TLD) to get clean site name
|
|
18
|
+
- Example: "www.airbnb.com" → "airbnb"
|
|
19
|
+
|
|
20
|
+
### 0.2: Check for Existing Extraction
|
|
21
|
+
|
|
22
|
+
1. Build path: `design-system/extracted/{siteName}/data.yaml`
|
|
23
|
+
2. If file exists:
|
|
24
|
+
- Read existing YAML file
|
|
25
|
+
- Extract `meta.extracted_at` field
|
|
26
|
+
- Ask user: "Site '{siteName}' was already extracted on {extractedDate}. Re-extract?"
|
|
27
|
+
- If user chooses "No", exit with message: "Extraction cancelled. Existing data preserved."
|
|
28
|
+
|
|
29
|
+
### 0.3: Create Output Directories
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
mkdir -p design-system/extracted/{siteName}/screenshots
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## STEP 1: Navigate & Wait
|
|
38
|
+
|
|
39
|
+
### 1.1: Navigate to URL
|
|
40
|
+
|
|
41
|
+
Use agent-browser to navigate to the target URL:
|
|
42
|
+
```bash
|
|
43
|
+
agent-browser open {url}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### 1.2: Smart Wait for Page Load
|
|
47
|
+
|
|
48
|
+
1. Take DOM snapshot to analyze page structure
|
|
49
|
+
2. Find heading elements
|
|
50
|
+
3. If headings found:
|
|
51
|
+
- Wait for first heading text (timeout: 15000ms)
|
|
52
|
+
4. If no headings found:
|
|
53
|
+
- Fallback to sleep 5000ms
|
|
54
|
+
|
|
55
|
+
### 1.3: Verify Document Ready
|
|
56
|
+
|
|
57
|
+
1. Check document.readyState
|
|
58
|
+
2. If not "complete", sleep additional 3000ms
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## STEP 2: Extract CSS Data (8 Parallel Extractions)
|
|
63
|
+
|
|
64
|
+
Run all extractions in parallel for speed.
|
|
65
|
+
|
|
66
|
+
### 2.1: Extract Colors
|
|
67
|
+
|
|
68
|
+
Extract from all elements using `window.getComputedStyle()`:
|
|
69
|
+
- Background colors (skip transparent)
|
|
70
|
+
- Text colors
|
|
71
|
+
- Border colors
|
|
72
|
+
|
|
73
|
+
Convert RGB to HEX, detect usage context, count frequency.
|
|
74
|
+
|
|
75
|
+
Output: `colors.backgrounds`, `colors.texts`, `colors.borders`
|
|
76
|
+
|
|
77
|
+
### 2.2: Extract Typography
|
|
78
|
+
|
|
79
|
+
Extract heading styles (h1, h2, h3) and body text:
|
|
80
|
+
- fontSize, fontWeight, fontFamily
|
|
81
|
+
- lineHeight, letterSpacing
|
|
82
|
+
|
|
83
|
+
Collect unique fonts, weights, sizes.
|
|
84
|
+
|
|
85
|
+
### 2.3: Extract Shadows & Effects
|
|
86
|
+
|
|
87
|
+
- boxShadow values (skip "none")
|
|
88
|
+
- borderRadius values (skip "0px")
|
|
89
|
+
- borderWidth values
|
|
90
|
+
|
|
91
|
+
### 2.4: Extract Spacing
|
|
92
|
+
|
|
93
|
+
- Padding values
|
|
94
|
+
- Margin values (skip "auto")
|
|
95
|
+
- Gap values
|
|
96
|
+
|
|
97
|
+
Detect spacing grid pattern (usually 4px or 8px base).
|
|
98
|
+
|
|
99
|
+
### 2.5: Extract Buttons
|
|
100
|
+
|
|
101
|
+
Query: `button`, `a[role="button"]`, `.btn`, `[class*="button"]`
|
|
102
|
+
|
|
103
|
+
For each button:
|
|
104
|
+
- Add `data-extract-id` attribute
|
|
105
|
+
- Extract styles: backgroundColor, color, padding, borderRadius, transition
|
|
106
|
+
|
|
107
|
+
### 2.6: Extract Cards
|
|
108
|
+
|
|
109
|
+
Query: `[class*="card"]`, `article`, `section`
|
|
110
|
+
|
|
111
|
+
Extract: backgroundColor, padding, border, boxShadow, transition
|
|
112
|
+
|
|
113
|
+
### 2.7: Extract Input Fields
|
|
114
|
+
|
|
115
|
+
Query: `input[type="text"]`, `textarea`, etc.
|
|
116
|
+
|
|
117
|
+
Extract: height, padding, border, borderRadius, transition
|
|
118
|
+
|
|
119
|
+
### 2.8: Extract Animations
|
|
120
|
+
|
|
121
|
+
1. CSS @keyframes from stylesheets
|
|
122
|
+
2. Transition properties from elements
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## STEP 3: Extract Component Animations
|
|
127
|
+
|
|
128
|
+
For buttons, cards, and inputs:
|
|
129
|
+
|
|
130
|
+
1. Find element by data-extract-id
|
|
131
|
+
2. Scroll into view
|
|
132
|
+
3. Screenshot default state
|
|
133
|
+
4. Capture default computed styles
|
|
134
|
+
5. Trigger hover/focus event
|
|
135
|
+
6. Wait for transition (500ms)
|
|
136
|
+
7. Screenshot hover/focus state
|
|
137
|
+
8. Capture new computed styles
|
|
138
|
+
9. Remove hover/focus event
|
|
139
|
+
10. Compare and describe changes
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## STEP 4: Full-Page Screenshot
|
|
144
|
+
|
|
145
|
+
1. Try full-page screenshot first
|
|
146
|
+
2. If fails, fallback to viewport-only
|
|
147
|
+
3. Save to `screenshots/full-page.png` or `screenshots/viewport.png`
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## STEP 5: AI Psychology Analysis
|
|
152
|
+
|
|
153
|
+
Using the screenshot and extracted data, analyze:
|
|
154
|
+
|
|
155
|
+
1. **style_classification**: Neo-Brutalism, Minimalist, Glassmorphism, etc.
|
|
156
|
+
2. **emotions_evoked**: What feelings the design triggers
|
|
157
|
+
3. **target_audience**: Who this design appeals to
|
|
158
|
+
4. **visual_principles**: Key design patterns observed
|
|
159
|
+
5. **why_it_works**: Strategic design decisions
|
|
160
|
+
6. **design_philosophy**: Underlying beliefs
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
## STEP 6: Generate data.yaml
|
|
165
|
+
|
|
166
|
+
1. Calculate coverage metrics (X/17 sections)
|
|
167
|
+
2. Build YAML with all extracted data
|
|
168
|
+
3. Include psychology analysis
|
|
169
|
+
4. Write to `design-system/extracted/{siteName}/data.yaml`
|
|
170
|
+
|
|
171
|
+
→ See [output-format.md](output-format.md) for complete schema
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
## STEP 7: Final Report
|
|
176
|
+
|
|
177
|
+
Display extraction summary:
|
|
178
|
+
- Coverage percentage
|
|
179
|
+
- Design tokens extracted
|
|
180
|
+
- Psychology analysis status
|
|
181
|
+
- Screenshot count
|
|
182
|
+
- Output file paths
|
|
183
|
+
- Next steps
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
# Output Format: data.yaml
|
|
2
|
+
|
|
3
|
+
Complete schema for the extracted design data file.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## File Location
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
design-system/extracted/{site-name}/data.yaml
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Complete Schema
|
|
16
|
+
|
|
17
|
+
```yaml
|
|
18
|
+
# Design Extraction: {siteName}
|
|
19
|
+
# Extracted: {ISO timestamp}
|
|
20
|
+
# URL: {url}
|
|
21
|
+
|
|
22
|
+
meta:
|
|
23
|
+
site_name: "airbnb"
|
|
24
|
+
url: "https://airbnb.com"
|
|
25
|
+
extracted_at: "2026-02-03T15:30:00Z"
|
|
26
|
+
extractor_version: "2.1.0"
|
|
27
|
+
coverage:
|
|
28
|
+
total_sections: 17
|
|
29
|
+
detected_sections: 15
|
|
30
|
+
percentage: 88
|
|
31
|
+
|
|
32
|
+
psychology:
|
|
33
|
+
style_classification: "Modern SaaS"
|
|
34
|
+
|
|
35
|
+
emotions_evoked:
|
|
36
|
+
- emotion: "Trust"
|
|
37
|
+
reason: "Clean typography and ample whitespace"
|
|
38
|
+
- emotion: "Excitement"
|
|
39
|
+
reason: "Vibrant accent colors on CTAs"
|
|
40
|
+
|
|
41
|
+
target_audience:
|
|
42
|
+
primary:
|
|
43
|
+
description: "Young professionals"
|
|
44
|
+
age_range: "25-40"
|
|
45
|
+
tech_savvy: "high"
|
|
46
|
+
secondary:
|
|
47
|
+
description: "Families"
|
|
48
|
+
age_range: "30-50"
|
|
49
|
+
|
|
50
|
+
visual_principles:
|
|
51
|
+
- name: "Hierarchy"
|
|
52
|
+
description: "Clear visual hierarchy through size and weight"
|
|
53
|
+
- name: "Whitespace"
|
|
54
|
+
description: "Generous padding creates breathing room"
|
|
55
|
+
|
|
56
|
+
why_it_works:
|
|
57
|
+
- "Large hero images create emotional connection"
|
|
58
|
+
- "Simple navigation reduces cognitive load"
|
|
59
|
+
|
|
60
|
+
design_philosophy:
|
|
61
|
+
core_belief: "Design should feel human and approachable"
|
|
62
|
+
key_principles:
|
|
63
|
+
- "Simplicity over complexity"
|
|
64
|
+
- "Content-first approach"
|
|
65
|
+
|
|
66
|
+
sections:
|
|
67
|
+
overview:
|
|
68
|
+
detected: true
|
|
69
|
+
style: "Modern SaaS"
|
|
70
|
+
tech_stack: "Framework-agnostic"
|
|
71
|
+
|
|
72
|
+
color_palette:
|
|
73
|
+
detected: true
|
|
74
|
+
primary:
|
|
75
|
+
- hex: "#FF5A5F"
|
|
76
|
+
rgb: "rgb(255, 90, 95)"
|
|
77
|
+
usage: "brand-primary"
|
|
78
|
+
count: 23
|
|
79
|
+
- hex: "#00A699"
|
|
80
|
+
rgb: "rgb(0, 166, 153)"
|
|
81
|
+
usage: "brand-secondary"
|
|
82
|
+
count: 12
|
|
83
|
+
text_colors:
|
|
84
|
+
- hex: "#484848"
|
|
85
|
+
usage: "body-text"
|
|
86
|
+
count: 156
|
|
87
|
+
- hex: "#767676"
|
|
88
|
+
usage: "muted-text"
|
|
89
|
+
count: 89
|
|
90
|
+
border_colors:
|
|
91
|
+
- hex: "#EBEBEB"
|
|
92
|
+
usage: "divider"
|
|
93
|
+
count: 45
|
|
94
|
+
|
|
95
|
+
typography:
|
|
96
|
+
detected: true
|
|
97
|
+
fonts:
|
|
98
|
+
- "Circular"
|
|
99
|
+
- "Cereal"
|
|
100
|
+
- "-apple-system"
|
|
101
|
+
weights: ["400", "500", "600", "700", "800"]
|
|
102
|
+
sizes: ["12px", "14px", "16px", "18px", "22px", "26px", "32px"]
|
|
103
|
+
h1:
|
|
104
|
+
- text: "Find places to stay"
|
|
105
|
+
fontSize: "32px"
|
|
106
|
+
fontWeight: "800"
|
|
107
|
+
fontFamily: "Circular, sans-serif"
|
|
108
|
+
h2:
|
|
109
|
+
- fontSize: "22px"
|
|
110
|
+
fontWeight: "600"
|
|
111
|
+
body:
|
|
112
|
+
- fontSize: "16px"
|
|
113
|
+
fontWeight: "400"
|
|
114
|
+
lineHeight: "1.5"
|
|
115
|
+
|
|
116
|
+
spacing_system:
|
|
117
|
+
detected: true
|
|
118
|
+
grid_base: 8
|
|
119
|
+
common_values: [8, 16, 24, 32, 48, 64]
|
|
120
|
+
paddings: ["8px", "16px", "24px", "32px", "48px"]
|
|
121
|
+
margins: ["8px", "16px", "24px", "32px"]
|
|
122
|
+
gaps: ["8px", "16px", "24px"]
|
|
123
|
+
|
|
124
|
+
component_styles:
|
|
125
|
+
detected: true
|
|
126
|
+
buttons:
|
|
127
|
+
- id: "button-0"
|
|
128
|
+
text: "Search"
|
|
129
|
+
backgroundColor: "rgb(255, 90, 95)"
|
|
130
|
+
color: "rgb(255, 255, 255)"
|
|
131
|
+
padding: "14px 24px"
|
|
132
|
+
borderRadius: "8px"
|
|
133
|
+
fontSize: "16px"
|
|
134
|
+
fontWeight: "600"
|
|
135
|
+
transition: "all 0.2s ease"
|
|
136
|
+
hover_animation: "Background darkens + Shadow appears"
|
|
137
|
+
cards:
|
|
138
|
+
- id: "card-0"
|
|
139
|
+
backgroundColor: "rgb(255, 255, 255)"
|
|
140
|
+
padding: "16px"
|
|
141
|
+
borderRadius: "12px"
|
|
142
|
+
boxShadow: "0 2px 8px rgba(0, 0, 0, 0.1)"
|
|
143
|
+
transition: "all 0.3s ease"
|
|
144
|
+
hover_animation: "Shadow increases + Slight lift"
|
|
145
|
+
inputs:
|
|
146
|
+
- id: "input-0"
|
|
147
|
+
type: "text"
|
|
148
|
+
height: "48px"
|
|
149
|
+
padding: "0 16px"
|
|
150
|
+
borderRadius: "8px"
|
|
151
|
+
border: "1px solid #EBEBEB"
|
|
152
|
+
fontSize: "16px"
|
|
153
|
+
transition: "border-color 0.2s ease"
|
|
154
|
+
focus_animation: "Border color changes to primary"
|
|
155
|
+
|
|
156
|
+
shadows_elevation:
|
|
157
|
+
detected: true
|
|
158
|
+
values:
|
|
159
|
+
- "0 1px 2px rgba(0, 0, 0, 0.08)"
|
|
160
|
+
- "0 2px 8px rgba(0, 0, 0, 0.1)"
|
|
161
|
+
- "0 4px 16px rgba(0, 0, 0, 0.12)"
|
|
162
|
+
- "0 8px 28px rgba(0, 0, 0, 0.15)"
|
|
163
|
+
|
|
164
|
+
animations_transitions:
|
|
165
|
+
detected: true
|
|
166
|
+
keyframes:
|
|
167
|
+
- name: "fadeIn"
|
|
168
|
+
css: "@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }"
|
|
169
|
+
transitions:
|
|
170
|
+
- duration: "0.2s"
|
|
171
|
+
timing: "ease"
|
|
172
|
+
property: "all"
|
|
173
|
+
- duration: "0.3s"
|
|
174
|
+
timing: "ease-out"
|
|
175
|
+
property: "transform"
|
|
176
|
+
|
|
177
|
+
border_radius:
|
|
178
|
+
detected: true
|
|
179
|
+
values: ["4px", "8px", "12px", "16px", "24px", "50%"]
|
|
180
|
+
|
|
181
|
+
border_styles:
|
|
182
|
+
detected: true
|
|
183
|
+
widths: ["1px", "2px"]
|
|
184
|
+
colors: ["#EBEBEB", "#DDDDDD"]
|
|
185
|
+
|
|
186
|
+
layout_patterns:
|
|
187
|
+
detected: true
|
|
188
|
+
container_width: "1280px"
|
|
189
|
+
grid_columns: 12
|
|
190
|
+
breakpoints:
|
|
191
|
+
- name: "mobile"
|
|
192
|
+
max_width: "744px"
|
|
193
|
+
- name: "tablet"
|
|
194
|
+
max_width: "1128px"
|
|
195
|
+
- name: "desktop"
|
|
196
|
+
min_width: "1128px"
|
|
197
|
+
|
|
198
|
+
# Detailed animation states
|
|
199
|
+
animations:
|
|
200
|
+
button-0:
|
|
201
|
+
type: "button"
|
|
202
|
+
description: "Background darkens + Shadow appears"
|
|
203
|
+
transition: "all 0.2s ease"
|
|
204
|
+
states:
|
|
205
|
+
default:
|
|
206
|
+
background: "rgb(255, 90, 95)"
|
|
207
|
+
boxShadow: "none"
|
|
208
|
+
transform: "none"
|
|
209
|
+
hover:
|
|
210
|
+
background: "rgb(230, 80, 85)"
|
|
211
|
+
boxShadow: "0 2px 8px rgba(255, 90, 95, 0.3)"
|
|
212
|
+
transform: "none"
|
|
213
|
+
card-0:
|
|
214
|
+
type: "card"
|
|
215
|
+
description: "Shadow increases + Slight lift"
|
|
216
|
+
transition: "all 0.3s ease"
|
|
217
|
+
states:
|
|
218
|
+
default:
|
|
219
|
+
boxShadow: "0 2px 8px rgba(0, 0, 0, 0.1)"
|
|
220
|
+
transform: "translateY(0)"
|
|
221
|
+
hover:
|
|
222
|
+
boxShadow: "0 4px 16px rgba(0, 0, 0, 0.15)"
|
|
223
|
+
transform: "translateY(-2px)"
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
---
|
|
227
|
+
|
|
228
|
+
## 17 Standard Sections
|
|
229
|
+
|
|
230
|
+
| # | Section | Description |
|
|
231
|
+
|---|---------|-------------|
|
|
232
|
+
| 1 | overview | Style classification, tech stack |
|
|
233
|
+
| 2 | color_palette | Primary, text, border colors |
|
|
234
|
+
| 3 | typography | Fonts, weights, sizes |
|
|
235
|
+
| 4 | spacing_system | Grid base, common values |
|
|
236
|
+
| 5 | component_styles | Buttons, cards, inputs |
|
|
237
|
+
| 6 | shadows_elevation | Box shadow values |
|
|
238
|
+
| 7 | animations_transitions | Keyframes, transitions |
|
|
239
|
+
| 8 | border_radius | Radius values |
|
|
240
|
+
| 9 | border_styles | Widths, colors |
|
|
241
|
+
| 10 | layout_patterns | Container, grid, breakpoints |
|
|
242
|
+
| 11 | icons_imagery | Icon style (if detected) |
|
|
243
|
+
| 12 | navigation_patterns | Nav structure (if detected) |
|
|
244
|
+
| 13 | form_patterns | Form layouts (if detected) |
|
|
245
|
+
| 14 | feedback_states | Error, success states |
|
|
246
|
+
| 15 | loading_states | Spinners, skeletons |
|
|
247
|
+
| 16 | motion_design | Complex animations |
|
|
248
|
+
| 17 | accessibility | Focus states, contrast |
|
|
249
|
+
|
|
250
|
+
Coverage percentage = detected / 17 * 100
|