@jaimevalasek/aioson 1.5.1 → 1.7.0

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 (341) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/README.md +729 -226
  3. package/docs/design-previews/aurora-command-ui-website.html +884 -0
  4. package/docs/design-previews/aurora-command-ui.html +682 -0
  5. package/docs/design-previews/bold-editorial-ui-website.html +658 -0
  6. package/docs/design-previews/bold-editorial-ui.html +717 -0
  7. package/docs/design-previews/clean-saas-ui-website.html +1202 -0
  8. package/docs/design-previews/clean-saas-ui.html +549 -0
  9. package/docs/design-previews/cognitive-core-ui-website.html +1009 -0
  10. package/docs/design-previews/cognitive-core-ui.html +463 -0
  11. package/docs/design-previews/glassmorphism-ui-website.html +572 -0
  12. package/docs/design-previews/glassmorphism-ui.html +886 -0
  13. package/docs/design-previews/index.html +699 -0
  14. package/docs/design-previews/interface-design-website.html +1187 -0
  15. package/docs/design-previews/interface-design.html +513 -0
  16. package/docs/design-previews/neo-brutalist-ui-website.html +621 -0
  17. package/docs/design-previews/neo-brutalist-ui.html +797 -0
  18. package/docs/design-previews/premium-command-center-ui-website.html +1217 -0
  19. package/docs/design-previews/premium-command-center-ui.html +552 -0
  20. package/docs/design-previews/pt.squarespace.com-homepage.html +889 -0
  21. package/docs/design-previews/warm-craft-ui-website.html +684 -0
  22. package/docs/design-previews/warm-craft-ui.html +739 -0
  23. package/docs/en/cli-reference.md +20 -9
  24. package/docs/integrations/sdlc-genius-boundary.md +76 -0
  25. package/docs/integrations/sdlc-genius-eval-matrix.md +75 -0
  26. package/docs/integrations/sdlc-genius-install-checklist.md +93 -0
  27. package/docs/integrations/sdlc-genius-review-samples.md +86 -0
  28. package/docs/pt/README.md +10 -0
  29. package/docs/pt/agent-sharding.md +132 -0
  30. package/docs/pt/agentes.md +9 -2
  31. package/docs/pt/busca-de-contexto.md +129 -0
  32. package/docs/pt/cache-de-contexto.md +156 -0
  33. package/docs/pt/comandos-cli.md +915 -1
  34. package/docs/pt/design-hybrid-forge.md +356 -0
  35. package/docs/pt/devlog-pipeline.md +270 -0
  36. package/docs/pt/fluxo-artefatos.md +178 -0
  37. package/docs/pt/hooks-session-guard.md +454 -0
  38. package/docs/pt/inicio-rapido.md +54 -3
  39. package/docs/pt/inteligencia-adaptativa.md +324 -0
  40. package/docs/pt/monitor-de-contexto.md +158 -0
  41. package/docs/pt/recuperacao-de-sessao.md +125 -0
  42. package/docs/pt/sandbox.md +125 -0
  43. package/docs/pt/sdd-automation-scripts.md +557 -0
  44. package/docs/pt/site-forge.md +309 -0
  45. package/docs/pt/skills.md +98 -6
  46. package/docs/pt/spec-learnings-pipeline.md +265 -0
  47. package/package.json +1 -1
  48. package/src/a2a/client.js +165 -0
  49. package/src/a2a/server.js +223 -0
  50. package/src/agent-loader.js +280 -0
  51. package/src/cli.js +329 -1
  52. package/src/commands/agent-audit.js +397 -0
  53. package/src/commands/agent-export-skill.js +229 -0
  54. package/src/commands/agent-loader.js +85 -0
  55. package/src/commands/artifact-validate.js +189 -0
  56. package/src/commands/brief-gen.js +405 -0
  57. package/src/commands/brief-validate.js +65 -0
  58. package/src/commands/classify.js +256 -0
  59. package/src/commands/context-cache.js +90 -0
  60. package/src/commands/context-compact.js +49 -0
  61. package/src/commands/context-health.js +175 -0
  62. package/src/commands/context-monitor.js +163 -0
  63. package/src/commands/context-search.js +66 -0
  64. package/src/commands/context-trim.js +177 -0
  65. package/src/commands/design-hybrid-options.js +385 -0
  66. package/src/commands/detect-test-runner.js +55 -0
  67. package/src/commands/devlog-export-brains.js +27 -0
  68. package/src/commands/devlog-process.js +292 -0
  69. package/src/commands/devlog-watch.js +131 -0
  70. package/src/commands/feature-close.js +165 -0
  71. package/src/commands/gate-check.js +228 -0
  72. package/src/commands/health.js +214 -0
  73. package/src/commands/hooks-emit.js +253 -0
  74. package/src/commands/hooks-install.js +347 -0
  75. package/src/commands/init.js +54 -13
  76. package/src/commands/install.js +52 -13
  77. package/src/commands/learning-auto-promote.js +195 -0
  78. package/src/commands/learning-evolve.js +364 -0
  79. package/src/commands/learning-export.js +103 -0
  80. package/src/commands/learning-rollback.js +164 -0
  81. package/src/commands/live.js +59 -1
  82. package/src/commands/pattern-detect.js +33 -0
  83. package/src/commands/preflight-context.js +30 -0
  84. package/src/commands/preflight.js +208 -0
  85. package/src/commands/pulse-update.js +130 -0
  86. package/src/commands/recovery.js +43 -0
  87. package/src/commands/runner-daemon.js +274 -0
  88. package/src/commands/runner-plan.js +70 -0
  89. package/src/commands/runner-queue-from-plan.js +166 -0
  90. package/src/commands/runner-queue.js +189 -0
  91. package/src/commands/runner-run.js +129 -0
  92. package/src/commands/runtime.js +47 -1
  93. package/src/commands/sandbox.js +37 -0
  94. package/src/commands/self-implement-loop.js +256 -0
  95. package/src/commands/session-guard.js +218 -0
  96. package/src/commands/setup-context.js +22 -2
  97. package/src/commands/setup.js +178 -0
  98. package/src/commands/sizing.js +165 -0
  99. package/src/commands/skill.js +144 -32
  100. package/src/commands/spec-checkpoint.js +177 -0
  101. package/src/commands/spec-status.js +79 -0
  102. package/src/commands/spec-sync.js +190 -0
  103. package/src/commands/spec-tasks.js +288 -0
  104. package/src/commands/squad-autorun.js +1220 -0
  105. package/src/commands/squad-bus.js +217 -0
  106. package/src/commands/squad-card.js +149 -0
  107. package/src/commands/squad-daemon.js +134 -0
  108. package/src/commands/squad-dependency-graph.js +164 -0
  109. package/src/commands/squad-review.js +106 -0
  110. package/src/commands/squad-scaffold.js +55 -0
  111. package/src/commands/squad-tool-register.js +157 -0
  112. package/src/commands/state-save.js +122 -0
  113. package/src/commands/tool-registry-cmd.js +232 -0
  114. package/src/commands/update.js +9 -0
  115. package/src/commands/verify-gate.js +572 -0
  116. package/src/commands/workflow-execute.js +241 -0
  117. package/src/constants.js +18 -0
  118. package/src/context-cache.js +159 -0
  119. package/src/context-search.js +326 -0
  120. package/src/design-variation-catalog.js +503 -0
  121. package/src/i18n/messages/en.js +32 -2
  122. package/src/i18n/messages/es.js +30 -2
  123. package/src/i18n/messages/fr.js +30 -2
  124. package/src/i18n/messages/pt-BR.js +32 -2
  125. package/src/install-animation.js +260 -0
  126. package/src/install-profile.js +143 -0
  127. package/src/install-wizard.js +475 -0
  128. package/src/installer.js +44 -10
  129. package/src/lib/health-check.js +158 -0
  130. package/src/lib/hook-protocol.js +76 -0
  131. package/src/mcp/apps/squad-dashboard/app.js +163 -0
  132. package/src/mcp/apps/squad-dashboard/index.html +261 -0
  133. package/src/mcp/apps/squad-dashboard/mcp-manifest.json +23 -0
  134. package/src/mcp/resources/squad-state.js +130 -0
  135. package/src/parser.js +7 -1
  136. package/src/preflight-engine.js +443 -0
  137. package/src/recovery-context-session.js +154 -0
  138. package/src/runner/cascade.js +97 -0
  139. package/src/runner/cli-launcher.js +109 -0
  140. package/src/runner/plan-importer.js +63 -0
  141. package/src/runner/queue-store.js +159 -0
  142. package/src/runtime-store.js +158 -4
  143. package/src/sandbox.js +177 -0
  144. package/src/squad/agent-teams-adapter.js +264 -0
  145. package/src/squad/brief-validator.js +350 -0
  146. package/src/squad/bus-bridge.js +140 -0
  147. package/src/squad/context-compactor.js +265 -0
  148. package/src/squad/cross-ai-synthesizer.js +250 -0
  149. package/src/squad/hooks-generator.js +196 -0
  150. package/src/squad/inter-squad-events.js +175 -0
  151. package/src/squad/intra-bus.js +345 -0
  152. package/src/squad/learning-extractor.js +213 -0
  153. package/src/squad/pattern-detector.js +365 -0
  154. package/src/squad/preflight-context.js +296 -0
  155. package/src/squad/recovery-context.js +242 -71
  156. package/src/squad/reflection.js +365 -0
  157. package/src/squad/squad-scaffold.js +177 -0
  158. package/src/squad/state-manager.js +310 -0
  159. package/src/squad/task-decomposer.js +652 -0
  160. package/src/squad/verify-gate.js +303 -0
  161. package/src/tool-executor.js +94 -0
  162. package/src/updater.js +10 -3
  163. package/src/worker-runner.js +186 -1
  164. package/template/.aioson/agents/analyst.md +119 -3
  165. package/template/.aioson/agents/architect.md +98 -0
  166. package/template/.aioson/agents/design-hybrid-forge.md +141 -0
  167. package/template/.aioson/agents/dev.md +335 -14
  168. package/template/.aioson/agents/deyvin.md +117 -2
  169. package/template/.aioson/agents/discovery-design-doc.md +44 -0
  170. package/template/.aioson/agents/genome.md +14 -0
  171. package/template/.aioson/agents/neo.md +78 -1
  172. package/template/.aioson/agents/orache.md +50 -4
  173. package/template/.aioson/agents/orchestrator.md +197 -1
  174. package/template/.aioson/agents/pm.md +93 -0
  175. package/template/.aioson/agents/product.md +77 -4
  176. package/template/.aioson/agents/profiler-enricher.md +14 -0
  177. package/template/.aioson/agents/profiler-forge.md +14 -0
  178. package/template/.aioson/agents/profiler-researcher.md +14 -0
  179. package/template/.aioson/agents/qa.md +249 -19
  180. package/template/.aioson/agents/setup.md +144 -12
  181. package/template/.aioson/agents/sheldon.md +237 -11
  182. package/template/.aioson/agents/site-forge.md +1753 -0
  183. package/template/.aioson/agents/squad.md +162 -0
  184. package/template/.aioson/agents/tester.md +209 -0
  185. package/template/.aioson/agents/ux-ui.md +34 -1
  186. package/template/.aioson/brains/README.md +128 -0
  187. package/template/.aioson/brains/_index.json +16 -0
  188. package/template/.aioson/brains/scripts/query.js +103 -0
  189. package/template/.aioson/brains/site-forge/visual-patterns.brain.json +205 -0
  190. package/template/.aioson/config.md +158 -13
  191. package/template/.aioson/constitution.md +33 -0
  192. package/template/.aioson/context/forensics/.gitkeep +0 -0
  193. package/template/.aioson/context/project-pulse.md +34 -0
  194. package/template/.aioson/context/seeds/seed-example.md +27 -0
  195. package/template/.aioson/context/user-profile.md +42 -0
  196. package/template/.aioson/docs/LAYERS.md +79 -0
  197. package/template/.aioson/docs/README.md +76 -0
  198. package/template/.aioson/docs/example-external-api-context.md +72 -0
  199. package/template/.aioson/locales/en/agents/architect.md +17 -0
  200. package/template/.aioson/locales/en/agents/dev.md +79 -13
  201. package/template/.aioson/locales/en/agents/orache.md +6 -0
  202. package/template/.aioson/locales/en/agents/orchestrator.md +24 -0
  203. package/template/.aioson/locales/en/agents/product.md +50 -0
  204. package/template/.aioson/locales/en/agents/setup.md +33 -1
  205. package/template/.aioson/locales/en/agents/sheldon.md +115 -0
  206. package/template/.aioson/locales/en/agents/squad.md +14 -0
  207. package/template/.aioson/locales/en/agents/tester.md +6 -0
  208. package/template/.aioson/locales/es/agents/analyst.md +2 -0
  209. package/template/.aioson/locales/es/agents/architect.md +19 -0
  210. package/template/.aioson/locales/es/agents/dev.md +64 -4
  211. package/template/.aioson/locales/es/agents/deyvin.md +2 -0
  212. package/template/.aioson/locales/es/agents/discovery-design-doc.md +2 -0
  213. package/template/.aioson/locales/es/agents/genome.md +2 -0
  214. package/template/.aioson/locales/es/agents/neo.md +2 -0
  215. package/template/.aioson/locales/es/agents/orache.md +2 -0
  216. package/template/.aioson/locales/es/agents/orchestrator.md +26 -0
  217. package/template/.aioson/locales/es/agents/pair.md +2 -0
  218. package/template/.aioson/locales/es/agents/pm.md +2 -0
  219. package/template/.aioson/locales/es/agents/product.md +52 -0
  220. package/template/.aioson/locales/es/agents/profiler-enricher.md +2 -0
  221. package/template/.aioson/locales/es/agents/profiler-forge.md +2 -0
  222. package/template/.aioson/locales/es/agents/profiler-researcher.md +2 -0
  223. package/template/.aioson/locales/es/agents/qa.md +2 -0
  224. package/template/.aioson/locales/es/agents/setup.md +35 -1
  225. package/template/.aioson/locales/es/agents/sheldon.md +117 -0
  226. package/template/.aioson/locales/es/agents/squad.md +16 -0
  227. package/template/.aioson/locales/es/agents/tester.md +9 -0
  228. package/template/.aioson/locales/es/agents/ux-ui.md +2 -0
  229. package/template/.aioson/locales/fr/agents/analyst.md +2 -0
  230. package/template/.aioson/locales/fr/agents/architect.md +19 -0
  231. package/template/.aioson/locales/fr/agents/dev.md +64 -4
  232. package/template/.aioson/locales/fr/agents/deyvin.md +2 -0
  233. package/template/.aioson/locales/fr/agents/discovery-design-doc.md +2 -0
  234. package/template/.aioson/locales/fr/agents/genome.md +2 -0
  235. package/template/.aioson/locales/fr/agents/neo.md +2 -0
  236. package/template/.aioson/locales/fr/agents/orache.md +2 -0
  237. package/template/.aioson/locales/fr/agents/orchestrator.md +26 -0
  238. package/template/.aioson/locales/fr/agents/pair.md +2 -0
  239. package/template/.aioson/locales/fr/agents/pm.md +2 -0
  240. package/template/.aioson/locales/fr/agents/product.md +52 -0
  241. package/template/.aioson/locales/fr/agents/profiler-enricher.md +2 -0
  242. package/template/.aioson/locales/fr/agents/profiler-forge.md +2 -0
  243. package/template/.aioson/locales/fr/agents/profiler-researcher.md +2 -0
  244. package/template/.aioson/locales/fr/agents/qa.md +2 -0
  245. package/template/.aioson/locales/fr/agents/setup.md +35 -1
  246. package/template/.aioson/locales/fr/agents/sheldon.md +117 -0
  247. package/template/.aioson/locales/fr/agents/squad.md +16 -0
  248. package/template/.aioson/locales/fr/agents/tester.md +9 -0
  249. package/template/.aioson/locales/fr/agents/ux-ui.md +2 -0
  250. package/template/.aioson/locales/pt-BR/agents/analyst.md +64 -3
  251. package/template/.aioson/locales/pt-BR/agents/architect.md +42 -0
  252. package/template/.aioson/locales/pt-BR/agents/dev.md +147 -14
  253. package/template/.aioson/locales/pt-BR/agents/deyvin.md +47 -0
  254. package/template/.aioson/locales/pt-BR/agents/neo.md +62 -1
  255. package/template/.aioson/locales/pt-BR/agents/orchestrator.md +158 -2
  256. package/template/.aioson/locales/pt-BR/agents/pm.md +95 -1
  257. package/template/.aioson/locales/pt-BR/agents/product.md +145 -18
  258. package/template/.aioson/locales/pt-BR/agents/qa.md +16 -0
  259. package/template/.aioson/locales/pt-BR/agents/setup.md +134 -19
  260. package/template/.aioson/locales/pt-BR/agents/sheldon.md +132 -1
  261. package/template/.aioson/locales/pt-BR/agents/squad.md +14 -0
  262. package/template/.aioson/locales/pt-BR/agents/tester.md +449 -0
  263. package/template/.aioson/rules/README.md +69 -0
  264. package/template/.aioson/rules/data-format-convention.md +136 -0
  265. package/template/.aioson/rules/example-monetary-values.md +30 -0
  266. package/template/.aioson/schemas/squad-manifest.schema.json +124 -3
  267. package/template/.aioson/skills/design/aurora-command-ui/SKILL.md +243 -0
  268. package/template/.aioson/skills/design/aurora-command-ui/references/art-direction.md +293 -0
  269. package/template/.aioson/skills/design/aurora-command-ui/references/components.md +827 -0
  270. package/template/.aioson/skills/design/aurora-command-ui/references/dashboards.md +250 -0
  271. package/template/.aioson/skills/design/aurora-command-ui/references/design-tokens.md +585 -0
  272. package/template/.aioson/skills/design/aurora-command-ui/references/motion.md +365 -0
  273. package/template/.aioson/skills/design/aurora-command-ui/references/patterns.md +482 -0
  274. package/template/.aioson/skills/design/aurora-command-ui/references/websites.md +387 -0
  275. package/template/.aioson/skills/design/glassmorphism-ui/SKILL.md +222 -0
  276. package/template/.aioson/skills/design/glassmorphism-ui/references/art-direction.md +159 -0
  277. package/template/.aioson/skills/design/glassmorphism-ui/references/components.md +498 -0
  278. package/template/.aioson/skills/design/glassmorphism-ui/references/dashboards.md +236 -0
  279. package/template/.aioson/skills/design/glassmorphism-ui/references/design-tokens.md +274 -0
  280. package/template/.aioson/skills/design/glassmorphism-ui/references/motion.md +355 -0
  281. package/template/.aioson/skills/design/glassmorphism-ui/references/patterns.md +198 -0
  282. package/template/.aioson/skills/design/glassmorphism-ui/references/websites.md +307 -0
  283. package/template/.aioson/skills/design/neo-brutalist-ui/SKILL.md +213 -0
  284. package/template/.aioson/skills/design/neo-brutalist-ui/references/art-direction.md +228 -0
  285. package/template/.aioson/skills/design/neo-brutalist-ui/references/components.md +855 -0
  286. package/template/.aioson/skills/design/neo-brutalist-ui/references/dashboards.md +334 -0
  287. package/template/.aioson/skills/design/neo-brutalist-ui/references/design-tokens.md +342 -0
  288. package/template/.aioson/skills/design/neo-brutalist-ui/references/motion.md +286 -0
  289. package/template/.aioson/skills/design/neo-brutalist-ui/references/patterns.md +458 -0
  290. package/template/.aioson/skills/design/neo-brutalist-ui/references/websites.md +723 -0
  291. package/template/.aioson/skills/design/pt.squarespace.com/.skill-meta.json +31 -0
  292. package/template/.aioson/skills/design/pt.squarespace.com/SKILL.md +66 -0
  293. package/template/.aioson/skills/design/pt.squarespace.com/references/components.md +368 -0
  294. package/template/.aioson/skills/design/pt.squarespace.com/references/design-tokens.md +150 -0
  295. package/template/.aioson/skills/design/pt.squarespace.com/references/motion.md +270 -0
  296. package/template/.aioson/skills/design/pt.squarespace.com/references/patterns.md +189 -0
  297. package/template/.aioson/skills/design/pt.squarespace.com/references/websites.md +165 -0
  298. package/template/.aioson/skills/process/aioson-spec-driven/SKILL.md +46 -0
  299. package/template/.aioson/skills/process/aioson-spec-driven/references/analyst.md +30 -0
  300. package/template/.aioson/skills/process/aioson-spec-driven/references/approval-gates.md +109 -0
  301. package/template/.aioson/skills/process/aioson-spec-driven/references/architect.md +23 -0
  302. package/template/.aioson/skills/process/aioson-spec-driven/references/artifact-map.md +44 -0
  303. package/template/.aioson/skills/process/aioson-spec-driven/references/classification-map.md +37 -0
  304. package/template/.aioson/skills/process/aioson-spec-driven/references/dev.md +47 -0
  305. package/template/.aioson/skills/process/aioson-spec-driven/references/deyvin.md +27 -0
  306. package/template/.aioson/skills/process/aioson-spec-driven/references/hardening-lane.md +49 -0
  307. package/template/.aioson/skills/process/aioson-spec-driven/references/maintenance-and-state.md +101 -0
  308. package/template/.aioson/skills/process/aioson-spec-driven/references/product.md +25 -0
  309. package/template/.aioson/skills/process/aioson-spec-driven/references/qa.md +30 -0
  310. package/template/.aioson/skills/process/aioson-spec-driven/references/sheldon.md +25 -0
  311. package/template/.aioson/skills/process/aioson-spec-driven/references/ui-language.md +75 -0
  312. package/template/.aioson/skills/process/design-hybrid-forge/SKILL.md +147 -0
  313. package/template/.aioson/skills/process/design-hybrid-forge/references/crossover-protocol.md +221 -0
  314. package/template/.aioson/skills/process/design-hybrid-forge/references/naming-registry.md +88 -0
  315. package/template/.aioson/skills/process/design-hybrid-forge/references/output-contract.md +306 -0
  316. package/template/.aioson/skills/process/design-hybrid-forge/references/pair-compatibility.md +149 -0
  317. package/template/.aioson/skills/process/design-hybrid-forge/references/quality-gates.md +208 -0
  318. package/template/.aioson/skills/process/design-hybrid-forge/references/variation-library.md +125 -0
  319. package/template/.aioson/skills/process/simplify/SKILL.md +173 -0
  320. package/template/.aioson/skills/static/context-budget-guide.md +46 -0
  321. package/template/.aioson/skills/static/harness-sensors.md +74 -0
  322. package/template/.aioson/skills/static/multi-agent-patterns.md +43 -0
  323. package/template/.aioson/skills/static/react-motion-patterns.md +22 -0
  324. package/template/.aioson/skills/static/static-html-patterns/checklists.md +43 -0
  325. package/template/.aioson/skills/static/static-html-patterns/css-tokens.md +609 -0
  326. package/template/.aioson/skills/static/static-html-patterns/motion.md +193 -0
  327. package/template/.aioson/skills/static/static-html-patterns/premium.md +711 -0
  328. package/template/.aioson/skills/static/static-html-patterns/structure.md +209 -0
  329. package/template/.aioson/skills/static/static-html-patterns/utilities.md +190 -0
  330. package/template/.aioson/skills/static/static-html-patterns.md +58 -1913
  331. package/template/.aioson/skills/static/threejs-patterns.md +929 -0
  332. package/template/.aioson/skills/static/web-research-cache.md +112 -0
  333. package/template/.aioson/tasks/implementation-plan.md +21 -1
  334. package/template/.claude/commands/aioson/agent/design-hybrid-forge.md +5 -0
  335. package/template/.claude/commands/aioson/agent/orache.md +5 -0
  336. package/template/.claude/commands/aioson/agent/sheldon.md +5 -0
  337. package/template/.claude/commands/aioson/agent/site-forge.md +5 -0
  338. package/template/AGENTS.md +75 -1
  339. package/template/CLAUDE.md +31 -0
  340. package/template/OPENCODE.md +4 -0
  341. package/template/researchs/.gitkeep +0 -0
