synapos 2.5.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 (238) hide show
  1. package/.github/copilot-instructions.md +72 -0
  2. package/.synapos/.manifest.json +155 -0
  3. package/.synapos/GUIDE.md +660 -0
  4. package/.synapos/VERSION +1 -0
  5. package/.synapos/_memory/company.md +11 -0
  6. package/.synapos/_memory/preferences.md +15 -0
  7. package/.synapos/copilot.md +451 -0
  8. package/.synapos/core/best-practices/_catalog.yaml +56 -0
  9. package/.synapos/core/best-practices/content/blog-post.md +238 -0
  10. package/.synapos/core/best-practices/content/copywriting.md +164 -0
  11. package/.synapos/core/best-practices/content/linkedin-post.md +186 -0
  12. package/.synapos/core/best-practices/dev/api-design.md +274 -0
  13. package/.synapos/core/best-practices/dev/code-review.md +138 -0
  14. package/.synapos/core/best-practices/dev/git-workflow.md +256 -0
  15. package/.synapos/core/best-practices/dev/testing-strategy.md +213 -0
  16. package/.synapos/core/best-practices/product/product-spec.md +235 -0
  17. package/.synapos/core/best-practices/product/technical-writing.md +264 -0
  18. package/.synapos/core/best-practices/product/user-research.md +242 -0
  19. package/.synapos/core/commands/bump.md +59 -0
  20. package/.synapos/core/commands/debug/session.md +100 -0
  21. package/.synapos/core/commands/migrate/v1-to-v2.md +142 -0
  22. package/.synapos/core/commands/set-model.md +197 -0
  23. package/.synapos/core/commands/setup/build-business.md +378 -0
  24. package/.synapos/core/commands/setup/build-tech.md +374 -0
  25. package/.synapos/core/commands/setup/discover.md +543 -0
  26. package/.synapos/core/commands/setup/from-code.md +407 -0
  27. package/.synapos/core/commands/setup/start.md +201 -0
  28. package/.synapos/core/copilot-adapter.md +283 -0
  29. package/.synapos/core/gate-system.md +417 -0
  30. package/.synapos/core/model-adapter.md +245 -0
  31. package/.synapos/core/orchestrator.md +794 -0
  32. package/.synapos/core/pipeline-runner.md +784 -0
  33. package/.synapos/core/pipelines/pre-execution.yaml +107 -0
  34. package/.synapos/core/rules/product-agent.mdc +59 -0
  35. package/.synapos/core/skills-engine.md +207 -0
  36. package/.synapos/core/versioning.md +218 -0
  37. package/.synapos/skills/.gitkeep +0 -0
  38. package/.synapos/skills/brave-search/SKILL.md +130 -0
  39. package/.synapos/skills/fetch-url/SKILL.md +135 -0
  40. package/.synapos/skills/filesystem/SKILL.md +162 -0
  41. package/.synapos/skills/github/SKILL.md +148 -0
  42. package/.synapos/skills/playwright-browser/SKILL.md +124 -0
  43. package/.synapos/squad-templates/backend/agents/alexandre-api.agent.md +243 -0
  44. package/.synapos/squad-templates/backend/agents/bruno-base.agent.md +240 -0
  45. package/.synapos/squad-templates/backend/agents/daniela-dados.agent.md +267 -0
  46. package/.synapos/squad-templates/backend/agents/roberto-revisao-be.agent.md +219 -0
  47. package/.synapos/squad-templates/backend/agents/sergio-seguranca.agent.md +266 -0
  48. package/.synapos/squad-templates/backend/pipelines/api-development.yaml +83 -0
  49. package/.synapos/squad-templates/backend/pipelines/bug-fix.yaml +41 -0
  50. package/.synapos/squad-templates/backend/pipelines/database-migration.yaml +56 -0
  51. package/.synapos/squad-templates/backend/pipelines/quick-fix.yaml +40 -0
  52. package/.synapos/squad-templates/backend/pipelines/steps/01-gate-integridade.md +66 -0
  53. package/.synapos/squad-templates/backend/pipelines/steps/02-design-api.md +155 -0
  54. package/.synapos/squad-templates/backend/pipelines/steps/03-checkpoint-contrato.md +44 -0
  55. package/.synapos/squad-templates/backend/pipelines/steps/04-implementacao.md +113 -0
  56. package/.synapos/squad-templates/backend/pipelines/steps/05-seguranca.md +100 -0
  57. package/.synapos/squad-templates/backend/pipelines/steps/06-review.md +80 -0
  58. package/.synapos/squad-templates/backend/pipelines/steps/atualizar-tarefa.md +138 -0
  59. package/.synapos/squad-templates/backend/pipelines/steps/bfbe-02-diagnostico.md +47 -0
  60. package/.synapos/squad-templates/backend/pipelines/steps/bfbe-03-fix.md +41 -0
  61. package/.synapos/squad-templates/backend/pipelines/steps/bfbe-04-review.md +42 -0
  62. package/.synapos/squad-templates/backend/pipelines/steps/dm-02-schema.md +85 -0
  63. package/.synapos/squad-templates/backend/pipelines/steps/dm-03-checkpoint.md +30 -0
  64. package/.synapos/squad-templates/backend/pipelines/steps/dm-04-migration.md +58 -0
  65. package/.synapos/squad-templates/backend/pipelines/steps/dm-05-review.md +44 -0
  66. package/.synapos/squad-templates/backend/pipelines/steps/qf-02-contexto.md +34 -0
  67. package/.synapos/squad-templates/backend/pipelines/steps/qf-03-executar.md +49 -0
  68. package/.synapos/squad-templates/backend/pipelines/steps/qf-04-registrar.md +35 -0
  69. package/.synapos/squad-templates/backend/template.yaml +72 -0
  70. package/.synapos/squad-templates/devops/agents/claudio-containers.agent.md +245 -0
  71. package/.synapos/squad-templates/devops/agents/igor-infra.agent.md +198 -0
  72. package/.synapos/squad-templates/devops/agents/osvaldo-observabilidade.agent.md +262 -0
  73. package/.synapos/squad-templates/devops/agents/patricia-pipeline.agent.md +253 -0
  74. package/.synapos/squad-templates/devops/pipelines/ci-cd-setup.yaml +93 -0
  75. package/.synapos/squad-templates/devops/pipelines/infra-provision.yaml +56 -0
  76. package/.synapos/squad-templates/devops/pipelines/quick-fix.yaml +41 -0
  77. package/.synapos/squad-templates/devops/pipelines/steps/01-gate-integridade.md +62 -0
  78. package/.synapos/squad-templates/devops/pipelines/steps/02-infra-design.md +31 -0
  79. package/.synapos/squad-templates/devops/pipelines/steps/03-containers.md +28 -0
  80. package/.synapos/squad-templates/devops/pipelines/steps/04-checkpoint.md +20 -0
  81. package/.synapos/squad-templates/devops/pipelines/steps/05-pipeline-cicd.md +29 -0
  82. package/.synapos/squad-templates/devops/pipelines/steps/06-observabilidade.md +28 -0
  83. package/.synapos/squad-templates/devops/pipelines/steps/07-review.md +27 -0
  84. package/.synapos/squad-templates/devops/pipelines/steps/atualizar-tarefa.md +138 -0
  85. package/.synapos/squad-templates/devops/pipelines/steps/ip-02-design.md +21 -0
  86. package/.synapos/squad-templates/devops/pipelines/steps/ip-03-iac.md +20 -0
  87. package/.synapos/squad-templates/devops/pipelines/steps/ip-04-checkpoint.md +22 -0
  88. package/.synapos/squad-templates/devops/pipelines/steps/ip-05-apply.md +22 -0
  89. package/.synapos/squad-templates/devops/pipelines/steps/qf-02-contexto.md +34 -0
  90. package/.synapos/squad-templates/devops/pipelines/steps/qf-03-executar.md +52 -0
  91. package/.synapos/squad-templates/devops/pipelines/steps/qf-04-registrar.md +35 -0
  92. package/.synapos/squad-templates/devops/template.yaml +68 -0
  93. package/.synapos/squad-templates/engineer/agents/leo-engenheiro.agent.md +203 -0
  94. package/.synapos/squad-templates/engineer/pipeline/steps/01-gate.md +22 -0
  95. package/.synapos/squad-templates/engineer/pipeline/steps/02-preparacao.md +66 -0
  96. package/.synapos/squad-templates/engineer/pipeline/steps/03-investigacao.md +110 -0
  97. package/.synapos/squad-templates/engineer/pipeline/steps/04-checkpoint-contexto.md +24 -0
  98. package/.synapos/squad-templates/engineer/pipeline/steps/05-arquitetura.md +127 -0
  99. package/.synapos/squad-templates/engineer/pipeline/steps/06-checkpoint-arquitetura.md +27 -0
  100. package/.synapos/squad-templates/engineer/pipeline/steps/07-planejamento.md +109 -0
  101. package/.synapos/squad-templates/engineer/pipeline/steps/08-checkpoint-plano.md +27 -0
  102. package/.synapos/squad-templates/engineer/pipeline/steps/09-execucao.md +121 -0
  103. package/.synapos/squad-templates/engineer/pipeline/steps/atualizar-tarefa.md +27 -0
  104. package/.synapos/squad-templates/engineer/pipeline/steps/visual-spec.md +74 -0
  105. package/.synapos/squad-templates/engineer/pipelines/feature-development.yaml +107 -0
  106. package/.synapos/squad-templates/engineer/template.yaml +56 -0
  107. package/.synapos/squad-templates/frontend/agents/ana-arquitetura-fe.agent.md +245 -0
  108. package/.synapos/squad-templates/frontend/agents/paulo-performance.agent.md +234 -0
  109. package/.synapos/squad-templates/frontend/agents/renata-revisao-fe.agent.md +219 -0
  110. package/.synapos/squad-templates/frontend/agents/rodrigo-react.agent.md +261 -0
  111. package/.synapos/squad-templates/frontend/agents/tiago-testes-fe.agent.md +229 -0
  112. package/.synapos/squad-templates/frontend/agents/ursula-ui.agent.md +283 -0
  113. package/.synapos/squad-templates/frontend/pipelines/bug-fix.yaml +40 -0
  114. package/.synapos/squad-templates/frontend/pipelines/component-development.yaml +48 -0
  115. package/.synapos/squad-templates/frontend/pipelines/feature-development.yaml +76 -0
  116. package/.synapos/squad-templates/frontend/pipelines/quick-fix.yaml +40 -0
  117. package/.synapos/squad-templates/frontend/pipelines/steps/01-gate-integridade.md +66 -0
  118. package/.synapos/squad-templates/frontend/pipelines/steps/02-arquitetura.md +100 -0
  119. package/.synapos/squad-templates/frontend/pipelines/steps/03-checkpoint-design.md +43 -0
  120. package/.synapos/squad-templates/frontend/pipelines/steps/04-implementacao.md +114 -0
  121. package/.synapos/squad-templates/frontend/pipelines/steps/05-review.md +104 -0
  122. package/.synapos/squad-templates/frontend/pipelines/steps/06-docs.md +51 -0
  123. package/.synapos/squad-templates/frontend/pipelines/steps/atualizar-tarefa.md +138 -0
  124. package/.synapos/squad-templates/frontend/pipelines/steps/bf-02-diagnostico.md +52 -0
  125. package/.synapos/squad-templates/frontend/pipelines/steps/bf-03-fix.md +58 -0
  126. package/.synapos/squad-templates/frontend/pipelines/steps/bf-04-review.md +43 -0
  127. package/.synapos/squad-templates/frontend/pipelines/steps/cd-02-spec.md +96 -0
  128. package/.synapos/squad-templates/frontend/pipelines/steps/qf-02-contexto.md +34 -0
  129. package/.synapos/squad-templates/frontend/pipelines/steps/qf-03-executar.md +45 -0
  130. package/.synapos/squad-templates/frontend/pipelines/steps/qf-04-registrar.md +35 -0
  131. package/.synapos/squad-templates/frontend/template.yaml +77 -0
  132. package/.synapos/squad-templates/fullstack/agents/carlos-coordenador.agent.md +266 -0
  133. package/.synapos/squad-templates/fullstack/pipelines/bug-fix.yaml +46 -0
  134. package/.synapos/squad-templates/fullstack/pipelines/integration-feature.yaml +92 -0
  135. package/.synapos/squad-templates/fullstack/pipelines/quick-fix.yaml +40 -0
  136. package/.synapos/squad-templates/fullstack/pipelines/steps/01-gate-integridade.md +66 -0
  137. package/.synapos/squad-templates/fullstack/pipelines/steps/02-contrato-api.md +63 -0
  138. package/.synapos/squad-templates/fullstack/pipelines/steps/03-checkpoint-contrato.md +25 -0
  139. package/.synapos/squad-templates/fullstack/pipelines/steps/04-frontend.md +35 -0
  140. package/.synapos/squad-templates/fullstack/pipelines/steps/05-backend.md +36 -0
  141. package/.synapos/squad-templates/fullstack/pipelines/steps/06-integracao.md +47 -0
  142. package/.synapos/squad-templates/fullstack/pipelines/steps/07-review.md +49 -0
  143. package/.synapos/squad-templates/fullstack/pipelines/steps/atualizar-tarefa.md +138 -0
  144. package/.synapos/squad-templates/fullstack/pipelines/steps/bf-02-diagnostico.md +34 -0
  145. package/.synapos/squad-templates/fullstack/pipelines/steps/bf-03-fix.md +22 -0
  146. package/.synapos/squad-templates/fullstack/pipelines/steps/bf-04-review.md +22 -0
  147. package/.synapos/squad-templates/fullstack/pipelines/steps/qf-02-contexto.md +34 -0
  148. package/.synapos/squad-templates/fullstack/pipelines/steps/qf-03-executar.md +49 -0
  149. package/.synapos/squad-templates/fullstack/pipelines/steps/qf-04-registrar.md +35 -0
  150. package/.synapos/squad-templates/fullstack/template.yaml +93 -0
  151. package/.synapos/squad-templates/ia-dados/agents/diana-dados.agent.md +269 -0
  152. package/.synapos/squad-templates/ia-dados/agents/larissa-llm.agent.md +255 -0
  153. package/.synapos/squad-templates/ia-dados/agents/marco-ml.agent.md +227 -0
  154. package/.synapos/squad-templates/ia-dados/agents/nelson-notebook.agent.md +252 -0
  155. package/.synapos/squad-templates/ia-dados/pipelines/data-pipeline.yaml +71 -0
  156. package/.synapos/squad-templates/ia-dados/pipelines/ml-feature.yaml +91 -0
  157. package/.synapos/squad-templates/ia-dados/pipelines/quick-fix.yaml +40 -0
  158. package/.synapos/squad-templates/ia-dados/pipelines/steps/01-gate-integridade.md +62 -0
  159. package/.synapos/squad-templates/ia-dados/pipelines/steps/02-exploracao.md +36 -0
  160. package/.synapos/squad-templates/ia-dados/pipelines/steps/03-design.md +25 -0
  161. package/.synapos/squad-templates/ia-dados/pipelines/steps/04-checkpoint.md +23 -0
  162. package/.synapos/squad-templates/ia-dados/pipelines/steps/05-implementacao.md +26 -0
  163. package/.synapos/squad-templates/ia-dados/pipelines/steps/06-avaliacao.md +29 -0
  164. package/.synapos/squad-templates/ia-dados/pipelines/steps/07-deploy.md +30 -0
  165. package/.synapos/squad-templates/ia-dados/pipelines/steps/atualizar-tarefa.md +138 -0
  166. package/.synapos/squad-templates/ia-dados/pipelines/steps/dp-02-design.md +21 -0
  167. package/.synapos/squad-templates/ia-dados/pipelines/steps/dp-03-checkpoint.md +14 -0
  168. package/.synapos/squad-templates/ia-dados/pipelines/steps/dp-04-implementacao.md +19 -0
  169. package/.synapos/squad-templates/ia-dados/pipelines/steps/dp-05-qualidade.md +21 -0
  170. package/.synapos/squad-templates/ia-dados/pipelines/steps/dp-06-deploy.md +22 -0
  171. package/.synapos/squad-templates/ia-dados/pipelines/steps/qf-02-contexto.md +34 -0
  172. package/.synapos/squad-templates/ia-dados/pipelines/steps/qf-03-executar.md +53 -0
  173. package/.synapos/squad-templates/ia-dados/pipelines/steps/qf-04-registrar.md +35 -0
  174. package/.synapos/squad-templates/ia-dados/template.yaml +68 -0
  175. package/.synapos/squad-templates/mobile/agents/felipe-feature.agent.md +234 -0
  176. package/.synapos/squad-templates/mobile/agents/marina-mobile.agent.md +219 -0
  177. package/.synapos/squad-templates/mobile/agents/viviane-visual.agent.md +218 -0
  178. package/.synapos/squad-templates/mobile/pipelines/bug-fix.yaml +47 -0
  179. package/.synapos/squad-templates/mobile/pipelines/feature-development.yaml +77 -0
  180. package/.synapos/squad-templates/mobile/pipelines/quick-fix.yaml +40 -0
  181. package/.synapos/squad-templates/mobile/pipelines/steps/01-gate-integridade.md +62 -0
  182. package/.synapos/squad-templates/mobile/pipelines/steps/02-arquitetura.md +35 -0
  183. package/.synapos/squad-templates/mobile/pipelines/steps/03-design-ux.md +29 -0
  184. package/.synapos/squad-templates/mobile/pipelines/steps/04-checkpoint.md +20 -0
  185. package/.synapos/squad-templates/mobile/pipelines/steps/05-implementacao.md +26 -0
  186. package/.synapos/squad-templates/mobile/pipelines/steps/06-review.md +27 -0
  187. package/.synapos/squad-templates/mobile/pipelines/steps/atualizar-tarefa.md +138 -0
  188. package/.synapos/squad-templates/mobile/pipelines/steps/bf-02-diagnostico.md +22 -0
  189. package/.synapos/squad-templates/mobile/pipelines/steps/bf-03-fix.md +23 -0
  190. package/.synapos/squad-templates/mobile/pipelines/steps/bf-04-review.md +20 -0
  191. package/.synapos/squad-templates/mobile/pipelines/steps/qf-02-contexto.md +34 -0
  192. package/.synapos/squad-templates/mobile/pipelines/steps/qf-03-executar.md +49 -0
  193. package/.synapos/squad-templates/mobile/pipelines/steps/qf-04-registrar.md +35 -0
  194. package/.synapos/squad-templates/mobile/template.yaml +73 -0
  195. package/.synapos/squad-templates/produto/agents/ana-analise.agent.md +243 -0
  196. package/.synapos/squad-templates/produto/agents/eduardo-estrategia.agent.md +258 -0
  197. package/.synapos/squad-templates/produto/agents/paulo-pesquisa.agent.md +226 -0
  198. package/.synapos/squad-templates/produto/agents/priscila-produto.agent.md +235 -0
  199. package/.synapos/squad-templates/produto/agents/tania-tecnica.agent.md +239 -0
  200. package/.synapos/squad-templates/produto/agents/ursula-ux.agent.md +231 -0
  201. package/.synapos/squad-templates/produto/pipelines/discovery-spec-handoff.yaml +152 -0
  202. package/.synapos/squad-templates/produto/pipelines/nova-feature.yaml +77 -0
  203. package/.synapos/squad-templates/produto/pipelines/quick-fix.yaml +40 -0
  204. package/.synapos/squad-templates/produto/pipelines/quick-spec.yaml +60 -0
  205. package/.synapos/squad-templates/produto/pipelines/refinar-docs.yaml +33 -0
  206. package/.synapos/squad-templates/produto/pipelines/steps/01-gate-integridade.md +48 -0
  207. package/.synapos/squad-templates/produto/pipelines/steps/02-contexto-negocio.md +119 -0
  208. package/.synapos/squad-templates/produto/pipelines/steps/03-personas.md +107 -0
  209. package/.synapos/squad-templates/produto/pipelines/steps/04-checkpoint-research.md +53 -0
  210. package/.synapos/squad-templates/produto/pipelines/steps/04b-alinhamento-estrategico.md +92 -0
  211. package/.synapos/squad-templates/produto/pipelines/steps/05-spec.md +138 -0
  212. package/.synapos/squad-templates/produto/pipelines/steps/05b-checkpoint-spec.md +60 -0
  213. package/.synapos/squad-templates/produto/pipelines/steps/06-requisitos.md +118 -0
  214. package/.synapos/squad-templates/produto/pipelines/steps/06b-checkpoint-requisitos.md +53 -0
  215. package/.synapos/squad-templates/produto/pipelines/steps/06c-visual-spec.md +59 -0
  216. package/.synapos/squad-templates/produto/pipelines/steps/07-arquitetura.md +160 -0
  217. package/.synapos/squad-templates/produto/pipelines/steps/08-handoff.md +130 -0
  218. package/.synapos/squad-templates/produto/pipelines/steps/nf-02-validar-requisito.md +73 -0
  219. package/.synapos/squad-templates/produto/pipelines/steps/nf-03-verificar-docs.md +69 -0
  220. package/.synapos/squad-templates/produto/pipelines/steps/nf-04-spec.md +160 -0
  221. package/.synapos/squad-templates/produto/pipelines/steps/nf-05-checkpoint-aprovacao.md +50 -0
  222. package/.synapos/squad-templates/produto/pipelines/steps/nf-06-versionar.md +71 -0
  223. package/.synapos/squad-templates/produto/pipelines/steps/nf-07-handoff.md +99 -0
  224. package/.synapos/squad-templates/produto/pipelines/steps/nf-08-criar-tarefas.md +232 -0
  225. package/.synapos/squad-templates/produto/pipelines/steps/qf-02-contexto.md +34 -0
  226. package/.synapos/squad-templates/produto/pipelines/steps/qf-03-executar.md +49 -0
  227. package/.synapos/squad-templates/produto/pipelines/steps/qf-04-registrar.md +35 -0
  228. package/.synapos/squad-templates/produto/pipelines/steps/qs-02-contexto.md +59 -0
  229. package/.synapos/squad-templates/produto/pipelines/steps/qs-03-spec.md +67 -0
  230. package/.synapos/squad-templates/produto/pipelines/steps/qs-05-handoff.md +49 -0
  231. package/.synapos/squad-templates/produto/pipelines/steps/rf-02-selecionar.md +66 -0
  232. package/.synapos/squad-templates/produto/pipelines/steps/rf-03-delta.md +73 -0
  233. package/.synapos/squad-templates/produto/pipelines/steps/rf-04-criar-versao.md +86 -0
  234. package/.synapos/squad-templates/produto/template.yaml +91 -0
  235. package/.synapos/squads/.gitkeep +0 -0
  236. package/README.md +285 -0
  237. package/bin/synapos.js +331 -0
  238. package/package.json +26 -0
