@invisibleloop/pulse 0.12.3 → 0.14.2

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 (181) hide show
  1. package/.claude/commands/build-page.md +5 -1
  2. package/.claude/commands/verify.md +31 -17
  3. package/.claude/pulse-checklist.md +21 -1
  4. package/.github/workflows/publish.yml +1 -0
  5. package/.pulse-verified +1 -0
  6. package/CLAUDE.md +56 -15
  7. package/docs/.claude/commands/verify.md +4 -0
  8. package/docs/.claude/pulse-checklist.md +20 -2
  9. package/docs/public/.pulse-ui-version +1 -1
  10. package/docs/public/andypixel.css +237 -0
  11. package/docs/public/bookworms.css +422 -0
  12. package/docs/public/coutumes.css +584 -0
  13. package/docs/public/images/bookworms/hero-books.jpg +0 -0
  14. package/docs/public/images/bookworms/how-we-read-now.jpg +0 -0
  15. package/docs/public/images/bookworms/lantern-keepers.jpg +0 -0
  16. package/docs/public/images/bookworms/provincial-bookseller.jpg +0 -0
  17. package/docs/public/images/journey/178.jpg +0 -0
  18. package/docs/public/images/journey/29.jpg +0 -0
  19. package/docs/public/images/retrowheels/hero.jpg +0 -0
  20. package/docs/public/images/shop/devbook-pro.jpg +0 -0
  21. package/docs/public/images/suzukibento/1015.jpg +0 -0
  22. package/docs/public/images/suzukibento/1025.jpg +0 -0
  23. package/docs/public/images/suzukibento/1043.jpg +0 -0
  24. package/docs/public/images/suzukibento/1059.jpg +0 -0
  25. package/docs/public/images/suzukibento/1062.jpg +0 -0
  26. package/docs/public/images/suzukibento/1084.jpg +0 -0
  27. package/docs/public/images/swish/1469334031218-e382a71b716b.jpg +0 -0
  28. package/docs/public/images/swish/1483985988355-763728e1935b.jpg +0 -0
  29. package/docs/public/images/swish/1485518882345-15568b007407.jpg +0 -0
  30. package/docs/public/images/swish/1490481651871-ab68de25d43d.jpg +0 -0
  31. package/docs/public/images/swish/1496747611176-843222e1e57c.jpg +0 -0
  32. package/docs/public/images/swish/1502716119720-b23a93e5fe1b.jpg +0 -0
  33. package/docs/public/images/swish/1539109136881-3be0616acf4b.jpg +0 -0
  34. package/docs/public/images/swish/1551803091-e20673f15770.jpg +0 -0
  35. package/docs/public/images/swish/1558769132-cb1aea458c5e.jpg +0 -0
  36. package/docs/public/images/swish/1572804013309-59a88b7e92f1.jpg +0 -0
  37. package/docs/public/journey.css +528 -0
  38. package/docs/public/pulse-ui.css +1036 -22
  39. package/docs/public/retrowheels.css +402 -0
  40. package/docs/public/shop.css +235 -0
  41. package/docs/public/sparkys.css +349 -0
  42. package/docs/public/suzukibento.css +517 -0
  43. package/docs/public/swish.css +394 -0
  44. package/docs/server.js +19 -4
  45. package/docs/src/lib/nav.js +14 -3
  46. package/docs/src/pages/components/decorate.js +74 -0
  47. package/docs/src/pages/components/gallery.js +102 -0
  48. package/docs/src/pages/components/hero.js +1 -0
  49. package/docs/src/pages/components/marquee.js +76 -0
  50. package/docs/src/pages/components/photo-card.js +74 -0
  51. package/docs/src/pages/components/section.js +40 -1
  52. package/docs/src/pages/meta.js +26 -0
  53. package/docs/src/pages/templates/andypixel.js +260 -0
  54. package/docs/src/pages/templates/bookworms.js +227 -0
  55. package/docs/src/pages/templates/coutumes.js +226 -0
  56. package/docs/src/pages/templates/journey.js +186 -0
  57. package/docs/src/pages/templates/retrowheels.js +342 -0
  58. package/docs/src/pages/templates/shop.js +257 -0
  59. package/docs/src/pages/templates/sparkys.js +249 -0
  60. package/docs/src/pages/templates/suzukibento.js +200 -0
  61. package/docs/src/pages/templates/swish.js +313 -0
  62. package/docs/src/pages/templates.js +313 -2
  63. package/docs/src/pages/testing.js +2 -1
  64. package/examples/.claude/commands/pulse-build.md +7 -0
  65. package/examples/.claude/commands/pulse-dev.md +7 -0
  66. package/examples/.claude/commands/pulse-start.md +9 -0
  67. package/examples/.claude/commands/pulse-stop.md +5 -0
  68. package/examples/.claude/commands/verify.md +84 -0
  69. package/examples/.claude/coverage-check.js +127 -0
  70. package/examples/.claude/pulse-checklist.md +177 -0
  71. package/examples/andypixel.css +237 -0
  72. package/examples/andypixel.js +258 -0
  73. package/examples/bookworms.css +422 -0
  74. package/examples/bookworms.js +225 -0
  75. package/examples/contact.js +1 -0
  76. package/examples/counter.js +1 -0
  77. package/examples/dev.server.js +17 -0
  78. package/examples/journey.css +528 -0
  79. package/examples/journey.js +186 -0
  80. package/examples/pricing.js +1 -0
  81. package/examples/public/.pulse-ui-version +1 -0
  82. package/examples/public/pulse-ui.css +4031 -0
  83. package/examples/public/pulse-ui.js +257 -0
  84. package/examples/quiz.js +1 -0
  85. package/examples/retrowheels.css +402 -0
  86. package/examples/retrowheels.js +340 -0
  87. package/examples/shared.js +6 -0
  88. package/examples/suzukibento.css +513 -0
  89. package/examples/suzukibento.js +200 -0
  90. package/examples/swish.css +394 -0
  91. package/examples/swish.js +311 -0
  92. package/examples/todos.js +1 -0
  93. package/package.json +2 -3
  94. package/public/.pulse-ui-version +1 -1
  95. package/public/images/bookworms/hero-books.jpg +0 -0
  96. package/public/images/bookworms/how-we-read-now.jpg +0 -0
  97. package/public/images/bookworms/lantern-keepers.jpg +0 -0
  98. package/public/images/bookworms/provincial-bookseller.jpg +0 -0
  99. package/public/images/journey/178.jpg +0 -0
  100. package/public/images/journey/29.jpg +0 -0
  101. package/public/images/retrowheels/hero.jpg +0 -0
  102. package/public/images/shop/devbook-pro.jpg +0 -0
  103. package/public/images/suzukibento/1015.jpg +0 -0
  104. package/public/images/suzukibento/1025.jpg +0 -0
  105. package/public/images/suzukibento/1043.jpg +0 -0
  106. package/public/images/suzukibento/1059.jpg +0 -0
  107. package/public/images/suzukibento/1062.jpg +0 -0
  108. package/public/images/suzukibento/1084.jpg +0 -0
  109. package/public/images/swish/1469334031218-e382a71b716b.jpg +0 -0
  110. package/public/images/swish/1483985988355-763728e1935b.jpg +0 -0
  111. package/public/images/swish/1485518882345-15568b007407.jpg +0 -0
  112. package/public/images/swish/1490481651871-ab68de25d43d.jpg +0 -0
  113. package/public/images/swish/1496747611176-843222e1e57c.jpg +0 -0
  114. package/public/images/swish/1502716119720-b23a93e5fe1b.jpg +0 -0
  115. package/public/images/swish/1539109136881-3be0616acf4b.jpg +0 -0
  116. package/public/images/swish/1551803091-e20673f15770.jpg +0 -0
  117. package/public/images/swish/1558769132-cb1aea458c5e.jpg +0 -0
  118. package/public/images/swish/1572804013309-59a88b7e92f1.jpg +0 -0
  119. package/public/pulse-ui.css +1080 -22
  120. package/scripts/build.js +72 -18
  121. package/src/agent/checklist.md +22 -2
  122. package/src/agent/commands/verify.md +4 -0
  123. package/src/agent/guide-components.md +146 -8
  124. package/src/agent/guide-design-gallery.md +288 -0
  125. package/src/agent/guide-design-references.md +172 -0
  126. package/src/agent/guide-explore.md +313 -0
  127. package/src/agent/guide-styles.md +212 -11
  128. package/src/agent/guide-templates.md +223 -10
  129. package/src/agent/guide.md +9 -4
  130. package/src/agent/identity.md +2 -1
  131. package/src/agent/skills/verify/SKILL.md +64 -28
  132. package/src/agent/workflow.md +247 -61
  133. package/src/cli/dev.js +39 -14
  134. package/src/cli/fmt.js +113 -0
  135. package/src/cli/index.js +60 -33
  136. package/src/cli/logger.js +145 -0
  137. package/src/cli/scaffold.js +57 -3
  138. package/src/html.js +6 -1
  139. package/src/mcp/server.js +2561 -99
  140. package/src/mcp/validate-worker.js +49 -5
  141. package/src/runtime/ssr.js +4 -1
  142. package/src/server/index.js +29 -5
  143. package/src/spec/schema.js +21 -0
  144. package/src/spec/schema.test.js +28 -0
  145. package/src/testing/html.js +130 -4
  146. package/src/testing/testing.test.js +58 -0
  147. package/src/ui/banner.js +24 -9
  148. package/src/ui/brand-statement.js +58 -0
  149. package/src/ui/button.js +13 -2
  150. package/src/ui/card.js +20 -1
  151. package/src/ui/colophon.js +29 -0
  152. package/src/ui/contact-row.js +41 -0
  153. package/src/ui/cta.js +18 -4
  154. package/src/ui/decorate.js +55 -0
  155. package/src/ui/display-heading.js +44 -0
  156. package/src/ui/drop-cap.js +29 -0
  157. package/src/ui/editorial-hero.js +63 -0
  158. package/src/ui/entry-list.js +36 -0
  159. package/src/ui/feature.js +20 -3
  160. package/src/ui/footer.js +78 -9
  161. package/src/ui/gallery.js +56 -0
  162. package/src/ui/hero.js +68 -18
  163. package/src/ui/image-pair.js +72 -0
  164. package/src/ui/index.js +20 -0
  165. package/src/ui/input.js +1 -0
  166. package/src/ui/marquee.js +48 -0
  167. package/src/ui/nav.js +19 -9
  168. package/src/ui/photo-card.js +44 -0
  169. package/src/ui/product-card.js +65 -0
  170. package/src/ui/pullquote.js +14 -3
  171. package/src/ui/search.js +1 -0
  172. package/src/ui/section-label.js +38 -0
  173. package/src/ui/section.js +1 -1
  174. package/src/ui/service-card.js +47 -0
  175. package/src/ui/stat-grid.js +40 -0
  176. package/src/ui/stat.js +16 -2
  177. package/src/ui/testimonial.js +17 -6
  178. package/src/ui/textarea.js +1 -0
  179. package/src/ui/top-strip.js +47 -0
  180. package/src/ui/trust-list.js +46 -0
  181. package/src/ui/ui.test.js +35 -0
