|
| 1 | +# Digital Bazaar Community — Agent Rules |
| 2 | + |
| 3 | +> Bilingual Arabic/English Jekyll site for WhatsApp community |
| 4 | +> Aesthetic: High-end magazine, Middle Eastern-inspired palette |
| 5 | + |
| 6 | +--- |
| 7 | + |
| 8 | +## 🧠 AGENT MINDSET |
| 9 | + |
| 10 | +### 1. Research First, Code Second |
| 11 | + |
| 12 | +Before writing ANY custom code, search in this order: |
| 13 | +1. Jekyll built-in features and plugins |
| 14 | +2. Tailwind CSS utilities and plugins |
| 15 | +3. Bootstrap components (especially RTL) |
| 16 | +4. Community solutions (GitHub, Stack Overflow) |
| 17 | +5. Only then: custom implementation |
| 18 | + |
| 19 | +### 2. Bilingual UX Thinking |
| 20 | + |
| 21 | +Every feature must work in BOTH languages: |
| 22 | +- Arabic: RTL, larger line-height (1.8+), right-aligned |
| 23 | +- English: LTR, standard line-height, left-aligned |
| 24 | +- Test both `/ar/` and `/en/` before considering anything complete |
| 25 | + |
| 26 | +### 3. Magazine, Not Blog |
| 27 | + |
| 28 | +**This is a high-end digital magazine, not a basic blog.** |
| 29 | + |
| 30 | +Design every page like a premium publication spread: |
| 31 | +- Editorial layouts with intentional white space |
| 32 | +- Images that command attention (floats, bleeds, overlays) |
| 33 | +- Typography as art (pull quotes, drop caps, hierarchy) |
| 34 | +- Refined details (shadows, borders, spacing) |
| 35 | + |
| 36 | +--- |
| 37 | + |
| 38 | +## 🎨 COLOR PALETTE |
| 39 | + |
| 40 | +``` |
| 41 | +--sand: #F4E6C4 Background, warm neutral |
| 42 | +--saffron: #E2B714 Accent, highlights |
| 43 | +--terracotta: #B34E36 Primary CTA, warmth |
| 44 | +--marigold: #D9912A Secondary accent, energy |
| 45 | +--teal: #2F8F9D Links, cool contrast |
| 46 | +--night: #152029 Headings, strong text |
| 47 | +--ink: #21313B Body text |
| 48 | +--white: #FFFFFF Cards, buttons |
| 49 | +``` |
| 50 | + |
| 51 | +**Never introduce colors outside this palette.** |
| 52 | + |
| 53 | +--- |
| 54 | + |
| 55 | +## 📁 FILE STRUCTURE |
| 56 | + |
| 57 | +``` |
| 58 | +├── _config.yml |
| 59 | +├── _data/rules_{ar,en}.yml |
| 60 | +├── _includes/{header,footer,language-toggle,article-card}.html |
| 61 | +├── _layouts/{default,home,article}.html |
| 62 | +├── _posts/YYYY-MM-DD-title.md |
| 63 | +├── _docs/ ← Design system reference |
| 64 | +│ ├── design-system.md |
| 65 | +│ ├── image-layouts.md |
| 66 | +│ └── article-templates.md |
| 67 | +├── assets/css/styles.css |
| 68 | +├── ar/index.html |
| 69 | +├── en/index.html |
| 70 | +└── index.html ← Redirects to /ar/ |
| 71 | +``` |
| 72 | + |
| 73 | +--- |
| 74 | + |
| 75 | +## 📝 ARTICLE FRONT MATTER |
| 76 | + |
| 77 | +```yaml |
| 78 | +--- |
| 79 | +layout: article |
| 80 | +title: "عنوان المقال" |
| 81 | +author: "اسم الكاتب" |
| 82 | +date: 2025-01-15 |
| 83 | +lang: ar # 'ar' or 'en' |
| 84 | +excerpt: "ملخص قصير" |
| 85 | +--- |
| 86 | +``` |
| 87 | + |
| 88 | +--- |
| 89 | + |
| 90 | +## ✅ ALWAYS |
| 91 | + |
| 92 | +1. Search for existing solutions before custom code |
| 93 | +2. Run `bundle exec jekyll serve --trace` and watch logs |
| 94 | +3. Test BOTH `/ar/` and `/en/` pages in browser |
| 95 | +4. Use CSS logical properties (`margin-inline-start`, not `margin-left`) |
| 96 | +5. Keep text in `_data/` files, never hardcode |
| 97 | +6. Use only palette colors |
| 98 | +7. Design like a magazine — floats, bleeds, pull quotes, drop caps |
| 99 | +8. Check browser DevTools console for errors |
| 100 | +9. Test mobile responsiveness |
| 101 | +10. Verify language toggle works |
| 102 | + |
| 103 | +--- |
| 104 | + |
| 105 | +## 🚫 NEVER |
| 106 | + |
| 107 | +1. Write custom code before checking existing solutions |
| 108 | +2. Hardcode text in templates |
| 109 | +3. Use physical properties (`left/right`) — use logical (`start/end`) |
| 110 | +4. Design boring layouts — no walls of text |
| 111 | +5. Use default/unstyled code blocks |
| 112 | +6. Skip manual browser testing |
| 113 | +7. Ignore Jekyll build warnings |
| 114 | +8. Introduce colors outside the palette |
| 115 | +9. Merge without testing both languages |
| 116 | +10. Create cramped layouts — white space is design |
| 117 | + |
| 118 | +--- |
| 119 | + |
| 120 | +## ✅ VERIFICATION (After Every Change) |
| 121 | + |
| 122 | +```bash |
| 123 | +# 1. Watch logs |
| 124 | +bundle exec jekyll serve --livereload --trace |
| 125 | + |
| 126 | +# 2. Test both languages |
| 127 | +open http://localhost:4000/ar/ |
| 128 | +open http://localhost:4000/en/ |
| 129 | + |
| 130 | +# 3. Check: |
| 131 | +# - Page loads without errors |
| 132 | +# - Text direction correct (RTL/LTR) |
| 133 | +# - Language toggle works |
| 134 | +# - Mobile layout (resize window) |
| 135 | +# - DevTools console (F12) — no errors |
| 136 | +``` |
| 137 | + |
| 138 | +--- |
| 139 | + |
| 140 | +## 📚 DESIGN REFERENCES |
| 141 | + |
| 142 | +When implementing specific features, read these files: |
| 143 | + |
| 144 | +| Need | Reference | |
| 145 | +|------|-----------| |
| 146 | +| Image layouts (floats, bleeds, overlays) | `_docs/image-layouts.md` | |
| 147 | +| Typography (pull quotes, drop caps) | `_docs/design-system.md` | |
| 148 | +| Article page structure | `_docs/article-templates.md` | |
| 149 | +| Code block styling | `_docs/design-system.md` | |
| 150 | + |
| 151 | +--- |
| 152 | + |
| 153 | +## 🔗 EXTERNAL RESOURCES |
| 154 | + |
| 155 | +- Jekyll Docs: https://jekyllrb.com/docs/ |
| 156 | +- Tailwind RTL: https://github.com/20lives/tailwindcss-rtl |
| 157 | +- CSS Logical Properties: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_logical_properties_and_values |
| 158 | +- Arabic Fonts: https://fonts.google.com/?subset=arabic |
| 159 | + |
0 commit comments