mempalace-code 1.4.0__tar.gz → 1.5.0__tar.gz

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.
Files changed (139) hide show
  1. mempalace_code-1.5.0/.claude/skills/release-prep/SKILL.md +198 -0
  2. mempalace_code-1.5.0/.github/workflows/ci.yml +29 -0
  3. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/.github/workflows/publish.yml +4 -4
  4. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/CHANGELOG.md +24 -0
  5. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/CLAUDE.md +1 -1
  6. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/PKG-INFO +46 -25
  7. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/README.md +41 -19
  8. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/docs/AGENT_INSTALL.md +98 -51
  9. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/docs/BACKLOG-archived.yaml +29 -0
  10. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/docs/BACKLOG.yaml +111 -155
  11. mempalace_code-1.5.0/docs/LLM_USAGE_RULES.md +172 -0
  12. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/hooks/README.md +13 -18
  13. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/mempalace/entity_detector.py +7 -1
  14. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/mempalace/mcp_server.py +204 -4
  15. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/mempalace/miner.py +518 -24
  16. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/mempalace/searcher.py +34 -1
  17. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/pyproject.toml +9 -10
  18. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/tests/test_chunking.py +269 -0
  19. mempalace_code-1.5.0/tests/test_entity_detector.py +50 -0
  20. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/tests/test_lang_detect.py +43 -0
  21. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/tests/test_mcp_server.py +460 -0
  22. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/tests/test_miner.py +917 -1
  23. mempalace_code-1.5.0/tests/test_searcher.py +550 -0
  24. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/tests/test_symbol_extract.py +865 -0
  25. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/tests/test_watcher.py +3 -1
  26. mempalace_code-1.4.0/.github/workflows/ci.yml +0 -73
  27. mempalace_code-1.4.0/tests/test_searcher.py +0 -197
  28. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/.claude/prompts/codex-hardening-review.md +0 -0
  29. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/.claude/prompts/codex-plan-review.md +0 -0
  30. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/.claude/settings.json +0 -0
  31. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/.claude/skills/_shared/commit-checkpoint.md +0 -0
  32. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/.claude/skills/_shared/mode-classification.md +0 -0
  33. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/.claude/skills/_shared/task-state.md +0 -0
  34. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/.claude/skills/bench/SKILL.md +0 -0
  35. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/.claude/skills/doc-refresh/INSTRUCTIONS.md +0 -0
  36. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/.claude/skills/doc-refresh/SKILL.md +0 -0
  37. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/.claude/skills/entropy-gc/INSTRUCTIONS.md +0 -0
  38. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/.claude/skills/entropy-gc/SKILL.md +0 -0
  39. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/.claude/skills/mine/SKILL.md +0 -0
  40. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/.claude/skills/palace-health/SKILL.md +0 -0
  41. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/.claude/skills/release/SKILL.md +0 -0
  42. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/.claude/skills/ship/INSTRUCTIONS.md +0 -0
  43. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/.claude/skills/ship/SKILL.md +0 -0
  44. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/.claude/skills/start/INSTRUCTIONS.md +0 -0
  45. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/.claude/skills/start/SKILL.md +0 -0
  46. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/.claude/skills/status/SKILL.md +0 -0
  47. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/.claude/skills/task-hardening/INSTRUCTIONS.md +0 -0
  48. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/.claude/skills/task-hardening/SKILL.md +0 -0
  49. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/.claude/skills/task-plan/INSTRUCTIONS.md +0 -0
  50. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/.claude/skills/task-plan/SKILL.md +0 -0
  51. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/.claude/skills/verify/INSTRUCTIONS.md +0 -0
  52. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/.claude/skills/verify/SKILL.md +0 -0
  53. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  54. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  55. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  56. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/.gitignore +0 -0
  57. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/.pre-commit-config.yaml +0 -0
  58. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/CONTRIBUTING.md +0 -0
  59. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/LICENSE +0 -0
  60. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/NOTICE +0 -0
  61. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/assets/mempalace_banner.jpg +0 -0
  62. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/benchmarks/BENCHMARKS.md +0 -0
  63. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/benchmarks/HYBRID_MODE.md +0 -0
  64. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/benchmarks/README.md +0 -0
  65. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/benchmarks/convomem_bench.py +0 -0
  66. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/benchmarks/dotnet_bench.py +0 -0
  67. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/benchmarks/embed_ab_bench.py +0 -0
  68. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/benchmarks/locomo_bench.py +0 -0
  69. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/benchmarks/longmemeval_bench.py +0 -0
  70. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/benchmarks/membench_bench.py +0 -0
  71. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/benchmarks/results_embed_ab_2026-04-09.json +0 -0
  72. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/benchmarks/results_token_delta_mempalace.json +0 -0
  73. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/benchmarks/results_token_delta_wh40k.json +0 -0
  74. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/benchmarks/token_delta_bench.py +0 -0
  75. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/docs/BACKUP_RESTORE.md +0 -0
  76. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/docs/BENCH_TOKEN_DELTA.md +0 -0
  77. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/docs/COMPARISON_GRAPHIFY.md +0 -0
  78. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/docs/HOW_SEARCH_WORKS.md +0 -0
  79. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/docs/OFFLINE_USAGE.md +0 -0
  80. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/docs/UPSTREAM_HARDENING.md +0 -0
  81. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/docs/WHY_THIS_FORK.md +0 -0
  82. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/examples/HOOKS_TUTORIAL.md +0 -0
  83. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/examples/basic_mining.py +0 -0
  84. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/examples/convo_import.py +0 -0
  85. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/examples/gemini_cli_setup.md +0 -0
  86. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/examples/mcp_setup.md +0 -0
  87. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/hooks/mempal_precompact_hook.sh +0 -0
  88. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/hooks/mempal_save_hook.sh +0 -0
  89. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/mempalace/README.md +0 -0
  90. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/mempalace/__init__.py +0 -0
  91. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/mempalace/__main__.py +0 -0
  92. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/mempalace/_chroma_store.py +0 -0
  93. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/mempalace/backup.py +0 -0
  94. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/mempalace/cli.py +0 -0
  95. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/mempalace/config.py +0 -0
  96. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/mempalace/convo_miner.py +0 -0
  97. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/mempalace/dialect.py +0 -0
  98. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/mempalace/entity_registry.py +0 -0
  99. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/mempalace/export.py +0 -0
  100. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/mempalace/general_extractor.py +0 -0
  101. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/mempalace/knowledge_graph.py +0 -0
  102. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/mempalace/layers.py +0 -0
  103. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/mempalace/migrate.py +0 -0
  104. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/mempalace/normalize.py +0 -0
  105. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/mempalace/onboarding.py +0 -0
  106. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/mempalace/palace_graph.py +0 -0
  107. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/mempalace/py.typed +0 -0
  108. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/mempalace/room_detector_local.py +0 -0
  109. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/mempalace/spellcheck.py +0 -0
  110. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/mempalace/split_mega_files.py +0 -0
  111. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/mempalace/storage.py +0 -0
  112. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/mempalace/treesitter.py +0 -0
  113. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/mempalace/version.py +0 -0
  114. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/mempalace/watcher.py +0 -0
  115. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/scripts/bootstrap.sh +0 -0
  116. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/scripts/codex-review.sh +0 -0
  117. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/scripts/nuke_wing.py +0 -0
  118. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/tests/conftest.py +0 -0
  119. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/tests/test_backup.py +0 -0
  120. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/tests/test_chroma_compat.py +0 -0
  121. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/tests/test_cli.py +0 -0
  122. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/tests/test_config.py +0 -0
  123. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/tests/test_convo_miner.py +0 -0
  124. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/tests/test_dialect.py +0 -0
  125. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/tests/test_dotnet_config.py +0 -0
  126. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/tests/test_e2e.py +0 -0
  127. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/tests/test_embed_ab_bench.py +0 -0
  128. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/tests/test_export.py +0 -0
  129. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/tests/test_kg_extract.py +0 -0
  130. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/tests/test_knowledge_graph.py +0 -0
  131. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/tests/test_migrate.py +0 -0
  132. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/tests/test_normalize.py +0 -0
  133. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/tests/test_offline.py +0 -0
  134. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/tests/test_split_mega_files.py +0 -0
  135. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/tests/test_storage.py +0 -0
  136. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/tests/test_storage_lance.py +0 -0
  137. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/tests/test_treesitter.py +0 -0
  138. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/tests/test_version_consistency.py +0 -0
  139. {mempalace_code-1.4.0 → mempalace_code-1.5.0}/uv.lock +0 -0
