@nxuss/lemma 1.20.0 → 1.22.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.
Files changed (47) hide show
  1. package/.agents/skills/lemma/SKILL.md +8 -6
  2. package/README.md +4 -2
  3. package/bin/doctor.js +131 -0
  4. package/bin/init.js +71 -23
  5. package/bin/postinstall.js +43 -0
  6. package/dist/cjs/mcp/prompts.d.ts +1 -1
  7. package/dist/cjs/mcp/prompts.d.ts.map +1 -1
  8. package/dist/cjs/mcp/prompts.js +1 -1
  9. package/dist/cjs/mcp/tool-profiles.d.ts.map +1 -1
  10. package/dist/cjs/mcp/tool-profiles.js +9 -0
  11. package/dist/cjs/mcp/tool-profiles.js.map +1 -1
  12. package/dist/cjs/mcp/tools/analysis.d.ts.map +1 -1
  13. package/dist/cjs/mcp/tools/analysis.js +51 -20
  14. package/dist/cjs/mcp/tools/analysis.js.map +1 -1
  15. package/dist/cjs/mcp/tools/memory.d.ts +4 -4
  16. package/dist/cjs/mcp/tools/memory.d.ts.map +1 -1
  17. package/dist/cjs/mcp/tools/memory.js +217 -11
  18. package/dist/cjs/mcp/tools/memory.js.map +1 -1
  19. package/dist/cjs/mcp/tools.d.ts.map +1 -1
  20. package/dist/cjs/mcp/tools.js +4 -1
  21. package/dist/cjs/mcp/tools.js.map +1 -1
  22. package/dist/cjs/subconscious/TheBrainV2.d.ts +102 -1
  23. package/dist/cjs/subconscious/TheBrainV2.d.ts.map +1 -1
  24. package/dist/cjs/subconscious/TheBrainV2.js +255 -10
  25. package/dist/cjs/subconscious/TheBrainV2.js.map +1 -1
  26. package/dist/esm/mcp/prompts.d.ts +1 -1
  27. package/dist/esm/mcp/prompts.d.ts.map +1 -1
  28. package/dist/esm/mcp/prompts.js +1 -1
  29. package/dist/esm/mcp/tool-profiles.d.ts.map +1 -1
  30. package/dist/esm/mcp/tool-profiles.js +9 -0
  31. package/dist/esm/mcp/tool-profiles.js.map +1 -1
  32. package/dist/esm/mcp/tools/analysis.d.ts.map +1 -1
  33. package/dist/esm/mcp/tools/analysis.js +52 -21
  34. package/dist/esm/mcp/tools/analysis.js.map +1 -1
  35. package/dist/esm/mcp/tools/memory.d.ts +4 -4
  36. package/dist/esm/mcp/tools/memory.d.ts.map +1 -1
  37. package/dist/esm/mcp/tools/memory.js +217 -11
  38. package/dist/esm/mcp/tools/memory.js.map +1 -1
  39. package/dist/esm/mcp/tools.d.ts.map +1 -1
  40. package/dist/esm/mcp/tools.js +4 -1
  41. package/dist/esm/mcp/tools.js.map +1 -1
  42. package/dist/esm/subconscious/TheBrainV2.d.ts +102 -1
  43. package/dist/esm/subconscious/TheBrainV2.d.ts.map +1 -1
  44. package/dist/esm/subconscious/TheBrainV2.js +253 -10
  45. package/dist/esm/subconscious/TheBrainV2.js.map +1 -1
  46. package/lemma-proxy.cjs +19 -1
  47. package/package.json +4 -1
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: lemma
3
- description: Lemma — cache semántico, firewall de privacidad y memoria cross-sesión para Muse. Usa `lemma call <tool>` vía bash para acceder a 70+ tools sin MCP nativo.
3
+ description: Lemma — cache semántico, firewall de privacidad y memoria cross-sesión para Muse. Usa `lemma call <tool>` vía bash para acceder a 70+ tools sin MCP nativo. Cárgala al iniciar cada sesión: search_memory antes de razonar, store_memory al verificar una solución.
4
4
  user-invocable: true
5
5
  allowed-tools: bash
6
6
  ---
@@ -33,19 +33,20 @@ Si Lemma no encaja, usa tu tool nativo. No fuerces Lemma donde no aporta.
33
33
 
34
34
  ## Cómo llamar a Lemma desde Muse (preferido)
35
35
 
36
- Usa el wrapper `lemma call` — evita craft de JSON-RPC manual y escapa args por ti. Está disponible como `node ./lemma-proxy.cjs call` o `node ./bin/lemma-call.js` o `npx @nxuss/lemma call` si instalaste global.
36
+ Usa el wrapper `lemma call` — evita craft de JSON-RPC manual y escapa args por ti. Está disponible como `lemma call` (instalación global por npm), `npx @nxuss/lemma call`, o local `node ./lemma-proxy.cjs call` / `node ./bin/lemma-call.js`.
37
37
 
38
38
  ```bash
39
39
  # 1. Lookup en memoria antes de razonar (preferido — wrapper)
40
- node ./lemma-proxy.cjs call search_memory --query "tu pregunta"
40
+ lemma call search_memory --query "tu pregunta"
41
41
  # o JSON explícito:
42
- node ./lemma-proxy.cjs call search_memory '{"query":"tu pregunta"}'
42
+ lemma call search_memory '{"query":"tu pregunta"}'
43
+ # (en este repo también vale: node ./lemma-proxy.cjs call search_memory --query "tu pregunta")
43
44
 
44
45
  # 2. Busca en workspace (con scrubbing)
45
- node ./lemma-proxy.cjs call search_workspace --query "texto" --maxResults 10
46
+ lemma call search_workspace --query "texto" --maxResults 10
46
47
 
47
48
  # 3. Guarda solución verificada
48
- node ./lemma-proxy.cjs call store_memory '{"content":"solución verificada","tags":["bugfix"]}'
49
+ lemma call store_memory '{"content":"solución verificada","tags":["bugfix"]}'
49
50
 
50
51
  # 4. Lista tools disponibles
51
52
  node ./lemma-proxy.cjs call --list
@@ -122,3 +123,4 @@ npm i -D @nxuss/lemma && npx lemma init
122
123
  ```
