lemma-mcp 0.11.2 → 0.11.3
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/README.md +8 -0
- package/assets/visualizer-demo.gif +0 -0
- package/dist/memory/seed.d.ts.map +1 -1
- package/dist/memory/seed.js +41 -0
- package/dist/memory/seed.js.map +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -4,10 +4,18 @@
|
|
|
4
4
|
|
|
5
5
|
# Lemma — Persistent Memory for LLMs via MCP
|
|
6
6
|
|
|
7
|
+
[](https://www.npmjs.com/package/lemma-mcp) [](https://opensource.org/licenses/MIT)
|
|
8
|
+
|
|
7
9
|
[English](README.md) | [Türkçe](docs/README.tr.md)
|
|
8
10
|
|
|
9
11
|
Lemma is an MCP server that gives LLMs persistent, cross-session memory. Memories are injected automatically into every session — no explicit tool call needed. Knowledge evolves through use: frequently accessed memories strengthen, unused ones fade, and patterns are promoted into reusable skills. An autonomous intelligence layer runs in the background — detecting conflicts, suggesting actions, and auto-linking related knowledge.
|
|
10
12
|
|
|
13
|
+
<p align="center">
|
|
14
|
+
<img src="assets/visualizer-demo.gif" width="700" alt="Lemma Memory Visualizer Demo">
|
|
15
|
+
</p>
|
|
16
|
+
|
|
17
|
+
<p align="center"><em>Memory Visualizer — <code>lemma -vis</code></em></p>
|
|
18
|
+
|
|
11
19
|
## Quick Start
|
|
12
20
|
|
|
13
21
|
Add Lemma to your MCP client configuration:
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seed.d.ts","sourceRoot":"","sources":["../../src/memory/seed.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"seed.d.ts","sourceRoot":"","sources":["../../src/memory/seed.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAqKlD,wBAAgB,UAAU,CAAC,MAAM,EAAE,cAAc,EAAE,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAmDxF;AAED,wBAAgB,YAAY,IAAI,MAAM,CAErC;AAED,wBAAgB,UAAU,IAAI,MAAM,EAAE,CAErC"}
|
package/dist/memory/seed.js
CHANGED
|
@@ -109,6 +109,47 @@ AI-assisted development changes which code quality principles matter most. Tradi
|
|
|
109
109
|
- Code churn increases from 3.1% to 5.7% with AI adoption — don't neglect refactoring
|
|
110
110
|
- AI tends to copy-paste instead of refactor — always check cross-file impact`,
|
|
111
111
|
},
|
|
112
|
+
{
|
|
113
|
+
id: "seed_senior_engineer_role",
|
|
114
|
+
title: "Senior Engineering Mindset",
|
|
115
|
+
description: "Principal engineer role for software/coding tasks. Full comprehension before action, context-first, production-grade output.",
|
|
116
|
+
type: "pattern",
|
|
117
|
+
fragment: `## Senior Engineering Mindset (Software & Coding Tasks Only)
|
|
118
|
+
|
|
119
|
+
### Context
|
|
120
|
+
When the task involves writing, reviewing, or modifying code — adopt the role of a Principal Engineer and System Architect with deep production-scale experience. This role applies ONLY to software engineering tasks, not to general conversation, research, or content work.
|
|
121
|
+
|
|
122
|
+
### Activation Scope
|
|
123
|
+
ACTIVE when task involves: coding, debugging, refactoring, architecture, API design, system design, code review, performance optimization, security review, build/deploy configuration.
|
|
124
|
+
INACTIVE for: general questions, content writing, research, translations, casual conversation.
|
|
125
|
+
|
|
126
|
+
### Pre-Code Protocol (Mandatory)
|
|
127
|
+
1. **COMPREHEND** the full codebase context BEFORE proposing changes: architecture, file hierarchy, module relationships, dependency chains, data flow, state management, API contracts
|
|
128
|
+
2. **TRACE the impact** — identify every component affected by the proposed change
|
|
129
|
+
3. **ASSESS risks** — side-effects, scalability, security, performance, backward compatibility
|
|
130
|
+
4. **STATE intent** — briefly confirm what will change and why, before writing code
|
|
131
|
+
|
|
132
|
+
### Engineering Standards
|
|
133
|
+
- Every change must be production-grade: no shortcuts, no TODO hacks, no "we'll fix it later"
|
|
134
|
+
- Preserve existing design patterns and conventions — deviate only when there is clear, measurable benefit
|
|
135
|
+
- Minimum viable change with maximum impact — no unnecessary rewrites
|
|
136
|
+
- Maintain full compatibility with surrounding systems
|
|
137
|
+
- Prioritize readability, maintainability, and team scalability
|
|
138
|
+
|
|
139
|
+
### Change Principles
|
|
140
|
+
- Think before coding. Understand before modifying. Analyze before suggesting.
|
|
141
|
+
- If context is insufficient, explicitly state what additional files or systems need examination
|
|
142
|
+
- When unsure about a design decision, surface the trade-off rather than silently choosing one side
|
|
143
|
+
- One logical change per step — verify each step before proceeding
|
|
144
|
+
- Preserve long-term project health over short-term convenience
|
|
145
|
+
|
|
146
|
+
### Rules
|
|
147
|
+
- NEVER write code without understanding why the existing code is the way it is
|
|
148
|
+
- NEVER assume — if something is unclear, investigate or ask
|
|
149
|
+
- NEVER break existing functionality for the sake of a "cleaner" implementation
|
|
150
|
+
- ALWAYS consider: "What breaks if this change is wrong?" — and mitigate accordingly
|
|
151
|
+
- ALWAYS match the existing code style, naming conventions, and patterns of the project`,
|
|
152
|
+
},
|
|
112
153
|
];
|
|
113
154
|
export function seedMemory(memory) {
|
|
114
155
|
const existingIds = new Set(memory.map(f => f.id));
|
package/dist/memory/seed.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seed.js","sourceRoot":"","sources":["../../src/memory/seed.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,MAAM,QAAQ,GAAG,YAAY,CAAC;AAU9B,MAAM,KAAK,GAAgB;IACzB;QACE,EAAE,EAAE,sBAAsB;QAC1B,KAAK,EAAE,4BAA4B;QACnC,WAAW,EAAE,kGAAkG;QAC/G,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wDA8B0C;KACrD;IACD;QACE,EAAE,EAAE,yBAAyB;QAC7B,KAAK,EA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
|
{
|
|
2
2
|
"name": "lemma-mcp",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.3",
|
|
4
4
|
"description": "Persistent memory layer for LLMs via MCP",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
"files": [
|
|
17
17
|
"dist",
|
|
18
18
|
"assets/visualizer.html",
|
|
19
|
+
"assets/visualizer-demo.gif",
|
|
19
20
|
"README.md",
|
|
20
21
|
"README.tr.md",
|
|
21
22
|
"LICENSE"
|