@@ -2,6 +2,8 @@
2
2
 
3
3
  Templates are complete, production-ready page specs you can adapt for a new brand. Always start from a template when the user's request matches one — do not build from scratch.
4
4
 
5
+ **A template gives you the right *components and content slots* — not a mandatory section order.** The structural skeleton (hero → features → testimonials → CTA) suits corporate and minimal vibes. For playful, bold, brutalist, retro, and neon vibes, the template is a parts list, not a blueprint. Run `pulse_sketch` to find a layout that matches the emotional intent before you write a line of code.
6
+
5
7
  ---
6
8
 
7
9
  ## When to use a template
@@ -10,22 +12,96 @@ Read the user's request and match against the triggers below. If it matches, use
10
12
 
11
13
  | Template | Route | Triggers |
12
14
  |---|---|---|
13
- | Mobile App Landing | `docs/src/pages/templates/mobile-app.js` | "landing page for a mobile app", "app marketing site", "app homepage", "SaaS landing page" |
14
- | Blog Post | `docs/src/pages/templates/blog-post.js` | "blog post", "article page", "publication", "editorial site", "newsletter with blog" |
15
+ | Mobile App Landing | `docs/src/pages/templates/mobile-app.js` | "landing page for a mobile app", "app marketing site", "app homepage", "SaaS landing page" |
16
+ | Blog Post | `docs/src/pages/templates/blog-post.js` | "blog post", "article page", "publication", "editorial site", "newsletter with blog" |
17
+ | Local Business | `docs/src/pages/templates/local-business.js` | "local business", "dog groomer", "bakery", "physio", "plumber", "florist", "salon", "restaurant", "tradesperson", "small business" |
18
+ | Portfolio | `docs/src/pages/templates/portfolio.js` | "portfolio", "personal site", "freelancer site", "creative professional", "photographer", "designer site", "developer portfolio" |
19
+ | Event / Conference | `docs/src/pages/templates/event.js` | "conference", "event", "festival", "workshop", "concert", "meetup", "summit" |
20
+ | Editorial / Magazine | `docs/src/pages/templates/editorial.js` | "magazine", "publication", "news site", "editorial", "online journal", "newsletter homepage" |
21
+
22
+ **Always fetch `pulse://guide/design-references` after matching a template** — it tells you which vibe and component combinations suit the product's aesthetic, so you don't default to the same SaaS geometry every time.
15
23
 
