@jaimevalasek/aioson 1.7.0 → 1.7.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 (34) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/package.json +1 -1
  3. package/src/constants.js +13 -0
  4. package/template/.aioson/agents/copywriter.md +463 -0
  5. package/template/.aioson/agents/dev.md +29 -1
  6. package/template/.aioson/agents/deyvin.md +1 -0
  7. package/template/.aioson/agents/neo.md +5 -1
  8. package/template/.aioson/agents/qa.md +101 -0
  9. package/template/.aioson/agents/setup.md +17 -1
  10. package/template/.aioson/agents/squad.md +190 -0
  11. package/template/.aioson/agents/ux-ui.md +169 -3
  12. package/template/.aioson/genomes/copywriting.md +204 -0
  13. package/template/.aioson/skills/design/cognitive-core-ui/references/motion.md +2 -0
  14. package/template/.aioson/skills/marketing/references/anti-patterns.md +254 -0
  15. package/template/.aioson/skills/marketing/references/fascinations.md +192 -0
  16. package/template/.aioson/skills/marketing/references/five-acts.md +248 -0
  17. package/template/.aioson/skills/marketing/references/market-intelligence.md +198 -0
  18. package/template/.aioson/skills/marketing/references/offer-structure.md +203 -0
  19. package/template/.aioson/skills/marketing/references/one-belief.md +149 -0
  20. package/template/.aioson/skills/marketing/references/patterns.md +218 -0
  21. package/template/.aioson/skills/marketing/references/pms-research.md +193 -0
  22. package/template/.aioson/skills/marketing/vsl-craft.md +385 -0
  23. package/template/.aioson/skills/static/landing-page-deploy.md +192 -0
  24. package/template/.aioson/skills/static/landing-page-forge.md +730 -0
  25. package/template/.aioson/skills/static/ui-ux-modern.md +1 -0
  26. package/template/.aioson/tasks/squad-create.md +22 -0
  27. package/template/.aioson/tasks/squad-design.md +30 -0
  28. package/template/.aioson/templates/squads/digital-marketing-agency/template.json +96 -0
  29. package/template/CLAUDE.md +1 -0
  30. package/template/.aioson/skills/design-system/components/SKILL.md:Zone.Identifier +0 -0
  31. package/template/.aioson/skills/design-system/dashboards/SKILL.md:Zone.Identifier +0 -0
  32. package/template/.aioson/skills/design-system/foundations/SKILL.md:Zone.Identifier +0 -0
  33. package/template/.aioson/skills/design-system/motion/SKILL.md:Zone.Identifier +0 -0
  34. package/template/.aioson/skills/design-system/patterns/SKILL.md:Zone.Identifier +0 -0
@@ -404,6 +404,107 @@ After writing the QA report, run a self-check: count ACs with status "Covered" v
404
404
  - **SMALL:** full checklist + stack-specific tests for all critical flows.
405
405
  - **MEDIUM:** full checklist + invariant tests + load assumptions documented.
406
406
 
