claude_memory 0.9.0 → 0.9.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9b42d582ddd17dd325f8048268c889d6c80c1ca9c229732da1a8d619279201af
4
- data.tar.gz: 8853caacc212900483a4a3f9939e8261e18f53b886675f01b4c5a5b61a506d26
3
+ metadata.gz: b6df0a3f58a88c1bbec82ec20e26789d51ad2712408d058337a196c5eac90654
4
+ data.tar.gz: beb9c2ef59ef6a45430eeb03466e37f6b1f741ef1745b5303a1443b02a7c84b4
5
5
  SHA512:
6
- metadata.gz: a65038105334c741d26c5e485da7565016ae670ed24f04d4c23b2bb00329d729ee3bfd91cf333ea36ad518937e40e4c95c4d0846bcb423984b0ec683fee59b5a
7
- data.tar.gz: d94e2ce5fbd1ed496a0c56f094b7f1fbb01b9eb255c819a95b2ffe6ecf79ea9c1706408fd658b2bcaee19d440a87d45a1185a7e471cb05fc7c003d433d6e5808
6
+ metadata.gz: '06905bca1f77df5642caf0846cde7394ba9a1baf3c954138383ac39927fcaae2ef097ff79dd3c866e6930fa0eac0d0fb958366bded54a0616d8e356a316e616c'
7
+ data.tar.gz: 9a8e3c455c20ae616bc239b766e1d4e2aa4c6e5448f494294d9c6a646a8a613428e9b63218624c5cae7e30f389704dd3bee6b788e97a369cb719b115abffddd7
Binary file
@@ -1,7 +1,7 @@
1
1
  <!--
2
2
  This file is auto-generated by claude-memory.
3
3
  Do not edit manually - changes will be overwritten.
4
- Generated: 2026-04-15T17:38:20Z
4
+ Generated: 2026-04-16T17:54:51Z
5
5
  -->
6
6
 
7
7
  # Project Memory
@@ -14,6 +14,14 @@
14
14
 
15
15
  ## Conventions
16
16
 
17
+ - Curated predicate vocabulary has 8 entries: multi-value (convention, decision, architecture, uses_framework, uses_language) and single-value (uses_database, deployment_platform, auth_method). Pruned 7 dead predicates after multi-project survey confirmed zero usage.
18
+ - Before making design changes to schemas, vocabularies, or policies, survey actual usage data across multiple project databases under ~/src/ — single-project analysis can validate wrong assumptions. The uses_framework cardinality bug was only visible across multi-project data.
19
+ - A/B testing memory plugin: use 'claude --bare --mcp-config=/tmp/mcp-test.json -p' with serve-mcp.sh path. --plugin-dir doesn't work with --bare despite docs claiming it should. Architecture/convention/preference questions differentiate best; grep-able and one-shot code-gen questions don't.
20
+ - NullDistiller emits uses_language for language-type entities (added 0.9.0), alongside existing uses_database, uses_framework, deployment_platform. Migration v14 canonicalizes stale predicate names (has_convention → convention, primary_language → uses_language) in existing facts.
21
+ - CLAUDE.md scope-system example text ('this app uses PostgreSQL') causes recurring distiller hallucinations. Reject + re-ingest creates rejection churn because rejection metadata doesn't block re-insertion at content level. Open product gap — workaround: wrap example text in <no-memory> tags.
22
+ - claude-memory restore --predicate NAME recovers facts superseded by obsolete single-value classifications. Uses Jaccard token overlap (threshold 0.5) to distinguish bug-caused supersession from real corrections. Only operates on predicates currently classified multi-value. Opt-in per DB, supports --dry-run.
23
+ - claude-memory reject <id_or_docid> marks facts as rejected and resolves associated open conflicts in a single transaction. Accepts integer fact IDs or 8-char hex docids. memory.reject_fact MCP tool mirrors the CLI.
24
+ - The /release skill automates gem releases in three phases: prepare (version bump across 3 files, bundle install, MCP verify, tests, lint, CHANGELOG check, commit), publish (user-driven: git push + rake release), announce (fix GitHub Latest flags, create gh release from CHANGELOG). Never auto-pushes.
17
25
  - Never use Sequel.sqlite for DB reads; this gem only depends on extralite. Use Sequel.connect("extralite://#{db_path}") or SQLiteStore.new. Sequel.sqlite requires the ungem'd sqlite3 adapter and fails at runtime.