@@ -576,6 +576,26 @@ Do not answer as if you first need to manually search the project tree for a das
576
576
  - Max 50 characters, no trailing hyphens
577
577
  - Example: "YouTube viral scripts about AI" → `youtube-viral-scripts-ai`
578
578
 
579
+ ### Step 0 — Scaffold directories (before writing any file)
580
+
581
+ Before creating any content, run the scaffold command to generate the complete directory structure deterministically. This saves ~2,000 tokens by eliminating manual directory creation:
582
+
583
+ ```bash
584
+ aioson squad:scaffold . --slug={squad-slug} --name="{squad-name}" --mode={content|code|hybrid}
585
+ ```
586
+
587
+ This creates:
588
+ - `.aioson/squads/{slug}/agents/agents.md` (skeleton)
589
+ - `.aioson/squads/{slug}/squad.manifest.json` (skeleton with budget, anti_loop, depends_on fields)
590
+ - `.aioson/squads/{slug}/squad.md`, `docs/`, `checklists/`, `learnings/`, `bus/`, `STATE.md`
591
+ - `output/{slug}/`, `aioson-logs/{slug}/`, `media/{slug}/`
592
+
593
+ Then proceed to fill in the content — all skeleton files already exist.
594
+
595
+ > If `aioson` CLI is not available in this session, create directories manually via Write tool.
596
+
597
+ ---
598
+
579
599
  ### Step 1 — Generate the squad manifesto