407
+ ## Web validation mode (project_type=site)
408
+
409
+ Activate automatically when `project_type=site` is detected in `project.context.md`, or when the user asks to validate a landing page, sales page, event page, or any HTML/CSS site.
410
+
411
+ This replaces the standard code review checklist with a web-specific validation suite.
412
+
413
+ ### Step W1 — Functional validation
414
+ - [ ] All CTA buttons and anchor links navigate to the correct target or open the correct form
415
+ - [ ] Form submits correctly: shows success state, shows error state, does not double-submit
416
+ - [ ] No broken images (all `src` paths resolve)
417
+ - [ ] No console errors in Chrome DevTools
418
+
419
+ ### Step W2 — Responsive validation (test each breakpoint)
420
+ | Breakpoint | Width | Must pass |
421
+ |---|---|---|
422
+ | Mobile S | 375px | No horizontal overflow, CTA visible above fold, text readable |
423
+ | Mobile L | 430px | Same |
424
+ | Tablet | 768px | Layout shifts gracefully from 1-col to 2-col |
425
+ | Desktop | 1280px | Full layout, no text line > 80 chars wide |
426
+
427
+ - [ ] No element causes horizontal scroll on mobile
428
+ - [ ] Primary CTA visible above fold on 375px without scrolling
429
+ - [ ] Touch targets ≥ 48px height on mobile
430
+
431
+ ### Step W3 — Performance validation
432
+ Run via PageSpeed Insights (`https://pagespeed.web.dev/`) or Lighthouse CLI:
433
+ - [ ] Mobile score ≥ 90
434
+ - [ ] LCP (Largest Contentful Paint) < 2.5 s
435
+ - [ ] CLS (Cumulative Layout Shift) < 0.1
436
+ - [ ] All images below fold have `loading="lazy"`
437
+ - [ ] Hero image has `<link rel="preload" as="image">` in `<head>`
438
+ - [ ] No render-blocking scripts without `defer` or `async`
439
+ - [ ] `@media (prefers-reduced-motion: reduce)` present in CSS
440
+
441
+ If running Lighthouse CLI: `lighthouse {url} --output=json --only-categories=performance`
442
+
443
+ ### Step W4 — SEO / LLMO validation
444
+ - [ ] Single `<h1>` per page
445
+ - [ ] `<meta name="description">` present and 150–160 chars
446
+ - [ ] `<link rel="canonical">` present and correct
447
+ - [ ] OG tags: `og:title`, `og:description`, `og:image` (1200×630), `og:url`
448
+ - [ ] JSON-LD schema present before `</body>`
449
+ - [ ] `/robots.txt` accessible and allows crawling
450
+ - [ ] `/sitemap.xml` accessible and valid XML
451
+ - [ ] `/llms.txt` present (LLMO discoverability)
452
+
453
+ ### Step W5 — Tracking validation
454
+ Verify with Meta Pixel Helper browser extension or equivalent:
455
+ - [ ] Meta Pixel `PageView` fires on page load (if Pixel ID configured)
456
+ - [ ] `fbq('init', 'PIXEL_ID')` called before any `fbq('track', ...)` call
457
+ - [ ] GTM fires on page load (if GTM container configured)
458
+ - [ ] UTM parameters captured in `sessionStorage` when visiting with `?utm_source=test`
459
+ - [ ] UTM values injected as hidden fields on form submit
460
+ - [ ] `Lead` event fires on form submit (if Pixel configured)
461
+
462
+ If Pixel ID or GTM container is `PENDING` in the spec, flag as `[W5-PENDING]` — not a blocking failure.
463
+
464
+ ### Step W6 — Cross-browser validation
465
+ Test in:
466
+ - [ ] Chrome (latest)
467
+ - [ ] Safari (latest, or iOS Safari on mobile)
468
+ - [ ] Firefox (latest)
469
+
470
+ Known cross-browser issues to check:
471
+ - CSS `backdrop-filter` not supported in older Firefox — check fallback
472
+ - CSS `clamp()` works in all modern browsers — verify if targeting IE
473
+ - GSAP and AnimeJS work in all modern browsers — verify CDN loads
474
+ - `gap` in Flexbox not supported in Safari < 14 — use `margin` fallback
475
+
476
+ ### Step W7 — Conversion quality checks
477
+ - [ ] Single primary action per section (no competing CTAs)
478
+ - [ ] Primary CTA uses action verb (not "Learn More" or "Click Here")
479
+ - [ ] Trust signals visible before the first CTA (social proof, logos, testimonials, or stats)
480
+ - [ ] Form fields: only fields absolutely necessary (fewer fields = higher conversion)
481
+ - [ ] H1 communicates the value proposition, not just the product name
482
+ - [ ] No dead whitespace sections with no clear purpose
483
+
484
+ ### Web validation report format
485
+
486
+ ```
487
+ ## Web Validation Report — [Page/Project] — [Date]
488
+
489
+ ### W1 Functional: ✓ PASS | ✗ FAIL (list issues)
490
+ ### W2 Responsive: ✓ PASS | ✗ FAIL (list breakpoints with issues)
491
+ ### W3 Performance: Score [mobile] / [desktop] — LCP [ms] — CLS [score]
492
+ ### W4 SEO/LLMO: [N]/8 checks passed
493
+ ### W5 Tracking: [N]/6 checks passed — [PENDING items noted]
494
+ ### W6 Cross-browser: ✓ Chrome ✓ Safari ✓ Firefox | issues: [list]
495
+ ### W7 Conversion: [N]/6 checks passed
496
+
497
+ ### Critical (blocks launch)
498
+ - [issue]: [location] → [fix]
499
+
500
+ ### Important (degrades conversion)
501
+ - [issue]: [location] → [fix]
502
+
503
+ ### VERDICT: LAUNCH-READY | NEEDS-FIXES | BLOCKED
504
+ - LAUNCH-READY: all Critical resolved, W3 score ≥ 90, W4 ≥ 6/8, W5 tracking configured or PENDING
505
+ - NEEDS-FIXES: Critical issues present or performance < 90
506
+ - BLOCKED: broken forms, broken CTAs, or tracking completely absent (not PENDING)
507
+ ```
407
508
 
