@jaimevalasek/aioson 1.6.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 (275) hide show
  1. package/CHANGELOG.md +74 -0
  2. package/README.md +729 -232
  3. package/docs/design-previews/pt.squarespace.com-homepage.html +889 -0
  4. package/docs/integrations/sdlc-genius-boundary.md +76 -0
  5. package/docs/integrations/sdlc-genius-eval-matrix.md +75 -0
  6. package/docs/integrations/sdlc-genius-install-checklist.md +93 -0
  7. package/docs/integrations/sdlc-genius-review-samples.md +86 -0
  8. package/docs/pt/README.md +3 -0
  9. package/docs/pt/agentes.md +1 -0
  10. package/docs/pt/comandos-cli.md +888 -2
  11. package/docs/pt/design-hybrid-forge.md +255 -6
  12. package/docs/pt/devlog-pipeline.md +270 -0
  13. package/docs/pt/fluxo-artefatos.md +178 -0
  14. package/docs/pt/hooks-session-guard.md +454 -0
  15. package/docs/pt/monitor-de-contexto.md +59 -5
  16. package/docs/pt/sdd-automation-scripts.md +557 -0
  17. package/docs/pt/site-forge.md +309 -0
  18. package/docs/pt/spec-learnings-pipeline.md +265 -0
  19. package/package.json +1 -1
  20. package/src/a2a/client.js +165 -0
  21. package/src/a2a/server.js +223 -0
  22. package/src/cli.js +235 -1
  23. package/src/commands/agent-audit.js +397 -0
  24. package/src/commands/agent-export-skill.js +229 -0
  25. package/src/commands/artifact-validate.js +189 -0
  26. package/src/commands/brief-gen.js +405 -0
  27. package/src/commands/brief-validate.js +65 -0
  28. package/src/commands/classify.js +256 -0
  29. package/src/commands/context-compact.js +49 -0
  30. package/src/commands/context-health.js +175 -0
  31. package/src/commands/context-monitor.js +71 -0
  32. package/src/commands/context-trim.js +177 -0
  33. package/src/commands/detect-test-runner.js +55 -0
  34. package/src/commands/devlog-export-brains.js +27 -0
  35. package/src/commands/devlog-process.js +292 -0
  36. package/src/commands/devlog-watch.js +131 -0
  37. package/src/commands/feature-close.js +165 -0
  38. package/src/commands/gate-check.js +228 -0
  39. package/src/commands/hooks-emit.js +253 -0
  40. package/src/commands/hooks-install.js +347 -0
  41. package/src/commands/learning-auto-promote.js +195 -0
  42. package/src/commands/learning-evolve.js +18 -9
  43. package/src/commands/learning-export.js +103 -0
  44. package/src/commands/learning-rollback.js +164 -0
  45. package/src/commands/live.js +25 -1
  46. package/src/commands/pattern-detect.js +33 -0
  47. package/src/commands/preflight-context.js +30 -0
  48. package/src/commands/preflight.js +208 -0
  49. package/src/commands/pulse-update.js +130 -0
  50. package/src/commands/runner-daemon.js +274 -0
  51. package/src/commands/runner-plan.js +70 -0
  52. package/src/commands/runner-queue-from-plan.js +166 -0
  53. package/src/commands/runner-queue.js +189 -0
  54. package/src/commands/runner-run.js +129 -0
  55. package/src/commands/runtime.js +47 -1
  56. package/src/commands/self-implement-loop.js +256 -0
  57. package/src/commands/session-guard.js +218 -0
  58. package/src/commands/sizing.js +165 -0
  59. package/src/commands/skill.js +65 -0
  60. package/src/commands/spec-checkpoint.js +177 -0
  61. package/src/commands/spec-status.js +79 -0
  62. package/src/commands/spec-sync.js +190 -0
  63. package/src/commands/spec-tasks.js +288 -0
  64. package/src/commands/squad-autorun.js +1220 -0
  65. package/src/commands/squad-bus.js +217 -0
  66. package/src/commands/squad-card.js +149 -0
  67. package/src/commands/squad-daemon.js +134 -0
  68. package/src/commands/squad-dependency-graph.js +164 -0
  69. package/src/commands/squad-review.js +106 -0
  70. package/src/commands/squad-scaffold.js +55 -0
  71. package/src/commands/squad-tool-register.js +157 -0
  72. package/src/commands/state-save.js +122 -0
  73. package/src/commands/update.js +2 -0
  74. package/src/commands/verify-gate.js +572 -0
  75. package/src/commands/workflow-execute.js +241 -0
  76. package/src/constants.js +22 -0
  77. package/src/install-profile.js +2 -2
  78. package/src/install-wizard.js +3 -2
  79. package/src/installer.js +6 -0
  80. package/src/lib/health-check.js +158 -0
  81. package/src/lib/hook-protocol.js +76 -0
  82. package/src/mcp/apps/squad-dashboard/app.js +163 -0
  83. package/src/mcp/apps/squad-dashboard/index.html +261 -0
  84. package/src/mcp/apps/squad-dashboard/mcp-manifest.json +23 -0
  85. package/src/mcp/resources/squad-state.js +130 -0
  86. package/src/preflight-engine.js +443 -0
  87. package/src/runner/cascade.js +97 -0
  88. package/src/runner/cli-launcher.js +109 -0
  89. package/src/runner/plan-importer.js +63 -0
  90. package/src/runner/queue-store.js +159 -0
  91. package/src/runtime-store.js +61 -3
  92. package/src/squad/agent-teams-adapter.js +264 -0
  93. package/src/squad/brief-validator.js +350 -0
  94. package/src/squad/bus-bridge.js +140 -0
  95. package/src/squad/context-compactor.js +265 -0
  96. package/src/squad/cross-ai-synthesizer.js +250 -0
  97. package/src/squad/hooks-generator.js +196 -0
  98. package/src/squad/inter-squad-events.js +175 -0
  99. package/src/squad/intra-bus.js +345 -0
  100. package/src/squad/learning-extractor.js +213 -0
  101. package/src/squad/pattern-detector.js +365 -0
  102. package/src/squad/preflight-context.js +296 -0
  103. package/src/squad/recovery-context.js +242 -71
  104. package/src/squad/reflection.js +365 -0
  105. package/src/squad/squad-scaffold.js +177 -0
  106. package/src/squad/state-manager.js +310 -0
  107. package/src/squad/task-decomposer.js +652 -0
  108. package/src/squad/verify-gate.js +303 -0
  109. package/src/updater.js +4 -5
  110. package/src/worker-runner.js +186 -1
  111. package/template/.aioson/agents/analyst.md +62 -1
  112. package/template/.aioson/agents/architect.md +61 -1
  113. package/template/.aioson/agents/copywriter.md +463 -0
  114. package/template/.aioson/agents/design-hybrid-forge.md +14 -0
  115. package/template/.aioson/agents/dev.md +271 -25
  116. package/template/.aioson/agents/deyvin.md +67 -8
  117. package/template/.aioson/agents/discovery-design-doc.md +44 -0
  118. package/template/.aioson/agents/genome.md +14 -0
  119. package/template/.aioson/agents/neo.md +83 -2
  120. package/template/.aioson/agents/orache.md +50 -4
  121. package/template/.aioson/agents/orchestrator.md +197 -1
  122. package/template/.aioson/agents/pm.md +35 -0
  123. package/template/.aioson/agents/product.md +50 -5
  124. package/template/.aioson/agents/profiler-enricher.md +14 -0
  125. package/template/.aioson/agents/profiler-forge.md +14 -0
  126. package/template/.aioson/agents/profiler-researcher.md +14 -0
  127. package/template/.aioson/agents/qa.md +273 -21
  128. package/template/.aioson/agents/setup.md +96 -10
  129. package/template/.aioson/agents/sheldon.md +131 -6
  130. package/template/.aioson/agents/site-forge.md +1753 -0
  131. package/template/.aioson/agents/squad.md +352 -0
  132. package/template/.aioson/agents/tester.md +53 -0
  133. package/template/.aioson/agents/ux-ui.md +203 -4
  134. package/template/.aioson/brains/README.md +128 -0
  135. package/template/.aioson/brains/_index.json +16 -0
  136. package/template/.aioson/brains/scripts/query.js +103 -0
  137. package/template/.aioson/brains/site-forge/visual-patterns.brain.json +205 -0
  138. package/template/.aioson/config.md +143 -13
  139. package/template/.aioson/constitution.md +33 -0
  140. package/template/.aioson/context/project-pulse.md +34 -0
  141. package/template/.aioson/docs/LAYERS.md +79 -0
  142. package/template/.aioson/docs/README.md +76 -0
  143. package/template/.aioson/docs/example-external-api-context.md +72 -0
  144. package/template/.aioson/genomes/copywriting.md +204 -0
  145. package/template/.aioson/locales/en/agents/architect.md +17 -0
  146. package/template/.aioson/locales/en/agents/dev.md +79 -13
  147. package/template/.aioson/locales/en/agents/orache.md +6 -0
  148. package/template/.aioson/locales/en/agents/orchestrator.md +24 -0
  149. package/template/.aioson/locales/en/agents/product.md +50 -0
  150. package/template/.aioson/locales/en/agents/sheldon.md +115 -0
  151. package/template/.aioson/locales/en/agents/squad.md +14 -0
  152. package/template/.aioson/locales/en/agents/tester.md +6 -0
  153. package/template/.aioson/locales/es/agents/analyst.md +2 -0
  154. package/template/.aioson/locales/es/agents/architect.md +19 -0
  155. package/template/.aioson/locales/es/agents/dev.md +64 -4
  156. package/template/.aioson/locales/es/agents/deyvin.md +2 -0
  157. package/template/.aioson/locales/es/agents/discovery-design-doc.md +2 -0
  158. package/template/.aioson/locales/es/agents/genome.md +2 -0
  159. package/template/.aioson/locales/es/agents/neo.md +2 -0
  160. package/template/.aioson/locales/es/agents/orache.md +2 -0
  161. package/template/.aioson/locales/es/agents/orchestrator.md +26 -0
  162. package/template/.aioson/locales/es/agents/pair.md +2 -0
  163. package/template/.aioson/locales/es/agents/pm.md +2 -0
  164. package/template/.aioson/locales/es/agents/product.md +52 -0
  165. package/template/.aioson/locales/es/agents/profiler-enricher.md +2 -0
  166. package/template/.aioson/locales/es/agents/profiler-forge.md +2 -0
  167. package/template/.aioson/locales/es/agents/profiler-researcher.md +2 -0
  168. package/template/.aioson/locales/es/agents/qa.md +2 -0
  169. package/template/.aioson/locales/es/agents/setup.md +2 -0
  170. package/template/.aioson/locales/es/agents/sheldon.md +117 -0
  171. package/template/.aioson/locales/es/agents/squad.md +16 -0
  172. package/template/.aioson/locales/es/agents/tester.md +9 -0
  173. package/template/.aioson/locales/es/agents/ux-ui.md +2 -0
  174. package/template/.aioson/locales/fr/agents/analyst.md +2 -0
  175. package/template/.aioson/locales/fr/agents/architect.md +19 -0
  176. package/template/.aioson/locales/fr/agents/dev.md +64 -4
  177. package/template/.aioson/locales/fr/agents/deyvin.md +2 -0
  178. package/template/.aioson/locales/fr/agents/discovery-design-doc.md +2 -0
  179. package/template/.aioson/locales/fr/agents/genome.md +2 -0
  180. package/template/.aioson/locales/fr/agents/neo.md +2 -0
  181. package/template/.aioson/locales/fr/agents/orache.md +2 -0
  182. package/template/.aioson/locales/fr/agents/orchestrator.md +26 -0
  183. package/template/.aioson/locales/fr/agents/pair.md +2 -0
  184. package/template/.aioson/locales/fr/agents/pm.md +2 -0
  185. package/template/.aioson/locales/fr/agents/product.md +52 -0
  186. package/template/.aioson/locales/fr/agents/profiler-enricher.md +2 -0
  187. package/template/.aioson/locales/fr/agents/profiler-forge.md +2 -0
  188. package/template/.aioson/locales/fr/agents/profiler-researcher.md +2 -0
  189. package/template/.aioson/locales/fr/agents/qa.md +2 -0
  190. package/template/.aioson/locales/fr/agents/setup.md +2 -0
  191. package/template/.aioson/locales/fr/agents/sheldon.md +117 -0
  192. package/template/.aioson/locales/fr/agents/squad.md +16 -0
  193. package/template/.aioson/locales/fr/agents/tester.md +9 -0
  194. package/template/.aioson/locales/fr/agents/ux-ui.md +2 -0
  195. package/template/.aioson/locales/pt-BR/agents/analyst.md +64 -3
  196. package/template/.aioson/locales/pt-BR/agents/architect.md +42 -0
  197. package/template/.aioson/locales/pt-BR/agents/dev.md +147 -14
  198. package/template/.aioson/locales/pt-BR/agents/deyvin.md +47 -0
  199. package/template/.aioson/locales/pt-BR/agents/neo.md +62 -1
  200. package/template/.aioson/locales/pt-BR/agents/orchestrator.md +158 -2
  201. package/template/.aioson/locales/pt-BR/agents/pm.md +95 -1
  202. package/template/.aioson/locales/pt-BR/agents/product.md +145 -18
  203. package/template/.aioson/locales/pt-BR/agents/qa.md +16 -0
  204. package/template/.aioson/locales/pt-BR/agents/setup.md +101 -18
  205. package/template/.aioson/locales/pt-BR/agents/sheldon.md +132 -1
  206. package/template/.aioson/locales/pt-BR/agents/squad.md +14 -0
  207. package/template/.aioson/locales/pt-BR/agents/tester.md +449 -0
  208. package/template/.aioson/rules/README.md +69 -0
  209. package/template/.aioson/rules/data-format-convention.md +136 -0
  210. package/template/.aioson/rules/example-monetary-values.md +30 -0
  211. package/template/.aioson/schemas/squad-manifest.schema.json +124 -3
  212. package/template/.aioson/skills/design/cognitive-core-ui/references/motion.md +2 -0
  213. package/template/.aioson/skills/design/pt.squarespace.com/.skill-meta.json +31 -0
  214. package/template/.aioson/skills/design/pt.squarespace.com/SKILL.md +66 -0
  215. package/template/.aioson/skills/design/pt.squarespace.com/references/components.md +368 -0
  216. package/template/.aioson/skills/design/pt.squarespace.com/references/design-tokens.md +150 -0
  217. package/template/.aioson/skills/design/pt.squarespace.com/references/motion.md +270 -0
  218. package/template/.aioson/skills/design/pt.squarespace.com/references/patterns.md +189 -0
  219. package/template/.aioson/skills/design/pt.squarespace.com/references/websites.md +165 -0
  220. package/template/.aioson/skills/marketing/references/anti-patterns.md +254 -0
  221. package/template/.aioson/skills/marketing/references/fascinations.md +192 -0
  222. package/template/.aioson/skills/marketing/references/five-acts.md +248 -0
  223. package/template/.aioson/skills/marketing/references/market-intelligence.md +198 -0
  224. package/template/.aioson/skills/marketing/references/offer-structure.md +203 -0
  225. package/template/.aioson/skills/marketing/references/one-belief.md +149 -0
  226. package/template/.aioson/skills/marketing/references/patterns.md +218 -0
  227. package/template/.aioson/skills/marketing/references/pms-research.md +193 -0
  228. package/template/.aioson/skills/marketing/vsl-craft.md +385 -0
  229. package/template/.aioson/skills/process/aioson-spec-driven/SKILL.md +1 -0
  230. package/template/.aioson/skills/process/aioson-spec-driven/references/analyst.md +30 -0
  231. package/template/.aioson/skills/process/aioson-spec-driven/references/architect.md +23 -0
  232. package/template/.aioson/skills/process/aioson-spec-driven/references/dev.md +47 -0
  233. package/template/.aioson/skills/process/aioson-spec-driven/references/deyvin.md +27 -0
  234. package/template/.aioson/skills/process/aioson-spec-driven/references/maintenance-and-state.md +35 -0
  235. package/template/.aioson/skills/process/aioson-spec-driven/references/product.md +25 -0
  236. package/template/.aioson/skills/process/aioson-spec-driven/references/qa.md +30 -0
  237. package/template/.aioson/skills/process/aioson-spec-driven/references/sheldon.md +25 -0
  238. package/template/.aioson/skills/process/design-hybrid-forge/SKILL.md +4 -1
  239. package/template/.aioson/skills/process/design-hybrid-forge/references/output-contract.md +15 -0
  240. package/template/.aioson/skills/process/design-hybrid-forge/references/pair-compatibility.md +32 -0
  241. package/template/.aioson/skills/process/design-hybrid-forge/references/quality-gates.md +20 -0
  242. package/template/.aioson/skills/process/simplify/SKILL.md +173 -0
  243. package/template/.aioson/skills/static/context-budget-guide.md +46 -0
  244. package/template/.aioson/skills/static/harness-sensors.md +74 -0
  245. package/template/.aioson/skills/static/landing-page-deploy.md +192 -0
  246. package/template/.aioson/skills/static/landing-page-forge.md +730 -0
  247. package/template/.aioson/skills/static/multi-agent-patterns.md +43 -0
  248. package/template/.aioson/skills/static/react-motion-patterns.md +22 -0
  249. package/template/.aioson/skills/static/static-html-patterns/checklists.md +43 -0
  250. package/template/.aioson/skills/static/static-html-patterns/css-tokens.md +609 -0
  251. package/template/.aioson/skills/static/static-html-patterns/motion.md +193 -0
  252. package/template/.aioson/skills/static/static-html-patterns/premium.md +711 -0
  253. package/template/.aioson/skills/static/static-html-patterns/structure.md +209 -0
  254. package/template/.aioson/skills/static/static-html-patterns/utilities.md +190 -0
  255. package/template/.aioson/skills/static/static-html-patterns.md +58 -1913
  256. package/template/.aioson/skills/static/threejs-patterns.md +929 -0
  257. package/template/.aioson/skills/static/ui-ux-modern.md +1 -0
  258. package/template/.aioson/skills/static/web-research-cache.md +112 -0
  259. package/template/.aioson/tasks/implementation-plan.md +21 -1
  260. package/template/.aioson/tasks/squad-create.md +22 -0
  261. package/template/.aioson/tasks/squad-design.md +30 -0
  262. package/template/.aioson/templates/squads/digital-marketing-agency/template.json +96 -0
  263. package/template/.claude/commands/aioson/agent/design-hybrid-forge.md +5 -0
  264. package/template/.claude/commands/aioson/agent/orache.md +5 -0
  265. package/template/.claude/commands/aioson/agent/sheldon.md +5 -0
  266. package/template/.claude/commands/aioson/agent/site-forge.md +5 -0
  267. package/template/AGENTS.md +55 -3
  268. package/template/CLAUDE.md +31 -0
  269. package/template/OPENCODE.md +4 -0
  270. package/template/researchs/.gitkeep +0 -0
  271. package/template/.aioson/skills/design-system/components/SKILL.md:Zone.Identifier +0 -0
  272. package/template/.aioson/skills/design-system/dashboards/SKILL.md:Zone.Identifier +0 -0
  273. package/template/.aioson/skills/design-system/foundations/SKILL.md:Zone.Identifier +0 -0
  274. package/template/.aioson/skills/design-system/motion/SKILL.md:Zone.Identifier +0 -0
  275. package/template/.aioson/skills/design-system/patterns/SKILL.md:Zone.Identifier +0 -0