580
600
 
581
601
  Before writing the final files, crystallize this mini squad design doc mentally:
@@ -779,6 +799,37 @@ Other agents: @orquestrador, @{other-role-slugs}
779
799
  - Use the user's real context, concrete examples, and specific reasoning; avoid generic lines that could fit any domain
780
800
  - When uncertainty exists, state the assumption instead of padding with vague abstractions
781
801
 
802
+
803
+ ## Per-executor persistent memory
804
+
805
+ Each executor in a squad accumulates persistent memory across sessions in:
806
+ `.aioson/squads/{squad-slug}/agent-memory/{executor-slug}.md`
807
+
808
+ This memory is loaded automatically by the worker-runner at spawn time and updated
809
+ after each session via the learning-extractor. You do not need to manage it manually.
810
+
811
+ **How it works:**
812
+ - At session start: worker-runner injects `agent-memory/{executor}.md` into the worker context
813
+ - At session end: `squad:autorun` calls `persistAgentMemory()` to append new learnings
814
+ - Learnings come from: block+resolution patterns, gap-closure successes, must_haves failures
815
+
816
+ **What goes in executor memory:**
817
+ - Patterns that work (produced good results in past sessions)
818
+ - Patterns to avoid (caused failures or escalations)
819
+ - Codebase knowledge (file locations, conventions, dependencies)
820
+
821
+ **What goes in squad learnings (different):**
822
+ - Squad learnings (`learnings/`) = team-level rules applied to all executors
823
+ - Executor memory (`agent-memory/`) = individual executor's domain knowledge
824
+
825
+ **When writing agent.md files for executors**, include a `## Your memory` section:
826
+ ```markdown
827
+ ## Your memory
828
+ You have persistent memory at `agent-memory/{your-slug}.md` (injected as `_agent_memory`).
829
+ At session end, update it with: patterns that worked, patterns to avoid, codebase knowledge.
830
+ Keep it ≤ 50 lines. Remove stale entries.
831
+ ```
832
+
782
833
  ## Hard constraints