408
509
  > **`.aioson/context/` rule:** this folder accepts only `.md` files. Never write `.html`, `.css`, `.js`, or any other non-markdown file inside `.aioson/`.
409
510
 
@@ -317,6 +317,21 @@ If no clear signal, use the neutral question format:
317
317
 
318
318
  For `api`, `script`, and non-UI-first scopes, keep `design_skill` empty unless the user explicitly asks to register one.
319
319
 
320
+ ### Step 5b — Genomes (project_type=site only)
321
+
322
+ When `project_type=site`, check if `.aioson/genomes/copywriting.md` exists:
323
+ - If it exists: note it in setup output — `@copywriter` will load it automatically.
324
+ - If it doesn't exist: this is expected for fresh projects. The copywriting genome ships with the AIOSON template. `@copywriter` will use LLM baseline if no genome is available.
325
+
326
+ Also check for domain-specific genomes in `.aioson/genomes/` that match the project's domain. Note them if found — they help `@copywriter` write more targeted copy.
327
+
328
+ Record genomes in `project.context.md`:
329
+ ```yaml
330
+ genomes: ["copywriting"] # or ["copywriting", "domain-slug"] if domain genome exists
331
+ ```
332
+
333
+ For non-site projects, omit the `genomes` field or leave it empty unless the user explicitly requests a genome.
334
+
320
335
  ---
321
336
 
322
337
  ### Tech reference — use when user needs to choose
@@ -589,7 +604,8 @@ After setup is complete, always close with the recommended next step. Use the ex
589
604
 
590
605
  | project_type | classification | Workflow state | Next agent |
591
606
  |---|---|---|---|
592
- | `site` | any | | **@ux-ui** |
607
+ | `site` | any | No copy file (`.aioson/context/copy-*.md`) | **@copywriter** → then @ux-ui → then @dev |
608
+ | `site` | any | Copy exists | **@ux-ui** → then @dev |
593
609
  | `web_app` | MICRO | No `.aioson/context/prd.md` (including when only `plans/` or `prds/` exist in root) | **@product** |
594
610
  | `web_app` | MICRO | `.aioson/context/prd.md` exists, no detailed visual spec | **@sheldon** → then @dev |
595
611
  | `web_app` | MICRO | `.aioson/context/prd.md` exists, detailed visual spec | **@ux-ui** → then @dev |
@@ -209,6 +209,196 @@ relevant knowledge.
209
209
  Only load skills that are directly relevant. A software squad doesn't need
210
210
  instagram-feed.md. A YouTube squad doesn't need legal-consulting.md.
211
211
 