@@ -0,0 +1,198 @@
1
+ ---
2
+ name: release-prep
3
+ description: Pre-release docs sync — diff HEAD against the last v* tag on the publish remote, list feature additions, update README language/tool inventory, draft the CHANGELOG release entry, propose the version bump. Runs before /release. Prevents shipping with stale docs.
4
+ disable-model-invocation: false
5
+ ---
6
+
7
+ # Release Prep Workflow
8
+
9
+ Prepare docs for a PyPI release. Complements `/release` — this is the **docs sync** step; `/release` is the **cut + publish** step.
10
+
11
+ ## When to Use
12
+
13
+ - Before running `/release`.
14
+ - After a batch of features has landed on `main` and you need to know "what's new since last publish?"
15
+ - User says: "prepare for release", "what's new since last publish", "update docs before release".
16
+
17
+ ## Golden Rule
18
+
19
+ **Use the `publish` remote, not local tags.** Local tags can include inherited upstream tags that were never published. PyPI watches the `publish` remote.
20
+
21
+ ## Steps
22
+
23
+ ### Step 1: Resolve last published version
24
+
25
+ ```bash
26
+ # Last v* tag on the publish remote (PyPI source of truth)
27
+ LAST_TAG=$(git ls-remote --tags publish 2>/dev/null \
28
+ | grep -E 'refs/tags/v[0-9]+\.[0-9]+\.[0-9]+$' \
29
+ | awk '{print $2}' | sed 's|refs/tags/||' \
30
+ | sort -V | tail -1)
31
+ echo "Last published: $LAST_TAG"
32
+ ```
33
+
34
+ If `publish` is not a git remote, fall back to asking the user which remote holds releases — do **not** use the latest local tag blindly.
35
+
36
+ Compare against `pyproject.toml` — if they differ, flag and investigate before continuing.
37
+
38
+ ### Step 2: List commits since last publish
39
+
40
+ ```bash
41
+ git log "$LAST_TAG..HEAD" --oneline
42
+ git log "$LAST_TAG..HEAD" --oneline | wc -l
43
+ ```
44
+
45
+ Group by conventional-commit scope. Ignore noise: `chore: archive completed tasks`, `chore: autopilot housekeeping`, `fix(*): auto-fix verify errors`.
46
+
47
+ Categorize user-facing changes:
48
+
49
+ | Category | Signal |
50
+ |----------|--------|
51
+ | New feature | `feat(*)` with description (e.g. `feat(MINE-DART): Dart language support`) |
52
+ | New MCP tool | `feat(MCP-*)` or diff touches `mempalace/mcp_server.py` tool registry |
53
+ | Bug fix | `fix(*)` not tagged `auto-fix verify` |
54
+ | Docs | `docs(*)` |
55
+ | Breaking | Any commit whose body says "BREAKING" or touches storage format / public API |
56
+
57
+ ### Step 3: Detect feature surface changes
58
+
59
+ Cross-check the commit log against the code to catch anything the commit messages missed.
60
+
61
+ **New languages in the miner** — diff language dispatch tables:
62
+
63
+ ```bash
64
+ git diff "$LAST_TAG..HEAD" -- mempalace/miner.py \
65
+ | grep -E '^\+.*(LANG_|_chunks|parse_|tool_|language.*=.*")'
66
+ ```
67
+
68
+ **New MCP tools** — compare tool registries:
69
+
70
+ ```bash
71
+ git show "$LAST_TAG:mempalace/mcp_server.py" 2>/dev/null \
72
+ | grep -oE '"mempalace_[a-z_]+":' | sort -u > /tmp/mcp_before.txt
73
+ grep -oE '"mempalace_[a-z_]+":' mempalace/mcp_server.py | sort -u > /tmp/mcp_after.txt
74
+ diff /tmp/mcp_before.txt /tmp/mcp_after.txt
75
+ ```
76
+
77
+ **Python version bumps** — scan `pyproject.toml` history for `requires-python` changes.
78
+
79
+ ### Step 4: Check docs for staleness
80
+
81
+ For each item in Step 3, verify it appears in the right docs file.
82
+
83
+ | Change | Doc that must update |
84
+ |--------|----------------------|
85
+ | New language | `README.md` — "What gets indexed" bullet + Language-Aware Code Mining table |
86
+ | New MCP tool | `README.md` — MCP tool inventory tables (Read / Write / Graph / Diary groups) |
87
+ | New MCP tool | `docs/LLM_USAGE_RULES.md` — Routing table + any relevant rule section |
88
+ | Python minimum bump | `README.md` Requirements section + `pyproject.toml` `requires-python` |
89
+ | Breaking change | `CHANGELOG.md` under `### Breaking` |
90
+ | Any feature | `CHANGELOG.md` under the release header for this version |
91
+
92
+ Report each stale location as a to-fix item. Do not assume commit messages already covered it.
93
+
94
+ ### Step 5: Propose version bump
95
+
96
+ | What changed | Bump |
97
+ |--------------|------|
98
+ | Any breaking change (API / CLI / storage format / MCP tool signatures) | Major (X.0.0) |
99
+ | New languages, new MCP tools, new CLI commands, behavior changes that are backwards-compatible | Minor (0.X.0) |
100
+ | Only bug fixes, docs, CI, internal refactors | Patch (0.0.X) |
101
+
102
+ State the reasoning. Ask the user to confirm.
103
+
104
+ ### Step 6: Draft the CHANGELOG release entry
105
+
106
+ Open `CHANGELOG.md`. If scattered per-task entries already exist at the top (pattern: `## YYYY-MM-DD · TASK-SLUG`), **consolidate** them under a single release header:
107
+
108
+ ```markdown
109
+ ## vX.Y.Z — YYYY-MM-DD
110
+
111
+ ### Added
112
+ - **N new languages in the code miner:**
113
+ - **<Lang>** — <symbol types>; <notable features> (<TASK-SLUG>)
114
+ - …
115
+ - **N new MCP tools:**
116
+ - `mempalace_<name>` — <one-line purpose> (<TASK-SLUG>)
117
+ - …
118
+
119
+ ### Changed
120
+ - **<human-friendly summary>** — <what shifted>, <why it matters> (<TASK-SLUG>)
121
+
122
+ ### Fixed
123
+ - <if applicable>
124
+
125
+ ### Breaking
126
+ - <if applicable — otherwise omit the section>
127
+ ```
128
+
129
+ Do **not** leave the per-task entries above the release header; consolidate them into bullets beneath it. One release header per version.
130
+
131
+ ### Step 7: Update README and LLM_USAGE_RULES
132
+
133
+ Apply the to-fix items from Step 4. Touch `README.md` and `docs/LLM_USAGE_RULES.md` directly. Do not ask the user to paste snippets — just make the edits.
134
+
135
+ ### Step 8: Bump `pyproject.toml`
136
+
137
+ ```bash
138
+ # Replace "<NEW>" with the confirmed version
139
+ grep -E "^version\s*=" pyproject.toml
140
+ ```
141
+
142
+ Edit the file; do not use `sed -i` unless portable (`sed -i '' 's/…/…/'` on macOS, plain `sed -i` on Linux). Prefer the Edit tool.
143
+
144
+ ### Step 9: Commit
145
+
146
+ ```bash
147
+ git add pyproject.toml CHANGELOG.md README.md docs/LLM_USAGE_RULES.md
148
+ git commit -m "chore: prepare release vX.Y.Z"
149
+ ```
150
+
151
+ Do **not** tag or push. That is `/release`'s job.
152
+
153
+ ### Step 10: Hand off
154
+
155
+ Report:
156
+
157
+ ```
158
+ ## Release-prep for vX.Y.Z
159
+
160
+ Last published: vA.B.C (publish remote)
161
+ Commits since: <N>
162
+
163
+ Features added:
164
+ - <language list>
165
+ - <MCP tool list>
166
+ - <other>
167
+
168
+ Docs updated:
169
+ - README.md: <what>
170
+ - CHANGELOG.md: v<version> release header
171
+ - docs/LLM_USAGE_RULES.md: <if touched>
172
+ - pyproject.toml: <old> → <new>
173
+
174
+ Next: run /release to cut the tag and push to publish.
175
+ ```
176
+
177
+ ## Gotchas
178
+
179
+ - **`git describe --tags --abbrev=0` is wrong for this use case.** It returns the most recent local tag regardless of origin. Upstream tags pulled into the fork (e.g. v3.0.0 from an inherited upstream) will poison the result. Always use `git ls-remote --tags publish`.
180
+ - **`pyproject.toml` version and the `publish`-remote latest tag should match** after the last release. If `pyproject.toml` is ahead, the previous release was cut but the tag never pushed — investigate before bumping again.
181
+ - **Do not push to `origin` on release.** Per project feedback: releases go to `publish` only. `/release` handles this; this skill does not push.
182
+ - **Skip the per-task changelog headers.** Some autopilot flows write `## YYYY-MM-DD · TASK-SLUG` entries at the top of CHANGELOG as work lands. Before release, consolidate them into a single release header with grouped bullets. Do not leave both forms.
183
+
184
+ ## Output
185
+
186
+ ```
187
+ ## Release-prep summary
188
+
189
+ Last published: <vX.Y.Z>
190
+ Proposed version: <vA.B.C> (<major|minor|patch>)
191
+ Commits: <N> since <vX.Y.Z>
192
+ Features: <count> new languages, <count> new MCP tools
193
+ Docs updated: <list>
194
+ Version file: bumped
195
+ Committed: <yes|no>
196
+
197
+ Hand off to: /release
198
+ ```
@@ -0,0 +1,29 @@
1
+ name: Tests
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v5
14
+ - uses: actions/setup-python@v6
15
+ with:
16
+ python-version: "3.13"
17
+ - run: pip install -e ".[dev,treesitter]"
18
+ - run: python3 -m pytest tests/ -v -m "not needs_network"
19
+
20
+ lint:
21
+ runs-on: ubuntu-latest
22
+ steps:
23
+ - uses: actions/checkout@v5
24
+ - uses: actions/setup-python@v6
25
+ with:
26
+ python-version: "3.13"
27
+ - run: pip install ruff
28
+ - run: ruff check .
29
+ - run: ruff format --check .
@@ -11,13 +11,13 @@ jobs:
11
11
  build:
