@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
@@ -10,6 +10,8 @@ module.exports = {
10
10
  'aioson init <project-name> [--force] [--dry-run] [--lang=en|pt-BR|es|fr] [--tool=codex|claude|gemini|opencode] [--locale=fr]',
11
11
  help_install:
12
12
  'aioson install [path] [--force] [--dry-run] [--lang=en|pt-BR|es|fr] [--tool=codex|claude|gemini|opencode] [--locale=fr]',
13
+ help_setup:
14
+ 'aioson setup [path] [--defaults] [--framework=<nom>] [--lang=en|pt-BR|es|fr] [--project-name=<nom>] [--force] [--dry-run] [--tool=codex|claude|gemini|opencode] [--locale=fr]',
13
15
  help_update:
14
16
  'aioson update [path] [--dry-run] [--lang=en|pt-BR|es|fr] [--locale=fr]',
15
17
  help_info: 'aioson info [path] [--json] [--locale=fr]',
@@ -103,7 +105,7 @@ module.exports = {
103
105
  },
104
106
  init: {
105
107
  usage_error:
106
- 'Utilisation : aioson init <project-name> [--force] [--dry-run] [--lang=en|pt-BR|es|fr] [--tool=codex|claude|gemini|opencode] [--locale=fr]',
108
+ 'Utilisation : aioson init <project-name> [--force] [--dry-run] [--all] [--lang=en|pt-BR|es|fr] [--tool=codex|claude|gemini|opencode] [--locale=fr]',
107
109
  non_empty_dir: 'Le repertoire n est pas vide : {targetDir}. Utilisez --force pour continuer.',
108
110
  created_at: 'Projet cree dans : {targetDir}',
109
111
  files_copied: 'Fichiers copies : {count}',
@@ -115,6 +117,9 @@ module.exports = {
115
117
  step_agent_prompt:
116
118
  '4. Generez le prompt setup pour votre outil : aioson agent:prompt setup --tool={tool}'
117
119
  },
120
+ init_all: {
121
+ installing_full: 'Installation complete (tous les outils + squads) — wizard ignore via --all'
122
+ },
118
123
  install: {
119
124
  framework_detected: 'Framework detecte : {framework} ({evidence})',
120
125
  framework_not_detected: 'Aucun framework detecte. Installation en mode generique.',
@@ -131,11 +136,18 @@ module.exports = {
131
136
  existing_project_scan_hint:
132
137
  ' aioson scan:project . --folder=src --with-llm --provider=<provider> (genere discovery.md + skeleton-system.md ; sans --with-llm, seulement les cartes locales)'
133
138
  },
139
+ install_wizard: {
140
+ ready_to_install: 'Pret a installer :',
141
+ press_enter_to_install: 'Appuyez sur entree pour installer ou q pour annuler.',
142
+ deselected_warning: '⚠ Les elements deselectionnes ne seront PAS supprimes automatiquement.',
143
+ deselected_hint: ' Supprimez-les manuellement si necessaire.'
144
+ },
134
145
  update: {
135
146
  not_installed: 'Aucune installation AIOSON trouvee dans {targetDir}.',
136
147
  done_at: 'Mise a jour terminee dans : {targetDir}',
137
148
  files_updated: 'Fichiers mis a jour : {count}',
138
- backups_created: 'Sauvegardes creees : {count}'
149
+ backups_created: 'Sauvegardes creees : {count}',
150
+ reconfigure_hint: 'De nouvelles options peuvent etre disponibles. Lancez : aioson install --reconfigure'
139
151
  },
140
152
  info: {
141
153
  cli_version: 'AIOSON CLI : v{version}',
@@ -264,6 +276,22 @@ module.exports = {
264
276
  selected_line: ' {index}. {path} — {reason}',
265
277
  hint_use: 'Utilisez {path} comme contexte minimal de depart dans votre session IA.'
266
278
  },
279
+ setup: {
280
+ installing: 'Installation du template AIOSON...',
281
+ installed: 'Template installe ({count} fichiers).',
282
+ no_framework_detected: 'Aucun framework detecte dans ce repertoire (projet vierge).',
283
+ framework_detected: 'Framework detecte : {framework} (installe={installed})',
284
+ writing_context: 'Ecriture du contexte du projet...',
285
+ done: 'Setup termine.',
286
+ step_agents: ' Etape suivante : ouvrez votre client IA et activez @setup pour confirmer ou ajuster le contexte.',
287
+ step_agent_prompt: ' Ou executez : aioson agent:prompt setup . --tool={tool}',
288
+ q_project_name: 'Nom du projet',
289
+ q_framework: 'Framework / stack principal (ex : Python, Node, Laravel, Django)',
290
+ q_lang: 'Langue pour les reponses des agents (ex : en, pt-BR, es, fr)',
291
+ q_confirm_framework: 'Utiliser le framework detecte ? (true/false)',
292
+ q_override_framework: 'Framework',
293
+ q_framework_installed: 'Framework installe ? (true/false)'
294
+ },
267
295
  setup_context: {
268
296
  detected: 'Framework detecte : {framework} (installed={installed})',
269
297
  q_project_name: 'Nom du projet',
@@ -10,6 +10,8 @@ module.exports = {
10
10
  'aioson init <project-name> [--force] [--dry-run] [--lang=en|pt-BR|es|fr] [--tool=codex|claude|gemini|opencode] [--locale=pt-BR]',
11
11
  help_install:
12
12
  'aioson install [path] [--force] [--dry-run] [--lang=en|pt-BR|es|fr] [--tool=codex|claude|gemini|opencode] [--locale=pt-BR]',
13
+ help_setup:
14
+ 'aioson setup [path] [--defaults] [--framework=<nome>] [--lang=en|pt-BR|es|fr] [--project-name=<nome>] [--force] [--dry-run] [--tool=codex|claude|gemini|opencode] [--locale=pt-BR]',
13
15
  help_update:
14
16
  'aioson update [path] [--dry-run] [--lang=en|pt-BR|es|fr] [--locale=pt-BR]',
15
17
  help_info: 'aioson info [path] [--json] [--locale=pt-BR]',
@@ -155,6 +157,8 @@ module.exports = {
155
157
  'aioson skill:list [caminho] [--json] [--locale=pt-BR]',
156
158
  help_skill_remove:
157
159
  'aioson skill:remove [caminho] --slug=<nome> [--json] [--locale=pt-BR]',
160
+ help_design_hybrid_options:
161
+ 'aioson design-hybrid:options [caminho] [--advanced] [--json] [--locale=pt-BR]',
158
162
  help_cloud_import_squad:
159
163
  'aioson cloud:import:squad [path] --url=<snapshot-url> [--force] [--snapshots-only] [--dry-run] [--json] [--locale=pt-BR]',
160
164
  help_cloud_import_genome:
@@ -184,7 +188,7 @@ module.exports = {
184
188
  },
185
189
  init: {
186
190
  usage_error:
187
- 'Uso: aioson init <project-name> [--force] [--dry-run] [--lang=en|pt-BR|es|fr] [--tool=codex|claude|gemini|opencode] [--locale=pt-BR]',
191
+ 'Uso: aioson init <project-name> [--force] [--dry-run] [--all] [--lang=en|pt-BR|es|fr] [--tool=codex|claude|gemini|opencode] [--locale=pt-BR]',
188
192
  non_empty_dir: 'Diretorio nao esta vazio: {targetDir}. Use --force para continuar.',
189
193
  created_at: 'Projeto criado em: {targetDir}',
190
194
  files_copied: 'Arquivos copiados: {count}',
@@ -196,6 +200,9 @@ module.exports = {
196
200
  step_agent_prompt:
197
201
  '4. Gere o prompt de setup para sua ferramenta: aioson agent:prompt setup --tool={tool}'
198
202
  },
203
+ init_all: {
204
+ installing_full: 'Instalacao completa (todas as ferramentas + squads) — wizard ignorado via --all'
205
+ },
199
206
  install: {
200
207
  framework_detected: 'Framework detectado: {framework} ({evidence})',
201
208
  framework_not_detected: 'Nenhum framework detectado. Instalando em modo generico.',
@@ -212,11 +219,18 @@ module.exports = {
212
219
  existing_project_scan_hint:
213
220
  ' aioson scan:project . --folder=src --with-llm --provider=<provider> (gera discovery.md + skeleton-system.md; sem --with-llm gera apenas os mapas locais)'
214
221
  },
222
+ install_wizard: {
223
+ ready_to_install: 'Pronto para instalar:',
224
+ press_enter_to_install: 'Pressione enter para instalar ou q para cancelar.',
225
+ deselected_warning: '⚠ Itens desmarcados NAO serao removidos automaticamente.',
226
+ deselected_hint: ' Remova manualmente se necessario.'
227
+ },
215
228
  update: {
216
229
  not_installed: 'Nenhuma instalacao do AIOSON encontrada em {targetDir}.',
217
230
  done_at: 'Atualizacao concluida em: {targetDir}',
218
231
  files_updated: 'Arquivos atualizados: {count}',
219
- backups_created: 'Backups criados: {count}'
232
+ backups_created: 'Backups criados: {count}',
233
+ reconfigure_hint: 'Novas opcoes podem estar disponiveis. Execute: aioson install --reconfigure'
220
234
  },
221
235
  info: {
222
236
  cli_version: 'AIOSON CLI: v{version}',
@@ -346,6 +360,22 @@ module.exports = {
346
360
  selected_line: ' {index}. {path} — {reason}',
347
361
  hint_use: 'Use {path} como contexto minimo inicial na sua sessao de IA.'
348
362
  },
363
+ setup: {
364
+ installing: 'Instalando template AIOSON...',
365
+ installed: 'Template instalado ({count} arquivos).',
366
+ no_framework_detected: 'Nenhum framework detectado neste diretorio (projeto novo).',
367
+ framework_detected: 'Framework detectado: {framework} (instalado={installed})',
368
+ writing_context: 'Escrevendo contexto do projeto...',
369
+ done: 'Setup concluido.',
370
+ step_agents: ' Proximo: abra seu cliente de IA e ative @setup para confirmar ou ajustar o contexto.',
371
+ step_agent_prompt: ' Ou execute: aioson agent:prompt setup . --tool={tool}',
372
+ q_project_name: 'Nome do projeto',
373
+ q_framework: 'Framework / stack principal (ex: Python, Node, Laravel, Django)',
374
+ q_lang: 'Idioma para respostas dos agentes (ex: en, pt-BR, es, fr)',
375
+ q_confirm_framework: 'Usar framework detectado? (true/false)',
376
+ q_override_framework: 'Framework',
377
+ q_framework_installed: 'Framework instalado? (true/false)'
378
+ },
349
379
  setup_context: {
350
380
  detected: 'Framework detectado: {framework} (installed={installed})',
351
381
  q_project_name: 'Nome do projeto',
@@ -0,0 +1,260 @@
1
+ 'use strict';
2
+
3
+ const AIOSON_LETTERS = [
4
+ // A
5
+ [' █████╗ ', ' ██╔══██╗', ' ███████║', ' ██╔══██║', ' ██║ ██║', ' ╚═╝ ╚═╝'],
6
+ // I
7
+ ['██╗', '██║', '██║', '██║', '██║', '╚═╝'],
8
+ // O
9
+ [' ██████╗ ', '██╔═══██╗', '██║ ██║', '██║ ██║', '╚██████╔╝', ' ╚═════╝ '],
10
+ // S
11
+ ['███████╗', '██╔════╝', '███████╗', '╚════██║', '███████║', '╚══════╝'],
12
+ // O
13
+ [' ██████╗ ', '██╔═══██╗', '██║ ██║', '██║ ██║', '╚██████╔╝', ' ╚═════╝ '],
14
+ // N
15
+ ['███╗ ██╗', '████╗ ██║', '██╔██╗ ██║', '██║╚██╗██║', '██║ ╚████║', '╚═╝ ╚═══╝']
16
+ ];
17
+
18
+ const LETTER_DELAY_MS = 130;
19
+ const TAGLINE_CHAR_DELAY_MS = 25;
20
+ const PULSE_DELAY_MS = 150;
21
+ const HEIGHT = 6;
22
+
23
+ function sleep(ms) {
24
+ return new Promise(resolve => setTimeout(resolve, ms));
25
+ }
26
+
27
+ function renderProgress({ copied, total, file }, stdout = process.stdout) {
28
+ if (!stdout.isTTY) return;
29
+ const pct = Math.round((copied / total) * 20);
30
+ const bar = '█'.repeat(pct) + '░'.repeat(20 - pct);
31
+ const shortFile = file.length > 35 ? '...' + file.slice(-32) : file;
32
+ const line = ` \x1b[36m●\x1b[0m Installing \x1b[90m[${bar}]\x1b[0m ${copied}/${total} \x1b[90m${shortFile}\x1b[0m`;
33
+ stdout.write(`\r\x1b[K${line}`);
34
+ }
35
+
36
+ async function renderRevealAnimation(version, stdout = process.stdout) {
37
+ if (!stdout.isTTY) return;
38
+
39
+ const noColor = process.env.NO_COLOR !== undefined;
40
+ const dumb = process.env.TERM === 'dumb';
41
+ const cols = stdout.columns || 80;
42
+
43
+ if (dumb || cols < 50) return;
44
+
45
+ const cyan = noColor ? '' : '\x1b[1;36m';
46
+ const dim = noColor ? '' : '\x1b[90m';
47
+ const reset = noColor ? '' : '\x1b[0m';
48
+ const bold = noColor ? '' : '\x1b[1m';
49
+
50
+ // Clear progress line
51
+ stdout.write('\r\x1b[K\n');
52
+
53
+ // Phase 1: Reveal letter by letter
54
+ for (let letterIdx = 0; letterIdx <= AIOSON_LETTERS.length; letterIdx++) {
55
+ if (letterIdx > 0) stdout.write(`\x1b[${HEIGHT}A`);
56
+
57
+ for (let row = 0; row < HEIGHT; row++) {
58
+ stdout.write('\x1b[K ');
59
+ for (let l = 0; l < letterIdx; l++) {
60
+ stdout.write(`${cyan}${AIOSON_LETTERS[l][row]}${reset} `);
61
+ }
62
+ stdout.write('\n');
63
+ }
64
+
65
+ if (letterIdx < AIOSON_LETTERS.length) {
66
+ await sleep(LETTER_DELAY_MS);
67
+ }
68
+ }
69
+
70
+ // Phase 2: Tagline slide-in
71
+ const tagline = `AI Operating Framework v${version}`;
72
+ stdout.write('\n ');
73
+ for (const ch of tagline) {
74
+ stdout.write(`${dim}${ch}${reset}`);
75
+ await sleep(TAGLINE_CHAR_DELAY_MS);
76
+ }
77
+ stdout.write('\n');
78
+
79
+ // Phase 3: Breathing pulse (1 cycle)
80
+ await sleep(PULSE_DELAY_MS);
81
+ stdout.write(`\x1b[${HEIGHT + 2}A`);
82
+ for (let row = 0; row < HEIGHT; row++) {
83
+ stdout.write('\x1b[K ');
84
+ for (const letter of AIOSON_LETTERS) {
85
+ stdout.write(`${bold}${cyan}${letter[row]}${reset} `);
86
+ }
87
+ stdout.write('\n');
88
+ }
89
+ stdout.write('\n'); // skip tagline line
90
+ stdout.write('\n'); // space before summary
91
+
92
+ await sleep(PULSE_DELAY_MS);
93
+ }
94
+
95
+ function renderInstallSummary({ result, installProfile, stdout = process.stdout }) {
96
+ const isTTY = Boolean(stdout.isTTY);
97
+ const noColor = process.env.NO_COLOR !== undefined;
98
+
99
+ const green = (isTTY && !noColor) ? '\x1b[32m' : '';
100
+ const dim = (isTTY && !noColor) ? '\x1b[90m' : '';
101
+ const cyan = (isTTY && !noColor) ? '\x1b[36m' : '';
102
+ const yellow = (isTTY && !noColor) ? '\x1b[33m' : '';
103
+ const reset = (isTTY && !noColor) ? '\x1b[0m' : '';
104
+
105
+ const TOOL_NAMES = {
106
+ claude: 'Claude Code',
107
+ codex: 'Codex',
108
+ gemini: 'Gemini CLI',
109
+ opencode: 'OpenCode'
110
+ };
111
+
112
+ const DESIGN_NAMES = {
113
+ 'none': 'None',
114
+ 'all': 'All design skills',
115
+ 'clean-saas-ui': 'Clean SaaS UI',
116
+ 'aurora-command-ui': 'Aurora Command UI',
117
+ 'cognitive-core-ui': 'Cognitive Core UI',
118
+ 'bold-editorial-ui': 'Bold Editorial UI',
119
+ 'warm-craft-ui': 'Warm Craft UI',
120
+ 'glassmorphism-ui': 'Glassmorphism UI',
121
+ 'neo-brutalist-ui': 'Neo-Brutalist UI',
122
+ 'premium-command-center-ui': 'Premium Command Center UI',
123
+ 'interface-design': 'Interface Design'
124
+ };
125
+
126
+ const LOCALE_NAMES = {
127
+ 'en': 'English',
128
+ 'pt-BR': 'Português (Brasil)',
129
+ 'es': 'Español',
130
+ 'fr': 'Français'
131
+ };
132
+
133
+ const toolNames = installProfile
134
+ ? installProfile.tools.map(t => TOOL_NAMES[t] || t).join(', ')
135
+ : 'All';
136
+
137
+ const modeLabel = !installProfile
138
+ ? 'All'
139
+ : installProfile.uses.includes('squads')
140
+ ? 'Development + Squads'
141
+ : 'Development';
142
+
143
+ const designValue = installProfile ? (installProfile.design || 'none') : null;
144
+ let designLabel = null;
145
+ if (designValue) {
146
+ if (designValue === 'all') {
147
+ designLabel = DESIGN_NAMES['all'];
148
+ } else if (Array.isArray(designValue)) {
149
+ designLabel = designValue.map(id => DESIGN_NAMES[id] || id).join(', ');
150
+ } else {
151
+ designLabel = DESIGN_NAMES[designValue] || designValue;
152
+ }
153
+ }
154
+
155
+ const localeLabel = installProfile
156
+ ? (LOCALE_NAMES[installProfile.locale || 'en'] || installProfile.locale || 'English')
157
+ : null;
158
+
159
+ const copiedCount = result.copied.length;
160
+ const profileSkipped = result.skipped.filter(s => s.reason === 'not-in-profile').length;
161
+ const existingSkipped = result.skipped.filter(s => s.reason === 'already-exists').length;
162
+ const otherSkipped = result.skipped.length - profileSkipped - existingSkipped;
163
+
164
+ if (!isTTY) {
165
+ stdout.write(`aioson: installed ${copiedCount} files`);
166
+ if (existingSkipped) stdout.write(`, ${existingSkipped} already exist`);
167
+ if (profileSkipped) stdout.write(`, ${profileSkipped} not in profile`);
168
+ stdout.write('\n');
169
+ const toolsStr = installProfile ? installProfile.tools.join(',') : 'all';
170
+ const modeStr = installProfile ? installProfile.uses.join(',') : 'all';
171
+ const designVal = installProfile ? (installProfile.design || 'none') : 'all';
172
+ const designStr = Array.isArray(designVal) ? designVal.join(',') : designVal;
173
+ const localeStr = installProfile ? (installProfile.locale || 'en') : 'all';
174
+ stdout.write(`aioson: tools=${toolsStr} mode=${modeStr} design=${designStr} locale=${localeStr}\n`);
175
+ stdout.write('aioson: run /setup to continue\n');
176
+ return;
177
+ }
178
+
179
+ // Strip ANSI codes to measure visible length
180
+ function visLen(s) {
181
+ return s.replace(/\x1b\[[0-9;]*m/g, '').length;
182
+ }
183
+
184
+ function truncate(s, maxLen) {
185
+ if (!s) return s;
186
+ const v = visLen(s);
187
+ if (v <= maxLen) return s;
188
+ // Strip the trailing reset code, truncate, then re-add reset
189
+ const ANSI_RESET = '\x1b[0m';
190
+ const hasReset = s.endsWith(ANSI_RESET);
191
+ const plain = hasReset ? s.slice(0, -ANSI_RESET.length) : s;
192
+ const visiblePlain = visLen(plain);
193
+ if (visiblePlain <= maxLen) return plain + (hasReset ? ANSI_RESET : '');
194
+ // Count visible chars while slicing
195
+ let kept = 0;
196
+ let cutPoint = 0;
197
+ for (; cutPoint < plain.length && kept < maxLen; cutPoint++) {
198
+ if (plain[cutPoint] === '\x1b') {
199
+ // Skip ANSI sequence
200
+ const end = plain.indexOf('m', cutPoint);
201
+ cutPoint = end >= 0 ? end : plain.length - 1;
202
+ } else {
203
+ kept++;
204
+ }
205
+ }
206
+ return plain.slice(0, cutPoint) + '…' + (hasReset ? ANSI_RESET : '');
207
+ }
208
+
209
+ // Internal width (between │ borders), including 1 space padding each side
210
+ const W = 41;
211
+
212
+ function row(content) {
213
+ const padding = ' '.repeat(Math.max(0, W - visLen(content)));
214
+ return ` │ ${content}${padding} │`;
215
+ }
216
+
217
+ // Build skip detail lines
218
+ const skipLines = [];
219
+ if (existingSkipped > 0) {
220
+ skipLines.push(row(`${dim}─ ${existingSkipped} files already up to date${reset}`));
221
+ }
222
+ if (profileSkipped > 0) {
223
+ skipLines.push(row(`${dim}─ ${profileSkipped} files skipped (not in profile)${reset}`));
224
+ }
225
+ if (otherSkipped > 0) {
226
+ skipLines.push(row(`${dim}─ ${otherSkipped} files skipped (protected)${reset}`));
227
+ }
228
+
229
+ const profileLines = [
230
+ row(`${cyan}Tools${reset} → ${cyan}${truncate(toolNames, W - 16)}${reset}`),
231
+ row(`${cyan}Mode${reset} → ${cyan}${truncate(modeLabel, W - 16)}${reset}`)
232
+ ];
233
+ if (designLabel) profileLines.push(row(`${cyan}Design${reset} → ${cyan}${truncate(designLabel, W - 16)}${reset}`));
234
+ if (localeLabel) profileLines.push(row(`${cyan}Locale${reset} → ${cyan}${truncate(localeLabel, W - 16)}${reset}`));
235
+
236
+ const lines = [
237
+ ` ╭${'─'.repeat(W + 2)}╮`,
238
+ ` │${' '.repeat(W + 2)}│`,
239
+ row(`${green}✓${reset} ${copiedCount} files installed`),
240
+ ...skipLines,
241
+ ` │${' '.repeat(W + 2)}│`,
242
+ ...profileLines,
243
+ ` │${' '.repeat(W + 2)}│`,
244
+ row(`${yellow}Next: run /setup in your AI tool${reset}`),
245
+ ` │${' '.repeat(W + 2)}│`,
246
+ ` ╰${'─'.repeat(W + 2)}╯`,
247
+ ];
248
+
249
+ stdout.write(lines.join('\n') + '\n');
250
+ }
251
+
252
+ module.exports = {
253
+ renderProgress,
254
+ renderRevealAnimation,
255
+ renderInstallSummary,
256
+ __test__: {
257
+ AIOSON_LETTERS,
258
+ sleep
259
+ }
260
+ };
@@ -0,0 +1,143 @@
1
+ 'use strict';
2
+
3
+ // Arquivos que pertencem a cada tool
4
+ const TOOL_FILES = {
5
+ claude: [
6
+ 'CLAUDE.md',
7
+ /^\.claude\//
8
+ ],
9
+ codex: [
10
+ 'AGENTS.md'
11
+ ],
12
+ gemini: [
13
+ '.gemini/GEMINI.md',
14
+ /^\.gemini\/commands\//
15
+ ],
16
+ opencode: [
17
+ 'OPENCODE.md'
18
+ ]
19
+ };
20
+
21
+ // Squad agent/task/skill paths (non-locale)
22
+ const SQUAD_PATHS = [
23
+ /^\.aioson\/agents\/(squad|orache|genome|profiler-researcher|profiler-enricher|profiler-forge)\.md$/,
24
+ /^\.aioson\/tasks\/squad-/,
25
+ /^\.aioson\/skills\/squad\//,
26
+ /^\.aioson\/templates\/squads\//,
27
+ /^\.aioson\/squads\//
28
+ ];
29
+
30
+ // Squad agents inside locale dirs — filtered by BOTH locale AND squad
31
+ const SQUAD_LOCALE_AGENT_RE = /^\.aioson\/locales\/([^/]+)\/agents\/(squad|orache|genome|profiler-researcher|profiler-enricher|profiler-forge)\.md$/;
32
+
33
+ // Design skill IDs disponíveis
34
+ const DESIGN_IDS = [
35
+ 'aurora-command-ui',
36
+ 'bold-editorial-ui',
37
+ 'clean-saas-ui',
38
+ 'cognitive-core-ui',
39
+ 'glassmorphism-ui',
40
+ 'interface-design',
41
+ 'neo-brutalist-ui',
42
+ 'premium-command-center-ui',
43
+ 'warm-craft-ui'
44
+ ];
45
+
46
+ // Special value meaning "install all design skills"
47
+ const DESIGN_ALL = 'all';
48
+
49
+ // Caminhos de locale por código
50
+ const LOCALE_IDS = ['en', 'es', 'fr', 'pt-BR'];
51
+
52
+ // Arquivos sempre instalados (core invariante)
53
+ const ALWAYS_INSTALL = [
54
+ /^\.aioson\/config\.md$/,
55
+ /^\.aioson\/schemas\//,
56
+ /^\.aioson\/mcp\//,
57
+ /^\.aioson\/context\//,
58
+ /^\.aioson\/installed-skills\//,
59
+ /^\.aioson\/my-agents\//,
60
+ /^aioson-models\.json$/
61
+ ];
62
+
63
+ const DEFAULT_PROFILE = {
64
+ tools: ['claude'],
65
+ uses: ['development'],
66
+ design: 'none',
67
+ locale: 'en'
68
+ };
69
+
70
+ function matchesAny(rel, patterns) {
71
+ for (const p of patterns) {
72
+ if (typeof p === 'string') {
73
+ if (rel === p) return true;
74
+ } else if (p.test(rel)) {
75
+ return true;
76
+ }
77
+ }
78
+ return false;
79
+ }
80
+
81
+ function isFileForAnyTool(rel) {
82
+ for (const patterns of Object.values(TOOL_FILES)) {
83
+ if (matchesAny(rel, patterns)) return true;
84
+ }
85
+ return false;
86
+ }
87
+
88
+ /**
89
+ * Returns true if the file should be installed given the profile.
90
+ * null profile = install everything (current behavior / fallback).
91
+ */
92
+ function shouldIncludeForProfile(rel, profile) {
93
+ if (!profile) return true;
94
+
95
+ // Always install core
96
+ if (matchesAny(rel, ALWAYS_INSTALL)) return true;
97
+
98
+ // Tool-specific files
99
+ if (isFileForAnyTool(rel)) {
100
+ return (profile.tools || []).some(tool => matchesAny(rel, TOOL_FILES[tool] || []));
101
+ }
102
+
103
+ // Squad-specific files (non-locale)
104
+ if (matchesAny(rel, SQUAD_PATHS)) {
105
+ return (profile.uses || []).includes('squads');
106
+ }
107
+
108
+ // Design skills: .aioson/skills/design/<id>/
109
+ const designMatch = rel.match(/^\.aioson\/skills\/design\/([^/]+)\//);
110
+ if (designMatch) {
111
+ const skillId = designMatch[1];
112
+ const chosen = profile.design || 'none';
113
+ if (chosen === DESIGN_ALL) return true;
114
+ if (Array.isArray(chosen)) return chosen.includes(skillId);
115
+ return chosen !== 'none' && skillId === chosen;
116
+ }
117
+
118
+ // Locale files: .aioson/locales/<locale>/...
119
+ const localeMatch = rel.match(/^\.aioson\/locales\/([^/]+)\//);
120
+ if (localeMatch) {
121
+ const fileLocale = localeMatch[1];
122
+ const chosen = profile.locale || 'en';
123
+ if (fileLocale !== chosen) return false;
124
+ // Squad locale agents also require squads to be enabled
125
+ if (SQUAD_LOCALE_AGENT_RE.test(rel)) {
126
+ return (profile.uses || []).includes('squads');
127
+ }
128
+ return true;
129
+ }
130
+
131
+ // Everything else (core agents, dev skills, process, etc.) → always install
132
+ return true;
133
+ }
134
+
135
+ module.exports = {
136
+ shouldIncludeForProfile,
137
+ TOOL_FILES,
138
+ SQUAD_PATHS,
139
+ DESIGN_IDS,
140
+ LOCALE_IDS,
141
+ ALWAYS_INSTALL,
142
+ DEFAULT_PROFILE
143
+ };