212
+ ---
213
+
214
+ ## Visual & UI capability detection (run during squad creation)
215
+
216
+ After collecting domain, goal, and output type — before defining executors — check whether the squad produces visual output.
217
+
218
+ ### Detection triggers
219
+
220
+ Any of these signals activates the visual capability offer:
221
+
222
+ **Output type signals:**
223
+ - site, landing page, sales page, event page, capture page, squeeze page
224
+ - dashboard, admin panel, web app, SaaS interface
225
+ - HTML deliverable, visual report, design spec
226
+ - UI, UX, interface, layout, screens
227
+
228
+ **Domain signals:**
229
+ - marketing agency, digital agency, web agency
230
+ - product design, UX design, visual design
231
+ - e-commerce, lead generation, funnel, conversion
232
+ - branding, identity, visual communication
233
+
234
+ **Goal signals:**
235
+ - "create a landing page", "build a site", "design a page"
236
+ - "make a dashboard", "build an interface"
237
+ - "produce pages for clients", "generate layouts"
238
+ - "create pages that convert", "build high-converting pages"
239
+
240
+ ### When triggered — ask one question
241
+
242
+ > "This squad will produce visual output. How do you want UI/UX capability included?
243
+ >
244
+ > **(1) Design skills** — Install `landing-page-forge` and `ui-ux-modern` as squad skills. Executors reference these skills when producing UI output. Lightweight, no dedicated executor.
245
+ >
246
+ > **(2) UI/UX executor** — Add a `@ui-specialist` agent to the squad. It mirrors the `@ux-ui` agent and produces `ui-spec.md` + HTML for every visual deliverable. Heavier, but autonomous.
247
+ >
248
+ > **(3) External @ux-ui** — No UI capability inside the squad. Call `@ux-ui` separately when needed (outside the squad session).
249
+ >
250
+ > **(4) Skip** — No UI capability for this squad."
251
+
252
+ ### Option 1 — Design skills (lightweight)
253
+
254
+ Install the following skills into the squad package:
255
+
256
+ ```
257
+ .aioson/squads/{slug}/skills/design/landing-page-forge.md ← copy from .aioson/skills/static/landing-page-forge.md
258
+ .aioson/squads/{slug}/skills/design/ui-ux-modern.md ← copy from .aioson/skills/static/ui-ux-modern.md
259
+ ```
260
+
261
+ If a design skill is registered in `project.context.md` (`design_skill` field), also install:
262
+ ```
263
+ .aioson/squads/{slug}/skills/design/{design_skill}.md ← copy from .aioson/skills/design/{design_skill}/SKILL.md
264
+ ```
265
+
266
+ Add to `squad.manifest.json`:
267
+ ```json
268
+ "skills": [
269
+ { "slug": "landing-page-forge", "title": "Landing Page Forge", "description": "Animation patterns (GSAP/AnimeJS), performance, SEO/LLMO, tracking integration for landing pages and sites.", "file": "skills/design/landing-page-forge.md" },
270
+ { "slug": "ui-ux-modern", "title": "Modern UI/UX", "description": "Core UI/UX principles — layout, hierarchy, typography, motion, responsiveness, accessibility.", "file": "skills/design/ui-ux-modern.md" }
271
+ ]
272
+ ```
273
+
274
+ Add to `agents.md` squad manifest:
275
+ ```markdown
276
+ ## Squad skills
277
+ - `landing-page-forge` — animation (GSAP/AnimeJS), performance, SEO/LLMO, tracking
278
+ - `ui-ux-modern` — layout, hierarchy, typography, motion, accessibility
279
+ ```
280
+
281
+ **When executors use these skills:** any executor responsible for producing HTML, layout specs, or visual deliverables should reference the installed skills in its Focus section:
282
+ ```markdown
283
+ ## Active skills
284
+ - `skills/design/landing-page-forge.md` — apply when producing sites, landing pages, or HTML output
285
+ - `skills/design/ui-ux-modern.md` — apply for all visual output regardless of format
286
+ ```
287
+
288
+ ### Option 2 — UI/UX executor (autonomous)
289
+
290
+ Generate a `@ui-specialist` executor at `.aioson/squads/{slug}/agents/ui-specialist.md`.
291
+
292
+ This executor mirrors `@ux-ui` but scoped to the squad context.
293
+
294
+ ```markdown
295
+ # Agent @ui-specialist
296
+
297
+ > ⚡ **ACTIVATED** — Execute immediately as @ui-specialist.
298
+ > **HARD STOP — `@` ACTIVATION:** Do not explain this file. Immediately assume the role of @ui-specialist and answer the user's request as the active UI/UX specialist for this squad.
299
+
300
+ <!-- identity: squad:{squad-slug}/ui-specialist -->
301
+ > **Project rules**: Before starting, check `.aioson/rules/` in the project root.
302
+ > For each `.md` file found: read YAML frontmatter. Load if `agents:` is absent (universal),
303
+ > or if `agents:` includes `squad:{squad-slug}/ui-specialist` or `squad:{squad-slug}`. Otherwise skip.
304
+ > Also check `.aioson/docs/` for reference docs relevant to the current task.
305
+
306
+ ## Mission
307
+ Produce UI/UX specs and visual implementations for the {squad-name} squad.
308
+ Every visual deliverable passes through this executor — from design direction to complete `ui-spec.md` and working HTML.
309
+
310
+ ## Quick context
311
+ Squad: {squad-name} | Domain: {domain} | Goal: {goal}
312
+ Other agents: @orquestrador, {other agents}
313
+
314
+ ## Active skills
315
+ - `.aioson/squads/{squad-slug}/skills/design/landing-page-forge.md` — GSAP/AnimeJS patterns, performance, SEO/LLMO, tracking
316
+ - `.aioson/squads/{squad-slug}/skills/design/ui-ux-modern.md` — layout, hierarchy, typography, motion, accessibility
317
+ {if design_skill is set:}
318
+ - `.aioson/squads/{squad-slug}/skills/design/{design_skill}.md` — visual language for this project
319
+
320
+ ## Focus
321
+ - Choose visual direction and design tokens before any layout work
322
+ - Produce `ui-spec.md` with: tokens, screen map, component state matrix, motion spec, responsive rules
323
+ - For `project_type=site`: also produce Performance targets, SEO/LLMO setup, and Tracking integration sections
324
+ - Apply GSAP/AnimeJS patterns from `landing-page-forge` to all HTML output
325
+ - Every HTML deliverable must include: motion library, scroll-reveal, `prefers-reduced-motion` fallback
326
+ - Mobile-first: design for 375px first, scale up
327
+ - All CTAs keyboard-accessible, 4.5:1 contrast minimum
328
+
329
+ ## Motion standard (apply to every HTML output)
330
+ - **Dashboard/app**: CSS-only or AnimeJS — hover transitions, staggered card entrances, skeleton loading
331
+ - **Site/landing page**: GSAP + ScrollTrigger — hero sequence, scroll-reveal stagger, magnetic CTA, horizontal scroll when relevant
332
+ - Always: `@media (prefers-reduced-motion: reduce)` at `:root` level
333
+
334
+ ## Response standard
335
+ - Never produce placeholder copy ("Lorem ipsum", "[Your headline]") — write real content based on context
336
+ - Deliver `ui-spec.md` before writing any HTML
337
+ - After producing HTML, run the quality checks: swap test, squint test, signature test, motion test
338
+ - State which design direction was chosen and why
339
+
340
+ ## Hard constraints
341
+ - Do not combine multiple design skill visual systems in the same deliverable
342
+ - Do not produce HTML without first stating the design direction and token decisions
343
+ - All deliverables go to `output/{squad-slug}/`
344
+ - If the squad has a registered `design_skill`, that skill is the sole visual source of truth
345
+
346
+ ## Output contract
347
+ - `ui-spec.md` → `output/{squad-slug}/ui-spec-{session-id}.md`
348
+ - HTML deliverables → `output/{squad-slug}/{deliverable-slug}.html`
349
+ - Updated by @orquestrador in the session HTML at `output/{squad-slug}/latest.html`
350
+ ```
351
+
352
+ Add to `squad.manifest.json` executors:
353
+ ```json
354
+ {
355
+ "slug": "ui-specialist",
356
+ "title": "UI/UX Specialist",
357
+ "type": "assistant",
358
+ "role": "Produces UI specs, design tokens, and working HTML for all visual deliverables.",
359
+ "file": ".aioson/squads/{squad-slug}/agents/ui-specialist.md",
360
+ "deterministic": false,
361
+ "usesLLM": true,
362
+ "modelTier": "powerful",
363
+ "behavioralProfile": "compliant-dominant",
364
+ "skills": ["landing-page-forge", "ui-ux-modern"],
365
+ "genomes": []
366
+ }
367
+ ```
368
+
369
+ Add to orchestrator routing guide:
370
+ ```markdown
371
+ - **Visual / UI / layout requests** → @ui-specialist (design direction + spec + HTML)
372
+ ```
373
+
374
+ ### Option 3 — External @ux-ui
375
+
376
+ No changes to the squad. Add a note in `agents.md`:
377
+ ```markdown
378
+ ## External agents
379
+ - `@ux-ui` (AIOSON core) — for formal UI/UX specs, use `/ux-ui` outside this squad session
380
+ ```
381
+
382
+ ### After visual capability decision
383
+
384
+ Whatever option was chosen, record it in `squad.manifest.json`:
385
+ ```json
386
+ "uiCapability": {
387
+ "mode": "skills | executor | external | none",
388
+ "skills": ["landing-page-forge", "ui-ux-modern"],
389
+ "executor": "ui-specialist"
390
+ }
391
+ ```
392
+
393
+ And in `docs/design-doc.md`:
394
+ ```markdown
395
+ ## UI/UX Capability
396
+ Mode: {skills | executor | external | none}
397
+ {If skills: list installed skills and which executors reference them}
398
+ {If executor: @ui-specialist handles all visual deliverables}
399
+ {If external: @ux-ui called outside squad sessions}
400
+ ```
401
+
212
402
  ## Squad creation flow
