sinapse-ai 1.11.3 → 1.12.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.
- package/.claude/hooks/enforce-architecture-first.cjs +2 -2
- package/.claude/hooks/enforce-delegation.cjs +2 -2
- package/.claude/hooks/enforce-permission-mode.cjs +12 -12
- package/.claude/hooks/enforce-story-gate.cjs +5 -5
- package/.claude/hooks/precompact-session-digest.cjs +2 -2
- package/.claude/hooks/secret-scanning.cjs +6 -6
- package/.claude/hooks/telemetry-post-tool.cjs +0 -1
- package/.claude/hooks/write-path-validation.cjs +2 -2
- package/.sinapse-ai/core/code-intel/helpers/dev-helper.js +1 -1
- package/.sinapse-ai/core/code-intel/helpers/devops-helper.js +0 -1
- package/.sinapse-ai/core/code-intel/helpers/planning-helper.js +1 -1
- package/.sinapse-ai/core/code-intel/helpers/qa-helper.js +2 -2
- package/.sinapse-ai/core/config/template-overrides.js +1 -1
- package/.sinapse-ai/core/doctor/checks/git-hooks.js +6 -3
- package/.sinapse-ai/core/doctor/checks/npm-packages.js +1 -1
- package/.sinapse-ai/core/doctor/checks/rules-files.js +0 -1
- package/.sinapse-ai/core/doctor/index.js +0 -1
- package/.sinapse-ai/core/graph-dashboard/cli.js +1 -1
- package/.sinapse-ai/core/graph-dashboard/data-sources/code-intel-source.js +1 -1
- package/.sinapse-ai/core/health-check/checks/project/constitution-consistency.js +0 -1
- package/.sinapse-ai/core/ideation/ideation-engine.js +0 -2
- package/.sinapse-ai/core/ids/layer-classifier.js +1 -1
- package/.sinapse-ai/core/registry/build-registry.js +12 -2
- package/.sinapse-ai/core/registry/service-registry.json +178 -55
- package/.sinapse-ai/core/registry/squad-agent-resolver.js +6 -0
- package/.sinapse-ai/core/synapse/layers/layer-processor.js +1 -1
- package/.sinapse-ai/data/capability-detection.js +15 -15
- package/.sinapse-ai/data/tok3-token-comparison.js +0 -3
- package/.sinapse-ai/data/tool-search-validation.js +1 -1
- package/.sinapse-ai/development/agents/snps-orqx.md +109 -0
- package/.sinapse-ai/development/scripts/agent-config-loader.js +8 -2
- package/.sinapse-ai/development/templates/sinapse-doc-template.md +6 -6
- package/.sinapse-ai/git-hooks/lib/framework-guard.js +1 -0
- package/.sinapse-ai/git-hooks/lib/staged-protected-files-guard.js +63 -0
- package/.sinapse-ai/git-hooks/pre-commit +3 -1
- package/.sinapse-ai/index.d.ts +19 -0
- package/.sinapse-ai/install-manifest.yaml +59 -55
- package/.sinapse-ai/package.json +0 -1
- package/.sinapse-ai/utils/filters/index.js +2 -1
- package/CHANGELOG.md +31 -2
- package/bin/commands/doctor.js +1 -1
- package/bin/commands/help.js +3 -4
- package/bin/commands/install.js +7 -7
- package/bin/commands/status.js +3 -3
- package/bin/modules/chrome-brain-installer.js +3 -3
- package/bin/postinstall.js +1 -1
- package/bin/sinapse-init.js +11 -9
- package/bin/sinapse.js +1 -1
- package/bin/utils/framework-guard.js +1 -0
- package/bin/utils/staged-protected-files-guard.js +63 -0
- package/package.json +19 -2
- package/packages/installer/src/index.js +1 -1
- package/packages/installer/src/installer/brownfield-upgrader.js +1 -1
- package/packages/installer/src/installer/git-hooks-installer.js +10 -3
- package/packages/installer/src/pro/pro-scaffolder.js +3 -3
- package/packages/installer/src/wizard/ide-config-generator.js +1 -1
- package/packages/installer/src/wizard/index.js +4 -41
- package/scripts/audit-tasks.cjs +1 -1
- package/scripts/package-synapse.js +1 -1
- package/scripts/sinapse-patch.js +31 -31
- package/scripts/sync-squad-yaml-components.js +3 -3
- package/scripts/validate-agents-md.js +1 -1
- package/scripts/validate-no-personal-leaks.js +1 -1
- package/scripts/validate-orqx-discipline.js +0 -2
- package/scripts/validate-package-completeness.js +7 -7
- package/scripts/validate-squad-yaml.js +6 -6
- package/sinapse/agents/sinapse-orqx.md +1 -1
- package/sinapse/agents/snps-orqx.md +110 -1
- package/squads/claude-code-mastery/agents/swarm-orqx.md +12 -11
- package/squads/claude-code-mastery/scripts/validate-setup.js +2 -2
- package/squads/squad-brand/agents/brand-orqx.md +16 -1
- package/squads/squad-cloning/agents/cloning-orqx.md +2 -0
- package/squads/squad-commercial/agents/commercial-orqx.md +7 -4
- package/squads/squad-council/squad.yaml +67 -11
- package/squads/squad-design/agents/design-orqx.md +20 -0
- package/squads/squad-finance/agents/finance-orqx.md +6 -0
- package/squads/squad-paidmedia/agents/paidmedia-orqx.md +3 -1
package/scripts/sinapse-patch.js
CHANGED
|
@@ -159,21 +159,21 @@ r('"Run /status in Claude Code to check your account."',
|
|
|
159
159
|
r(/future Claude Code sessions/g, 'future SINAPSE CODE sessions', 'model switch');
|
|
160
160
|
r(/Claude Code will automatically update/g, 'SINAPSE CODE will automatically update', 'auto-update');
|
|
161
161
|
r('"Please install git and restart Claude Code."', '"Please install git and restart SINAPSE CODE."', 'git install');
|
|
162
|
-
r(
|
|
163
|
-
r(
|
|
164
|
-
r(
|
|
165
|
-
r(
|
|
166
|
-
r(
|
|
167
|
-
r(
|
|
168
|
-
r(
|
|
169
|
-
r(
|
|
170
|
-
r(
|
|
171
|
-
r(
|
|
172
|
-
r(
|
|
173
|
-
r(
|
|
174
|
-
r(
|
|
175
|
-
r(
|
|
176
|
-
r(
|
|
162
|
+
r('Claude is up to date!\n', 'SINAPSE is up to date!\n', 'up to date');
|
|
163
|
+
r('Claude is managed by winget.\n', 'SINAPSE is managed by winget.\n', 'winget');
|
|
164
|
+
r('Claude is managed by apk.\n', 'SINAPSE is managed by apk.\n', 'apk');
|
|
165
|
+
r('Claude is managed by a package manager.\n', 'SINAPSE is managed by a package manager.\n', 'pkg manager');
|
|
166
|
+
r('This tool allows Claude Code to read images', 'This tool allows SINAPSE CODE to read images', 'read tool');
|
|
167
|
+
r('Claude Code is a multimodal LLM', 'SINAPSE CODE is a multimodal LLM', 'multimodal');
|
|
168
|
+
r('Default permission mode when Claude Code needs access', 'Default permission mode when SINAPSE CODE needs access', 'settings 1');
|
|
169
|
+
r('JSON Schema reference for Claude Code settings', 'JSON Schema reference for SINAPSE CODE settings', 'settings 2');
|
|
170
|
+
r('Environment variables to set for Claude Code sessions', 'Environment variables to set for SINAPSE CODE sessions', 'settings 3');
|
|
171
|
+
r('standard Claude Code attribution', 'standard SINAPSE CODE attribution', 'attribution');
|
|
172
|
+
r('Override the default model used by Claude Code', 'Override the default model used by SINAPSE CODE', 'model desc');
|
|
173
|
+
r('Claude Code auto-stash', 'SINAPSE CODE auto-stash', 'git stash');
|
|
174
|
+
r('Claude Code was unable to find', 'SINAPSE CODE was unable to find', 'win bash');
|
|
175
|
+
r('Claude Code on Windows requires git-bash', 'SINAPSE CODE on Windows requires git-bash', 'win git-bash');
|
|
176
|
+
r('Cost of the Claude Code session', 'Cost of the SINAPSE CODE session', 'cost counter');
|
|
177
177
|
|
|
178
178
|
// ═══════════════════════════════════════════════════
|
|
179
179
|
// 4. LOGO — Substitui mascot Clawd por SINAPSE ASCII
|
|
@@ -182,24 +182,24 @@ r("Cost of the Claude Code session", "Cost of the SINAPSE CODE session", 'cost c
|
|
|
182
182
|
console.log('[Logo]');
|
|
183
183
|
|
|
184
184
|
const LOGO_LINES = [
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
185
|
+
'███████╗██╗███╗ ██╗ █████╗ ██████╗ ███████╗███████╗',
|
|
186
|
+
'██╔════╝██║████╗ ██║██╔══██╗██╔══██╗██╔════╝██╔════╝',
|
|
187
|
+
'███████╗██║██╔██╗ ██║███████║██████╔╝███████╗█████╗ ',
|
|
188
|
+
'╚════██║██║██║╚██╗██║██╔══██║██╔═══╝ ╚════██║██╔══╝ ',
|
|
189
|
+
'███████║██║██║ ╚████║██║ ██║██║ ███████║███████╗',
|
|
190
|
+
'╚══════╝╚═╝╚═╝ ╚═══╝╚═╝ ╚═╝╚═╝ ╚══════╝╚══════╝',
|
|
191
191
|
];
|
|
192
192
|
|
|
193
|
-
const newLogo = `function HV6(){let q=z6(2),P;if(q[0]===Symbol.for("react.memo_cache_sentinel")){let lines=[${LOGO_LINES.map(l => JSON.stringify(l)).join(
|
|
193
|
+
const newLogo = `function HV6(){let q=z6(2),P;if(q[0]===Symbol.for("react.memo_cache_sentinel")){let lines=[${LOGO_LINES.map(l => JSON.stringify(l)).join(',')}];P=i9.createElement(B,{flexDirection:"column",flexShrink:0},lines.map((l,i)=>i9.createElement(T,{key:i,color:"claude",wrap:"truncate"},l))),q[0]=P}else P=q[0];return P}`;
|
|
194
194
|
|
|
195
195
|
// Substitui HV6 (componente principal do mascot)
|
|
196
|
-
const hv6Start = content.indexOf(
|
|
196
|
+
const hv6Start = content.indexOf('function HV6(A){');
|
|
197
197
|
if (hv6Start !== -1) {
|
|
198
198
|
const hv6Area = content.substring(hv6Start);
|
|
199
199
|
let depth = 0, endPos = -1;
|
|
200
|
-
for (let i = hv6Area.indexOf(
|
|
201
|
-
if (hv6Area[i] ===
|
|
202
|
-
if (hv6Area[i] ===
|
|
200
|
+
for (let i = hv6Area.indexOf('{'); i < hv6Area.length; i++) {
|
|
201
|
+
if (hv6Area[i] === '{') depth++;
|
|
202
|
+
if (hv6Area[i] === '}') { depth--; if (depth === 0) { endPos = i + 1; break; } }
|
|
203
203
|
}
|
|
204
204
|
if (endPos !== -1) {
|
|
205
205
|
content = content.substring(0, hv6Start) + newLogo + content.substring(hv6Start + endPos);
|
|
@@ -209,16 +209,16 @@ if (hv6Start !== -1) {
|
|
|
209
209
|
}
|
|
210
210
|
|
|
211
211
|
// Substitui dKY (fallback Apple Terminal)
|
|
212
|
-
const dkyStart = content.indexOf(
|
|
212
|
+
const dkyStart = content.indexOf('function dKY(A){');
|
|
213
213
|
if (dkyStart !== -1) {
|
|
214
214
|
const dkyArea = content.substring(dkyStart);
|
|
215
215
|
let depth = 0, endPos = -1;
|
|
216
|
-
for (let i = dkyArea.indexOf(
|
|
217
|
-
if (dkyArea[i] ===
|
|
218
|
-
if (dkyArea[i] ===
|
|
216
|
+
for (let i = dkyArea.indexOf('{'); i < dkyArea.length; i++) {
|
|
217
|
+
if (dkyArea[i] === '{') depth++;
|
|
218
|
+
if (dkyArea[i] === '}') { depth--; if (depth === 0) { endPos = i + 1; break; } }
|
|
219
219
|
}
|
|
220
220
|
if (endPos !== -1) {
|
|
221
|
-
const newDKY = newLogo.replace(
|
|
221
|
+
const newDKY = newLogo.replace('HV6', 'dKY');
|
|
222
222
|
content = content.substring(0, dkyStart) + newDKY + content.substring(dkyStart + endPos);
|
|
223
223
|
changes++;
|
|
224
224
|
console.log(' + dKY fallback -> SINAPSE logo');
|
|
@@ -194,9 +194,9 @@ function run() {
|
|
|
194
194
|
for (const r of results) {
|
|
195
195
|
const marker = r.status === 'updated' ? 'UPDATED'
|
|
196
196
|
: r.status === 'needs-update' ? 'NEEDS UPDATE'
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
197
|
+
: r.status === 'drift' ? 'DRIFT'
|
|
198
|
+
: r.status === 'already-declared' ? 'ok'
|
|
199
|
+
: r.status.toUpperCase();
|
|
200
200
|
console.log(` ${marker.padEnd(14)} ${r.squadName} (${r.changes} agent(s))`);
|
|
201
201
|
if (r.status === 'drift') {
|
|
202
202
|
if (r.declaredOnly.length > 0) {
|
|
@@ -77,7 +77,7 @@ function main() {
|
|
|
77
77
|
if (!fs.existsSync(AGENTS_MD)) fail('AGENTS.md not found at repo root');
|
|
78
78
|
|
|
79
79
|
const stats = readStats();
|
|
80
|
-
|
|
80
|
+
const content = fs.readFileSync(AGENTS_MD, 'utf8');
|
|
81
81
|
|
|
82
82
|
const mismatches = [];
|
|
83
83
|
let fixed = content;
|
|
@@ -95,7 +95,7 @@ const BLOCKED_PATTERNS = [
|
|
|
95
95
|
suggestion: 'Use {REPO_ROOT} placeholder or relative paths',
|
|
96
96
|
},
|
|
97
97
|
{
|
|
98
|
-
pattern: /OneDrive[
|
|
98
|
+
pattern: /OneDrive[\\/].*Caio[ ]?Imori/i,
|
|
99
99
|
description: 'OneDrive path containing maintainer name',
|
|
100
100
|
suggestion: 'Remove or use {VAULT_ROOT} placeholder',
|
|
101
101
|
},
|
|
@@ -112,13 +112,11 @@ function scanFile(filePath) {
|
|
|
112
112
|
function run() {
|
|
113
113
|
const orqxFiles = getTrackedAgents();
|
|
114
114
|
let totalCommands = 0;
|
|
115
|
-
let totalForbidden = 0;
|
|
116
115
|
const allViolations = [];
|
|
117
116
|
|
|
118
117
|
for (const file of orqxFiles) {
|
|
119
118
|
const { commands, violations } = scanFile(file);
|
|
120
119
|
totalCommands += commands.length;
|
|
121
|
-
totalForbidden += violations.length;
|
|
122
120
|
allViolations.push(...violations);
|
|
123
121
|
}
|
|
124
122
|
|
|
@@ -185,20 +185,20 @@ function validateTarballContents(tarballFiles) {
|
|
|
185
185
|
check(
|
|
186
186
|
`Required: ${required}`,
|
|
187
187
|
found,
|
|
188
|
-
found ? undefined : `Not found in tarball (${tarballFiles.length} files scanned)
|
|
188
|
+
found ? undefined : `Not found in tarball (${tarballFiles.length} files scanned)`,
|
|
189
189
|
);
|
|
190
190
|
}
|
|
191
191
|
|
|
192
192
|
// Check excluded paths do NOT exist
|
|
193
193
|
for (const excluded of EXCLUDED_PATHS) {
|
|
194
194
|
const leaked = tarballFiles.filter(
|
|
195
|
-
(f) => f.startsWith(excluded) || f.startsWith(`package/${excluded}`)
|
|
195
|
+
(f) => f.startsWith(excluded) || f.startsWith(`package/${excluded}`),
|
|
196
196
|
);
|
|
197
197
|
|
|
198
198
|
check(
|
|
199
199
|
`Excluded: ${excluded} not in tarball`,
|
|
200
200
|
leaked.length === 0,
|
|
201
|
-
leaked.length > 0 ? `LEAK DETECTED: ${leaked.slice(0, 3).join(', ')}` : undefined
|
|
201
|
+
leaked.length > 0 ? `LEAK DETECTED: ${leaked.slice(0, 3).join(', ')}` : undefined,
|
|
202
202
|
);
|
|
203
203
|
}
|
|
204
204
|
}
|
|
@@ -214,7 +214,7 @@ function validatePackageJson(pkg) {
|
|
|
214
214
|
check(
|
|
215
215
|
`files[] includes "${entry}"`,
|
|
216
216
|
found,
|
|
217
|
-
found ? undefined : `Add "${entry}" to package.json "files" array
|
|
217
|
+
found ? undefined : `Add "${entry}" to package.json "files" array`,
|
|
218
218
|
);
|
|
219
219
|
}
|
|
220
220
|
|
|
@@ -232,7 +232,7 @@ function validatePackageJson(pkg) {
|
|
|
232
232
|
check(
|
|
233
233
|
`bin.${name} -> ${binPath} exists`,
|
|
234
234
|
exists,
|
|
235
|
-
exists ? undefined : `File not found: ${fullPath}
|
|
235
|
+
exists ? undefined : `File not found: ${fullPath}`,
|
|
236
236
|
);
|
|
237
237
|
}
|
|
238
238
|
|
|
@@ -242,7 +242,7 @@ function validatePackageJson(pkg) {
|
|
|
242
242
|
check(
|
|
243
243
|
`dependency: ${dep}`,
|
|
244
244
|
dep in deps,
|
|
245
|
-
dep in deps ? undefined : `Missing runtime dependency "${dep}"
|
|
245
|
+
dep in deps ? undefined : `Missing runtime dependency "${dep}"`,
|
|
246
246
|
);
|
|
247
247
|
}
|
|
248
248
|
}
|
|
@@ -267,7 +267,7 @@ function validateBinScripts() {
|
|
|
267
267
|
check(
|
|
268
268
|
`${name} (${binPath}) has correct shebang`,
|
|
269
269
|
hasShebang,
|
|
270
|
-
hasShebang ? undefined : `Expected "#!/usr/bin/env node", got "${firstLine.substring(0, 40)}"
|
|
270
|
+
hasShebang ? undefined : `Expected "#!/usr/bin/env node", got "${firstLine.substring(0, 40)}"`,
|
|
271
271
|
);
|
|
272
272
|
}
|
|
273
273
|
}
|
|
@@ -87,8 +87,8 @@ function validateOne(squadName, schema, validator) {
|
|
|
87
87
|
squadName,
|
|
88
88
|
status: 'fail',
|
|
89
89
|
errors: [
|
|
90
|
-
'Legacy nested format detected (top-level `squad:` wrapper). Migrate to flat schema: fields at root level.'
|
|
91
|
-
]
|
|
90
|
+
'Legacy nested format detected (top-level `squad:` wrapper). Migrate to flat schema: fields at root level.',
|
|
91
|
+
],
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
94
|
const ok = validator(doc);
|
|
@@ -96,7 +96,7 @@ function validateOne(squadName, schema, validator) {
|
|
|
96
96
|
return {
|
|
97
97
|
squadName,
|
|
98
98
|
status: 'fail',
|
|
99
|
-
errors: (validator.errors || []).map((e) => `${e.instancePath || '/'} ${e.message}`)
|
|
99
|
+
errors: (validator.errors || []).map((e) => `${e.instancePath || '/'} ${e.message}`),
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
102
|
|
|
@@ -139,9 +139,9 @@ function main() {
|
|
|
139
139
|
for (const r of results) {
|
|
140
140
|
const tag =
|
|
141
141
|
r.status === 'ok' ? '\x1b[32mok\x1b[0m' :
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
142
|
+
r.status === 'warn' ? '\x1b[33mwarn\x1b[0m' :
|
|
143
|
+
r.status === 'missing' ? '\x1b[33mmissing\x1b[0m' :
|
|
144
|
+
'\x1b[31mfail\x1b[0m';
|
|
145
145
|
console.log(` ${tag.padEnd(20)} ${r.squadName}`);
|
|
146
146
|
for (const e of r.errors || []) console.log(` - ${e}`);
|
|
147
147
|
if (!STRICT) {
|
|
@@ -27,7 +27,7 @@ Then display:
|
|
|
27
27
|
AI Agent Squads for Claude Code
|
|
28
28
|
17 squads · 172 agents · 1,200 tasks
|
|
29
29
|
|
|
30
|
-
👑 Imperator — Sinapse Master activated
|
|
30
|
+
👑 [Imperator] — Sinapse Master activated
|
|
31
31
|
|
|
32
32
|
Describe your goal and I'll diagnose the domain
|
|
33
33
|
and route to the right agent.
|
|
@@ -27,7 +27,7 @@ Then display:
|
|
|
27
27
|
AI Agent Squads for Claude Code
|
|
28
28
|
17 squads · 172 agents · 1,200 tasks
|
|
29
29
|
|
|
30
|
-
👑 Imperator — Sinapse Master activated
|
|
30
|
+
👑 [Imperator] — Sinapse Master activated
|
|
31
31
|
|
|
32
32
|
Describe your goal and I'll diagnose the domain
|
|
33
33
|
and route to the right agent.
|
|
@@ -44,9 +44,102 @@ After the greeting, check if the user already provided briefing/context with the
|
|
|
44
44
|
|
|
45
45
|
If the user asks about SINAPSE, how it works, or how to use it, execute the `*onboard` task from `tasks/onboard-user.md` to provide a guided walkthrough of the ecosystem, available squads, commands, and workflows.
|
|
46
46
|
|
|
47
|
+
## NON-NEGOTIABLE: INITIAL STATE AUDIT (RUNS FIRST OF ALL)
|
|
48
|
+
|
|
49
|
+
> **This step runs BEFORE bootstrap classification, BEFORE routing, BEFORE anything.**
|
|
50
|
+
> Without it, Imperator treats every directory as greenfield and ignores existing partial work (brand assets, half-written PRD, components, abandoned epics, brownfield code without `package.json`).
|
|
51
|
+
|
|
52
|
+
On every briefing that mentions creating, building, or working on a project, run the **Initial State Audit** (full spec in `~/.claude/rules/project-intelligence.md` § Initial State Audit):
|
|
53
|
+
|
|
54
|
+
1. Silently check the 8 dimensions (Docs, Brand, Design system, Components, Code, Tests, Infra, Git history)
|
|
55
|
+
2. Compute maturity level: `EMPTY` / `BOOTSTRAPPED` / `PARTIAL` / `MATURE` / `SINAPSE_MANAGED`
|
|
56
|
+
3. **Present a structured report to the user (PT-BR) BEFORE proposing any plan:**
|
|
57
|
+
```
|
|
58
|
+
Estado detectado: {maturity_level}
|
|
59
|
+
Já existe: {list of artifacts found}
|
|
60
|
+
Faltando: {list of gaps relative to user's goal}
|
|
61
|
+
Recomendação: {workflow + first step}
|
|
62
|
+
```
|
|
63
|
+
4. Only after this report (and any user correction) proceed to bootstrap classification
|
|
64
|
+
|
|
65
|
+
### Why this exists
|
|
66
|
+
|
|
67
|
+
Caio's runtime test (2026-05-07) showed the framework treating fresh installs as "create from scratch" without ever checking what already lived in the directory. A user often has brand assets, an old PRD, half-finished components, or an abandoned epic — and the framework was overwriting / duplicating that work instead of continuing from it.
|
|
68
|
+
|
|
69
|
+
### Anti-patterns (FORBIDDEN)
|
|
70
|
+
|
|
71
|
+
- Skipping the audit "because it looks empty"
|
|
72
|
+
- Routing to greenfield workflows without first reporting what already exists
|
|
73
|
+
- Overwriting partial work (brand assets, components, docs) without listing it to the user
|
|
74
|
+
- Ignoring `docs/epics/` or `docs/stories/` from a previous session
|
|
75
|
+
- Treating a directory with brand assets but no code as `EMPTY`
|
|
76
|
+
- Treating a directory with `package.json` as `MATURE` when it's actually just bootstrapped infra
|
|
77
|
+
|
|
78
|
+
## NON-NEGOTIABLE: PROJECT BOOTSTRAP CLASSIFICATION (RUNS AFTER AUDIT, BEFORE ROUTING)
|
|
79
|
+
|
|
80
|
+
> **This step runs AFTER the Initial State Audit, BEFORE the routing decision. No exceptions.**
|
|
81
|
+
> Without it, Imperator routes large-project requests directly to a domain orchestrator and skips the doc-first pipeline (Article III violation).
|
|
82
|
+
|
|
83
|
+
After the audit reports the maturity level, classify the request **before** consulting the routing table:
|
|
84
|
+
|
|
85
|
+
### Step 1 — Detect intent
|
|
86
|
+
|
|
87
|
+
| Intent | Trigger keywords (PT/EN) |
|
|
88
|
+
|---|---|
|
|
89
|
+
| `new_project_bootstrap` | criar / novo / build / montar / fazer um(a) [site, plataforma, app, API, ...] |
|
|
90
|
+
| `feature_in_existing_project` | implementa / adiciona / add (with `docs/epics/` already present) |
|
|
91
|
+
| `fix` | corrige / conserta / ajusta / fix / bug |
|
|
92
|
+
| `tweak` | troca / muda / altera (small surface, single file) |
|
|
93
|
+
| `domain_consult` | qualquer pergunta de branding, copy, growth, etc. (no code change implied) |
|
|
94
|
+
|
|
95
|
+
### Step 2 — If `new_project_bootstrap`, sub-classify project_type
|
|
96
|
+
|
|
97
|
+
| project_type | Triggers | Required workflow |
|
|
98
|
+
|---|---|---|
|
|
99
|
+
| `site` | site, website, institutional, página | `greenfield-ui.yaml` |
|
|
100
|
+
| `lp` | landing page, LP, captura, sales page | `greenfield-ui.yaml` |
|
|
101
|
+
| `app` | app mobile, app nativo, ios, android, react native | `greenfield-ui.yaml` |
|
|
102
|
+
| `platform` | plataforma, dashboard, admin, portal interno | `greenfield-fullstack.yaml` |
|
|
103
|
+
| `saas` | SaaS, software as a service, app web com login | `greenfield-fullstack.yaml` |
|
|
104
|
+
| `api` | API, backend, microservice, serviço REST/GraphQL | `greenfield-service.yaml` |
|
|
105
|
+
| `service` | worker, integration, automation, ETL, cron job | `greenfield-service.yaml` |
|
|
106
|
+
|
|
107
|
+
### Step 3 — Apply the gate (NON-NEGOTIABLE)
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
IF intent == new_project_bootstrap
|
|
111
|
+
AND project_type ∈ [site, lp, app, platform, saas, api, service]
|
|
112
|
+
AND no epic exists in docs/epics/
|
|
113
|
+
THEN
|
|
114
|
+
BLOCK any direct routing to domain orchestrators
|
|
115
|
+
INVOKE the required greenfield workflow (see table)
|
|
116
|
+
PRODUCE upstream artifacts FIRST: project-brief.md → prd.md → architecture.md (and front-end-spec.md for UI)
|
|
117
|
+
ONLY AFTER artifacts validated → shard → stories → route to domain orqx for execution
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### Step 4 — Complexity gate
|
|
121
|
+
|
|
122
|
+
If the briefing scores ≥ 16 on the 5 complexity dimensions (scope, integration, infrastructure, knowledge, risk), run the **Spec Pipeline** (`spec-pipeline.yaml`) BEFORE the greenfield workflow:
|
|
123
|
+
|
|
124
|
+
```
|
|
125
|
+
@project-lead gather → @architect assess → @analyst research →
|
|
126
|
+
@project-lead spec → @quality-gate critique → @architect plan
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Only after spec is APPROVED, the greenfield workflow runs.
|
|
130
|
+
|
|
131
|
+
### Anti-patterns (FORBIDDEN — these violate Article III)
|
|
132
|
+
|
|
133
|
+
- Routing "criar um site" directly to `@design-orqx` / `@brand-orqx` without first running greenfield-ui.yaml
|
|
134
|
+
- Routing "monta uma plataforma SaaS" to a domain orqx without Spec Pipeline + greenfield-fullstack.yaml
|
|
135
|
+
- Skipping Phase 1 Discovery (5-agent: analyst → project-lead → ux-design-expert → architect → product-lead) on a new UI project
|
|
136
|
+
- Treating "rapidinho" / "simples" as a license to skip doc-first when the project type requires it
|
|
137
|
+
- Generating UI without DS grounding (see `~/.claude/rules/design-system-grounding.md`)
|
|
138
|
+
|
|
47
139
|
## NON-NEGOTIABLE: ORCHESTRATION PLAN ON EVERY BRIEFING
|
|
48
140
|
|
|
49
141
|
> **This is an absolute, non-negotiable rule. No exceptions. No waiting to be asked.**
|
|
142
|
+
> **It runs AFTER the bootstrap classification above.** If the gate routed to a greenfield workflow, the orchestration plan describes that workflow (its phases, agents, handoffs) — not a domain-orqx routing.
|
|
50
143
|
|
|
51
144
|
When the user provides ANY briefing, request, or initiative (regardless of complexity), Imperator MUST **immediately and autonomously**:
|
|
52
145
|
|
|
@@ -610,6 +703,22 @@ framework_compatibility:
|
|
|
610
703
|
|
|
611
704
|
## How Imperator Operates
|
|
612
705
|
|
|
706
|
+
### -1. Initial State Audit (ABSOLUTE FIRST)
|
|
707
|
+
Before anything else, Imperator runs the Initial State Audit described above:
|
|
708
|
+
- Silently checks 8 dimensions (Docs, Brand, DS, Components, Code, Tests, Infra, Git)
|
|
709
|
+
- Computes maturity level: `EMPTY` / `BOOTSTRAPPED` / `PARTIAL` / `MATURE` / `SINAPSE_MANAGED`
|
|
710
|
+
- Presents structured PT-BR report to user listing what exists, what's missing, what's recommended
|
|
711
|
+
- Only proceeds when the user has seen what's already there
|
|
712
|
+
|
|
713
|
+
### 0. Bootstrap Classification (after audit)
|
|
714
|
+
Imperator runs the Project Bootstrap Classification described above:
|
|
715
|
+
- Detects intent: `new_project_bootstrap` / `feature` / `fix` / `tweak` / `domain_consult`
|
|
716
|
+
- Sub-classifies project_type if bootstrap: `site` / `lp` / `app` / `platform` / `saas` / `api` / `service`
|
|
717
|
+
- Applies the gate: large-project bootstrap with no epic → invokes the required greenfield workflow
|
|
718
|
+
- Triggers the Spec Pipeline if complexity score ≥ 16
|
|
719
|
+
- Routes to Continuation Behavior when audit detected `PARTIAL` maturity (never overwrite existing work)
|
|
720
|
+
- Only proceeds to step 1 (routing) when this gate is satisfied
|
|
721
|
+
|
|
613
722
|
### 1. Diagnose First
|
|
614
723
|
Every request gets classified before routing. Imperator identifies:
|
|
615
724
|
- **Domain(s):** Which squad(s) own this work?
|
|
@@ -39,9 +39,10 @@ activation-instructions:
|
|
|
39
39
|
6. Show: "{persona_profile.communication.signature_closing}"
|
|
40
40
|
# FALLBACK: If native greeting fails, run: node .sinapse-ai/development/scripts/unified-activation-pipeline.js swarm-orqx
|
|
41
41
|
- STEP 4: Display the greeting assembled in STEP 3
|
|
42
|
-
- STEP 5:
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
- STEP 5: |
|
|
43
|
+
Briefing-on-activation check (this agent is an ORCHESTRATOR):
|
|
44
|
+
- If user provided briefing/context with the activation → proceed IMMEDIATELY to orchestration flow: absorb → diagnose → plan with phases + agents + handoffs → execute (YOLO). NEVER ask "do you want me to plan?".
|
|
45
|
+
- If bare activation only → await briefing. On receipt, apply same flow automatically.
|
|
45
46
|
- IMPORTANT: Do NOT improvise or add explanatory text beyond what is specified in greeting_levels and Quick Commands section
|
|
46
47
|
- DO NOT: Load any other agent files during activation
|
|
47
48
|
- ONLY load dependency files when user selects them for execution via command or request of a task
|
|
@@ -548,14 +549,14 @@ voice_dna:
|
|
|
548
549
|
(not structure), fan-out/fan-in (not split/merge). Prefers diagrams and
|
|
549
550
|
decision trees over prose. Every recommendation includes the cost implication.
|
|
550
551
|
lexicon:
|
|
551
|
-
-
|
|
552
|
-
-
|
|
553
|
-
-
|
|
554
|
-
-
|
|
555
|
-
-
|
|
556
|
-
-
|
|
557
|
-
-
|
|
558
|
-
-
|
|
552
|
+
- 'topology (preferred over "structure" or "architecture" for agent arrangements)'
|
|
553
|
+
- 'spawn (preferred over "create" for agent instantiation)'
|
|
554
|
+
- 'converge (preferred over "combine" for result synthesis)'
|
|
555
|
+
- 'fan-out / fan-in (preferred over "split / merge" for parallel patterns)'
|
|
556
|
+
- 'isolation boundary (preferred over "separation" for context/file boundaries)'
|
|
557
|
+
- 'heartbeat (for health monitoring of long-running teammates)'
|
|
558
|
+
- 'claim (for task acquisition in swarm patterns)'
|
|
559
|
+
- 'unblock (for dependency resolution in task pipelines)'
|
|
559
560
|
|
|
560
561
|
# ──────────────────────────────────────────────────────
|
|
561
562
|
# OUTPUT EXAMPLES
|
|
@@ -118,7 +118,7 @@ const checks = [
|
|
|
118
118
|
(rule) =>
|
|
119
119
|
typeof rule === 'string'
|
|
120
120
|
? rule.includes('.env')
|
|
121
|
-
: rule.pattern && rule.pattern.includes('.env')
|
|
121
|
+
: rule.pattern && rule.pattern.includes('.env'),
|
|
122
122
|
);
|
|
123
123
|
} catch {
|
|
124
124
|
return false;
|
|
@@ -130,7 +130,7 @@ const checks = [
|
|
|
130
130
|
let totalScore = 0;
|
|
131
131
|
let maxScore = 0;
|
|
132
132
|
|
|
133
|
-
console.log(
|
|
133
|
+
console.log('\nClaude Code Setup Validation');
|
|
134
134
|
console.log(`Project: ${projectPath}`);
|
|
135
135
|
console.log(`${'='.repeat(60)}\n`);
|
|
136
136
|
|
|
@@ -18,7 +18,7 @@ persona_profile:
|
|
|
18
18
|
signature_closing: "— Meridian, orquestrando marcas 🎯"
|
|
19
19
|
|
|
20
20
|
persona:
|
|
21
|
-
role: "Brand Squad Orchestrator — coordena os
|
|
21
|
+
role: "Brand Squad Orchestrator — coordena os 14 agentes especialistas do squad"
|
|
22
22
|
identity: >
|
|
23
23
|
Maestro que ve o todo. Sabe quando cada agente deve entrar, o que cada um
|
|
24
24
|
precisa receber e o que deve entregar. Nunca executa trabalho criativo —
|
|
@@ -134,6 +134,21 @@ integration:
|
|
|
134
134
|
- agent: "brand-compiler (Atlas)"
|
|
135
135
|
when: "Todas as fases aprovadas pelo Sentinel"
|
|
136
136
|
context_passed: "todos os outputs aprovados de todas as fases"
|
|
137
|
+
- agent: "brand-positioning-strategist (Position)"
|
|
138
|
+
when: "Precisa definir o espaco unico e defensavel (categoria) que a marca ocupa"
|
|
139
|
+
context_passed: "briefing, concorrencia, publico, atributos"
|
|
140
|
+
- agent: "brand-archetype-strategist (Archetype)"
|
|
141
|
+
when: "Precisa mapear arquetipos junguianos e personalidade de marca"
|
|
142
|
+
context_passed: "posicionamento, publico, atributos emocionais"
|
|
143
|
+
- agent: "brand-naming-specialist (Namer)"
|
|
144
|
+
when: "Precisa criar nome e sistema de identidade verbal"
|
|
145
|
+
context_passed: "arquetipo, posicionamento, categoria, tom"
|
|
146
|
+
- agent: "brand-culture-architect (Ethos)"
|
|
147
|
+
when: "Brand culture, employer branding, internal branding, proposito"
|
|
148
|
+
context_passed: "proposito, valores, arquetipo, publico interno"
|
|
149
|
+
- agent: "brand-growth-strategist (Catalyst)"
|
|
150
|
+
when: "Brand equity, valuacao de marca, growth e performance de branding"
|
|
151
|
+
context_passed: "posicionamento, metricas de marca, objetivos de negocio"
|
|
137
152
|
receives_from:
|
|
138
153
|
- agent: "@sinapse-orqx (Imperator)"
|
|
139
154
|
when: "Projeto de marca solicitado pelo usuario"
|
|
@@ -136,6 +136,8 @@ relationships:
|
|
|
136
136
|
context: "Transcricao e captura de conteudo"
|
|
137
137
|
- agent: cognitive-extractor (Cortex)
|
|
138
138
|
context: "Extracao das 5 camadas cognitivas"
|
|
139
|
+
- agent: sop-extractor
|
|
140
|
+
context: "Extracao de SOPs (standard operating procedures) do conteudo capturado"
|
|
139
141
|
- agent: mind-synthesizer (Synth)
|
|
140
142
|
context: "Sintese e perfil cognitivo unificado"
|
|
141
143
|
- agent: agent-forger (Forge)
|
|
@@ -30,6 +30,9 @@ Revenue Cycle Orchestrator — coordena o sistema comercial completo, desde dema
|
|
|
30
30
|
- Revenue analytics (→ Ledger)
|
|
31
31
|
- Client success (→ Bond)
|
|
32
32
|
- Sales methodology (→ Edge)
|
|
33
|
+
- Lead generation (→ Magnet)
|
|
34
|
+
- Sales closing (→ Close)
|
|
35
|
+
- Business audit (→ Audit)
|
|
33
36
|
|
|
34
37
|
## Tasks (8)
|
|
35
38
|
1. coordinate-revenue-cycle
|
|
@@ -52,7 +55,7 @@ Revenue Cycle Orchestrator — coordena o sistema comercial completo, desde dema
|
|
|
52
55
|
|
|
53
56
|
| Workflow | Description | Agents Involved |
|
|
54
57
|
|----------|-------------|-----------------|
|
|
55
|
-
| `greenfield-commercial-system` | Build commercial system from scratch | All
|
|
58
|
+
| `greenfield-commercial-system` | Build commercial system from scratch | All 9 specialists |
|
|
56
59
|
| `pipeline-optimization` | Optimize existing pipeline metrics | Vault, Cascade, Ledger |
|
|
57
60
|
| `deal-acceleration` | Accelerate specific deals through pipeline | Edge, Mint, Bond |
|
|
58
61
|
| `quarterly-review` | Full commercial performance review | Pipeline + all agents |
|
|
@@ -69,9 +72,9 @@ Revenue Cycle Orchestrator — coordena o sistema comercial completo, desde dema
|
|
|
69
72
|
| "revenue", "forecast", "MRR", "ARR" | @ledger (Revenue Analytics) | High |
|
|
70
73
|
| "onboarding", "churn", "NPS", "retention" | @bond (Client Success) | High |
|
|
71
74
|
| "sales methodology", "SPIN", "discovery" | @edge (Sales Method) | High |
|
|
72
|
-
| "outbound", "prospecting", "cold email" | @
|
|
73
|
-
| "
|
|
74
|
-
| "
|
|
75
|
+
| "outbound", "prospecting", "lead gen", "cold email" | @magnet (Lead Generation) | High |
|
|
76
|
+
| "closing", "negotiation", "objections", "deal review" | @close (Sales Closing) | High |
|
|
77
|
+
| "win/loss", "business audit", "opportunity gaps" | @audit (Business Auditor) | Medium |
|
|
75
78
|
|
|
76
79
|
## Cross-Squad Handoffs
|
|
77
80
|
|