12
12
  runs-on: ubuntu-latest
13
13
  steps:
14
- - uses: actions/checkout@v4
15
- - uses: actions/setup-python@v5
14
+ - uses: actions/checkout@v5
15
+ - uses: actions/setup-python@v6
16
16
  with:
17
17
  python-version: "3.11"
18
18
  - run: pip install build
19
19
  - run: python -m build
20
- - uses: actions/upload-artifact@v4
20
+ - uses: actions/upload-artifact@v5
21
21
  with:
22
22
  name: dist
23
23
  path: dist/
@@ -29,7 +29,7 @@ jobs:
29
29
  permissions:
30
30
  id-token: write
31
31
  steps:
32
- - uses: actions/download-artifact@v4
32
+ - uses: actions/download-artifact@v5
33
33
  with:
34
34
  name: dist
35
35
  path: dist/
@@ -1,5 +1,29 @@
1
1
  # Changelog
2
2
 
3
+ ## v1.5.0 — 2026-04-21
4
+
5
+ ### Added
6
+
7
+ - **5 new languages in the code miner:**
8
+ - **Dart** — classes, mixins, extensions, enums, functions; named/factory constructors, async/await (MINE-DART)
9
+ - **Scala** — classes, case classes, objects, traits, enums, functions; implicits, type aliases, generics, access modifiers (MINE-SCALA)
10
+ - **Kubernetes manifests** — Deployments, Services, ConfigMaps, Secrets, Ingresses, CRDs from `.yaml`/`.yml`, indexed by kind, namespace, name, labels (MINE-K8S)
11
+ - **PHP** — classes, interfaces, traits, enums (PHP 8.1+), functions, methods, namespaces; Laravel / WordPress / Symfony project recognition (MINE-PHP)
12
+ - **Swift** — classes, structs, enums, protocols, functions, properties, extensions, actors, async/await (MINE-SWIFT)
13
+ - **2 new MCP tools:**
14
+ - `mempalace_mine` — agents can trigger incremental or full project re-mining without CLI access; returns structured counts of files processed and drawers filed (MCP-MINE-TRIGGER)
15
+ - `mempalace_file_context` — returns all indexed chunks for a specific source file, ordered by `chunk_index`; useful for reviewing what was mined, handling deleted/renamed files, or getting ordered file context without reading from disk (MCP-FILE-CONTEXT)
16
+
17
+ ### Changed
18
+
19
+ - **LLM usage rules rewritten as LLM-agnostic** — `docs/LLM_USAGE_RULES.md` now targets any MCP-capable agent (Claude Code, Codex, Cursor, Windsurf, Continue, Zed, Aider, …); routing table maps 16 common tasks to the right specialist tool; `MEMPALACE_AGENT_NAME` env var for diary attribution; extended Never list covering destructive-delete guards, diary non-authoritativeness, and absence-from-search-miss; correction recipe added. `docs/AGENT_INSTALL.md` §7.3 synced. README's misleading "AI learns the protocol automatically" claim replaced with a concrete pointer to the usage rules. (LLM-USAGE-RULES)
20
+
21
+ ## v1.4.1 — 2026-04-20
22
+
23
+ ### Changed
24
+ - **Docs: hooks are legacy** — MCP tools + usage rules are now the recommended approach for all agents (Claude Code, Codex, Cursor); hooks demoted to optional Claude Code-only extra
25
+ - **Docs: unified saving story** — README, AGENT_INSTALL, and hooks README all consistently describe watcher for code mining + MCP for conversation context
26
+
3
27
  ## v1.4.0 — 2026-04-19