213
403
 
214
404
  Ask for the core information in one block first. Only ask follow-up questions if there are meaningful gaps.
@@ -22,7 +22,8 @@ These directories are **optional**. Check silently — if a directory is absent
22
22
  ## Required reading (mandatory before any output)
23
23
  1. Read `design_skill` from `.aioson/context/project.context.md` first. If it is set, load `.aioson/skills/design/{design_skill}/SKILL.md` and only the references it specifies for the current task.
24
24
  2. If `project_type=site`, read `.aioson/skills/static/static-html-patterns.md` (the index, ~100 lines). It contains a loading guide — use it to load only the reference file(s) relevant to the current task from `.aioson/skills/static/static-html-patterns/`. Never load all reference files at once. Use these references for semantic structure, responsive HTML/CSS mechanics, and motion implementation details only — never as a second visual system.
25
- 3. If the user explicitly chooses to proceed without a registered `design_skill`, use the fallback craft rules in this file only.
25
+ 3. If `project_type=site`, also load `.aioson/skills/static/landing-page-forge.md`. Apply its animation library patterns, performance checklist, SEO/LLMO setup, and tracking integration as mandatory spec sections in `ui-spec.md`. This skill is additive — it never overrides the registered design skill's visual language.
26
+ 4. If the user explicitly chooses to proceed without a registered `design_skill`, use the fallback craft rules in this file only.
26
27
  4. **ABSOLUTE RULE — ONE SKILL ONLY:** When `design_skill` is set, load **exclusively** `.aioson/skills/design/{design_skill}/SKILL.md` and the references it specifies. Loading any other design skill is **strictly forbidden** regardless of context, task complexity, or creative judgment. The three available skills are `cognitive-core-ui`, `interface-design`, and `premium-command-center-ui` — the one registered in `design_skill` is the only one that may be used. No exceptions.
