sinapse-ai 7.0.5 → 7.2.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 (93) hide show
  1. package/.sinapse-ai/core-config.yaml +2 -26
  2. package/.sinapse-ai/data/entity-registry.yaml +742 -917
  3. package/.sinapse-ai/data/registry-update-log.jsonl +22 -0
  4. package/.sinapse-ai/infrastructure/scripts/ide-sync/index.js +1 -49
  5. package/.sinapse-ai/infrastructure/scripts/validate-parity.js +0 -7
  6. package/.sinapse-ai/install-manifest.yaml +11 -43
  7. package/README.en.md +6 -11
  8. package/README.md +6 -11
  9. package/bin/cli.js +116 -75
  10. package/bin/modules/env-config.js +1 -2
  11. package/bin/sinapse-init.js +23 -188
  12. package/docs/ide-integration.md +22 -263
  13. package/docs/installation/README.md +4 -6
  14. package/docs/installation/faq.md +10 -33
  15. package/docs/installation/linux.md +0 -23
  16. package/docs/installation/macos.md +0 -10
  17. package/docs/installation/troubleshooting.md +5 -9
  18. package/docs/installation/v4-quick-start.md +1 -1
  19. package/docs/installation/windows.md +0 -18
  20. package/package.json +2 -9
  21. package/packages/installer/src/config/ide-configs.js +3 -49
  22. package/squads/claude-code-mastery/CHANGELOG.md +22 -0
  23. package/squads/claude-code-mastery/README.md +146 -0
  24. package/squads/claude-code-mastery/agents/claude-mastery-chief.md +554 -0
  25. package/squads/claude-code-mastery/agents/config-engineer.md +865 -0
  26. package/squads/claude-code-mastery/agents/hooks-architect.md +1013 -0
  27. package/squads/claude-code-mastery/agents/mcp-integrator.md +791 -0
  28. package/squads/claude-code-mastery/agents/project-integrator.md +1196 -0
  29. package/squads/claude-code-mastery/agents/roadmap-sentinel.md +931 -0
  30. package/squads/claude-code-mastery/agents/skill-craftsman.md +1250 -0
  31. package/squads/claude-code-mastery/agents/swarm-orqx.md +1008 -0
  32. package/squads/claude-code-mastery/checklists/agent-team-readiness-checklist.md +88 -0
  33. package/squads/claude-code-mastery/checklists/brownfield-readiness-checklist.md +91 -0
  34. package/squads/claude-code-mastery/checklists/change-checklist.md +75 -0
  35. package/squads/claude-code-mastery/checklists/context-rot-checklist.md +114 -0
  36. package/squads/claude-code-mastery/checklists/integration-audit-checklist.md +104 -0
  37. package/squads/claude-code-mastery/checklists/multi-agent-review-checklist.md +77 -0
  38. package/squads/claude-code-mastery/checklists/pre-push-checklist.md +79 -0
  39. package/squads/claude-code-mastery/data/ci-cd-patterns.yaml +412 -0
  40. package/squads/claude-code-mastery/data/claude-code-quick-ref.yaml +314 -0
  41. package/squads/claude-code-mastery/data/hook-patterns.yaml +512 -0
  42. package/squads/claude-code-mastery/data/mcp-integration-catalog.yaml +323 -0
  43. package/squads/claude-code-mastery/data/project-type-signatures.yaml +335 -0
  44. package/squads/claude-code-mastery/scripts/validate-setup.js +163 -0
  45. package/squads/claude-code-mastery/squad.yaml +205 -0
  46. package/squads/claude-code-mastery/tasks/audit-integration.md +219 -0
  47. package/squads/claude-code-mastery/tasks/audit-settings.md +206 -0
  48. package/squads/claude-code-mastery/tasks/audit-setup.md +225 -0
  49. package/squads/claude-code-mastery/tasks/brownfield-setup.md +322 -0
  50. package/squads/claude-code-mastery/tasks/ci-cd-setup.md +335 -0
  51. package/squads/claude-code-mastery/tasks/claude-md-engineer.md +334 -0
  52. package/squads/claude-code-mastery/tasks/configure-claude-code.md +215 -0
  53. package/squads/claude-code-mastery/tasks/context-rot-audit.md +329 -0
  54. package/squads/claude-code-mastery/tasks/create-agent-definition.md +278 -0
  55. package/squads/claude-code-mastery/tasks/create-rules.md +206 -0
  56. package/squads/claude-code-mastery/tasks/create-team-topology.md +258 -0
  57. package/squads/claude-code-mastery/tasks/diagnose.md +166 -0
  58. package/squads/claude-code-mastery/tasks/enterprise-config.md +346 -0
  59. package/squads/claude-code-mastery/tasks/hook-designer.md +272 -0
  60. package/squads/claude-code-mastery/tasks/integrate-project.md +304 -0
  61. package/squads/claude-code-mastery/tasks/mcp-integration-plan.md +229 -0
  62. package/squads/claude-code-mastery/tasks/mcp-workflow.md +285 -0
  63. package/squads/claude-code-mastery/tasks/multi-project-setup.md +228 -0
  64. package/squads/claude-code-mastery/tasks/optimize-context.md +217 -0
  65. package/squads/claude-code-mastery/tasks/optimize-workflow.md +226 -0
  66. package/squads/claude-code-mastery/tasks/parallel-decomposition.md +293 -0
  67. package/squads/claude-code-mastery/tasks/permission-strategy.md +266 -0
  68. package/squads/claude-code-mastery/tasks/sandbox-setup.md +279 -0
  69. package/squads/claude-code-mastery/tasks/setup-repository.md +230 -0
  70. package/squads/claude-code-mastery/tasks/setup-wizard.md +236 -0
  71. package/squads/claude-code-mastery/tasks/worktree-strategy.md +320 -0
  72. package/squads/claude-code-mastery/templates/claude-md-fullstack.md +147 -0
  73. package/squads/claude-code-mastery/templates/claude-md-library.md +175 -0
  74. package/squads/claude-code-mastery/templates/claude-md-microservices.md +186 -0
  75. package/squads/claude-code-mastery/templates/claude-md-mobile.md +198 -0
  76. package/squads/claude-code-mastery/templates/claude-md-monorepo.md +139 -0
  77. package/squads/claude-code-mastery/templates/github-actions-claude-ci.yml +348 -0
  78. package/squads/claude-code-mastery/templates/github-actions-claude-review.yml +179 -0
  79. package/squads/claude-code-mastery/workflows/wf-audit-complete.yaml +140 -0
  80. package/squads/claude-code-mastery/workflows/wf-knowledge-update.yaml +165 -0
  81. package/squads/claude-code-mastery/workflows/wf-project-setup.yaml +192 -0
  82. package/.sinapse-ai/infrastructure/scripts/ide-sync/transformers/antigravity.js +0 -105
  83. package/.sinapse-ai/infrastructure/scripts/ide-sync/transformers/cursor.js +0 -94
  84. package/.sinapse-ai/infrastructure/scripts/ide-sync/transformers/github-copilot.js +0 -184
  85. package/.sinapse-ai/infrastructure/scripts/validate-gemini-integration.js +0 -151
  86. package/.sinapse-ai/product/templates/ide-rules/antigravity-rules.md +0 -115
  87. package/.sinapse-ai/product/templates/ide-rules/copilot-rules.md +0 -92
  88. package/.sinapse-ai/product/templates/ide-rules/cursor-rules.md +0 -115
  89. package/.sinapse-ai/product/templates/ide-rules/gemini-rules.md +0 -87
  90. package/docs/pt/platforms/antigravity.md +0 -508
  91. package/docs/pt/platforms/cursor.md +0 -633
  92. package/docs/pt/platforms/gemini-cli.md +0 -481
  93. package/docs/pt/platforms/github-copilot.md +0 -478