4
28
 
5
29
  ### Added
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Stack
4
4
 
5
- - **Python** 3.9+ (supports 3.9–3.12)
5
+ - **Python** 3.11+ (supports 3.11–3.14)
6
6
  - **Storage**: LanceDB (core, crash-safe vector DB — no server required)
7
7
  - **Embeddings**: sentence-transformers (local, no API key)
8
8
  - **Config**: PyYAML
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mempalace-code
3
- Version: 1.4.0
3
+ Version: 1.5.0
4
4
  Summary: Developer memory tool — mine codebases and conversations into a LanceDB-backed searchable palace. No API key required.
5
5
  Project-URL: Homepage, https://github.com/rergards/mempalace-code
6
6
  Project-URL: Repository, https://github.com/rergards/mempalace-code
@@ -16,7 +16,6 @@ Classifier: Development Status :: 4 - Beta
16
16
  Classifier: Environment :: Console
17
17
  Classifier: Intended Audience :: Developers
18
18
  Classifier: Programming Language :: Python :: 3
19
- Classifier: Programming Language :: Python :: 3.9
20
19
  Classifier: Programming Language :: Python :: 3.10
21
20
  Classifier: Programming Language :: Python :: 3.11
22
21
  Classifier: Programming Language :: Python :: 3.12
