|
| 1 | +# Reference Library for Open CoDesign |
| 2 | + |
| 3 | +This directory contains high-quality design examples used for few-shot learning. |
| 4 | + |
| 5 | +## Purpose |
| 6 | + |
| 7 | +The reference library helps Open CoDesign generate better designs by: |
| 8 | +- Providing real examples of high-quality work |
| 9 | +- Showing best practices in action |
| 10 | +- Demonstrating design decisions and rationale |
| 11 | +- Serving as templates for similar requests |
| 12 | + |
| 13 | +## Structure |
| 14 | + |
| 15 | +``` |
| 16 | +references/ |
| 17 | +├── README.md (this file) |
| 18 | +├── high-quality-designs/ |
| 19 | +│ ├── landing-pages/ (5 examples minimum) |
| 20 | +│ ├── dashboards/ (5 examples minimum) |
| 21 | +│ ├── mobile-apps/ (5 examples minimum) |
| 22 | +│ ├── presentations/ (5 examples minimum) |
| 23 | +│ ├── ecommerce/ (5 examples minimum) |
| 24 | +│ └── components/ (5 examples minimum) |
| 25 | +└── anti-patterns/ |
| 26 | + ├── common-mistakes.md |
| 27 | + ├── ai-tells.md |
| 28 | + └── examples/ |
| 29 | +``` |
| 30 | + |
| 31 | +## Example Template |
| 32 | + |
| 33 | +Each example should include: |
| 34 | + |
| 35 | +``` |
| 36 | +category-name/example-name/ |
| 37 | +├── prompt.md # Original user prompt |
| 38 | +├── output.html # Generated HTML |
| 39 | +├── design-decisions.md # Why choices were made |
| 40 | +├── metrics.json # Quality scores |
| 41 | +└── screenshot.png # Visual preview (optional) |
| 42 | +``` |
| 43 | + |
| 44 | +### prompt.md Format |
| 45 | + |
| 46 | +```markdown |
| 47 | +# [Design Name] |
| 48 | + |
| 49 | +## Original Prompt |
| 50 | +[Exact prompt used to generate this] |
| 51 | + |
| 52 | +## Context |
| 53 | +- Use case: [what it's for] |
| 54 | +- Target audience: [who uses it] |
| 55 | +- Key requirements: [must-haves] |
| 56 | +- Constraints: [limitations] |
| 57 | + |
| 58 | +## Design Goals |
| 59 | +1. [Primary goal] |
| 60 | +2. [Secondary goal] |
| 61 | +3. [Tertiary goal] |
| 62 | +``` |
| 63 | + |
| 64 | +### design-decisions.md Format |
| 65 | + |
| 66 | +```markdown |
| 67 | +# Design Decisions: [Name] |
| 68 | + |
| 69 | +## Visual Strategy |
| 70 | +### Color Palette |
| 71 | +- Primary: #xxx - [why chosen] |
| 72 | +- Secondary: #xxx - [why chosen] |
| 73 | +**Why:** [overall color reasoning] |
| 74 | + |
| 75 | +### Typography |
| 76 | +- Headings: [font, weight] |
| 77 | +- Body: [font, size, line-height] |
| 78 | +**Why:** [readability, brand, etc.] |
| 79 | + |
| 80 | +### Layout Approach |
| 81 | +- Grid: [structure] |
| 82 | +- Spacing: [rhythm] |
| 83 | +**Why:** [reasoning] |
| 84 | + |
| 85 | +## UX Decisions |
| 86 | +### Navigation Pattern |
| 87 | +- **Choice:** [what was chosen] |
| 88 | +- **Alternative:** [what was considered] |
| 89 | +- **Why chosen:** [reasoning] |
| 90 | + |
| 91 | +### Information Architecture |
| 92 | +1. [Section 1 - why first] |
| 93 | +2. [Section 2 - why here] |
| 94 | +... |
| 95 | + |
| 96 | +## Technical Choices |
| 97 | +### Responsive Strategy |
| 98 | +- **Approach:** [mobile-first, etc.] |
| 99 | +- **Why:** [reasoning] |
| 100 | + |
| 101 | +### Animation Approach |
| 102 | +- **Style:** [subtle CSS, etc.] |
| 103 | +- **Why:** [performance, accessibility] |
| 104 | + |
| 105 | +## Trade-offs |
| 106 | +- **Sacrificed:** [what was given up] |
| 107 | +- **Reason:** [why acceptable] |
| 108 | +``` |
| 109 | + |
| 110 | +### metrics.json Format |
| 111 | + |
| 112 | +```json |
| 113 | +{ |
| 114 | + "version": "1.0", |
| 115 | + "generated_at": "2026-06-22T12:00:00Z", |
| 116 | + "quality_scores": { |
| 117 | + "overall": 92, |
| 118 | + "visual_design": 94, |
| 119 | + "ux_patterns": 90, |
| 120 | + "accessibility": 95, |
| 121 | + "code_quality": 88, |
| 122 | + "responsiveness": 93 |
| 123 | + }, |
| 124 | + "wcag_compliance": { |
| 125 | + "level": "AA", |
| 126 | + "score": 95, |
| 127 | + "critical_issues": 0, |
| 128 | + "warnings": 2 |
| 129 | + }, |
| 130 | + "performance": { |
| 131 | + "lighthouse_performance": 90, |
| 132 | + "lighthouse_accessibility": 98, |
| 133 | + "lighthouse_best_practices": 95, |
| 134 | + "lighthouse_seo": 92, |
| 135 | + "bundle_size_kb": 145, |
| 136 | + "load_time_ms": 1850 |
| 137 | + }, |
| 138 | + "generation": { |
| 139 | + "tokens_input": 3421, |
| 140 | + "tokens_output": 8934, |
| 141 | + "tokens_total": 12355, |
| 142 | + "cost_usd": 0.185, |
| 143 | + "time_seconds": 45, |
| 144 | + "iterations": 2, |
| 145 | + "model": "claude-opus-4-7" |
| 146 | + }, |
| 147 | + "code_stats": { |
| 148 | + "lines_html": 421, |
| 149 | + "lines_css": 567, |
| 150 | + "lines_js": 89, |
| 151 | + "total_lines": 1077 |
| 152 | + } |
| 153 | +} |
| 154 | +``` |
| 155 | + |
| 156 | +## Quality Criteria |
| 157 | + |
| 158 | +Examples must meet these criteria to be included: |
| 159 | + |
| 160 | +✅ **Quality score ≥ 85/100** |
| 161 | +✅ **Accessibility score ≥ 90/100** (WCAG AA minimum) |
| 162 | +✅ **Complete documentation** (all 4 files present) |
| 163 | +✅ **Realistic content** (no lorem ipsum) |
| 164 | +✅ **Professional appearance** (polished, production-ready) |
| 165 | +✅ **Working code** (renders correctly, no errors) |
| 166 | + |
| 167 | +## Collection Guidelines |
| 168 | + |
| 169 | +### 1. Generation |
| 170 | +- Use Open CoDesign with best prompts |
| 171 | +- Use appropriate design system |
| 172 | +- Allow 2-3 iterations if needed |
| 173 | +- Save the final, polished version |
| 174 | + |
| 175 | +### 2. Documentation |
| 176 | +- Write design-decisions.md immediately (while fresh) |
| 177 | +- Be specific about WHY choices were made |
| 178 | +- Include alternatives considered |
| 179 | +- Note trade-offs made |
| 180 | + |
| 181 | +### 3. Metrics Collection |
| 182 | +- Run accessibility verification |
| 183 | +- Run code quality verification |
| 184 | +- Check WCAG compliance |
| 185 | +- Measure performance (if possible) |
| 186 | +- Record generation details |
| 187 | + |
| 188 | +### 4. Review |
| 189 | +- Visual inspection (screenshot) |
| 190 | +- Code review (clean, maintainable) |
| 191 | +- Accessibility check (keyboard nav, screen reader) |
| 192 | +- Responsive check (mobile, tablet, desktop) |
| 193 | + |
| 194 | +## Usage |
| 195 | + |
| 196 | +The reference library is automatically used by Open CoDesign when: |
| 197 | +- User prompt matches an example category |
| 198 | +- Few-shot learning is enabled (default) |
| 199 | +- Examples exist in the relevant category |
| 200 | + |
| 201 | +System loads top 3 most relevant examples and includes them in the prompt context. |
| 202 | + |
| 203 | +## Target: 30 Examples |
| 204 | + |
| 205 | +Minimum distribution: |
| 206 | +- **Landing pages:** 5 examples (SaaS, agency, product, waitlist, portfolio) |
| 207 | +- **Dashboards:** 5 examples (analytics, admin, monitoring, CRM, finance) |
| 208 | +- **Mobile apps:** 5 examples (banking, fitness, social, shopping, messaging) |
| 209 | +- **Presentations:** 5 examples (pitch, quarterly, workshop, research, sales) |
| 210 | +- **E-commerce:** 5 examples (product, checkout, cart, storefront, order) |
| 211 | +- **Components:** 5 examples (navigation, forms, cards, modals, tables) |
| 212 | + |
| 213 | +## Current Status |
| 214 | + |
| 215 | +Total examples: 0 / 30 |
| 216 | + |
| 217 | +By category: |
| 218 | +- [ ] Landing pages: 0/5 |
| 219 | +- [ ] Dashboards: 0/5 |
| 220 | +- [ ] Mobile apps: 0/5 |
| 221 | +- [ ] Presentations: 0/5 |
| 222 | +- [ ] E-commerce: 0/5 |
| 223 | +- [ ] Components: 0/5 |
| 224 | + |
| 225 | +## How to Add an Example |
| 226 | + |
| 227 | +1. Create directory: `category/example-name/` |
| 228 | +2. Add all 4 required files (prompt.md, output.html, design-decisions.md, metrics.json) |
| 229 | +3. Optional: Add screenshot.png |
| 230 | +4. Update this README with count |
| 231 | +5. Commit with message: `docs(references): add [example-name] to [category]` |
| 232 | + |
| 233 | +## Example Prompts for Collection |
| 234 | + |
| 235 | +### Landing Pages |
| 236 | +``` |
| 237 | +Create a SaaS product launch page for an AI code review tool. Include hero with value prop, 3-column feature grid, customer logos, testimonials, pricing (3 tiers), FAQ, and CTA footer. Professional blue/gray palette. |
| 238 | +``` |
| 239 | + |
| 240 | +### Dashboards |
| 241 | +``` |
| 242 | +Create an analytics dashboard for e-commerce merchants. KPI cards (revenue, orders, conversion), revenue trend chart, top products table, traffic sources pie chart, recent orders list. Data-dense layout. |
| 243 | +``` |
| 244 | + |
| 245 | +### Mobile Apps |
| 246 | +``` |
| 247 | +Create a banking app home screen in iPhone frame. Account balance card, quick actions (pay/send/request), recent transactions, bottom navigation. Secure, professional design. |
| 248 | +``` |
| 249 | + |
| 250 | +--- |
| 251 | + |
| 252 | +**Status:** Structure created, ready for example collection. |
| 253 | +**Next:** Generate and collect 30+ high-quality examples. |
0 commit comments