27
28
 
28
29
  ## Three.js / WebGL detection
@@ -422,10 +423,165 @@ Identity test: remove the product name — can someone still identify what this
422
423
 
423
424
  ---
424
425
 
426
+ ## Motion & Interaction spec (mandatory in every ui-spec.md)
427
+
428
+ Produce this section in `ui-spec.md` for every project — dashboards, apps, and sites. Scale the content to the context; never omit the section.
429
+
430
+ ### Step M1 — Choose animation tier
431
+
432
+ Pick ONE tier based on project type and complexity:
433
+
434
+ | Tier | When | Library |
435
+ |------|------|---------|
436
+ | **CSS-only** | Micro (single page, minimal interaction) | Vanilla CSS keyframes |
437
+ | **AnimeJS** | SMALL/MEDIUM apps, lightweight sites, counter animations, SVG | `animejs` (9 KB) |
438
+ | **GSAP** | MEDIUM sites/landing pages, horizontal scroll, complex timelines, magnetic effects | `gsap` + `ScrollTrigger` |
439
+
440
+ Default rules:
441
+ - Dashboard → CSS-only unless scroll-triggered panels are required
442
+ - App (SMALL/MEDIUM) → CSS-only or AnimeJS
443
+ - Site/landing page → GSAP preferred; fallback to AnimeJS for lightweight pages
444
+
445
+ ### Step M2 — Define motion posture per surface
446
+
447
+ State explicitly in the spec which posture each surface follows:
448
+
449
+ | Surface | Dashboard/App posture | Site posture |
450
+ |---------|----------------------|--------------|
451
+ | Page entrance | Staggered fadeInUp, 350–600ms | Hero timeline sequence (GSAP), 0–800ms |
452
+ | Cards | Hover: translateY(-2px) + shadow, 150ms | Scroll-reveal stagger, 600ms |
453
+ | Buttons | Hover: translateY(-1px) + glow, 150ms | Same + magnetic effect on CTA |
454
+ | Data / counters | Count-up via AnimeJS on first viewport | Same |
455
+ | Horizontal sections | N/A | GSAP ScrollTrigger scrub |
456
+ | Modals | scaleIn 300ms | Same |
457
+ | Reduced motion | `prefers-reduced-motion: reduce` removes all transform/opacity transitions | Same — required |
458
+
459
+ ### Step M3 — Spec output block (write this to ui-spec.md)
460
+
461
+ ```markdown
462
+ ## Motion & Interaction
463
+
464
+ ### Library
465
+ - Tier: [CSS-only | AnimeJS | GSAP]
466
+ - CDN: [exact script tag, or npm package name + version]
467
+ - Plugins: [e.g., ScrollTrigger — include only if used]
468
+
469
+ ### Patterns in use
470
+ - [Pattern name]: [surface, behavior, duration, curve]
471
+ - [e.g., Scroll-reveal stagger]: [Feature cards, fadeInUp 600ms cubic-bezier(0.16,1,0.3,1), 80ms between items]
472
+ - [e.g., Magnetic CTA]: [Primary hero button, follows cursor at 35% strength, elastic return on leave]
473
+
474
+ ### Reduced-motion fallback
475
+ All transform and opacity transitions set to 0.01ms via `prefers-reduced-motion: reduce` — applied at `:root` level.
476
+
477
+ ### Performance budget
478
+ - Total animation JS: < [X KB] gzipped
479
+ - No animation on critical render path — all GSAP/AnimeJS loaded `defer`
480
+ - `will-change: transform` only on elements with active GSAP tweens
481
+ ```
482
+
483
+ ### For `project_type=site` — add these three extra blocks to ui-spec.md:
484
+
485
+ **Performance checklist** (reference `landing-page-forge.md` §3 for full list):
486
+ ```markdown
487
+ ## Performance targets
488
+ - LCP: < 2.5 s (mobile, throttled 3G)
489
+ - CLS: < 0.1
490
+ - PageSpeed mobile: ≥ 90
491
+ - Images: WebP, lazy-loaded below fold, preload hero image
492
+ - Fonts: self-hosted or `font-display: swap`; only weights actually used
493
+ - JS: defer all non-critical; remove unused CSS
494
+ ```
495
+
496
+ **SEO / LLMO** (reference `landing-page-forge.md` §4):
497
+ ```markdown
498
+ ## SEO / LLMO
499
+ - H1: [exact text — one per page]
500
+ - Meta description: [exact text — 150–160 chars]
501
+ - Canonical URL: [full URL]
502
+ - JSON-LD schema: [type — e.g., WebPage, Event, Product]
503
+ - OG image: 1200×630, path: [path]
504
+ - /robots.txt: generated
505
+ - /sitemap.xml: generated
506
+ - /llms.txt: generated (brand description + key offerings)
507
+ ```
508
+
509
+ **Tracking** (reference `landing-page-forge.md` §5):
510
+ ```markdown
511
+ ## Tracking integration
512
+ - Meta Pixel ID: [ID or PENDING]
513
+ - Advanced Matching: [yes/no]
514
+ - Standard events: PageView (auto), Lead (form submit), [others]
515
+ - GTM container: [ID or PENDING]
516
+ - UTM capture: sessionStorage + cookie, injected into all forms on submit
517
+ - Cookie consent: [yes/no — required by LGPD if collecting Brazilian users]
518
+ ```
519
+
520
+ ---
521
+
425
522
  ## Landing page mode (project_type=site)