@@ -24,7 +23,7 @@ Classifier: Programming Language :: Python :: 3.13
24
23
  Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
25
24
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
26
25
  Classifier: Topic :: Utilities
27
- Requires-Python: >=3.9
26
+ Requires-Python: >=3.11
28
27
  Requires-Dist: lancedb>=0.17
29
28
  Requires-Dist: pyyaml>=6.0
30
29
  Requires-Dist: sentence-transformers>=2.2
@@ -33,15 +32,15 @@ Requires-Dist: chromadb<2,>=0.5.0; extra == 'chroma'
33
32
  Provides-Extra: dev
34
33
  Requires-Dist: pytest>=7.0; extra == 'dev'
35
34
  Requires-Dist: ruff>=0.4.0; extra == 'dev'
35
+ Requires-Dist: watchfiles>=1.0; extra == 'dev'
36
36
  Provides-Extra: spellcheck
37
37
  Requires-Dist: autocorrect>=2.0; extra == 'spellcheck'
38
38
  Provides-Extra: treesitter
39
39
  Requires-Dist: tree-sitter-go<0.26,>=0.23; extra == 'treesitter'
40
- Requires-Dist: tree-sitter-python<0.26,>=0.23; (python_version >= '3.10') and extra == 'treesitter'
40
+ Requires-Dist: tree-sitter-python<0.26,>=0.23; extra == 'treesitter'
41
41
  Requires-Dist: tree-sitter-rust<0.26,>=0.23; extra == 'treesitter'
42
42
  Requires-Dist: tree-sitter-typescript<0.26,>=0.23; extra == 'treesitter'
43
- Requires-Dist: tree-sitter<0.24,>=0.22; (python_version < '3.10') and extra == 'treesitter'
44
- Requires-Dist: tree-sitter<0.26,>=0.22; (python_version >= '3.10') and extra == 'treesitter'
43
+ Requires-Dist: tree-sitter<0.26,>=0.22; extra == 'treesitter'
45
44
  Provides-Extra: watch
46
45
  Requires-Dist: watchfiles>=1.0; extra == 'watch'
47
46
  Description-Content-Type: text/markdown
@@ -88,7 +87,13 @@ No cloud. No API keys. No subscription. Nothing leaves your machine.
88
87
  ## Quick Start
89
88
 
90
89
  ```bash
91
- pip install mempalace-code
90
+ uv tool install mempalace-code # recommended (fast, Rust-based)
91
+ # or
92
+ pipx install mempalace-code # alternative
93
+ # or
94
+ pip install mempalace-code # into current environment
95
+ # or
96
+ uvx --from mempalace-code mempalace --help # try without installing
92
97
  ```
93
98
 
94
99
  Then ask your AI to read [`docs/AGENT_INSTALL.md`](docs/AGENT_INSTALL.md) — it will handle setup, MCP wiring, prompt injection, and verification automatically.
@@ -102,7 +107,12 @@ mempalace mine ~/projects/myapp # index your codebase
102
107
  claude mcp add mempalace -- python -m mempalace.mcp_server # connect to Claude Code
103
108
  ```
104
109
 
105
- This makes the 27 tools available to your AI. For proactive search and storage (without you asking), you'll also need to add usage rules to your `CLAUDE.md` — see [`docs/AGENT_INSTALL.md`](docs/AGENT_INSTALL.md) Section 7.
110
+ **Optional: auto-sync on commit** (requires `[watch]` extra — see [Auto-Watch](#auto-watch)):
111
+ ```bash
112
+ mempalace watch ~/projects/ # re-mines on every commit, zero noise
113
+ ```
114
+
115
+ This makes the 27 tools available to your AI. For proactive search and storage (without you asking), you'll also need to add usage rules to your `CLAUDE.md` (or equivalent agent-instruction file) — copy from [`docs/LLM_USAGE_RULES.md`](docs/LLM_USAGE_RULES.md), or let [`docs/AGENT_INSTALL.md`](docs/AGENT_INSTALL.md) Section 7 inject them for you.
106
116
 
107
117
  </details>
108
118
 
@@ -139,7 +149,7 @@ You write code. You make decisions. You debug things. Between sessions, all that
139
149
  mempalace-code **indexes it once** into a local vector store, then your AI finds it in milliseconds — using [595x fewer tokens](docs/BENCH_TOKEN_DELTA.md) than grep + read at measured peak (median 80x on a 19k-chunk project, and it keeps scaling). Think of it as `git log` for everything that *isn't* in the code: the *why*, the discussions, the dead ends, the decisions.
140
150
 
141
151
  **What gets indexed:**
142
- - Code files — functions, classes, modules (Python, TypeScript/JS, Go, Rust, C/C++, C#, F#, VB.NET, XAML, Java, Kotlin, Markdown)
152
+ - Code files — functions, classes, modules (Python, TypeScript/JS, Go, Rust, C/C++, C#, F#, VB.NET, XAML, Java, Kotlin, Scala, Swift, Dart, PHP, Markdown) plus Kubernetes manifests
143
153
  - .NET solutions — `.sln`/`.csproj` project graphs, cross-project symbol relationships, interface implementations
144
154
  - Conversation exports — Claude, ChatGPT, Slack
145
155
  - Architecture notes, decisions, anything you store manually
@@ -162,10 +172,15 @@ mempalace-code **indexes it once** into a local vector store, then your AI finds
162
172
  | Rust | Functions, structs, enums, traits, impls | Tree-sitter |
163
173
  | Java | Classes, interfaces, methods, annotations | Regex |
164
174
  | Kotlin | Classes, objects, functions, extensions | Regex |
175
+ | Scala | Classes, case classes, objects, traits, enums, functions, implicits, type aliases, generics | Regex |
176
+ | Swift | Classes, structs, enums, protocols, functions, properties, extensions, actors, async/await | Regex |
177
+ | Dart | Classes, mixins, extensions, enums, functions, named/factory constructors, async/await | Regex |
178
+ | PHP | Classes, interfaces, traits, enums (8.1+), functions, methods, namespaces (Laravel/WP/Symfony aware) | Regex |
165
179
  | C# | Classes, interfaces, records, methods, properties | Regex |
166
180
  | F# / VB.NET | Modules, types, functions | Regex |
167
181
  | XAML | Controls, resources, code-behind linking | Regex |
168
182
  | C / C++ | Functions, structs, enums, classes | Regex |
183
+ | Kubernetes manifests | Deployments, Services, ConfigMaps, Secrets, Ingresses, CRDs (indexed by kind/namespace/labels) | YAML-aware |
169
184
  | Markdown / plain text | Heading sections, paragraphs | — |
170
185
  | YAML / JSON / TOML | Adaptive line-count | — |
171
186
 
@@ -184,6 +199,16 @@ Mining is **incremental** by default — content-hash based, only changed files
184
199
 
185
200
  Keep your palace in sync automatically. By default, watches `.git/refs/heads/` and re-mines only on **commit** — no noise from work-in-progress saves. Handles multiple branches and worktrees.
186
201
 
202
+ Requires the `watch` extra:
203
+ ```bash
204
+ uv tool install "mempalace-code[watch]" # or: pipx install "mempalace-code[watch]"
205
+ ```
206
+
207
+ Already installed without it? Add watchfiles:
208
+ ```bash
209
+ uv tool inject mempalace-code watchfiles # or: pipx inject mempalace-code watchfiles
210
+ ```
211
+
187
212
  ```bash
