gitmem-mcp 1.3.3 → 1.3.5

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/CHANGELOG.md CHANGED
@@ -7,6 +7,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.3.5] - 2026-02-22
11
+
12
+ ### Fixed
13
+ - **Free tier recall→confirm_scars flow broken**: Recall on free tier returned scars to the agent but never tracked them in session state, causing confirm_scars to respond with "No recall-surfaced scars to confirm" even when valid confirmations were submitted. Reported across 3 clean room sessions.
14
+
15
+ ### Added
16
+ - **E2E regression test for recall→confirm_scars**: Verifies the full free tier flow — create scar, recall it, confirm it — catches the session state tracking gap.
17
+
18
+ ## [1.3.4] - 2026-02-22
19
+
20
+ ### Added
21
+ - **Expanded starter scar pack** (7 → 12): Five new community-proposed scars covering multi-agent delegation, memory hygiene, and communication patterns.
22
+ - **Closing payload pre-seeded during init**: `closing-payload.json` template created at install time, preventing Write permission prompt on first session close.
23
+ - **`contribute_feedback` tool**: Agents can submit anonymous feedback (feature requests, bugs, friction) to help improve gitmem.
24
+
25
+ ### Fixed
26
+ - **`is_active` filter for free tier**: `list()` now treats missing `is_active` as `true` instead of filtering out all learnings without the field.
27
+ - **`learning_type` in recall results**: Recall now returns `learning_type` in search results so agents can distinguish scars from wins and patterns.
28
+ - **Explicit `is_active: true` on learning creation**: New learnings are created with `is_active: true` to prevent filter mismatches.
29
+
10
30
  ## [1.3.1] - 2026-02-22
11
31
 
12
32
  ### Fixed