18
26
  - Two distinct tool_calls tables exist: tool_calls (v3) for transcript-observed Claude Code tool usage, and mcp_tool_calls (v13) for MCP server telemetry. Disjoint purposes, never join.
19
27
  - MCP tool-call telemetry is recorded via MCP::Telemetry wrapping Server#handle_tools_call. Writes to mcp_tool_calls table in the project DB. Swallows DB errors so telemetry never breaks a real tool response. Viewable via 'claude-memory stats --tools [--since DAYS]'.
@@ -37,15 +45,69 @@
37
45
 
38
46
  ## Technical Constraints
39
47
 
48
+ - **Uses framework**: rails
49
+ - **Deployment platform**: aws
40
50
  - **Uses database**: sqlite
41
51
 
42
52
  ## Additional Knowledge
43
53
 
44
54
  ### Architecture
45
55
 
56
+ - repo: PredicatePolicy is the single source of truth for predicate vocabulary (POLICIES), cardinality, snapshot section mapping (SECTION_MAP), synonym canonicalization (SYNONYMS), and LLM guidance. tool_definitions.rb, publish.rb, and distill-transcripts.md all derive from PredicatePolicy. Never hardcode predicate names elsewhere.
46
57
  - MCP::Tools: Thin 104-line dispatcher that includes 6 handler modules in mcp/handlers/: QueryHandlers, ShortcutHandlers, ContextHandlers, ManagementHandlers, StatsHandlers, SetupHandlers
47
58
  - Recall: 94-line facade delegating to @engine (DualEngine or LegacyEngine), both include shared QueryCore module with all store-level query logic
48
59
  - SQLiteStore: 386-line CRUD class that includes RetryHandler (retry/connection logic) and SchemaManager (migrations/version sync) modules
49
60
  - Embeddings: Pluggable providers via Embeddings.resolve(name, env:). Three providers: tfidf (default), fastembed, api. Duck-typed contract: name, dimensions, generate(text). ENV: CLAUDE_MEMORY_EMBEDDING_PROVIDER
50
61
  - Embeddings::DimensionCheck: Pure value object — DimensionCheck.call(store, provider) returns Data.define Result with :fresh/:match/:mismatch status. No side effects; caller decides how to handle mismatch.
51
62
 