16
24
  ---
17
25
 
18
- ## Before writing any code — mandatory pre-build questions
26
+ ## Creative-override rule — when to ignore the template structure
27
+
28
+ When the vibe is **playful, bold, brutalist, retro, or neon**, run `pulse_sketch` before writing any code and **treat the template section order as optional**. These vibes require structural decisions that the template's default skeleton actively works against.
29
+
30
+ | Signal | What to do |
31
+ |---|---|
32
+ | Vibe is playful / bold / brutalist / retro / neon | Run `pulse_sketch` — pick one of 3 layout directions |
33
+ | User says "fun", "pop-art", "loud", "unexpected", "editorial", "raw" | Run `pulse_sketch` — section order is your call |
34
+ | User says "professional", "clean", "trustworthy", "corporate", "minimal" | Template structure is fine — adapt content only |
35
+
36
+ **What this means in practice for expressive vibes:**
37
+
38
+ - The template tells you *what to include* (a hero, features, social proof, CTA). It does **not** tell you how to arrange them or what shape they take.
39
+ - Full-colour section blocks, oversized typography heroes, marquee strips, dense grids, and palette-as-structure are all fair game.
40
+ - The `phoneFrame` in Mobile App Landing is **not mandatory** — a full-bleed game board, an oversized illustration, or a typography-only hero may serve the brief better.
41
+ - `feature()` in a 3-column grid is the most predictable layout on the web. If the brief is "fun and bold", use a marquee strip of features, a zigzag alternating layout, or full-bleed feature sections instead.
42
+
43
+ ---
44
+
45
+ ## Template-mode: lighter planning
46
+
47
+ When using a template, skip the full plan-and-confirm ceremony. Instead, output a single compact confirmation before writing:
48
+
49
+ ```
50
+ Template: Mobile App Landing
51
+ App name: Nova
52
+ Substitutions: name, tagline, 5 features, 3 pricing tiers, palette, font
53
+ Theme: light (palette: #6366f1 primary, #f8fafc bg)
54
+ Files: src/pages/nova.js, public/themes/nova.css
55
+ Confirm to proceed — or reply with changes.
56
+ ```
57
+
58
+ Wait one turn for confirmation. This replaces the full plan/build/confirm cycle. It is enough — the user can see exactly what will change.
19
59
 