package/bin/synapos.js ADDED
@@ -0,0 +1,331 @@
1
+ #!/usr/bin/env node
2
+
3
+ 'use strict';
4
+
5
+ const path = require('path');
6
+ const fs = require('fs');
7
+ const prompts = require('prompts');
8
+
9
+ // ─── Colors (ANSI) ───────────────────────────────────────────────────────────
10
+ const c = {
11
+ reset: '\x1b[0m',
12
+ bold: '\x1b[1m',
13
+ dim: '\x1b[2m',
14
+ cyan: '\x1b[36m',
15
+ green: '\x1b[32m',
16
+ yellow: '\x1b[33m',
17
+ red: '\x1b[31m',
18
+ gray: '\x1b[90m',
19
+ };
20
+
21
+ const bold = (s) => `${c.bold}${s}${c.reset}`;
22
+ const cyan = (s) => `${c.cyan}${s}${c.reset}`;
23
+ const green = (s) => `${c.green}${s}${c.reset}`;
24
+ const yellow = (s) => `${c.yellow}${s}${c.reset}`;
25
+ const gray = (s) => `${c.gray}${s}${c.reset}`;
26
+ const red = (s) => `${c.red}${s}${c.reset}`;
27
+ const dim = (s) => `${c.dim}${s}${c.reset}`;
28
+
29
+ // ─── Constants ────────────────────────────────────────────────────────────────
30
+ const PACKAGE_DIR = path.join(__dirname, '..');
31
+ const VERSION = (() => {
32
+ try {
33
+ return JSON.parse(fs.readFileSync(path.join(PACKAGE_DIR, 'package.json'), 'utf8')).version;
34
+ } catch { return '2.5.0'; }
35
+ })();
36
+
37
+ // Squad definitions — value = folder name in squad-templates/
38
+ const SQUADS = [
39
+ { value: 'frontend', aliases: ['front', 'fe'], title: '🖥️ Frontend', description: 'React, Vue, CSS, UX/UI, testes' },
40
+ { value: 'backend', aliases: ['back', 'be'], title: '⚙️ Backend', description: 'APIs, banco de dados, segurança' },
41
+ { value: 'fullstack', aliases: ['full', 'fs'], title: '📦 Fullstack', description: 'Frontend + Backend integrados' },
42
+ { value: 'produto', aliases: ['product', 'prod'], title: '📋 Produto', description: 'Pesquisa, spec, documentação' },
43
+ { value: 'mobile', aliases: ['mob'], title: '📱 Mobile', description: 'React Native, Flutter, iOS, Android' },
44
+ { value: 'devops', aliases: ['ops', 'infra'], title: '🚀 DevOps', description: 'CI/CD, containers, cloud, infra' },
45
+ { value: 'ia-dados', aliases: ['ia', 'ml', 'data'], title: '🤖 IA / Dados', description: 'ML, pipelines de dados, LLMs' },
46
+ { value: 'engineer', aliases: ['eng'], title: '🧠 Engineer', description: 'Feature engineering guiado por ADRs' },
47
+ ];
48
+
49
+ // Commands installed for each IDE
50
+ const COMMANDS = [
51
+ { file: 'init.md', content: 'Leia e execute exatamente o protocolo em: .synapos/core/orchestrator.md\n' },
52
+ { file: 'bump.md', content: 'Leia e execute exatamente o protocolo em: .synapos/core/commands/bump.md\n' },
53
+ { file: 'set-model.md', content: 'Leia e execute exatamente o protocolo em: .synapos/core/commands/set-model.md\n' },
54
+ { file: 'setup/start.md', content: 'Leia e execute exatamente o protocolo em: .synapos/core/commands/setup/start.md\n' },
55
+ { file: 'setup/build-business.md', content: 'Leia e execute exatamente o protocolo em: .synapos/core/commands/setup/build-business.md\n' },
56
+ { file: 'setup/build-tech.md', content: 'Leia e execute exatamente o protocolo em: .synapos/core/commands/setup/build-tech.md\n' },
57
+ { file: 'setup/discover.md', content: 'Leia e execute exatamente o protocolo em: .synapos/core/commands/setup/discover.md\n' },
58
+ ];
59
+
60
+ // IDE definitions
61
+ const IDES = [
62
+ { value: 'claude', title: 'Claude Code', commandsDir: '.claude/commands', hint: '/init na conversa' },
63
+ { value: 'copilot', title: 'Copilot', commandsDir: null, hint: 'synapos:init no chat do Copilot' },
64
+ { value: 'opencode', title: 'OpenCode', commandsDir: '.opencode/commands', hint: '/init no chat' },
65
+ ];
66
+
67
+ // ─── Helpers ──────────────────────────────────────────────────────────────────
68
+ function header() {
69
+ console.log('');
70
+ console.log(bold(cyan(' ╔══════════════════════════════════════════╗')));
71
+ console.log(bold(cyan(' ║') + bold(` SYNAPOS FRAMEWORK v${VERSION} `) + bold(cyan('║'))));
72
+ console.log(bold(cyan(' ║') + gray(' AI Agent Orchestration — Multi-IDE ') + bold(cyan('║'))));
73
+ console.log(bold(cyan(' ╚══════════════════════════════════════════╝')));
74
+ console.log('');
75
+ }
76
+
77
+ function ok(msg) { console.log(green(' ✔') + ' ' + msg); }
78
+ function info(msg) { console.log(cyan(' →') + ' ' + msg); }
79
+ function warn(msg) { console.log(yellow(' ⚠') + ' ' + msg); }
80
+ function err(msg) { console.log(red(' ✖') + ' ' + msg); }
81
+ function nl() { console.log(''); }
82
+
83
+ function copyDirRecursive(src, dest) {
84
+ if (!fs.existsSync(src)) return;
85
+ fs.mkdirSync(dest, { recursive: true });
86
+ for (const entry of fs.readdirSync(src, { withFileTypes: true })) {
87
+ const srcPath = path.join(src, entry.name);
88
+ const destPath = path.join(dest, entry.name);
89
+ if (entry.isDirectory()) {
90
+ copyDirRecursive(srcPath, destPath);
91
+ } else {
92
+ fs.copyFileSync(srcPath, destPath);
93
+ }
94
+ }
95
+ }
96
+
97
+ function copyFile(src, dest) {
98
+ if (!fs.existsSync(src)) return;
99
+ fs.mkdirSync(path.dirname(dest), { recursive: true });
100
+ fs.copyFileSync(src, dest);
101
+ }
102
+
103
+ function writeFile(filePath, content) {
104
+ fs.mkdirSync(path.dirname(filePath), { recursive: true });
105
+ fs.writeFileSync(filePath, content, 'utf8');
106
+ }
107
+
108
+ // Copia o core do framework (sem squad-templates)
109
+ function installCore(src, dest) {
110
+ const coreDirs = ['core', 'skills'];
111
+ const coreFiles = ['.manifest.json', 'VERSION', 'CHANGELOG.md'];
112
+
113
+ for (const dir of coreDirs) {
114
+ copyDirRecursive(path.join(src, dir), path.join(dest, dir));
115
+ }
116
+ for (const file of coreFiles) {
117
+ copyFile(path.join(src, file), path.join(dest, file));
118
+ }
119
+ }
120
+
121
+ // Resolve aliases de CLI para valores canônicos de squad
122
+ // ex: 'front' → 'frontend', 'ia' → 'ia-dados'
123
+ function resolveSquadArgs(args) {
124
+ const resolved = new Set();
125
+ for (const arg of args) {
126
+ const lower = arg.toLowerCase();
127
+ const match = SQUADS.find(
128
+ s => s.value === lower || s.aliases.includes(lower)
129
+ );
130
+ if (match) {
131
+ resolved.add(match.value);
132
+ } else {
133
+ warn(`Squad desconhecido: "${arg}" — ignorado`);
134
+ }
135
+ }
136
+ return [...resolved];
137
+ }
138
+
139
+ // ─── Main ─────────────────────────────────────────────────────────────────────
140
+ async function run() {
141
+ const argv = process.argv.slice(2);
142
+ const flags = argv.filter(a => a.startsWith('-'));
143
+ const args = argv.filter(a => !a.startsWith('-'));
144
+
145
+ if (flags.includes('--version') || flags.includes('-v')) {
146
+ console.log(VERSION);
147
+ process.exit(0);
148
+ }
149
+
150
+ if (flags.includes('--help') || flags.includes('-h')) {
151
+ console.log(`
152
+ ${bold('SYNAPOS')} — AI Agent Orchestration Framework v${VERSION}
153
+
154
+ ${bold('USO')}
155
+ npx synapos [squads...] [options]
156
+
157
+ ${bold('SQUADS')} (aliases aceitos)
158
+ ${SQUADS.map(s => ` ${s.value.padEnd(12)} ${gray(s.aliases.join(', ').padEnd(18))} ${s.description}`).join('\n')}
159
+
160
+ ${bold('OPÇÕES')}
161
+ -v, --version Exibe a versão
162
+ -h, --help Exibe esta ajuda
163
+
164
+ ${bold('EXEMPLOS')}
165
+ npx synapos Seleção interativa de squads
166
+ npx synapos front Instala squad Frontend
167
+ npx synapos front back Instala Frontend + Backend
168
+ npx synapos front back devops Instala múltiplos squads
169
+ `);
170
+ process.exit(0);
171
+ }
172
+
173
+ header();
174
+
175
+ const targetDir = process.cwd();
176
+ const synaposSource = path.join(PACKAGE_DIR, '.synapos');
177
+
178
+ if (!fs.existsSync(synaposSource)) {
179
+ err('Arquivos do framework não encontrados no pacote.');
180
+ process.exit(1);
181
+ }
182
+
183
+ // ── 1. Resolver squads via args ou seleção interativa ────────────────────────
184
+ let selectedSquadIds = [];
185
+
186
+ if (args.length > 0) {
187
+ // Squads passados como argumento: npx synapos front back
188
+ selectedSquadIds = resolveSquadArgs(args);
189
+ if (selectedSquadIds.length === 0) {
190
+ err('Nenhum squad válido nos argumentos. Use --help para ver as opções.');
191
+ process.exit(1);
192
+ }
193
+ nl();
194
+ info(`Squads selecionados via argumento: ${selectedSquadIds.join(', ')}`);
195
+ nl();
196
+ } else {
197
+ // Seleção interativa
198
+ const { selected } = await prompts({
199
+ type: 'multiselect',
200
+ name: 'selected',
201
+ message: 'Quais squads você quer instalar?',
202
+ choices: SQUADS.map(s => ({
203
+ title: s.title,
204
+ value: s.value,
205
+ description: s.description,
206
+ selected: false,
207
+ })),
208
+ hint: '- Espaço para selecionar, Enter para confirmar',
209
+ instructions: false,
210
+ min: 1,
211
+ }, { onCancel: () => { nl(); process.exit(0); } });
212
+
213
+ if (!selected || selected.length === 0) process.exit(0);
214
+ selectedSquadIds = selected;
215
+ nl();
216
+ }
217
+
218
+ // ── 2. Verificar se .synapos/ já existe ─────────────────────────────────────
219
+ const synaposTarget = path.join(targetDir, '.synapos');
220
+ if (fs.existsSync(synaposTarget)) {
221
+ const { overwrite } = await prompts({
222
+ type: 'confirm',
223
+ name: 'overwrite',
224
+ message: 'A pasta .synapos/ já existe. Deseja atualizar o framework?',
225
+ initial: true,
226
+ }, { onCancel: () => { nl(); process.exit(0); } });
227
+
228
+ if (!overwrite) {
229
+ nl();
230
+ warn('Instalação cancelada.');
231
+ process.exit(0);
232
+ }
233
+ nl();
234
+ }
235
+
236
+ // ── 3. Selecionar IDE ────────────────────────────────────────────────────────
237
+ const { selectedIdes } = await prompts({
238
+ type: 'multiselect',
239
+ name: 'selectedIdes',
240
+ message: 'Qual IDE você usa?',
241
+ choices: IDES.map(ide => ({ title: ide.title, value: ide.value, selected: false })),
242
+ hint: '- Espaço para selecionar, Enter para confirmar',
243
+ instructions: false,
244
+ min: 1,
245
+ }, { onCancel: () => { nl(); process.exit(0); } });
246
+
247
+ if (!selectedIdes || selectedIdes.length === 0) process.exit(0);
248
+ nl();
249
+
250
+ // ── 4. Instalar core ─────────────────────────────────────────────────────────
251
+ info('Instalando Synapos Framework...');
252
+ nl();
253
+
254
+ try {
255
+ installCore(synaposSource, synaposTarget);
256
+ ok(`.synapos/core instalado ${gray('(orchestrator, pipeline-runner, gates, model-adapter, skills)')}`);
257
+ } catch (e) {
258
+ err(`Erro ao copiar core: ${e.message}`);
259
+ process.exit(1);
260
+ }
261
+
262
+ // ── 5. Instalar squads selecionados ─────────────────────────────────────────
263
+ for (const squadId of selectedSquadIds) {
264
+ const squad = SQUADS.find(s => s.value === squadId);
265
+ const squadSrc = path.join(synaposSource, 'squad-templates', squadId);
266
+ const squadDst = path.join(synaposTarget, 'squad-templates', squadId);
267
+
268
+ if (!fs.existsSync(squadSrc)) {
269
+ warn(`Template "${squadId}" não encontrado no pacote — pulando`);
270
+ continue;
271
+ }
272
+
273
+ try {
274
+ copyDirRecursive(squadSrc, squadDst);
275
+ ok(`${squad.title.trim()} instalado ${gray(`(.synapos/squad-templates/${squadId}/)`)}`);
276
+ } catch (e) {
277
+ err(`Erro ao copiar squad ${squadId}: ${e.message}`);
278
+ }
279
+ }
280
+
281
+ // ── 6. Configurar IDEs ───────────────────────────────────────────────────────
282
+ nl();
283
+ for (const ideId of selectedIdes) {
284
+ const ide = IDES.find(i => i.value === ideId);
285
+ try {
286
+ if (ideId === 'copilot') {
287
+ // Copilot usa .github/copilot-instructions.md em vez de comandos
288
+ const copilotSrc = path.join(PACKAGE_DIR, '.github', 'copilot-instructions.md');
289
+ const copilotDest = path.join(targetDir, '.github', 'copilot-instructions.md');
290
+ copyFile(copilotSrc, copilotDest);
291
+ ok(`${ide.title} configurado ${gray('(.github/copilot-instructions.md)')}`);
292
+ } else {
293
+ for (const cmd of COMMANDS) {
294
+ writeFile(path.join(targetDir, ide.commandsDir, cmd.file), cmd.content);
295
+ }
296
+ ok(`${ide.title} configurado ${gray(`(${ide.commandsDir}/, ${COMMANDS.length} comandos)`)}`);
297
+ }
298
+ } catch (e) {
299
+ err(`Erro ao configurar ${ide.title}: ${e.message}`);
300
+ }
301
+ }
302
+
303
+ // ── 7. Resumo final ──────────────────────────────────────────────────────────
304
+ const configuredIdes = selectedIdes.map(id => IDES.find(i => i.value === id));
305
+ const installedSquads = selectedSquadIds.map(id => SQUADS.find(s => s.value === id));
306
+
307
+ nl();
308
+ console.log(bold(green(' ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━')));
309
+ console.log(green(' ✅') + bold(` Synapos v${VERSION} instalado!`));
310
+ console.log(bold(green(' ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━')));
311
+ nl();
312
+ console.log(bold(' Squads instalados:'));
313
+ for (const s of installedSquads) {
314
+ console.log(cyan(' ·') + ` ${s.title.trim()}`);
315
+ }
316
+ nl();
317
+ console.log(bold(' Próximos passos:'));
318
+ nl();
319
+ for (const ide of configuredIdes) {
320
+ console.log(cyan(' →') + dim(` ${ide.title.padEnd(12)} → ${ide.hint}`));
321
+ }
322
+ nl();
323
+ console.log(dim(' Dica: /init detecta automaticamente o contexto do projeto'));
324
+ console.log(dim(' e escolhe o modo certo (Bootstrap / Standard / Strict)'));
325
+ nl();
326
+ }
327
+
328
+ run().catch((e) => {
329
+ console.error(red('\n Erro inesperado:'), e.message);
330
+ process.exit(1);
331
+ });
package/package.json ADDED
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "synapos",
3
+ "version": "2.5.0",
4
+ "description": "Synapos Framework — AI agent orchestration for multi-IDE development",
5
+ "keywords": ["ai", "agents", "claude", "cursor", "framework", "orchestration", "llm"],
6
+ "author": "",
7
+ "license": "MIT",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": ""
11
+ },
12
+ "bin": {
13
+ "synapos": "./bin/synapos.js"
14
+ },
15
+ "files": [
16
+ "bin/",
17
+ ".synapos/",
18
+ ".github/"
19
+ ],
20
+ "dependencies": {
21
+ "prompts": "^2.4.2"
22
+ },
23
+ "engines": {
24
+ "node": ">=16"
25
+ }
26
+ }