heraspec 0.1.12 → 0.1.14

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.
Files changed (129) hide show
  1. package/LICENSE +22 -22
  2. package/README.md +188 -103
  3. package/bin/heraspec.js +4805 -1122
  4. package/bin/heraspec.js.map +4 -4
  5. package/dist/core/templates/skills/CHANGELOG.md +117 -117
  6. package/dist/core/templates/skills/README-template.md +58 -58
  7. package/dist/core/templates/skills/README.md +38 -38
  8. package/dist/core/templates/skills/content-optimization-skill.md +104 -104
  9. package/dist/core/templates/skills/data/design-systems.csv +54 -0
  10. package/dist/core/templates/skills/data/pages-proposed.csv +21 -21
  11. package/dist/core/templates/skills/data/pages.csv +9 -9
  12. package/dist/core/templates/skills/data/typography.csv +57 -57
  13. package/dist/core/templates/skills/deploy-documentation-skill.md +408 -0
  14. package/dist/core/templates/skills/design-system-skill.md +176 -0
  15. package/dist/core/templates/skills/documents/templates/documentation-landing-page.html +63 -63
  16. package/dist/core/templates/skills/documents/templates/documentation.html +49 -49
  17. package/dist/core/templates/skills/documents/templates/landing-script.js +38 -38
  18. package/dist/core/templates/skills/documents/templates/landing-style.css +158 -158
  19. package/dist/core/templates/skills/documents/templates/script.js +56 -56
  20. package/dist/core/templates/skills/documents/templates/style.css +155 -155
  21. package/dist/core/templates/skills/documents/templates/technical-doc-template.md +16 -16
  22. package/dist/core/templates/skills/documents/templates/user-guide-template.md +16 -16
  23. package/dist/core/templates/skills/documents-skill.md +104 -104
  24. package/dist/core/templates/skills/e2e-test-skill.md +119 -119
  25. package/dist/core/templates/skills/git-embed-skill.md +57 -0
  26. package/dist/core/templates/skills/integration-test-skill.md +118 -118
  27. package/dist/core/templates/skills/knowledge/README.md +63 -0
  28. package/dist/core/templates/skills/knowledge/design-systems/airbnb/DESIGN.md +246 -0
  29. package/dist/core/templates/skills/knowledge/design-systems/airtable/DESIGN.md +89 -0
  30. package/dist/core/templates/skills/knowledge/design-systems/apple/DESIGN.md +313 -0
  31. package/dist/core/templates/skills/knowledge/design-systems/bmw/DESIGN.md +180 -0
  32. package/dist/core/templates/skills/knowledge/design-systems/cal/DESIGN.md +259 -0
  33. package/dist/core/templates/skills/knowledge/design-systems/claude/DESIGN.md +312 -0
  34. package/dist/core/templates/skills/knowledge/design-systems/clay/DESIGN.md +304 -0
  35. package/dist/core/templates/skills/knowledge/design-systems/clickhouse/DESIGN.md +281 -0
  36. package/dist/core/templates/skills/knowledge/design-systems/cohere/DESIGN.md +266 -0
  37. package/dist/core/templates/skills/knowledge/design-systems/coinbase/DESIGN.md +129 -0
  38. package/dist/core/templates/skills/knowledge/design-systems/composio/DESIGN.md +307 -0
  39. package/dist/core/templates/skills/knowledge/design-systems/cursor/DESIGN.md +309 -0
  40. package/dist/core/templates/skills/knowledge/design-systems/elevenlabs/DESIGN.md +265 -0
  41. package/dist/core/templates/skills/knowledge/design-systems/expo/DESIGN.md +281 -0
  42. package/dist/core/templates/skills/knowledge/design-systems/figma/DESIGN.md +220 -0
  43. package/dist/core/templates/skills/knowledge/design-systems/framer/DESIGN.md +246 -0
  44. package/dist/core/templates/skills/knowledge/design-systems/hashicorp/DESIGN.md +278 -0
  45. package/dist/core/templates/skills/knowledge/design-systems/ibm/DESIGN.md +332 -0
  46. package/dist/core/templates/skills/knowledge/design-systems/index.json +72 -0
  47. package/dist/core/templates/skills/knowledge/design-systems/intercom/DESIGN.md +146 -0
  48. package/dist/core/templates/skills/knowledge/design-systems/kraken/DESIGN.md +125 -0
  49. package/dist/core/templates/skills/knowledge/design-systems/linear.app/DESIGN.md +367 -0
  50. package/dist/core/templates/skills/knowledge/design-systems/lovable/DESIGN.md +298 -0
  51. package/dist/core/templates/skills/knowledge/design-systems/minimax/DESIGN.md +257 -0
  52. package/dist/core/templates/skills/knowledge/design-systems/mintlify/DESIGN.md +326 -0
  53. package/dist/core/templates/skills/knowledge/design-systems/miro/DESIGN.md +108 -0
  54. package/dist/core/templates/skills/knowledge/design-systems/mistral.ai/DESIGN.md +261 -0
  55. package/dist/core/templates/skills/knowledge/design-systems/mongodb/DESIGN.md +266 -0
  56. package/dist/core/templates/skills/knowledge/design-systems/notion/DESIGN.md +309 -0
  57. package/dist/core/templates/skills/knowledge/design-systems/nvidia/DESIGN.md +293 -0
  58. package/dist/core/templates/skills/knowledge/design-systems/ollama/DESIGN.md +267 -0
  59. package/dist/core/templates/skills/knowledge/design-systems/opencode.ai/DESIGN.md +281 -0
  60. package/dist/core/templates/skills/knowledge/design-systems/pinterest/DESIGN.md +230 -0
  61. package/dist/core/templates/skills/knowledge/design-systems/posthog/DESIGN.md +256 -0
  62. package/dist/core/templates/skills/knowledge/design-systems/raycast/DESIGN.md +268 -0
  63. package/dist/core/templates/skills/knowledge/design-systems/replicate/DESIGN.md +261 -0
  64. package/dist/core/templates/skills/knowledge/design-systems/resend/DESIGN.md +303 -0
  65. package/dist/core/templates/skills/knowledge/design-systems/revolut/DESIGN.md +185 -0
  66. package/dist/core/templates/skills/knowledge/design-systems/runwayml/DESIGN.md +244 -0
  67. package/dist/core/templates/skills/knowledge/design-systems/sanity/DESIGN.md +357 -0
  68. package/dist/core/templates/skills/knowledge/design-systems/sentry/DESIGN.md +262 -0
  69. package/dist/core/templates/skills/knowledge/design-systems/spacex/DESIGN.md +194 -0
  70. package/dist/core/templates/skills/knowledge/design-systems/spotify/DESIGN.md +246 -0
  71. package/dist/core/templates/skills/knowledge/design-systems/stripe/DESIGN.md +322 -0
  72. package/dist/core/templates/skills/knowledge/design-systems/supabase/DESIGN.md +255 -0
  73. package/dist/core/templates/skills/knowledge/design-systems/superhuman/DESIGN.md +252 -0
  74. package/dist/core/templates/skills/knowledge/design-systems/together.ai/DESIGN.md +263 -0
  75. package/dist/core/templates/skills/knowledge/design-systems/uber/DESIGN.md +295 -0
  76. package/dist/core/templates/skills/knowledge/design-systems/vercel/DESIGN.md +310 -0
  77. package/dist/core/templates/skills/knowledge/design-systems/voltagent/DESIGN.md +323 -0
  78. package/dist/core/templates/skills/knowledge/design-systems/warp/DESIGN.md +253 -0
  79. package/dist/core/templates/skills/knowledge/design-systems/webflow/DESIGN.md +92 -0
  80. package/dist/core/templates/skills/knowledge/design-systems/wise/DESIGN.md +173 -0
  81. package/dist/core/templates/skills/knowledge/design-systems/x.ai/DESIGN.md +257 -0
  82. package/dist/core/templates/skills/knowledge/design-systems/zapier/DESIGN.md +328 -0
  83. package/dist/core/templates/skills/knowledge/frameworks/php/codeigniter/rise-cms/profile.json +27 -0
  84. package/dist/core/templates/skills/knowledge/frameworks/php/codeigniter/rise-cms/structure.md +137 -0
  85. package/dist/core/templates/skills/knowledge/frameworks/php/laravel/botble/profile.json +39 -0
  86. package/dist/core/templates/skills/knowledge/frameworks/php/laravel/botble/structure.md +208 -0
  87. package/dist/core/templates/skills/knowledge/frameworks/php/wordpress/core/profile.json +51 -0
  88. package/dist/core/templates/skills/knowledge/frameworks/php/wordpress/core/structure.md +369 -0
  89. package/dist/core/templates/skills/knowledge/index.json +65 -0
  90. package/dist/core/templates/skills/module-codebase-skill.md +110 -110
  91. package/dist/core/templates/skills/plugin-directory-skill.md +396 -396
  92. package/dist/core/templates/skills/project-memory-skill.md +222 -0
  93. package/dist/core/templates/skills/project-memory-skill.vi.md +223 -0
  94. package/dist/core/templates/skills/scripts/CODE_EXPLANATION.md +394 -394
  95. package/dist/core/templates/skills/scripts/SEARCH_ALGORITHMS_COMPARISON.md +421 -421
  96. package/dist/core/templates/skills/scripts/SEARCH_MODES_GUIDE.md +238 -238
  97. package/dist/core/templates/skills/scripts/__pycache__/core.cpython-311.pyc +0 -0
  98. package/dist/core/templates/skills/scripts/core.py +391 -385
  99. package/dist/core/templates/skills/scripts/search.py +1 -1
  100. package/dist/core/templates/skills/smart-explore-skill.md +141 -0
  101. package/dist/core/templates/skills/sourcecode-analyzer-skill.md +210 -0
  102. package/dist/core/templates/skills/sourcecode-analyzer-skill.vi.md +210 -0
  103. package/dist/core/templates/skills/suggestion-skill.md +118 -118
  104. package/dist/core/templates/skills/templates/accessibility-checklist.md +40 -40
  105. package/dist/core/templates/skills/templates/example-prompt-full-theme.md +333 -333
  106. package/dist/core/templates/skills/templates/page-types-guide.md +338 -338
  107. package/dist/core/templates/skills/templates/pages-proposed-summary.md +273 -273
  108. package/dist/core/templates/skills/templates/pre-delivery-checklist.md +42 -42
  109. package/dist/core/templates/skills/templates/prompt-template-full-theme.md +313 -313
  110. package/dist/core/templates/skills/templates/responsive-design.md +40 -40
  111. package/dist/core/templates/skills/ui-ux-skill.md +595 -584
  112. package/dist/core/templates/skills/unit-test-skill.md +111 -111
  113. package/dist/core/templates/skills/ux-element/templates/Controller.php +50 -50
  114. package/dist/core/templates/skills/ux-element/templates/Shortcode.php +23 -23
  115. package/dist/core/templates/skills/ux-element/templates/Template.html +20 -20
  116. package/dist/core/templates/skills/ux-element/templates/Thumbnail.svg +8 -8
  117. package/dist/core/templates/skills/ux-element/templates/View.php +21 -21
  118. package/dist/core/templates/skills/ux-element-skill.md +83 -83
  119. package/dist/core/templates/skills/wordpress-plugin-check-skill.md +151 -76
  120. package/dist/core/templates/skills/wordpress-plugin-standard/templates/admin-dashboard.php +47 -47
  121. package/dist/core/templates/skills/wordpress-plugin-standard/templates/admin-settings.php +60 -60
  122. package/dist/core/templates/skills/wordpress-plugin-standard/templates/assets/admin-css.css +22 -22
  123. package/dist/core/templates/skills/wordpress-plugin-standard/templates/assets/admin-js.js +15 -15
  124. package/dist/core/templates/skills/wordpress-plugin-standard/templates/plugin-main.php +169 -169
  125. package/dist/core/templates/skills/wordpress-plugin-standard/templates/readme.txt +41 -41
  126. package/dist/core/templates/skills/wordpress-plugin-standard/templates/uninstall.php +21 -21
  127. package/dist/core/templates/skills/wordpress-plugin-standard-skill.md +100 -100
  128. package/dist/index.js +4068 -278
  129. package/package.json +75 -72