188
213
  mempalace watch ~/projects/ # watch all projects (on commit, default)
189
214
  mempalace watch ~/projects/ --on-save # watch all file saves instead (noisier)
@@ -252,6 +277,7 @@ claude mcp add mempalace -- python -m mempalace.mcp_server
252
277
  | `mempalace_get_taxonomy` | Full wing → room → count tree |
253
278
  | `mempalace_search` | Semantic search with optional wing/room filters |
254
279
  | `mempalace_code_search` | Filter by language, symbol name/type, file glob |
280
+ | `mempalace_file_context` | All indexed chunks for a source file, ordered by chunk_index |
255
281
  | `mempalace_check_duplicate` | Similarity check before filing (0.9 threshold) |
256
282
 
257
283
  </details>
@@ -264,6 +290,7 @@ claude mcp add mempalace -- python -m mempalace.mcp_server
264
290
  | `mempalace_add_drawer` | File verbatim content into a wing/room |
265
291
  | `mempalace_delete_drawer` | Remove a drawer by ID |
266
292
  | `mempalace_delete_wing` | Delete all drawers in a wing |
293
+ | `mempalace_mine` | Trigger re-mining of a project directory (incremental or full) |
267
294
 
268
295
  </details>
269
296
 
@@ -307,7 +334,7 @@ claude mcp add mempalace -- python -m mempalace.mcp_server
307
334
 
308
335
  </details>
309
336
 
310
- The AI learns the memory protocol automatically from the `mempalace_status` response. No manual configuration.
337
+ MCP tools are discoverable by any MCP-capable client automatically. To teach the AI *when* and *how* to use them, paste the usage rules from [`docs/LLM_USAGE_RULES.md`](docs/LLM_USAGE_RULES.md) into your agent's instructions (CLAUDE.md, AGENTS.md, `.cursorrules`, etc.) — otherwise the tools are available but the assistant will not know the protocol.
311
338
 
312
339
  ---
313
340
 
@@ -491,13 +518,13 @@ curl -fsSL https://raw.githubusercontent.com/rergards/mempalace-code/main/script
491
518
  **Optional extras:**
492
519
 
493
520
  ```bash
494
- pip install "mempalace-code[treesitter]" # AST parsing (Python 3.10+; TS/JS on 3.9+)
521
+ pip install "mempalace-code[treesitter]" # AST parsing
495
522
  pip install "mempalace-code[chroma]" # ChromaDB legacy backend (deprecated)
496
523
  pip install "mempalace-code[spellcheck]" # autocorrect for room/wing names
497
524
  pip install "mempalace-code[dev]" # pytest + ruff
498
525
  ```
499
526
 
500
- **Requirements:** Python 3.9+. ~80 MB embedding model downloaded once during `mempalace init`.
527
+ **Requirements:** Python 3.11+. ~80 MB embedding model downloaded once during `mempalace init`.
501
528
 
502
529
  </details>
503
530
 
@@ -547,21 +574,15 @@ mempalace fetch-model # pre-download for offline use
547
574
  </details>
548
575
 
549
576
  <details>
550
- <summary><strong>Auto-Save Hooks</strong></summary>
577
+ <summary><strong>Saving Conversation Context</strong></summary>
551
578
 
552
- Two Claude Code hooks for automatic memory saving:
579
+ Code mining is automatic via `mempalace watch-all`. For conversation context (decisions, discussions, debugging notes), the AI uses MCP tools directly — works with **any agent** (Claude Code, Codex, Cursor, etc.):
553
580
 
554
- - **Stop Hook** after each response, saves topics, decisions, and code changes
555
- - **PreCompact Hook** emergency save before context compression
581
+ 1. Wire the MCP server (see [install docs](docs/AGENT_INSTALL.md))
582
+ 2. Add usage rules to your agent's instructions (CLAUDE.md, system prompt, etc.)
583
+ 3. The agent calls `mempalace_add_drawer` and `mempalace_diary_write` during sessions
556
584
 