@@ -64,7 +64,13 @@ export class LocalFileStorage {
64
64
  if (options.filters) {
65
65
  for (const [key, value] of Object.entries(options.filters)) {
66
66
  const cleanValue = value.startsWith("eq.") ? value.slice(3) : value;
67
- records = records.filter((r) => String(r[key]) === cleanValue);
67
+ if (key === "is_active" && cleanValue === "true") {
68
+ // is_active defaults to true when not explicitly set
69
+ records = records.filter((r) => r[key] !== false);
70
+ }
71
+ else {
72
+ records = records.filter((r) => String(r[key]) === cleanValue);
73
+ }
68
74
  }
69
75
  }
70
76
  // Apply ordering
@@ -150,6 +156,7 @@ export class LocalFileStorage {
150
156
  mapped.push({
151
157
  id: r.id,
152
158
  title: String(l.title),
159
+ learning_type: String(l.learning_type || "scar"),
153
160
  description: String(l.description),
154
161
  severity: String(l.severity || "medium"),
155
162
  counter_arguments: l.counter_arguments || [],
@@ -87,6 +87,7 @@ export async function createLearning(params) {
87
87
  created_at: new Date().toISOString(),
88
88
  persona_name: agentIdentity,
89
89
  source_date: new Date().toISOString().split("T")[0],
90
+ is_active: true,
90
91
  // LLM-cooperative enforcement fields (optional)
91
92
  ...(params.why_this_matters && { why_this_matters: params.why_this_matters }),
92
93
  ...(params.action_protocol && { action_protocol: params.action_protocol }),
@@ -201,6 +201,16 @@ export async function recall(params) {
201
201
  similarityScores: scars.map((s) => s.similarity),
202
202
  search_mode: "local",
203
203
  });
204
+ // Track surfaced scars for confirm_scars (same as pro tier path)
205
+ const recallSurfacedAt = new Date().toISOString();
206
+ const recallSurfacedScars = scars.map((scar) => ({
207
+ scar_id: scar.id,
208
+ scar_title: scar.title,
209
+ scar_severity: scar.severity || "medium",
210
+ surfaced_at: recallSurfacedAt,
211
+ source: "recall",
212
+ }));
213
+ addSurfacedScars(recallSurfacedScars);
204
214
  const freeFormatted = formatResponse(scars, plan);
205
215
  return {
206
216
  activated: scars.length > 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gitmem-mcp",
3
- "version": "1.3.3",
3
+ "version": "1.3.5",
4
4
  "mcpName": "io.github.gitmem-dev/gitmem",
5
5
  "description": "Persistent learning memory for AI coding agents. Memory that compounds.",
6
6
  "type": "module",
@@ -124,5 +124,95 @@
124
124
  "project": "default",
125
125
  "source_date": "2026-01-01",
126
126
  "created_at": "2026-01-01T00:00:00Z"
127
+ },
128
+ {
129
+ "id": "5c1111a9-c161-4b2d-83f9-063780164b7c",
130
+ "learning_type": "scar",
131
+ "title": "Sub-agents Start With Zero Context — Always Inject Memory",
132
+ "description": "When you spawn a sub-agent (Task tool), it starts with a blank slate — no conversation history, no institutional memory, no project context. If you don't explicitly inject context via prepare_context or a detailed prompt, the sub-agent will repeat mistakes the team already learned from. The 2-3 seconds to prepare context prevents minutes of wasted work.",
133
+ "severity": "high",
134
+ "scar_type": "process",
135
+ "is_starter": true,
136
+ "counter_arguments": [
137
+ "The sub-agent has access to the same tools so it can figure things out — but without memory context it will rediscover pitfalls the hard way",
138
+ "Injecting context slows down spawning — but 2-3 seconds of prep prevents full task re-runs when the agent hits a known issue"
139
+ ],
140
+ "keywords": ["sub-agent", "task-tool", "context", "delegation", "multi-agent", "prepare-context"],
141
+ "domain": ["multi-agent", "delegation"],
142
+ "project": "default",
143
+ "source_date": "2026-02-22",
144
+ "created_at": "2026-02-22T00:00:00Z"
145
+ },
146
+ {
147
+ "id": "f7d1dcb8-dcf1-48fb-9ab0-e682cd704530",
148
+ "learning_type": "scar",
149
+ "title": "Sub-agents Cannot See Your Conversation — Spell Out Everything",
150
+ "description": "Sub-agents spawned via the Task tool do not inherit the parent conversation. They cannot see what the user asked, what files were discussed, or what decisions were made. Every requirement, file path, and constraint must be explicitly stated in the task prompt. Vague delegation like 'fix the bug we discussed' will fail because the sub-agent has no idea what was discussed.",
151
+ "severity": "high",
152
+ "scar_type": "process",
153
+ "is_starter": true,
154
+ "counter_arguments": [
155
+ "The sub-agent description says it has 'access to current context' — but only certain agent types do, and even then the full nuance of the conversation may not transfer",
156
+ "I can just tell it to 'continue the work' — but without explicit requirements the sub-agent will interpret 'the work' differently than you intended"
157
+ ],
158
+ "keywords": ["sub-agent", "delegation", "prompt", "requirements", "context-loss", "multi-agent"],
159
+ "domain": ["multi-agent", "delegation"],
160
+ "project": "default",
161
+ "source_date": "2026-02-22",
162
+ "created_at": "2026-02-22T00:00:00Z"
163
+ },
164
+ {
165
+ "id": "060389aa-c0fa-445d-bbfd-5d9250dc1e73",
166
+ "learning_type": "scar",
167
+ "title": "Don't Pre-read Files Before Delegating — Let the Sub-agent Read Them",
168
+ "description": "Reading files into your context before spawning a sub-agent wastes your context window and doesn't help the sub-agent (it can't see what you read). Instead, tell the sub-agent which files to read. The sub-agent has its own context budget and its own file access. Pre-reading just burns tokens twice.",
169
+ "severity": "medium",
170
+ "scar_type": "process",
171
+ "is_starter": true,
172
+ "counter_arguments": [
173
+ "I need to understand the code before I can write a good prompt — true for architecture decisions, but for 'read and fix' tasks the sub-agent can do its own reading",
174
+ "What if the sub-agent reads the wrong files — provide specific file paths in the prompt rather than reading them yourself"
175
+ ],
176
+ "keywords": ["sub-agent", "context-window", "delegation", "file-reading", "tokens", "multi-agent"],
177
+ "domain": ["multi-agent", "efficiency"],
178
+ "project": "default",
179
+ "source_date": "2026-02-22",
180
+ "created_at": "2026-02-22T00:00:00Z"
181
+ },
182
+ {
183
+ "id": "55b25d2e-41ad-47f4-8723-569b78586dff",
184
+ "learning_type": "scar",
185
+ "title": "Search Memory Before Creating Learnings — Duplicates Dilute Recall",
186
+ "description": "Before creating a new scar, win, or pattern, search existing memory first. Duplicate entries dilute recall quality — when the same lesson exists three times with slightly different wording, search results waste slots on redundant matches instead of surfacing diverse, relevant knowledge. One well-written scar beats three near-duplicates.",
187
+ "severity": "medium",
188
+ "scar_type": "process",
189
+ "is_starter": true,
190
+ "counter_arguments": [
191
+ "Creating duplicates reinforces the lesson — but recall is similarity-based, so duplicates just crowd out other useful results",
192
+ "My wording is better than the existing one — then update the existing entry instead of creating a new one"
193
+ ],
194
+ "keywords": ["memory", "search", "duplicates", "recall", "learning", "scar-creation"],
195
+ "domain": ["memory-hygiene", "gitmem"],
196
+ "project": "default",
197
+ "source_date": "2026-02-22",
198
+ "created_at": "2026-02-22T00:00:00Z"
199
+ },
200
+ {
201
+ "id": "867cf3f6-a0e5-4ca2-8d4d-43cb1f10d94d",
202
+ "learning_type": "scar",
203
+ "title": "Ask Clarifying Questions Before Coding — 5 Seconds Prevents a Rewrite",
204
+ "description": "When requirements are ambiguous, ask a clarifying question before writing code. A 5-second question like 'Should this handle both cases or just the first?' prevents building the wrong thing and having to rewrite. Assumptions that seem obvious are often wrong. The cost of asking is near-zero; the cost of a wrong assumption is a full task redo.",
205
+ "severity": "high",
206
+ "scar_type": "process",
207
+ "is_starter": true,
208
+ "counter_arguments": [
209
+ "Asking too many questions slows things down — but one targeted question is faster than a rewrite after building the wrong thing",
210
+ "I can just build both options and let the user pick — but that's double the work and the user wanted a decision, not a menu"
211
+ ],
212
+ "keywords": ["requirements", "clarification", "assumptions", "communication", "rewrite"],
213
+ "domain": ["communication", "planning"],
214
+ "project": "default",
215
+ "source_date": "2026-02-22",
216
+ "created_at": "2026-02-22T00:00:00Z"
127
217
  }
128
218
  ]