@@ -0,0 +1,408 @@
1
+ ---
2
+ name: deploy-documentation
3
+ description: Tự động hoá quy trình chụp screenshot và cập nhật documentation sau mỗi lần build & deploy — discover routes, generate manifest, capture screenshots, update HTML. Hoạt động với mọi loại web application.
4
+ projectType: all
5
+ ---
6
+
7
+ # Deploy Documentation — Auto Screenshot & Docs Generator
8
+
9
+ ## Purpose
10
+
11
+ Skill này tự động hoá quy trình chụp ảnh màn hình và cập nhật documentation sau mỗi lần build & deploy sản phẩm. Thay vì developer phải truy cập thủ công từng trang, chụp ảnh, rồi cập nhật landing page — skill này thực hiện toàn bộ quy trình một cách tự động và nhất quán.
12
+
13
+ **Vấn đề giải quyết:**
14
+ - Sau khi build xong plugin/module/software, developer phải truy cập từng trang tính năng trên site
15
+ - Chụp ảnh thủ công, dễ sai sót (quên cập nhật mô tả)
16
+ - Tốn thời gian khi có nhiều route, lặp lại mỗi version
17
+
18
+ ## When to Use
19
+
20
+ - Sau mỗi lần release / deploy phiên bản mới
21
+ - Khi cần sync documentation screenshots với UI thực tế
22
+ - Khi thêm tính năng mới chưa có trong manifest
23
+ - Khi cần chụp ảnh từ nhiều site khác nhau (local, demo, client)
24
+
25
+ ---
26
+
27
+ ## Architecture: 2 Phases
28
+
29
+ ```
30
+ Phase 1: DISCOVER — Quét codebase → Suggest manifest entries
31
+ Phase 2: CAPTURE — Đọc manifest → Login → Navigate → Screenshot → Update HTML
32
+ ```
33
+
34
+ ---
35
+
36
+ ## Phase 1: Route Discovery & Manifest Generation
37
+
38
+ ### Mục đích
39
+ Tự động quét codebase để phát hiện routes/pages, sau đó suggest thêm entries vào `deploy_manifest.json`.
40
+
41
+ ### Cách hoạt động
42
+
43
+ **1. Quét routes — tìm tất cả route definitions trong codebase:**
44
+
45
+ | Project Type | Source files |
46
+ |---|---|
47
+ | Perfex CRM Module | `config/my_routes.php` + controller method names |
48
+ | Laravel App | `routes/web.php`, `routes/api.php` |
49
+ | WordPress Plugin | `add_menu_page()`, `add_submenu_page()` hooks |
50
+ | Next.js / Vite SPA | `pages/` directory, router config files |
51
+ | Electron App | Window/view registrations |
52
+ | Generic | Navigation config files, sitemap |
53
+
54
+ **2. Quét menu registrations — tìm sidebar/nav menu items:**
55
+ - Perfex CRM: `$this->app_menu->add_sidebar_menu_item()` calls
56
+ - WordPress: `add_menu_page()`, `add_submenu_page()`
57
+ - Generic: tìm navigation config files
58
+
59
+ **3. Quét migration changelog:**
60
+ - Parse `logChanged()` hoặc `CHANGELOG.md` để detect features mới chưa có trong manifest
61
+
62
+ **4. Cross-reference với manifest:**
63
+ - So sánh routes discovered vs entries đã khai báo → suggest entries còn thiếu
64
+
65
+ ### Discovery Scan Targets (Perfex CRM modules — example)
66
+
67
+ ```
68
+ modules/{module}/config/my_routes.php → Route definitions
69
+ modules/{module}/data_builder.php → Menu items (add_sidebar_menu_item)
70
+ modules/{module}/controllers/*.php → Controller methods = pages
71
+ modules/{module}/views/admin/**/*.php → View templates
72
+ modules/{module}/migrations/*_version_*.php → Changelog (logChanged)
73
+ ```
74
+
75
+ ### Output Format — Suggested Entry
76
+
77
+ ```json
78
+ {
79
+ "id": "auto-discovered-{route}",
80
+ "filename": "{Feature-Name}-{Product}.png",
81
+ "title": "{Feature Name}",
82
+ "route": "/admin/{module}/{controller}/{method}",
83
+ "wait_for": "#app, .panel, .table-responsive",
84
+ "section": "core-features",
85
+ "actions_before": [
86
+ { "action": "wait", "ms": 2000 }
87
+ ],
88
+ "_discovered_from": "controller: Builder.php → method: index()",
89
+ "_status": "suggested"
90
+ }
91
+ ```
92
+
93
+ > **IMPORTANT**: Entries có `_status: "suggested"` cần user review và confirm trước khi chạy Phase 2. Agent MUST NOT auto-proceed.
94
+
95
+ ### Site Suggestion Logic (khi discover)
96
+
97
+ | Loại page | Site đề xuất | Lý do |
98
+ |---|---|---|
99
+ | Admin management pages | `local` | Không cần real data |
100
+ | Charts, runtime reports | `demo` | Cần data đẹp, trực quan |
101
+ | Public embed / iframe | `demo` | Cần public view đã setup |
102
+ | Client-specific feature | `client_x` | Cần data thực tế của client |
103
+
104
+ ---
105
+
106
+ ## Phase 2: Screenshot Capture & Documentation Update
107
+
108
+ ### Prerequisites
109
+ - File `deploy_manifest.json` đã được review và xác nhận
110
+ - Site đang chạy và accessible tại `base_url`
111
+ - Credentials hợp lệ
112
+
113
+ ### Step 1: Build Site Groups
114
+
115
+ ```
116
+ 1. Đọc manifest.sites{} và manifest.default_site
117
+ 2. Với mỗi entry trong screenshots[]:
118
+ - Nếu entry có "site" key → site = sites[entry.site]
119
+ - Nếu không → site = sites[default_site]
120
+ 3. Group entries by site key → { local: [...], demo: [...], client_x: [...] }
121
+ ```
122
+
123
+ ### Step 2: Login (một lần mỗi site)
124
+
125
+ ```
126
+ Foreach unique_site in groups:
127
+ site_config = sites[unique_site]
128
+ 1. Mở browser tab mới tại: {site_config.base_url}{site_config.login_url}
129
+ 2. Điền credentials:
130
+ - email_selector ← site_config.login_form.email_selector
131
+ - password_selector ← site_config.login_form.password_selector
132
+ 3. Click submit: site_config.login_form.submit_selector
133
+ 4. Chờ redirect hoặc dashboard element xuất hiện
134
+ 5. Lưu session/cookies cho site này
135
+ Log: ✅ Logged in to {site_config.base_url} / ❌ Login failed
136
+ ```
137
+
138
+ **login_form supports:**
139
+ - Perfex CRM: `input[name='email']` + `input[name='password']`
140
+ - WordPress: `input#user_login` + `input#user_pass`
141
+ - Laravel / generic: any valid CSS selector
142
+
143
+ ### Step 3: Screenshot Loop
144
+
145
+ ```
146
+ Foreach entry in manifest.screenshots[]:
147
+ site_config = sites[entry.site || default_site]
148
+ base_url = site_config.base_url
149
+
150
+ 1. Navigate tới {base_url}{entry.route}
151
+ Resolve dynamic tokens nếu có:
152
+ {first_view_id} → Scrape view list page → first row ID
153
+ {first_view_route} → Scrape view list page → first row route slug
154
+ {first_public_route} → Scrape views → first with public_access indicator
155
+ {latest_record_id} → Scrape or sort by date → most recent ID
156
+
157
+ 2. Set viewport: entry.viewport || manifest.defaults.viewport
158
+
159
+ 3. Execute actions_before[] theo thứ tự:
160
+ wait → sleep(ms)
161
+ click → click(selector)
162
+ click_first_visible → find first visible element → click
163
+ scroll_down → window.scrollBy(0, px)
164
+ scroll_to → element.scrollIntoView()
165
+ type → type text into selector (for search/filter inputs)
166
+
167
+ 4. Wait for: entry.wait_for selector to appear in DOM
168
+
169
+ 5. Capture screenshot:
170
+ format = entry.format || manifest.defaults.format
171
+ Save → {output.images_dir}/{entry.filename}
172
+
173
+ Log: ✅ {entry.id} → {entry.filename} / ❌ reason
174
+ ```
175
+
176
+ ### Step 4: HTML Update (Optional)
177
+
178
+ ```
179
+ 1. Đọc index.html
180
+ 2. Cập nhật version number từ source code
181
+ 3. Cập nhật date (Updated: {current month year})
182
+ 4. Parse changelog từ migration file → inject vào #changelog-content
183
+ 5. Verify tất cả <img src="images/..."> đều có file tương ứng
184
+ 6. Save index.html
185
+ ```
186
+
187
+ ---
188
+
189
+ ## Manifest Format Reference
190
+
191
+ Tạo file `deploy_manifest.json` **cùng folder với `AGENTS.heraspec.md` và thư mục `heraspec/`** của project/module đó — không nhất thiết là root của toàn bộ monorepo:
192
+
193
+ ```json
194
+ {
195
+ "product": {
196
+ "name": "Product Name",
197
+ "tagline": "Short description",
198
+ "version_source": "path/to/version_file",
199
+ "changelog_source": "path/to/migration_or_changelog"
200
+ },
201
+
202
+ "sites": {
203
+ "local": {
204
+ "base_url": "https://localhost:PORT",
205
+ "login_url": "/admin/authentication",
206
+ "login_form": {
207
+ "email_selector": "input[name='email']",
208
+ "password_selector": "input[name='password']",
209
+ "submit_selector": "button[type='submit']"
210
+ },
211
+ "credentials": {
212
+ "email": "admin@admin.com",
213
+ "password": "password"
214
+ },
215
+ "description": "Local dev"
216
+ },
217
+ "demo": {
218
+ "base_url": "https://demo.example.com",
219
+ "login_url": "/admin/authentication",
220
+ "login_form": {
221
+ "email_selector": "input[name='email']",
222
+ "password_selector": "input[name='password']",
223
+ "submit_selector": "button[type='submit']"
224
+ },
225
+ "credentials": {
226
+ "email": "admin@demo.com",
227
+ "password": "password"
228
+ },
229
+ "description": "Live demo site for marketing screenshots"
230
+ }
231
+ },
232
+
233
+ "default_site": "local",
234
+
235
+ "output": {
236
+ "images_dir": "path/to/documentation/images",
237
+ "html_file": "path/to/documentation/index.html"
238
+ },
239
+
240
+ "defaults": {
241
+ "viewport": { "width": 1440, "height": 900 },
242
+ "format": "png",
243
+ "wait_ms": 2000
244
+ },
245
+
246
+ "screenshots": [
247
+ {
248
+ "id": "feature-overview",
249
+ "filename": "Feature-Overview-ProductName.png",
250
+ "title": "Feature Overview",
251
+ "route": "/admin/module/page",
252
+ "wait_for": "#app, .panel, .table-responsive",
253
+ "section": "core-features",
254
+ "actions_before": [
255
+ { "action": "wait", "ms": 2000 }
256
+ ]
257
+ },
258
+ {
259
+ "id": "feature-on-demo",
260
+ "site": "demo",
261
+ "filename": "Feature-Demo-ProductName.png",
262
+ "title": "Feature (Demo Data)",
263
+ "route": "/admin/module/page",
264
+ "wait_for": ".chart-container",
265
+ "section": "core-features",
266
+ "actions_before": [
267
+ { "action": "wait", "ms": 3000 }
268
+ ]
269
+ }
270
+ ]
271
+ }
272
+ ```
273
+
274
+ ### Dynamic Route Tokens
275
+
276
+ | Token | Resolution |
277
+ |-------|-----------|
278
+ | `{first_view_id}` | ID của record đầu tiên trong view list |
279
+ | `{first_view_route}` | Route slug của view đầu tiên |
280
+ | `{first_public_route}` | Route của view public đầu tiên |
281
+ | `{latest_record_id}` | ID của record mới nhất |
282
+
283
+ Agent resolves các token này bằng cách scrape trang list hoặc query database.
284
+
285
+ ---
286
+
287
+ ## Prompt Templates
288
+
289
+ ### Full workflow (Discover + Capture):
290
+
291
+ ```
292
+ Sử dụng skill deploy-documentation.
293
+ Project: {module_path}
294
+ Manifest: {manifest_path}
295
+
296
+ 1. Phase 1: Quét codebase tại {module_path}, phát hiện routes/features chưa có trong manifest, suggest entries mới (đề xuất site phù hợp cho từng entry)
297
+ 2. Tôi sẽ review và confirm manifest
298
+ 3. Phase 2: Login vào từng site trong manifest, chụp tất cả screenshots, lưu vào images_dir
299
+ 4. Cập nhật index.html với ảnh mới và changelog
300
+ ```
301
+
302
+ ### Chỉ chụp ảnh — tất cả sites (manifest đã sẵn):
303
+
304
+ ```
305
+ Sử dụng skill deploy-documentation.
306
+ Đọc manifest tại {manifest_path}.
307
+ Login vào từng site được khai báo, chụp tất cả screenshots theo manifest, lưu vào output.images_dir.
308
+ ```
309
+
310
+ ### Chỉ chụp ảnh — 1 site cụ thể:
311
+
312
+ ```
313
+ Sử dụng skill deploy-documentation.
314
+ Đọc manifest tại {manifest_path}.
315
+ Chỉ chụp các screenshots thuộc site "demo".
316
+ Login vào demo site, navigate và capture, lưu vào images_dir.
317
+ ```
318
+
319
+ ### Chỉ chụp lại 1 số ảnh cụ thể:
320
+
321
+ ```
322
+ Sử dụng skill deploy-documentation.
323
+ Đọc manifest tại {manifest_path}.
324
+ Chỉ chụp lại các entries: {id1}, {id2}, {id3}.
325
+ Sử dụng site mặc định (default_site) trừ khi entry có khai báo site riêng.
326
+ ```
327
+
328
+ ### Chỉ discover — suggest entries mới:
329
+
330
+ ```
331
+ Sử dụng skill deploy-documentation.
332
+ Quét codebase tại {module_path}, so sánh với manifest tại {manifest_path}.
333
+ Suggest entries mới cho features/routes chưa được khai báo.
334
+ Với mỗi entry mới: đề xuất site phù hợp (local nếu là admin page, demo nếu cần real-data screenshot).
335
+ Không tự thêm vào manifest — liệt kê để tôi review trước.
336
+ ```
337
+
338
+ ---
339
+
340
+ ## Compatibility — Supported Project Types
341
+
342
+ | Project Type | Route Discovery Source |
343
+ |---|---|
344
+ | Perfex CRM Module | `my_routes.php` + controller methods |
345
+ | Laravel App | `routes/web.php` + `routes/api.php` |
346
+ | WordPress Plugin | `add_menu_page()` + `add_submenu_page()` |
347
+ | Next.js / Vite SPA | `pages/` directory + router config |
348
+ | Electron App | Window/view registrations |
349
+ | Generic Web App | Navigation config files, sitemap |
350
+
351
+ Mỗi project chỉ cần 1 file `deploy_manifest.json` riêng. Cùng skill, cùng workflow.
352
+
353
+ ---
354
+
355
+ ## File Structure (per project/module)
356
+
357
+ `deploy_manifest.json` nằm **cùng folder với `AGENTS.heraspec.md` và `heraspec/`** của module/project đó:
358
+
359
+ ```
360
+ {heraspec_workspace_dir}/ ← Thư mục chứa AGENTS.heraspec.md
361
+ ├── AGENTS.heraspec.md
362
+ ├── heraspec/
363
+ ├── deploy_manifest.json ← Đặt tại đây
364
+ └── documentation/
365
+ ├── index.html
366
+ └── images/
367
+ ```
368
+
369
+ **Ví dụ với Perfex CRM** (mỗi module là một workspace HeraSpec riêng):
370
+
371
+ ```
372
+ perfex_crm/
373
+ └── modules/
374
+ ├── data_builder/
375
+ │ ├── AGENTS.heraspec.md
376
+ │ ├── heraspec/
377
+ │ ├── deploy_manifest.json ← manifest của data_builder
378
+ │ └── documentation/
379
+ └── another_module/
380
+ ├── AGENTS.heraspec.md
381
+ ├── heraspec/
382
+ ├── deploy_manifest.json ← manifest riêng của another_module
383
+ └── documentation/
384
+ ```
385
+
386
+ > **Rule**: `deploy_manifest.json` luôn nằm cùng cấp với `AGENTS.heraspec.md` và `heraspec/` — dù workspace đó là module con hay project độc lập.
387
+
388
+
389
+ ---
390
+
391
+ ## Inputs
392
+
393
+ - `deploy_manifest.json` — manifest file của project (xem templates/deploy_manifest.template.json)
394
+ - Codebase path — để Phase 1 discover routes
395
+ - Running site — để Phase 2 capture screenshots
396
+
397
+ ## Outputs
398
+
399
+ - Screenshot PNG/WebP files tại `output.images_dir`
400
+ - Updated `index.html` tại `output.html_file`
401
+ - Suggested entries (Phase 1 only) — danh sách để user review
402
+
403
+ ## Limitations
404
+
405
+ - Yêu cầu browser agent có khả năng điều khiển browser (navigate, click, screenshot)
406
+ - Login session không persistent giữa các lần chạy — phải login lại mỗi session
407
+ - Dynamic tokens (`{first_view_id}`, v.v.) cần site đang có dữ liệu thực
408
+ - HTML auto-update chỉ hoạt động nếu `index.html` có structure đúng format (có `#changelog-content`, `<img>` tags với đúng src pattern)
@@ -0,0 +1,176 @@
1
+ # Skill: Design System Reference (Cross-Cutting)
2
+
3
+ ## Purpose
4
+
5
+ This skill provides access to **54 real-world design systems** extracted from production websites (Stripe, Vercel, Linear, Supabase, Apple, etc.) in the Google Stitch DESIGN.md format. Each design system contains detailed color palettes, typography rules, component stylings, shadow systems, and agent-ready prompts.
6
+
7
+ Use this skill to create UIs that match the look and feel of specific well-known brands, or to find design inspiration from real-world references.
8
+
9
+ ## When to Use
10
+
11
+ - When user requests UI "like Stripe" / "inspired by Vercel" / "Linear-style"
12
+ - When building a product in a specific industry (fintech, devtools, AI) and need proven design patterns
13
+ - When you need precise color values, font weights, shadow values from real design systems
14
+ - When creating a DESIGN.md for a new project
15
+ - When comparing design approaches (e.g., Stripe vs Vercel shadow philosophies)
16
+
17
+ ## Prerequisites
18
+
19
+ None — this skill uses the same search engine as UI/UX skill.
20
+
21
+ ## Step-by-Step Process
22
+
23
+ ### Step 1: Identify the Design Reference
24
+
25
+ Determine which design system(s) are relevant:
26
+
27
+ **By brand name:**
28
+ ```bash
29
+ python3 scripts/search.py "stripe" --domain design-system
30
+ python3 scripts/search.py "linear dark mode" --domain design-system
31
+ python3 scripts/search.py "vercel minimal" --domain design-system
32
+ ```
33
+
34
+ **By style/industry:**
35
+ ```bash
36
+ python3 scripts/search.py "fintech premium dark" --domain design-system
37
+ python3 scripts/search.py "developer tools dark emerald" --domain design-system
38
+ python3 scripts/search.py "ai platform warm editorial" --domain design-system
39
+ python3 scripts/search.py "enterprise blue structured" --domain design-system
40
+ ```
41
+
42
+ **By visual technique:**
43
+ ```bash
44
+ python3 scripts/search.py "shadow-as-border" --domain design-system
45
+ python3 scripts/search.py "neon glow dark" --domain design-system
46
+ python3 scripts/search.py "blue-tinted shadows" --domain design-system
47
+ python3 scripts/search.py "luminance stacking" --domain design-system
48
+ ```
49
+
50
+ ### Step 2: Read the Full DESIGN.md
51
+
52
+ After finding a matching brand, read the complete DESIGN.md from knowledge base:
53
+
54
+ ```
55
+ knowledge/design-systems/<folder>/DESIGN.md
56
+ ```
57
+
58
+ The `Folder` field in search results tells you the directory name. For example:
59
+ - Stripe → `knowledge/design-systems/stripe/DESIGN.md`
60
+ - Linear → `knowledge/design-systems/linear.app/DESIGN.md`
61
+ - Supabase → `knowledge/design-systems/supabase/DESIGN.md`
62
+
63
+ ### Step 3: Apply the Design System
64
+
65
+ Use the `Agent_Quick_Prompt` from search results as a starting point, then reference the full DESIGN.md for details:
66
+
67
+ 1. **Colors**: Apply exact hex values from Color Palette section
68
+ 2. **Typography**: Use specified fonts, weights, and letter-spacing
69
+ 3. **Components**: Follow button, card, input, navigation specifications
70
+ 4. **Shadows**: Use exact shadow values (this is often what makes a design "feel" right)
71
+ 5. **Spacing**: Follow the spacing scale and border-radius values
72
+ 6. **Do's/Don'ts**: Respect the design system's guardrails
73
+
74
+ ### Step 4: Combine with UI/UX Skill
75
+
76
+ For maximum quality, combine design-system references with other UI/UX skill searches:
77
+
78
+ ```bash
79
+ # 1. Get the design system reference
80
+ python3 scripts/search.py "stripe" --domain design-system
81
+
82
+ # 2. Get UX guidelines
83
+ python3 scripts/search.py "animation" --domain ux
84
+ python3 scripts/search.py "accessibility" --domain ux
85
+
86
+ # 3. Get page structure
87
+ python3 scripts/search.py "pricing plans" --domain pages
88
+
89
+ # 4. Get stack-specific guidelines
90
+ python3 scripts/search.py "responsive layout" --stack html-tailwind
91
+ ```
92
+
93
+ ## Available Design Systems
94
+
95
+ ### By Category
96
+
97
+ | Category | Count | Examples |
98
+ |----------|-------|---------|
99
+ | **AI & ML** | 12 | Claude, Mistral AI, Ollama, Cursor, xAI, ElevenLabs |
100
+ | **Developer Tools** | 14 | Vercel, Linear, Supabase, Raycast, Warp, Sentry |
101
+ | **Infrastructure** | 6 | Stripe, MongoDB, HashiCorp, ClickHouse, Sanity |
102
+ | **Design & Productivity** | 10 | Notion, Figma, Framer, Miro, Airtable, Pinterest |
103
+ | **Fintech & Crypto** | 4 | Coinbase, Revolut, Wise, Kraken |
104
+ | **Enterprise & Consumer** | 8 | Apple, Airbnb, Spotify, BMW, SpaceX, Uber, IBM |
105
+
106
+ ### By Theme
107
+
108
+ | Theme | Brands |
109
+ |-------|--------|
110
+ | **Dark-mode native** | Linear, Supabase, Cursor, Spotify, SpaceX, Warp, Resend |
111
+ | **Light-first** | Stripe, Vercel, Notion, Apple, Mintlify, Ollama |
112
+ | **Both modes** | IBM, Uber, Framer, Lovable, Cohere, Together AI |
113
+
114
+ ### By Design Philosophy
115
+
116
+ | Philosophy | Brand | Key Technique |
117
+ |------------|-------|---------------|
118
+ | Weight-as-luxury | Stripe | font-weight: 300 for elegance |
119
+ | Shadow-as-border | Vercel | box-shadow: 0px 0px 0px 1px rgba() |
120
+ | Luminance stacking | Linear | Background opacity stepping for depth |
121
+ | Warm editorial | Claude | Terracotta accent, anti-tech-cold palette |
122
+ | Terminal-native | Resend, Warp | Monospace accents, dark void backgrounds |
123
+ | Full-bleed imagery | SpaceX | Text over cinematic photos |
124
+
125
+ ## Search Reference
126
+
127
+ ```bash
128
+ # Search by brand
129
+ python3 scripts/search.py "<brand-name>" --domain design-system
130
+
131
+ # Search by keywords
132
+ python3 scripts/search.py "<style-keywords>" --domain design-system
133
+
134
+ # Search with semantic mode
135
+ python3 scripts/search.py "elegant dark developer tool" --domain design-system --mode hybrid
136
+
137
+ # Multiple results
138
+ python3 scripts/search.py "fintech" --domain design-system -n 5
139
+ ```
140
+
141
+ ## DESIGN.md Format (Google Stitch Standard)
142
+
143
+ Each DESIGN.md file contains 9 standard sections:
144
+
145
+ 1. **Visual Theme & Atmosphere** — Design philosophy, mood, density
146
+ 2. **Color Palette & Roles** — Hex values with semantic roles
147
+ 3. **Typography Rules** — Font families, full type scale table
148
+ 4. **Component Stylings** — Buttons, cards, inputs with states
149
+ 5. **Layout Principles** — Spacing scale, grid, whitespace
150
+ 6. **Depth & Elevation** — Shadow system, surface hierarchy
151
+ 7. **Do's and Don'ts** — Design guardrails, anti-patterns
152
+ 8. **Responsive Behavior** — Breakpoints, touch targets
153
+ 9. **Agent Prompt Guide** — Quick reference prompts for AI agents
154
+
155
+ ## Updating Design Systems
156
+
157
+ Design system files are sourced from [awesome-design-md](https://github.com/VoltAgent/awesome-design-md). To update:
158
+
159
+ 1. Pull latest from `awesome-design-md` repository
160
+ 2. Copy updated `DESIGN.md` files to `knowledge/design-systems/<folder>/`
161
+ 3. Update `design-systems.csv` in `data/` if new brands are added
162
+ 4. Update `index.json` in `knowledge/design-systems/` with new entries
163
+
164
+ ## Tips for Best Results
165
+
166
+ 1. **Be specific** — "dark mode with purple accents" is better than "dark"
167
+ 2. **Reference real brands** — "like Stripe" gives much better results than "fintech"
168
+ 3. **Read the full DESIGN.md** — The CSV gives a summary, but the DESIGN.md has full specs
169
+ 4. **Combine skills** — Design-system + UI/UX + Stack = production-quality output
170
+ 5. **Use Agent_Quick_Prompt** — Each entry has a ready-to-use prompt in the CSV
171
+
172
+ ## Links to Other Skills
173
+
174
+ - **ui-ux**: Use together for comprehensive design system + UX guidelines
175
+ - **documents**: Use to document your project's design system
176
+ - **content-optimization**: Use to optimize CTA placement with brand colors