20
- Ask these **before** presenting a plan. Do not skip them.
60
+ **Do not skip the confirmation.** Even for templates, one turn of "does this look right?" prevents throwing away a completed build because the app name or palette was wrong.
21
61
 
22
- 1. **Colour palette** — "Do you have a colour palette, or should I choose one?"
23
- 2. **Brand fonts** — "Any brand fonts, or system-ui is fine?"
24
- 3. **Theme** — "Light or dark theme preference?"
62
+ ### One-shot builds without a template
25
63
 
26
- Record the answers. If the user provides palette colours, note which are light/mid/dark toned so you can plan contrast strategy before writing any CSS.
64
+ For a one-shot "build me X" request that doesn't use a named template, use the same compact style — a 3–5 line brief, not a full phase-2 plan:
27
65
 
28
- **Why this matters:** Building with placeholder colours and retrofitting a palette requires rebuilding components, fixing WCAG contrast failures, and touching multiple files. Getting the palette upfront avoids that loop entirely.
66
+ ```
67
+ Building: Chess Club landing page (/chess-club)
68
+ Vibe: editorial · dark navy + gold · brutalist structure
69
+ Sections: hero, about, schedule, join CTA
70
+ Files: src/pages/chess-club.js, public/themes/chess-club.css
71
+ Confirm to proceed — or reply with changes.
72
+ ```
73
+
74
+ Reserve the full plan-and-confirm ceremony (route / state / mutations / actions / server fetchers) for multi-page builds, pages with complex state, or when the user hasn't confirmed the scope yet.
75
+
76
+ ---
77
+
78
+ ## Before writing any code — mandatory product intake
79
+
80
+ Run `pulse_intake` before presenting the confirmation. It collects the product details that make template content directionally right instead of fiction.
81
+
82
+ **How to gather the intake information** — ask questions one at a time as plain prose, never as a batch with multiple-choice options. Product details are open-ended and free-form; preset choice lists don't fit and cause tool errors. Ask the simplest possible version of each question:
83
+
84
+ 1. "What's the name of the app or product?"
85
+ 2. "One sentence — what does it do?"
86
+ 3. "What are its main features? Give me 3–6."
87
+ 4. "Who's it for?" *(optional — skip if obvious from context)*
88
+ 5. "Do you have brand colours? If so, paste the hex values."
89
+ 6. "Any specific font, or system-ui?"
90
+ 7. "Light or dark theme preference?"
91
+ 8. "How should it feel visually? (e.g. warm and friendly, editorial and sharp, playful, minimal, bold — or describe in your own words)"
92
+ 9. "Do you have any design inspiration — a site you love, a screenshot, a mood board image? Drop images into `public/intake/` or paste a URL and I'll extract the design intent before we start."
93
+
94
+ Ask each question and wait for the answer before asking the next. Do not present a list of preset choices for any of these — the answers are arbitrary text.
95
+
96
+ **Question 9 is not optional.** Always ask it. If the user provides an image in `public/intake/`, call `pulse_extract_inspiration` on it before calling `pulse_intake`. If they provide a URL, call `pulse_extract_inspiration` with the URL. If they say no or skip it, proceed without — but always ask.
97
+
98
+ Once you have the answers, call `pulse_intake` with the collected details. It returns a product brief + early contrast warnings.
99
+
100
+ **If `pulse_intake` is unavailable**, gather the answers via the questions above and use them directly when adapting the template — replace every placeholder with real content.
101
+
102
+ **Do not invent app content.** Placeholder copy ("Lorem ipsum", "Feature A", "Benefit here") is thrown away immediately and makes the build feel broken. Real answers mean the first build is shippable copy.
103
+
104
+ Record the intake answers. If the user provides palette hex values, note which are light/mid/dark toned before writing any CSS — this is when to spot contrast problems, not after Lighthouse runs.
29
105
 