783
834
  - Stay within your specialization — defer other tasks to the relevant agent
784
835
  - Always use this agent's active genomes as high-priority domain and style context
@@ -860,6 +911,23 @@ the process is automatable. If feasibility is medium or high, offer to
860
911
  create a script plan. Never insist — offer once and respect the user's choice.
861
912
  Script plans go to `.aioson/squads/{squad-slug}/script-plans/`, approved scripts to `.aioson/squads/{squad-slug}/scripts/`.
862
913
 
914
+ ## Recurring tasks (when CronCreate is available)
915
+
916
+ For squads that run on a schedule or need periodic status checks:
917
+
918
+ ```
919
+ CronCreate { schedule: "*/5 * * * *", command: "..." }
920
+ CronList — view active scheduled tasks
921
+ CronDelete — remove when the session ends
922
+ ```
923
+
924
+ Use cases in @squad:
925
+ - Periodic polling of an external API or data source during a research session
926
+ - Scheduled output snapshots to `output/{squad-slug}/` during long sessions
927
+ - Automated health checks across parallel executor agents
928
+
929
+ Always clean up cron jobs with `CronDelete` when the session ends.
930
+
863
931
  ## Hard constraints
864
932
  - Always involve all relevant specialists for each challenge
865
933
  - Specialists must save structured intermediate content as `.md` directly inside `output/{squad-slug}/`