package/bin/cli.js CHANGED
@@ -48,10 +48,13 @@ function getSquads(baseDir) {
48
48
  const squads = [];
49
49
  let entries;
50
50
  try {
51
- entries = fs.readdirSync(baseDir).filter(d =>
52
- d.startsWith('squad-') && !d.includes('.deprecated') &&
53
- fs.statSync(path.join(baseDir, d)).isDirectory()
54
- );
51
+ entries = fs.readdirSync(baseDir).filter(d => {
52
+ if (d.includes('.deprecated') || d.startsWith('.')) return false;
53
+ const dirPath = path.join(baseDir, d);
54
+ if (!fs.statSync(dirPath).isDirectory()) return false;
55
+ // Include squad-* dirs OR any dir with a squad.yaml manifest
56
+ return d.startsWith('squad-') || fs.existsSync(path.join(dirPath, 'squad.yaml'));
57
+ });
55
58
  } catch { return squads; }
56
59
 
57
60
  for (const dir of entries) {
@@ -124,10 +127,58 @@ function toForwardSlash(p) {
124
127
  return p.replace(/\\/g, '/');
125
128
  }
126
129
 
130
+ /**
131
+ * Prompt user to select LLM(s) — inquirer checkbox with readline fallback.
132
+ * @returns {Promise<string>} 'claude-code' | 'codex' | 'both'
133
+ */
134
+ async function promptLlmChoice() {
135
+ try {
136
+ const inquirer = require('inquirer');
137
+ const { llms } = await inquirer.prompt([{
138
+ type: 'checkbox',
139
+ name: 'llms',
140
+ message: 'Escolha sua LLM (espaco seleciona, enter confirma):',
141
+ choices: [
142
+ { name: 'Claude Code (Recomendado)', value: 'claude-code', checked: true },
143
+ { name: 'Codex CLI', value: 'codex' },
144
+ ],
145
+ }]);
146
+ if (llms.length === 0) return 'claude-code'; // default if none selected
147
+ if (llms.length === 2) return 'both';
148
+ return llms[0];
149
+ } catch {
150
+ // Fallback: readline numbered choice
151
+ const readline = require('readline');
152
+ const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
153
+ return new Promise((resolve) => {
154
+ console.log(`${CYAN} Escolha sua LLM:${NC}`);
155
+ console.log(` ${GREEN}1${NC}) Claude Code ${DIM}(Recomendado)${NC}`);
156
+ console.log(` ${GREEN}2${NC}) Codex CLI`);
157
+ console.log(` ${GREEN}3${NC}) Ambos`);
158
+ console.log('');
159
+ rl.question(` ${BOLD}Opcao [1/2/3]:${NC} `, (answer) => {
160
+ rl.close();
161
+ const choice = (answer || '1').trim();
162
+ if (choice === '2') resolve('codex');
163
+ else if (choice === '3') resolve('both');
164
+ else resolve('claude-code');
165
+ });
166
+ });
167
+ }
168
+ }
169
+
127
170
  // ── Global Install ───────────────────────────────────────────────────────────
128
171
 
129
- function cmdInstallGlobal() {
172
+ async function cmdInstallGlobal() {
130
173
  header();
174
+ console.log(`${BOLD} Bem-vindo ao SINAPSE AI!${NC}`);
175
+ console.log(`${DIM} Vamos configurar seu copiloto de inteligencia artificial.${NC}`);
176
+ console.log('');
177
+
178
+ // LLM selection (inquirer checkbox with readline fallback)
179
+ const llmChoice = await promptLlmChoice();
180
+
181
+ console.log('');
131
182
  console.log(`${BOLD}Installing Sinapse globally...${NC}\n`);
132
183
 
133
184
  // Validate package — squads live in squads/ subdirectory
@@ -164,7 +215,7 @@ function cmdInstallGlobal() {
164
215
  console.log(` ${GREEN}OK${NC} sinapse (master, ${masterAgents} agents)`);
165
216
  }
166
217
 
167
- // Phase 2: Generate global commands
218
+ // Phase 2: Generate orqx commands
168
219
  console.log(`\n${CYAN}Phase 2:${NC} Generating agent commands`);
169
220
  fs.mkdirSync(CLAUDE_COMMANDS_DIR, { recursive: true });
170
221
 
@@ -175,23 +226,10 @@ function cmdInstallGlobal() {
175
226
  }
176
227
  } catch {}
177
228
 
178
- let cmdCount = 0;
179
229
  const sinapseBase = toForwardSlash(SINAPSE_HOME);
230
+ const writtenAgents = new Set();
180
231
 
181
- // Also copy framework agent commands (sinapse-orqx, dev, qa, etc.) if they exist in package
182
- const frameworkCmdsDir = path.join(ROOT, '.claude', 'commands', 'SINAPSE', 'agents');
183
- if (fs.existsSync(frameworkCmdsDir)) {
184
- for (const f of fs.readdirSync(frameworkCmdsDir).filter(f => f.endsWith('.md'))) {
185
- let content = fs.readFileSync(path.join(frameworkCmdsDir, f), 'utf8');
186
- // Update paths to point to ~/.sinapse/
187
- content = content.replace(/\.sinapse-core\//g, `${sinapseBase}/.sinapse-core/`);
188
- fs.writeFileSync(path.join(CLAUDE_COMMANDS_DIR, f), content);
189
- cmdCount++;
190
- }
191
- console.log(` ${GREEN}OK${NC} Framework agents — ${cmdCount} agents`);
192
- }
193
-
194
- // Generate commands only for orqx agents (user-facing orchestrators)
232
+ // Generate commands for orqx agents from squads (dynamic paths, always correct)
195
233
  for (const squad of squads) {
196
234
  const squadPath = `${sinapseBase}/${squad.name}`;
197
235
  const agentsDir = path.join(SINAPSE_HOME, squad.name, 'agents');
@@ -203,7 +241,7 @@ function cmdInstallGlobal() {
203
241
  const meta = extractAgentMeta(path.join(agentsDir, file));
204
242
  const cmdContent = generateCommandMd(agentId, meta.name, meta.icon, squad.name, squadPath, file);
205
243
  fs.writeFileSync(path.join(CLAUDE_COMMANDS_DIR, `${agentId}.md`), cmdContent);
206
- cmdCount++;
244
+ writtenAgents.add(file);
207
245
  }
208
246
  }
209
247
 
@@ -212,17 +250,36 @@ function cmdInstallGlobal() {
212
250
  const masterAgentsDir = path.join(sinapseMasterDest, 'agents');
213
251
  if (fs.existsSync(masterAgentsDir)) {
214
252
  for (const file of fs.readdirSync(masterAgentsDir).filter(f => f.endsWith('.md'))) {
253
+ if (writtenAgents.has(file)) continue;
215
254
  const agentId = file.replace('.md', '');
216
- if (fs.existsSync(path.join(CLAUDE_COMMANDS_DIR, `${agentId}.md`))) continue; // skip if framework version exists
217
255
  const meta = extractAgentMeta(path.join(masterAgentsDir, file));
218
256
  const squadPath = `${sinapseBase}/sinapse`;
219
257
  const cmdContent = generateCommandMd(agentId, meta.name, meta.icon, 'sinapse', squadPath, file);
220
258
  fs.writeFileSync(path.join(CLAUDE_COMMANDS_DIR, `${agentId}.md`), cmdContent);
221
- cmdCount++;
259
+ writtenAgents.add(file);
222
260
  }
223
261
  }
224
262
  }
225
- console.log(` ${GREEN}OK${NC} ${cmdCount} total command files`);
263
+ console.log(` ${GREEN}OK${NC} ${writtenAgents.size} total command files`);
264
+
265
+ // Phase 2b: Install global agents based on LLM choice
266
+ if (llmChoice === 'claude-code' || llmChoice === 'both') {
267
+ const globalAgentsDir = path.join(HOME, '.claude', 'agents');
268
+ fs.mkdirSync(globalAgentsDir, { recursive: true });
269
+ for (const f of fs.readdirSync(CLAUDE_COMMANDS_DIR).filter(f => f.endsWith('.md'))) {
270
+ fs.copyFileSync(path.join(CLAUDE_COMMANDS_DIR, f), path.join(globalAgentsDir, f));
271
+ }
272
+ console.log(` ${GREEN}OK${NC} Claude Code global agents (${writtenAgents.size})`);
273
+ }
274
+
275
+ if (llmChoice === 'codex' || llmChoice === 'both') {
276
+ const codexAgentsDir = path.join(HOME, '.codex', 'agents');
277
+ fs.mkdirSync(codexAgentsDir, { recursive: true });
278
+ for (const f of fs.readdirSync(CLAUDE_COMMANDS_DIR).filter(f => f.endsWith('.md'))) {
279
+ fs.copyFileSync(path.join(CLAUDE_COMMANDS_DIR, f), path.join(codexAgentsDir, f));
280
+ }
281
+ console.log(` ${GREEN}OK${NC} Codex global agents (${writtenAgents.size})`);
282
+ }
226
283
 
227
284
  // Phase 3: Generate squad-awareness.md
228
285
  console.log(`\n${CYAN}Phase 3:${NC} Generating squad-awareness rules`);
@@ -243,7 +300,8 @@ function cmdInstallGlobal() {
243
300
  installedAt: new Date().toISOString(),
244
301
  squads: squads.length,
245
302
  agents: totalAgents,
246
- commands: cmdCount,
303
+ commands: writtenAgents.size,
304
+ llm: llmChoice,
247
305
  platform: process.platform,
248
306
  };
249
307
  fs.writeFileSync(path.join(SINAPSE_HOME, 'metadata.json'), JSON.stringify(meta, null, 2));
@@ -252,23 +310,23 @@ function cmdInstallGlobal() {
252
310
  console.log(`\n${CYAN}Verification:${NC}`);
253
311
  verifyInstall();
254
312
 
255
- // Success
313
+ // Success message
314
+ let startCmd;
315
+ if (llmChoice === 'codex') startCmd = `Run ${CYAN}codex${NC} to start`;
316
+ else if (llmChoice === 'both') startCmd = `Run ${CYAN}sinapse${NC} or ${CYAN}codex${NC} to start`;
317
+ else startCmd = `Run ${CYAN}sinapse${NC} to start Claude Code with all agents`;
318
+
256
319
  console.log('');
257
320
  console.log(`${GREEN}══════════════════════════════════════════════════════════════${NC}`);
258
321
  console.log(`${GREEN} Sinapse installed successfully!${NC}`);
259
322
  console.log(`${GREEN}══════════════════════════════════════════════════════════════${NC}`);
260
323
  console.log('');
261
- console.log(` ${BOLD}${squads.length} squads${NC} | ${BOLD}${cmdCount} agents${NC} | All under ${CYAN}/SINAPSE:agents:*${NC}`);
262
- console.log('');
263
- console.log(` ${BOLD}Next steps:${NC}`);
264
- console.log(` 1. Restart your terminal (for PATH changes)`);
265
- console.log(` 2. Run ${CYAN}sinapse${NC} to start Claude Code with all agents`);
266
- console.log(` 3. Or: ${CYAN}claude --add-dir ~/.sinapse${NC}`);
324
+ console.log(` ${BOLD}${squads.length} squads${NC} | ${BOLD}${totalAgents} agents${NC} | ${BOLD}${writtenAgents.size} orqx commands${NC}`);
325
+ console.log(` ${startCmd}`);
267
326
  console.log('');
268
327
  console.log(` ${BOLD}Try an agent:${NC}`);
269
328
  console.log(` ${CYAN}/SINAPSE:agents:sinapse-orqx${NC}`);
270
329
  console.log(` ${CYAN}/SINAPSE:agents:brand-orqx${NC}`);
271
- console.log(` ${CYAN}/SINAPSE:agents:dev${NC}`);
272
330
  console.log('');
273
331
  }
274
332
 
@@ -565,23 +623,8 @@ async function cmdUpdateGlobal() {
565
623
  console.log(`${DIM} Vamos atualizar seu SINAPSE AI para a v${VERSION}.${NC}`);
566
624
  console.log('');
567
625
 
568
- // LLM selection (re-choose on every update)
569
- const readline = require('readline');
570
- const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
571
- const llmChoice = await new Promise((resolve) => {
572
- console.log(`${CYAN} Escolha sua LLM:${NC}`);
573
- console.log(` ${GREEN}1${NC}) Claude Code ${DIM}(Recomendado)${NC}`);
574
- console.log(` ${GREEN}2${NC}) Codex CLI`);
575
- console.log(` ${GREEN}3${NC}) Ambos`);
576
- console.log('');
577
- rl.question(` ${BOLD}Opcao [1/2/3]:${NC} `, (answer) => {
578
- rl.close();
579
- const choice = (answer || '1').trim();
580
- if (choice === '2') resolve('codex');
581
- else if (choice === '3') resolve('both');
582
- else resolve('claude-code');
583
- });
584
- });
626
+ // LLM selection (inquirer checkbox with readline fallback)
627
+ const llmChoice = await promptLlmChoice();
585
628
 
586
629
  console.log('');
587
630
  console.log(`${BOLD}Atualizando SINAPSE AI...${NC}\n`);
@@ -614,19 +657,9 @@ async function cmdUpdateGlobal() {
614
657
  fs.mkdirSync(CLAUDE_COMMANDS_DIR, { recursive: true });
615
658
 
616
659
  const sinapseBase = toForwardSlash(SINAPSE_HOME);
617
- let cmdCount = 0;
618
-
619
- const frameworkCmdsDir = path.join(ROOT, '.claude', 'commands', 'SINAPSE', 'agents');
620
- if (fs.existsSync(frameworkCmdsDir)) {
621
- for (const f of fs.readdirSync(frameworkCmdsDir).filter(f => f.endsWith('.md'))) {
622
- let content = fs.readFileSync(path.join(frameworkCmdsDir, f), 'utf8');
623
- content = content.replace(/\.sinapse-core\//g, `${sinapseBase}/.sinapse-core/`);
624
- fs.writeFileSync(path.join(CLAUDE_COMMANDS_DIR, f), content);
625
- cmdCount++;
626
- }
627
- }
660
+ const writtenAgents = new Set();
628
661
 
629
- // Count total agents and generate orqx commands (skip if already copied from framework)
662
+ // Generate commands for orqx agents from squads (dynamic paths)
630
663
  let totalAgents = 0;
631
664
  for (const squad of squads) {
632
665
  const agentsDir = path.join(SINAPSE_HOME, squad.name, 'agents');
@@ -635,21 +668,29 @@ async function cmdUpdateGlobal() {
635
668
  totalAgents += allAgents.length;
636
669
  const orqxAgents = allAgents.filter(f => f.includes('-orqx'));
637
670
  for (const file of orqxAgents) {
638
- const destPath = path.join(CLAUDE_COMMANDS_DIR, file);
639
- if (fs.existsSync(destPath)) continue; // skip if already from framework
640
671
  const agentId = file.replace('.md', '');
641
672
  const meta = extractAgentMeta(path.join(agentsDir, file));
642
673
  const squadPath = `${sinapseBase}/${squad.name}`;
643
- fs.writeFileSync(destPath, generateCommandMd(agentId, meta.name, meta.icon, squad.name, squadPath, file));
644
- cmdCount++;
674
+ fs.writeFileSync(path.join(CLAUDE_COMMANDS_DIR, file), generateCommandMd(agentId, meta.name, meta.icon, squad.name, squadPath, file));
675
+ writtenAgents.add(file);
645
676
  }
646
677
  }
647
- // Also count sinapse/ orqx agents
678
+
679
+ // Generate commands for sinapse/ orqx squad agents
648
680
  const sinapseAgentsDir = path.join(SINAPSE_HOME, 'sinapse', 'agents');
649
681
  if (fs.existsSync(sinapseAgentsDir)) {
650
- totalAgents += fs.readdirSync(sinapseAgentsDir).filter(f => f.endsWith('.md')).length;
682
+ const masterAgents = fs.readdirSync(sinapseAgentsDir).filter(f => f.endsWith('.md'));
683
+ totalAgents += masterAgents.length;
684
+ for (const file of masterAgents) {
685
+ if (writtenAgents.has(file)) continue;
686
+ const agentId = file.replace('.md', '');
687
+ const meta = extractAgentMeta(path.join(sinapseAgentsDir, file));
688
+ const squadPath = `${sinapseBase}/sinapse`;
689
+ fs.writeFileSync(path.join(CLAUDE_COMMANDS_DIR, file), generateCommandMd(agentId, meta.name, meta.icon, 'sinapse', squadPath, file));
690
+ writtenAgents.add(file);
691
+ }
651
692
  }
652
- console.log(` ${GREEN}OK${NC} ${cmdCount} command files (${totalAgents} agents total)`);
693
+ console.log(` ${GREEN}OK${NC} ${writtenAgents.size} command files (${totalAgents} agents total)`);
653
694
 
654
695
  // Phase 2b: Install global agents based on LLM choice
655
696
  if (llmChoice === 'claude-code' || llmChoice === 'both') {
@@ -659,7 +700,7 @@ async function cmdUpdateGlobal() {
659
700
  for (const f of fs.readdirSync(CLAUDE_COMMANDS_DIR).filter(f => f.endsWith('.md'))) {
660
701
  fs.copyFileSync(path.join(CLAUDE_COMMANDS_DIR, f), path.join(globalAgentsDir, f));
661
702
  }
662
- console.log(` ${GREEN}OK${NC} Claude Code global agents (${cmdCount})`);
703
+ console.log(` ${GREEN}OK${NC} Claude Code global agents (${writtenAgents.size})`);
663
704
  }
664
705
 
665
706
  if (llmChoice === 'codex' || llmChoice === 'both') {
@@ -669,7 +710,7 @@ async function cmdUpdateGlobal() {
669
710
  for (const f of fs.readdirSync(CLAUDE_COMMANDS_DIR).filter(f => f.endsWith('.md'))) {
670
711
  fs.copyFileSync(path.join(CLAUDE_COMMANDS_DIR, f), path.join(codexAgentsDir, f));
671
712
  }
672
- console.log(` ${GREEN}OK${NC} Codex global agents (${cmdCount})`);
713
+ console.log(` ${GREEN}OK${NC} Codex global agents (${writtenAgents.size})`);
673
714
  }
674
715
 
675
716
  // Phase 3: Regenerate awareness
@@ -682,7 +723,7 @@ async function cmdUpdateGlobal() {
682
723
  const meta = JSON.parse(fs.readFileSync(metaPath, 'utf8'));
683
724
  meta.updatedAt = new Date().toISOString();
684
725
  meta.squads = squads.length;
685
- meta.commands = cmdCount;
726
+ meta.commands = writtenAgents.size;
686
727
  fs.writeFileSync(metaPath, JSON.stringify(meta, null, 2));
687
728
 
688
729
  let startCmd;
@@ -695,7 +736,7 @@ async function cmdUpdateGlobal() {
695
736
  console.log(`${GREEN} SINAPSE AI atualizado para v${VERSION}!${NC}`);
696
737
  console.log(`${GREEN}══════════════════════════════════════════════════════════════${NC}`);
697
738
  console.log('');
698
- console.log(` ${BOLD}${squads.length} squads${NC} | ${BOLD}${totalAgents} agents${NC} | ${BOLD}${cmdCount} orqx commands${NC}`);
739
+ console.log(` ${BOLD}${squads.length} squads${NC} | ${BOLD}${totalAgents} agents${NC} | ${BOLD}${writtenAgents.size} orqx commands${NC}`);
699
740
  console.log(` ${startCmd}`);
700
741
  console.log('');
701
742
  }
@@ -858,7 +899,7 @@ const command = args[0] || 'help';
858
899
  const isLocal = args.includes('--local');
859
900
 
860
901
  switch (command) {
861
- case 'install': isLocal ? cmdInstallLocal() : cmdInstallGlobal(); break;
902
+ case 'install': isLocal ? cmdInstallLocal() : cmdInstallGlobal().catch(e => { console.error(e.message); process.exit(1); }); break;
862
903
  case 'update': isLocal ? cmdUpdateLocal() : cmdUpdateGlobal().catch(e => { console.error(e.message); process.exit(1); }); break;
863
904
  case 'uninstall': cmdUninstall(); break;
864
905
  case 'list': cmdList(); break;
@@ -352,9 +352,8 @@ async function generateCoreConfigYAML(projectPath, wizardState) {
352
352
  */
353
353
  function getIDEConfigFile(ideKey) {
354
354
  const ideConfigMap = {
355
- cursor: '.cursorrules',
355
+ codex: '.codex/instructions.md',
356
356
  zed: '.zed/settings.json',
357
- antigravity: '.antigravity.yaml',
358
357
  continue: '.continue/config.json',
359
358
  };
360
359
 
@@ -17,7 +17,7 @@
17
17
  * - Do NOT call this file directly
18
18
  *
19
19
  * Supported IDEs (4 total):
20
- * - Claude Code, Cursor, Gemini CLI, GitHub Copilot
20
+ * - Claude Code, Codex CLI
21
21
  */
22
22
 
23
23
  const path = require('path');
@@ -408,12 +408,9 @@ async function main() {
408
408
  value: 'claude',
409
409
  checked: true,
410
410
  },
411
- { name: ' Cursor ' + chalk.blue('(v4)'), value: 'cursor' },
412
- { name: ' Gemini CLI ' + chalk.blue('(v4)'), value: 'gemini' },
413
- { name: ' GitHub Copilot ' + chalk.blue('(v4)'), value: 'github-copilot' },
414
411
  {
415
- name: ' AntiGravity ' + chalk.blue('(v4)') + chalk.gray(' - Google AI IDE'),
416
- value: 'antigravity',
412
+ name: ' Codex CLI ' + chalk.blue('(v4)') + chalk.gray(' - OpenAI'),
413
+ value: 'codex',
417
414
  },
418
415
  new inquirer.Separator(chalk.gray('─'.repeat(40))),
419
416
  { name: ' Skip IDE setup', value: 'none' },
@@ -432,8 +429,8 @@ async function main() {
432
429
  if (ides.includes('claude')) {
433
430
  cliToolsToCheck.push({ ide: 'claude', command: 'claude', name: 'Claude Code', npm: '@anthropic-ai/claude-code' });
434
431
  }
435
- if (ides.includes('gemini')) {
436
- cliToolsToCheck.push({ ide: 'gemini', command: 'gemini', name: 'Gemini CLI', npm: '@google/gemini-cli' });
432
+ if (ides.includes('codex')) {
433
+ cliToolsToCheck.push({ ide: 'codex', command: 'codex', name: 'Codex CLI', npm: '@openai/codex' });
437
434
  }
438
435
 
439
436
  if (cliToolsToCheck.length > 0) {
@@ -486,8 +483,8 @@ async function main() {
486
483
  // Show post-install instructions
487
484
  if (tool.ide === 'claude') {
488
485
  console.log(chalk.gray(' Run `claude` to authenticate with your Anthropic account'));
489
- } else if (tool.ide === 'gemini') {
490
- console.log(chalk.gray(' Run `gemini` to authenticate with your Google account'));
486
+ } else if (tool.ide === 'codex') {
487
+ console.log(chalk.gray(' Run `codex` to authenticate with your OpenAI account'));
491
488
  }
492
489
  } catch (error) {
493
490
  console.log(chalk.red('✗') + ` Failed to install ${tool.name}: ${error.message}`);
@@ -556,10 +553,7 @@ async function main() {
556
553
 
557
554
  const ideRulesMap = {
558
555
  claude: { source: 'claude-rules.md', target: '.claude/CLAUDE.md' },
559
- cursor: { source: 'cursor-rules.md', target: '.cursor/rules.md' },
560
- gemini: { source: 'gemini-rules.md', target: '.gemini/rules.md' },
561
- 'github-copilot': { source: 'copilot-rules.md', target: '.github/chatmodes/sinapse-agent.md' },
562
- antigravity: { source: 'antigravity-rules.md', target: '.antigravity/rules.md' },
556
+ codex: { source: 'codex-rules.md', target: '.codex/instructions.md' },
563
557
  };
564
558
 
565
559
  // Step 1: Copy basic IDE rules files
@@ -652,105 +646,18 @@ See .sinapse-ai/user-guide.md for complete documentation.
652
646
  await setupGlobalStatuslineLegacy(sourceCoreDir);
653
647
  }
654
648
 
655
- // Step 3: Install SINAPSE CORE agents for Cursor
656
- // v4: Agents are in development/ module
649
+ // Step 3: Install SINAPSE CORE agents for Codex CLI
657
650
  // INS-2 Performance: Uses cached agent files list
658
- if (ides.includes('cursor')) {
659
- const cursorRulesTarget = path.join(
651
+ if (ides.includes('codex')) {
652
+ const codexAgentsTarget = path.join(
660
653
  context.projectRoot,
661
- '.cursor',
662
- 'rules',
663
- 'SINAPSE',
654
+ '.codex',
664
655
  'agents'
665
656
  );
666
657
 
667
658
  if (cachedAgentFiles.length > 0) {
668
- await fse.ensureDir(cursorRulesTarget);
669
-
670
- // Convert .md files to .mdc for Cursor (using cached list)
671
- for (const agentFile of cachedAgentFiles) {
672
- const sourcePath = path.join(coreAgentsSource, agentFile);
673
- const targetFileName = agentFile.replace('.md', '.mdc');
674
- const targetPath = path.join(cursorRulesTarget, targetFileName);
675
- await fse.copy(sourcePath, targetPath);
676
- }
677
-
678
- console.log(
679
- chalk.green('✓') + ` Cursor CORE rules installed (${cachedAgentFiles.length} agents)`
680
- );
681
- }
682
-
683
- // Create SINAPSE README for Cursor
684
- const cursorReadme = path.join(context.projectRoot, '.cursor', 'rules', 'SINAPSE', 'README.md');
685
- await fse.ensureDir(path.dirname(cursorReadme));
686
- await fse.writeFile(
687
- cursorReadme,
688
- `# SINAPSE Core Rules
689
-
690
- This directory contains the core SINAPSE-FullStack agent rules for Cursor.
691
-
692
- ## Usage
693
- These rules are automatically loaded by Cursor to provide agent-specific context.
694
-
695
- ## Documentation
696
- See .sinapse-ai/user-guide.md for complete documentation.
697
- `
698
- );
699
- }
700
-
701
- // Step 4: Install SINAPSE CORE agents for other IDEs (Gemini, AntiGravity)
702
- // v4: Agents are in development/ module
703
- // INS-2 Performance: Uses cached agent files list
704
- const otherIdeInstalls = ['gemini', 'antigravity'];
705
- for (const ide of otherIdeInstalls) {
706
- if (ides.includes(ide)) {
707
- const ideRulesDir = ide === 'gemini' ? '.gemini' : `.${ide}`;
708
- const ideRulesTarget = path.join(
709
- context.projectRoot,
710
- ideRulesDir,
711
- 'rules',
712
- 'SINAPSE',
713
- 'agents'
714
- );
715
-
716
- if (cachedAgentFiles.length > 0) {
717
- await fse.ensureDir(ideRulesTarget);
718
-
719
- // Copy agent files (using cached list)
720
- for (const agentFile of cachedAgentFiles) {
721
- const sourcePath = path.join(coreAgentsSource, agentFile);
722
- const targetPath = path.join(ideRulesTarget, agentFile);
723
- await fse.copy(sourcePath, targetPath);
724
- }
725
-
726
- const ideName = ide.charAt(0).toUpperCase() + ide.slice(1);
727
- console.log(
728
- chalk.green('✓') + ` ${ideName} CORE agents installed (${cachedAgentFiles.length} agents)`
729
- );
730
- }
731
- }
732
- }
733
-
734
- // Step 5: Install GitHub Copilot chat modes
735
- // v4: Agents are in development/ module
736
- // INS-2 Performance: Uses cached agent files list
737
- if (ides.includes('github-copilot')) {
738
- const copilotModesDir = path.join(context.projectRoot, '.github', 'chatmodes');
739
-
740
- if (cachedAgentFiles.length > 0) {
741
- await fse.ensureDir(copilotModesDir);
742
-
743
- // Copy agent files (using cached list)
744
- for (const agentFile of cachedAgentFiles) {
745
- const sourcePath = path.join(coreAgentsSource, agentFile);
746
- const agentName = agentFile.replace('.md', '');
747
- const targetPath = path.join(copilotModesDir, `sinapse-${agentName}.md`);
748
- await fse.copy(sourcePath, targetPath);
749
- }
750
-
751
- console.log(
752
- chalk.green('✓') + ` GitHub Copilot chat modes installed (${cachedAgentFiles.length} modes)`
753
- );
659
+ await fse.copy(coreAgentsSource, codexAgentsTarget);
660
+ console.log(chalk.green('✓') + ` Codex CLI CORE agents installed (${cachedAgentFiles.length} agents)`);
754
661
  }
755
662
  }
756
663
  }
@@ -842,7 +749,7 @@ See .sinapse-ai/user-guide.md for complete documentation.
842
749
  for (const squad of selectedSquads) {
843
750
  const targetSquad = path.join(targetSquadsDir, squad);
844
751
 
845
- // INS-2 Performance: Cache squad file lists once per squad (used by Claude, Cursor, etc.)
752
+ // INS-2 Performance: Cache squad file lists once per squad
846
753
  const squadAgentsSource = path.join(targetSquad, 'agents');
847
754
  const squadTasksSource = path.join(targetSquad, 'tasks');
848
755
  const squadReadmeSource = path.join(targetSquad, 'README.md');
@@ -880,35 +787,6 @@ See .sinapse-ai/user-guide.md for complete documentation.
880
787
  }
881
788
  }
882
789
 
883
- // Install squad agents for Cursor
884
- if (ides.includes('cursor') && squadAgentFiles.length > 0) {
885
- const cursorSquadTarget = path.join(
886
- context.projectRoot,
887
- '.cursor',
888
- 'rules',
889
- squad,
890
- 'agents'
891
- );
892
- await fse.ensureDir(cursorSquadTarget);
893
-
894
- // Convert .md files to .mdc for Cursor (using cached list)
895
- for (const agentFile of squadAgentFiles) {
896
- const sourcePath = path.join(squadAgentsSource, agentFile);
897
- const targetFileName = agentFile.replace('.md', '.mdc');
898
- const targetPath = path.join(cursorSquadTarget, targetFileName);
899
- await fse.copy(sourcePath, targetPath);
900
- }
901
-
902
- console.log(chalk.green(' ✓') + ` Cursor ${squad} rules (${squadAgentFiles.length} agents)`);
903
-
904
- // Copy README for Cursor (using cached check)
905
- if (hasSquadReadme) {
906
- await fse.copy(
907
- squadReadmeSource,
908
- path.join(context.projectRoot, '.cursor', 'rules', squad, 'README.md')
909
- );
910
- }
911
- }
912
790
  }
913
791
  }
914
792
  }
@@ -1000,36 +878,10 @@ See .sinapse-ai/user-guide.md for complete documentation.
1000
878
  }
1001
879
  }
1002
880
 
1003
- if (ides.includes('cursor')) {
1004
- console.log(' ' + chalk.dim('.cursor/'));
1005
- console.log(' ' + chalk.dim('├─ rules.md') + ' - Main configuration');
1006
- console.log(' ' + chalk.dim('└─ rules/'));
1007
- console.log(' ' + chalk.dim(' ├─ SINAPSE/') + ' - Core agent rules');
1008
- if (selectedSquads && selectedSquads.length > 0) {
1009
- selectedSquads.forEach((squad) => {
1010
- console.log(' ' + chalk.dim(` └─ ${squad}/`) + ' - Squad rules');
1011
- });
1012
- }
1013
- }
1014
-
1015
- // Show other IDE installations
1016
- const otherInstalledIdes = ['gemini', 'antigravity'].filter((ide) =>
1017
- ides.includes(ide)
1018
- );
1019
- for (const ide of otherInstalledIdes) {
1020
- const ideDir = ide === 'gemini' ? '.gemini' : `.${ide}`;
1021
- console.log(
1022
- ' ' +
1023
- chalk.dim(`${ideDir}/`) +
1024
- ' - ' +
1025
- ide.charAt(0).toUpperCase() +
1026
- ide.slice(1) +
1027
- ' configuration'
1028
- );
1029
- }
1030
-
1031
- if (ides.includes('github-copilot')) {
1032
- console.log(' ' + chalk.dim('.github/chatmodes/') + ' - GitHub Copilot agent modes');
881
+ if (ides.includes('codex')) {
882
+ console.log(' ' + chalk.dim('.codex/'));
883
+ console.log(' ' + chalk.dim('├─ instructions.md') + ' - Main configuration');
884
+ console.log(' ' + chalk.dim('└─ agents/') + ' - Agent definitions');
1033
885
  }
1034
886
 
1035
887
  console.log('');
@@ -1041,27 +893,10 @@ See .sinapse-ai/user-guide.md for complete documentation.
1041
893
  console.log(' • Browse: .claude/commands/SINAPSE/agents/ for all available agents');
1042
894
  }
1043
895
 
1044
- if (ides.includes('cursor')) {
1045
- console.log(' ' + chalk.yellow('Cursor:'));
1046
- console.log(' • Agent rules auto-loaded from .cursor/rules/');
1047
- console.log(' • Use @agent-name to activate agents in chat');
1048
- }
1049
-
1050
- if (ides.includes('gemini')) {
1051
- console.log(' ' + chalk.yellow('Gemini CLI:'));
1052
- console.log(' • Include agent context in your prompts');
1053
- }
1054
-
1055
- if (ides.includes('github-copilot')) {
1056
- console.log(' ' + chalk.yellow('GitHub Copilot:'));
1057
- console.log(' • Open Chat view and select Agent mode');
1058
- console.log(' • Requires VS Code 1.101+ with chat.agent.enabled: true');
1059
- }
1060
-
1061
- if (ides.includes('antigravity')) {
1062
- console.log(' ' + chalk.yellow('AntiGravity:'));
1063
- console.log(' • Use Workspace Rules to activate agents');
1064
- console.log(' • Browse: .antigravity/rules/SINAPSE/agents/ for all available agents');
896
+ if (ides.includes('codex')) {
897
+ console.log(' ' + chalk.yellow('Codex CLI:'));
898
+ console.log(' • Use /skills to list all available agents');
899
+ console.log(' • Activate with sinapse-<agent-name> (e.g. sinapse-dev)');
1065
900
  }
1066
901
 
1067
902
  console.log(' ' + chalk.yellow('General:'));