swampcastle 4.0.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 (201) hide show
  1. swampcastle-4.0.0/.agents/plugins/marketplace.json +20 -0
  2. swampcastle-4.0.0/.claude-plugin/.mcp.json +9 -0
  3. swampcastle-4.0.0/.claude-plugin/README.md +57 -0
  4. swampcastle-4.0.0/.claude-plugin/commands/help.md +6 -0
  5. swampcastle-4.0.0/.claude-plugin/commands/init.md +6 -0
  6. swampcastle-4.0.0/.claude-plugin/commands/mine.md +7 -0
  7. swampcastle-4.0.0/.claude-plugin/commands/search.md +7 -0
  8. swampcastle-4.0.0/.claude-plugin/commands/status.md +6 -0
  9. swampcastle-4.0.0/.claude-plugin/hooks/hooks.json +25 -0
  10. swampcastle-4.0.0/.claude-plugin/hooks/mempal-precompact-hook.sh +5 -0
  11. swampcastle-4.0.0/.claude-plugin/hooks/mempal-stop-hook.sh +5 -0
  12. swampcastle-4.0.0/.claude-plugin/marketplace.json +18 -0
  13. swampcastle-4.0.0/.claude-plugin/plugin.json +29 -0
  14. swampcastle-4.0.0/.claude-plugin/skills/mempalace/SKILL.md +35 -0
  15. swampcastle-4.0.0/.codex-plugin/README.md +75 -0
  16. swampcastle-4.0.0/.codex-plugin/hooks/mempal-hook.sh +9 -0
  17. swampcastle-4.0.0/.codex-plugin/hooks.json +37 -0
  18. swampcastle-4.0.0/.codex-plugin/plugin.json +52 -0
  19. swampcastle-4.0.0/.codex-plugin/skills/help/SKILL.md +13 -0
  20. swampcastle-4.0.0/.codex-plugin/skills/init/SKILL.md +13 -0
  21. swampcastle-4.0.0/.codex-plugin/skills/mine/SKILL.md +13 -0
  22. swampcastle-4.0.0/.codex-plugin/skills/search/SKILL.md +13 -0
  23. swampcastle-4.0.0/.codex-plugin/skills/status/SKILL.md +13 -0
  24. swampcastle-4.0.0/.dockerignore +13 -0
  25. swampcastle-4.0.0/.github/CODEOWNERS +13 -0
  26. swampcastle-4.0.0/.github/ISSUE_TEMPLATE/bug_report.md +20 -0
  27. swampcastle-4.0.0/.github/ISSUE_TEMPLATE/feature_request.md +11 -0
  28. swampcastle-4.0.0/.github/PULL_REQUEST_TEMPLATE.md +8 -0
  29. swampcastle-4.0.0/.github/dependabot.yml +12 -0
  30. swampcastle-4.0.0/.github/workflows/bump-plugin-version.yml.disabled +51 -0
  31. swampcastle-4.0.0/.github/workflows/ci.yml +51 -0
  32. swampcastle-4.0.0/.gitignore +37 -0
  33. swampcastle-4.0.0/.pre-commit-config.yaml +7 -0
  34. swampcastle-4.0.0/AGENTS.md +112 -0
  35. swampcastle-4.0.0/CONTRIBUTING.md +92 -0
  36. swampcastle-4.0.0/Dockerfile.test +25 -0
  37. swampcastle-4.0.0/LICENSE +21 -0
  38. swampcastle-4.0.0/Makefile +22 -0
  39. swampcastle-4.0.0/NOTICES.md +48 -0
  40. swampcastle-4.0.0/PKG-INFO +295 -0
  41. swampcastle-4.0.0/PLAN.md +294 -0
  42. swampcastle-4.0.0/README.md +249 -0
  43. swampcastle-4.0.0/UPGRADE.md +323 -0
  44. swampcastle-4.0.0/assets/Swamp.webp +0 -0
  45. swampcastle-4.0.0/benchmarks/BENCHMARKS.md +788 -0
  46. swampcastle-4.0.0/benchmarks/BENCHMARKS_V4.md +66 -0
  47. swampcastle-4.0.0/benchmarks/HYBRID_MODE.md +551 -0
  48. swampcastle-4.0.0/benchmarks/README.md +124 -0
  49. swampcastle-4.0.0/benchmarks/convomem_bench.py +346 -0
  50. swampcastle-4.0.0/benchmarks/locomo_bench.py +1069 -0
  51. swampcastle-4.0.0/benchmarks/longmemeval_bench.py +3405 -0
  52. swampcastle-4.0.0/benchmarks/longmemeval_v4.py +350 -0
  53. swampcastle-4.0.0/benchmarks/membench_bench.py +470 -0
  54. swampcastle-4.0.0/benchmarks/results_v4_comparison.json +104 -0
  55. swampcastle-4.0.0/compose.test.yml +36 -0
  56. swampcastle-4.0.0/docs/aaak.md +72 -0
  57. swampcastle-4.0.0/docs/architecture.md +127 -0
  58. swampcastle-4.0.0/docs/cli.md +211 -0
  59. swampcastle-4.0.0/docs/configuration.md +140 -0
  60. swampcastle-4.0.0/docs/getting-started.md +145 -0
  61. swampcastle-4.0.0/docs/hooks.md +100 -0
  62. swampcastle-4.0.0/docs/kg.md +106 -0
  63. swampcastle-4.0.0/docs/mcp.md +139 -0
  64. swampcastle-4.0.0/docs/migration.md +134 -0
  65. swampcastle-4.0.0/docs/mining.md +131 -0
  66. swampcastle-4.0.0/docs/python-api.md +202 -0
  67. swampcastle-4.0.0/docs/schema.sql +30 -0
  68. swampcastle-4.0.0/docs/searching.md +109 -0
  69. swampcastle-4.0.0/docs/sync.md +116 -0
  70. swampcastle-4.0.0/examples/HOOKS_TUTORIAL.md +28 -0
  71. swampcastle-4.0.0/examples/basic_mining.py +12 -0
  72. swampcastle-4.0.0/examples/convo_import.py +11 -0
  73. swampcastle-4.0.0/examples/gemini_cli_setup.md +95 -0
  74. swampcastle-4.0.0/examples/mcp_setup.md +27 -0
  75. swampcastle-4.0.0/hooks/README.md +138 -0
  76. swampcastle-4.0.0/hooks/mempal_precompact_hook.sh +77 -0
  77. swampcastle-4.0.0/hooks/mempal_save_hook.sh +154 -0
  78. swampcastle-4.0.0/integrations/openclaw/SKILL.md +154 -0
  79. swampcastle-4.0.0/pyproject.toml +91 -0
  80. swampcastle-4.0.0/swampcastle/README.md +41 -0
  81. swampcastle-4.0.0/swampcastle/__init__.py +16 -0
  82. swampcastle-4.0.0/swampcastle/__main__.py +5 -0
  83. swampcastle-4.0.0/swampcastle/castle.py +69 -0
  84. swampcastle-4.0.0/swampcastle/cli/__init__.py +5 -0
  85. swampcastle-4.0.0/swampcastle/cli/commands.py +270 -0
  86. swampcastle-4.0.0/swampcastle/cli/main.py +176 -0
  87. swampcastle-4.0.0/swampcastle/dedup.py +222 -0
  88. swampcastle-4.0.0/swampcastle/dialect.py +1075 -0
  89. swampcastle-4.0.0/swampcastle/embeddings.py +451 -0
  90. swampcastle-4.0.0/swampcastle/entity_detector.py +853 -0
  91. swampcastle-4.0.0/swampcastle/entity_registry.py +639 -0
  92. swampcastle-4.0.0/swampcastle/errors.py +42 -0
  93. swampcastle-4.0.0/swampcastle/general_extractor.py +521 -0
  94. swampcastle-4.0.0/swampcastle/hooks_cli.py +234 -0
  95. swampcastle-4.0.0/swampcastle/instructions/help.md +83 -0
  96. swampcastle-4.0.0/swampcastle/instructions/init.md +78 -0
  97. swampcastle-4.0.0/swampcastle/instructions/mine.md +57 -0
  98. swampcastle-4.0.0/swampcastle/instructions/search.md +48 -0
  99. swampcastle-4.0.0/swampcastle/instructions/status.md +36 -0
  100. swampcastle-4.0.0/swampcastle/instructions_cli.py +28 -0
  101. swampcastle-4.0.0/swampcastle/mcp/__init__.py +1 -0
  102. swampcastle-4.0.0/swampcastle/mcp/server.py +137 -0
  103. swampcastle-4.0.0/swampcastle/mcp/tools.py +145 -0
  104. swampcastle-4.0.0/swampcastle/migrate.py +307 -0
  105. swampcastle-4.0.0/swampcastle/mining/__init__.py +1 -0
  106. swampcastle-4.0.0/swampcastle/mining/convo.py +399 -0
  107. swampcastle-4.0.0/swampcastle/mining/miner.py +683 -0
  108. swampcastle-4.0.0/swampcastle/mining/normalize.py +334 -0
  109. swampcastle-4.0.0/swampcastle/mining/rooms.py +310 -0
  110. swampcastle-4.0.0/swampcastle/models/__init__.py +61 -0
  111. swampcastle-4.0.0/swampcastle/models/catalog.py +32 -0
  112. swampcastle-4.0.0/swampcastle/models/diary.py +33 -0
  113. swampcastle-4.0.0/swampcastle/models/drawer.py +109 -0
  114. swampcastle-4.0.0/swampcastle/models/kg.py +64 -0
  115. swampcastle-4.0.0/swampcastle/models/sync.py +41 -0
  116. swampcastle-4.0.0/swampcastle/onboarding.py +489 -0
  117. swampcastle-4.0.0/swampcastle/py.typed +0 -0
  118. swampcastle-4.0.0/swampcastle/query_sanitizer.py +157 -0
  119. swampcastle-4.0.0/swampcastle/services/__init__.py +1 -0
  120. swampcastle-4.0.0/swampcastle/services/catalog.py +139 -0
  121. swampcastle-4.0.0/swampcastle/services/graph.py +187 -0
  122. swampcastle-4.0.0/swampcastle/services/search.py +87 -0
  123. swampcastle-4.0.0/swampcastle/services/vault.py +244 -0
  124. swampcastle-4.0.0/swampcastle/settings.py +104 -0
  125. swampcastle-4.0.0/swampcastle/spellcheck.py +269 -0
  126. swampcastle-4.0.0/swampcastle/split_mega_files.py +317 -0
  127. swampcastle-4.0.0/swampcastle/storage/__init__.py +80 -0
  128. swampcastle-4.0.0/swampcastle/storage/base.py +114 -0
  129. swampcastle-4.0.0/swampcastle/storage/lance.py +376 -0
  130. swampcastle-4.0.0/swampcastle/storage/memory.py +252 -0
  131. swampcastle-4.0.0/swampcastle/storage/postgres.py +890 -0
  132. swampcastle-4.0.0/swampcastle/storage/sqlite_graph.py +234 -0
  133. swampcastle-4.0.0/swampcastle/sync.py +336 -0
  134. swampcastle-4.0.0/swampcastle/sync_client.py +115 -0
  135. swampcastle-4.0.0/swampcastle/sync_meta.py +162 -0
  136. swampcastle-4.0.0/swampcastle/sync_server.py +163 -0
  137. swampcastle-4.0.0/swampcastle/version.py +3 -0
  138. swampcastle-4.0.0/swampcastle/wal.py +54 -0
  139. swampcastle-4.0.0/tests/benchmarks/README.md +138 -0
  140. swampcastle-4.0.0/tests/benchmarks/__init__.py +1 -0
  141. swampcastle-4.0.0/tests/benchmarks/conftest.py +144 -0
  142. swampcastle-4.0.0/tests/benchmarks/data_generator.py +568 -0
  143. swampcastle-4.0.0/tests/benchmarks/report.py +117 -0
  144. swampcastle-4.0.0/tests/benchmarks/test_chromadb_stress.py +206 -0
  145. swampcastle-4.0.0/tests/benchmarks/test_ingest_bench.py +169 -0
  146. swampcastle-4.0.0/tests/benchmarks/test_knowledge_graph_bench.py +290 -0
  147. swampcastle-4.0.0/tests/benchmarks/test_layers_bench.py +209 -0
  148. swampcastle-4.0.0/tests/benchmarks/test_mcp_bench.py +226 -0
  149. swampcastle-4.0.0/tests/benchmarks/test_memory_profile.py +181 -0
  150. swampcastle-4.0.0/tests/benchmarks/test_palace_boost.py +176 -0
  151. swampcastle-4.0.0/tests/benchmarks/test_recall_threshold.py +182 -0
  152. swampcastle-4.0.0/tests/benchmarks/test_search_bench.py +234 -0
  153. swampcastle-4.0.0/tests/conftest.py +63 -0
  154. swampcastle-4.0.0/tests/integration/test_postgres_integration.py +304 -0
  155. swampcastle-4.0.0/tests/test_castle.py +98 -0
  156. swampcastle-4.0.0/tests/test_castle_integration.py +57 -0
  157. swampcastle-4.0.0/tests/test_catalog_service.py +104 -0
  158. swampcastle-4.0.0/tests/test_cli_commands.py +301 -0
  159. swampcastle-4.0.0/tests/test_cli_dispatch.py +195 -0
  160. swampcastle-4.0.0/tests/test_convo_miner.py +43 -0
  161. swampcastle-4.0.0/tests/test_convo_miner_unit.py +102 -0
  162. swampcastle-4.0.0/tests/test_dedup.py +295 -0
  163. swampcastle-4.0.0/tests/test_dialect.py +157 -0
  164. swampcastle-4.0.0/tests/test_dialect_file_ops.py +115 -0
  165. swampcastle-4.0.0/tests/test_embeddings.py +330 -0
  166. swampcastle-4.0.0/tests/test_entity_detector.py +380 -0
  167. swampcastle-4.0.0/tests/test_entity_registry.py +313 -0
  168. swampcastle-4.0.0/tests/test_errors.py +43 -0
  169. swampcastle-4.0.0/tests/test_factory_router.py +126 -0
  170. swampcastle-4.0.0/tests/test_general_extractor.py +248 -0
  171. swampcastle-4.0.0/tests/test_graph_service.py +135 -0
  172. swampcastle-4.0.0/tests/test_hooks_cli.py +420 -0
  173. swampcastle-4.0.0/tests/test_instructions_cli.py +45 -0
  174. swampcastle-4.0.0/tests/test_main_module.py +14 -0
  175. swampcastle-4.0.0/tests/test_maintenance.py +121 -0
  176. swampcastle-4.0.0/tests/test_mcp_tools.py +158 -0
  177. swampcastle-4.0.0/tests/test_migrate.py +284 -0
  178. swampcastle-4.0.0/tests/test_miner.py +292 -0
  179. swampcastle-4.0.0/tests/test_models.py +173 -0
  180. swampcastle-4.0.0/tests/test_normalize.py +511 -0
  181. swampcastle-4.0.0/tests/test_onboarding.py +452 -0
  182. swampcastle-4.0.0/tests/test_query_sanitizer.py +212 -0
  183. swampcastle-4.0.0/tests/test_room_detector_local.py +264 -0
  184. swampcastle-4.0.0/tests/test_search_service.py +102 -0
  185. swampcastle-4.0.0/tests/test_settings.py +114 -0
  186. swampcastle-4.0.0/tests/test_spellcheck.py +160 -0
  187. swampcastle-4.0.0/tests/test_spellcheck_extra.py +72 -0
  188. swampcastle-4.0.0/tests/test_split_mega_files.py +292 -0
  189. swampcastle-4.0.0/tests/test_storage_base.py +58 -0
  190. swampcastle-4.0.0/tests/test_storage_lance.py +75 -0
  191. swampcastle-4.0.0/tests/test_storage_memory.py +196 -0
  192. swampcastle-4.0.0/tests/test_storage_postgres.py +317 -0
  193. swampcastle-4.0.0/tests/test_storage_sqlite_graph.py +78 -0
  194. swampcastle-4.0.0/tests/test_sync.py +923 -0
  195. swampcastle-4.0.0/tests/test_sync_client.py +183 -0
  196. swampcastle-4.0.0/tests/test_sync_meta.py +197 -0
  197. swampcastle-4.0.0/tests/test_sync_server_app.py +159 -0
  198. swampcastle-4.0.0/tests/test_vault_service.py +110 -0
  199. swampcastle-4.0.0/tests/test_version_consistency.py +16 -0
  200. swampcastle-4.0.0/tests/test_wal.py +61 -0
  201. swampcastle-4.0.0/uv.lock +3062 -0
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "swampcastle",
3
+ "interface": {
4
+ "displayName": "SwampCastle"
5
+ },
6
+ "plugins": [
7
+ {
8
+ "name": "swampcastle",
9
+ "source": {
10
+ "source": "local",
11
+ "path": "./.codex-plugin"
12
+ },
13
+ "policy": {
14
+ "installation": "AVAILABLE",
15
+ "authentication": "NONE"
16
+ },
17
+ "category": "Coding"
18
+ }
19
+ ]
20
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "swampcastle": {
3
+ "command": "python3",
4
+ "args": [
5
+ "-m",
6
+ "swampcastle.drawbridge"
7
+ ]
8
+ }
9
+ }
@@ -0,0 +1,57 @@
1
+ # SwampCastle Claude Code Plugin
2
+
3
+ A Claude Code plugin that gives your AI a persistent memory system. Mine projects and conversations into a searchable palace backed by ChromaDB, with 19 MCP tools, auto-save hooks, and 5 guided skills.
4
+
5
+ ## Prerequisites
6
+
7
+ - Python 3.9+
8
+
9
+ ## Installation
10
+
11
+ ### Claude Code Marketplace
12
+
13
+ ```bash
14
+ claude plugin marketplace add dekoza/swampcastle
15
+ claude plugin install --scope user swampcastle
16
+ ```
17
+
18
+ ### Local Clone
19
+
20
+ ```bash
21
+ claude plugin add /path/to/swampcastle
22
+ ```
23
+
24
+ ## Post-Install Setup
25
+
26
+ After installing the plugin, run the init command to complete setup (pip install, MCP configuration, etc.):
27
+
28
+ ```
29
+ /swampcastle:init
30
+ ```
31
+
32
+ ## Available Slash Commands
33
+
34
+ | Command | Description |
35
+ |---------|-------------|
36
+ | `/swampcastle:help` | Show available tools, skills, and architecture |
37
+ | `/swampcastle:init` | Set up SwampCastle -- install, configure MCP, onboard |
38
+ | `/swampcastle:search` | Search your memories across the palace |
39
+ | `/swampcastle:mine` | Mine projects and conversations into the palace |
40
+ | `/swampcastle:status` | Show palace overview -- wings, rooms, drawer counts |
41
+
42
+ ## Hooks
43
+
44
+ SwampCastle registers two hooks that run automatically:
45
+
46
+ - **Stop** -- Saves conversation context every 15 messages.
47
+ - **PreCompact** -- Preserves important memories before context compaction.
48
+
49
+ Set the `MEMPAL_DIR` environment variable to a directory path to automatically run `swampcastle mine` on that directory during each save trigger.
50
+
51
+ ## MCP Server
52
+
53
+ The plugin automatically configures a local MCP server with 19 tools for storing, searching, and managing memories. No manual MCP setup is required -- `/swampcastle:init` handles everything.
54
+
55
+ ## Full Documentation
56
+
57
+ See the main [README](../README.md) for complete documentation, architecture details, and advanced usage.
@@ -0,0 +1,6 @@
1
+ ---
2
+ description: Show comprehensive SwampCastle help — available skills, MCP tools, CLI commands, hooks, and architecture.
3
+ allowed-tools: Bash, Read
4
+ ---
5
+
6
+ Invoke the generic swampcastle skill (using the Skill tool) with the `help` command, then follow its instructions.
@@ -0,0 +1,6 @@
1
+ ---
2
+ description: Set up SwampCastle — install the package, initialize a palace, configure MCP server, and verify everything works.
3
+ allowed-tools: Bash, Read, Write, Edit, Glob, Grep
4
+ ---
5
+
6
+ Invoke the generic swampcastle skill (using the Skill tool) with the `init` command, then follow its instructions.
@@ -0,0 +1,7 @@
1
+ ---
2
+ description: Mine projects and conversations into the SwampCastle. Supports project files, conversation exports, and auto-classification.
3
+ argument-hint: Path to project or conversation export to mine.
4
+ allowed-tools: Bash, Read, Write, Edit, Glob, Grep
5
+ ---
6
+
7
+ Invoke the generic swampcastle skill (using the Skill tool) with the `mine` command, then follow its instructions.
@@ -0,0 +1,7 @@
1
+ ---
2
+ description: Search your memories across the SwampCastle using semantic search with wing/room filtering.
3
+ argument-hint: Search query, optionally with wing/room filters.
4
+ allowed-tools: Bash, Read
5
+ ---
6
+
7
+ Invoke the generic swampcastle skill (using the Skill tool) with the `search` command, then follow its instructions.
@@ -0,0 +1,6 @@
1
+ ---
2
+ description: Show the current state of your memory palace — wings, rooms, drawer counts, and suggestions.
3
+ allowed-tools: Bash, Read
4
+ ---
5
+
6
+ Invoke the generic swampcastle skill (using the Skill tool) with the `status` command, then follow its instructions.
@@ -0,0 +1,25 @@
1
+ {
2
+ "description": "MemPalace auto-save and pre-compact hooks",
3
+ "hooks": {
4
+ "Stop": [
5
+ {
6
+ "hooks": [
7
+ {
8
+ "type": "command",
9
+ "command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/mempal-stop-hook.sh"
10
+ }
11
+ ]
12
+ }
13
+ ],
14
+ "PreCompact": [
15
+ {
16
+ "hooks": [
17
+ {
18
+ "type": "command",
19
+ "command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/mempal-precompact-hook.sh"
20
+ }
21
+ ]
22
+ }
23
+ ]
24
+ }
25
+ }
@@ -0,0 +1,5 @@
1
+ #!/bin/bash
2
+ # SwampCastle PreCompact Hook — thin wrapper calling Python CLI
3
+ # All logic lives in swampcastle.hooks_cli for cross-harness extensibility
4
+ INPUT=$(cat)
5
+ echo "$INPUT" | python3 -m swampcastle hook run --hook precompact --harness claude-code
@@ -0,0 +1,5 @@
1
+ #!/bin/bash
2
+ # SwampCastle Stop Hook — thin wrapper calling Python CLI
3
+ # All logic lives in swampcastle.hooks_cli for cross-harness extensibility
4
+ INPUT=$(cat)
5
+ echo "$INPUT" | python3 -m swampcastle hook run --hook stop --harness claude-code
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "swampcastle",
3
+ "owner": {
4
+ "name": "milla-jovovich",
5
+ "url": "https://github.com/milla-jovovich"
6
+ },
7
+ "plugins": [
8
+ {
9
+ "name": "swampcastle",
10
+ "source": "./.claude-plugin",
11
+ "description": "AI memory system — mine projects and conversations into a searchable palace. 19 MCP tools, auto-save hooks, guided setup.",
12
+ "version": "3.0.14",
13
+ "author": {
14
+ "name": "milla-jovovich"
15
+ }
16
+ }
17
+ ]
18
+ }
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "swampcastle",
3
+ "version": "3.0.14",
4
+ "description": "Give your AI a memory — mine projects and conversations into a searchable palace. 19 MCP tools, auto-save hooks, and guided setup.",
5
+ "author": {
6
+ "name": "milla-jovovich"
7
+ },
8
+ "license": "MIT",
9
+ "commands": [],
10
+ "mcpServers": {
11
+ "swampcastle": {
12
+ "command": "python3",
13
+ "args": [
14
+ "-m",
15
+ "swampcastle.drawbridge"
16
+ ]
17
+ }
18
+ },
19
+ "keywords": [
20
+ "memory",
21
+ "ai",
22
+ "rag",
23
+ "mcp",
24
+ "chromadb",
25
+ "palace",
26
+ "search"
27
+ ],
28
+ "repository": "https://github.com/dekoza/swampcastle"
29
+ }
@@ -0,0 +1,35 @@
1
+ ---
2
+ name: swampcastle
3
+ description: SwampCastle — mine projects and conversations into a searchable memory palace. Use when asked about swampcastle, memory palace, mining memories, searching memories, or palace setup.
4
+ allowed-tools: Bash, Read, Write, Edit, Glob, Grep
5
+ ---
6
+
7
+ # SwampCastle
8
+
9
+ A searchable memory palace for AI — mine projects and conversations, then search them semantically.
10
+
11
+ ## Prerequisites
12
+
13
+ Ensure `swampcastle` is installed:
14
+
15
+ ```bash
16
+ swampcastle --version
17
+ ```
18
+
19
+ If not installed:
20
+
21
+ ```bash
22
+ pip install swampcastle
23
+ ```
24
+
25
+ ## Usage
26
+
27
+ SwampCastle provides dynamic instructions via the CLI. To get instructions for any operation:
28
+
29
+ ```bash
30
+ swampcastle instructions <command>
31
+ ```
32
+
33
+ Where `<command>` is one of: `help`, `init`, `mine`, `search`, `status`.
34
+
35
+ Run the appropriate instructions command, then follow the returned instructions step by step.
@@ -0,0 +1,75 @@
1
+ # SwampCastle - Codex CLI Plugin
2
+
3
+ Give your AI a persistent memory -- mine projects and conversations into a searchable palace backed by ChromaDB, with 19 MCP tools, auto-save hooks, and guided skills.
4
+
5
+ ## Prerequisites
6
+
7
+ - Python 3.9+
8
+ - Codex CLI installed and configured
9
+ - `pip install swampcastle`
10
+
11
+ ## Installation
12
+
13
+ ### Local Install
14
+
15
+ 1. Copy or symlink the `.codex-plugin` directory into your project root:
16
+
17
+ ```bash
18
+ cp -r .codex-plugin /path/to/your/project/.codex-plugin
19
+ ```
20
+
21
+ 2. Verify the plugin is detected:
22
+
23
+ ```bash
24
+ codex --plugins
25
+ ```
26
+
27
+ 3. Initialize your palace:
28
+
29
+ ```bash
30
+ codex /init
31
+ ```
32
+
33
+ ### Git Install
34
+
35
+ 1. Clone the SwampCastle repository:
36
+
37
+ ```bash
38
+ git clone https://github.com/dekoza/swampcastle.git
39
+ cd swampcastle
40
+ ```
41
+
42
+ 2. Install the Python package:
43
+
44
+ ```bash
45
+ pip install -e .
46
+ ```
47
+
48
+ 3. The `.codex-plugin` directory is already in the repo root. Codex CLI will detect it automatically when you run Codex from inside the repository.
49
+
50
+ 4. Initialize your palace:
51
+
52
+ ```bash
53
+ codex /init
54
+ ```
55
+
56
+ ## Available Skills
57
+
58
+ | Skill | Description |
59
+ |-------|-------------|
60
+ | `/help` | Show available commands and usage tips |
61
+ | `/init` | Initialize a new memory palace |
62
+ | `/search` | Semantic search across all mined memories |
63
+ | `/mine` | Mine a project or conversation into your palace |
64
+ | `/status` | Show palace status, room counts, and health |
65
+
66
+ ## Hooks
67
+
68
+ The plugin includes auto-save hooks that run on session stop (every 15 messages) and before context compaction, automatically preserving conversation context into your palace.
69
+
70
+ Set the `MEMPAL_DIR` environment variable to a directory path to automatically run `swampcastle mine` on that directory during each save trigger.
71
+
72
+ ## Support
73
+
74
+ - Repository: https://github.com/dekoza/swampcastle
75
+ - Issues: https://github.com/dekoza/swampcastle/issues
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ HOOK_NAME="${1:?Usage: mempal-hook.sh <hook-name>}"
4
+ INPUT_FILE=$(mktemp) || { echo "Failed to create temp file" >&2; exit 1; }
5
+ cat > "$INPUT_FILE"
6
+ cat "$INPUT_FILE" | python3 -m swampcastle hook run --hook "$HOOK_NAME" --harness codex
7
+ EXIT_CODE=$?
8
+ rm -f "$INPUT_FILE" 2>/dev/null
9
+ exit $EXIT_CODE
@@ -0,0 +1,37 @@
1
+ {
2
+ "hooks": {
3
+ "SessionStart": [
4
+ {
5
+ "matcher": "*",
6
+ "hooks": [
7
+ {
8
+ "type": "command",
9
+ "command": "${CODEX_PLUGIN_ROOT}/hooks/mempal-hook.sh session-start"
10
+ }
11
+ ]
12
+ }
13
+ ],
14
+ "Stop": [
15
+ {
16
+ "matcher": "*",
17
+ "hooks": [
18
+ {
19
+ "type": "command",
20
+ "command": "${CODEX_PLUGIN_ROOT}/hooks/mempal-hook.sh stop"
21
+ }
22
+ ]
23
+ }
24
+ ],
25
+ "PreCompact": [
26
+ {
27
+ "matcher": "*",
28
+ "hooks": [
29
+ {
30
+ "type": "command",
31
+ "command": "${CODEX_PLUGIN_ROOT}/hooks/mempal-hook.sh precompact"
32
+ }
33
+ ]
34
+ }
35
+ ]
36
+ }
37
+ }
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "swampcastle",
3
+ "version": "3.0.14",
4
+ "description": "Give your AI a memory — mine projects and conversations into a searchable palace. 19 MCP tools, auto-save hooks, and guided setup.",
5
+ "author": {
6
+ "name": "milla-jovovich"
7
+ },
8
+ "homepage": "https://github.com/dekoza/swampcastle",
9
+ "repository": "https://github.com/dekoza/swampcastle",
10
+ "license": "MIT",
11
+ "keywords": [
12
+ "memory",
13
+ "ai",
14
+ "rag",
15
+ "mcp",
16
+ "chromadb",
17
+ "palace",
18
+ "search"
19
+ ],
20
+ "skills": "./skills/",
21
+ "hooks": "./hooks.json",
22
+ "mcpServers": {
23
+ "swampcastle": {
24
+ "command": "python3",
25
+ "args": [
26
+ "-m",
27
+ "swampcastle.drawbridge"
28
+ ]
29
+ }
30
+ },
31
+ "interface": {
32
+ "displayName": "SwampCastle",
33
+ "shortDescription": "AI memory system for Codex",
34
+ "longDescription": "Give your AI a persistent memory — mine projects and conversations into a searchable palace backed by ChromaDB, with 19 MCP tools, auto-save hooks, and guided skills.",
35
+ "developerName": "milla-jovovich",
36
+ "category": "Coding",
37
+ "capabilities": [
38
+ "Interactive",
39
+ "Read",
40
+ "Write"
41
+ ],
42
+ "websiteURL": "https://github.com/dekoza/swampcastle",
43
+ "privacyPolicyURL": "https://github.com/dekoza/swampcastle",
44
+ "termsOfServiceURL": "https://github.com/dekoza/swampcastle",
45
+ "defaultPrompt": [
46
+ "Search my memories for recent decisions",
47
+ "Mine this project into my memory palace",
48
+ "Show my palace status and room counts"
49
+ ],
50
+ "brandColor": "#7C3AED"
51
+ }
52
+ }
@@ -0,0 +1,13 @@
1
+ ---
2
+ name: help
3
+ description: Show SwampCastle help — available commands, usage tips, and getting started guidance.
4
+ allowed-tools: Bash, Read
5
+ ---
6
+
7
+ # SwampCastle Help
8
+
9
+ Run the following command and follow the returned instructions step by step:
10
+
11
+ ```bash
12
+ swampcastle instructions help
13
+ ```
@@ -0,0 +1,13 @@
1
+ ---
2
+ name: init
3
+ description: Initialize a new SwampCastle — guided setup for your AI memory palace with ChromaDB backend.
4
+ allowed-tools: Bash, Read, Write, Edit
5
+ ---
6
+
7
+ # SwampCastle Init
8
+
9
+ Run the following command and follow the returned instructions step by step:
10
+
11
+ ```bash
12
+ swampcastle instructions init
13
+ ```
@@ -0,0 +1,13 @@
1
+ ---
2
+ name: mine
3
+ description: Mine a project or conversation into your SwampCastle — extract and store memories for later retrieval.
4
+ allowed-tools: Bash, Read, Glob, Grep
5
+ ---
6
+
7
+ # SwampCastle Mine
8
+
9
+ Run the following command and follow the returned instructions step by step:
10
+
11
+ ```bash
12
+ swampcastle instructions mine
13
+ ```
@@ -0,0 +1,13 @@
1
+ ---
2
+ name: search
3
+ description: Search your SwampCastle — semantic search across all mined memories, projects, and conversations.
4
+ allowed-tools: Bash, Read
5
+ ---
6
+
7
+ # SwampCastle Search
8
+
9
+ Run the following command and follow the returned instructions step by step:
10
+
11
+ ```bash
12
+ swampcastle instructions search
13
+ ```
@@ -0,0 +1,13 @@
1
+ ---
2
+ name: status
3
+ description: Show SwampCastle status — room counts, storage usage, and palace health.
4
+ allowed-tools: Bash, Read
5
+ ---
6
+
7
+ # SwampCastle Status
8
+
9
+ Run the following command and follow the returned instructions step by step:
10
+
11
+ ```bash
12
+ swampcastle instructions status
13
+ ```
@@ -0,0 +1,13 @@
1
+ .git
2
+ .github
3
+ .venv
4
+ __pycache__/
5
+ *.pyc
6
+ .pytest_cache/
7
+ .mypy_cache/
8
+ .ruff_cache/
9
+ htmlcov/
10
+ .coverage
11
+ coverage/
12
+ benchmarks/
13
+ node_modules/
@@ -0,0 +1,13 @@
1
+ # Default owners for everything
2
+ * @milla-jovovich @bensig @igorls
3
+
4
+ # Core library
5
+ mempalace/ @milla-jovovich @bensig
6
+
7
+ # CI and workflows
8
+ .github/ @bensig
9
+
10
+ # Plugins and integrations
11
+ .claude-plugin/ @bensig
12
+ .codex-plugin/ @bensig
13
+ integrations/ @bensig
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: Bug Report
3
+ about: Something isn't working
4
+ labels: bug
5
+ ---
6
+
7
+ **What happened?**
8
+
9
+ **What did you expect?**
10
+
11
+ **How to reproduce:**
12
+
13
+ 1.
14
+ 2.
15
+ 3.
16
+
17
+ **Environment:**
18
+ - OS:
19
+ - Python version:
20
+ - MemPal version: (check `python mempal.py --version` or git SHA)
@@ -0,0 +1,11 @@
1
+ ---
2
+ name: Feature Request
3
+ about: Suggest an improvement
4
+ labels: enhancement
5
+ ---
6
+
7
+ **What problem does this solve?**
8
+
9
+ **What's the proposed solution?**
10
+
11
+ **Alternatives considered:**
@@ -0,0 +1,8 @@
1
+ ## What does this PR do?
2
+
3
+ ## How to test
4
+
5
+ ## Checklist
6
+ - [ ] Tests pass (`python -m pytest tests/ -v`)
7
+ - [ ] No hardcoded paths
8
+ - [ ] Linter passes (`ruff check .`)
@@ -0,0 +1,12 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "pip"
4
+ directory: "/"
5
+ schedule:
6
+ interval: "weekly"
7
+ open-pull-requests-limit: 5
8
+ - package-ecosystem: "github-actions"
9
+ directory: "/"
10
+ schedule:
11
+ interval: "weekly"
12
+ open-pull-requests-limit: 3
@@ -0,0 +1,51 @@
1
+ name: Bump Version
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+
7
+ jobs:
8
+ bump-version:
9
+ runs-on: ubuntu-latest
10
+ permissions:
11
+ contents: write
12
+ steps:
13
+ - uses: actions/checkout@v6
14
+
15
+ - name: Bump patch version
16
+ run: |
17
+ CURRENT=$(python3 -c "exec(open('mempalace/version.py').read()); print(__version__)")
18
+ IFS='.' read -r MAJOR MINOR PATCH <<< "$CURRENT"
19
+ PATCH=$((PATCH + 1))
20
+ NEW="${MAJOR}.${MINOR}.${PATCH}"
21
+ echo "__version__ = \"${NEW}\"" > mempalace/version.py
22
+ # Prepend docstring
23
+ sed -i '1i"""Single source of truth for the MemPalace package version."""\n' mempalace/version.py
24
+ echo "version=$NEW" >> "$GITHUB_OUTPUT"
25
+ id: version
26
+
27
+ - name: Sync plugin.json
28
+ run: |
29
+ jq --arg v "${{ steps.version.outputs.version }}" '.version = $v' .claude-plugin/plugin.json > tmp.json && mv tmp.json .claude-plugin/plugin.json
30
+
31
+ - name: Sync marketplace.json
32
+ run: |
33
+ jq --arg v "${{ steps.version.outputs.version }}" '.plugins[0].version = $v' .claude-plugin/marketplace.json > tmp.json && mv tmp.json .claude-plugin/marketplace.json
34
+
35
+ - name: Sync codex plugin.json
36
+ run: |
37
+ jq --arg v "${{ steps.version.outputs.version }}" '.version = $v' .codex-plugin/plugin.json > tmp.json && mv tmp.json .codex-plugin/plugin.json
38
+
39
+ - name: Sync pyproject.toml
40
+ run: |
41
+ sed -i "s/^version = \".*\"/version = \"${{ steps.version.outputs.version }}\"/" pyproject.toml
42
+
43
+ - name: Commit and push
44
+ run: |
45
+ git config user.name "github-actions[bot]"
46
+ git config user.email "github-actions[bot]@users.noreply.github.com"
47
+ git add mempalace/version.py .claude-plugin/plugin.json .claude-plugin/marketplace.json .codex-plugin/plugin.json pyproject.toml
48
+ if ! git diff --staged --quiet; then
49
+ git commit -m "chore: bump version to ${{ steps.version.outputs.version }}"
50
+ git push
51
+ fi