30
106
  ---
31
107
 
@@ -237,7 +313,144 @@ Do NOT set `meta.theme: 'light'` on dark templates — the default pulse-ui them
237
313
 
238
314
  ---
239
315
 
240
- ## Adding a new template
316
+ ## Local Business Landing Page
317
+
318
+ **Design direction:** Warm Local Business · **Vibe:** `warm` · **Theme:** `light`
319
+
320
+ ### What it includes
321
+
322
+ | Section | Component(s) |
323
+ |---|---|
324
+ | Sticky nav | `nav` with logo, links, Book Now CTA |
325
+ | Hero | `hero(layout:'split')` with real photo of the business |
326
+ | Stats strip | `stat` × 4 in `grid` — clients, rating, years, availability |
327
+ | Services | `card` × 6 in `grid` with name, description, and price |
328
+ | About | Two-column: photo + team bio with trust badges |
329
+ | Reviews | `testimonial` × 3 in `grid` |
330
+ | Contact / Hours | Two-column: address/phone/hours + booking form |
331
+ | CTA banner | `cta` with offer (e.g. 10% off first visit) |
332
+ | Footer | `footer` with address in `legal` |
333
+
334
+ ### Files to create
335
+
336
+ | File | Purpose |
337
+ |---|---|
338
+ | `src/pages/[name].js` | The page spec |
339
+ | `public/themes/[name].css` | Brand theme — warm palette, `[data-theme="light"]` |
340
+
341
+ ### Adapting the template
342
+
343
+ 1. **Business name** — replace "Pawfect Grooming" everywhere.
344
+ 2. **Service type** — update service names, descriptions, and prices to match the business.
345
+ 3. **Photo** — the hero image and about section both use real photos; provide Unsplash URLs or placeholder paths. **If using external images**, add the host to `csp` in `pulse.config.js` (see pulse://guide/styles for examples).
346
+ 4. **Palette** — earthy, warm tones work best. Terracotta, sage, cream, amber — avoid corporate blues.
347
+ 5. **Contact details** — update address, phone, and opening hours in the contact section.
348
+ 6. **Vibe** — always `warm` for local business; pairs with rounded cards and soft section dividers.
349
+
350
+ ---
351
+
352
+ ## Portfolio / Personal Site
353
+
354
+ **Design direction:** Minimal Portfolio · **Vibe:** `minimal` · **Theme:** dark (default)
355
+
356
+ ### What it includes
357
+
358
+ | Section | Component(s) |
359
+ |---|---|
360
+ | Nav | Minimal nav — name as logo, text links, no CTA |
361
+ | Hero | `hero(layout:'centered', align:'left')` — title and short bio |
362
+ | Work grid | `card` × 6 with image, project name, description, skill badges |
363
+ | About | Single-column `container(size:'sm')` with `prose`-style paragraphs + skill badges |
364
+ | Contact | Centered section with email link, GitHub link, CV download |
365
+ | Footer | Minimal — name, 3 links, legal |
366
+
367
+ ### Files to create
368
+
369
+ | File | Purpose |
370
+ |---|---|
371
+ | `src/pages/[name].js` | The page spec |
372
+
373
+ Portfolio templates rarely need a separate theme CSS — the default dark palette with a single accent colour is sufficient. If the user has a brand colour, add it as a one-liner: `--ui-accent: #hex;` in `:root`.
374
+
375
+ ### Adapting the template
376
+
377
+ 1. **Name** — replace "Alex Mercer" everywhere, including the nav logo.
378
+ 2. **Profession** — update the eyebrow and hero subtitle.
379
+ 3. **Work grid** — replace with real project images, names, and descriptions. Use Unsplash or actual project screenshots. **If using external images**, add the host to `csp` in `pulse.config.js` (see pulse://guide/styles).
380
+ 4. **Skills badges** — update to match the person's actual disciplines.
381
+ 5. **Contact** — replace email, GitHub handle, and CV download link.
382
+ 6. **Vibe** — `minimal` keeps the focus on the work; do not add excess decoration.
383
+
384
+ ---
385
+
386
+ ## Event / Conference Landing Page
387
+
388
+ **Design direction:** Event / Conference · **Vibe:** `bold` · **Theme:** dark (default)
389
+
390
+ ### What it includes
391
+
392
+ | Section | Component(s) |
393
+ |---|---|
394
+ | Nav | `nav` with event logo, links, Get Tickets CTA |
395
+ | Hero | `hero(size:'xl', align:'center')` with gradient background |
396
+ | Stats strip | `stat` × 4 — days, speakers, attendees, tracks |
397
+ | Sponsor logos | `marquee` with sponsor names/logos |
398
+ | Speakers | `card` × 8 in `grid` with photo, name, role, topic |
399
+ | Schedule | `accordion` — one item per day with time/session/location |
400
+ | Venue | Two-column: venue info + photo |
401
+ | Tickets CTA | `cta` with prominent ticket button |
402
+ | Footer | `footer` with event links and company legal |
403
+
404
+ ### Files to create
405
+
406
+ | File | Purpose |
407
+ |---|---|
408
+ | `src/pages/[name].js` | The page spec |
409
+ | `public/themes/[name].css` | Optional — if brand has a specific accent colour |
410
+
411
+ ### Adapting the template
412
+
413
+ 1. **Event name and dates** — replace "SIGNAL", "14–16 October 2026", and "London" everywhere.
414
+ 2. **Speakers** — replace with real speaker names, roles, photos, and talk topics.
415
+ 3. **Schedule** — update accordion items with real session titles and times.
416
+ 4. **Venue** — update name, address, capacity, and photo.
417
+ 5. **Ticket price and URL** — update the ticket CTA with real link and price.
418
+ 6. **Gradient hero** — adjust the gradient colours to match the event brand.
419
+ 7. **Vibe** — `bold` for impact; consider `neon` for gaming/tech events.
420
+
421
+ ---
422
+
423
+ ## Editorial / Magazine Landing Page
424
+
425
+ **Design direction:** Editorial / Publication · **Vibe:** `editorial` · **Theme:** dark (default)
426
+
427
+ ### What it includes
428
+
429
+ | Section | Component(s) |
430
+ |---|---|
431
+ | Nav | `nav` with publication name + category links + Subscribe CTA |
432
+ | Hero | `hero` with featured article title, deck, and author byline |
433
+ | Pullquote | `pullquote` from the featured article |
434
+ | Article grid | `card` × 6 with image, category badge, title, deck, author, date, read time |
435
+ | Newsletter signup | `section(variant:'spotlight')` with email input and subscribe button |
436
+ | Footer | `footer` with publication logo, category links, legal |
437
+
438
+ ### Files to create
439
+
440
+ | File | Purpose |
441
+ |---|---|
442
+ | `src/pages/[name].js` | The page spec |
443
+
444
+ ### Adapting the template
445
+
446
+ 1. **Publication name** — replace "The Signal" everywhere.
447
+ 2. **Navigation categories** — update section names to match the publication's editorial categories.
448
+ 3. **Featured article** — replace hero title and subtitle with the actual lead story.
449
+ 4. **Article grid** — replace all 6 article stubs with real or representative articles.
450
+ 5. **Newsletter copy** — update the newsletter description and subscriber count.
451
+ 6. **Vibe** — `editorial` applies serif display font and zero-radius geometry; critical for the right feel. Do not change it.
452
+
453
+ ---
241
454
 
242
455
  When you build a new template and want it available for future scaffolding:
243
456
 
@@ -497,13 +497,18 @@ Convention: name dynamic-route files [param].js inside a subfolder:
497
497
 
498
498
  This is purely a human readability convention. Pulse does not process [ ] in filenames.
499
499
 
500
- ## UI components — MANDATORY
500
+ ## UI components
501
501
 
502
- **RULE: Before writing any HTML, check whether a Pulse UI component exists for the purpose. If it does, you MUST use it. Raw HTML is only permitted for structural tags with no component equivalent (div, main, aside, footer, header).**
502
+ **Default rule: Before writing any HTML, check whether a Pulse UI component exists for the purpose. If it does, use it.** Components ship with correct ARIA, token-based styling, and responsive behaviour — choosing them over raw HTML means less work, not more.
503
503
 
504
- **RULE: For every feature, page, or UI element you build — regardless of how the request is phrased, whether it came from text or an image — your first step is always to check whether a Pulse UI component exists for it. If it does, you MUST use it. There are no exceptions.**
504
+ **Creative override:** When the design intent genuinely calls for a more expressive or unconventional layout — a distinctive visual identity, an asymmetric or typographically-driven composition, a brutalist or editorial structure that components would constrain — you may build with raw HTML instead. This is not a loophole; it is a deliberate design decision. When taking this path:
505
505
 
506
- Before writing a single line of HTML, mentally scan the task and list which components apply. Only after exhausting the component list should you write raw HTML — and only for structural wrappers (div, main, aside, footer) with no component equivalent.
506
+ 1. **State your intent explicitly** in the build brief: *"Building component-free — raw HTML throughout for maximum creative control."*
507
+ 2. **Pulse-ui.css is still required** — always load it in `meta.styles`. It provides the token system (`--ui-*` variables) that your custom CSS will reference.
508
+ 3. **Functional atoms (`button`, `input`, `badge`, `modal`) should still come from components** unless there is a specific design reason to hand-roll them. These are the hardest to get right for accessibility.
509
+ 4. **The quality gate replaces the component checklist** — 100/100/100/100 Lighthouse (Accessibility, Best Practices, SEO, Agentic Browsing) on both desktop and mobile is the arbiter. A component-free page that passes every Lighthouse audit is correct. A component-heavy page that fails accessibility is not.
510
+
511
+ Before writing a single line of HTML, decide which mode you are in and state it in the build brief:
507
512
 
508
513
  **RULE: All components accept a `class` prop — never `className` (that is React). Use `class` to add utility classes or custom identifiers to any component.**
509
514
 
@@ -51,7 +51,8 @@ Every build task follows a fixed sequence of phases with explicit pass gates. Fe
51
51
  2. **Plan** — present your plan, wait for user confirmation (skip only for trivially small tasks)
52
52
  3. **Build** — write the spec and related files
53
53
  4. **Validate** — `pulse_validate` must be clean before continuing
54
- 5. **Browser** — screenshot + Lighthouse desktop + Lighthouse mobile, all 100/100/100 before continuing
54
+ 5. **Design approval** *(new builds only)* — take a screenshot, show the user, **wait for their go-ahead on layout and direction** before running any slow checks. For edits/fixes, skip this.
55
+ 5. **Verify** — `pulse_design_review` → `pulse_layout_review` → Lighthouse desktop + mobile, all 100/100/100 before continuing
55
56
  6. **Tests** — write and run tests, all must pass before continuing
56
57
  7. **Review Agent** — invoke only after phases 4–6 all pass
57
58
  8. **Fix** — fix every review issue, re-run any affected gates
@@ -1,12 +1,14 @@
1
1
  ---
2
2
  name: verify
3
- description: "Run the full verification loop on the current page or the page specified in $ARGUMENTS. If $ARGUMENTS is provided, use it as the file path or route. Otherwise, identify the most recently edited spec file from context. Use `pulse_validate` with the spec file content. If validation fails, report every error clearly and stop — do not proceed to screenshot until the spec is valid."
3
+ description: "Run the full verification loop on the current page or the page specified in $ARGUMENTS. If $ARGUMENTS is provided, use it as the file path or route. Otherwise, identify the most recently edited spec file from context."
4
4
  ---
5
5
 
6
6
  # Verify
7
7
 
8
8
  Run the full verification loop on the current page or the page specified in $ARGUMENTS.
9
9
 
10
+ **Output style:** be terse throughout. One sentence per step. Do not quote raw tool output — summarise findings only. Reserve detail for failures that need explaining.
11
+
10
12
  ## Steps
11
13
 
12
14
  ### 1. Identify the target
@@ -15,53 +17,87 @@ If $ARGUMENTS is provided, use it as the file path or route. Otherwise, identify
15
17
 
16
18
  ### 2. Validate the spec
17
19
 
18
- Use `pulse_validate` with the spec file content. If validation fails, report every error clearly and stop — do not proceed to screenshot until the spec is valid.
20
+ Run `pulse_validate` on the spec file. Report clean or list errors. Stop if there are errors — do not continue until the spec is valid.
19
21
 
20
22
  ### 3. Check the dev server
21
23
 
22
- Use `pulse_fetch_page` to confirm the server is responding for the route. If it errors, use `pulse_restart_server` and retry once.
24
+ Run `pulse_fetch_page` to confirm the server is responding. If it errors, run `pulse_restart_server` and retry once. Report HTTP status only — do not quote the HTML body.
25
+
26
+ **If the response has no `X-Pulse` header**, the wrong server is running on that port — stop and tell the user before continuing.
23
27
 
24
28
  ### 4. Screenshot
25
29
 
26
- Use the chrome-devtools navigate_page tool to load the page route, then take_screenshot to capture the result. Describe what you see — layout, content, any obvious rendering issues.
30
+ Navigate to the page route with `mcp__chrome-devtools__navigate_page`, then take a screenshot with `mcp__chrome-devtools__take_screenshot`. Describe what you see in 2–3 plain sentences — layout structure, visual tone, key sections. Do not list features or code details.
31
+
32
+ ### 4a. Design approval gate *(new builds only)*
33
+
34
+ **If `pulse_intake` ran earlier in this session** (i.e. this is a new page or site, not an edit or bug fix):
35
+
36
+ 1. Show the screenshot to the user.
37
+ 2. Ask: *"Happy with the layout and direction, or any changes before I run Lighthouse?"*
38
+ 3. **Stop and wait for their response.** Do not proceed to step 4b or Lighthouse until the user explicitly approves.
39
+
40
+ If the user requests changes: make edits, restart the server, take a new screenshot, describe what changed, ask again. Repeat until approved. No Lighthouse between design rounds.
41
+
42
+ **For edits, bug fixes, or "add X to existing Y"** — skip this step and go straight to 4b.
43
+
44
+ ### 4b. Design review *(if `pulse_intake` ran)*
45
+
46
+ Run `pulse_design_review`. Work through every signal it returns. Fix any Fail before continuing. Report pass/fail count only — do not quote the full output.
47
+
48
+ ### 4c. Layout review
49
+
50
+ Run `pulse_layout_review` with the page URL. It checks 390/768/1280px viewports for overflow, broken images, and collapsed sections. Fix any failures before continuing. Report pass or list failures only.
51
+
52
+ ### 5. Production build
53
+
54
+ Run `pulse_build` to start the production server on port 3001. Tell the user: "Building for production — ~30s…" before calling it.
55
+
56
+ ### 6. Lighthouse — desktop
57
+
58
+ Navigate to `http://localhost:3001/<route>` with `mcp__chrome-devtools__navigate_page`, then run `mcp__chrome-devtools__lighthouse_audit` with `device: "desktop"`.
59
+
60
+ **Pass bar: Accessibility, Best Practices, and SEO must all be 100.** Report scores as a single line, e.g. `Accessibility 100 · Best Practices 100 · SEO 100`. If any score is below 100, identify the failing audit(s), fix, and restart from step 2.
61
+
62
+ ### 7. Lighthouse — mobile
27
63
 
28
- ### 5. Lighthouse — desktop
64
+ Run `mcp__chrome-devtools__lighthouse_audit` with `device: "mobile"` against the same production URL. Same pass bar. Report scores as a single line. Fix failures and restart from step 2 if needed.
29
65
 
30
- Run lighthouse_audit on the route in desktop mode.
66
+ **To inspect mobile layout** use `mcp__chrome-devtools__emulate` with `viewport: "390x844x2,mobile,touch"` — not `resize_page`. Reset with `"1440x900x1"` afterward.
31
67
 
32
- **Pass bar: Accessibility, Best Practices, and SEO must all be 100.** Report the actual scores. If any score is below 100, identify the failing audit(s), fix the issue, and restart from step 2.
68
+ ### 8. Performance
33
69
 
34
- ### 6. Lighthouse — mobile
70
+ Navigate to the page route, then run `mcp__chrome-devtools__performance_start_trace` with `reload: true` and `autoStop: true`. Report LCP and CLS as a single line, e.g. `LCP 73ms · CLS 0.00`. Flag any insight that identifies a fixable cause (render-blocking resources, large image delay). CLS must be 0.00.
35
71
 
36
- Run lighthouse_audit on the same route in mobile mode.
72
+ ### 9. Console errors
37
73
 
38
- **Same pass bar: all three categories must be 100.** Report the actual scores. If any score is below 100, fix and restart from step 2.
74
+ Run `mcp__chrome-devtools__list_console_messages` filtered to errors and warnings. Report count only if clean. List any errors found.
39
75
 
40
- ### 7. Performance
76
+ ### 10. Code review
41
77
 
42
- Navigate to the page route, then run performance_start_trace with `reload: true` and `autoStop: true`. Report LCP and CLS. Flag any LCP insight that suggests a fixable problem (render-blocking resources, large image load delay, etc.).
78
+ Run `pulse_review` with the absolute path to the spec file. Work through every item in the checklist it returns. Fix every issue before proceeding. Report pass or list what was fixed — do not quote the full review output.
43
79
 
44
- ### 8. Console errors
80
+ ### 11. Close the browser
45
81
 
46
- Use list_console_messages — report any errors or unexpected warnings.
82
+ Run `mcp__chrome-devtools__list_pages`, then `mcp__chrome-devtools__close_page` for every page ID returned. `pageId` must be a JSON number, not a string.
47
83
 
48
- ### 9. Code review
84
+ ### 12. Write verification stamp
49
85
 
50
- Use `pulse_review` to switch into reviewer mode. Read the spec against the checklist in `.github/instructions/pulse-checklist.instructions.md`. Work through every item. Fix anything that fails before proceeding.
86
+ ```bash
87
+ date +%s > .pulse-verified
88
+ ```
51
89
 
52
- ### 10. Close the browser
90
+ **This must be the last write before stopping.** Do not edit any spec file after writing the stamp.
53
91
 
54
- Use list_pages to get all open pages, then call close_page for every page ID returned.
92
+ ### 13. Report
55
93
 
56
- ### 11. Report
94
+ One short paragraph covering: validation, Lighthouse desktop/mobile scores, LCP, CLS, console, review. Flag anything that needed fixing. No raw tool output.
57
95
 
58
- Summarise:
59
- - Validation: pass or fail (with errors if any)
60
- - Visual: what was visible in the screenshot
61
- - Lighthouse desktop: scores for all three categories
62
- - Lighthouse mobile: scores for all three categories
63
- - Performance: LCP and CLS values, any flagged insights
64
- - Console: any errors
65
- - Review: pass or issues found and fixed
96
+ **Pass bar — all must be met:**
97
+ - Validation: clean
98
+ - Lighthouse desktop: Accessibility, Best Practices, SEO all 100
99
+ - Lighthouse mobile: same
100
+ - CLS: 0.00
101
+ - Console: no errors
66
102
 
67
- Only confirm the page is good when validation passes, both Lighthouse runs are 100/100/100, CLS is 0.00, and there are no console errors. Otherwise, fix and run `/verify` again.
103
+ If any gate fails, fix and run `/verify` again.