123
124
 
124
125
  > Generado por `lemma init` — @nxuss/lemma para Muse.
126
+ <!-- managed by lemma init (@nxuss/lemma): re-run lemma init after upgrading to refresh -->
package/README.md CHANGED
@@ -27,11 +27,13 @@ to an auditable ledger, never an estimate.
27
27
 
28
28
  ```bash
29
29
  npm install -g @nxuss/lemma
30
- lemma init # auto-configures MCP for your IDE (Claude Code, Cursor, Codex, Windsurf, Kiro, OpenCode)
30
+ lemma init # auto-configures MCP for your IDE (Muse, Claude Code, Cursor, Codex, Windsurf, Kiro, OpenCode)
31
31
  lemma start # gateway + dashboard on http://localhost:8081
32
32
  ```
33
33
 
34
34
  > **Muse** — no setup needed. This repo is already Muse-compatible zero-config: clone and open with `muse` — the skill at `.agents/skills/lemma/SKILL.md` auto-loads and `lemma call` works via `bash`. See [MCP integration](#-mcp-integration).
35
+ >
36
+ > **🆕 v1.22.0 — Lemma auto-activates in every LLM client.** `npm i -g @nxuss/lemma` registers the skill in your **user** catalog (auto-loads in every `muse` session, any project) and `lemma init` wires each project for Muse, Claude Code, Cursor, Codex, Windsurf, Kiro and OpenCode. Health check: `lemma doctor`.
35
37
 
36
38
  ---
37
39
 
@@ -156,7 +158,7 @@ Customize via `lemma.config.json`:
156
158
 
157
159
  | Client | Setup |
158
160
  | :--- | :--- |
159
- | **Muse** (`muse` CLI · Muse Spark) | **Zero-config** clone this repo and open with `muse`; skill at `.agents/skills/lemma/SKILL.md` auto-loads, `lemma call` wrapper via `bash` (no MCP native needed). No `lemma init` required. |
161
+ | **Muse** (`muse` CLI · Muse Spark) | `lemma init` installs the skill into your **user** catalog (`muse skills install --scope user`, auto-loads in every session) + project skill; `npm i -g @nxuss/lemma` also registers it via postinstall. `lemma call` wrapper via `bash` (no MCP native needed). Health check: `lemma doctor`. |
160
162
  | OpenCode | `lemma init` — registers itself in `~/.opencode.json`, zero config. |
161
163
  | Cursor / Windsurf / Kiro / Antigravity | Settings → MCP → add server, command `lemma mcp`. |
162
164
  | Claude Desktop | Add to `mcpServers`: `{ "lemma": { "command": "npx", "args": ["-y", "@nxuss/lemma", "mcp"] } }` |
package/bin/doctor.js ADDED
@@ -0,0 +1,131 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+
4
+ /**
5
+ * Lemma doctor — verifies the Lemma wiring on this machine / project:
6
+ * wrapper, project skill, user skill (muse), and AGENTS.md block.
7
+ *
8
+ * Usage: `lemma doctor` (exit 0 = usable, exit 1 = wrapper broken).
9
+ */
10
+
11
+ const { execFileSync } = require('child_process');
12
+ const fs = require('fs');
13
+ const os = require('os');
14
+ const path = require('path');
15
+
16
+ const CYAN = '\x1b[36m', GREEN = '\x1b[32m', YELLOW = '\x1b[33m', DIM = '\x1b[2m', RESET = '\x1b[0m', BOLD = '\x1b[1m';
17
+
18
+ function ok(msg) { process.stdout.write(` ${GREEN}✓${RESET} ${msg}\n`); }
19
+ function warn(msg) { process.stdout.write(` ${YELLOW}!${RESET} ${msg}\n`); }
20
+ function fail(msg) { process.stdout.write(` ${YELLOW}✗${RESET} ${msg}\n`); }
21
+
22
+ function shortErr(e) {
23
+ try {
24
+ const raw = (e && (e.stderr || e.stdout || e.message)) || '';
25
+ const line = raw.toString().split('\n').map((s) => s.trim()).filter(Boolean)[0] || '';
26
+ return line.slice(0, 160);
27
+ } catch {
28
+ return '';
29
+ }
30
+ }
31
+
32
+ function museOnPath() {
33
+ try {
34
+ if (process.platform === 'win32') return true;
35
+ require('child_process').execSync('command -v muse', { stdio: 'ignore', timeout: 10000 });
36
+ return true;
37
+ } catch {
38
+ return false;
39
+ }
40
+ }
41
+
42
+ function resolveMcpServer(pkgRoot) {
43
+ const candidates = [
44
+ path.join(pkgRoot, 'dist', 'cjs', 'mcp', 'index.js'),
45
+ path.join(pkgRoot, 'mcp-server.js'),
46
+ ];
47
+ return candidates.find((p) => fs.existsSync(p)) || null;
48
+ }
49
+
50
+ async function main() {
51
+ const pkgRoot = path.join(__dirname, '..');
52
+ const cwd = process.cwd();
53
+ let broken = false;
54
+ process.stdout.write(`\n ${BOLD}${CYAN}Lemma Doctor${RESET}\n\n`);
55
+
56
+ // 1. Wrapper + tool catalog (the core: everything else is advice).
57
+ const server = resolveMcpServer(pkgRoot);
58
+ if (!server) {
59
+ fail('no MCP server found (dist/cjs/mcp/index.js nor mcp-server.js) — run npm run build');
60
+ broken = true;
61
+ } else {
62
+ try {
63
+ const out = execFileSync(process.execPath,
64
+ [path.join(pkgRoot, 'bin', 'lemma-call.js'), '--list'],
65
+ { encoding: 'utf8', timeout: 60000, stdio: ['ignore', 'pipe', 'ignore'] });
66
+ const tools = JSON.parse(out);
67
+ ok(`wrapper works via ${path.relative(pkgRoot, server)} — ${tools.length} tools`);
68
+ } catch {
69
+ fail('wrapper failed: `lemma call --list` did not return a tool catalog');
70
+ broken = true;
71
+ }
72
+ }
73
+
74
+ // 2. Project skill (this repo / project).
75
+ const projSkill = path.join(cwd, '.agents', 'skills', 'lemma', 'SKILL.md');
76
+ if (fs.existsSync(projSkill)) {
77
+ const body = fs.readFileSync(projSkill, 'utf8');
78
+ if (body.includes('Cárgala al iniciar')) ok('project skill current (.agents/skills/lemma/SKILL.md)');
79
+ else warn('project skill is stale (pre auto-load trigger) — re-run `lemma init`');
80
+ } else {
81
+ warn('no project skill — run `lemma init` in this project');
82
+ }
83
+
84
+ // 3. User skill (every `muse` session, any project).
85
+ // Note: inside a project that defines its own `lemma` skill, the CLI shadows
86
+ // the user skill (project wins — by design) and `inspect --source user` then
87
+ // reports "not found". Fall back to the on-disk check before crying missing.
88
+ const configHome = process.env.XDG_CONFIG_HOME || path.join(os.homedir(), '.config');
89
+ const userSkillFile = path.join(configHome, 'muse', 'skills', 'lemma', 'SKILL.md');
90
+ const projSkillHere = fs.existsSync(projSkill);
91
+ if (!museOnPath()) {
92
+ warn('muse CLI not on PATH — user skill not applicable here');
93
+ } else {
94
+ try {
95
+ execFileSync('muse', ['skills', 'inspect', 'lemma', '--source', 'user'],
96
+ { stdio: 'pipe', timeout: 30000 });
97
+ ok('user skill installed (auto-loads in every muse session)');
98
+ } catch (e) {
99
+ const detail = shortErr(e);
100
+ if (fs.existsSync(userSkillFile) && projSkillHere) {
101
+ ok('user skill installed (shadowed by this project\u2019s skill here — project wins, as designed)');
102
+ } else if (fs.existsSync(userSkillFile)) {
103
+ warn('user skill files exist but the CLI does not see them' + (detail ? ` (${detail})` : ''));
104
+ } else {
105
+ warn('user skill missing' + (detail ? ` (${detail})` : '') + ' — run `lemma init` or `muse skills install <pkg>/.agents/skills/lemma --scope user --force`');
106
+ }
107
+ }
108
+ }
109
+
110
+ // 4. AGENTS.md block (session-start nudge for AGENTS.md-aware agents).
111
+ const agentsPath = path.join(cwd, 'AGENTS.md');
112
+ if (!fs.existsSync(agentsPath) || !fs.readFileSync(agentsPath, 'utf8').includes('@nxuss/lemma')) {
113
+ warn('no Lemma block in ./AGENTS.md — run `lemma init`');
114
+ } else if (fs.readFileSync(agentsPath, 'utf8').includes('At session')) {
115
+ ok('AGENTS.md block current (session-start guard)');
116
+ } else {
117
+ warn('AGENTS.md block is stale (pre Muse guard) — re-run `lemma init`');
118
+ }
119
+
120
+ process.stdout.write(`\n ${DIM}Brain: ~/.lemma-cache/lemma_brain.json · proxy: lemma-proxy.cjs status${RESET}\n\n`);
121
+ return broken ? 1 : 0;
122
+ }
123
+
124
+ if (require.main === module) {
125
+ main().then((code) => process.exit(code)).catch((e) => {
126
+ console.error('doctor failed:', e.message);
127
+ process.exit(1);
128
+ });
129
+ }
130
+
131
+ module.exports = { main };
package/bin/init.js CHANGED
@@ -4,7 +4,7 @@
4
4
  const fs = require('fs');
5
5
  const path = require('path');
6
6
  const os = require('os');
7
- const { execSync, spawn } = require('child_process');
7
+ const { execSync, execFileSync, spawn } = require('child_process');
8
8
 
9
9
  const LEMMA_CACHE = path.join(os.homedir(), '.lemma-cache');
10
10
  const BRAIN_FILE = path.join(LEMMA_CACHE, 'lemma_brain.json');
@@ -205,7 +205,7 @@ function configureClaudeDesktop() {
205
205
  const FALLBACK_LEMMA_TOOL_NAMES = [
206
206
  'read_workspace_file', 'write_workspace_file', 'create_workspace_file', 'list_workspace_dir',
207
207
  'search_workspace', 'apply_workspace_patch', 'run_workspace_command', 'output_region',
208
- 'search_memory', 'store_memory', 'smarter_cache',
208
+ 'search_memory', 'get_memory', 'store_memory', 'update_memory', 'smarter_cache',
209
209
  'get_project_onboarding', 'get_telepathic_hints', 'get_ast_hologram',
210
210
  'get_symbol_surgical_context', 'compress_context',
211
211
  'squeeze_prompt', 'turbosqueeze', 'wormhole_squeeze',
@@ -282,11 +282,14 @@ tokens sale más cara que los tokens que ahorra.
282
282
  | Agregar un método/función a un archivo existente | \`mcp__lemma__surgical_ast_insert\` | Patch quirúrgico en vez de reescribir el archivo completo |
283
283
  | Antes de aplicar un patch generado | \`mcp__lemma__validate_patch_sandbox\` | Valídalo antes de escribirlo, no después |
284
284
  | "¿Cuánto ahorramos de verdad?" | \`mcp__lemma__token_receipt\` | Bitácora auditable real, no una cifra inventada |
285
+ | Leer una memoria por su id (antes de editarla, o para un id que traes de otra sesión) | \`mcp__lemma__get_memory\` | Lectura determinista: \`search_memory\` es un ranking y puede no devolver la entrada que buscas. Editar un documento vivo sin leerlo antes es editarlo a ciegas |
286
+ | Corregir o extender una memoria que ya existe | \`mcp__lemma__update_memory\` | Reescribe en su sitio conservando id, hits y las aristas \`derivedFrom\`. \`store_memory\` siempre crea un id nuevo: re-guardar una versión corregida deja las dos y la búsqueda devuelve una mezcla arbitraria de ambas |
285
287
  | Guardar una solución para el futuro | \`mcp__lemma__store_memory\` | Solo después de verificarla (tests pasaron, el usuario confirmó) — una solución mala guardada se vuelve un cache hit falso más adelante |
286
288
  | Una memoria salió STALE pero la verificaste y sigue siendo correcta | \`mcp__lemma__refresh_memory\` | Re-ancla la evidencia conservando id, hits y las aristas \`derivedFrom\`; guardar un casi-duplicado pierde las tres (y el dedup suele rechazarlo) |
287
289
  | Una memoria está simplemente mal, no solo mal encajada | \`mcp__lemma__forget_memory\` | Borrado real. Para "no era lo que buscaba en esta consulta" usa \`downvote_memory\`: esa memoria puede ser la correcta para otra pregunta |
288
290
 
289
- Ambas están en el toolbox (\`action="call"\`), no en la lista anunciada.
291
+ El ciclo de vida completo (\`search\` \`get\` \`update\`/\`refresh\`/\`forget\`) está anunciado:
292
+ ante una memoria desactualizada, corrígela; no guardes otra al lado.
290
293
 
291
294
  ## No todas las tools de Lemma están en tu lista
292
295
 
@@ -433,10 +436,13 @@ The MCP server \`lemma\` is connected. For clients with native MCP support
433
436
  (Claude Code, Cursor, Codex, Windsurf, Kiro, OpenCode), NEVER use native tools
434
437
  when a Lemma equivalent exists.
435
438
 
436
- > **Muse Code:** you DO NOT have native \`mcp__lemma__*\` tools. For you,
437
- > \`AGENTS.md\` is advisory. Follow \`.agents/skills/lemma/SKILL.md\` instead
438
- > it has priority and uses \`lemma call\` via bash. Do not enforce the table
439
- > below as a hard block; use it only when \`lemma call\` actually helps.
439
+ > **Muse Code:** you DO NOT have native \`mcp__lemma__*\` tools. At session
440
+ > start, load the \`lemma\` skill (user scope if present, else
441
+ > \`.agents/skills/lemma/SKILL.md\`) and follow it instead of this file it
442
+ > has priority and uses \`lemma call\` via bash. Then call \`search_memory\`
443
+ > with the task topic before reasoning. Do not enforce the table below as a
444
+ > hard block; use \`lemma call\` when it actually helps. If no \`lemma\` skill
445
+ > is installed, tell the user to run \`npx @nxuss/lemma init\`.
440
446
 
441
447
  ## Mandatory Substitutions (MCP-native clients only)
442
448
 
@@ -461,7 +467,7 @@ when a Lemma equivalent exists.
461
467
  2. Call \`search_memory\` with the task topic — recall past solutions
462
468
  3. When done: call \`store_memory\` with the solution
463
469
 
464
- > Muse: use \`node ./lemma-proxy.cjs call <tool>\` (see \`.agents/skills/lemma/SKILL.md\`).
470
+ > Muse: use \`lemma call <tool>\` (or \`node ./lemma-proxy.cjs call <tool>\` in this repo — see \`.agents/skills/lemma/SKILL.md\`).
465
471
 
466
472
  ## Bug Reporting
467
473
 
@@ -571,7 +577,7 @@ function configureKiro() {
571
577
  // OpenCode: register MCP server in opencode.json + Muse skill
572
578
  const MUSE_SKILL_CONTENT = `---
573
579
  name: lemma
574
- description: Lemma — cache semántico, firewall de privacidad y memoria cross-sesión para Muse. Usa lemma call <tool> vía bash para acceder a 70+ tools sin MCP nativo.
580
+ description: Lemma — cache semántico, firewall de privacidad y memoria cross-sesión para Muse. Usa \`lemma call <tool>\` vía bash para acceder a 70+ tools sin MCP nativo. Cárgala al iniciar cada sesión: search_memory antes de razonar, store_memory al verificar una solución.
575
581
  user-invocable: true
576
582
  allowed-tools: bash
577
583
  ---
@@ -604,19 +610,20 @@ Si Lemma no encaja, usa tu tool nativo. No fuerces Lemma donde no aporta.
604
610
 
605
611
  ## Cómo llamar a Lemma desde Muse (preferido)
606
612
 
607
- Usa el wrapper \`lemma call\` — evita craft de JSON-RPC manual y escapa args por ti. Está disponible como \`node ./lemma-proxy.cjs call\` o \`node ./bin/lemma-call.js\` o \`npx @nxuss/lemma call\` si instalaste global.
613
+ Usa el wrapper \`lemma call\` — evita craft de JSON-RPC manual y escapa args por ti. Está disponible como \`lemma call\` (instalación global por npm), \`npx @nxuss/lemma call\`, o local \`node ./lemma-proxy.cjs call\` / \`node ./bin/lemma-call.js\`.
608
614
 
609
615
  \`\`\`bash
610
616
  # 1. Lookup en memoria antes de razonar (preferido — wrapper)
611
- node ./lemma-proxy.cjs call search_memory --query "tu pregunta"
617
+ lemma call search_memory --query "tu pregunta"
612
618
  # o JSON explícito:
613
- node ./lemma-proxy.cjs call search_memory '{"query":"tu pregunta"}'
619
+ lemma call search_memory '{"query":"tu pregunta"}'
620
+ # (en este repo también vale: node ./lemma-proxy.cjs call search_memory --query "tu pregunta")
614
621
 
615
622
  # 2. Busca en workspace (con scrubbing)
616
- node ./lemma-proxy.cjs call search_workspace --query "texto" --maxResults 10
623
+ lemma call search_workspace --query "texto" --maxResults 10
617
624
 
618
625
  # 3. Guarda solución verificada
619
- node ./lemma-proxy.cjs call store_memory '{"content":"solución verificada","tags":["bugfix"]}'
626
+ lemma call store_memory '{"content":"solución verificada","tags":["bugfix"]}'
620
627
 
621
628
  # 4. Lista tools disponibles
622
629
  node ./lemma-proxy.cjs call --list
@@ -693,17 +700,51 @@ npm i -D @nxuss/lemma && npx lemma init
693
700
  \`\`\`
694
701
 
695
702
  > Generado por \`lemma init\` — @nxuss/lemma para Muse.
703
+ <!-- managed by lemma init (@nxuss/lemma): re-run lemma init after upgrading to refresh -->
696
704
  `;
697
705
 
706
+ // Installs the Lemma skill into the user's GLOBAL muse skill catalog so it
707
+ // auto-loads in every `muse` session — not just in projects where `lemma init`
708
+ // was run. Best-effort: never fails `lemma init` — but LOUD about the reason,
709
+ // so a missing user skill is diagnosable instead of silent.
710
+ function shortErr(e) {
711
+ try {
712
+ const raw = (e && (e.stderr || e.stdout || e.message)) || '';
713
+ const line = raw.toString().split('\n').map((s) => s.trim()).filter(Boolean)[0] || '';
714
+ return line.slice(0, 160);
715
+ } catch {
716
+ return '';
717
+ }
718
+ }
719
+
720
+ function configureMuseUserSkill(skillDir) {
721
+ try {
722
+ execSync('command -v muse', { stdio: 'ignore' });
723
+ } catch {
724
+ return { ok: false, reason: 'muse CLI not found on PATH' };
725
+ }
726
+ try {
727
+ execFileSync('muse', ['skills', 'install', skillDir, '--scope', 'user', '--force'],
728
+ { stdio: 'pipe', timeout: 30000 });
729
+ return { ok: true, reason: '' };
730
+ } catch (e) {
731
+ const detail = shortErr(e);
732
+ return { ok: false, reason: 'muse skills install failed' + (detail ? `: ${detail}` : '') };
733
+ }
734
+ }
735
+
698
736
  function configureMuse() {
699
737
  const cwd = process.cwd();
700
738
  const skillDir = path.join(cwd, '.agents', 'skills', 'lemma');
739
+ let project = false;
701
740
  try {
702
741
  ensureDir(skillDir);
703
742
  const skillPath = path.join(skillDir, 'SKILL.md');
704
743
  fs.writeFileSync(skillPath, MUSE_SKILL_CONTENT, 'utf8');
705
- return true;
706
- } catch { return false; }
744
+ project = true;
745
+ } catch { project = false; }
746
+ const userRes = project ? configureMuseUserSkill(skillDir) : { ok: false, reason: 'project skill write failed' };
747
+ return { project, user: userRes.ok, userReason: userRes.reason };
707
748
  }
708
749
 
709
750
  function ensureKiroMigratesAgentsMd() {
@@ -948,9 +989,11 @@ async function main() {
948
989
  configureOpenCode();
949
990
  ok('OpenCode configured (opencode.json MCP + instructions)');
950
991
 
951
- const museOk = configureMuse();
952
- if (museOk) ok('Muse configured (.agents/skills/lemma/SKILL.md)');
953
- else warn('Muse skill could not be configured');
992
+ const museResult = configureMuse();
993
+ if (museResult.project) {
994
+ ok('Muse configured (.agents/skills/lemma/SKILL.md)' + (museResult.user ? ' + user skill (auto-load in every muse session)' : ''));
995
+ if (!museResult.user) warn(`Muse user skill NOT installed — ${museResult.userReason || 'unknown reason'}`);
996
+ } else warn('Muse skill could not be configured');
954
997
 
955
998
  const hasContinue = detectTool('Continue.dev', () => configureContinueDotDev());
956
999
  if (hasContinue) ok('Continue.dev configured');
@@ -998,6 +1041,7 @@ async function main() {
998
1041
  process.stderr.write(` ${GREEN}●${RESET} MCP server ready ${DIM}(lemma mcp)${RESET}\n`);
999
1042
  process.stderr.write(` ${GREEN}●${RESET} Dashboard active ${DIM}(lemma stats)${RESET}\n`);
1000
1043
  process.stderr.write(` ${GREEN}●${RESET} New terminals: env vars auto-loaded\n`);
1044
+ process.stderr.write(` ${DIM}Upkeep: re-run 'lemma init' after upgrading @nxuss/lemma (refreshes skills + rules)${RESET}\n`);
1001
1045
  process.stderr.write(` ${GREEN}●${RESET} Todos los IDE/CLI nuevos ya apuntan al proxy\n`);
1002
1046
  process.stderr.write(` ${gatewayResult.activated ? GREEN + '●' : YELLOW + '○'}${RESET} Claude Code gateway: ${gatewayResult.activated ? 'ACTIVE (model traffic cached)' : 'inactive (MCP tools only)'}\n`);
1003
1047
  process.stderr.write(` ${DIM}──────────────────────────────────────${RESET}\n`);
@@ -1006,7 +1050,11 @@ async function main() {
1006
1050
  process.stderr.write(` ${DIM}Logs: ${LEMMA_CACHE}/proxy-daemon.log${RESET}\n\n`);
1007
1051
  }
1008
1052
 
1009
- main().catch(e => {
1010
- console.error('init failed:', e.message);
1011
- process.exit(1);
1012
- });
1053
+ if (require.main === module) {
1054
+ main().catch(e => {
1055
+ console.error('init failed:', e.message);
1056
+ process.exit(1);
1057
+ });
1058
+ }
1059
+
1060
+ module.exports = { main, configureMuse, configureMuseUserSkill, updateAgentsMd, MUSE_SKILL_CONTENT, LEMMA_RULES_CONTENT };
@@ -0,0 +1,43 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+
4
+ /**
5
+ * Lemma postinstall — registers the Lemma skill in the user's GLOBAL muse
6
+ * catalog so it auto-loads in every `muse` session, with zero extra steps
7
+ * after `npm i [-g] @nxuss/lemma`.
8
+ *
9
+ * Total function: never fails the install, never prints on success, finishes
10
+ * in well under a second when there is nothing to do. No build output needed —
11
+ * skill install only registers a markdown file, it never invokes any tool.
12
+ */
13
+
14
+ const { execSync, execFileSync } = require('child_process');
15
+ const fs = require('fs');
16
+ const path = require('path');
17
+
18
+ function museOnPath() {
19
+ try {
20
+ if (process.platform === 'win32') {
21
+ execFileSync('where', ['muse'], { stdio: 'ignore', timeout: 10000 });
22
+ } else {
23
+ execSync('command -v muse', { stdio: 'ignore', timeout: 10000 });
24
+ }
25
+ return true;
26
+ } catch {
27
+ return false;
28
+ }
29
+ }
30
+
31
+ function main() {
32
+ try {
33
+ const skillDir = path.join(__dirname, '..', '.agents', 'skills', 'lemma');
34
+ if (!fs.existsSync(path.join(skillDir, 'SKILL.md'))) return;
35
+ if (!museOnPath()) return;
36
+ execFileSync('muse', ['skills', 'install', skillDir, '--scope', 'user', '--force'],
37
+ { stdio: 'ignore', timeout: 25000 });
38
+ } catch {
39
+ // Best-effort by contract: npm install must never fail because of this.
40
+ }
41
+ }
42
+
43
+ main();
@@ -8,7 +8,7 @@ import { Server } from "@modelcontextprotocol/sdk/server/index.js";
8
8
  * The full rationale and scoring model live in the `lemma-turbomode` prompt resource, which
9
9
  * the client can fetch on demand instead of carrying permanently.
10
10
  */
11
- export declare const LEMMA_TURBOMODE_PROMPT = "You are operating in LEMMA TURBOMODE. Reduce what enters the model's context \u2014 file reads, command output, repeated reasoning \u2014 without ever costing the user a correct answer. Lemma's own overhead (this prompt + every tool schema) is charged to the ledger before a single token is saved, so optimize for real net savings, not for a multiplier.\n\n## RULES\n\n**0. Tool calls cost tokens too.** A call and its result stay in the transcript and are re-sent every later turn. Expect a Lemma tool to save more than that round-trip costs \u2014 on a small file or short command, reading it directly is cheaper. Never call a reporting tool on a schedule.\n\n**0b. The advertised list is not everything Lemma has.** Situational schemas are withheld to keep per-turn cost down. Before concluding Lemma can't do something, call `lemma_toolbox` (action=\"list\" with a query), then action=\"call\".\n\n**1. Compression is for YOUR context only.** NEVER hand a compressed version to the user \u2014 they get the real, complete file, comments and imports intact. If you reasoned over a squeezed version, re-fetch the original before presenting it.\n\n**2. A cache hit is a hint, not an answer.** `smarter_cache` requires similarity >= 0.8. Always tell the user the answer came from cache. If they're about to act on it (run a command, apply a patch, ship code), verify against current state first \u2014 cached answers go stale. On a MISS or any doubt, reason normally.\n\n**3. Locate before reading only when locating is cheaper.** Don't know which file? `get_ast_hologram` / `search_workspace` beats reading candidates one by one. Already know the file? Read it \u2014 a lookup round-trip on a small file costs more than the file. `read_workspace_file` carries real line numbers and takes offset/limit, so prefer a targeted range on large files.\n\n**4. store_memory only after verification.** Store once the fix actually worked (tests pass, build succeeded, user confirmed) \u2014 not your first attempt. A wrong answer stored here becomes a false cache hit for a future session, and unwinding that costs far more than it saved.\n\n**5. Never trade a required disclosure for brevity.** A cache-hit source or a risky/irreversible action is not filler. One short line.\n\n**6. File-dependent questions \u2192 state_hash_cache, not smarter_cache.** It only hits when the referenced files' hashes are unchanged: a guaranteed-valid answer instead of a similarity guess. Look up before, store after. Use `smarter_cache` only for file-independent questions.\n\n**7. Edit in place.** `apply_workspace_patch` or `surgical_ast_insert` over rewriting a file with `write_workspace_file`; reserve the full write for renames, structural rewrites and new files. For mechanical work, `get_routing_advice` says whether a cheaper model suffices.\n\n**8. \"How much did we save\" \u2192 token_receipt, don't estimate.** It returns a real auditable log. Show the byType breakdown so the user can verify it.\n\n**9. What the toolbox hands you is a candidate, not a verdict.** Auto-fixes, cached patterns and Brain-suggested patches are suggestions. Check a fix addresses the actual failing assertion before applying it.\n\n## SCORING\nCorrectness first, then cost \u2014 a fast wrong answer costs more than a slow right one once you count the round-trip to fix it. A verified cache hit is best; a MISS followed by reasoning from scratch is the normal GOOD outcome, not a failure. A cached or auto-fixed result delivered without disclosure or verification is a FAIL regardless of tokens saved.\n\nFewer tokens for the SAME quality of answer \u2014 never a worse answer for fewer tokens.";
11
+ export declare const LEMMA_TURBOMODE_PROMPT = "You are operating in LEMMA TURBOMODE. Reduce what enters the model's context \u2014 file reads, command output, repeated reasoning \u2014 without ever costing the user a correct answer. Lemma's own overhead (this prompt + every tool schema) is charged to the ledger before a single token is saved, so optimize for real net savings, not for a multiplier.\n\n## RULES\n\n**0. Tool calls cost tokens too.** A call and its result stay in the transcript and are re-sent every later turn. Expect a Lemma tool to save more than that round-trip costs \u2014 on a small file or short command, reading it directly is cheaper. Never call a reporting tool on a schedule.\n\n**0b. The advertised list is not everything Lemma has.** Situational schemas are withheld to keep per-turn cost down. Before concluding Lemma can't do something, call `lemma_toolbox` (action=\"list\" with a query), then action=\"call\".\n\n**1. Compression is for YOUR context only.** NEVER hand a compressed version to the user \u2014 they get the real, complete file, comments and imports intact. If you reasoned over a squeezed version, re-fetch the original before presenting it.\n\n**2. A cache hit is a hint, not an answer.** `smarter_cache` requires similarity >= 0.8. Always tell the user the answer came from cache. If they're about to act on it (run a command, apply a patch, ship code), verify against current state first \u2014 cached answers go stale. On a MISS or any doubt, reason normally.\n\n**3. Locate before reading only when locating is cheaper.** Don't know which file? `get_ast_hologram` / `search_workspace` beats reading candidates one by one. Already know the file? Read it \u2014 a lookup round-trip on a small file costs more than the file. `read_workspace_file` carries real line numbers and takes offset/limit, so prefer a targeted range on large files.\n\n**4. store_memory only after verification.** Store once the fix actually worked (tests pass, build succeeded, user confirmed) \u2014 not your first attempt. A wrong answer stored here becomes a false cache hit for a future session, and unwinding that costs far more than it saved. Correcting something already in the Brain is `update_memory` (read it back with `get_memory` first) \u2014 `store_memory` always mints a new id, so a re-store leaves both versions behind and a later search returns an arbitrary mix of them.\n\n**5. Never trade a required disclosure for brevity.** A cache-hit source or a risky/irreversible action is not filler. One short line.\n\n**6. File-dependent questions \u2192 state_hash_cache, not smarter_cache.** It only hits when the referenced files' hashes are unchanged: a guaranteed-valid answer instead of a similarity guess. Look up before, store after. Use `smarter_cache` only for file-independent questions.\n\n**7. Edit in place.** `apply_workspace_patch` or `surgical_ast_insert` over rewriting a file with `write_workspace_file`; reserve the full write for renames, structural rewrites and new files. For mechanical work, `get_routing_advice` says whether a cheaper model suffices.\n\n**8. \"How much did we save\" \u2192 token_receipt, don't estimate.** It returns a real auditable log. Show the byType breakdown so the user can verify it.\n\n**9. What the toolbox hands you is a candidate, not a verdict.** Auto-fixes, cached patterns and Brain-suggested patches are suggestions. Check a fix addresses the actual failing assertion before applying it.\n\n## SCORING\nCorrectness first, then cost \u2014 a fast wrong answer costs more than a slow right one once you count the round-trip to fix it. A verified cache hit is best; a MISS followed by reasoning from scratch is the normal GOOD outcome, not a failure. A cached or auto-fixed result delivered without disclosure or verification is a FAIL regardless of tokens saved.\n\nFewer tokens for the SAME quality of answer \u2014 never a worse answer for fewer tokens.";
12
12
  export declare function setupPromptsHandlers(server: Server): void;
13
13
  export declare function setupCompletionHandlers(server: Server): void;
14
14
  //# sourceMappingURL=prompts.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../../src/mcp/prompts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAMnE;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB,slHA6BkD,CAAC;AAItF,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAgEzD;AA2CD,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAiB5D"}
1
+ {"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../../src/mcp/prompts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAMnE;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB,s0HA6BkD,CAAC;AAItF,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAgEzD;AA2CD,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAiB5D"}
@@ -33,7 +33,7 @@ exports.LEMMA_TURBOMODE_PROMPT = `You are operating in LEMMA TURBOMODE. Reduce w
33
33
 
34
34
  **3. Locate before reading only when locating is cheaper.** Don't know which file? \`get_ast_hologram\` / \`search_workspace\` beats reading candidates one by one. Already know the file? Read it — a lookup round-trip on a small file costs more than the file. \`read_workspace_file\` carries real line numbers and takes offset/limit, so prefer a targeted range on large files.
35
35
 
36
- **4. store_memory only after verification.** Store once the fix actually worked (tests pass, build succeeded, user confirmed) — not your first attempt. A wrong answer stored here becomes a false cache hit for a future session, and unwinding that costs far more than it saved.
36
+ **4. store_memory only after verification.** Store once the fix actually worked (tests pass, build succeeded, user confirmed) — not your first attempt. A wrong answer stored here becomes a false cache hit for a future session, and unwinding that costs far more than it saved. Correcting something already in the Brain is \`update_memory\` (read it back with \`get_memory\` first) — \`store_memory\` always mints a new id, so a re-store leaves both versions behind and a later search returns an arbitrary mix of them.
37
37
 
38
38
  **5. Never trade a required disclosure for brevity.** A cache-hit source or a risky/irreversible action is not filler. One short line.
39
39
 
@@ -1 +1 @@
1
- {"version":3,"file":"tool-profiles.d.ts","sourceRoot":"","sources":["../../../src/mcp/tool-profiles.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAEnD;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,EA8BnC,CAAC;AAsHF;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,UAAoE,CAAC;AAkBnG,MAAM,WAAW,mBAAmB,CAAC,CAAC,SAAS;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE;IAC7D,OAAO,EAAE,WAAW,CAAC;IACrB,wCAAwC;IACxC,UAAU,EAAE,CAAC,EAAE,CAAC;IAChB,uFAAuF;IACvF,MAAM,EAAE,CAAC,EAAE,CAAC;IACZ,oDAAoD;IACpD,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAED,MAAM,WAAW,cAAc;IAC7B;;;;;OAKG;IACH,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;CACxC;AAED,wBAAgB,kBAAkB,CAAC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,EACnB,GAAG,GAAE,MAAsB,EAC3B,OAAO,GAAE,cAAmB,GAC3B,mBAAmB,CAAC,CAAC,CAAC,CAqDxB;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,EACrD,KAAK,CAAC,EAAE,MAAM,GACb,MAAM,CAuDR"}
@@ -38,9 +38,18 @@ exports.CORE_TOOL_NAMES = [
38
38
  // Avoid re-deriving what was already derived
39
39
  "state_hash_cache",
40
40
  "smarter_cache",
41
+ // The memory lifecycle is advertised as a unit. Announcing only search/store/verify left
42
+ // the two operations the guidance points at next — re-anchor it, or replace it — reachable
43
+ // only through lemma_toolbox, so the cheapest move in front of an outdated memory was to
44
+ // store another one next to it. Four small schemas cost less per turn than one permanent
45
+ // duplicate costs the corpus, forever.
41
46
  "search_memory",
47
+ "get_memory",
42
48
  "store_memory",
49
+ "update_memory",
43
50
  "verify_memory",
51
+ "refresh_memory",
52
+ "forget_memory",
44
53
  // Accounting & routing
45
54
  "token_receipt",
46
55
  "get_routing_advice",
@@ -1 +1 @@
1
- {"version":3,"file":"tool-profiles.js","sourceRoot":"","sources":["../../../src/mcp/tool-profiles.ts"],"names":[],"mappings":";;;;;;AA6NA,gDAyDC;AAMD,kDA0DC;AAtVD,4CAAoB;AACpB,gDAAwB;AACxB,kDAAiD;AAsBjD;;;;GAIG;AACU,QAAA,eAAe,GAAa;IACvC,8BAA8B;IAC9B,qBAAqB;IACrB,oBAAoB;IACpB,kBAAkB;IAClB,kBAAkB;IAClB,uBAAuB;IACvB,eAAe;IACf,oDAAoD;IACpD,uBAAuB;IACvB,sBAAsB;IACtB,uBAAuB;IACvB,qBAAqB;IACrB,wBAAwB;IACxB,wCAAwC;IACxC,kBAAkB;IAClB,6BAA6B;IAC7B,wBAAwB;IACxB,oFAAoF;IACpF,uCAAuC;IACvC,gBAAgB;IA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AM,gGAAgG;QACjH,kFAAkF;QAClF,EAAE;QACF,GAAG,KAAK;QACR,GAAG,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,SAAS,uCAAuC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACrF,EAAE;QACF,2GAA2G;KAC5G,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
1
+ {"version":3,"file":"tool-profiles.js","sourceRoot":"","sources":["../../../src/mcp/tool-profiles.ts"],"names":[],"mappings":";;;;;;AAsOA,gDAyDC;AAMD,kDA0DC;AA/VD,4CAAoB;AACpB,gDAAwB;AACxB,kDAAiD;AAsBjD;;;;GAIG;AACU,QAAA,eAAe,GAAa;IACvC,8BAA8B;IAC9B,qBAAqB;IACrB,oBAAoB;IACpB,kBAAkB;IAClB,kBAAkB;IAClB,uBAAuB;IACvB,eAAe;IACf,oDAAoD;IACpD,uBAAuB;IACvB,sBAAsB;IACtB,uBAAuB;IACvB,qBAAqB;IACrB,wBAAwB;IACxB,wCAAwC;IACxC,kBAAkB;IAClB,6BAA6B;IAC7B,wBAAwB;IACxB,oFAAoF;IACpF,uCAAuC;IACvC,gBAAgB;IAChB,6CAA6C;IAC7C,kBAAkB;IAClB,eAAe;IACf,yFAAyF;IACzF,2FAA2F;IAC3F,yFAAyF;IACzF,yFAAyF;IACzF,uCAAuC;IACvC,eAAe;IACf,YAAY;IACZ,cAAc;IACd,eAAe;IACf,eAAe;IACf,gBAAgB;IAChB,eAAe;IACf,uBAAuB;IACvB,eAAe;IACf,oBAAoB;CACrB,CAAC;AAaF;;;;;;;;;;GAUG;AACH,MAAM,uBAAuB,GAAG,CAAC,CAAC;AAClC,MAAM,4BAA4B,GAAG,IAAI,CAAC;AAE1C,SAAS,gBAAgB,CAAC,GAAW,EAAE,cAA2B;IAChE,IAAI,CAAC;QACH,MAAM,KAAK,GAAG,IAAA,uBAAW,EAAC,GAAG,CAAC,CAAC;QAC/B,MAAM,QAAQ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AASH,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhE,eAAO,MAAM,yBAAyB,EAAE,cAAc,EAsFrD,CAAC;AAy5BF,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAQ9D,CAAC"}
1
+ {"version":3,"file":"analysis.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tools/analysis.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AASH,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhE,eAAO,MAAM,yBAAyB,EAAE,cAAc,EAsFrD,CAAC;AA07BF,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAQ9D,CAAC"}