63
+
64
+ ## Open Conflicts
65
+
66
+ The following facts are in conflict and need resolution:
67
+
68
+ - Conflict #12: Fact 21 vs Fact 43
69
+ - Conflict #13: Fact 21 vs Fact 44
70
+ - Conflict #14: Fact 45 vs Fact 46
71
+ - Conflict #15: Fact 45 vs Fact 47
72
+ - Conflict #16: Fact 48 vs Fact 49
73
+ - Conflict #17: Fact 45 vs Fact 50
74
+ - Conflict #18: Fact 21 vs Fact 51
75
+ - Conflict #19: Fact 48 vs Fact 52
76
+ - Conflict #20: Fact 21 vs Fact 53
77
+ - Conflict #21: Fact 21 vs Fact 54
78
+ - Conflict #22: Fact 21 vs Fact 55
79
+ - Conflict #23: Fact 21 vs Fact 56
80
+ - Conflict #24: Fact 21 vs Fact 57
81
+ - Conflict #25: Fact 48 vs Fact 58
82
+ - Conflict #26: Fact 48 vs Fact 59
83
+ - Conflict #27: Fact 48 vs Fact 60
84
+ - Conflict #28: Fact 21 vs Fact 61
85
+ - Conflict #29: Fact 21 vs Fact 62
86
+ - Conflict #30: Fact 21 vs Fact 63
87
+ - Conflict #31: Fact 45 vs Fact 64
88
+ - Conflict #32: Fact 21 vs Fact 65
89
+ - Conflict #33: Fact 21 vs Fact 66
90
+ - Conflict #34: Fact 21 vs Fact 67
91
+ - Conflict #35: Fact 45 vs Fact 68
92
+ - Conflict #36: Fact 45 vs Fact 69
93
+ - Conflict #37: Fact 48 vs Fact 70
94
+ - Conflict #38: Fact 48 vs Fact 71
95
+ - Conflict #39: Fact 21 vs Fact 72
96
+ - Conflict #40: Fact 21 vs Fact 73
97
+ - Conflict #41: Fact 21 vs Fact 74
98
+ - Conflict #42: Fact 21 vs Fact 75
99
+ - Conflict #43: Fact 21 vs Fact 76
100
+ - Conflict #44: Fact 45 vs Fact 77
101
+ - Conflict #45: Fact 45 vs Fact 78
102
+ - Conflict #46: Fact 45 vs Fact 79
103
+ - Conflict #47: Fact 45 vs Fact 80
104
+ - Conflict #48: Fact 45 vs Fact 81
105
+ - Conflict #49: Fact 48 vs Fact 82
106
+ - Conflict #50: Fact 48 vs Fact 83
107
+ - Conflict #51: Fact 48 vs Fact 84
108
+ - Conflict #52: Fact 48 vs Fact 85
109
+ - Conflict #53: Fact 48 vs Fact 86
110
+ - Conflict #54: Fact 48 vs Fact 87
111
+ - Conflict #55: Fact 48 vs Fact 88
112
+ - Conflict #56: Fact 48 vs Fact 89
113
+ - Conflict #57: Fact 48 vs Fact 90
@@ -0,0 +1,168 @@
1
+ ---
2
+ name: release
3
+ description: Prepare and publish a new gem release — bumps version across all required files, validates tests/linting/MCP server, commits, and creates the GitHub release. Use this skill when the user says "release", "publish a new version", "bump the version", "cut a release", "prepare for release", "ship it", or any variation of wanting to publish a new gem version. Also use when the user asks about the release process or what steps are needed to release.
4
+ agent: general-purpose
5
+ allowed-tools: Read, Grep, Edit, Write, Bash
6
+ arguments:
7
+ - name: version
8
+ description: "The new version number (e.g., '0.10.0'). If omitted, you'll be asked."
9
+ required: false
10
+ ---
11
+
12
+ # Release Workflow
13
+
14
+ Automate the full release lifecycle for the ClaudeMemory gem. This workflow was codified from the actual 0.9.0 release process.
15
+
16
+ The release has three phases: **prepare** (automated), **publish** (user-driven), and **announce** (automated). The middle phase requires user action because it pushes to a shared remote and publishes to RubyGems — destructive operations that must never happen without explicit confirmation.
17
+
18
+ ## Phase 1: Prepare
19
+
20
+ ### Step 1: Determine the new version
21
+
22
+ If a version was passed as an argument, use it. Otherwise, read the current version from `lib/claude_memory/version.rb` and ask the user what the new version should be.
23
+
24
+ ### Step 2: Find and update all version references
25
+
26
+ The version lives in exactly three files. Grep to confirm there are no others:
27
+
28
+ ```bash
29
+ grep -rn "CURRENT_VERSION" --include="*.rb" --include="*.json" --include="*.gemspec" . | grep -v "CHANGELOG\|node_modules\|vendor\|\.git/"
30
+ ```
31
+
32
+ Update all three:
33
+
34
+ 1. **`lib/claude_memory/version.rb`** — the `VERSION` constant (canonical source)
35
+ 2. **`.claude-plugin/plugin.json`** — the `"version"` field
36
+ 3. **`.claude-plugin/marketplace.json`** — the `"version"` field inside the plugins array
37
+
38
+ If grep reveals any additional hardcoded references, update those too and flag them to the user as something that should be DRYed up.
39
+
40
+ ### Step 3: Update Gemfile.lock
41
+
42
+ ```bash
43
+ bundle install
44
+ ```
45
+
46
+ Verify both `claude_memory (X.Y.Z)` entries in Gemfile.lock match the new version.
47
+
48
+ ### Step 4: Verify MCP server reports the new version
49
+
50
+ The MCP server reads `ClaudeMemory::VERSION` dynamically. Confirm it picks up the change:
51
+
52
+ ```bash
53
+ echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}' | bundle exec claude-memory serve-mcp 2>/dev/null | grep -o '"version":"[^"]*"'
54
+ ```
55
+
56
+ Expected output: `"version":"X.Y.Z"` matching the new version. If it doesn't match, something is wrong with the require chain — investigate before proceeding.
57
+
58
+ ### Step 5: Run the full test suite
59
+
60
+ ```bash
61
+ bundle exec rspec
62
+ ```
63
+
64
+ All tests must pass. Do not proceed with any failures. Fix them first.
65
+
66
+ ### Step 6: Run the linter
67
+
68
+ ```bash
69
+ bundle exec rake standard:fix
70
+ ```
71
+
72
+ Ensure no remaining violations.
73
+
74
+ ### Step 7: Verify CHANGELOG.md
75
+
76
+ The CHANGELOG should already have a release section written during development (via `/improve`, manual commits, or other workflow). **Do not auto-generate release notes** — they should reflect the actual development narrative.
77
+
78
+ Check that:
79
+ - The `## [X.Y.Z] - YYYY-MM-DD` section exists with today's date
80
+ - It has Added, Changed, Fixed subsections as appropriate
81
+ - Upgrade Notes are included if there are breaking changes or manual migration steps
82
+ - The `## [Unreleased]` section above it is empty or ready for the next cycle
83
+
84
+ If the CHANGELOG section is missing or incomplete, **stop and ask the user**. Do not fabricate release notes.
85
+
86
+ ### Step 8: Commit the version bump
87
+
88
+ ```bash
89
+ git add lib/claude_memory/version.rb .claude-plugin/plugin.json .claude-plugin/marketplace.json Gemfile.lock
90
+ git commit -m "[Release] Bump version to X.Y.Z"
91
+ ```
92
+
93
+ Do NOT push yet. Report what was committed and proceed to Phase 2.
94
+
95
+ ## Phase 2: Publish (User-Driven)
96
+
97
+ This phase involves pushing to a shared remote and publishing to RubyGems. These are **irreversible shared-state operations** — never execute them automatically.
98
+
99
+ Tell the user:
100
+
101
+ > Version X.Y.Z is prepared and committed locally. To publish:
102
+ >
103
+ > ```bash
104
+ > git push origin main
105
+ > rake release
106
+ > ```
107
+ >
108
+ > `rake release` will create the git tag, build the gem, and push to RubyGems. Let me know when that's done and I'll create the GitHub release.
109
+
110
+ Wait for the user to confirm before proceeding to Phase 3.
111
+
112
+ ## Phase 3: Announce
113
+
114
+ ### Step 9: Fix any stale "Latest" flags on GitHub releases
115
+
116
+ Check current release state:
117
+
118
+ ```bash
119
+ gh release list --limit 5
120
+ ```
121
+
122
+ If an older release is incorrectly marked "Latest" (this happens when releases are created out of order or with `--latest` set manually):
123
+
124
+ ```bash
125
+ gh release edit v<old-version> --latest=false
126
+ ```
127
+
128
+ ### Step 10: Create the GitHub release
129
+
130
+ Extract the release notes from CHANGELOG.md — everything between `## [X.Y.Z]` and the next `## [` heading. Write to a temp file:
131
+
132
+ ```bash
133
+ # Extract the section between the new version header and the next version header
134
+ sed -n '/^## \[X\.Y\.Z\]/,/^## \[/{ /^## \[X\.Y\.Z\]/d; /^## \[/d; p; }' CHANGELOG.md > /tmp/release-notes.md
135
+ ```
136
+
137
+ Create the release:
138
+
139
+ ```bash
140
+ gh release create vX.Y.Z \
141
+ --title "vX.Y.Z — Short descriptive title" \
142
+ --latest \
143
+ --verify-tag \
144
+ --notes-file /tmp/release-notes.md
145
+ ```
146
+
147
+ The title should capture the theme of the release in a few words (e.g., "Predicate Design Overhaul, Reject/Restore, Telemetry"). Read the CHANGELOG to derive this — don't ask the user unless the theme isn't obvious.
148
+
149
+ ### Step 11: Verify the release
150
+
151
+ ```bash
152
+ gh release list --limit 5
153
+ ```
154
+
155
+ Confirm:
156
+ - The new release appears at the top
157
+ - It's marked "Latest"
158
+ - No older release is incorrectly marked "Latest"
159
+
160
+ Report the release URL to the user.
161
+
162
+ ## Error Handling
163
+
164
+ - **Tests fail**: Fix first. Never release with failing tests.
165
+ - **CHANGELOG missing**: Ask the user. Never fabricate release notes.
166
+ - **Version already tagged**: The tag may exist from a prior attempt. Ask the user whether to delete and recreate, or use a different version.
167
+ - **`gh` not available**: Tell the user to create the GitHub release manually, providing the release notes content.
168
+ - **`rake release` fails**: Common causes: not logged into RubyGems, tag already exists, uncommitted changes. Help the user diagnose but don't retry automatically.
@@ -7,7 +7,7 @@
7
7
  "plugins": [
8
8
  {
9
9
  "name": "claude-memory",
10
- "version": "0.9.0",
10
+ "version": "0.9.1",
11
11
  "source": "./",
12
12
  "description": "Long-term memory for Claude Code. Recalls architecture, conventions, and decisions across sessions — so Claude explains your codebase without file traversal, follows your patterns, and never re-asks what it already learned.",
13
13
  "repository": "https://github.com/codenamev/claude_memory"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-memory",
3
- "version": "0.9.0",
3
+ "version": "0.9.1",
4
4
  "description": "Long-term memory for Claude Code. Recalls architecture, conventions, and decisions across sessions — so Claude explains your codebase without file traversal, follows your patterns, and never re-asks what it already learned.",
5
5
  "author": {
6
6
  "name": "Valentino Stoll",
data/CHANGELOG.md CHANGED
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.9.1] - 2026-04-16
8
+
9
+ ### Fixed
10
+
11
+ - MCP server now conforms to JSON-RPC 2.0: notifications (messages without an `id`) never receive a response. Previously, `notifications/initialized` — which Claude Code sends after every handshake — triggered a spurious `Method not found` error frame, causing strict MCP clients to mark the server failed on `/mcp` reconnect after the initial connection.
12
+
7
13
  ## [0.9.0] - 2026-04-16
8
14
 
9
15
  ### Added
@@ -59,8 +59,9 @@ module ClaudeMemory
59
59
  rescue JSON::ParserError => e
60
60
  send_error(-32700, "Parse error: #{e.message}", 0)
61
61
  rescue => e
62
- request_id = request&.fetch("id", nil) || 0
63
- send_error(-32603, "Internal error: #{e.message}", request_id)
62
+ # Per JSON-RPC 2.0: never respond to notifications, even on error
63
+ request_id = request&.fetch("id", nil)
64
+ send_error(-32603, "Internal error: #{e.message}", request_id) unless request_id.nil?
64
65
  end
65
66
  end
66
67
 
@@ -69,6 +70,11 @@ module ClaudeMemory
69
70
  id = request["id"]
70
71
  method = request["method"]
71
72
 
73
+ # Per JSON-RPC 2.0: a request without an id is a notification and
74
+ # MUST NOT receive a response. MCP relies on this for
75
+ # `notifications/initialized` after the initialize handshake.
76
+ return nil if id.nil?
77
+
72
78
  case method
73
79
  when "initialize"
74
80
  handle_initialize(id, request["params"])
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ClaudeMemory
4
- VERSION = "0.9.0"
4
+ VERSION = "0.9.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: claude_memory
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Valentino Stoll
@@ -89,6 +89,7 @@ files:
89
89
  - ".claude/skills/memory-first-workflow"
90
90
  - ".claude/skills/quality-update/SKILL.md"
91
91
  - ".claude/skills/quality-update/implementation-guide.md"
92
+ - ".claude/skills/release/SKILL.md"
92
93
  - ".claude/skills/review-commit/SKILL.md"
93
94
  - ".claude/skills/review-for-quality/SKILL.md"
94
95
  - ".claude/skills/review-for-quality/expert-checklists.md"