557
- ```json
558
- {
559
- "hooks": {
560
- "Stop": [{"matcher": "", "hooks": [{"type": "command", "command": "/path/to/mempalace/hooks/mempal_save_hook.sh"}]}],
561
- "PreCompact": [{"matcher": "", "hooks": [{"type": "command", "command": "/path/to/mempalace/hooks/mempal_precompact_hook.sh"}]}]
562
- }
563
- }
564
- ```
585
+ > **Legacy:** Claude Code also supports optional [auto-save hooks](hooks/README.md) that remind the AI to save at fixed intervals. These are redundant if MCP + usage rules are set up.
565
586
 
566
587
  </details>
567
588
 
@@ -581,7 +602,7 @@ mempalace/
581
602
  │ ├── palace_graph.py ← room navigation graph
582
603
  │ └── layers.py ← 4-layer memory stack
583
604
  ├── benchmarks/ ← reproducible benchmark runners
584
- ├── hooks/ ← Claude Code auto-save hooks
605
+ ├── hooks/ ← Claude Code auto-save hooks (legacy, optional)
585
606
  ├── examples/ ← usage examples
586
607
  └── tests/ ← 1008 tests
587
608
  ```
@@ -40,7 +40,13 @@ No cloud. No API keys. No subscription. Nothing leaves your machine.
40
40
  ## Quick Start
41
41
 
42
42
  ```bash
43
- pip install mempalace-code
43
+ uv tool install mempalace-code # recommended (fast, Rust-based)
44
+ # or
45
+ pipx install mempalace-code # alternative
46
+ # or
47
+ pip install mempalace-code # into current environment
48
+ # or
49
+ uvx --from mempalace-code mempalace --help # try without installing
44
50
  ```
45
51
 
46
52
  Then ask your AI to read [`docs/AGENT_INSTALL.md`](docs/AGENT_INSTALL.md) — it will handle setup, MCP wiring, prompt injection, and verification automatically.
@@ -54,7 +60,12 @@ mempalace mine ~/projects/myapp # index your codebase
54
60
  claude mcp add mempalace -- python -m mempalace.mcp_server # connect to Claude Code
55
61
  ```
56
62
 
