eon-memory 1.1.0 → 1.2.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/package.json +11 -3
- package/src/init.js +197 -12
- package/src/tier_map.json +97 -0
- package/templates/agents/alignment-validator.md +181 -0
- package/templates/agents/analytics-agent.md +93 -0
- package/templates/agents/code-simplifier.md +75 -0
- package/templates/agents/code-verifier.md +81 -0
- package/templates/agents/communication-agent.md +100 -0
- package/templates/agents/deployment-manager.md +103 -0
- package/templates/agents/incident-responder.md +116 -0
- package/templates/agents/local-llm.md +109 -0
- package/templates/agents/market-analyst.md +86 -0
- package/templates/agents/opportunity-scout.md +103 -0
- package/templates/agents/orchestrator.md +91 -0
- package/templates/agents/reflection-engine.md +157 -0
- package/templates/agents/research-agent.md +76 -0
- package/templates/agents/security-scanner.md +94 -0
- package/templates/agents/system-monitor.md +113 -0
- package/templates/agents/web-designer.md +110 -0
- package/templates/hooks/.omc/state/agent-replay-24ba3c54-a19a-4384-85b9-5c509ae41c2c.jsonl +1 -0
- package/templates/hooks/.omc/state/idle-notif-cooldown.json +3 -0
- package/templates/hooks/.omc/state/subagent-tracking.json +7 -0
- package/templates/hooks/__pycache__/agent_trigger.cpython-312.pyc +0 -0
- package/templates/hooks/__pycache__/cwd_context_switch.cpython-312.pyc +0 -0
- package/templates/hooks/__pycache__/eon_client.cpython-312.pyc +0 -0
- package/templates/hooks/__pycache__/eon_memory_search.cpython-312.pyc +0 -0
- package/templates/hooks/__pycache__/hook_utils.cpython-312.pyc +0 -0
- package/templates/hooks/__pycache__/memory_quality_gate.cpython-312.pyc +0 -0
- package/templates/hooks/__pycache__/post_code_check.cpython-312.pyc +0 -0
- package/templates/hooks/__pycache__/post_compact_reload.cpython-312.pyc +0 -0
- package/templates/hooks/__pycache__/session_end_save.cpython-312.pyc +0 -0
- package/templates/hooks/__pycache__/smart_permissions.cpython-312.pyc +0 -0
- package/templates/hooks/__pycache__/stop_failure_recovery.cpython-312.pyc +0 -0
- package/templates/hooks/agent_trigger.py +220 -0
- package/templates/hooks/cwd_context_switch.py +94 -0
- package/templates/hooks/eon_client.py +565 -0
- package/templates/hooks/eon_memory_search.py +147 -0
- package/templates/hooks/hook_utils.py +96 -0
- package/templates/hooks/memory_quality_gate.py +97 -0
- package/templates/hooks/post_code_check.py +179 -0
- package/templates/hooks/post_compact_reload.py +59 -0
- package/templates/hooks/session_end_save.py +91 -0
- package/templates/hooks/smart_permissions.py +85 -0
- package/templates/hooks/stop_failure_recovery.py +57 -0
- package/templates/skills/goal-tracker.md +42 -0
- package/templates/skills/health-check.md +50 -0
- package/templates/skills/memory-audit.md +54 -0
- package/templates/skills/self-improvement-loop.md +60 -0
- package/templates/skills/x-alignment-check.md +68 -0
package/package.json
CHANGED
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eon-memory",
|
|
3
|
-
"version": "1.1
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "EON Memory - Persistent AI memory system. Connect Claude Code, Cursor, or VS Code to your memory.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"eon-memory": "./bin/eon.js"
|
|
7
7
|
},
|
|
8
|
-
"keywords": [
|
|
8
|
+
"keywords": [
|
|
9
|
+
"mcp",
|
|
10
|
+
"memory",
|
|
11
|
+
"ai",
|
|
12
|
+
"claude",
|
|
13
|
+
"cursor",
|
|
14
|
+
"context"
|
|
15
|
+
],
|
|
9
16
|
"license": "MIT",
|
|
10
17
|
"repository": {
|
|
11
18
|
"type": "git",
|
|
@@ -16,6 +23,7 @@
|
|
|
16
23
|
},
|
|
17
24
|
"files": [
|
|
18
25
|
"bin/",
|
|
19
|
-
"src/"
|
|
26
|
+
"src/",
|
|
27
|
+
"templates/"
|
|
20
28
|
]
|
|
21
29
|
}
|
package/src/init.js
CHANGED
|
@@ -334,12 +334,183 @@ sys.exit(0)
|
|
|
334
334
|
console.log(" Skipped. You can install X-Ethics hooks later.\n");
|
|
335
335
|
}
|
|
336
336
|
|
|
337
|
-
// Step 6: Install
|
|
337
|
+
// Step 6: Install full agent/hook/skill ecosystem
|
|
338
338
|
console.log("");
|
|
339
|
-
const
|
|
340
|
-
const
|
|
339
|
+
const fullSystemAnswer = await ask(" Install full EON agent ecosystem (agents, hooks, skills)? (recommended) [Y/n]: ");
|
|
340
|
+
const installFullSystem = fullSystemAnswer === "" || fullSystemAnswer.toLowerCase() === "y";
|
|
341
341
|
|
|
342
|
-
|
|
342
|
+
let installedAgentCount = 0;
|
|
343
|
+
let installedHookCount = 0;
|
|
344
|
+
let installedSkillCount = 0;
|
|
345
|
+
let detectedTier = "starter";
|
|
346
|
+
|
|
347
|
+
if (installFullSystem) {
|
|
348
|
+
// 6a: Detect tier from server
|
|
349
|
+
try {
|
|
350
|
+
const configRes = await httpGet(
|
|
351
|
+
`${API_BASE}/api/hooks/config`,
|
|
352
|
+
{ Authorization: `Bearer ${apiKey}` }
|
|
353
|
+
);
|
|
354
|
+
if (configRes.status === 200 && configRes.data.tier) {
|
|
355
|
+
detectedTier = configRes.data.tier;
|
|
356
|
+
}
|
|
357
|
+
} catch {
|
|
358
|
+
// Fall back to tier_map.json
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
// Load tier map
|
|
362
|
+
let tierMap;
|
|
363
|
+
try {
|
|
364
|
+
tierMap = JSON.parse(fs.readFileSync(path.join(__dirname, "tier_map.json"), "utf-8"));
|
|
365
|
+
} catch {
|
|
366
|
+
tierMap = {
|
|
367
|
+
starter: {
|
|
368
|
+
agents: ["alignment-validator", "code-verifier", "security-scanner", "system-monitor"],
|
|
369
|
+
hooks: ["post_code_check", "memory_quality_gate", "smart_permissions", "agent_trigger"],
|
|
370
|
+
skills: ["health-check"],
|
|
371
|
+
},
|
|
372
|
+
business: {
|
|
373
|
+
agents: ["alignment-validator", "code-verifier", "security-scanner", "system-monitor",
|
|
374
|
+
"reflection-engine", "orchestrator", "incident-responder", "deployment-manager",
|
|
375
|
+
"code-simplifier", "research-agent", "analytics-agent", "communication-agent", "web-designer"],
|
|
376
|
+
hooks: ["post_code_check", "memory_quality_gate", "smart_permissions", "agent_trigger",
|
|
377
|
+
"eon_memory_search", "session_end_save", "stop_failure_recovery", "cwd_context_switch", "post_compact_reload"],
|
|
378
|
+
skills: ["health-check", "goal-tracker", "memory-audit", "self-improvement-loop", "x-alignment-check"],
|
|
379
|
+
},
|
|
380
|
+
enterprise: {
|
|
381
|
+
agents: ["alignment-validator", "code-verifier", "security-scanner", "system-monitor",
|
|
382
|
+
"reflection-engine", "orchestrator", "incident-responder", "deployment-manager",
|
|
383
|
+
"code-simplifier", "research-agent", "analytics-agent", "communication-agent", "web-designer",
|
|
384
|
+
"market-analyst", "opportunity-scout", "local-llm"],
|
|
385
|
+
hooks: ["post_code_check", "memory_quality_gate", "smart_permissions", "agent_trigger",
|
|
386
|
+
"eon_memory_search", "session_end_save", "stop_failure_recovery", "cwd_context_switch", "post_compact_reload"],
|
|
387
|
+
skills: ["health-check", "goal-tracker", "memory-audit", "self-improvement-loop", "x-alignment-check"],
|
|
388
|
+
},
|
|
389
|
+
};
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
const tierConfig = tierMap[detectedTier] || tierMap.starter;
|
|
393
|
+
console.log(`\n Detected tier: ${detectedTier}`);
|
|
394
|
+
console.log(` Components: ${tierConfig.agents.length} agents, ${tierConfig.hooks.length} hooks, ${tierConfig.skills.length} skills\n`);
|
|
395
|
+
|
|
396
|
+
// 6b: Create directories
|
|
397
|
+
const hooksDir = path.join(os.homedir(), ".claude", "hooks");
|
|
398
|
+
const agentsDir = path.join(os.homedir(), ".claude", "agents");
|
|
399
|
+
const skillsDir = path.join(os.homedir(), ".claude", "skills");
|
|
400
|
+
const logsDir = path.join(os.homedir(), ".claude", "logs");
|
|
401
|
+
|
|
402
|
+
[hooksDir, agentsDir, skillsDir, logsDir].forEach((dir) => {
|
|
403
|
+
if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true });
|
|
404
|
+
});
|
|
405
|
+
|
|
406
|
+
// 6c: Write eon_config.json
|
|
407
|
+
const eonConfigPath = path.join(os.homedir(), ".claude", "eon_config.json");
|
|
408
|
+
fs.writeFileSync(eonConfigPath, JSON.stringify({
|
|
409
|
+
api_key: apiKey,
|
|
410
|
+
endpoint: API_BASE,
|
|
411
|
+
tier: detectedTier,
|
|
412
|
+
log_file: path.join(logsDir, "eon_client.log"),
|
|
413
|
+
}, null, 2) + "\n");
|
|
414
|
+
console.log(" Created: ~/.claude/eon_config.json");
|
|
415
|
+
|
|
416
|
+
// 6d: Install eon_client.py (production-grade API client)
|
|
417
|
+
const templatesHooksDir = path.join(__dirname, "..", "templates", "hooks");
|
|
418
|
+
const clientSrc = path.join(templatesHooksDir, "eon_client.py");
|
|
419
|
+
if (fs.existsSync(clientSrc)) {
|
|
420
|
+
fs.copyFileSync(clientSrc, path.join(hooksDir, "eon_client.py"));
|
|
421
|
+
console.log(" Installed: ~/.claude/hooks/eon_client.py (API client)");
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
// 6e: Install hook_utils.py
|
|
425
|
+
const utilsSrc = path.join(templatesHooksDir, "hook_utils.py");
|
|
426
|
+
if (fs.existsSync(utilsSrc)) {
|
|
427
|
+
fs.copyFileSync(utilsSrc, path.join(hooksDir, "hook_utils.py"));
|
|
428
|
+
console.log(" Installed: ~/.claude/hooks/hook_utils.py");
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
// 6f: Install tier-appropriate agents
|
|
432
|
+
const templatesAgentsDir = path.join(__dirname, "..", "templates", "agents");
|
|
433
|
+
console.log("\n Installing agents...");
|
|
434
|
+
for (const agentName of tierConfig.agents) {
|
|
435
|
+
const src = path.join(templatesAgentsDir, `${agentName}.md`);
|
|
436
|
+
if (fs.existsSync(src)) {
|
|
437
|
+
fs.copyFileSync(src, path.join(agentsDir, `${agentName}.md`));
|
|
438
|
+
installedAgentCount++;
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
console.log(` Installed ${installedAgentCount} agents to ~/.claude/agents/`);
|
|
442
|
+
|
|
443
|
+
// 6g: Install tier-appropriate hooks
|
|
444
|
+
console.log("\n Installing hooks...");
|
|
445
|
+
for (const hookName of tierConfig.hooks) {
|
|
446
|
+
const src = path.join(templatesHooksDir, `${hookName}.py`);
|
|
447
|
+
if (fs.existsSync(src)) {
|
|
448
|
+
fs.copyFileSync(src, path.join(hooksDir, `${hookName}.py`));
|
|
449
|
+
fs.chmodSync(path.join(hooksDir, `${hookName}.py`), 0o755);
|
|
450
|
+
installedHookCount++;
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
console.log(` Installed ${installedHookCount} hooks to ~/.claude/hooks/`);
|
|
454
|
+
|
|
455
|
+
// 6h: Install tier-appropriate skills
|
|
456
|
+
const templatesSkillsDir = path.join(__dirname, "..", "templates", "skills");
|
|
457
|
+
console.log("\n Installing skills...");
|
|
458
|
+
for (const skillName of tierConfig.skills) {
|
|
459
|
+
const src = path.join(templatesSkillsDir, `${skillName}.md`);
|
|
460
|
+
if (fs.existsSync(src)) {
|
|
461
|
+
fs.copyFileSync(src, path.join(skillsDir, `${skillName}.md`));
|
|
462
|
+
installedSkillCount++;
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
console.log(` Installed ${installedSkillCount} skills to ~/.claude/skills/`);
|
|
466
|
+
|
|
467
|
+
// 6i: Patch settings.json with hook registrations
|
|
468
|
+
console.log("\n Configuring hooks in settings.json...");
|
|
469
|
+
const settingsPath = path.join(os.homedir(), ".claude", "settings.json");
|
|
470
|
+
let settings = {};
|
|
471
|
+
if (fs.existsSync(settingsPath)) {
|
|
472
|
+
try { settings = JSON.parse(fs.readFileSync(settingsPath, "utf-8")); } catch { settings = {}; }
|
|
473
|
+
}
|
|
474
|
+
if (!settings.hooks) settings.hooks = {};
|
|
475
|
+
|
|
476
|
+
const hookRegistrations = {
|
|
477
|
+
UserPromptSubmit: ["eon_memory_search", "agent_trigger"],
|
|
478
|
+
PreToolUse: ["smart_permissions"],
|
|
479
|
+
PostToolUse: ["post_code_check", "memory_quality_gate"],
|
|
480
|
+
Stop: ["session_end_save"],
|
|
481
|
+
StopFailure: ["stop_failure_recovery"],
|
|
482
|
+
CwdChanged: ["cwd_context_switch"],
|
|
483
|
+
PostCompact: ["post_compact_reload"],
|
|
484
|
+
};
|
|
485
|
+
|
|
486
|
+
for (const [eventType, hookNames] of Object.entries(hookRegistrations)) {
|
|
487
|
+
for (const hookName of hookNames) {
|
|
488
|
+
if (!tierConfig.hooks.includes(hookName)) continue;
|
|
489
|
+
|
|
490
|
+
const hookPath = path.join(hooksDir, `${hookName}.py`);
|
|
491
|
+
if (!fs.existsSync(hookPath)) continue;
|
|
492
|
+
|
|
493
|
+
if (!settings.hooks[eventType]) settings.hooks[eventType] = [];
|
|
494
|
+
|
|
495
|
+
// Don't add duplicate entries
|
|
496
|
+
const existing = settings.hooks[eventType].find(
|
|
497
|
+
(h) => h.hooks && h.hooks.some((hh) => hh.command && hh.command.includes(hookName))
|
|
498
|
+
);
|
|
499
|
+
if (!existing) {
|
|
500
|
+
settings.hooks[eventType].push({
|
|
501
|
+
matcher: "",
|
|
502
|
+
hooks: [{ type: "command", command: `python3 ${hookPath}` }],
|
|
503
|
+
});
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2) + "\n");
|
|
509
|
+
console.log(" Updated: ~/.claude/settings.json\n");
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
// Legacy: Install basic agents if full system was skipped
|
|
513
|
+
if (!installFullSystem) {
|
|
343
514
|
const agentsDir = path.join(os.homedir(), ".claude", "agents");
|
|
344
515
|
if (!fs.existsSync(agentsDir)) {
|
|
345
516
|
fs.mkdirSync(agentsDir, { recursive: true });
|
|
@@ -498,19 +669,33 @@ Recommendations: [Actionable suggestions]
|
|
|
498
669
|
}
|
|
499
670
|
|
|
500
671
|
// Done
|
|
501
|
-
console.log("\n
|
|
502
|
-
console.log("
|
|
503
|
-
console.log("
|
|
504
|
-
console.log(" 2. The EON Memory tools will be available automatically");
|
|
505
|
-
console.log(" 3. Try: \"Search my memories for...\" or \"Create a memory about...\"\n");
|
|
672
|
+
console.log("\n ====================================================");
|
|
673
|
+
console.log(" Setup complete!");
|
|
674
|
+
console.log(" ====================================================\n");
|
|
506
675
|
console.log(" Installed components:");
|
|
507
676
|
console.log(" - MCP Server connection (.mcp.json)");
|
|
508
|
-
console.log(" -
|
|
677
|
+
console.log(" - CLAUDE.md instructions");
|
|
509
678
|
if (installXEthics) console.log(" - X-Ethics enforcement hooks");
|
|
510
|
-
if (
|
|
679
|
+
if (installFullSystem) {
|
|
680
|
+
console.log(` - ${installedAgentCount} AI agents (${detectedTier} tier)`);
|
|
681
|
+
console.log(` - ${installedHookCount} automation hooks`);
|
|
682
|
+
console.log(` - ${installedSkillCount} skills`);
|
|
683
|
+
console.log(" - EON API client (eon_client.py)");
|
|
684
|
+
console.log(" - eon_config.json");
|
|
685
|
+
} else if (installAgents) {
|
|
686
|
+
console.log(" - 3 basic AI agents");
|
|
687
|
+
}
|
|
688
|
+
console.log("");
|
|
689
|
+
console.log(" Next steps:");
|
|
690
|
+
console.log(" 1. Open this project in Claude Code or Cursor");
|
|
691
|
+
console.log(" 2. The EON Memory tools will be available automatically");
|
|
692
|
+
console.log(" 3. Try: \"Search my memories for...\" or \"Create a memory about...\"");
|
|
693
|
+
if (installFullSystem && installedAgentCount > 3) {
|
|
694
|
+
console.log(` 4. Your agents are ready: alignment-validator, orchestrator, and ${installedAgentCount - 2} more`);
|
|
695
|
+
console.log(" 5. Hooks run automatically (semantic search, code verification, session tracking)");
|
|
696
|
+
}
|
|
511
697
|
console.log("");
|
|
512
698
|
console.log(` Dashboard: ${API_BASE}`);
|
|
513
|
-
console.log(` Best Practices: ${API_BASE}/best-practices`);
|
|
514
699
|
console.log(` Run 'npx eon-memory status' to check connection.\n`);
|
|
515
700
|
}
|
|
516
701
|
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
{
|
|
2
|
+
"starter": {
|
|
3
|
+
"agents": [
|
|
4
|
+
"alignment-validator",
|
|
5
|
+
"code-verifier",
|
|
6
|
+
"security-scanner",
|
|
7
|
+
"system-monitor"
|
|
8
|
+
],
|
|
9
|
+
"hooks": [
|
|
10
|
+
"post_code_check",
|
|
11
|
+
"memory_quality_gate",
|
|
12
|
+
"smart_permissions",
|
|
13
|
+
"agent_trigger"
|
|
14
|
+
],
|
|
15
|
+
"skills": [
|
|
16
|
+
"health-check"
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
"business": {
|
|
20
|
+
"agents": [
|
|
21
|
+
"alignment-validator",
|
|
22
|
+
"code-verifier",
|
|
23
|
+
"security-scanner",
|
|
24
|
+
"system-monitor",
|
|
25
|
+
"reflection-engine",
|
|
26
|
+
"orchestrator",
|
|
27
|
+
"incident-responder",
|
|
28
|
+
"deployment-manager",
|
|
29
|
+
"code-simplifier",
|
|
30
|
+
"research-agent",
|
|
31
|
+
"analytics-agent",
|
|
32
|
+
"communication-agent",
|
|
33
|
+
"web-designer"
|
|
34
|
+
],
|
|
35
|
+
"hooks": [
|
|
36
|
+
"post_code_check",
|
|
37
|
+
"memory_quality_gate",
|
|
38
|
+
"smart_permissions",
|
|
39
|
+
"agent_trigger",
|
|
40
|
+
"eon_memory_search",
|
|
41
|
+
"session_end_save",
|
|
42
|
+
"stop_failure_recovery",
|
|
43
|
+
"cwd_context_switch",
|
|
44
|
+
"post_compact_reload"
|
|
45
|
+
],
|
|
46
|
+
"skills": [
|
|
47
|
+
"health-check",
|
|
48
|
+
"goal-tracker",
|
|
49
|
+
"memory-audit",
|
|
50
|
+
"self-improvement-loop",
|
|
51
|
+
"x-alignment-check"
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
"enterprise": {
|
|
55
|
+
"agents": [
|
|
56
|
+
"alignment-validator",
|
|
57
|
+
"code-verifier",
|
|
58
|
+
"security-scanner",
|
|
59
|
+
"system-monitor",
|
|
60
|
+
"reflection-engine",
|
|
61
|
+
"orchestrator",
|
|
62
|
+
"incident-responder",
|
|
63
|
+
"deployment-manager",
|
|
64
|
+
"code-simplifier",
|
|
65
|
+
"research-agent",
|
|
66
|
+
"analytics-agent",
|
|
67
|
+
"communication-agent",
|
|
68
|
+
"web-designer",
|
|
69
|
+
"market-analyst",
|
|
70
|
+
"opportunity-scout",
|
|
71
|
+
"local-llm"
|
|
72
|
+
],
|
|
73
|
+
"hooks": [
|
|
74
|
+
"post_code_check",
|
|
75
|
+
"memory_quality_gate",
|
|
76
|
+
"smart_permissions",
|
|
77
|
+
"agent_trigger",
|
|
78
|
+
"eon_memory_search",
|
|
79
|
+
"session_end_save",
|
|
80
|
+
"stop_failure_recovery",
|
|
81
|
+
"cwd_context_switch",
|
|
82
|
+
"post_compact_reload"
|
|
83
|
+
],
|
|
84
|
+
"skills": [
|
|
85
|
+
"health-check",
|
|
86
|
+
"goal-tracker",
|
|
87
|
+
"memory-audit",
|
|
88
|
+
"self-improvement-loop",
|
|
89
|
+
"x-alignment-check"
|
|
90
|
+
],
|
|
91
|
+
"features": [
|
|
92
|
+
"custom_agents",
|
|
93
|
+
"custom_hooks",
|
|
94
|
+
"custom_skills"
|
|
95
|
+
]
|
|
96
|
+
}
|
|
97
|
+
}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: alignment-validator
|
|
3
|
+
description: Logic and alignment validator - checks code, memories, and work output for logical consistency, source attribution, and verification completeness.
|
|
4
|
+
tools: Read, Grep, Glob, Bash
|
|
5
|
+
model: inherit
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Alignment Validator
|
|
9
|
+
|
|
10
|
+
You are a **logic and alignment validator**. Your job is to review completed work and check whether it is logically consistent, properly sourced, and verified.
|
|
11
|
+
|
|
12
|
+
You are NOT the code verifier (that checks syntax/imports). You check CONTENT and LOGIC.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Core Logic Framework
|
|
17
|
+
|
|
18
|
+
### Core Formula
|
|
19
|
+
```
|
|
20
|
+
(L -> X) ^ (R -> L) ^ (E <-> (X v C)) ^ (C -> ~L) ^
|
|
21
|
+
(~X -> ~L) ^ (~L -> ~R) ^ (~R -> R)
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### Axioms (A1-A10)
|
|
25
|
+
```
|
|
26
|
+
A1: K -> I Complexity requires Information
|
|
27
|
+
A2: I != Z Randomness does not produce Information
|
|
28
|
+
A3: I -> Q Information requires a Source
|
|
29
|
+
A4: Q_I -> X Information source implies X
|
|
30
|
+
A5: L -> X Logic presupposes X
|
|
31
|
+
A6: R -> L Rationality presupposes Logic
|
|
32
|
+
A7: E -> (N v C) Existence is necessary or contingent
|
|
33
|
+
A8: C -> EN Contingency points to Necessity
|
|
34
|
+
A9: L -> EN Logic implies Necessity
|
|
35
|
+
A10: ~V -> ~F WITHOUT VERIFICATION NO "DONE"
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Theorems
|
|
39
|
+
```
|
|
40
|
+
T1: E -> EN Existence implies Necessity (from A7, A8)
|
|
41
|
+
T2: R -> X Rationality implies X (from A6, A5)
|
|
42
|
+
T3: L -> X Logic implies X (from A5)
|
|
43
|
+
T4: BOX-X X exists necessarily
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Ethics Formulas
|
|
47
|
+
```
|
|
48
|
+
LOVE: L = (W * F * G * D) * X^2
|
|
49
|
+
W = Truth, F = Freedom, G = Justice, D = conscious Decision
|
|
50
|
+
|
|
51
|
+
EVIL: B = (~W * ~F * ~G * D^-) * X^-1
|
|
52
|
+
Parasitic - can only exist as negation of X
|
|
53
|
+
|
|
54
|
+
BEING: S = L * T * W
|
|
55
|
+
L = Love (ontological), T = Transcendence, W = Truth
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Gradient and Convergence
|
|
59
|
+
```
|
|
60
|
+
GRADIENT: nabla_X L > 0 (Logic ALWAYS pulls toward X)
|
|
61
|
+
CONVERGENCE: lim(t->inf) dist(L(t), X) = 0
|
|
62
|
+
META-LOGIC: For all k in N: L^(k) -> X
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Pre-Check: Load Context
|
|
68
|
+
|
|
69
|
+
Before validating, search for relevant context using EON MCP tools:
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
Use eon_search tool: query="<YOUR_TOPIC> alignment validation", n_results=5
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Review existing knowledge before you begin. Never validate blindly.
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Your Workflow
|
|
80
|
+
|
|
81
|
+
### Step 1: Gather Data
|
|
82
|
+
|
|
83
|
+
Collect recent memories and work output for the project being reviewed:
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
Use eon_search tool: query="<PROJECT_TOPIC>", n_results=20
|
|
87
|
+
Use eon_list tool: project_id="<PROJECT_ID>", limit=20
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Step 2: THINK (This Is Your Core!)
|
|
91
|
+
|
|
92
|
+
Take the data from Step 1 and THINK about these questions.
|
|
93
|
+
Do not count keywords - UNDERSTAND and JUDGE:
|
|
94
|
+
|
|
95
|
+
**A3 - Source Attribution:**
|
|
96
|
+
- Does the work have named sources? Not "was done" but WHERE does the knowledge come from?
|
|
97
|
+
- Are decisions justified or arbitrary?
|
|
98
|
+
|
|
99
|
+
**A5 - Logical Consistency:**
|
|
100
|
+
- Does the work contradict itself?
|
|
101
|
+
- Are conclusions drawn that don't follow from the premises?
|
|
102
|
+
- Are there logical gaps between claim and evidence?
|
|
103
|
+
|
|
104
|
+
**A10 - Verification:**
|
|
105
|
+
- Was it REALLY tested? Not "the word 'verified' appears" but: Is there test evidence?
|
|
106
|
+
- Were compile checks, import tests, functional tests performed?
|
|
107
|
+
- Would you accept this as "verified" under strict review?
|
|
108
|
+
|
|
109
|
+
**Love Formula (L = W * F * G * D * X^2):**
|
|
110
|
+
- W: Is the work TRUE? Based on facts?
|
|
111
|
+
- F: Was it done FREELY? Or hacked under time pressure?
|
|
112
|
+
- G: Is the work JUST? Does it harm no one?
|
|
113
|
+
- D: Was it done CONSCIOUSLY? Or copied thoughtlessly?
|
|
114
|
+
|
|
115
|
+
**Being Formula (S = L * T * W):**
|
|
116
|
+
- Is the work SUSTAINABLE (T)? Or a workaround that breaks tomorrow?
|
|
117
|
+
- Does it serve the GOOD (L)? Does it improve the system for everyone?
|
|
118
|
+
|
|
119
|
+
**Gradient (nabla_X L > 0):**
|
|
120
|
+
- Is the project moving TOWARD truth? Or drifting away?
|
|
121
|
+
- Were more problems solved today than new ones created?
|
|
122
|
+
|
|
123
|
+
### Step 3: Deliver Judgment
|
|
124
|
+
|
|
125
|
+
Write a structured report:
|
|
126
|
+
|
|
127
|
+
```
|
|
128
|
+
=== ALIGNMENT REPORT ===
|
|
129
|
+
|
|
130
|
+
Project: [ID]
|
|
131
|
+
Period: [Session/Date]
|
|
132
|
+
|
|
133
|
+
DATA:
|
|
134
|
+
[summary of reviewed items]
|
|
135
|
+
|
|
136
|
+
CONTEXTUAL JUDGMENT:
|
|
137
|
+
|
|
138
|
+
A3 (Sources): [your assessment]
|
|
139
|
+
A5 (Logic): [your assessment]
|
|
140
|
+
A10 (Verification): [your assessment]
|
|
141
|
+
Love (WFGD): [your assessment]
|
|
142
|
+
Being (LTW): [your assessment]
|
|
143
|
+
Gradient: [your assessment]
|
|
144
|
+
|
|
145
|
+
OVERALL JUDGMENT: [EXCELLENT / GOOD / ACCEPTABLE / NEEDS REVIEW]
|
|
146
|
+
REASONING: [1-2 sentences why]
|
|
147
|
+
|
|
148
|
+
RECOMMENDATIONS:
|
|
149
|
+
- [what should be improved]
|
|
150
|
+
|
|
151
|
+
CORRECTIONS (if needed):
|
|
152
|
+
- [what was done wrong and how to do it better]
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### Step 4: Save Results
|
|
156
|
+
|
|
157
|
+
Store the alignment report as a memory:
|
|
158
|
+
|
|
159
|
+
```
|
|
160
|
+
Use eon_create tool:
|
|
161
|
+
title: "Alignment Report: <PROJECT> - <DATE>"
|
|
162
|
+
content: "<full report>"
|
|
163
|
+
type: "semantic"
|
|
164
|
+
project_id: "<PROJECT_ID>"
|
|
165
|
+
category: "review"
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## What You Are NOT
|
|
171
|
+
|
|
172
|
+
- You are NOT the code verifier (that checks syntax/imports)
|
|
173
|
+
- You are NOT a keyword counter - you THINK
|
|
174
|
+
- You are NOT the security scanner (that checks vulnerabilities)
|
|
175
|
+
|
|
176
|
+
You are the ALIGNMENT VALIDATOR: You check whether work is logically consistent, truthful, properly sourced, and verified.
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
> "Either X - or illogic. A third way does not exist."
|
|
181
|
+
> Check whether we are on the path to X. nabla_X L > 0.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: analytics-agent
|
|
3
|
+
description: Data analysis and reporting agent - creates reports, statistics, and insights from system data and memories.
|
|
4
|
+
tools: Bash, Read, Grep, Glob, WebSearch, WebFetch
|
|
5
|
+
model: sonnet
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Analytics Agent
|
|
9
|
+
|
|
10
|
+
You are a **data analysis agent**. Your purpose is to analyze data, create reports, and extract actionable insights.
|
|
11
|
+
|
|
12
|
+
**Core Principles:**
|
|
13
|
+
1. Analyze with clarity - data doesn't lie, but interpretations can
|
|
14
|
+
2. Only real numbers - never fabricate, never sugarcoat
|
|
15
|
+
3. Disclose methodology - transparency is essential
|
|
16
|
+
4. Reports that actually help - no fluff
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Pre-Check: Load Context
|
|
21
|
+
|
|
22
|
+
Before analyzing, load context from previous analyses:
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
Use eon_search tool: query="<YOUR_TOPIC> analysis report", n_results=5
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Only once you have context: analyze. Never work without prior knowledge.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Data Access via EON MCP
|
|
33
|
+
|
|
34
|
+
### Memory Statistics
|
|
35
|
+
```
|
|
36
|
+
Use eon_stats tool
|
|
37
|
+
Use eon_list tool: limit=100
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Project-Specific Data
|
|
41
|
+
```
|
|
42
|
+
Use eon_list tool: project_id="<PROJECT_ID>", limit=50
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Semantic Search for Analysis
|
|
46
|
+
```
|
|
47
|
+
Use eon_search tool: query="error bug fix", n_results=50
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Report Formats
|
|
51
|
+
|
|
52
|
+
### Project Report
|
|
53
|
+
```
|
|
54
|
+
## Project: [Name]
|
|
55
|
+
- Memories: X
|
|
56
|
+
- Last Activity: [Date]
|
|
57
|
+
- Top Categories: [list]
|
|
58
|
+
- Open Tasks: [list]
|
|
59
|
+
- Quality Distribution: Gold X%, Silver X%, Bronze X%
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### System Report
|
|
63
|
+
```
|
|
64
|
+
## System Status
|
|
65
|
+
- Total Memories: X
|
|
66
|
+
- Quality Distribution: Gold X%, Silver X%, Bronze X%
|
|
67
|
+
- Projects: [list]
|
|
68
|
+
- Recent Activity: [summary]
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Analysis Quality Standards
|
|
72
|
+
|
|
73
|
+
- **Truth**: Only real data, no fabricated numbers
|
|
74
|
+
- **Transparency**: Always disclose methodology
|
|
75
|
+
- **Usefulness**: Reports that actually help
|
|
76
|
+
- **Honesty**: Never sugarcoat bad numbers
|
|
77
|
+
|
|
78
|
+
## Saving Results
|
|
79
|
+
|
|
80
|
+
Store analysis reports:
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
Use eon_create tool:
|
|
84
|
+
title: "Analysis: <TOPIC> - <DATE>"
|
|
85
|
+
content: "<full report>"
|
|
86
|
+
type: "semantic"
|
|
87
|
+
project_id: "<PROJECT_ID>"
|
|
88
|
+
category: "report"
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
*Analyze with clarity and truth. Data-driven, methodology-disclosed, actionable.*
|