sinapse-ai 1.25.0 → 1.25.1
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/settings.json +170 -0
- package/.codex/catalog.json +1 -1
- package/.codex/scripts/sinapse-codex.js +0 -5
- package/.codex/scripts/sync-codex-native.js +4 -37
- package/.codex/scripts/validate-codex-native.js +13 -23
- package/.codex/tasks/onboard-sinapse-codex.md +1 -1
- package/.sinapse-ai/data/entity-registry.yaml +44 -18
- package/.sinapse-ai/install-manifest.yaml +3 -3
- package/CHANGELOG.md +8 -16
- package/bin/cli.js +8 -1
- package/bin/commands/help.js +3 -2
- package/bin/commands/install.js +25 -14
- package/bin/commands/status.js +4 -3
- package/bin/commands/uninstall.js +216 -51
- package/bin/commands/update.js +8 -4
- package/bin/lib/global-provider-adapters.js +73 -10
- package/bin/lib/provider-parity.js +22 -0
- package/bin/postinstall.js +11 -11
- package/docs/framework/codex-parity/codex-integration-process.md +6 -7
- package/docs/framework/codex-parity/codex-native-runtime-v2.md +8 -8
- package/docs/framework/codex-parity/codex-parity-program.md +4 -4
- package/docs/framework/codex-parity/codex-total-parity-orchestration-plan.md +1 -1
- package/docs/guides/codex-config.md +2 -2
- package/docs/guides/development-setup.md +1 -2
- package/docs/guides/ide-integration.md +6 -6
- package/docs/guides/quality-gates.md +2 -2
- package/docs/ide-integration.md +2 -2
- package/docs/installation/faq.md +1 -1
- package/docs/installation/troubleshooting.md +2 -2
- package/docs/installation/v4-quick-start.md +1 -1
- package/docs/pt/contributing.md +1 -1
- package/docs/pt/guides/development-setup.md +1 -2
- package/docs/pt/guides/quality-gates.md +2 -2
- package/docs/pt/ide-integration.md +6 -6
- package/docs/pt/installation/faq.md +1 -1
- package/docs/pt/installation/troubleshooting.md +2 -3
- package/docs/pt/installation/v4-quick-start.md +1 -2
- package/docs/pt/platforms/claude-code.md +4 -4
- package/docs/sinapse-agent-flows/analyst-system.md +1 -1
- package/docs/sinapse-agent-flows/architect-system.md +1 -1
- package/docs/sinapse-agent-flows/data-engineer-system.md +1 -1
- package/docs/sinapse-agent-flows/dev-system.md +1 -1
- package/docs/sinapse-agent-flows/pm-system.md +1 -1
- package/docs/sinapse-agent-flows/qa-system.md +1 -1
- package/docs/sinapse-agent-flows/sm-system.md +1 -1
- package/docs/sinapse-agent-flows/snps-orqx-system.md +1 -1
- package/docs/sinapse-agent-flows/squad-creator-system.md +2 -2
- package/docs/sinapse-agent-flows/ux-design-expert-system.md +1 -1
- package/package.json +21 -16
- package/packages/installer/src/config/ide-configs.js +1 -1
- package/packages/installer/src/installer/sinapse-ai-installer.js +282 -10
- package/packages/installer/src/migrations/legacy-claude-agent-command-hashes.json +36 -0
- package/packages/installer/src/migrations/legacy-codex-native-skill-hashes.json +42 -0
- package/packages/installer/src/updater/index.js +24 -7
- package/packages/installer/src/wizard/ide-config-generator.js +4 -0
- package/packages/installer/src/wizard/index.js +6 -2
- package/scripts/validate-codex-command-registry.js +101 -0
- package/scripts/validate-provider-adapters.js +117 -1
- package/squads/claude-code-mastery/agents/skill-craftsman.md +2 -2
- package/squads/claude-code-mastery/knowledge-base/skill-creation-patterns.md +1 -1
- package/squads/squad-design/agents/ux-designer.md +1 -1
- package/.codex/skills/sinapse/SKILL.md +0 -10
- package/.codex/skills/sinapse-agent/SKILL.md +0 -22
- package/.codex/skills/sinapse-analyst/SKILL.md +0 -29
- package/.codex/skills/sinapse-animations/SKILL.md +0 -28
- package/.codex/skills/sinapse-architect/SKILL.md +0 -31
- package/.codex/skills/sinapse-brand/SKILL.md +0 -28
- package/.codex/skills/sinapse-claude/SKILL.md +0 -28
- package/.codex/skills/sinapse-cloning/SKILL.md +0 -28
- package/.codex/skills/sinapse-commercial/SKILL.md +0 -28
- package/.codex/skills/sinapse-content/SKILL.md +0 -28
- package/.codex/skills/sinapse-copy/SKILL.md +0 -28
- package/.codex/skills/sinapse-council/SKILL.md +0 -28
- package/.codex/skills/sinapse-courses/SKILL.md +0 -28
- package/.codex/skills/sinapse-cyber/SKILL.md +0 -28
- package/.codex/skills/sinapse-data-engineer/SKILL.md +0 -31
- package/.codex/skills/sinapse-design/SKILL.md +0 -28
- package/.codex/skills/sinapse-dev/SKILL.md +0 -31
- package/.codex/skills/sinapse-devops/SKILL.md +0 -31
- package/.codex/skills/sinapse-finance/SKILL.md +0 -28
- package/.codex/skills/sinapse-growth/SKILL.md +0 -28
- package/.codex/skills/sinapse-loop/SKILL.md +0 -35
- package/.codex/skills/sinapse-orqx/SKILL.md +0 -44
- package/.codex/skills/sinapse-paidmedia/SKILL.md +0 -28
- package/.codex/skills/sinapse-pm/SKILL.md +0 -31
- package/.codex/skills/sinapse-po/SKILL.md +0 -31
- package/.codex/skills/sinapse-product/SKILL.md +0 -28
- package/.codex/skills/sinapse-qa/SKILL.md +0 -31
- package/.codex/skills/sinapse-research/SKILL.md +0 -28
- package/.codex/skills/sinapse-sm/SKILL.md +0 -27
- package/.codex/skills/sinapse-spec-driven/SKILL.md +0 -35
- package/.codex/skills/sinapse-squad-creator/SKILL.md +0 -31
- package/.codex/skills/sinapse-storytelling/SKILL.md +0 -28
- package/.codex/skills/sinapse-swarm/SKILL.md +0 -28
- package/.codex/skills/sinapse-ux-design-expert/SKILL.md +0 -24
- package/.codex/skills/snps/SKILL.md +0 -10
- package/.codex/skills/snps-orqx/SKILL.md +0 -10
- /package/{.codex → .agents}/skills/react-bits-frontend/SKILL.md +0 -0
- /package/{.codex → .agents}/skills/react-bits-frontend/agents/openai.yaml +0 -0
- /package/{.codex → .agents}/skills/react-bits-frontend/references/corpus-map.md +0 -0
|
@@ -3,6 +3,22 @@
|
|
|
3
3
|
const fs = require('fs');
|
|
4
4
|
const path = require('path');
|
|
5
5
|
|
|
6
|
+
const NOFOLLOW_READ_FLAGS = fs.constants.O_RDONLY | (fs.constants.O_NOFOLLOW || 0);
|
|
7
|
+
|
|
8
|
+
function readRegularFileNoFollowSync(filePath, encoding = null) {
|
|
9
|
+
let handle;
|
|
10
|
+
try {
|
|
11
|
+
handle = fs.openSync(filePath, NOFOLLOW_READ_FLAGS);
|
|
12
|
+
if (!fs.fstatSync(handle).isFile()) return null;
|
|
13
|
+
return fs.readFileSync(handle, encoding || undefined);
|
|
14
|
+
} catch (error) {
|
|
15
|
+
if (['ENOENT', 'ELOOP', 'EISDIR'].includes(error.code)) return null;
|
|
16
|
+
throw error;
|
|
17
|
+
} finally {
|
|
18
|
+
if (handle !== undefined) fs.closeSync(handle);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
6
22
|
function parseAgentMarkdown(content, fallbackName) {
|
|
7
23
|
const name = content.match(/^name:\s*([^\r\n]+)$/m)?.[1]?.trim() || fallbackName;
|
|
8
24
|
const raw = content.match(/^description:\s*(.+)$/m)?.[1]?.trim() || `SINAPSE ${name} agent`;
|
|
@@ -18,6 +34,15 @@ function renderCodexToml(name, description, instructions) {
|
|
|
18
34
|
].join('\n');
|
|
19
35
|
}
|
|
20
36
|
|
|
37
|
+
function markGlobalAgent(markdown, fileName = '') {
|
|
38
|
+
let content = markdown;
|
|
39
|
+
if (fileName === 'snps-orqx.md') {
|
|
40
|
+
content = content.replace(/^name:\s*snps-orqx\s*$/m, 'name: sinapse-orqx');
|
|
41
|
+
}
|
|
42
|
+
if (content.includes('SINAPSE-MANAGED:global-agent')) return content;
|
|
43
|
+
return `${content.trimEnd()}\n\n<!-- SINAPSE-MANAGED:global-agent -->\n`;
|
|
44
|
+
}
|
|
45
|
+
|
|
21
46
|
function renderGlobalSkill(skillId) {
|
|
22
47
|
const generic = skillId === 'sinapse-agent';
|
|
23
48
|
return [
|
|
@@ -28,7 +53,7 @@ function renderGlobalSkill(skillId) {
|
|
|
28
53
|
'<!-- SINAPSE-MANAGED:global-skill -->', '',
|
|
29
54
|
generic ? '# SINAPSE Global Agent Activator' : '# SINAPSE Global Orchestrator', '',
|
|
30
55
|
generic
|
|
31
|
-
? '
|
|
56
|
+
? 'Resolve the requested ID through the native agent catalog of the active provider; reject unknown IDs without guessing.'
|
|
32
57
|
: 'Resolve this alias to the `sinapse-orqx` custom agent and preserve its delegation-only authority.',
|
|
33
58
|
'Canonical global persona and task sources live under `~/.sinapse/`.',
|
|
34
59
|
'Use native Codex delegation and never start a nested CLI.', '',
|
|
@@ -88,25 +113,63 @@ function writeGlobalSkillIfManaged(skillPath, content) {
|
|
|
88
113
|
}
|
|
89
114
|
}
|
|
90
115
|
|
|
116
|
+
function removeStaleManagedAgents(targetDir, expectedFiles, extension) {
|
|
117
|
+
if (!fs.existsSync(targetDir)) return [];
|
|
118
|
+
const expected = new Set(expectedFiles);
|
|
119
|
+
const removed = [];
|
|
120
|
+
for (const file of fs.readdirSync(targetDir).filter((name) => name.endsWith(extension))) {
|
|
121
|
+
if (expected.has(file)) continue;
|
|
122
|
+
const filePath = path.join(targetDir, file);
|
|
123
|
+
const content = readRegularFileNoFollowSync(filePath, 'utf8');
|
|
124
|
+
if (content === null) continue;
|
|
125
|
+
const explicitlyManaged = content.includes('SINAPSE-MANAGED:global-agent');
|
|
126
|
+
const legacyManaged = content.includes('ACTIVATION-NOTICE: This command activates an agent from sinapse.')
|
|
127
|
+
&& /\.sinapse[\\/]sinapse[\\/]agents[\\/]/.test(content)
|
|
128
|
+
&& content.includes('Load the squad manifest');
|
|
129
|
+
if (!explicitlyManaged && !legacyManaged) continue;
|
|
130
|
+
fs.unlinkSync(filePath);
|
|
131
|
+
removed.push(file);
|
|
132
|
+
}
|
|
133
|
+
return removed;
|
|
134
|
+
}
|
|
135
|
+
|
|
91
136
|
function deliverGlobalProviderAdapters({ llmChoice, home, commandsDir }) {
|
|
92
|
-
|
|
137
|
+
let commandFiles = fs.existsSync(commandsDir)
|
|
93
138
|
? fs.readdirSync(commandsDir).filter((file) => file.endsWith('.md')).sort()
|
|
94
139
|
: [];
|
|
95
|
-
|
|
140
|
+
if (commandFiles.includes('snps-orqx.md')) {
|
|
141
|
+
const aliasFiles = new Set(['sinapse.md', 'sinapse-orqx.md', 'snps.md']);
|
|
142
|
+
commandFiles = commandFiles.filter((file) => !aliasFiles.has(file));
|
|
143
|
+
}
|
|
144
|
+
const written = { claude: [], claudeSkills: [], codex: [], skills: [] };
|
|
96
145
|
|
|
97
146
|
if (llmChoice === 'claude-code' || llmChoice === 'both') {
|
|
98
147
|
const targetDir = path.join(home, '.claude', 'agents');
|
|
99
148
|
fs.mkdirSync(targetDir, { recursive: true });
|
|
149
|
+
removeStaleManagedAgents(targetDir, commandFiles, '.md');
|
|
100
150
|
for (const file of commandFiles) {
|
|
101
|
-
fs.
|
|
151
|
+
const markdown = markGlobalAgent(fs.readFileSync(path.join(commandsDir, file), 'utf8'), file);
|
|
152
|
+
fs.writeFileSync(path.join(targetDir, file), markdown, 'utf8');
|
|
102
153
|
written.claude.push(file);
|
|
103
154
|
}
|
|
155
|
+
const skillsRoot = path.join(home, '.claude', 'skills');
|
|
156
|
+
for (const skillId of ['snps', 'sinapse', 'snps-orqx', 'sinapse-orqx', 'sinapse-agent']) {
|
|
157
|
+
const skillPath = path.join(skillsRoot, skillId, 'SKILL.md');
|
|
158
|
+
if (writeGlobalSkillIfManaged(skillPath, renderGlobalSkill(skillId))) {
|
|
159
|
+
written.claudeSkills.push(skillId);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
104
162
|
}
|
|
105
163
|
if (llmChoice === 'codex' || llmChoice === 'both') {
|
|
106
164
|
const targetDir = path.join(home, '.codex', 'agents');
|
|
107
165
|
fs.mkdirSync(targetDir, { recursive: true });
|
|
166
|
+
removeStaleManagedAgents(
|
|
167
|
+
targetDir,
|
|
168
|
+
commandFiles.map((file) => file.replace(/\.md$/, '.toml')),
|
|
169
|
+
'.toml',
|
|
170
|
+
);
|
|
108
171
|
for (const file of commandFiles) {
|
|
109
|
-
const markdown = fs.readFileSync(path.join(commandsDir, file), 'utf8');
|
|
172
|
+
const markdown = markGlobalAgent(fs.readFileSync(path.join(commandsDir, file), 'utf8'), file);
|
|
110
173
|
const id = file.replace(/\.md$/, '');
|
|
111
174
|
const metadata = parseAgentMarkdown(markdown, id);
|
|
112
175
|
const tomlName = `${id}.toml`;
|
|
@@ -116,7 +179,7 @@ function deliverGlobalProviderAdapters({ llmChoice, home, commandsDir }) {
|
|
|
116
179
|
written.codex.push(tomlName);
|
|
117
180
|
}
|
|
118
181
|
const skillsRoot = path.join(home, '.agents', 'skills');
|
|
119
|
-
for (const skillId of ['snps', 'sinapse', 'snps-orqx', 'sinapse-agent']) {
|
|
182
|
+
for (const skillId of ['snps', 'sinapse', 'snps-orqx', 'sinapse-orqx', 'sinapse-agent']) {
|
|
120
183
|
const skillDir = path.join(skillsRoot, skillId);
|
|
121
184
|
const skillPath = path.join(skillDir, 'SKILL.md');
|
|
122
185
|
if (writeGlobalSkillIfManaged(skillPath, renderGlobalSkill(skillId))) {
|
|
@@ -128,9 +191,9 @@ function deliverGlobalProviderAdapters({ llmChoice, home, commandsDir }) {
|
|
|
128
191
|
}
|
|
129
192
|
|
|
130
193
|
function getGlobalCommandStagingDir({ llmChoice, sinapseHome, claudeCommandsDir }) {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
194
|
+
void llmChoice;
|
|
195
|
+
void claudeCommandsDir;
|
|
196
|
+
return path.join(sinapseHome, '.generated', 'agents');
|
|
134
197
|
}
|
|
135
198
|
|
|
136
|
-
module.exports = { parseAgentMarkdown, renderCodexToml, renderGlobalSkill, writeGlobalSkillIfManaged, deliverGlobalProviderAdapters, getGlobalCommandStagingDir };
|
|
199
|
+
module.exports = { parseAgentMarkdown, renderCodexToml, markGlobalAgent, renderGlobalSkill, writeGlobalSkillIfManaged, removeStaleManagedAgents, deliverGlobalProviderAdapters, getGlobalCommandStagingDir };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
function assertProviderAdapterParity(llmChoice, adapters, canonicalCount) {
|
|
4
|
+
if (!['claude-code', 'codex', 'both'].includes(llmChoice)) {
|
|
5
|
+
throw new Error(`Invalid LLM choice for provider parity: ${llmChoice}`);
|
|
6
|
+
}
|
|
7
|
+
const providerCounts = [];
|
|
8
|
+
if (llmChoice === 'claude-code' || llmChoice === 'both') {
|
|
9
|
+
providerCounts.push(['Claude Code', adapters.claude.length]);
|
|
10
|
+
}
|
|
11
|
+
if (llmChoice === 'codex' || llmChoice === 'both') {
|
|
12
|
+
providerCounts.push(['Codex', adapters.codex.length]);
|
|
13
|
+
}
|
|
14
|
+
const divergent = providerCounts.filter(([, count]) => count !== canonicalCount);
|
|
15
|
+
if (divergent.length) {
|
|
16
|
+
const details = divergent.map(([provider, count]) => `${provider}: ${count}/${canonicalCount}`).join(', ');
|
|
17
|
+
throw new Error(`Provider adapter parity failed (${details})`);
|
|
18
|
+
}
|
|
19
|
+
return canonicalCount;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
module.exports = { assertProviderAdapterParity };
|
package/bin/postinstall.js
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
*
|
|
18
18
|
* Execution order (see Story A.1 AC 4):
|
|
19
19
|
* 1. env guard (SINAPSE_SKIP_POSTINSTALL / CI)
|
|
20
|
-
* 2. npm run sync:
|
|
20
|
+
* 2. npm run sync:providers
|
|
21
21
|
* 3. mkdir -p .sinapse/handoffs
|
|
22
22
|
* 4. mkdir -p .sinapse/scratchpad
|
|
23
23
|
* 5. sinapse doctor --quiet (exit code 2 = abort, 0/1 = OK)
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
*
|
|
31
31
|
* Exit codes:
|
|
32
32
|
* 0 success OR non-critical warning (framework operational)
|
|
33
|
-
* 2 critical failure (sync
|
|
33
|
+
* 2 critical failure (provider sync failed, or doctor exit >= 2)
|
|
34
34
|
*
|
|
35
35
|
* Note: exit 1 is NOT used. npm treats any non-zero postinstall exit as
|
|
36
36
|
* `command failed`, which scares users when the install is actually operational.
|
|
@@ -273,7 +273,7 @@ function run(command, args, opts = {}) {
|
|
|
273
273
|
* Detect if we're running inside a global npm install.
|
|
274
274
|
* Global installs land in /usr/local/lib/node_modules (Mac/Linux) or
|
|
275
275
|
* %APPDATA%\npm\node_modules (Windows). Agent sync to those paths is pointless
|
|
276
|
-
* — sync:
|
|
276
|
+
* — sync:providers must run inside a real project (per-project install).
|
|
277
277
|
*/
|
|
278
278
|
function isGlobalInstall() {
|
|
279
279
|
if (process.env.npm_config_global === 'true') return true;
|
|
@@ -287,8 +287,8 @@ function isGlobalInstall() {
|
|
|
287
287
|
}
|
|
288
288
|
|
|
289
289
|
/**
|
|
290
|
-
* Step 1:
|
|
291
|
-
*
|
|
290
|
+
* Step 1: synchronize native Claude and Codex provider adapters.
|
|
291
|
+
* Writes Claude agents to .claude/agents and Codex skills to .agents/skills.
|
|
292
292
|
*
|
|
293
293
|
* Skipped on global installs (no project to sync to). EACCES is treated as a
|
|
294
294
|
* non-critical warning — the user can run `sinapse install` inside their project
|
|
@@ -296,17 +296,17 @@ function isGlobalInstall() {
|
|
|
296
296
|
*/
|
|
297
297
|
function stepSyncIde() {
|
|
298
298
|
if (isGlobalInstall()) {
|
|
299
|
-
verboseLog(`${c.dim}sync:
|
|
299
|
+
verboseLog(`${c.dim}sync:providers pulado (install global — rode 'sinapse install' no seu projeto)${c.reset}`);
|
|
300
300
|
return { ok: true, critical: false, skipped: true };
|
|
301
301
|
}
|
|
302
|
-
verboseLog(`${c.cyan}›${c.reset} Sincronizando
|
|
303
|
-
const result = run('npm', ['run', 'sync:
|
|
302
|
+
verboseLog(`${c.cyan}›${c.reset} Sincronizando adapters para Claude Code e Codex...`);
|
|
303
|
+
const result = run('npm', ['run', 'sync:providers', '--silent']);
|
|
304
304
|
if (result.error) {
|
|
305
305
|
if (result.error.code === 'EACCES' || result.error.code === 'EPERM') {
|
|
306
306
|
warn("Sem permissão pra sincronizar agents. Rode 'sinapse install' dentro do seu projeto.");
|
|
307
307
|
return { ok: false, critical: false };
|
|
308
308
|
}
|
|
309
|
-
warn(`sync:
|
|
309
|
+
warn(`sync:providers falhou ao iniciar: ${result.error.message} — rode 'sinapse install' no projeto pra completar.`);
|
|
310
310
|
return { ok: false, critical: false };
|
|
311
311
|
}
|
|
312
312
|
if (result.status !== 0) {
|
|
@@ -315,7 +315,7 @@ function stepSyncIde() {
|
|
|
315
315
|
warn("Sem permissão pra sincronizar agents (npm global sem write). Rode 'sinapse install' no seu projeto.");
|
|
316
316
|
return { ok: false, critical: false };
|
|
317
317
|
}
|
|
318
|
-
warn(`sync:
|
|
318
|
+
warn(`sync:providers saiu com código ${result.status} — rode 'sinapse install' no projeto pra completar.`);
|
|
319
319
|
return { ok: false, critical: false };
|
|
320
320
|
}
|
|
321
321
|
verboseLog(`${c.green}✓${c.reset} Agents sincronizados`);
|
|
@@ -380,7 +380,7 @@ function stepGenerateSynapse() {
|
|
|
380
380
|
return { ok: true, critical: false, skipped: true };
|
|
381
381
|
}
|
|
382
382
|
// Run in-process (not a subprocess) — faster, and keeps the shared run()
|
|
383
|
-
// sequence (sync:
|
|
383
|
+
// sequence (sync:providers → doctor) intact for callers/tests. The wrapper's
|
|
384
384
|
// generate() is tolerant and never throws; preserve our own exit code since
|
|
385
385
|
// the underlying generator sets process.exitCode=1 on a miss.
|
|
386
386
|
const savedExit = process.exitCode;
|
|
@@ -9,7 +9,7 @@ O Codex hoje e alvo de primeira classe no SINAPSE:
|
|
|
9
9
|
|
|
10
10
|
- `AGENTS.md` como contrato operacional do projeto no Codex
|
|
11
11
|
- suporte oficial no installer/sync (`codex` em `ide-configs`)
|
|
12
|
-
- skills nativas via `.
|
|
12
|
+
- skills nativas via `.agents/skills` com estrategia local-first e raiz unica
|
|
13
13
|
- pipeline canonico de greeting/ativacao compartilhado
|
|
14
14
|
- validadores dedicados para detectar drift rapidamente
|
|
15
15
|
- suporte a notify command e hooks de ferramenta em releases recentes do Codex CLI
|
|
@@ -44,7 +44,7 @@ Regra prática para iniciantes:
|
|
|
44
44
|
### Artefatos Codex no projeto
|
|
45
45
|
|
|
46
46
|
- Agentes auxiliares: `.codex/agents/`
|
|
47
|
-
- Skills locais: `.
|
|
47
|
+
- Skills locais: `.agents/skills/sinapse-*/SKILL.md`
|
|
48
48
|
|
|
49
49
|
## Fluxo Operacional Recomendado
|
|
50
50
|
|
|
@@ -65,8 +65,8 @@ Fallback: atalhos definidos em `AGENTS.md` (`@architect`, `/architect`, etc.).
|
|
|
65
65
|
|
|
66
66
|
Este repositorio usa local-first para skills:
|
|
67
67
|
|
|
68
|
-
- preferir `.
|
|
69
|
-
-
|
|
68
|
+
- preferir `.agents/skills` versionado no projeto
|
|
69
|
+
- nao gerar espelhos SINAPSE em `.codex/skills` ou `~/.codex/skills`
|
|
70
70
|
- usar `npm run sync:skills:codex:global` apenas quando quiser instalacao global explicitamente
|
|
71
71
|
|
|
72
72
|
Isso evita menu duplicado no `/skills` e reduz drift entre equipe/CI.
|
|
@@ -97,7 +97,7 @@ Criterio de sucesso:
|
|
|
97
97
|
|
|
98
98
|
- `AGENTS.md` presente e coerente
|
|
99
99
|
- `.codex/agents/*.md` existente
|
|
100
|
-
- `.
|
|
100
|
+
- `.agents/skills/sinapse-*/SKILL.md` existente
|
|
101
101
|
- validadores sem erro
|
|
102
102
|
|
|
103
103
|
## Recursos Recentes do Codex (SINAPSE 4.0)
|
|
@@ -130,7 +130,7 @@ Mitigacao operacional no SINAPSE:
|
|
|
130
130
|
### Skills duplicadas no `/skills`
|
|
131
131
|
|
|
132
132
|
Causa tipica:
|
|
133
|
-
- artefatos duplicados entre
|
|
133
|
+
- artefatos SINAPSE duplicados entre raizes de skills descobertas pelo Codex
|
|
134
134
|
|
|
135
135
|
Correcao:
|
|
136
136
|
- manter local-first neste repo
|
|
@@ -168,4 +168,3 @@ Se houver divergencia entre estes documentos, a ordem de verdade para operacao d
|
|
|
168
168
|
2. scripts reais em `package.json`
|
|
169
169
|
3. este documento
|
|
170
170
|
4. docs de overview
|
|
171
|
-
|
|
@@ -20,9 +20,9 @@ $sinapse-agent meta-ads-specialist
|
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
`.codex/catalog.json` is the registry for this Codex activation surface. The
|
|
23
|
-
native `.agents/skills` tree is
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
native `.agents/skills` tree is the single Codex discovery surface. Clean
|
|
24
|
+
installs and upgrades remove byte-identical legacy mirrors and quarantine
|
|
25
|
+
divergent managed copies outside discovered skill roots without deleting them.
|
|
26
26
|
|
|
27
27
|
The default tier deliberately exposes aliases, core agents, orchestrators and
|
|
28
28
|
the parametric activator, not one selector entry per specialist. Users who need
|
|
@@ -89,9 +89,9 @@ Current Codex skill entrypoints live under `.agents/skills/`:
|
|
|
89
89
|
- `sinapse-spec-driven` prepares PRD, Epic, Story, Spec, and Plan delivery.
|
|
90
90
|
- `sinapse-loop` runs an explicitly requested bounded correction loop.
|
|
91
91
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
92
|
+
Legacy `.codex/skills/sinapse-*` copies are migration inputs only. They are not
|
|
93
|
+
generated or shipped. `.agents/skills/` is the only active Codex skill root for
|
|
94
|
+
SINAPSE.
|
|
95
95
|
|
|
96
96
|
## Hook and apply_patch bridge
|
|
97
97
|
|
|
@@ -205,8 +205,8 @@ npm run validate:codex-skills
|
|
|
205
205
|
npx jest tests/integration/codex-native-golden-journey.test.js --runInBand
|
|
206
206
|
```
|
|
207
207
|
|
|
208
|
-
`validate:codex-native` checks project TOML, 1:1 native-agent parity,
|
|
209
|
-
|
|
208
|
+
`validate:codex-native` checks project TOML, 1:1 native-agent parity, the unique
|
|
209
|
+
native skill root, command targets, delegation equivalence, hooks, and the
|
|
210
210
|
absence of nested Claude/Codex execution. `validate:codex-sync` runs both the
|
|
211
211
|
legacy synchronization validator and the stricter native validator.
|
|
212
212
|
|
|
@@ -118,7 +118,7 @@ Requirements:
|
|
|
118
118
|
### Codex Skill Export Layer
|
|
119
119
|
|
|
120
120
|
Purpose:
|
|
121
|
-
Generate `.
|
|
121
|
+
Generate `.agents/skills` from the real Codex catalog, not from an incomplete upstream subset.
|
|
122
122
|
|
|
123
123
|
Requirements:
|
|
124
124
|
|
|
@@ -222,7 +222,7 @@ Ensure all needed orqx and key framework agents are available through Codex skil
|
|
|
222
222
|
|
|
223
223
|
Focus:
|
|
224
224
|
|
|
225
|
-
- local-first `.
|
|
225
|
+
- local-first `.agents/skills`
|
|
226
226
|
- full orqx coverage
|
|
227
227
|
- clean validation
|
|
228
228
|
- no duplicate global/local skill confusion
|
|
@@ -492,7 +492,7 @@ Map the real Codex catalog, its upstreams, and current drift.
|
|
|
492
492
|
Outputs:
|
|
493
493
|
|
|
494
494
|
- inventory of `.codex/agents`
|
|
495
|
-
- inventory of `.
|
|
495
|
+
- inventory of `.agents/skills`
|
|
496
496
|
- inventory of canonical sync sources
|
|
497
497
|
- gap matrix between exported Codex artifacts and official sync assumptions
|
|
498
498
|
|
|
@@ -526,7 +526,7 @@ Outputs:
|
|
|
526
526
|
|
|
527
527
|
- skill coverage matrix
|
|
528
528
|
- export rules for orqx and core agents
|
|
529
|
-
- clean local-first `.
|
|
529
|
+
- clean local-first `.agents/skills` state
|
|
530
530
|
|
|
531
531
|
Success checks:
|
|
532
532
|
|
|
@@ -252,7 +252,7 @@ Mitigation:
|
|
|
252
252
|
### Risk 2 - Catalog/Skill Drift
|
|
253
253
|
|
|
254
254
|
Risk:
|
|
255
|
-
Expanded `.codex/agents`, `.
|
|
255
|
+
Expanded `.codex/agents`, `.agents/skills`, and command/delegation registries can drift apart.
|
|
256
256
|
|
|
257
257
|
Mitigation:
|
|
258
258
|
|
|
@@ -48,7 +48,7 @@ npm test
|
|
|
48
48
|
- Validar command/task registry do Codex: `npm run validate:codex-commands`
|
|
49
49
|
- Validar matriz de delegacao do Codex: `npm run validate:codex-delegation`
|
|
50
50
|
- Gerar skills locais do Codex: `npm run sync:skills:codex`
|
|
51
|
-
- Este repositorio usa **local-first**:
|
|
51
|
+
- Este repositorio usa **local-first**: `.agents/skills` e a unica raiz de skills SINAPSE versionada no projeto
|
|
52
52
|
- Use `sync:skills:codex:global` apenas para testes fora deste repo
|
|
53
53
|
|
|
54
54
|
## Command Resolution (Codex)
|
|
@@ -77,7 +77,7 @@ No Codex, nao trate handoffs exploratorios como se fossem caminhos garantidos pe
|
|
|
77
77
|
## Agent Shortcuts (Codex)
|
|
78
78
|
|
|
79
79
|
Preferencia de ativacao no Codex CLI:
|
|
80
|
-
1. Use `/skills` e selecione `sinapse-<agent-id>` vindo de `.
|
|
80
|
+
1. Use `/skills` e selecione `sinapse-<agent-id>` vindo de `.agents/skills` (ex.: `sinapse-architect`)
|
|
81
81
|
2. Se preferir, use os atalhos abaixo (`@architect`, `/architect`, etc.)
|
|
82
82
|
|
|
83
83
|
Quando a mensagem do usuario for um atalho de agente, carregue o arquivo correspondente em `.sinapse-ai/development/agents/` (fallback: `.codex/agents/`), renderize o greeting via `generate-greeting.js` e assuma a persona ate receber `*exit`.
|
|
@@ -225,7 +225,7 @@ sinapse-ai/
|
|
|
225
225
|
│ └── checklists/ # Product checklists
|
|
226
226
|
│
|
|
227
227
|
├── .claude/ # Claude Code configuration
|
|
228
|
-
│ ├──
|
|
228
|
+
│ ├── agents/ # Native Claude agents
|
|
229
229
|
│ ├── hooks/ # Governance hooks
|
|
230
230
|
│ └── rules/ # AI behavior rules
|
|
231
231
|
│
|
|
@@ -1112,4 +1112,3 @@ node --inspect node_modules/.bin/jest
|
|
|
1112
1112
|
|
|
1113
1113
|
_SINAPSE Development Setup Guide v1.0.0_
|
|
1114
1114
|
_Last Updated: 2026-01-29_
|
|
1115
|
-
|
|
@@ -64,7 +64,7 @@ If your goal is to get started as fast as possible:
|
|
|
64
64
|
|
|
65
65
|
```yaml
|
|
66
66
|
config_file: .claude/CLAUDE.md
|
|
67
|
-
agent_folder: .claude/
|
|
67
|
+
agent_folder: .claude/agents
|
|
68
68
|
activation: /agent-name (slash commands)
|
|
69
69
|
format: full-markdown-yaml
|
|
70
70
|
mcp_support: native
|
|
@@ -89,7 +89,7 @@ special_features:
|
|
|
89
89
|
npm run sync:ide
|
|
90
90
|
|
|
91
91
|
# Verify setup
|
|
92
|
-
ls -la .claude/
|
|
92
|
+
ls -la .claude/agents/
|
|
93
93
|
```
|
|
94
94
|
|
|
95
95
|
---
|
|
@@ -102,7 +102,7 @@ ls -la .claude/commands/SINAPSE/agents/
|
|
|
102
102
|
config_file: AGENTS.md
|
|
103
103
|
agent_folder: .codex/agents
|
|
104
104
|
activation: terminal instructions
|
|
105
|
-
skills_folder: .
|
|
105
|
+
skills_folder: .agents/skills (single native source)
|
|
106
106
|
format: markdown
|
|
107
107
|
mcp_support: native via Codex tooling
|
|
108
108
|
special_features:
|
|
@@ -117,7 +117,7 @@ special_features:
|
|
|
117
117
|
|
|
118
118
|
1. Keep `AGENTS.md` at repository root
|
|
119
119
|
2. Run `npm run sync:ide:codex` to sync auxiliary agent files
|
|
120
|
-
3. Run `npm run sync:skills:codex` to generate project-local skills in `.
|
|
120
|
+
3. Run `npm run sync:skills:codex` to generate project-local skills in `.agents/skills`
|
|
121
121
|
4. Use `/skills` and choose `sinapse-architect`, `sinapse-dev`, etc.
|
|
122
122
|
5. Use `npm run sync:skills:codex:global` only when you explicitly want global installation
|
|
123
123
|
|
|
@@ -132,7 +132,7 @@ npm run validate:codex-integration
|
|
|
132
132
|
npm run validate:codex-skills
|
|
133
133
|
|
|
134
134
|
# Verify setup
|
|
135
|
-
ls -la AGENTS.md .codex/agents/ .
|
|
135
|
+
ls -la AGENTS.md .codex/agents/ .agents/skills/
|
|
136
136
|
```
|
|
137
137
|
|
|
138
138
|
---
|
|
@@ -194,7 +194,7 @@ npm run sync:ide
|
|
|
194
194
|
npm run sync:ide:check
|
|
195
195
|
|
|
196
196
|
# Check platform-specific directory
|
|
197
|
-
ls .claude/
|
|
197
|
+
ls .claude/agents/ # Claude Code
|
|
198
198
|
```
|
|
199
199
|
|
|
200
200
|
### Sync Conflicts
|
|
@@ -162,7 +162,7 @@ layer2:
|
|
|
162
162
|
quinn:
|
|
163
163
|
enabled: true
|
|
164
164
|
autoReview: true
|
|
165
|
-
agentPath: '.claude/
|
|
165
|
+
agentPath: '.claude/agents/quality-gate.md'
|
|
166
166
|
severity:
|
|
167
167
|
block: ['CRITICAL']
|
|
168
168
|
warn: ['HIGH', 'MEDIUM']
|
|
@@ -528,7 +528,7 @@ layer2:
|
|
|
528
528
|
quinn:
|
|
529
529
|
enabled: true
|
|
530
530
|
autoReview: true
|
|
531
|
-
agentPath: '.claude/
|
|
531
|
+
agentPath: '.claude/agents/quality-gate.md'
|
|
532
532
|
severity:
|
|
533
533
|
block: [CRITICAL]
|
|
534
534
|
warn: [HIGH, MEDIUM]
|
package/docs/ide-integration.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
| IDE | Status | Instructions File | Delegation | Skills |
|
|
6
6
|
|-----|--------|------------------|------------|--------|
|
|
7
7
|
| Claude Code | Works | `.claude/CLAUDE.md` | `.claude/rules/mandatory-delegation.md` | `.claude/commands/` |
|
|
8
|
-
| Codex CLI |
|
|
8
|
+
| Codex CLI | Native | `AGENTS.md` | `.codex/delegation-matrix.json` | `.agents/skills/` |
|
|
9
9
|
|
|
10
10
|
## Parity Requirements
|
|
11
11
|
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
- instructions.md with agent activation rules
|
|
20
20
|
- Delegation matrix in `.codex/delegation-matrix.json`
|
|
21
21
|
- Delegation parity in `.codex/delegation-parity.json`
|
|
22
|
-
- Skills in `.
|
|
22
|
+
- Skills in `.agents/skills/`
|
|
23
23
|
- Agents in `.codex/agents/`
|
|
24
24
|
|
|
25
25
|
## Cross-IDE Contracts
|
package/docs/installation/faq.md
CHANGED
|
@@ -117,7 +117,7 @@ your-project/
|
|
|
117
117
|
│ └── core-config.yaml # Framework configuration
|
|
118
118
|
│
|
|
119
119
|
├── .claude/ # Claude Code (if selected)
|
|
120
|
-
│ └──
|
|
120
|
+
│ └── agents/ # Native Claude agents
|
|
121
121
|
│
|
|
122
122
|
├── docs/ # Documentation structure
|
|
123
123
|
│ ├── stories/ # Development stories
|
|
@@ -548,7 +548,7 @@ nvm use 16
|
|
|
548
548
|
|
|
549
549
|
```bash
|
|
550
550
|
# Claude Code
|
|
551
|
-
ls .claude/
|
|
551
|
+
ls .claude/agents/
|
|
552
552
|
```
|
|
553
553
|
|
|
554
554
|
3. Check IDE settings allow custom commands
|
|
@@ -566,7 +566,7 @@ nvm use 16
|
|
|
566
566
|
**Solution:**
|
|
567
567
|
|
|
568
568
|
1. Check IDE version is compatible
|
|
569
|
-
2. For Claude Code:
|
|
569
|
+
2. For Claude Code: Native agent files should be in `.claude/agents/`; `.claude/commands/` is only for slash commands
|
|
570
570
|
3. Restart IDE after installation
|
|
571
571
|
|
|
572
572
|
---
|
|
@@ -198,7 +198,7 @@ your-project/
|
|
|
198
198
|
│ ├── integrations/ # PM tool adapters
|
|
199
199
|
│ └── templates/ # Config templates
|
|
200
200
|
├── .claude/ # Claude Code configuration
|
|
201
|
-
│ ├──
|
|
201
|
+
│ ├── agents/ # Native Claude agents
|
|
202
202
|
│ └── rules/ # Agent rules
|
|
203
203
|
├── docs/ # Documentation
|
|
204
204
|
│ └── stories/ # Development stories
|
package/docs/pt/contributing.md
CHANGED
|
@@ -149,7 +149,7 @@ Agents sao personas de IA com expertise e comandos especificos.
|
|
|
149
149
|
> **Cross-IDE parity (Story 10.18)**
|
|
150
150
|
>
|
|
151
151
|
> O diretorio `.sinapse-ai/development/agents/` e a fonte unica de verdade.
|
|
152
|
-
> Ele se espelha automaticamente para `.claude/
|
|
152
|
+
> Ele se espelha automaticamente para `.claude/agents/` e
|
|
153
153
|
> `.codex/agents/` via `npm run sync:ide`. O hook `lint-staged` ja roda o
|
|
154
154
|
> sync quando voce comita um arquivo de agent, mas se voce editar um agent
|
|
155
155
|
> e empurrar sem deixar o lint-staged rodar, o hook `pre-push` BLOQUEIA o
|
|
@@ -225,7 +225,7 @@ sinapse-ai/
|
|
|
225
225
|
│ └── checklists/ # Checklists de produto
|
|
226
226
|
│
|
|
227
227
|
├── .claude/ # Configuração do Claude Code
|
|
228
|
-
│ ├──
|
|
228
|
+
│ ├── agents/ # Agentes nativos do Claude
|
|
229
229
|
│ ├── hooks/ # Hooks de governança
|
|
230
230
|
│ └── rules/ # Regras de comportamento da IA
|
|
231
231
|
│
|
|
@@ -1112,4 +1112,3 @@ node --inspect node_modules/.bin/jest
|
|
|
1112
1112
|
|
|
1113
1113
|
_SINAPSE Development Setup Guide v1.0.0_
|
|
1114
1114
|
_Última Atualização: 2026-01-29_
|
|
1115
|
-
|
|
@@ -168,7 +168,7 @@ layer2:
|
|
|
168
168
|
quinn:
|
|
169
169
|
enabled: true
|
|
170
170
|
autoReview: true
|
|
171
|
-
agentPath: '.claude/
|
|
171
|
+
agentPath: '.claude/agents/quality-gate.md'
|
|
172
172
|
severity:
|
|
173
173
|
block: ['CRITICAL']
|
|
174
174
|
warn: ['HIGH', 'MEDIUM']
|
|
@@ -534,7 +534,7 @@ layer2:
|
|
|
534
534
|
quinn:
|
|
535
535
|
enabled: true
|
|
536
536
|
autoReview: true
|
|
537
|
-
agentPath: '.claude/
|
|
537
|
+
agentPath: '.claude/agents/quality-gate.md'
|
|
538
538
|
severity:
|
|
539
539
|
block: [CRITICAL]
|
|
540
540
|
warn: [HIGH, MEDIUM]
|
|
@@ -61,7 +61,7 @@ O SINAPSE suporta 5 plataformas de desenvolvimento com IA. Escolha a que melhor
|
|
|
61
61
|
|
|
62
62
|
```yaml
|
|
63
63
|
config_file: .claude/CLAUDE.md
|
|
64
|
-
agent_folder: .claude/
|
|
64
|
+
agent_folder: .claude/agents
|
|
65
65
|
activation: /agent-name (slash commands)
|
|
66
66
|
format: full-markdown-yaml
|
|
67
67
|
mcp_support: native
|
|
@@ -86,7 +86,7 @@ special_features:
|
|
|
86
86
|
npm run sync:ide
|
|
87
87
|
|
|
88
88
|
# Verificar configuração
|
|
89
|
-
ls -la .claude/
|
|
89
|
+
ls -la .claude/agents/
|
|
90
90
|
```
|
|
91
91
|
|
|
92
92
|
---
|
|
@@ -99,7 +99,7 @@ ls -la .claude/commands/SINAPSE/agents/
|
|
|
99
99
|
config_file: AGENTS.md
|
|
100
100
|
agent_folder: .codex/agents
|
|
101
101
|
activation: /skills + atalhos AGENTS.md
|
|
102
|
-
skills_folder: .
|
|
102
|
+
skills_folder: .agents/skills (fonte nativa unica)
|
|
103
103
|
format: markdown
|
|
104
104
|
mcp_support: nativo via Codex
|
|
105
105
|
special_features:
|
|
@@ -120,7 +120,7 @@ special_features:
|
|
|
120
120
|
```bash
|
|
121
121
|
npm run sync:ide:codex
|
|
122
122
|
npm run sync:skills:codex
|
|
123
|
-
ls -la AGENTS.md .codex/agents/ .
|
|
123
|
+
ls -la AGENTS.md .codex/agents/ .agents/skills/
|
|
124
124
|
```
|
|
125
125
|
|
|
126
126
|
---
|
|
@@ -298,7 +298,7 @@ npm run sync:ide:check
|
|
|
298
298
|
|
|
299
299
|
# Verificar diretório específico da plataforma
|
|
300
300
|
ls .cursor/rules/ # Para Cursor
|
|
301
|
-
ls .claude/
|
|
301
|
+
ls .claude/agents/ # Para Claude Code
|
|
302
302
|
```
|
|
303
303
|
|
|
304
304
|
### Conflitos de Sincronização
|
|
@@ -367,7 +367,7 @@ cp -r .cursor/rules/ ./rules-backup/
|
|
|
367
367
|
npm run sync:ide
|
|
368
368
|
|
|
369
369
|
# Verificar migração
|
|
370
|
-
diff -r ./rules-backup/ .claude/
|
|
370
|
+
diff -r ./rules-backup/ .claude/agents/
|
|
371
371
|
```
|
|
372
372
|
|
|
373
373
|
### De Claude Code para Cursor
|
|
@@ -125,7 +125,7 @@ your-project/
|
|
|
125
125
|
│ └── core-config.yaml # Configuração do framework
|
|
126
126
|
│
|
|
127
127
|
├── .claude/ # Claude Code (se selecionado)
|
|
128
|
-
│ └──
|
|
128
|
+
│ └── agents/ # Agentes nativos do Claude
|
|
129
129
|
│
|
|
130
130
|
├── .cursor/ # Cursor (se selecionado)
|
|
131
131
|
│ └── rules/ # Regras de agentes
|