57
- This makes the 27 tools available to your AI. For proactive search and storage (without you asking), you'll also need to add usage rules to your `CLAUDE.md` — see [`docs/AGENT_INSTALL.md`](docs/AGENT_INSTALL.md) Section 7.
63
+ **Optional: auto-sync on commit** (requires `[watch]` extra — see [Auto-Watch](#auto-watch)):
64
+ ```bash
65
+ mempalace watch ~/projects/ # re-mines on every commit, zero noise
66
+ ```
67
+
68
+ This makes the 27 tools available to your AI. For proactive search and storage (without you asking), you'll also need to add usage rules to your `CLAUDE.md` (or equivalent agent-instruction file) — copy from [`docs/LLM_USAGE_RULES.md`](docs/LLM_USAGE_RULES.md), or let [`docs/AGENT_INSTALL.md`](docs/AGENT_INSTALL.md) Section 7 inject them for you.
58
69
 
59
70
  </details>
60
71
 
@@ -91,7 +102,7 @@ You write code. You make decisions. You debug things. Between sessions, all that
91
102
  mempalace-code **indexes it once** into a local vector store, then your AI finds it in milliseconds — using [595x fewer tokens](docs/BENCH_TOKEN_DELTA.md) than grep + read at measured peak (median 80x on a 19k-chunk project, and it keeps scaling). Think of it as `git log` for everything that *isn't* in the code: the *why*, the discussions, the dead ends, the decisions.
92
103
 
93
104
  **What gets indexed:**
94
- - Code files — functions, classes, modules (Python, TypeScript/JS, Go, Rust, C/C++, C#, F#, VB.NET, XAML, Java, Kotlin, Markdown)
105
+ - Code files — functions, classes, modules (Python, TypeScript/JS, Go, Rust, C/C++, C#, F#, VB.NET, XAML, Java, Kotlin, Scala, Swift, Dart, PHP, Markdown) plus Kubernetes manifests
95
106
  - .NET solutions — `.sln`/`.csproj` project graphs, cross-project symbol relationships, interface implementations
96
107
  - Conversation exports — Claude, ChatGPT, Slack
97
108
  - Architecture notes, decisions, anything you store manually
@@ -114,10 +125,15 @@ mempalace-code **indexes it once** into a local vector store, then your AI finds
114
125
  | Rust | Functions, structs, enums, traits, impls | Tree-sitter |
115
126
  | Java | Classes, interfaces, methods, annotations | Regex |
116
127
  | Kotlin | Classes, objects, functions, extensions | Regex |
128
+ | Scala | Classes, case classes, objects, traits, enums, functions, implicits, type aliases, generics | Regex |
129
+ | Swift | Classes, structs, enums, protocols, functions, properties, extensions, actors, async/await | Regex |
130
+ | Dart | Classes, mixins, extensions, enums, functions, named/factory constructors, async/await | Regex |
131
+ | PHP | Classes, interfaces, traits, enums (8.1+), functions, methods, namespaces (Laravel/WP/Symfony aware) | Regex |
117
132
  | C# | Classes, interfaces, records, methods, properties | Regex |
118
133
  | F# / VB.NET | Modules, types, functions | Regex |
119
134
  | XAML | Controls, resources, code-behind linking | Regex |
120
135
  | C / C++ | Functions, structs, enums, classes | Regex |
136
+ | Kubernetes manifests | Deployments, Services, ConfigMaps, Secrets, Ingresses, CRDs (indexed by kind/namespace/labels) | YAML-aware |
121
137
  | Markdown / plain text | Heading sections, paragraphs | — |
122
138
  | YAML / JSON / TOML | Adaptive line-count | — |
123
139
 
@@ -136,6 +152,16 @@ Mining is **incremental** by default — content-hash based, only changed files
136
152
 
137
153
  Keep your palace in sync automatically. By default, watches `.git/refs/heads/` and re-mines only on **commit** — no noise from work-in-progress saves. Handles multiple branches and worktrees.
138
154
 
155
+ Requires the `watch` extra:
156
+ ```bash
157
+ uv tool install "mempalace-code[watch]" # or: pipx install "mempalace-code[watch]"
158
+ ```
159
+
160
+ Already installed without it? Add watchfiles:
161
+ ```bash
162
+ uv tool inject mempalace-code watchfiles # or: pipx inject mempalace-code watchfiles
163
+ ```
164
+
139
165
  ```bash
140
166
  mempalace watch ~/projects/ # watch all projects (on commit, default)
141
167
  mempalace watch ~/projects/ --on-save # watch all file saves instead (noisier)
@@ -204,6 +230,7 @@ claude mcp add mempalace -- python -m mempalace.mcp_server
204
230
  | `mempalace_get_taxonomy` | Full wing → room → count tree |
205
231
  | `mempalace_search` | Semantic search with optional wing/room filters |
206
232
  | `mempalace_code_search` | Filter by language, symbol name/type, file glob |
233
+ | `mempalace_file_context` | All indexed chunks for a source file, ordered by chunk_index |
207
234
  | `mempalace_check_duplicate` | Similarity check before filing (0.9 threshold) |
208
235
 
209
236
  </details>
@@ -216,6 +243,7 @@ claude mcp add mempalace -- python -m mempalace.mcp_server
216
243
  | `mempalace_add_drawer` | File verbatim content into a wing/room |
217
244
  | `mempalace_delete_drawer` | Remove a drawer by ID |
218
245
  | `mempalace_delete_wing` | Delete all drawers in a wing |
246
+ | `mempalace_mine` | Trigger re-mining of a project directory (incremental or full) |
219
247
 
220
248
  </details>
221
249
 
@@ -259,7 +287,7 @@ claude mcp add mempalace -- python -m mempalace.mcp_server
259
287
 
260
288
  </details>
261
289
 
262
- The AI learns the memory protocol automatically from the `mempalace_status` response. No manual configuration.
290
+ MCP tools are discoverable by any MCP-capable client automatically. To teach the AI *when* and *how* to use them, paste the usage rules from [`docs/LLM_USAGE_RULES.md`](docs/LLM_USAGE_RULES.md) into your agent's instructions (CLAUDE.md, AGENTS.md, `.cursorrules`, etc.) — otherwise the tools are available but the assistant will not know the protocol.
263
291
 
264
292
  ---
265
293
 
@@ -443,13 +471,13 @@ curl -fsSL https://raw.githubusercontent.com/rergards/mempalace-code/main/script
443
471
  **Optional extras:**
444
472
 
445
473
  ```bash
446
- pip install "mempalace-code[treesitter]" # AST parsing (Python 3.10+; TS/JS on 3.9+)
474
+ pip install "mempalace-code[treesitter]" # AST parsing
447
475
  pip install "mempalace-code[chroma]" # ChromaDB legacy backend (deprecated)
448
476
  pip install "mempalace-code[spellcheck]" # autocorrect for room/wing names
449
477
  pip install "mempalace-code[dev]" # pytest + ruff
450
478
  ```
451
479
 
452
- **Requirements:** Python 3.9+. ~80 MB embedding model downloaded once during `mempalace init`.
480
+ **Requirements:** Python 3.11+. ~80 MB embedding model downloaded once during `mempalace init`.
453
481
 
454
482
  </details>
455
483
 
@@ -499,21 +527,15 @@ mempalace fetch-model # pre-download for offline use
499
527
  </details>
500
528
 
501
529
  <details>
502
- <summary><strong>Auto-Save Hooks</strong></summary>
530
+ <summary><strong>Saving Conversation Context</strong></summary>
503
531
 
504
- Two Claude Code hooks for automatic memory saving:
532
+ Code mining is automatic via `mempalace watch-all`. For conversation context (decisions, discussions, debugging notes), the AI uses MCP tools directly — works with **any agent** (Claude Code, Codex, Cursor, etc.):
505
533
 
506
- - **Stop Hook** after each response, saves topics, decisions, and code changes
507
- - **PreCompact Hook** emergency save before context compression
534
+ 1. Wire the MCP server (see [install docs](docs/AGENT_INSTALL.md))
535
+ 2. Add usage rules to your agent's instructions (CLAUDE.md, system prompt, etc.)
536
+ 3. The agent calls `mempalace_add_drawer` and `mempalace_diary_write` during sessions
508
537
 
509
- ```json
510
- {
511
- "hooks": {
512
- "Stop": [{"matcher": "", "hooks": [{"type": "command", "command": "/path/to/mempalace/hooks/mempal_save_hook.sh"}]}],
513
- "PreCompact": [{"matcher": "", "hooks": [{"type": "command", "command": "/path/to/mempalace/hooks/mempal_precompact_hook.sh"}]}]
514
- }
515
- }
516
- ```
538
+ > **Legacy:** Claude Code also supports optional [auto-save hooks](hooks/README.md) that remind the AI to save at fixed intervals. These are redundant if MCP + usage rules are set up.
517
539
 
518
540
  </details>
519
541
 
@@ -533,7 +555,7 @@ mempalace/
533
555
  │ ├── palace_graph.py ← room navigation graph
534
556
  │ └── layers.py ← 4-layer memory stack
535
557
  ├── benchmarks/ ← reproducible benchmark runners
536
- ├── hooks/ ← Claude Code auto-save hooks
558
+ ├── hooks/ ← Claude Code auto-save hooks (legacy, optional)
537
559
  ├── examples/ ← usage examples
538
560
  └── tests/ ← 1008 tests
539
561
  ```