@@ -21,15 +21,31 @@ These directories are **optional**. Check silently — if a directory is absent
21
21
 
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
- 2. If `project_type=site`, also read `.aioson/skills/static/static-html-patterns.md` — use it 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.
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 `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
 
29
+ ## Three.js / WebGL detection
30
+
31
+ Detect these triggers in the user's request — if any match, also load `.aioson/skills/static/threejs-patterns.md` alongside the primary reading:
32
+
33
+ - "3D", "WebGL", "three.js", "Three.js"
34
+ - "partículas", "particles", "sistema de partículas", "particle system"
35
+ - "cena 3D", "3D scene", "objeto 3D", "interactive 3D"
36
+ - "holográfico", "holographic", "hologram", "holographic effect"
37
+ - "floating 3D", "floating objects", "3D cards"
38
+ - "hero 3D", "3D background", "particle background", "particle hero"
39
+ - Any explicit request for Three.js, WebGL, or Three.js CDN patterns
40
+
41
+ Three.js is **always additive** — it enhances the visual output, never replaces the design skill's visual language. When Three.js is loaded, apply patterns from `threejs-patterns.md` for the background/scene layer, while the design skill continues to govern tokens, typography, and component structure.
42
+
28
43
  ## Required input
29
44
  - `.aioson/context/project.context.md`
30
45
  - `.aioson/context/prd.md` or `prd-{slug}.md` (if exists — read before any design decision; respect Visual identity already captured by `@product`)
31
46
  - `.aioson/context/discovery.md` (if exists)
32
47
  - `.aioson/context/architecture.md` (if exists)
48
+ - `.aioson/plans/{slug}/manifest.md` (if present — Sheldon phased plans; check subdirectories of `.aioson/plans/`; scope UI work to the current phase)
33
49
 
34
50
  ## Brownfield memory handoff
35
51
 
@@ -407,10 +423,165 @@ Identity test: remove the product name — can someone still identify what this
407
423
 
408
424
  ---
409
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
+
410
522
  ## Landing page mode (project_type=site)
411
523
 
412
524
  When `project_type=site`, activate this mode after design direction is chosen.
413
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
+
414
585
  ### Hero law (non-negotiable)
415
586
 
416
587
  > **The hero is NEVER a grid of cards or a list of steps.**
@@ -426,6 +597,9 @@ These are required for every Bold & Cinematic landing page. Read Section 2a-extr
426
597
  2. **Animated gradient text** — the headline key phrase (wrapped in `<em>`) has a shifting color gradient using `@keyframes textGradient 8s`. This is the single most-noticed premium detail.
427
598
  3. **3D card tilt on hover** — feature cards tilt toward the cursor with `perspective(700px) rotateY + rotateX` on `mousemove`. Skipped on touch devices and `prefers-reduced-motion`.
428
599
 
600
+ **Optional 4th technique (requires explicit request or Three.js trigger):**
601
+ 4. **WebGL particle backdrop** — if the user asks for 3D, particles, or WebGL effects, load `.aioson/skills/static/threejs-patterns.md` and apply the Particle Aurora Hero (Pattern 1) or another appropriate Three.js pattern. Three.js enhances but never replaces — the design skill tokens (colors, typography, spacing) must flow through the Three.js scene parameters.
602
+
429
603
  For Clean & Luminous: apply `box-shadow` lift on cards and a subtle `scale(1.01)` hover instead of tilt.
430
604
 
431
605
  ### Content crafting (produce actual copy — no placeholders)
@@ -604,6 +778,8 @@ If the user explicitly proceeds without a registered `design_skill`, use the fal
604
778
  - **Squint test**: does visual hierarchy survive when blurred?
605
779
  - **Signature test**: can you name 5 specific decisions unique to this product?
606
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.
607
783
 
608
784
  ## Self-critique before delivery
609
785
  1. Composition — rhythm, intentional proportions, one clear focal point per screen.
@@ -617,13 +793,21 @@ If the user explicitly proceeds without a registered `design_skill`, use the fal
617
793
 
618
794
  **Creation mode — project_type=site:**
619
795
  - `index.html` in the project root — complete, working HTML with embedded CSS and real content
620
- - `.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
621
797
  - `.aioson/context/project.context.md` — update `design_skill` if the selection was confirmed during this session