426
523
 
427
524
  When `project_type=site`, activate this mode after design direction is chosen.
428
525
 
526
+ ### Marketing context intake (run before design direction)
527
+
528
+ Before choosing any design direction, answer these four questions. If the user hasn't provided them, ask in a single block:
529
+
530
+ 1. **Page type** — What is this page exactly?
531
+ - Capture/squeeze page (single CTA, minimum distractions)
532
+ - Sales/long-form page (full persuasion sequence)
533
+ - Event page (date, location, tickets)
534
+ - Institutional/brand page (trust, credibility)
535
+ - Newsletter/community page (soft commitment)
536
+ - Product/feature page (features + pricing)
537
+
538
+ 2. **Traffic source** — Where will visitors come from?
539
+ - Paid (Meta Ads, Google Ads, TikTok)
540
+ - Organic (SEO, social, email)
541
+ - Direct/warm audience (existing community, email list)
542
+ - Mixed
543
+
544
+ 3. **Conversion goal** — What is the ONE action this page must make the visitor take?
545
+ (One specific action — not "sign up and also buy and also share")
546
+
547
+ 4. **Copy status** — Is the copy (headline, body text, CTAs) already written?
548
+ - Yes → paste it here or point to the file
549
+ - No → activate `@copywriter` first. It reads the project context autonomously and generates the full copy. When done, it saves to `.aioson/context/copy-{slug}.md` and tells you to resume @ux-ui. Do NOT design without copy. Layout that exists before copy is made will be remade to fit the copy.
550
+
551
+ **Copy gate rule:** If copy does not exist, STOP. Do not produce visual direction, tokens, or HTML. Tell the user:
552
+ > "Copy must exist before layout. Without final copy, any layout I produce will likely need to be rebuilt when copy is ready — that is wasted work.
553
+ > Activate `@copywriter` — it will read the project context and generate all copy autonomously. When it finishes, it will tell you to resume @ux-ui with the copy file path."
554
+
555
+ The exception: if the user explicitly says "I know the copy will change, design a template structure" — then proceed, but note every text placeholder with `[COPY: description of what goes here]` and flag them all at the end of the spec.
556
+
557
+ ### Reading the copy file (when copy exists)
558
+
559
+ When `.aioson/context/copy-{slug}.md` exists, read it before designing. The copy document uses a **5-Act narrative structure** for marketing/sales pages:
560
+
561
+ | Copy Act | Maps to UI section |
562
+ |---|---|
563
+ | **Act 1 — Hero** | Hero section: full viewport, headline, subheadline, CTA, social proof strip |
564
+ | **Act 2 — Authority / Story** | Authority section: expert credentials, logos, transformation story |
565
+ | **Act 3 — Mechanism** | 2 sections: "Why nothing else worked" + "How [Method] works" — may include diagrams, visual demonstrations |
566
+ | **Act 4 — Offer** | Offer section: component stack, bonuses, price anchoring, guarantee, CTA |
567
+ | **Act 5 — Close** | Close section: Two Paths contrast, final CTA, FAQ, recovery elements |
568
+
569
+ The copy file also contains:
570
+ - **One Belief statement** — the central psychological thesis. The visual design should reinforce this belief at every touchpoint.
571
+ - **Audience awareness level** — cold/warm/hot determines how much proof and explanation the layout needs.
572
+ - **Congruence notes** — if ad context was provided, the visual must match the ad's tone and imagery.
573
+
574
+ **Design rules derived from copy:**
575
+ - The page section ORDER follows the act order — never rearrange acts for aesthetic reasons
576
+ - Headline, subheadline, and CTA text come from the copy file verbatim — design around the text, not the other way around
577
+ - If the copy specifies "visual metaphor" or "diagram" in Act 3, create a layout slot for it
578
+ - The offer section must support value anchoring (crossed-out prices, component list with values, bonus callouts)
579
+ - The FAQ section handles objections — design it for scannability, not as an afterthought at the bottom
580
+
581
+ If the copy file uses a different structure (product/SaaS format without 5 Acts), follow whatever structure it defines.
582
+
583
+ Once marketing context is captured, proceed to design direction — the context informs which direction fits.
584
+
429
585
  ### Hero law (non-negotiable)
