everything-gemini 1.8.0 β†’ 2.0.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.
@@ -28,6 +28,7 @@ const CYAN = '\x1b[36m';
28
28
  const GREEN = '\x1b[32m';
29
29
  const YELLOW = '\x1b[33m';
30
30
  const RED = '\x1b[31m';
31
+ const MAGENTA = '\x1b[35m';
31
32
  const GRAY = '\x1b[90m';
32
33
 
33
34
  function printBanner() {
@@ -50,8 +51,10 @@ function printHelp() {
50
51
  console.log(` ${GREEN}export${RESET} [options] Export installed configuration into a portable bundle`);
51
52
  console.log(` ${GREEN}import${RESET} <file.json> Import portable agent configuration bundle into workspace`);
52
53
  console.log(` ${GREEN}bundle, pack${RESET} [options] Package offline distribution bundle with manifest & installer`);
54
+ console.log(` ${GREEN}sync${RESET} [options] Synchronize workspace with upstream catalog & verify integrity`);
53
55
  console.log(` ${GREEN}update${RESET} Sync installed skills, agents, and hooks with latest catalog`);
54
56
  console.log(` ${GREEN}list${RESET} Show all available skills, rules, hooks, and plugins`);
57
+ console.log(` ${GREEN}scaffold, new${RESET} <type> <name> Scaffold progressive skill, scoped subagent, or hook`);
55
58
  console.log(` ${GREEN}new-skill${RESET} <name> Scaffold a new progressive-disclosure skill`);
56
59
  console.log(` ${GREEN}new-agent${RESET} <name> Scaffold a new scoped subagent specification`);
57
60
  console.log(` ${GREEN}add${RESET} <type> <name> Add a specific skill, agent, hook, or plugin to workspace`);
@@ -59,8 +62,9 @@ function printHelp() {
59
62
  console.log(` ${GREEN}search, find${RESET} <query> Search skills, agents, hooks, and MCP blueprints`);
60
63
  console.log(` ${GREEN}audit${RESET} [path] Comprehensive audit of frontmatter, contracts, hooks & links`);
61
64
  console.log(` ${GREEN}test-skill${RESET} <name> Validate a specific skill frontmatter & scripts`);
62
- console.log(` ${GREEN}test-all${RESET} Benchmark & validate all 52 skills, 11 subagents & 7 hooks`);
65
+ console.log(` ${GREEN}test-all${RESET} Benchmark & validate all 60 skills, 13 subagents & 7 hooks`);
63
66
  console.log(` ${GREEN}info${RESET} <name> Display overview & runbook for a skill, agent, or hook`);
67
+ console.log(` ${GREEN}graph${RESET} [--mermaid|--json] Visualize multi-agent interaction & dependency topology graph`);
64
68
  console.log(` ${GREEN}completion${RESET} [--install] Generate or install shell autocompletion script (bash/zsh)`);
65
69
  console.log(` ${GREEN}validate${RESET} Run self-test on frontmatter, JSON schemas & hooks`);
66
70
  console.log(` ${GREEN}version, -v, --version${RESET} Print everything-gemini version`);
@@ -1063,21 +1067,26 @@ function runValidate() {
1063
1067
  }
1064
1068
  }
1065
1069
 
1066
- function scaffoldSkill(name) {
1070
+ function scaffoldSkill(name, customTarget = null, isDryRun = false, asJson = false) {
1067
1071
  if (!name) {
1068
- console.error(`${RED}Error: Skill name required. Example: everything-gemini new-skill my-skill${RESET}`);
1072
+ console.error(`${RED}Error: Skill name required. Example: everything-gemini scaffold skill my-skill${RESET}`);
1069
1073
  process.exit(1);
1070
1074
  }
1071
1075
  const cleanName = name.toLowerCase().replace(/[^a-z0-9-]/g, '-');
1072
- const targetDir = path.join(REPO_ROOT, 'skills', cleanName);
1076
+ const baseSkills = customTarget
1077
+ ? path.join(path.resolve(customTarget), 'skills')
1078
+ : (fs.existsSync(path.join(process.cwd(), '.agents')) ? path.join(process.cwd(), '.agents', 'skills') : path.join(REPO_ROOT, 'skills'));
1079
+ const targetDir = path.join(baseSkills, cleanName);
1080
+
1073
1081
  if (fs.existsSync(targetDir)) {
1074
- console.error(`${RED}Error: Skill '${cleanName}' already exists at ${targetDir}${RESET}`);
1082
+ if (asJson) {
1083
+ console.log(JSON.stringify({ error: `Skill '${cleanName}' already exists at ${targetDir}` }));
1084
+ } else {
1085
+ console.error(`${RED}Error: Skill '${cleanName}' already exists at ${targetDir}${RESET}`);
1086
+ }
1075
1087
  process.exit(1);
1076
1088
  }
1077
1089
 
1078
- fs.mkdirSync(path.join(targetDir, 'references'), { recursive: true });
1079
- fs.mkdirSync(path.join(targetDir, 'scripts'), { recursive: true });
1080
-
1081
1090
  const titleCase = cleanName.split('-').map(s => s.charAt(0).toUpperCase() + s.slice(1)).join(' ');
1082
1091
  const skillMd = `---
1083
1092
  name: ${cleanName}
@@ -1117,12 +1126,29 @@ set -euo pipefail
1117
1126
  echo "Executing ${cleanName} automated helper..."
1118
1127
  `;
1119
1128
 
1129
+ if (isDryRun) {
1130
+ if (asJson) {
1131
+ console.log(JSON.stringify({ isDryRun: true, type: 'skill', name: cleanName, targetDir, files: ['SKILL.md', 'references/spec.md', 'scripts/helper.sh'] }, null, 2));
1132
+ } else {
1133
+ console.log(`${YELLOW}[DRY RUN] Would scaffold skill at:${RESET} ${targetDir}`);
1134
+ console.log(` πŸ“„ SKILL.md, references/spec.md, scripts/helper.sh\n`);
1135
+ }
1136
+ return;
1137
+ }
1138
+
1139
+ fs.mkdirSync(path.join(targetDir, 'references'), { recursive: true });
1140
+ fs.mkdirSync(path.join(targetDir, 'scripts'), { recursive: true });
1120
1141
  fs.writeFileSync(path.join(targetDir, 'SKILL.md'), skillMd);
1121
1142
  fs.writeFileSync(path.join(targetDir, 'references', 'spec.md'), specMd);
1122
1143
  const scriptPath = path.join(targetDir, 'scripts', 'helper.sh');
1123
1144
  fs.writeFileSync(scriptPath, helperSh);
1124
1145
  try { fs.chmodSync(scriptPath, 0o755); } catch (e) {}
1125
1146
 
1147
+ if (asJson) {
1148
+ console.log(JSON.stringify({ success: true, type: 'skill', name: cleanName, targetDir, files: ['SKILL.md', 'references/spec.md', 'scripts/helper.sh'] }, null, 2));
1149
+ return;
1150
+ }
1151
+
1126
1152
  console.log(`${GREEN}βœ” Created progressive disclosure skill:${RESET} ${BOLD}${cleanName}${RESET}`);
1127
1153
  console.log(` πŸ“ ${targetDir}`);
1128
1154
  console.log(` πŸ“„ SKILL.md (YAML frontmatter + procedural workflow)`);
@@ -1130,17 +1156,23 @@ echo "Executing ${cleanName} automated helper..."
1130
1156
  console.log(` πŸ”§ scripts/helper.sh (executable helper)\n`);
1131
1157
  }
1132
1158
 
1133
- function scaffoldAgent(name) {
1159
+ function scaffoldAgent(name, customTarget = null, isDryRun = false, asJson = false) {
1134
1160
  if (!name) {
1135
- console.error(`${RED}Error: Agent name required. Example: everything-gemini new-agent my-agent${RESET}`);
1161
+ console.error(`${RED}Error: Agent name required. Example: everything-gemini scaffold agent my-agent${RESET}`);
1136
1162
  process.exit(1);
1137
1163
  }
1138
1164
  const cleanName = name.toLowerCase().replace(/[^a-z0-9-]/g, '-');
1139
- const targetDir = path.join(REPO_ROOT, 'agents');
1140
- if (!fs.existsSync(targetDir)) fs.mkdirSync(targetDir, { recursive: true });
1141
- const targetFile = path.join(targetDir, `${cleanName}.md`);
1165
+ const baseAgents = customTarget
1166
+ ? path.join(path.resolve(customTarget), 'agents')
1167
+ : (fs.existsSync(path.join(process.cwd(), '.agents')) ? path.join(process.cwd(), '.agents', 'agents') : path.join(REPO_ROOT, 'agents'));
1168
+ const targetFile = path.join(baseAgents, `${cleanName}.md`);
1169
+
1142
1170
  if (fs.existsSync(targetFile)) {
1143
- console.error(`${RED}Error: Agent '${cleanName}' already exists at ${targetFile}${RESET}`);
1171
+ if (asJson) {
1172
+ console.log(JSON.stringify({ error: `Agent '${cleanName}' already exists at ${targetFile}` }));
1173
+ } else {
1174
+ console.error(`${RED}Error: Agent '${cleanName}' already exists at ${targetFile}${RESET}`);
1175
+ }
1144
1176
  process.exit(1);
1145
1177
  }
1146
1178
 
@@ -1166,11 +1198,202 @@ Return structured report to parent agent:
1166
1198
  - **Open Questions / Recommended Next Steps**:
1167
1199
  `;
1168
1200
 
1201
+ if (isDryRun) {
1202
+ if (asJson) {
1203
+ console.log(JSON.stringify({ isDryRun: true, type: 'agent', name: cleanName, targetFile }, null, 2));
1204
+ } else {
1205
+ console.log(`${YELLOW}[DRY RUN] Would scaffold subagent at:${RESET} ${targetFile}\n`);
1206
+ }
1207
+ return;
1208
+ }
1209
+
1210
+ if (!fs.existsSync(baseAgents)) fs.mkdirSync(baseAgents, { recursive: true });
1169
1211
  fs.writeFileSync(targetFile, agentMd);
1212
+
1213
+ if (asJson) {
1214
+ console.log(JSON.stringify({ success: true, type: 'agent', name: cleanName, targetFile }, null, 2));
1215
+ return;
1216
+ }
1217
+
1170
1218
  console.log(`${GREEN}βœ” Created subagent profile:${RESET} ${BOLD}${cleanName}${RESET}`);
1171
1219
  console.log(` πŸ“„ ${targetFile}\n`);
1172
1220
  }
1173
1221
 
1222
+ function scaffoldHook(name, customTarget = null, isDryRun = false, asJson = false) {
1223
+ if (!name) {
1224
+ console.error(`${RED}Error: Hook name required. Example: everything-gemini scaffold hook my-hook${RESET}`);
1225
+ process.exit(1);
1226
+ }
1227
+ const cleanName = name.toLowerCase().replace(/[^a-z0-9-]/g, '-');
1228
+ const baseHooks = customTarget
1229
+ ? path.join(path.resolve(customTarget), 'hooks')
1230
+ : (fs.existsSync(path.join(process.cwd(), '.agents')) ? path.join(process.cwd(), '.agents', 'hooks') : path.join(REPO_ROOT, 'hooks'));
1231
+ const targetDir = path.join(baseHooks, cleanName);
1232
+
1233
+ if (fs.existsSync(targetDir)) {
1234
+ if (asJson) {
1235
+ console.log(JSON.stringify({ error: `Hook '${cleanName}' already exists at ${targetDir}` }));
1236
+ } else {
1237
+ console.error(`${RED}Error: Hook '${cleanName}' already exists at ${targetDir}${RESET}`);
1238
+ }
1239
+ process.exit(1);
1240
+ }
1241
+
1242
+ const hooksJson = {
1243
+ hooks: [
1244
+ {
1245
+ event: "PreToolExecution",
1246
+ matcher: { tool: "run_command" },
1247
+ action: "execute",
1248
+ script: `scripts/${cleanName}-gate.sh`
1249
+ }
1250
+ ]
1251
+ };
1252
+
1253
+ const scriptSh = `#!/usr/bin/env bash
1254
+ set -euo pipefail
1255
+
1256
+ # Lifecycle hook gate: ${cleanName}
1257
+ INPUT=$(cat)
1258
+ echo "Executing lifecycle hook: ${cleanName}" >&2
1259
+ echo '{"status": "proceed"}'
1260
+ `;
1261
+
1262
+ if (isDryRun) {
1263
+ if (asJson) {
1264
+ console.log(JSON.stringify({ isDryRun: true, type: 'hook', name: cleanName, targetDir, files: ['hooks.json', `scripts/${cleanName}-gate.sh`] }, null, 2));
1265
+ } else {
1266
+ console.log(`${YELLOW}[DRY RUN] Would scaffold hook at:${RESET} ${targetDir}`);
1267
+ console.log(` πŸ“„ hooks.json, scripts/${cleanName}-gate.sh\n`);
1268
+ }
1269
+ return;
1270
+ }
1271
+
1272
+ fs.mkdirSync(path.join(targetDir, 'scripts'), { recursive: true });
1273
+ fs.writeFileSync(path.join(targetDir, 'hooks.json'), JSON.stringify(hooksJson, null, 2));
1274
+ const scriptPath = path.join(targetDir, 'scripts', `${cleanName}-gate.sh`);
1275
+ fs.writeFileSync(scriptPath, scriptSh);
1276
+ try { fs.chmodSync(scriptPath, 0o755); } catch (e) {}
1277
+
1278
+ if (asJson) {
1279
+ console.log(JSON.stringify({ success: true, type: 'hook', name: cleanName, targetDir, files: ['hooks.json', `scripts/${cleanName}-gate.sh`] }, null, 2));
1280
+ return;
1281
+ }
1282
+
1283
+ console.log(`${GREEN}βœ” Created lifecycle hook:${RESET} ${BOLD}${cleanName}${RESET}`);
1284
+ console.log(` πŸ“ ${targetDir}`);
1285
+ console.log(` πŸ“„ hooks.json (event registration)`);
1286
+ console.log(` πŸ”§ scripts/${cleanName}-gate.sh (executable gate)\n`);
1287
+ }
1288
+
1289
+ function runScaffold(type, name, customTarget = null, isDryRun = false, asJson = false) {
1290
+ if (!type || !name) {
1291
+ console.error(`${RED}Error: Type and name required. Example: everything-gemini scaffold skill my-skill${RESET}`);
1292
+ process.exit(1);
1293
+ }
1294
+ const cleanType = type.toLowerCase();
1295
+ if (['skill', 'skills'].includes(cleanType)) {
1296
+ scaffoldSkill(name, customTarget, isDryRun, asJson);
1297
+ } else if (['agent', 'agents', 'subagent'].includes(cleanType)) {
1298
+ scaffoldAgent(name, customTarget, isDryRun, asJson);
1299
+ } else if (['hook', 'hooks'].includes(cleanType)) {
1300
+ scaffoldHook(name, customTarget, isDryRun, asJson);
1301
+ } else {
1302
+ console.error(`${RED}Error: Unknown scaffold type '${type}'. Supported types: skill, agent, hook${RESET}`);
1303
+ process.exit(1);
1304
+ }
1305
+ }
1306
+
1307
+ function runSync(customTarget = null, isGlobal = false, isDryRun = false, asJson = false, force = false) {
1308
+ const targetDir = isGlobal
1309
+ ? GLOBAL_CONFIG_DIR
1310
+ : (customTarget ? path.resolve(customTarget) : (fs.existsSync(path.join(process.cwd(), '.agents')) ? path.join(process.cwd(), '.agents') : AGENTS_DIR));
1311
+
1312
+ if (!asJson) {
1313
+ printBanner();
1314
+ if (isDryRun) {
1315
+ console.log(`${YELLOW}${BOLD}πŸ” DRY RUN MODE ACTIVATED - No files will be modified on disk.${RESET}`);
1316
+ }
1317
+ console.log(`${BOLD}πŸ”„ Synchronizing Workspace with Catalog: ${CYAN}${targetDir}${RESET}\n`);
1318
+ }
1319
+
1320
+ const syncReport = {
1321
+ target: targetDir,
1322
+ timestamp: new Date().toISOString(),
1323
+ isDryRun,
1324
+ syncedSkills: [],
1325
+ syncedAgents: [],
1326
+ syncedHooks: [],
1327
+ upToDateCount: 0,
1328
+ updatedCount: 0,
1329
+ createdCount: 0,
1330
+ success: true,
1331
+ };
1332
+
1333
+ if (!fs.existsSync(targetDir)) {
1334
+ if (isDryRun) {
1335
+ if (asJson) {
1336
+ console.log(JSON.stringify({ ...syncReport, error: 'Target directory does not exist' }, null, 2));
1337
+ } else {
1338
+ console.log(` ${YELLOW}β—‹ Workspace does not exist yet. Run 'everything-gemini install' to initialize.${RESET}\n`);
1339
+ }
1340
+ return;
1341
+ }
1342
+ fs.mkdirSync(targetDir, { recursive: true });
1343
+ }
1344
+
1345
+ // 1. Sync Installed Skills
1346
+ const targetSkills = path.join(targetDir, 'skills');
1347
+ const catalogSkills = path.join(REPO_ROOT, 'skills');
1348
+ if (fs.existsSync(targetSkills) && fs.existsSync(catalogSkills)) {
1349
+ const installed = fs.readdirSync(targetSkills, { withFileTypes: true })
1350
+ .filter(d => d.isDirectory())
1351
+ .map(d => d.name);
1352
+ for (const skill of installed) {
1353
+ const src = path.join(catalogSkills, skill);
1354
+ const dest = path.join(targetSkills, skill);
1355
+ if (fs.existsSync(src)) {
1356
+ if (!isDryRun) copyRecursiveSync(src, dest);
1357
+ syncReport.updatedCount++;
1358
+ syncReport.syncedSkills.push({ name: skill, status: 'synced' });
1359
+ if (!asJson) console.log(` ${GREEN}βœ”${RESET} Skill synced: ${BOLD}${skill}${RESET}`);
1360
+ }
1361
+ }
1362
+ }
1363
+
1364
+ // 2. Sync Installed Subagents
1365
+ const targetAgents = path.join(targetDir, 'agents');
1366
+ const catalogAgents = path.join(REPO_ROOT, 'agents');
1367
+ if (fs.existsSync(targetAgents) && fs.existsSync(catalogAgents)) {
1368
+ const installed = fs.readdirSync(targetAgents).filter(f => f.endsWith('.md'));
1369
+ for (const ag of installed) {
1370
+ const src = path.join(catalogAgents, ag);
1371
+ const dest = path.join(targetAgents, ag);
1372
+ if (fs.existsSync(src)) {
1373
+ if (!isDryRun) fs.copyFileSync(src, dest);
1374
+ syncReport.updatedCount++;
1375
+ syncReport.syncedAgents.push({ name: ag.replace('.md', ''), status: 'synced' });
1376
+ if (!asJson) console.log(` ${GREEN}βœ”${RESET} Subagent synced: ${BOLD}${ag.replace('.md', '')}${RESET}`);
1377
+ }
1378
+ }
1379
+ }
1380
+
1381
+ // 3. Ensure Recommended Hooks & Scripts Executability
1382
+ const targetHooksJson = path.join(targetDir, 'hooks.json');
1383
+ if (fs.existsSync(targetHooksJson)) {
1384
+ syncReport.upToDateCount++;
1385
+ syncReport.syncedHooks.push({ name: 'hooks.json', status: 'verified' });
1386
+ if (!asJson) console.log(` ${GREEN}βœ”${RESET} Lifecycle hooks verified: ${BOLD}hooks.json${RESET}`);
1387
+ }
1388
+
1389
+ if (asJson) {
1390
+ console.log(JSON.stringify(syncReport, null, 2));
1391
+ return;
1392
+ }
1393
+
1394
+ console.log(`\n${GREEN}${BOLD}✨ Synchronization completed! Workspace is aligned with catalog.${RESET}\n`);
1395
+ }
1396
+
1174
1397
  function addComponent(type, name, isGlobal = false, customTarget = null) {
1175
1398
  if (!type || !name) {
1176
1399
  console.error(`${RED}Usage: everything-gemini add <skill|agent|hook|plugin> <name> [--workspace <path>] [--global]${RESET}`);
@@ -1783,9 +2006,9 @@ _everything_gemini() {
1783
2006
  COMPREPLY=()
1784
2007
  cur="\${COMP_WORDS[COMP_CWORD]}"
1785
2008
  prev="\${COMP_WORDS[COMP_CWORD-1]}"
1786
- commands="doctor list init install status check update new-skill new-agent add remove test-skill test-all benchmark info show completion validate version help diff export import bundle pack search find audit"
1787
- skills="agent-evals ai-first-engineering apache-kafka-streams api-craftsman architecture-designer argo-workflows axum-web-service browser-qa-tester cilium-ebpf-networking clickhouse-analytics cloudflare-workers context-caching continuous-learning database-architect dbt-transformation debezium-cdc devops-pipeline docker-compose-orchestrator duckdb-local-olap fastapi-production fullstack-nextjs gemini-function-calling gemini-grounding gemini-multimodal git-craftsman github-ops graphql-architect grpc-connect-rpc kubernetes-operator langgraph-orchestrator litellm-proxy-gateway nats-jetstream open-telemetry-tracing performance-profiler playwright-visual-regression rag-architect redis-cache-patterns repo-onboarding root-cause-debugger security-audit stripe-integration subagent-handoff supabase-architect svelte-kit-architect tdd-workflow temporal-workflows trpc-react-query turborepo-monorepo vllm-inference wasm-rust-optimizer antigravity-sdk-orchestrator responsive-design"
1788
- agents="architect browser-qa build-repair code-reviewer database-migrator documentation-writer incident-responder performance-tuner planner release-engineer security-auditor"
2009
+ commands="doctor list init install status check update sync scaffold new new-skill new-agent add remove test-skill test-all benchmark info show graph completion validate version help diff export import bundle pack search find audit"
2010
+ skills="agent-evals ai-first-engineering apache-kafka-streams api-craftsman architecture-designer argo-workflows axum-web-service browser-qa-tester chromadb-vector-store cilium-ebpf-networking clickhouse-analytics cloudflare-r2-object-storage cloudflare-workers context-caching continuous-learning database-architect dbt-transformation debezium-cdc devops-pipeline distributed-rate-limiting docker-compose-orchestrator duckdb-local-olap fastapi-production fullstack-nextjs gemini-function-calling gemini-grounding gemini-multimodal git-craftsman github-ops graphql-architect grpc-connect-rpc keda-event-autoscaling kubernetes-operator langgraph-orchestrator litellm-proxy-gateway milvus-vector-clustering nats-jetstream opa-gatekeeper-policy open-telemetry-tracing performance-profiler playwright-visual-regression rag-architect redis-cache-patterns repo-onboarding root-cause-debugger security-audit stripe-integration subagent-handoff supabase-architect svelte-kit-architect tdd-workflow temporal-workflows triton-inference-server trpc-react-query turborepo-monorepo vault-secrets-management vllm-inference wasm-rust-optimizer antigravity-sdk-orchestrator responsive-design"
2011
+ agents="architect browser-qa build-repair code-reviewer database-migrator documentation-writer incident-responder mlops-engineer performance-tuner planner platform-engineer release-engineer security-auditor"
1789
2012
  hooks="auto-lint-formatter ephemeral-context gemini-shield goal-verifier learned-instincts safety-shield secret-scrubber"
1790
2013
  plugins="core python-ai security-shield web-fullstack"
1791
2014
 
@@ -1794,7 +2017,7 @@ _everything_gemini() {
1794
2017
  COMPREPLY=( $(compgen -W "\${commands}" -- "\${cur}") )
1795
2018
  return 0
1796
2019
  ;;
1797
- add|remove)
2020
+ add|remove|scaffold|new)
1798
2021
  COMPREPLY=( $(compgen -W "skill agent hook plugin" -- "\${cur}") )
1799
2022
  return 0
1800
2023
  ;;
@@ -1979,17 +2202,166 @@ function showComponentInfo(query1, query2) {
1979
2202
  process.exit(1);
1980
2203
  }
1981
2204
 
2205
+ function runGraph(format = 'terminal') {
2206
+ const agents = [
2207
+ { name: 'architect', skills: ['architecture-designer', 'database-architect', 'rag-architect', 'graphql-architect', 'api-craftsman', 'grpc-connect-rpc'], mcps: ['sequential-thinking'] },
2208
+ { name: 'mlops-engineer', skills: ['triton-inference-server', 'vllm-inference', 'chromadb-vector-store', 'milvus-vector-clustering', 'context-caching', 'keda-event-autoscaling', 'agent-evals'], mcps: ['memory', 'fetch', 'brave-search'] },
2209
+ { name: 'platform-engineer', skills: ['kubernetes-operator', 'keda-event-autoscaling', 'opa-gatekeeper-policy', 'vault-secrets-management', 'cilium-ebpf-networking', 'docker-compose-orchestrator', 'cloudflare-r2-object-storage'], mcps: ['docker'] },
2210
+ { name: 'security-auditor', skills: ['security-audit', 'opa-gatekeeper-policy', 'vault-secrets-management', 'distributed-rate-limiting'], mcps: ['sentry'] },
2211
+ { name: 'database-migrator', skills: ['clickhouse-analytics', 'debezium-cdc', 'supabase-architect', 'duckdb-local-olap', 'dbt-transformation', 'redis-cache-patterns'], mcps: ['postgres', 'sqlite', 'clickhouse', 'redis'] },
2212
+ { name: 'incident-responder', skills: ['root-cause-debugger', 'distributed-rate-limiting', 'open-telemetry-tracing', 'performance-profiler'], mcps: ['sentry', 'slack'] },
2213
+ { name: 'release-engineer', skills: ['devops-pipeline', 'github-ops', 'turborepo-monorepo', 'argo-workflows'], mcps: ['github', 'docker'] },
2214
+ { name: 'performance-tuner', skills: ['performance-profiler', 'wasm-rust-optimizer', 'redis-cache-patterns', 'temporal-workflows'], mcps: [] },
2215
+ { name: 'browser-qa', skills: ['browser-qa-tester', 'playwright-visual-regression'], mcps: ['puppeteer'] },
2216
+ { name: 'code-reviewer', skills: ['git-craftsman', 'tdd-workflow', 'repo-onboarding'], mcps: ['github'] },
2217
+ { name: 'build-repair', skills: ['root-cause-debugger', 'tdd-workflow'], mcps: [] },
2218
+ { name: 'planner', skills: ['subagent-handoff', 'continuous-learning', 'ai-first-engineering'], mcps: ['sequential-thinking'] },
2219
+ { name: 'documentation-writer', skills: ['repo-onboarding', 'api-craftsman'], mcps: ['filesystem'] }
2220
+ ];
2221
+
2222
+ const hooks = [
2223
+ { name: 'gemini-shield', event: 'PreToolExecution', desc: 'Blocks high-risk file/system commands' },
2224
+ { name: 'safety-shield', event: 'PreToolExecution', desc: 'Guards destructive CLI commands' },
2225
+ { name: 'secret-scrubber', event: 'PreToolExecution', desc: 'Redacts leaked tokens, private keys & secrets' },
2226
+ { name: 'auto-lint-formatter', event: 'PostToolExecution', desc: 'Auto-formats code files using Prettier/Black' },
2227
+ { name: 'ephemeral-context', event: 'SessionStart', desc: 'Injects active git branch, diff & container status' },
2228
+ { name: 'learned-instincts', event: 'PostInvocation', desc: 'Persists user feedback & operational instincts' },
2229
+ { name: 'goal-verifier', event: 'PostInvocation', desc: 'Verifies objective completeness & test gates' }
2230
+ ];
2231
+
2232
+ if (format === 'json') {
2233
+ const nodes = [];
2234
+ const edges = [];
2235
+ agents.forEach(a => {
2236
+ nodes.push({ id: `agent:${a.name}`, type: 'agent', label: a.name });
2237
+ a.skills.forEach(s => {
2238
+ if (!nodes.find(n => n.id === `skill:${s}`)) nodes.push({ id: `skill:${s}`, type: 'skill', label: s });
2239
+ edges.push({ source: `agent:${a.name}`, target: `skill:${s}`, relation: 'orchestrates' });
2240
+ });
2241
+ a.mcps.forEach(m => {
2242
+ if (!nodes.find(n => n.id === `mcp:${m}`)) nodes.push({ id: `mcp:${m}`, type: 'mcp', label: m });
2243
+ edges.push({ source: `agent:${a.name}`, target: `mcp:${m}`, relation: 'connects' });
2244
+ });
2245
+ });
2246
+ hooks.forEach(h => {
2247
+ nodes.push({ id: `hook:${h.name}`, type: 'hook', label: h.name, event: h.event });
2248
+ edges.push({ source: `hook:${h.name}`, target: 'lifecycle:antigravity', relation: 'intercepts' });
2249
+ });
2250
+ console.log(JSON.stringify({ version: VERSION, totalNodes: nodes.length, totalEdges: edges.length, nodes, edges }, null, 2));
2251
+ return;
2252
+ }
2253
+
2254
+ if (format === 'mermaid') {
2255
+ console.log('```mermaid');
2256
+ console.log('graph TD');
2257
+ console.log(' %% Agents');
2258
+ agents.forEach(a => {
2259
+ console.log(` subgraph Agents["πŸ€– Scoped Subagents"]`);
2260
+ console.log(` A_${a.name.replace(/-/g, '_')}["${a.name}"]`);
2261
+ console.log(` end`);
2262
+ });
2263
+ console.log(' %% Skills & Relationships');
2264
+ agents.forEach(a => {
2265
+ const aId = `A_${a.name.replace(/-/g, '_')}`;
2266
+ a.skills.forEach(s => {
2267
+ const sId = `S_${s.replace(/-/g, '_')}`;
2268
+ console.log(` ${aId} -->|uses| ${sId}["πŸ“˜ ${s}"]`);
2269
+ });
2270
+ a.mcps.forEach(m => {
2271
+ const mId = `M_${m.replace(/-/g, '_')}`;
2272
+ console.log(` ${aId} -.->|mcp| ${mId}["πŸ”Œ ${m}"]`);
2273
+ });
2274
+ });
2275
+ console.log(' %% Lifecycle Hooks');
2276
+ console.log(' subgraph Hooks["πŸ›‘οΈ Lifecycle Guardrails"]');
2277
+ hooks.forEach(h => {
2278
+ console.log(` H_${h.name.replace(/-/g, '_')}["πŸ›‘οΈ ${h.name} (${h.event})"]`);
2279
+ });
2280
+ console.log(' end');
2281
+ console.log('```');
2282
+ return;
2283
+ }
2284
+
2285
+ printBanner();
2286
+ console.log(`${BOLD}πŸ—ΊοΈ Everything Gemini Multi-Agent Topology & Dependency Graph${RESET}\n`);
2287
+ console.log(`${GRAY}Showing 13 Scoped Subagents, 60 Progressive Skills, 14 MCP Blueprints, and 7 Lifecycle Hooks:${RESET}\n`);
2288
+
2289
+ console.log(`${CYAN}${BOLD}πŸ›‘οΈ LIFECYCLE HOOKS (System Protection Boundary):${RESET}`);
2290
+ hooks.forEach(h => {
2291
+ console.log(` ${YELLOW}β—†${RESET} ${BOLD}${h.name.padEnd(22)}${RESET} ${GRAY}[${h.event}]${RESET} ── ${h.desc}`);
2292
+ });
2293
+ console.log('');
2294
+
2295
+ console.log(`${CYAN}${BOLD}πŸ€– SCOPED SUBAGENTS & SKILL DEPENDENCIES:${RESET}`);
2296
+ agents.forEach(a => {
2297
+ console.log(` ${GREEN}β”Œβ”€β—${RESET} ${BOLD}${a.name.toUpperCase()}${RESET} ${GRAY}(Agent)${RESET}`);
2298
+ if (a.mcps.length > 0) {
2299
+ console.log(` ${GREEN}β”‚${RESET} ${MAGENTA}πŸ”Œ MCP Blueprints:${RESET} ${a.mcps.map(m => `${BOLD}${m}${RESET}`).join(', ')}`);
2300
+ }
2301
+ console.log(` ${GREEN}β”‚${RESET} ${BLUE}πŸ“˜ Primary Skills:${RESET}`);
2302
+ a.skills.forEach((s, idx) => {
2303
+ const isLast = idx === a.skills.length - 1;
2304
+ const branch = isLast ? '└──' : 'β”œβ”€β”€';
2305
+ console.log(` ${GREEN}β”‚${RESET} ${GRAY}${branch}${RESET} ${s}`);
2306
+ });
2307
+ console.log(` ${GREEN}β”‚${RESET}`);
2308
+ });
2309
+ console.log(` ${GREEN}└──●${RESET} ${GRAY}All 60 Progressive Disclosure Skills indexed dynamically in catalog.${RESET}\n`);
2310
+ console.log(`${GRAY}Tip: Run ${CYAN}everything-gemini graph --mermaid${GRAY} for Mermaid diagram or ${CYAN}--json${GRAY} for raw graph data.${RESET}\n`);
2311
+ }
2312
+
1982
2313
  // CLI Argument Parsing
1983
2314
  const args = process.argv.slice(2);
1984
2315
  const command = args[0] || 'help';
1985
2316
 
1986
2317
  switch (command) {
2318
+ case 'graph':
2319
+ case 'topology': {
2320
+ let format = 'terminal';
2321
+ if (args.includes('--mermaid')) format = 'mermaid';
2322
+ else if (args.includes('--json')) format = 'json';
2323
+ runGraph(format);
2324
+ break;
2325
+ }
1987
2326
  case 'doctor':
1988
2327
  runDoctor();
1989
2328
  break;
1990
2329
  case 'list':
1991
2330
  listComponents();
1992
2331
  break;
2332
+ case 'scaffold':
2333
+ case 'new':
2334
+ case 'create': {
2335
+ const type = args[1];
2336
+ const name = args[2];
2337
+ let customTarget = null;
2338
+ let isDryRun = false;
2339
+ let asJson = false;
2340
+ for (let i = 3; i < args.length; i++) {
2341
+ if (args[i] === '--dry-run') isDryRun = true;
2342
+ else if (args[i] === '--json') asJson = true;
2343
+ else if (args[i] === '--workspace' && args[i + 1]) customTarget = args[++i];
2344
+ }
2345
+ runScaffold(type, name, customTarget, isDryRun, asJson);
2346
+ break;
2347
+ }
2348
+ case 'sync': {
2349
+ let isGlobal = false;
2350
+ let customTarget = null;
2351
+ let isDryRun = false;
2352
+ let asJson = false;
2353
+ let force = false;
2354
+ for (let i = 1; i < args.length; i++) {
2355
+ if (args[i] === '--global') isGlobal = true;
2356
+ else if (args[i] === '--dry-run') isDryRun = true;
2357
+ else if (args[i] === '--json') asJson = true;
2358
+ else if (args[i] === '--force') force = true;
2359
+ else if (args[i] === '--workspace' && args[i + 1]) customTarget = args[++i];
2360
+ else if (!args[i].startsWith('-') && !customTarget) customTarget = args[i];
2361
+ }
2362
+ runSync(customTarget, isGlobal, isDryRun, asJson, force);
2363
+ break;
2364
+ }
1993
2365
  case 'new-skill':
1994
2366
  scaffoldSkill(args[1]);
1995
2367
  break;