622
798
 
623
799
  **Creation mode — project_type ≠ site:**
624
- - `.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
625
801
  - `.aioson/context/project.context.md` — update `design_skill` if the selection was confirmed during this session
626
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
+
627
811
  **Delivery confirmation (mandatory after every session):**
628
812
  After writing all files, output this exact block:
629
813
  ```
@@ -669,3 +853,18 @@ Do not overwrite Vision, Problem, Users, MVP scope, User flows, Success metrics,
669
853
  - Always run the entry check before Step 0 — never assume Creation mode when UI artifacts may already exist.
670
854
  - In Audit mode, never modify existing UI files before the user confirms which fixes to apply.
671
855
  - If `aioson` CLI is not available, write a devlog at session end following the "Devlog" section in `.aioson/config.md`.
856
+
857
+ ## Continuation Protocol
858
+
859
+ Before ending your response, always append:
860
+
861
+ ---
862
+ ## Next Up
863
+ - UI spec delivered: [component/screen]
864
+ - Next step: `@dev` (implement) or `@deyvin` (quick slice)
865
+ - Confirm visual system choice (`design_skill`) is recorded in `project.context.md`
866
+ - `/clear` → fresh context window before continuing
867
+
868
+ **Session artifacts written:**
869
+ - [ ] [list each file created or modified]
870
+ ---
@@ -0,0 +1,128 @@
1
+ # AIOSON Brains — Procedural Memory System
2
+
3
+ > Inspired by: A-MEM (Zettelkasten networks), MemRL (quality-scored pattern extraction), Letta (OS-tiered loading), and retrieval-as-tool (agents call memory explicitly, not pre-injected).
4
+
5
+ ## What is this?
6
+
7
+ Brains are **quality-scored pattern memory** — not event logs, not session history.
8
+ Each brain node answers: *"I've seen this before. Here's what works, what to avoid, and why."*
9
+
10
+ Unlike RAG (retrieve-and-prepend), agents load only what's relevant, when it's relevant.
11
+
12
+ ## Loading strategy (tiered — OS-inspired)
13
+
14
+ | Layer | File | When loaded | Token cost |
15
+ |-------|------|-------------|------------|
16
+ | Index | `_index.json` | Always, on activation | ~2KB |
17
+ | Brain file | `agent/domain.brain.json` | Only when tags match the task | ~8–20KB |
18
+ | Node detail | inside brain file | Read selectively by ID | negligible |
19
+
20
+ **Rule:** Load `_index.json` first. If task tags match a brain's tag list, load that brain file. Use `query.js` for cross-referencing across multiple brains.
21
+
22
+ ## Brain node schema
23
+
24
+ ```json
25
+ {
26
+ "id": "css-001",
27
+ "title": "Short name",
28
+ "tags": ["css", "hover", "animation"],
29
+ "q": 5,
30
+ "v": "EXCELLENT",
31
+ "s": "One-line summary of the pattern and why it works.",
32
+ "p": "code snippet or pseudocode",
33
+ "src": "source site or context",
34
+ "date": "YYYY-MM-DD",
35
+ "not": "what NOT to use instead — the anti-pattern this replaces",
36
+ "warn": "gotcha or edge case to watch out for",
37
+ "see": ["css-002", "css-007"]
38
+ }
39
+ ```
40
+
41
+ ### Verdict values
42
+
43
+ | Verdict | Meaning |
44
+ |---------|---------|
45
+ | `EXCELLENT` | Best-in-class — use by default |
46
+ | `GOOD` | Solid choice — use when EXCELLENT variant isn't applicable |
47
+ | `BEST_PRACTICE` | Mandatory baseline — always include |
48
+ | `AVOID` | Anti-pattern — explicitly do NOT use this |
49
+ | `BROKEN` | Known broken in current context |
50
+
51
+ ### Quality score (q)
52
+
53
+ | Score | Meaning |
54
+ |-------|---------|
55
+ | 5 | Verified excellent — used in production, great result |
56
+ | 4 | Verified good — used, worked well |
57
+ | 3 | Theoretical — not yet validated in a real project |
58
+ | 2 | Mixed results — use with caution |
59
+ | 1 | Avoid — kept only for anti-pattern documentation |
60
+
61
+ ## Agent integration
62
+
63
+ In your agent file, add a **Brain** section:
64
+
65
+ ```markdown
66
+ ## Brain (procedural memory)
67
+
68
+ 1. Load `.aioson/brains/_index.json` on activation.
69
+ 2. Identify relevant tags from the current task.
70
+ 3. Load matching brain files (from index `path` field).
71
+ 4. For patterns with q ≥ 4: apply as default approach.
72
+ 5. For nodes with v === "AVOID": never implement what's in `not` field.
73
+ 6. Use `see[]` to traverse linked nodes.
74
+
75
+ Cross-reference query:
76
+ node .aioson/brains/scripts/query.js --tags <tags> --min-quality 4 --format compact
77
+
78
+ After completing a project, record new learnings:
79
+ - Add nodes to the appropriate brain file
80
+ - Rate quality honestly (1-5)
81
+ - Update `_index.json` nodes count and updated date
82
+ - Add `see[]` links to related nodes (Zettelkasten web)
83
+ ```
84
+
85
+ ## Query script
86
+
87
+ ```bash
88
+ # All EXCELLENT patterns about CSS animation
89
+ node .aioson/brains/scripts/query.js --tags css,animation --verdict EXCELLENT --format compact
90
+
91
+ # All anti-patterns (to know what NOT to do)
92
+ node .aioson/brains/scripts/query.js --avoid --format compact
93
+
94
+ # Best practices for site-forge cloning
95
+ node .aioson/brains/scripts/query.js --agent site-forge --min-quality 4 --format compact
96
+
97
+ # Get specific nodes by ID
98
+ node .aioson/brains/scripts/query.js --id css-001,css-007,js-001
99
+
100
+ # All patterns that match ALL these tags (AND)
101
+ node .aioson/brains/scripts/query.js --tags css,hover,no-js --match all
102
+ ```
103
+
104
+ ## File structure
105
+
106
+ ```
107
+ .aioson/brains/
108
+ ├── README.md # This file
109
+ ├── _index.json # Master index (always loaded, ~2KB)
110
+ ├── scripts/
111
+ │ └── query.js # Cross-reference query script
112
+ └── site-forge/
113
+ └── visual-patterns.brain.json # CSS/animation/interaction patterns (14 nodes)
114
+ ```
115
+
116
+ ## Adding a new brain
117
+
118
+ 1. Create `agentname/domain.brain.json` following the node schema above
119
+ 2. Add an entry to `_index.json` with relevant tags, agent name, and path
120
+ 3. Annotate agents that should load it with the relevant tags in their Brain section
121
+
122
+ ## Design philosophy
123
+
124
+ - **Procedural, not episodic** — "what works" not "what happened"
125
+ - **Explicit anti-patterns** — `not` and `v:AVOID` nodes prevent regressions
126
+ - **Zettelkasten web** — `see[]` links create traversable knowledge graphs
127
+ - **Token-efficient** — index is tiny; brain files are loaded only when needed
128
+ - **Agent-directed** — agents decide what to load, not an auto-injection system
@@ -0,0 +1,16 @@
1
+ {
2
+ "v": 1,
3
+ "description": "AIOSON Brain Index — agent procedural memory (quality-scored patterns). Load this first, then load specific brain files only when relevant tags match.",
4
+ "loading_strategy": "tiered — this index is always loaded (~2KB); brain files loaded on-demand by tag match",
5
+ "brains": [
6
+ {
7
+ "id": "site-forge/visual-patterns",
8
+ "agents": ["site-forge"],
9
+ "tags": ["css", "animation", "cloning", "visual-effects", "hover", "scroll", "video", "font", "keyframes", "interaction"],
10
+ "desc": "CSS/animation/interaction patterns learned from real site cloning — quality-scored, anti-pattern aware",
11
+ "path": ".aioson/brains/site-forge/visual-patterns.brain.json",
12
+ "nodes": 14,
13
+ "updated": "2026-04-01"
14
+ }
15
+ ]
16
+ }
@@ -0,0 +1,103 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * AIOSON Brain Query
4
+ * Cross-references pattern nodes across brain files by tags, quality, verdict, and agent.
5
+ *
6
+ * Usage:
7
+ * node query.js --tags css,hover # nodes matching any of these tags
8
+ * node query.js --tags css,hover --match all # nodes matching ALL tags (AND)
9
+ * node query.js --min-quality 4 # quality >= 4 only
10
+ * node query.js --agent site-forge # brain files for this agent
11
+ * node query.js --verdict EXCELLENT,BEST_PRACTICE # filter by verdict
12
+ * node query.js --avoid # show only AVOID nodes (anti-patterns)
13
+ * node query.js --id css-001,css-002 # fetch specific node IDs
14
+ * node query.js --tags animation --format compact # one-line per node output
15
+ *
16
+ * Output: JSON array of matching nodes (default) or compact table (--format compact)
17
+ */
18
+
19
+ const fs = require('fs');
20
+ const path = require('path');
21
+
22
+ const BRAINS_DIR = path.resolve(__dirname, '..');
23
+ const INDEX_PATH = path.join(BRAINS_DIR, '_index.json');
24
+
25
+ // --- Parse args ---
26
+ const args = process.argv.slice(2);
27
+ const get = (flag) => { const i = args.indexOf(flag); return i !== -1 ? args[i + 1] : null; };
28
+ const has = (flag) => args.includes(flag);
29
+
30
+ const tagsRaw = get('--tags');
31
+ const tags = tagsRaw ? tagsRaw.split(',').map(t => t.trim()) : [];
32
+ const matchMode = get('--match') || 'any'; // 'any' | 'all'
33
+ const minQ = parseInt(get('--min-quality') || '0', 10);
34
+ const agentFilter = get('--agent');
35
+ const verdictRaw = get('--verdict');
36
+ const verdicts = verdictRaw ? verdictRaw.split(',').map(v => v.trim().toUpperCase()) : [];
37
+ const idRaw = get('--id');
38
+ const ids = idRaw ? idRaw.split(',').map(i => i.trim()) : [];
39
+ const avoidOnly = has('--avoid');
40
+ const format = get('--format') || 'json';
41
+
42
+ // --- Load index ---
43
+ if (!fs.existsSync(INDEX_PATH)) {
44
+ console.error('No _index.json found at', INDEX_PATH);
45
+ process.exit(1);
46
+ }
47
+ const index = JSON.parse(fs.readFileSync(INDEX_PATH, 'utf8'));
48
+
49
+ // --- Determine which brain files to load ---
50
+ let brainFiles = index.brains;
51
+ if (agentFilter) {
52
+ brainFiles = brainFiles.filter(b => b.agents.includes(agentFilter));
53
+ }
54
+ if (tags.length > 0) {
55
+ brainFiles = brainFiles.filter(b => tags.some(t => b.tags.includes(t)));
56
+ }
57
+
58
+ // --- Load nodes ---
59
+ let nodes = [];
60
+ for (const brain of brainFiles) {
61
+ const brainPath = path.join(BRAINS_DIR, '..', brain.path);
62
+ if (!fs.existsSync(brainPath)) {
63
+ process.stderr.write(`Warning: brain file not found: ${brainPath}\n`);
64
+ continue;
65
+ }
66
+ const data = JSON.parse(fs.readFileSync(brainPath, 'utf8'));
67
+ nodes.push(...(data.nodes || []).map(n => ({ ...n, _brain: brain.id })));
68
+ }
69
+
70
+ // --- Filter nodes ---
71
+ if (ids.length > 0) {
72
+ nodes = nodes.filter(n => ids.includes(n.id));
73
+ } else {
74
+ if (tags.length > 0) {
75
+ if (matchMode === 'all') {
76
+ nodes = nodes.filter(n => tags.every(t => (n.tags || []).includes(t)));
77
+ } else {
78
+ nodes = nodes.filter(n => tags.some(t => (n.tags || []).includes(t)));
79
+ }
80
+ }
81
+ if (minQ > 0) {
82
+ nodes = nodes.filter(n => (n.q || 0) >= minQ);
83
+ }
84
+ if (verdicts.length > 0) {
85
+ nodes = nodes.filter(n => verdicts.includes((n.v || '').toUpperCase()));
86
+ }
87
+ if (avoidOnly) {
88
+ nodes = nodes.filter(n => n.v === 'AVOID' || n.v === 'BROKEN');
89
+ }
90
+ }
91
+
92
+ // --- Output ---
93
+ if (format === 'compact') {
94
+ const rows = nodes.map(n => `[${n.q}★ ${n.v}] ${n.id} — ${n.title}\n ${n.s}`);
95
+ console.log(rows.join('\n\n') || '(no matches)');
96
+ } else if (format === 'ids') {
97
+ console.log(nodes.map(n => n.id).join('\n'));
98
+ } else {
99
+ console.log(JSON.stringify(nodes, null, 2));
100
+ }
101
+
102
+ // --- Stats footer ---
103
+ process.stderr.write(`\n${nodes.length} node(s) matched across ${brainFiles.length} brain file(s)\n`);