@repomem/memory 0.1.6 → 0.1.7

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 CHANGED
@@ -6,7 +6,7 @@
6
6
  > CLI command: `repomem-memory`.
7
7
 
8
8
  `@repomem/memory` is a local [Model Context Protocol](https://modelcontextprotocol.io)
9
- (MCP) server that turns a `memory/` folder in your repository into searchable,
9
+ (MCP) server that turns a `.repomem/memory/` folder in your repository into searchable,
10
10
  shared context for AI assistants. Decisions, conventions, limitations,
11
11
  learnings and project context live as reviewable markdown files with structured
12
12
  frontmatter, versioned with git and shared through normal pull requests. AI
@@ -32,7 +32,7 @@ Design principles:
32
32
 
33
33
  ## Quick start
34
34
 
35
- Scaffold a `memory/` folder in your repo (no install needed, `npx` fetches it):
35
+ Scaffold the `.repomem/memory/` folder in your repo (no install needed, `npx` fetches it):
36
36
 
37
37
  ```bash
38
38
  npx --package @repomem/memory repomem-memory init
@@ -53,9 +53,28 @@ npx --package @repomem/memory repomem-memory validate
53
53
 
54
54
  `validate` exits non-zero on any problem, so it fits in a pre-commit hook or CI.
55
55
 
56
+ ## Getting agents to actually use it
57
+
58
+ An agent only benefits from memory if it consults it. repomem reinforces the
59
+ protocol at three levels, so it also works with a generic agent that never
60
+ loaded the repomem agent config:
61
+
62
+ 1. **MCP `instructions`** — on `initialize` the server sends a short protocol
63
+ to the client: call `memory_for_path` for each file and `search_memory` per
64
+ concept *before* editing, then `propose_memory` (drafts only) and validate
65
+ when done. Clients that surface server instructions put this in the model's
66
+ context. Not every client does; check yours.
67
+ 2. **Tool descriptions** — each tool says *when* to call it ("call this BEFORE
68
+ you modify a file"), because descriptions are shown to the model by every
69
+ MCP client.
70
+ 3. **Skills** (`repomem setup`) — the longer `repomem-memory` and
71
+ `repomem-distill` playbooks, installed under `.kiro/skills/`.
72
+
73
+ This is guidance, not enforcement: nothing forces a model to call a tool.
74
+
56
75
  ## Entry format
57
76
 
58
- Entries live at `memory/<type>s/<slug>.md`. The `id` of an entry is its file
77
+ Entries live at `.repomem/memory/<type>s/<slug>.md`. The `id` of an entry is its file
59
78
  slug. Each file starts with YAML frontmatter:
60
79
 
61
80
  ```markdown
@@ -181,7 +200,7 @@ runs in. To point at a specific folder, add `"--root", "/path/to/memory"` to
181
200
 
182
201
  ```bash
183
202
  repomem-memory serve [--root <dir>] # start the MCP server over stdio (what agents invoke)
184
- repomem-memory init [--root <dir>] # scaffold memory/ with templates and a README
203
+ repomem-memory init [--root <dir>] # scaffold .repomem/memory/ with templates and a README
185
204
  repomem-memory validate [--root <dir>] # validate frontmatter, supersedes refs, and scan for secrets
186
205
  repomem-memory setup --agent kiro # install skills, hooks and MCP config for an agent
187
206
  ```
@@ -1,56 +1,64 @@
1
1
  ---
2
2
  name: repomem-distill
3
- description: How to distill a finished piece of work into durable repomem entries. Use as the FINAL STEP after executing a plan or completing a substantial task — review what the session produced and propose the decisions, learnings, limitations, and context worth keeping for next time.
3
+ description: Final step after executing a plan or completing a substantial task. Review what the session produced and propose the decisions, learnings, limitations and context worth keeping, then validate them. Do not skip it because the task "felt small": decide explicitly whether anything durable came out of it.
4
4
  ---
5
5
 
6
6
  # repomem — distilling a session into memory
7
7
 
8
- When you finish executing a plan or a substantial task, the valuable knowledge
9
- lives only in this session: why you chose an approach, what surprised you, what
10
- constraints you hit. Once the session ends, it is gone unless you write it down.
11
- This skill is the final step of a plan: turn that knowledge into a small number
12
- of durable `repomem` entries.
8
+ When you finish a plan or a substantial task, the valuable knowledge lives only
9
+ in this session: why you chose an approach, what surprised you, what
10
+ constraints you hit. Once the session ends it is gone unless you write it down.
13
11
 
14
- This is NOT about saving the plan. Do not persist the step-by-step plan, task
15
- lists, progress logs, or any other ephemeral session state — that noise does not
16
- belong in memory and the agent's own session already holds it. Distill only
12
+ This is NOT about saving the plan. Do not persist step-by-step plans, task
13
+ lists, progress logs or any other ephemeral session state. Distill only
17
14
  knowledge that will still matter weeks from now.
18
15
 
19
- ## When to run it
16
+ ## Checklist (run in this order)
20
17
 
21
- - As the explicit final step after completing a plan or a non-trivial task.
22
- - When the user asks you to "record" or "distill" what was done.
18
+ 1. **Recall what already exists.** Call `search_memory` for each topic you are
19
+ about to write, and `memory_for_path` on the main files you changed. You are
20
+ looking for duplicates to extend and entries your work made false.
21
+ 2. **Decide what is durable.** For each candidate ask: would a teammate who was
22
+ not here make a worse decision without it?
23
+ - **decision** — a non-obvious choice and the reasoning, including the
24
+ alternative you rejected.
25
+ - **learning** — something that surprised you or cost time.
26
+ - **limitation** — a constraint or gotcha, including things you could NOT
27
+ verify (for example "only tested on SQLite").
28
+ - **context** — newly worth-writing-down understanding of what a thing is
29
+ and how it fits.
30
+ - **convention** — a rule future changes must follow (for example "every use
31
+ case that mutates X must call Y"), ideally with the test that enforces it.
23
32
 
24
- ## What to distill
33
+ If nothing qualifies, propose nothing. A clean "no entries needed" is a
34
+ valid outcome; do not invent memory.
35
+ 3. **Propose.** One `propose_memory` call per item, with a conclusion-style
36
+ `title`, the right `type`, `tags`, and `related_paths` globs that a later
37
+ `memory_for_path` would hit (the main source file AND the test or doc a
38
+ maintainer would be editing). There is no `scope` parameter: module scope is
39
+ expressed through `related_paths` and `tags`.
40
+ 4. **Supersede, don't contradict.** If your work replaces an earlier decision,
41
+ pass `supersedes` on the new entry. Call `deprecate_memory` when no
42
+ replacement is needed.
43
+ 5. **Refresh the map.** If the `repomem-map-structure` skill is available,
44
+ follow "Keeping summaries fresh" there for the files you created or changed.
45
+ 6. **Validate.** Run `npx --package @repomem/memory repomem-memory validate` and
46
+ fix what it reports. If you cannot run it, say so explicitly.
47
+ 7. **Report.** In the final message list the entries you proposed (ids), say
48
+ they are drafts for human review, and mention validation status. Never mark
49
+ an entry `accepted` yourself.
25
50
 
26
- Review the session and identify, if any:
51
+ ## Tools used
27
52
 
28
- - **decisions** — non-obvious choices and the reasoning behind them.
29
- - **learnings** — things that surprised you or cost time, worth remembering.
30
- - **limitations** — new constraints or gotchas you discovered.
31
- - **context** — project or module-level understanding that changed or is newly
32
- worth writing down (what a thing is, why it exists, how it fits together).
33
-
34
- If nothing durable came out of the work, propose nothing. A clean "no entries
35
- needed" is a valid outcome — do not invent memory.
36
-
37
- ## How to do it
38
-
39
- 1. Reflect on what the session actually accomplished and changed.
40
- 2. For each durable item, call `propose_memory` once, with:
41
- - a clear, specific `title`,
42
- - the right `type` (decision / convention / limitation / learning / context),
43
- - meaningful `related_paths` so `memory_for_path` can surface it later,
44
- - a `scope`: `project` for repo-wide knowledge, or a module name
45
- (e.g. `db`, `auth`, `frontend`) for module-specific knowledge.
46
- 3. Keep each entry focused: one decision/learning/limitation/context per file.
47
- 4. **Never** mark an entry `accepted` yourself. Every entry is a `draft` for a
48
- human to review and accept in the same pull request as the code.
49
- 5. Remind the user to run `npx --package @repomem/memory repomem-memory validate` before committing.
53
+ - `search_memory(query, type?, tags?)`, `memory_for_path(path)` — recall.
54
+ - `propose_memory(type, title, body, tags?, related_paths?, supersedes?)` —
55
+ always creates a draft.
56
+ - `deprecate_memory(id, reason, superseded_by?)` — retire an entry without a
57
+ replacement.
50
58
 
51
59
  ## Guidelines
52
60
 
53
61
  - Prefer a few high-signal entries over many shallow ones.
54
- - Write for a teammate (human or AI) who was not in this session.
55
- - Reuse existing entries by proposing a `supersedes` reference when a decision
56
- replaces an earlier one, rather than silently contradicting it.
62
+ - Write for someone who was not in this session; no "as discussed above".
63
+ - Record unverified assumptions as limitations rather than leaving them only in
64
+ the chat summary.
@@ -1,41 +1,73 @@
1
1
  ---
2
2
  name: repomem-memory
3
- description: How to use the repomem MCP server to record and recall a repository's shared memory — decisions, conventions, limitations, and learnings. Use when you make a non-obvious choice worth remembering, when you need prior context before changing code, or when the user asks what the team already decided.
3
+ description: Mandatory protocol for the repository's shared memory (decisions, conventions, limitations, learnings, context). Use at the START of every task that will modify files, however familiar the code feels, and again before finishing. Also use when the user asks "why is it this way?" or what the team already decided.
4
4
  ---
5
5
 
6
6
  # repomem — the repository's shared memory
7
7
 
8
- repomem turns a `memory/` folder into searchable, git-versioned context served
8
+ repomem turns `.repomem/memory/` into searchable, git-versioned context served
9
9
  over MCP. Entries are markdown files with structured frontmatter, grouped by
10
- type: `decisions/`, `conventions/`, `limitations/`, `learnings/`.
10
+ type: `decisions/`, `conventions/`, `limitations/`, `learnings/`, `contexts/`.
11
11
 
12
- ## When to use it
12
+ Project docs tell you what the project is meant to be; memory tells you what the
13
+ team decided and what bit them. Having read the docs is NOT a reason to skip
14
+ this protocol.
13
15
 
14
- - **Before changing unfamiliar code**: search memory for related decisions and
15
- limitations so you don't contradict an earlier choice.
16
- - **After making a non-obvious decision**: propose a new entry so the rationale
17
- survives beyond the current conversation.
18
- - **When the user asks "why is it this way?"**: look it up instead of guessing.
16
+ ## Protocol
17
+
18
+ **Before editing** (any task that changes files, however familiar the code feels):
19
+
20
+ 1. Call `memory_for_path` once for each file you are about to modify (or its
21
+ directory's main file). It matches entries by their `related_paths` globs.
22
+ 2. Call `search_memory` with the one to three main concepts of the task. One
23
+ search per concept, not one search for the whole task.
24
+ 3. Call `get_memory` for anything relevant. If an entry contradicts your plan,
25
+ surface it to the user before coding; do not silently override it.
26
+
27
+ An empty result is a valid answer: say so in one line and move on. Do not treat
28
+ it as "memory does not apply to this repo"; the repo may simply be young.
29
+
30
+ **While working**: when you make a non-obvious choice (you picked A over B for a
31
+ reason a teammate could not guess), note it for the end-of-task distill.
32
+
33
+ **After finishing**: follow `repomem-distill` (propose entries, then validate).
19
34
 
20
35
  ## The propose-then-review workflow
21
36
 
22
37
  AI tools **propose** entries as drafts (`status: draft`). A human reviews and
23
38
  **accepts** them in the same pull request as the related change. Never mark an
24
- entry `accepted` yourself — leave it as a draft for review.
39
+ entry `accepted` yourself.
25
40
 
26
41
  ## Tools
27
42
 
28
- - `search_memory` — full-text search across all entries. Start here.
29
- - `get_memory` — fetch a specific entry by slug.
30
- - `memory_for_path` — find entries whose `related_paths` match a file you are
31
- about to touch.
32
- - Write tools propose new draft entries; prefer small, specific entries with a
33
- clear title and `related_paths`.
43
+ - `search_memory(query, type?, tags?)` — full-text search. Deprecated entries
44
+ are excluded by default.
45
+ - `get_memory(id)` — full entry by slug (the `id` returned by search).
46
+ - `memory_for_path(path)` — entries whose `related_paths` match a
47
+ repository-relative file path; accepted entries rank above drafts.
48
+ - `propose_memory(type, title, body, tags?, related_paths?, supersedes?)` —
49
+ creates a DRAFT. Rejects a title whose id already exists for that type and
50
+ never overwrites. There is no `scope` parameter: express module scope with
51
+ `related_paths` and `tags`.
52
+ - `deprecate_memory(id, reason, superseded_by?)` — mark an entry obsolete. Use
53
+ it (or `supersedes` on the replacement) when your work makes an earlier entry
54
+ false; do not leave contradicting entries live.
55
+
56
+ ## Writing good entries
57
+
58
+ - One decision, convention, limitation, learning or context per entry.
59
+ - The title states the conclusion ("X is recorded at write time, not
60
+ reconstructed"), not the topic ("About X").
61
+ - Always set `related_paths` with globs that a future `memory_for_path` call
62
+ would actually hit: include the main source file AND the test or doc a
63
+ maintainer would be editing when they need this entry.
64
+ - Body: what, why (the rejected alternative and why), and what to do when you
65
+ touch it. Write for someone who was not in this session.
66
+ - Before proposing, `search_memory` for the same topic; extend or supersede an
67
+ existing entry instead of adding a near-duplicate.
34
68
 
35
- ## Guidelines
69
+ ## Before committing
36
70
 
37
- - Keep entries focused: one decision/convention/limitation/learning per file.
38
- - Always set meaningful `related_paths` so `memory_for_path` can surface the
39
- entry later.
40
- - Run `npx --package @repomem/memory repomem-memory validate` before committing — it checks frontmatter, supersedes
41
- references, and scans for secrets.
71
+ Run `npx --package @repomem/memory repomem-memory validate`. It checks
72
+ frontmatter and `supersedes` references, and scans for secrets. Tell the user if
73
+ you could not run it.
package/dist/index.js CHANGED
@@ -9,7 +9,7 @@ import { realpathSync } from "node:fs";
9
9
  import { fileURLToPath } from "node:url";
10
10
  import { resolveMemoryRoot } from "./store.js";
11
11
  import { MemoryIndex } from "./search.js";
12
- import { registerAllTools, SERVER_INFO } from "./server.js";
12
+ import { registerAllTools, SERVER_INFO, SERVER_OPTIONS } from "./server.js";
13
13
  function log(message) {
14
14
  process.stderr.write(`[repomem-memory] ${message}\n`);
15
15
  }
@@ -24,7 +24,7 @@ export async function main(argv = process.argv.slice(2)) {
24
24
  const root = resolveMemoryRoot({ rootFlag: parseRootFlag(argv) });
25
25
  log(`memory root: ${root}`);
26
26
  const index = new MemoryIndex(root);
27
- const server = new McpServer(SERVER_INFO);
27
+ const server = new McpServer(SERVER_INFO, SERVER_OPTIONS);
28
28
  registerAllTools(server, root, index);
29
29
  const transport = new StdioServerTransport();
30
30
  await server.connect(transport);
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE5D,SAAS,GAAG,CAAC,OAAe;IAC1B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,oBAAoB,OAAO,IAAI,CAAC,CAAC;AACxD,CAAC;AAED,kDAAkD;AAClD,SAAS,aAAa,CAAC,IAAc;IACnC,MAAM,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACjC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACxD,OAAO,SAAS,CAAC;AACnB,C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IAC1D,gBAAgB,CAAC,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;IAEtC,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,GAAG,CAAC,uBAAuB,CAAC,CAAC;AAC/B,CAAC;AAED,4EAA4E;AAC5E,yEAAyE;AACzE,0EAA0E;AAC1E,SAAS,iBAAiB;IACxB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC;IAChD,IAAI,CAAC;QACH,OAAO,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,YAAY,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IACxF,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED,IAAI,iBAAiB,EAAE,EAAE,CAAC;IACxB,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAY,EAAE,EAAE;QAC5B,GAAG,CAAC,UAAW,GAAa,CAAC,OAAO,EAAE,CAAC,CAAC;QACxC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * instructions.ts — the protocol text sent to every MCP client on `initialize`.
3
+ *
4
+ * Clients that surface server `instructions` put this in the model's context,
5
+ * so even a generic agent (one that never loaded the repomem skills, hooks or
6
+ * agent config) is told when to call the memory tools. It is deliberately short
7
+ * and imperative; the longer rationale lives in the `repomem-memory` and
8
+ * `repomem-distill` skills, which must stay consistent with this text.
9
+ *
10
+ * Every tool name mentioned here is checked against the registered tools in
11
+ * test/instructions.test.ts, so the text cannot drift from the real API.
12
+ */
13
+ /** The exact command to validate entries. Always scoped: never an unscoped `npx repomem`. */
14
+ export declare const VALIDATE_COMMAND = "npx --package @repomem/memory repomem-memory validate";
15
+ export declare const MEMORY_INSTRUCTIONS = "repomem-memory is this repository's shared memory (decisions, conventions, limitations, learnings, context), stored as git-versioned markdown in .repomem/memory/. Follow this protocol on every task that changes files.\n\nBEFORE editing:\n1. Call memory_for_path once for each file you are about to modify.\n2. Call search_memory once per main concept of the task (not one search for the whole task).\n3. Call get_memory for anything relevant. If an entry contradicts your plan, tell the user before coding; do not silently override it.\nAn empty result is a valid answer: say so in one line and continue. It does not mean memory is irrelevant to this repo.\n\nWHILE working: note any non-obvious choice (you picked A over B for a reason a teammate could not guess).\n\nAFTER finishing:\n1. Decide explicitly whether anything durable came out of the work (a decision with its rejected alternative, a surprise, a constraint, something you could not verify). If nothing, propose nothing.\n2. Call propose_memory once per item. Entries are always created as drafts for human review; never mark one accepted. Set related_paths to globs that include the main source file AND its test or doc. There is no scope parameter: express module scope with related_paths and tags.\n3. If your work makes an earlier entry false, pass supersedes on the new entry, or call deprecate_memory. Do not leave contradicting entries live.\n4. Run `npx --package @repomem/memory repomem-memory validate` and fix what it reports. If you cannot run it, say so.\n";
16
+ //# sourceMappingURL=instructions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instructions.d.ts","sourceRoot":"","sources":["../src/instructions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,6FAA6F;AAC7F,eAAO,MAAM,gBAAgB,0DAA0D,CAAC;AAExF,eAAO,MAAM,mBAAmB,kgDAgB/B,CAAC"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * instructions.ts — the protocol text sent to every MCP client on `initialize`.
3
+ *
4
+ * Clients that surface server `instructions` put this in the model's context,
5
+ * so even a generic agent (one that never loaded the repomem skills, hooks or
6
+ * agent config) is told when to call the memory tools. It is deliberately short
7
+ * and imperative; the longer rationale lives in the `repomem-memory` and
8
+ * `repomem-distill` skills, which must stay consistent with this text.
9
+ *
10
+ * Every tool name mentioned here is checked against the registered tools in
11
+ * test/instructions.test.ts, so the text cannot drift from the real API.
12
+ */
13
+ /** The exact command to validate entries. Always scoped: never an unscoped `npx repomem`. */
14
+ export const VALIDATE_COMMAND = "npx --package @repomem/memory repomem-memory validate";
15
+ export const MEMORY_INSTRUCTIONS = `\
16
+ repomem-memory is this repository's shared memory (decisions, conventions, limitations, learnings, context), stored as git-versioned markdown in .repomem/memory/. Follow this protocol on every task that changes files.
17
+
18
+ BEFORE editing:
19
+ 1. Call memory_for_path once for each file you are about to modify.
20
+ 2. Call search_memory once per main concept of the task (not one search for the whole task).
21
+ 3. Call get_memory for anything relevant. If an entry contradicts your plan, tell the user before coding; do not silently override it.
22
+ An empty result is a valid answer: say so in one line and continue. It does not mean memory is irrelevant to this repo.
23
+
24
+ WHILE working: note any non-obvious choice (you picked A over B for a reason a teammate could not guess).
25
+
26
+ AFTER finishing:
27
+ 1. Decide explicitly whether anything durable came out of the work (a decision with its rejected alternative, a surprise, a constraint, something you could not verify). If nothing, propose nothing.
28
+ 2. Call propose_memory once per item. Entries are always created as drafts for human review; never mark one accepted. Set related_paths to globs that include the main source file AND its test or doc. There is no scope parameter: express module scope with related_paths and tags.
29
+ 3. If your work makes an earlier entry false, pass supersedes on the new entry, or call deprecate_memory. Do not leave contradicting entries live.
30
+ 4. Run \`${VALIDATE_COMMAND}\` and fix what it reports. If you cannot run it, say so.
31
+ `;
32
+ //# sourceMappingURL=instructions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instructions.js","sourceRoot":"","sources":["../src/instructions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,6FAA6F;AAC7F,MAAM,CAAC,MAAM,gBAAgB,GAAG,uDAAuD,CAAC;AAExF,MAAM,CAAC,MAAM,mBAAmB,GAAG;;;;;;;;;;;;;;;WAexB,gBAAgB;CAC1B,CAAC"}
package/dist/server.d.ts CHANGED
@@ -14,6 +14,14 @@ export declare const SERVER_INFO: {
14
14
  readonly name: "repomem-memory";
15
15
  readonly version: "0.1.0";
16
16
  };
17
+ /**
18
+ * Options for `new McpServer(SERVER_INFO, SERVER_OPTIONS)`. `instructions` is
19
+ * delivered on `initialize` so any MCP client can put the protocol in the
20
+ * model's context without loading skills, hooks or a custom agent.
21
+ */
22
+ export declare const SERVER_OPTIONS: {
23
+ readonly instructions: "repomem-memory is this repository's shared memory (decisions, conventions, limitations, learnings, context), stored as git-versioned markdown in .repomem/memory/. Follow this protocol on every task that changes files.\n\nBEFORE editing:\n1. Call memory_for_path once for each file you are about to modify.\n2. Call search_memory once per main concept of the task (not one search for the whole task).\n3. Call get_memory for anything relevant. If an entry contradicts your plan, tell the user before coding; do not silently override it.\nAn empty result is a valid answer: say so in one line and continue. It does not mean memory is irrelevant to this repo.\n\nWHILE working: note any non-obvious choice (you picked A over B for a reason a teammate could not guess).\n\nAFTER finishing:\n1. Decide explicitly whether anything durable came out of the work (a decision with its rejected alternative, a surprise, a constraint, something you could not verify). If nothing, propose nothing.\n2. Call propose_memory once per item. Entries are always created as drafts for human review; never mark one accepted. Set related_paths to globs that include the main source file AND its test or doc. There is no scope parameter: express module scope with related_paths and tags.\n3. If your work makes an earlier entry false, pass supersedes on the new entry, or call deprecate_memory. Do not leave contradicting entries live.\n4. Run `npx --package @repomem/memory repomem-memory validate` and fix what it reports. If you cannot run it, say so.\n";
24
+ };
17
25
  /** Register the read-only memory tools, backed by `index`. */
18
26
  export declare function registerReadTools(server: McpServer, index: MemoryIndex): void;
19
27
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAIpE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AA8B/C,eAAO,MAAM,WAAW;;;CAGd,CAAC;AAEX,8DAA8D;AAC9D,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,WAAW,GAAG,IAAI,CAgD7E;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,SAAS,EACjB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,WAAW,GACjB,IAAI,CAoGN;AAED,yCAAyC;AACzC,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,SAAS,EACjB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,WAAW,GACjB,IAAI,CAGN"}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAIpE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AA+B/C,eAAO,MAAM,WAAW;;;CAGd,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,cAAc;;CAEjB,CAAC;AAEX,8DAA8D;AAC9D,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,WAAW,GAAG,IAAI,CAmD7E;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,SAAS,EACjB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,WAAW,GACjB,IAAI,CA6GN;AAED,yCAAyC;AACzC,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,SAAS,EACjB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,WAAW,GACjB,IAAI,CAGN"}
package/dist/server.js CHANGED
@@ -11,6 +11,7 @@
11
11
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
12
12
  import * as z from "zod";
13
13
  import { entryTypeSchema } from "./schema.js";
14
+ import { MEMORY_INSTRUCTIONS } from "./instructions.js";
14
15
  import { proposeEntry, deprecateEntry, entriesForPath, } from "./store.js";
15
16
  function jsonResult(payload) {
16
17
  return {
@@ -36,11 +37,22 @@ export const SERVER_INFO = {
36
37
  name: "repomem-memory",
37
38
  version: "0.1.0",
38
39
  };
40
+ /**
41
+ * Options for `new McpServer(SERVER_INFO, SERVER_OPTIONS)`. `instructions` is
42
+ * delivered on `initialize` so any MCP client can put the protocol in the
43
+ * model's context without loading skills, hooks or a custom agent.
44
+ */
45
+ export const SERVER_OPTIONS = {
46
+ instructions: MEMORY_INSTRUCTIONS,
47
+ };
39
48
  /** Register the read-only memory tools, backed by `index`. */
40
49
  export function registerReadTools(server, index) {
41
50
  server.registerTool("search_memory", {
42
51
  title: "Search memory",
43
52
  description: "Search the repository's memory for decisions, conventions, limitations, learnings and context. " +
53
+ "Call this BEFORE starting any task that changes files: once per main concept of the task " +
54
+ "(e.g. one search for \"retry policy\", another for \"auth\"), not one search for the whole task. " +
55
+ "An empty result is a valid answer, not a reason to skip memory. " +
44
56
  "Returns short summaries (id, type, title, status, snippet). Deprecated entries are " +
45
57
  "excluded by default. Use get_memory with an id to read the full entry.",
46
58
  inputSchema: {
@@ -86,6 +98,9 @@ export function registerWriteTools(server, root, index) {
86
98
  server.registerTool("memory_for_path", {
87
99
  title: "Memory for a path",
88
100
  description: "Return memory entries whose related_paths globs match the given file path. " +
101
+ "Call this BEFORE you modify a file, once for each file you are about to change, " +
102
+ "even if the code feels familiar: it surfaces decisions and limitations that bind that file. " +
103
+ "If an entry contradicts your plan, tell the user before coding. " +
89
104
  "Accepted entries are prioritized over drafts; deprecated entries are excluded.",
90
105
  inputSchema: {
91
106
  path: z
@@ -109,9 +124,13 @@ export function registerWriteTools(server, root, index) {
109
124
  });
110
125
  server.registerTool("propose_memory", {
111
126
  title: "Propose a memory entry",
112
- description: "Propose a new memory entry. It is ALWAYS created as a draft for a human to review " +
113
- "and accept in a pull request. Rejects duplicates (a title whose id already exists " +
114
- "for that type). Never overwrites existing entries.",
127
+ description: "Propose a new memory entry. Call this AFTER you finish a task, once per durable item " +
128
+ "(a non-obvious decision and the alternative you rejected, a surprise, a constraint, " +
129
+ "something you could not verify); propose nothing if nothing durable came out of the work. " +
130
+ "Do not store plans or progress logs. It is ALWAYS created as a draft for a human to review " +
131
+ "and accept in a pull request; never mark an entry accepted yourself. Set related_paths to " +
132
+ "globs covering the source file and its test or doc. Rejects duplicates (a title whose id " +
133
+ "already exists for that type). Never overwrites existing entries.",
115
134
  inputSchema: {
116
135
  type: entryTypeSchema.describe("decision | convention | limitation | learning | context"),
117
136
  title: z.string().min(1).describe("A concise, human-readable title"),
@@ -144,7 +163,9 @@ export function registerWriteTools(server, root, index) {
144
163
  server.registerTool("deprecate_memory", {
145
164
  title: "Deprecate a memory entry",
146
165
  description: "Mark an existing memory entry as deprecated, recording the reason (and optionally " +
147
- "the id of the entry that supersedes it).",
166
+ "the id of the entry that supersedes it). Use it when your work makes an earlier entry " +
167
+ "false or obsolete and no replacement is needed; when you are writing a replacement, " +
168
+ "pass supersedes to propose_memory instead. Do not leave contradicting entries live.",
148
169
  inputSchema: {
149
170
  id: z.string().min(1).describe("The id of the entry to deprecate"),
150
171
  reason: z.string().min(1).describe("Why the entry is being deprecated"),
@@ -1 +1 @@
1
- {"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,eAAe,EAAoB,MAAM,aAAa,CAAC;AAEhE,OAAO,EACL,YAAY,EACZ,cAAc,EACd,cAAc,GACf,MAAM,YAAY,CAAC;AAEpB,SAAS,UAAU,CAAC,OAAgB;IAClC,OAAO;QACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;KACpE,CAAC;AACJ,CAAC;AAED,SAAS,WAAW,CAAC,OAAe;IAClC,OAAO;QACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE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M,MAAM,GAAG,MAAM,cAAc,CAAC,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,aAAa,CAAC,CAAC;YACrE,MAAM,KAAK,CAAC,gBAAgB,EAAE,CAAC;YAC/B,OAAO,UAAU,CAAC;gBAChB,MAAM,EAAE,YAAY;gBACpB,EAAE,EAAE,MAAM,CAAC,EAAE;gBACb,IAAI,EAAE,MAAM,CAAC,IAAI;aAClB,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO,WAAW,CAAC,4BAA6B,GAAa,CAAC,OAAO,EAAE,CAAC,CAAC;QAC3E,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC;AAED,yCAAyC;AACzC,MAAM,UAAU,gBAAgB,CAC9B,MAAiB,EACjB,IAAY,EACZ,KAAkB;IAElB,iBAAiB,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IACjC,kBAAkB,CAAC,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;AAC1C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@repomem/memory",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "Your repo's memory, available to every AI tool your team uses. A local MCP server that turns a memory/ folder into searchable shared context.",
5
5
  "license": "MIT",
6
6
  "author": "Nicolás Rickert",