@hir4ta/mneme 0.24.1 → 0.24.2
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/.claude-plugin/plugin.json +1 -1
- package/README.ja.md +1 -1
- package/README.md +1 -1
- package/dist/server.js +1 -1
- package/package.json +1 -1
- package/skills/save/SKILL.md +53 -13
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mneme",
|
|
3
3
|
"description": "A plugin that provides long-term memory for Claude Code. It automatically saves context lost during auto-compact, offering features for session restoration, recording technical decisions, and learning developer patterns.",
|
|
4
|
-
"version": "0.24.
|
|
4
|
+
"version": "0.24.2",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "hir4ta"
|
|
7
7
|
},
|
package/README.ja.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# mneme
|
|
2
2
|
|
|
3
|
-

|
|
4
4
|

|
|
5
5
|
[](https://www.npmjs.com/package/@hir4ta/mneme)
|
|
6
6
|
[](https://github.com/hir4ta/mneme/blob/main/LICENSE)
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# mneme
|
|
2
2
|
|
|
3
|
-

|
|
4
4
|

|
|
5
5
|
[](https://www.npmjs.com/package/@hir4ta/mneme)
|
|
6
6
|
[](https://github.com/hir4ta/mneme/blob/main/LICENSE)
|
package/dist/server.js
CHANGED
package/package.json
CHANGED
package/skills/save/SKILL.md
CHANGED
|
@@ -5,7 +5,7 @@ description: |
|
|
|
5
5
|
Use when: (1) finishing meaningful implementation work, (2) capturing reusable guidance,
|
|
6
6
|
(3) before ending a long session.
|
|
7
7
|
disable-model-invocation: false
|
|
8
|
-
allowed-tools: Read, Write, Edit, Glob, Grep, Bash, mcp__mneme-db__mneme_save_interactions, mcp__mneme-db__mneme_update_session_summary, mcp__mneme-db__mneme_mark_session_committed, mcp__mneme-db__mneme_rule_linter, mcp__mneme-db__mneme_search_eval
|
|
8
|
+
allowed-tools: Read, Write, Edit, Glob, Grep, Bash, mcp__mneme-db__mneme_save_interactions, mcp__mneme-db__mneme_update_session_summary, mcp__mneme-db__mneme_mark_session_committed, mcp__mneme-db__mneme_validate_sources, mcp__mneme-db__mneme_list_sessions, mcp__mneme-db__mneme_rule_linter, mcp__mneme-db__mneme_search_eval
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
# /mneme:save
|
|
@@ -43,20 +43,40 @@ Always render missing required fields as blocking errors before write.
|
|
|
43
43
|
|
|
44
44
|
## Session ID resolution
|
|
45
45
|
|
|
46
|
+
**STOP. Before doing ANYTHING else, find the Claude Session ID.**
|
|
47
|
+
|
|
48
|
+
Scan upward in this conversation for the SessionStart context block. It contains a line matching this exact format:
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
**Claude Session ID:** <UUID>
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Copy the full UUID value (36 characters, e.g. `a1b2c3d4-e5f6-7890-abcd-ef1234567890`).
|
|
55
|
+
|
|
46
56
|
<required>
|
|
47
|
-
-
|
|
48
|
-
-
|
|
49
|
-
-
|
|
57
|
+
- The Claude Session ID is ALREADY in this conversation — injected by the session-start hook at the very beginning
|
|
58
|
+
- Search for the literal text `**Claude Session ID:**` in the messages above
|
|
59
|
+
- Copy the full 36-character UUID that follows it
|
|
60
|
+
- Do NOT run Bash, Glob, Grep, or any other tool to discover the session ID
|
|
61
|
+
- Do NOT call `mneme_list_sessions` to find it (that is only for the fallback below)
|
|
62
|
+
- Do NOT run `printenv`, `find`, `echo`, `ls`, `stat`, or any exploratory commands
|
|
50
63
|
</required>
|
|
51
64
|
|
|
65
|
+
**Fallback (only if `**Claude Session ID:**` is genuinely not found in the conversation):**
|
|
66
|
+
1. Call `mneme_list_sessions` with the current project path and `limit: 1` to get the most recent session
|
|
67
|
+
2. Use that session's `sessionId` as the Claude Session ID
|
|
68
|
+
3. If that also fails, ask the user for the session ID
|
|
69
|
+
|
|
52
70
|
## Execution phases
|
|
53
71
|
|
|
54
|
-
1. **Master session merge**
|
|
55
|
-
-
|
|
72
|
+
1. **Master session merge (only if resumed)**
|
|
73
|
+
- Check if this is a resumed session: look for `(Resumed)` in the `**Session:**` line of the SessionStart context
|
|
74
|
+
- **If NOT resumed**: skip this phase (fresh session, no merge needed)
|
|
75
|
+
- **If resumed**: the `mneme_save_interactions` tool automatically resolves session-links internally, so just pass the current `claudeSessionId` — it saves to the correct master session
|
|
76
|
+
- No manual action needed in most cases; this phase exists as a checkpoint
|
|
56
77
|
|
|
57
78
|
2. **Interactions commit**
|
|
58
79
|
- Save transcript interactions to `.mneme/local.db` via `mneme_save_interactions`.
|
|
59
|
-
- Do NOT call `mneme_mark_session_committed` yet (wait until after Phase 3).
|
|
60
80
|
|
|
61
81
|
3. **Session summary extraction (required MCP)**
|
|
62
82
|
- Extract from the conversation: `title`, `goal`, `outcome`, `description`, `tags`, `sessionType`.
|
|
@@ -70,12 +90,12 @@ Always render missing required fields as blocking errors before write.
|
|
|
70
90
|
- `handoff`: continuation info (stoppedReason, notes, nextSteps)
|
|
71
91
|
- `references`: referenced document URLs and file paths (type, url, path, title, description)
|
|
72
92
|
- **MUST call `mneme_update_session_summary`** MCP tool with all extracted data.
|
|
73
|
-
This writes the summary to `.mneme/sessions/` JSON file
|
|
74
|
-
- **Then call `mneme_mark_session_committed`** to finalize the commit.
|
|
93
|
+
This writes the summary to `.mneme/sessions/` JSON file and **automatically marks the session as committed** (no separate `mneme_mark_session_committed` call needed).
|
|
75
94
|
|
|
76
95
|
<required>
|
|
77
96
|
- Call `mneme_update_session_summary` with: `claudeSessionId`, `title`, `summary` (`goal`, `outcome`), `tags`, `sessionType`, `filesModified`, `technologies`
|
|
78
|
-
-
|
|
97
|
+
- Do NOT call `mneme_mark_session_committed` separately — it is called internally by `mneme_update_session_summary`
|
|
98
|
+
- Only call `mneme_mark_session_committed` explicitly if `mneme_update_session_summary` failed and you need error recovery
|
|
79
99
|
- Do NOT skip this step even for short/research sessions
|
|
80
100
|
</required>
|
|
81
101
|
|
|
@@ -117,6 +137,18 @@ The following data is easily lost in summaries, so save it explicitly as structu
|
|
|
117
137
|
- Official documentation URLs confirmed via WebFetch/WebSearch
|
|
118
138
|
- Important file paths referenced
|
|
119
139
|
|
|
140
|
+
### Pre-read: Load valid tags before extraction (Phases 4-6)
|
|
141
|
+
|
|
142
|
+
Before writing any decisions, patterns, or rules, read `.mneme/tags.json` to get the list of valid tag IDs.
|
|
143
|
+
|
|
144
|
+
<required>
|
|
145
|
+
- Read `.mneme/tags.json` and extract all `id` values from the `tags` array
|
|
146
|
+
- Only use tag IDs that exist in this file — do NOT invent new tag IDs
|
|
147
|
+
- If no existing tag fits perfectly, use the closest match from the list
|
|
148
|
+
- Common tag IDs: `frontend`, `backend`, `api`, `db`, `infra`, `feature`, `bugfix`, `refactor`, `test`, `docs`, `config`, `perf`, `security`, `architecture`, `auth`, `cache`, `search`, `batch`, `integration`, `mcp`, `llm`, `error-handling`, `type`, `ui`
|
|
149
|
+
- The full list has 66+ tags across categories: domain, phase, infra, cloud, architecture, feature, ui, data, ai, quality, workflow
|
|
150
|
+
</required>
|
|
151
|
+
|
|
120
152
|
4. **Decision extraction (source)**
|
|
121
153
|
- Persist concrete choices and rationale to `decisions/YYYY/MM/*.json`.
|
|
122
154
|
- Apply the classification matrix: only extract items that are **one-time choices with context-specific reasoning**.
|
|
@@ -132,6 +164,7 @@ Decision content quality:
|
|
|
132
164
|
- BAD: `["Use HS256"]`
|
|
133
165
|
- GOOD: `["Use HS256 -> rejected: key rotation difficult in production"]`
|
|
134
166
|
If alternatives is a string array, append " -> rejected: reason" to each entry.
|
|
167
|
+
- `tags`: MUST use only IDs from `.mneme/tags.json` (loaded in pre-read step above)
|
|
135
168
|
</required>
|
|
136
169
|
|
|
137
170
|
5. **Pattern extraction (source)**
|
|
@@ -150,6 +183,11 @@ Pattern content quality:
|
|
|
150
183
|
- BAD: "when impact is limited"
|
|
151
184
|
- GOOD: "when call sites are 5 or fewer and the interface is stable"
|
|
152
185
|
- **Expected outcomes**: concrete effects when this pattern is applied
|
|
186
|
+
- `type`: MUST be one of: `"good"`, `"bad"`, `"error-solution"`
|
|
187
|
+
- `"good"`: best practice to follow
|
|
188
|
+
- `"bad"`: anti-pattern to avoid
|
|
189
|
+
- `"error-solution"`: additionally requires `errorPattern` and `solution` fields
|
|
190
|
+
- `tags`: MUST use only IDs from `.mneme/tags.json` (loaded in pre-read step above)
|
|
153
191
|
</required>
|
|
154
192
|
|
|
155
193
|
6. **Rule extraction (source)**
|
|
@@ -170,6 +208,7 @@ Rule content quality:
|
|
|
170
208
|
- `category`: rule classification (type-safety, testing, security, performance, etc.)
|
|
171
209
|
- Active rule must include: `id`, `key`, `text`, `category`, `tags`, `priority`, `rationale`
|
|
172
210
|
- `priority` must be one of: `p0`, `p1`, `p2`
|
|
211
|
+
- `tags`: MUST use only IDs from `.mneme/tags.json` (loaded in pre-read step above)
|
|
173
212
|
</required>
|
|
174
213
|
|
|
175
214
|
7. **Development rule candidates report**
|
|
@@ -178,9 +217,10 @@ Rule content quality:
|
|
|
178
217
|
- Only items approved by the engineer in the dashboard become active development rules.
|
|
179
218
|
- Do not perform inline approval.
|
|
180
219
|
|
|
181
|
-
8. **Auto quality checks (required MCP)**
|
|
182
|
-
- Run
|
|
183
|
-
-
|
|
220
|
+
8. **Auto quality checks (required MCP, run in parallel)**
|
|
221
|
+
- Run these two tools **in parallel** (they are independent, no dependency between them):
|
|
222
|
+
- `mneme_rule_linter` (`ruleType: "all"`)
|
|
223
|
+
- `mneme_search_eval` (`mode: "run"`)
|
|
184
224
|
|
|
185
225
|
## Source definitions and exclusivity (must follow)
|
|
186
226
|
|