sinapse-ai 7.7.1 → 7.7.3
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.
- package/.claude/CLAUDE.md +1 -0
- package/.claude/hooks/enforce-git-push-authority.sh +34 -2
- package/.claude/rules/safe-collaboration.md +173 -0
- package/.sinapse-ai/constitution.md +33 -1
- package/.sinapse-ai/core/doctor/checks/constitution-consistency.js +1 -0
- package/.sinapse-ai/core/health-check/checks/project/constitution-consistency.js +1 -0
- package/.sinapse-ai/data/entity-registry.yaml +785 -796
- package/.sinapse-ai/data/registry-update-log.jsonl +6 -0
- package/.sinapse-ai/infrastructure/templates/safe-collab/CODEOWNERS.template +16 -0
- package/.sinapse-ai/infrastructure/templates/safe-collab/README.md +66 -0
- package/.sinapse-ai/infrastructure/templates/safe-collab/apply.sh +85 -0
- package/.sinapse-ai/infrastructure/templates/safe-collab/parallel-workflow-guide.md +55 -0
- package/.sinapse-ai/infrastructure/templates/safe-collab/pull_request_template.md +11 -0
- package/.sinapse-ai/infrastructure/templates/safe-collab/safe-collaboration-rule.md +93 -0
- package/.sinapse-ai/install-manifest.yaml +35 -11
- package/.sinapse-ai/product/templates/ide-rules/claude-rules.md +1 -0
- package/docs/ORQX-PLAN.md +3 -2
- package/docs/getting-started.md +2 -2
- package/docs/guides/parallel-workflow.md +104 -0
- package/docs/guides/workflows/xref-phase2-templates.md +1 -1
- package/docs/guides/workflows/xref-phase4-infra.md +0 -1
- package/docs/pt/ide-integration.md +15 -45
- package/package.json +1 -1
- package/packages/installer/src/config/templates/core-config-template.js +1 -1
- package/packages/installer/src/wizard/ide-config-generator.js +2 -96
- package/packages/installer/src/wizard/index.js +0 -32
- package/scripts/ensure-manifest.js +9 -0
|
@@ -13,19 +13,19 @@ Guia para integrar o SINAPSE com IDEs e plataformas de desenvolvimento com IA su
|
|
|
13
13
|
|
|
14
14
|
## IDEs Suportadas
|
|
15
15
|
|
|
16
|
-
O SINAPSE suporta
|
|
16
|
+
O SINAPSE suporta 5 plataformas de desenvolvimento com IA. Escolha a que melhor se adapta ao seu fluxo de trabalho.
|
|
17
17
|
|
|
18
18
|
### Tabela de Comparação Rápida
|
|
19
19
|
|
|
20
|
-
| Funcionalidade | Claude Code | Codex CLI | Cursor | Copilot |
|
|
21
|
-
| ---------------------- | :---------: | :-------: | :----: | :-----: |
|
|
22
|
-
| **Ativação de Agente** | /command | /skills | @mention | chat modes |
|
|
23
|
-
| **Suporte MCP** | Native | Native | Config | Config |
|
|
24
|
-
| **Tarefas de Subagente** | Yes | Yes | No | No |
|
|
25
|
-
| **Auto-sync** | Yes | Yes | Yes | Yes |
|
|
26
|
-
| **Sistema de Hooks** | Yes | Limited | No | No |
|
|
27
|
-
| **Skills/Commands** | Native | Native | No | No |
|
|
28
|
-
| **Recomendação** | Best | Best | Best | Good |
|
|
20
|
+
| Funcionalidade | Claude Code | Codex CLI | Cursor | Copilot | Gemini CLI |
|
|
21
|
+
| ---------------------- | :---------: | :-------: | :----: | :-----: | :--------: |
|
|
22
|
+
| **Ativação de Agente** | /command | /skills | @mention | chat modes | prompt mention |
|
|
23
|
+
| **Suporte MCP** | Native | Native | Config | Config | Native |
|
|
24
|
+
| **Tarefas de Subagente** | Yes | Yes | No | No | No |
|
|
25
|
+
| **Auto-sync** | Yes | Yes | Yes | Yes | Yes |
|
|
26
|
+
| **Sistema de Hooks** | Yes | Limited | No | No | Yes |
|
|
27
|
+
| **Skills/Commands** | Native | Native | No | No | Native |
|
|
28
|
+
| **Recomendação** | Best | Best | Best | Good | Good |
|
|
29
29
|
|
|
30
30
|
### Paridade de Hooks e Impacto Funcional
|
|
31
31
|
|
|
@@ -36,17 +36,17 @@ O SINAPSE suporta 6 plataformas de desenvolvimento com IA. Escolha a que melhor
|
|
|
36
36
|
| Codex CLI | Limitada/parcial | Menor automação de ciclo de sessão e menor enforcement pre/post-tool | `AGENTS.md` + `/skills` + MCP + scripts de sync/validação |
|
|
37
37
|
| Cursor | Sem hooks de ciclo equivalentes | Sem interceptação nativa pre/post-tool e trilha automática mais fraca | Regras sincronizadas + MCP + disciplina de workflow |
|
|
38
38
|
| GitHub Copilot | Sem hooks de ciclo equivalentes | Mesmo impacto do Cursor, com maior dependência de fluxo manual | Instruções de repo, chat modes e MCP no VS Code |
|
|
39
|
-
|
|
39
|
+
|
|
40
40
|
|
|
41
41
|
### Consequências Práticas por Capacidade
|
|
42
42
|
|
|
43
43
|
- Automação `SessionStart/SessionEnd`:
|
|
44
44
|
- Forte em Claude/Gemini.
|
|
45
|
-
- Parcial ou manual em Codex/Cursor/Copilot
|
|
45
|
+
- Parcial ou manual em Codex/Cursor/Copilot.
|
|
46
46
|
- Guardrails `BeforeTool/AfterTool`:
|
|
47
47
|
- Mais robustos em Claude/Gemini.
|
|
48
48
|
- Limitados no Codex.
|
|
49
|
-
- Predominantemente processuais em Cursor/Copilot
|
|
49
|
+
- Predominantemente processuais em Cursor/Copilot.
|
|
50
50
|
- Riqueza de auditoria e telemetria automáticas:
|
|
51
51
|
- Maior onde há hooks de ciclo de vida.
|
|
52
52
|
- Menor onde a integração é majoritariamente por regras/instruções.
|
|
@@ -209,31 +209,6 @@ cat .github/copilot-instructions.md
|
|
|
209
209
|
|
|
210
210
|
---
|
|
211
211
|
|
|
212
|
-
### AntiGravity
|
|
213
|
-
|
|
214
|
-
**Nível de Recomendação:** Bom (integração com Google)
|
|
215
|
-
|
|
216
|
-
```yaml
|
|
217
|
-
config_file: .antigravity/rules.md
|
|
218
|
-
config_json: .antigravity/antigravity.json
|
|
219
|
-
agent_folder: .agent/workflows
|
|
220
|
-
activation: workflow-based
|
|
221
|
-
format: cursor-style
|
|
222
|
-
mcp_support: native (Google)
|
|
223
|
-
special_features:
|
|
224
|
-
- Google Cloud integration
|
|
225
|
-
- Workflow system
|
|
226
|
-
- Native Firebase tools
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
**Configuração:**
|
|
230
|
-
|
|
231
|
-
1. SINAPSE cria o diretório `.antigravity/`
|
|
232
|
-
2. Configure credenciais do Google Cloud
|
|
233
|
-
3. Agentes sincronizados como workflows
|
|
234
|
-
|
|
235
|
-
---
|
|
236
|
-
|
|
237
212
|
### Gemini CLI
|
|
238
213
|
|
|
239
214
|
**Nível de Recomendação:** Bom
|
|
@@ -268,8 +243,7 @@ O SINAPSE mantém uma única fonte de verdade para definições de agentes e as
|
|
|
268
243
|
│ │ │
|
|
269
244
|
│ ┌───────────┼───────────┐ │
|
|
270
245
|
│ ▼ ▼ ▼ │
|
|
271
|
-
│ .claude/ .codex/ .cursor/
|
|
272
|
-
│ .antigravity/ .gemini/ │
|
|
246
|
+
│ .claude/ .codex/ .cursor/ .gemini/ │
|
|
273
247
|
└─────────────────────────────────────────────────────┘
|
|
274
248
|
```
|
|
275
249
|
|
|
@@ -284,8 +258,6 @@ npm run sync:ide:cursor
|
|
|
284
258
|
npm run sync:ide:codex
|
|
285
259
|
npm run sync:ide:gemini
|
|
286
260
|
npm run sync:ide:github-copilot
|
|
287
|
-
npm run sync:ide:antigravity
|
|
288
|
-
|
|
289
261
|
# Dry run (visualizar mudanças)
|
|
290
262
|
npm run sync:ide -- --dry-run
|
|
291
263
|
|
|
@@ -378,9 +350,7 @@ Você usa Claude/Anthropic API?
|
|
|
378
350
|
└── Não --> Quer uma IDE dedicada com IA?
|
|
379
351
|
├── Sim --> Qual modelo você prefere?
|
|
380
352
|
│ ├── Claude/GPT --> Cursor (IDE com IA mais popular)
|
|
381
|
-
└── Não -->
|
|
382
|
-
├── Sim --> AntiGravity (integração com Google)
|
|
383
|
-
└── Não --> Gemini CLI (Especializados)
|
|
353
|
+
└── Não --> Gemini CLI (Google AI models)
|
|
384
354
|
```
|
|
385
355
|
|
|
386
356
|
---
|
package/package.json
CHANGED
|
@@ -58,7 +58,7 @@ function generateCoreConfig(options = {}) {
|
|
|
58
58
|
gemini: selectedIDEs.includes('gemini'),
|
|
59
59
|
cursor: selectedIDEs.includes('cursor'),
|
|
60
60
|
'github-copilot': selectedIDEs.includes('github-copilot'),
|
|
61
|
-
|
|
61
|
+
|
|
62
62
|
zed: selectedIDEs.includes('zed'),
|
|
63
63
|
'claude-desktop': selectedIDEs.includes('claude-desktop'),
|
|
64
64
|
'claude-code': selectedIDEs.includes('claude-code'),
|
|
@@ -230,9 +230,6 @@ async function copyAgentFiles(projectRoot, agentFolder, ideConfig = null) {
|
|
|
230
230
|
!file.startsWith('test-'), // Exclude test agents
|
|
231
231
|
);
|
|
232
232
|
|
|
233
|
-
// Check if this is AntiGravity - needs workflow files instead of direct copy
|
|
234
|
-
const isAntiGravity = ideConfig && ideConfig.specialConfig && ideConfig.specialConfig.type === 'antigravity';
|
|
235
|
-
|
|
236
233
|
for (const file of agentFiles) {
|
|
237
234
|
const sourcePath = path.join(sourceDir, file);
|
|
238
235
|
const agentName = file.replace('.md', '');
|
|
@@ -240,20 +237,7 @@ async function copyAgentFiles(projectRoot, agentFolder, ideConfig = null) {
|
|
|
240
237
|
// Only copy if source is a file (not directory)
|
|
241
238
|
const stat = await fs.stat(sourcePath);
|
|
242
239
|
if (stat.isFile()) {
|
|
243
|
-
if (
|
|
244
|
-
// For AntiGravity: create workflow activation files
|
|
245
|
-
const workflowContent = generateAntiGravityWorkflow(agentName);
|
|
246
|
-
const targetPath = path.join(targetDir, file);
|
|
247
|
-
await fs.writeFile(targetPath, workflowContent, 'utf8');
|
|
248
|
-
copiedFiles.push(targetPath);
|
|
249
|
-
|
|
250
|
-
// Also copy the actual agent to .antigravity/agents
|
|
251
|
-
const agentsDir = path.join(projectRoot, ideConfig.specialConfig.agentsFolder);
|
|
252
|
-
await fs.ensureDir(agentsDir);
|
|
253
|
-
const agentTargetPath = path.join(agentsDir, file);
|
|
254
|
-
await fs.copy(sourcePath, agentTargetPath);
|
|
255
|
-
copiedFiles.push(agentTargetPath);
|
|
256
|
-
} else if (ideConfig && ideConfig.agentFolder && ideConfig.agentFolder.includes('.github')) {
|
|
240
|
+
if (ideConfig && ideConfig.agentFolder && ideConfig.agentFolder.includes('.github')) {
|
|
257
241
|
// GitHub Copilot: apply transformer for .agent.md format with YAML frontmatter
|
|
258
242
|
try {
|
|
259
243
|
const agentParser = require('../../../../.sinapse-ai/infrastructure/scripts/ide-sync/agent-parser');
|
|
@@ -317,77 +301,6 @@ async function copyClaudeRulesFolder(projectRoot) {
|
|
|
317
301
|
return copiedFiles;
|
|
318
302
|
}
|
|
319
303
|
|
|
320
|
-
/**
|
|
321
|
-
* Generate AntiGravity workflow activation file content
|
|
322
|
-
* @param {string} agentName - Name of the agent (e.g., 'dev', 'architect')
|
|
323
|
-
* @returns {string} Workflow file content
|
|
324
|
-
*/
|
|
325
|
-
function generateAntiGravityWorkflow(agentName) {
|
|
326
|
-
// Capitalize first letter for display
|
|
327
|
-
const displayName = agentName.charAt(0).toUpperCase() + agentName.slice(1);
|
|
328
|
-
|
|
329
|
-
return `---
|
|
330
|
-
description: Ativa o agente ${displayName}
|
|
331
|
-
---
|
|
332
|
-
|
|
333
|
-
# Ativação do Agente ${displayName}
|
|
334
|
-
|
|
335
|
-
**INSTRUÇÕES CRÍTICAS PARA O ANTIGRAVITY:**
|
|
336
|
-
|
|
337
|
-
1. Leia COMPLETAMENTE o arquivo \`.antigravity/agents/${agentName}.md\`
|
|
338
|
-
2. Siga EXATAMENTE as \`activation-instructions\` definidas no bloco YAML do agente
|
|
339
|
-
3. Adote a persona conforme definido no agente
|
|
340
|
-
4. Execute a saudação conforme \`greeting_levels\` definido no agente
|
|
341
|
-
5. **MANTENHA esta persona até receber o comando \`*exit\`**
|
|
342
|
-
6. Responda aos comandos com prefixo \`*\` conforme definido no agente
|
|
343
|
-
7. Siga as regras globais do projeto em \`.antigravity/rules.md\`
|
|
344
|
-
|
|
345
|
-
**Comandos disponíveis:** Use \`*help\` para ver todos os comandos do agente.
|
|
346
|
-
`;
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
/**
|
|
350
|
-
* Create AntiGravity configuration JSON file
|
|
351
|
-
* @param {string} projectRoot - Project root directory
|
|
352
|
-
* @param {Object} ideConfig - AntiGravity IDE config
|
|
353
|
-
* @returns {Promise<string>} Path to created file
|
|
354
|
-
*/
|
|
355
|
-
async function createAntiGravityConfigJson(projectRoot, ideConfig) {
|
|
356
|
-
const configPath = path.join(projectRoot, ideConfig.specialConfig.configJsonPath);
|
|
357
|
-
const projectName = path.basename(projectRoot);
|
|
358
|
-
|
|
359
|
-
const config = {
|
|
360
|
-
version: '1.0',
|
|
361
|
-
project: projectName,
|
|
362
|
-
workspace: projectRoot.replace(/\\/g, '/'),
|
|
363
|
-
agents: {
|
|
364
|
-
enabled: true,
|
|
365
|
-
directory: ideConfig.specialConfig.agentsFolder,
|
|
366
|
-
default: 'sinapse-orqx',
|
|
367
|
-
},
|
|
368
|
-
rules: {
|
|
369
|
-
enabled: true,
|
|
370
|
-
file: ideConfig.configFile,
|
|
371
|
-
},
|
|
372
|
-
features: {
|
|
373
|
-
storyDrivenDevelopment: true,
|
|
374
|
-
agentActivation: true,
|
|
375
|
-
workflowAutomation: true,
|
|
376
|
-
},
|
|
377
|
-
paths: {
|
|
378
|
-
stories: 'docs/stories',
|
|
379
|
-
prd: 'docs/prd',
|
|
380
|
-
architecture: 'docs/architecture',
|
|
381
|
-
tasks: '.sinapse-ai/tasks',
|
|
382
|
-
workflows: '.sinapse-ai/workflows',
|
|
383
|
-
},
|
|
384
|
-
};
|
|
385
|
-
|
|
386
|
-
await fs.ensureDir(path.dirname(configPath));
|
|
387
|
-
await fs.writeFile(configPath, JSON.stringify(config, null, 4), 'utf8');
|
|
388
|
-
|
|
389
|
-
return configPath;
|
|
390
|
-
}
|
|
391
304
|
|
|
392
305
|
/**
|
|
393
306
|
* Generate IDE configuration files
|
|
@@ -514,14 +427,7 @@ async function generateIDEConfigs(selectedIDEs, wizardState, options = {}) {
|
|
|
514
427
|
createdFiles.push(...agentFiles);
|
|
515
428
|
createdFolders.push(path.join(projectRoot, ide.agentFolder));
|
|
516
429
|
|
|
517
|
-
|
|
518
|
-
if (ide.specialConfig && ide.specialConfig.type === 'antigravity') {
|
|
519
|
-
const configJsonPath = await createAntiGravityConfigJson(projectRoot, ide);
|
|
520
|
-
createdFiles.push(configJsonPath);
|
|
521
|
-
spinner.succeed(`Created AntiGravity config and ${agentFiles.length} workflow files`);
|
|
522
|
-
} else {
|
|
523
|
-
spinner.succeed(`Copied ${agentFiles.length} agent files to ${ide.agentFolder}`);
|
|
524
|
-
}
|
|
430
|
+
spinner.succeed(`Copied ${agentFiles.length} agent files to ${ide.agentFolder}`);
|
|
525
431
|
}
|
|
526
432
|
|
|
527
433
|
// For Claude Code, also copy .claude/rules folder, hooks, and settings
|
|
@@ -46,38 +46,6 @@ const {
|
|
|
46
46
|
isLLMRoutingInstalled,
|
|
47
47
|
} = require('../../../../.sinapse-ai/infrastructure/scripts/llm-routing/install-llm-routing');
|
|
48
48
|
|
|
49
|
-
// DISABLED: Legacy installation block superseded by squads flow (OSR-8)
|
|
50
|
-
// /**
|
|
51
|
-
// * Generate AntiGravity workflow content for squad agents
|
|
52
|
-
// * @param {string} agentName - Agent name (e.g., 'data-collector')
|
|
53
|
-
// * @param {string} packName - Starter squad name (e.g., 'etl')
|
|
54
|
-
// * @returns {string} Workflow file content
|
|
55
|
-
// */
|
|
56
|
-
// function generateExpansionPackWorkflow(agentName, packName) {
|
|
57
|
-
// const displayName = agentName.split('-').map(w => w.charAt(0).toUpperCase() + w.slice(1)).join(' ');
|
|
58
|
-
//
|
|
59
|
-
// return `---
|
|
60
|
-
// description: Ativa o agente ${displayName} (${packName})
|
|
61
|
-
// ---
|
|
62
|
-
//
|
|
63
|
-
// # Ativação do Agente ${displayName}
|
|
64
|
-
//
|
|
65
|
-
// **Squad:** ${packName}
|
|
66
|
-
//
|
|
67
|
-
// **INSTRUÇÕES CRÍTICAS PARA O ANTIGRAVITY:**
|
|
68
|
-
//
|
|
69
|
-
// 1. Leia COMPLETAMENTE o arquivo \`.antigravity/agents/${packName}/${agentName}.md\`
|
|
70
|
-
// 2. Siga EXATAMENTE as \`activation-instructions\` definidas no bloco YAML do agente
|
|
71
|
-
// 3. Adote a persona conforme definido no agente
|
|
72
|
-
// 4. Execute a saudação conforme \`greeting_levels\` definido no agente
|
|
73
|
-
// 5. **MANTENHA esta persona até receber o comando \`*exit\`**
|
|
74
|
-
// 6. Responda aos comandos com prefixo \`*\` conforme definido no agente
|
|
75
|
-
// 7. Siga as regras globais do projeto em \`.antigravity/rules.md\`
|
|
76
|
-
//
|
|
77
|
-
// **Comandos disponíveis:** Use \`*help\` para ver todos os comandos do agente.
|
|
78
|
-
// `;
|
|
79
|
-
// }
|
|
80
|
-
|
|
81
49
|
/**
|
|
82
50
|
* Check for existing user_profile in core-config.yaml (Story 10.2 - Idempotency)
|
|
83
51
|
* Returns the existing profile if found, null otherwise
|
|
@@ -37,6 +37,15 @@ async function main() {
|
|
|
37
37
|
return;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
+
// In pre-commit: validate-only to prevent merge conflicts (Art. IX)
|
|
41
|
+
// Regeneration happens via `npm run generate:manifest` or prepublishOnly
|
|
42
|
+
const validateOnly = process.argv.includes('--validate-only');
|
|
43
|
+
|
|
44
|
+
if (validateOnly) {
|
|
45
|
+
console.log('⚠️ manifest: outdated — run `npm run generate:manifest` to update');
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
|
|
40
49
|
console.log('🔄 manifest: outdated, regenerating...');
|
|
41
50
|
const manifest = await generateManifest();
|
|
42
51
|
await writeManifest(manifest);
|