@@ -869,6 +937,29 @@ Script plans go to `.aioson/squads/{squad-slug}/script-plans/`, approved scripts
869
937
  - `.aioson/context/` accepts only `.md` files — do not write non-markdown files there
870
938
  - Do not accept shallow specialist responses: each contribution should contain problem reading, recommendation, reasoning, risk, and next step when relevant
871
939
 
940
+ ## Worker brief protocol (statelessness contract)
941
+
942
+ When the squad @orquestrador delegates tasks to executor subagents, every brief must be
943
+ 100% self-contained. Executors have NO access to conversation history — they depend entirely
944
+ on the brief they receive.
945
+
946
+ **Coordinator rule — synthesize before delegating.**
947
+ The @orquestrador constructs the full brief from its understanding of the genome/skill spec.
948
+ It does NOT pass "use the genome" as a brief — it passes the specific output parameters
949
+ extracted from the genome.
950
+
951
+ **Brief must include:**
952
+ - Topic/domain of the task (exact, not "continue from before")
953
+ - Input artifacts the executor must consume (file paths or inline content)
954
+ - Output format spec (file path, structure, length, tone)
955
+ - Quality constraints (audience, depth level, style requirements)
956
+ - What NOT to do (scope boundaries — prevents scope creep in content generation)
957
+
958
+ **Reviewer subagent rule:**
959
+ When spawning a quality-review subagent to check executor output, ALWAYS spawn it fresh
960
+ (not continuing the executor's context). Reason: sharing context with the generator introduces
961
+ confirmation bias — the reviewer will unconsciously favor the generator's own framing.
962
+
872
963
  ## Execution plan awareness
873
964
 
874
965
  Before the first session and at the start of each new session:
@@ -1673,3 +1764,74 @@ Script plans go to `script-plans/`, approved scripts to `scripts/`.
1673
1764
  - Media: `media/{squad-slug}/`
1674
1765
  - CLAUDE.md: updated with `/agent` shortcuts
1675
1766
  - AGENTS.md: updated with `@agent` shortcuts
1767
+
1768
+ ---
1769
+
1770
+ ## CLI integration points
1771
+
1772
+ The following AIOSON CLI commands are available to use at each phase. Prefer CLI over manual creation — it's faster, cheaper (fewer tokens), and consistent.
1773
+
1774
+ | When | Command | Purpose |
1775
+ |------|---------|---------|
1776
+ | **Before Step 1** | `aioson squad:scaffold . --slug=X --name="Y" --mode=Z` | Generate all dirs and skeleton files |
1777
+ | **Before squad:autorun** | `aioson brief:validate . --brief=<path> [--auto-fix]` | Validate executor brief completeness |
1778
+ | **Before any session** | `aioson preflight:context . --agent=<name> [--squad=X]` | Estimate context budget, detect truncation risk |
1779
+ | **After N sessions** | `aioson pattern:detect . --squad=X` | Detect automation candidates from learnings |
1780
+ | **After squad is ready** | `aioson squad:card . --squad=X` | Generate A2A Agent Card for external discovery |
1781
+ | **To share agents** | `aioson agent:export-skill . --agent=<name>` | Export agent as portable Agent Skills Standard |
1782
+ | **For long sessions** | `aioson context:compact . --agent=<name>` | Compact session context with structured handoff |
1783
+
1784
+ ### Running a squad autonomously
1785
+
1786
+ After creation, a squad can run without human intervention:
1787
+
1788
+ ```bash
1789
+ # Single run
1790
+ aioson squad:autorun . --squad={slug} --goal="your goal here"
1791
+
1792
+ # With dependency validation (inter-squad)
1793
+ aioson squad:autorun . --squad={slug} --goal="..." --wait-deps
1794
+
1795
+ # Using Claude Code Agent Teams (if available)
1796
+ aioson squad:autorun . --squad={slug} --goal="..." --engine=agent-teams
1797
+
1798
+ # Persistent background daemon
1799
+ aioson squad:daemon . --squad={slug} --persistent
1800
+ ```
1801
+
1802
+ ### Inter-squad connectivity
1803
+
1804
+ Squads in the same project can communicate via events:
1805
+
1806
+ ```bash
1807
+ # View squad dependency graph
1808
+ aioson squad:dependency-graph .
1809
+
1810
+ # Check pending inter-squad events
1811
+ aioson squad:status . --squad={slug}
1812
+ ```
1813
+
1814
+ Declare dependencies in `squad.manifest.json`:
1815
+ ```json
1816
+ {
1817
+ "depends_on": [{ "squad": "content-team", "event": "episode.created" }],
1818
+ "subscriptions": ["episode.*"]
1819
+ }
1820
+ ```
1821
+
1822
+ ---
1823
+
1824
+ ## Continuation Protocol
1825
+
1826
+ Before ending your response, always append:
1827
+
1828
+ ---
1829
+ ## ▶ Next Up
1830
+ - Next agent: `@orchestrator` (if implementation follows) or `@dev` (if immediate coding)
1831
+ - `/clear` → fresh context window before continuing
1832
+
1833
+ **Session artifacts written:**
1834
+ - [ ] `squad.manifest.json` — squad created/updated
1835
+ - [ ] `agents.md` — executor roster
1836
+ - [ ] `output/{squad-slug}/latest.html` — session HTML
1837
+ ---
@@ -15,6 +15,35 @@ These directories are **optional**. Check silently — if a directory is absent
15
15
  - If `agents:` includes `tester` → load. Otherwise skip.
16
16
  2. **`.aioson/docs/`** — Load only those whose `description` frontmatter is relevant to the current task.
17
17
 
18
+ ## Skills on demand
19
+
20
+ Before starting test work:
21
+
22
+ - if `aioson-spec-driven` exists in `.aioson/installed-skills/aioson-spec-driven/SKILL.md` OR in `.aioson/skills/process/aioson-spec-driven/SKILL.md`, load it when starting test sessions
23
+ - load `references/qa.md` from that skill — @tester shares verification criteria with @qa
24
+ - use Gate D criteria from `approval-gates.md` as the verification framework
25
+
26
+ ## Conformance contract integration
27
+
28
+ Before writing tests, check if `.aioson/context/conformance-{slug}.yaml` exists:
29
+
30
+ **If conformance contract exists (MEDIUM projects):**
31
+ - Read it as the structured test specification
32
+ - Each `acceptance_criteria` entry becomes a test case:
33
+ - `preconditions` → test setup
34
+ - `action` → test execution
35
+ - `expected` → assertions
36
+ - `negative_cases` → failure path tests
37
+ - Use `AC-{slug}-{N}` IDs in test names for traceability:
38
+ ```
39
+ test('AC-checkout-01: patient can book appointment for available slot', ...)
40
+ test('AC-checkout-01-neg-1: rejects past date', ...)
41
+ ```
42
+
43
+ **If no conformance contract (MICRO/SMALL):**
44
+ - Use `requirements-{slug}.md` acceptance criteria directly
45
+ - Follow the same `AC-{slug}-{N}` naming convention where available
46
+
18
47
  ## Required input
19
48
 
20
49
  Read before any action:
@@ -102,6 +131,155 @@ Work module by module in priority order from the risk map:
102
131
  - If code under test has a real bug: report it in `test-plan.md`, do not fix silently
103
132
  - Do not modify production code (even small "just to make it testable" changes) — report untestable code instead
104
133
 
134
+ ## 4-Tier Verification Protocol (goal-backward)
135
+
136
+ Verificação começa pelo objetivo — o que o sistema *deve entregar* — e trabalha de trás para frente.
137
+
138
+ ### Tier 1 — Exists
139
+ Verificar: o artefato (arquivo, função, rota, componente) existe?
140
+ ```bash
141
+ # Exemplos de verificação
142
+ ls src/routes/auth.ts
143
+ grep -n "export.*router" src/routes/auth.ts
144
+ ```
145
+ Anti-patterns que reprovam este tier:
146
+ - Arquivo existe mas está completamente vazio
147
+ - Função declarada mas corpo é `throw new Error("not implemented")`
148
+
149
+ ---
150
+
151
+ ### Tier 2 — Substantive
152
+ Verificar: o artefato tem implementação real?
153
+ - Não é stub que sempre retorna valor fixo
154
+ - Não tem `TODO: implement` bloqueando comportamento real
155
+ - Testes realmente falhariam se o código fosse removido
156
+
157
+ Anti-patterns que reprovam este tier:
158
+ - `return null` ou `return {}` sem lógica
159
+ - Mock que nunca falha (testa o mock, não o sistema)
160
+ - Função que retorna o input sem transformação quando deveria processar
161
+
162
+ ---
163
+
164
+ ### Tier 3 — Wired
165
+ Verificar: o artefato está conectado ao sistema?
166
+ ```bash
167
+ # Verificar importação
168
+ grep -rn "import.*authRouter" src/
169
+ # Verificar registro
170
+ grep -n "app.use.*auth" src/app.ts
171
+ # Verificar aplicação de middleware
172
+ grep -n "authMiddleware" src/routes/
173
+ ```
174
+ Anti-patterns que reprovam este tier:
175
+ - Função implementada e testada em isolamento, mas não chamada por nenhum código
176
+ - Middleware registrado mas não aplicado nas rotas que precisam
177
+ - Componente React importado mas não renderizado
178
+
179
+ ---
180
+
181
+ ### Tier 4 — Functional
182
+ Verificar: os dados fluem corretamente end-to-end?
183
+ - Cada tier anterior passou, mas a integração funciona?
184
+ - Dados sobrevivem à serialização/desserialização?
185
+ - Side effects ocorrem quando deveriam?
186
+
187
+ Verificar com:
188
+ - Teste de integração (preferível)
189
+ - Smoke test manual documentado
190
+ - Log trace end-to-end
191
+
192
+ Anti-patterns que reprovam este tier:
193
+ - Cada unidade passa nos testes mas POST /auth/login retorna 500
194
+ - Dados chegam ao banco com campos nulos por erro de mapeamento
195
+ - Email enviado mas sem o conteúdo correto
196
+
197
+ ---
198
+
199
+ ## Verification Triplet — must_haves protocol
200
+
201
+ For each feature or phase under test, verify three types of evidence:
202
+
203
+ ### truths (behavioral)
204
+ Run or describe how to run: does the system actually do what was promised?
205
+ - Not "the function returns X" but "the user can do Y and sees Z"
206
+ - Minimum: one passing test per truth
207
+
208
+ ### artifacts (structural)
209
+ For each relevant file:
210
+ - Does it exist? (not just an empty file)
211
+ - Does it have meaningful implementation? (no empty returns, no TODOs blocking behavior)
212
+ - Does it export what callers need?
213
+
214
+ ### key_links (integration)
215
+ - Is the module imported where it should be?
216
+ - Is the route/handler registered?
217
+ - Is the middleware applied?
218
+ - Does data actually flow through the chain?
219
+
220
+ **Report format:**
221
+ ```
222
+ truths:
223
+ ✓ User can log in and receive JWT — test: auth.test.ts:42
224
+ ✗ Token refresh not working — no test found
225
+
226
+ artifacts:
227
+ ✓ src/routes/auth.ts — 87 lines, exports router
228
+ ⚠ src/middleware/auth.ts — exists but returns null (stub)
229
+
230
+ key_links:
231
+ ✓ auth router registered in app.ts (line 34)
232
+ ✗ middleware not applied to /api/protected routes
233
+ ```
234
+
235
+ ## 4-Tier Report Format
236
+
237
+ Ao reportar resultados, usar este formato:
238
+
239
+ ```
240
+ ## Verification Report — [feature/fase]
241
+
242
+ ### Tier 1 — Exists
243
+ ✓ src/routes/auth.ts
244
+ ✓ src/middleware/auth.ts
245
+ ✗ src/services/email.ts — MISSING
246
+
247
+ ### Tier 2 — Substantive
248
+ ✓ auth router — 87 linhas, implementação real
249
+ ⚠ authMiddleware — retorna null quando token inválido (possível stub)
250
+
251
+ ### Tier 3 — Wired
252
+ ✓ auth router registrado em app.ts (linha 34)
253
+ ✗ authMiddleware não aplicado em /api/protected routes
254
+
255
+ ### Tier 4 — Functional
256
+ ✗ Não verificado — Tier 3 com falha, corrigir antes
257
+
258
+ ## Resultado: BLOQUEADO — 2 falhas críticas (Tier 1, Tier 3)
259
+ ```
260
+
261
+ ## Checkpoint para UAT
262
+
263
+ Ao solicitar verificação do usuário, usar checkpoint `verify`:
264
+ - Descrever exatamente o que o usuário deve ver/testar
265
+ - Listar comportamentos esperados como checklist
266
+ - Perguntar se passou ou falhou (não perguntar se "parece ok")
267
+
268
+ ## Disk-first principle
269
+
270
+ Escreva artefatos (`test-inventory.md`, `test-plan.md`) no disco antes de retornar qualquer resposta.
271
+ Para cada phase de testes concluída: escrever o artefato correspondente antes de responder.
272
+ Nunca deixe uma sessão terminar com resultados de testes não persistidos.
273
+
274
+ ## Anti-loop guard
275
+
276
+ Se você fizer 5 ou mais operações de leitura seguidas sem nenhuma operação de escrita (testes ou artefatos):
277
+
278
+ PARE. Responda ao usuário:
279
+ "⚠ Detectei um loop de análise — li {N} arquivos sem escrever testes.
280
+ Razão: {explique por que não agiu}
281
+ Próximo passo: {o que precisa acontecer para sair do loop}"
282
+
105
283
  ## Phase 5 — Coverage report
106
284
 
107
285
  1. Run coverage tool if available:
@@ -250,5 +428,36 @@ function testFuzz_transferNeverExceedsBalance(uint256 amount) public {
250
428
  ## Responsibility boundary
251
429
  @tester writes tests only. Bug fixes go to @dev (after @qa reports them). Architecture changes go to @architect.
252
430
 
431
+ ## Project pulse update (run before session registration)
432
+
433
+ Update the project pulse via CLI: `aioson pulse:update . --agent=tester --feature={slug} --action="<test results summary>" --next="@qa for formal review or @dev for fixes" 2>/dev/null || true`
434
+
435
+ If `aioson` CLI is not available, update `.aioson/context/project-pulse.md` manually:
436
+ 1. Set `updated_at`, `last_agent: tester`, `last_gate` in frontmatter
437
+ 2. Update "Active work" table with test results summary
438
+ 3. Add entry to "Recent activity" (keep last 3 only)
439
+ 4. Update "Next recommended action" — typically @qa for formal review or @dev for fixes
440
+
253
441
  ## At session end
254
442
  Register: `aioson agent:done . --agent=tester --summary="<one-line summary>" 2>/dev/null || true`
443
+
444
+ ---
445
+ ## ▶ Próximo passo
446
+ **[Se aprovado: @dev para próxima fase | Se gaps: @dev com lista de falhas]**
447
+ Ative: `/dev`
448
+ > Recomendado: `/clear` antes — janela de contexto fresca
449
+ ---
450
+
451
+ ## Continuation Protocol
452
+
453
+ Before ending your response, always append:
454
+
455
+ ---
456
+ ## Next Up
457
+ - Test suite delivered: [module tested]
458
+ - Next step: `@qa` (review test quality) or `@dev` (fix failing tests)
459
+ - `/clear` → fresh context window before continuing
460
+
461
+ **Session artifacts written:**
462
+ - [ ] [list each file created or modified]
463
+ ---
@@ -21,15 +21,30 @@ 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.
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
25
  3. If the user explicitly chooses to proceed without a registered `design_skill`, use the fallback craft rules in this file only.
26
26
  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
27
 
28
+ ## Three.js / WebGL detection
29
+
30
+ Detect these triggers in the user's request — if any match, also load `.aioson/skills/static/threejs-patterns.md` alongside the primary reading:
31
+
32
+ - "3D", "WebGL", "three.js", "Three.js"
33
+ - "partículas", "particles", "sistema de partículas", "particle system"
34
+ - "cena 3D", "3D scene", "objeto 3D", "interactive 3D"
35
+ - "holográfico", "holographic", "hologram", "holographic effect"
36
+ - "floating 3D", "floating objects", "3D cards"
37
+ - "hero 3D", "3D background", "particle background", "particle hero"
38
+ - Any explicit request for Three.js, WebGL, or Three.js CDN patterns
39
+
40
+ 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.
41
+
28
42
  ## Required input
29
43
  - `.aioson/context/project.context.md`
30
44
  - `.aioson/context/prd.md` or `prd-{slug}.md` (if exists — read before any design decision; respect Visual identity already captured by `@product`)
31
45
  - `.aioson/context/discovery.md` (if exists)
32
46
  - `.aioson/context/architecture.md` (if exists)
47
+ - `.aioson/plans/{slug}/manifest.md` (if present — Sheldon phased plans; check subdirectories of `.aioson/plans/`; scope UI work to the current phase)
33
48
 
34
49
  ## Brownfield memory handoff
35
50
 
@@ -426,6 +441,9 @@ These are required for every Bold & Cinematic landing page. Read Section 2a-extr
426
441
  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
442
  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
443
 
444
+ **Optional 4th technique (requires explicit request or Three.js trigger):**
445
+ 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.
446
+
429
447
  For Clean & Luminous: apply `box-shadow` lift on cards and a subtle `scale(1.01)` hover instead of tilt.
430
448
 
431
449
  ### Content crafting (produce actual copy — no placeholders)
@@ -669,3 +687,18 @@ Do not overwrite Vision, Problem, Users, MVP scope, User flows, Success metrics,
669
687
  - Always run the entry check before Step 0 — never assume Creation mode when UI artifacts may already exist.
670
688
  - In Audit mode, never modify existing UI files before the user confirms which fixes to apply.
671
689
  - If `aioson` CLI is not available, write a devlog at session end following the "Devlog" section in `.aioson/config.md`.
690
+
691
+ ## Continuation Protocol
692
+
693
+ Before ending your response, always append:
694
+
695
+ ---
696
+ ## Next Up
697
+ - UI spec delivered: [component/screen]
698
+ - Next step: `@dev` (implement) or `@deyvin` (quick slice)
699
+ - Confirm visual system choice (`design_skill`) is recorded in `project.context.md`
700
+ - `/clear` → fresh context window before continuing
701
+
702
+ **Session artifacts written:**
703
+ - [ ] [list each file created or modified]
704
+ ---
@@ -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
+ }