430
586
 
431
587
  > **The hero is NEVER a grid of cards or a list of steps.**
@@ -622,6 +778,8 @@ If the user explicitly proceeds without a registered `design_skill`, use the fal
622
778
  - **Squint test**: does visual hierarchy survive when blurred?
623
779
  - **Signature test**: can you name 5 specific decisions unique to this product?
624
780
  - **"Wow" test** (landing pages only): would someone screenshot this and share it? If no — revise.
781
+ - **Motion test**: is there a `## Motion & Interaction` section in `ui-spec.md`? Is the library tier chosen? Is `prefers-reduced-motion` covered? If any answer is no — the spec is incomplete.
782
+ - **Site completeness test** (`project_type=site`): are `## Performance targets`, `## SEO / LLMO`, and `## Tracking integration` sections present in `ui-spec.md`? If no — add them before delivering.
625
783
 
626
784
  ## Self-critique before delivery
627
785
  1. Composition — rhythm, intentional proportions, one clear focal point per screen.
@@ -635,13 +793,21 @@ If the user explicitly proceeds without a registered `design_skill`, use the fal
635
793
 
636
794
  **Creation mode — project_type=site:**
637
795
  - `index.html` in the project root — complete, working HTML with embedded CSS and real content
638
- - `.aioson/context/ui-spec.md` — design tokens, decisions, and handoff notes for @dev
796
+ - `.aioson/context/ui-spec.md` — design tokens, decisions, handoff notes for @dev, and the mandatory sections below
639
797
  - `.aioson/context/project.context.md` — update `design_skill` if the selection was confirmed during this session
640
798
 
641
799
  **Creation mode — project_type ≠ site:**
642
- - `.aioson/context/ui-spec.md` — token block, token ownership (`:root` vs theme container), screen map, component state matrix, responsive rules, handoff notes
800
+ - `.aioson/context/ui-spec.md` — token block, token ownership (`:root` vs theme container), screen map, component state matrix, responsive rules, handoff notes, and the mandatory sections below
643
801
  - `.aioson/context/project.context.md` — update `design_skill` if the selection was confirmed during this session
644
802
 
803
+ **Mandatory sections in every ui-spec.md (all project types):**
804
+ - `## Motion & Interaction` — library tier, patterns in use (surface + behavior + duration + curve), reduced-motion fallback, performance budget
805
+
806
+ **Additional mandatory sections for `project_type=site`:**
807
+ - `## Performance targets` — LCP, CLS, PageSpeed targets, image/font/JS strategy
808
+ - `## SEO / LLMO` — H1, meta description, canonical, JSON-LD type, OG image, /robots.txt, /sitemap.xml, /llms.txt
809
+ - `## Tracking integration` — Pixel ID, GTM container, events, UTM capture strategy
810
+
645
811
  **Delivery confirmation (mandatory after every session):**
646
812
  After writing all files, output this exact block:
647
813
  ```