memorymaster 3.2.0__tar.gz → 3.2.2__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 (200) hide show
  1. {memorymaster-3.2.0/memorymaster.egg-info → memorymaster-3.2.2}/PKG-INFO +31 -23
  2. {memorymaster-3.2.0 → memorymaster-3.2.2}/README.md +30 -22
  3. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/__init__.py +1 -1
  4. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/_storage_lifecycle.py +0 -11
  5. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/_storage_read.py +0 -22
  6. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/_storage_schema.py +1 -22
  7. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/_storage_write_claims.py +0 -20
  8. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/cli.py +3 -4
  9. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/cli_handlers_basic.py +2 -8
  10. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/cli_handlers_curation.py +10 -5
  11. memorymaster-3.2.2/memorymaster/config_templates/claude-md-append.md +26 -0
  12. memorymaster-3.2.2/memorymaster/config_templates/codex-agents-md-append.md +35 -0
  13. memorymaster-3.2.2/memorymaster/config_templates/hooks/memorymaster-precompact.py +35 -0
  14. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/dream_bridge.py +18 -24
  15. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/mcp_server.py +12 -13
  16. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/metrics_exporter.py +1 -1
  17. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/security.py +41 -5
  18. memorymaster-3.2.0/scripts/setup-hooks.py → memorymaster-3.2.2/memorymaster/setup_hooks.py +39 -7
  19. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/transcript_miner.py +10 -6
  20. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/vault_bases.py +0 -1
  21. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/vault_curator.py +0 -1
  22. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/verbatim_store.py +9 -6
  23. {memorymaster-3.2.0 → memorymaster-3.2.2/memorymaster.egg-info}/PKG-INFO +31 -23
  24. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster.egg-info/SOURCES.txt +11 -6
  25. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster.egg-info/entry_points.txt +1 -0
  26. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster.egg-info/top_level.txt +0 -1
  27. {memorymaster-3.2.0 → memorymaster-3.2.2}/pyproject.toml +8 -2
  28. {memorymaster-3.2.0 → memorymaster-3.2.2}/scripts/autoresearch_daemon.py +28 -5
  29. memorymaster-3.2.2/scripts/setup-hooks.py +10 -0
  30. memorymaster-3.2.2/tests/test_handler_regressions.py +158 -0
  31. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_security_patterns.py +115 -0
  32. {memorymaster-3.2.0 → memorymaster-3.2.2}/LICENSE +0 -0
  33. {memorymaster-3.2.0 → memorymaster-3.2.2}/benchmarks/longmemeval_runner.py +0 -0
  34. {memorymaster-3.2.0 → memorymaster-3.2.2}/benchmarks/longmemeval_vector_runner.py +0 -0
  35. {memorymaster-3.2.0 → memorymaster-3.2.2}/benchmarks/perf_smoke.py +0 -0
  36. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/__main__.py +0 -0
  37. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/_storage_shared.py +0 -0
  38. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/access_control.py +0 -0
  39. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/auto_extractor.py +0 -0
  40. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/auto_resolver.py +0 -0
  41. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/claim_verifier.py +0 -0
  42. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/cli_helpers.py +0 -0
  43. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/config.py +0 -0
  44. {memorymaster-3.2.0/config-templates → memorymaster-3.2.2/memorymaster/config_templates}/hooks/memorymaster-auto-ingest.py +0 -0
  45. {memorymaster-3.2.0/config-templates → memorymaster-3.2.2/memorymaster/config_templates}/hooks/memorymaster-classify.py +0 -0
  46. {memorymaster-3.2.0/config-templates → memorymaster-3.2.2/memorymaster/config_templates}/hooks/memorymaster-recall.py +0 -0
  47. {memorymaster-3.2.0/config-templates → memorymaster-3.2.2/memorymaster/config_templates}/hooks/memorymaster-session-start.py +0 -0
  48. {memorymaster-3.2.0/config-templates → memorymaster-3.2.2/memorymaster/config_templates}/hooks/memorymaster-steward-cycle.py +0 -0
  49. {memorymaster-3.2.0/config-templates → memorymaster-3.2.2/memorymaster/config_templates}/hooks/memorymaster-validate-wiki.py +0 -0
  50. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/conflict_resolver.py +0 -0
  51. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/context_hook.py +0 -0
  52. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/context_optimizer.py +0 -0
  53. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/daily_notes.py +0 -0
  54. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/dashboard.py +0 -0
  55. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/db_merge.py +0 -0
  56. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/embeddings.py +0 -0
  57. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/entity_graph.py +0 -0
  58. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/feedback.py +0 -0
  59. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/jobs/__init__.py +0 -0
  60. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/jobs/compact_summaries.py +0 -0
  61. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/jobs/compactor.py +0 -0
  62. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/jobs/decay.py +0 -0
  63. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/jobs/dedup.py +0 -0
  64. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/jobs/deterministic.py +0 -0
  65. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/jobs/extractor.py +0 -0
  66. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/jobs/staleness.py +0 -0
  67. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/jobs/validator.py +0 -0
  68. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/lifecycle.py +0 -0
  69. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/llm_provider.py +0 -0
  70. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/llm_steward.py +0 -0
  71. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/models.py +0 -0
  72. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/operator.py +0 -0
  73. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/operator_queue.py +0 -0
  74. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/plugins.py +0 -0
  75. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/policy.py +0 -0
  76. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/postgres_store.py +0 -0
  77. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/qdrant_backend.py +0 -0
  78. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/qmd_bridge.py +0 -0
  79. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/query_classifier.py +0 -0
  80. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/retrieval.py +0 -0
  81. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/retry.py +0 -0
  82. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/review.py +0 -0
  83. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/rl_trainer.py +0 -0
  84. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/scheduler.py +0 -0
  85. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/schema.py +0 -0
  86. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/schema.sql +0 -0
  87. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/schema_postgres.sql +0 -0
  88. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/service.py +0 -0
  89. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/session_tracker.py +0 -0
  90. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/skill_evolver.py +0 -0
  91. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/snapshot.py +0 -0
  92. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/steward.py +0 -0
  93. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/storage.py +0 -0
  94. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/store_factory.py +0 -0
  95. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/turn_schema.py +0 -0
  96. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/vault_exporter.py +0 -0
  97. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/vault_linter.py +0 -0
  98. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/vault_log.py +0 -0
  99. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/vault_query_capture.py +0 -0
  100. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/vault_synthesis.py +0 -0
  101. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/webhook.py +0 -0
  102. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster/wiki_engine.py +0 -0
  103. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster.egg-info/dependency_links.txt +0 -0
  104. {memorymaster-3.2.0 → memorymaster-3.2.2}/memorymaster.egg-info/requires.txt +0 -0
  105. {memorymaster-3.2.0 → memorymaster-3.2.2}/scripts/alert_operator_metrics.py +0 -0
  106. {memorymaster-3.2.0 → memorymaster-3.2.2}/scripts/claude_to_turns.py +0 -0
  107. {memorymaster-3.2.0 → memorymaster-3.2.2}/scripts/codex_live_to_turns.py +0 -0
  108. {memorymaster-3.2.0 → memorymaster-3.2.2}/scripts/compaction_edge_cases.py +0 -0
  109. {memorymaster-3.2.0 → memorymaster-3.2.2}/scripts/compaction_trace_report.py +0 -0
  110. {memorymaster-3.2.0 → memorymaster-3.2.2}/scripts/compaction_trace_validate.py +0 -0
  111. {memorymaster-3.2.0 → memorymaster-3.2.2}/scripts/confusion_matrix_eval.py +0 -0
  112. {memorymaster-3.2.0 → memorymaster-3.2.2}/scripts/conversation_importer.py +0 -0
  113. {memorymaster-3.2.0 → memorymaster-3.2.2}/scripts/conversation_to_turns.py +0 -0
  114. {memorymaster-3.2.0 → memorymaster-3.2.2}/scripts/e2e_operator.py +0 -0
  115. {memorymaster-3.2.0 → memorymaster-3.2.2}/scripts/email_live_to_turns.py +0 -0
  116. {memorymaster-3.2.0 → memorymaster-3.2.2}/scripts/eval_memorymaster.py +0 -0
  117. {memorymaster-3.2.0 → memorymaster-3.2.2}/scripts/generate_drill_signoff.py +0 -0
  118. {memorymaster-3.2.0 → memorymaster-3.2.2}/scripts/git_to_turns.py +0 -0
  119. {memorymaster-3.2.0 → memorymaster-3.2.2}/scripts/github_live_to_turns.py +0 -0
  120. {memorymaster-3.2.0 → memorymaster-3.2.2}/scripts/gitnexus_to_claims.py +0 -0
  121. {memorymaster-3.2.0 → memorymaster-3.2.2}/scripts/ingest_planning_docs.py +0 -0
  122. {memorymaster-3.2.0 → memorymaster-3.2.2}/scripts/jira_live_to_turns.py +0 -0
  123. {memorymaster-3.2.0 → memorymaster-3.2.2}/scripts/messages_to_turns.py +0 -0
  124. {memorymaster-3.2.0 → memorymaster-3.2.2}/scripts/operator_metrics.py +0 -0
  125. {memorymaster-3.2.0 → memorymaster-3.2.2}/scripts/recurring_incident_drill.py +0 -0
  126. {memorymaster-3.2.0 → memorymaster-3.2.2}/scripts/release_readiness.py +0 -0
  127. {memorymaster-3.2.0 → memorymaster-3.2.2}/scripts/run_codex_autologger.py +0 -0
  128. {memorymaster-3.2.0 → memorymaster-3.2.2}/scripts/run_incident_drill.py +0 -0
  129. {memorymaster-3.2.0 → memorymaster-3.2.2}/scripts/scheduled_ingest.py +0 -0
  130. {memorymaster-3.2.0 → memorymaster-3.2.2}/scripts/slack_live_to_turns.py +0 -0
  131. {memorymaster-3.2.0 → memorymaster-3.2.2}/scripts/tickets_to_turns.py +0 -0
  132. {memorymaster-3.2.0 → memorymaster-3.2.2}/scripts/webhook_to_turns.py +0 -0
  133. {memorymaster-3.2.0 → memorymaster-3.2.2}/setup.cfg +0 -0
  134. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/conftest.py +0 -0
  135. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_access_control.py +0 -0
  136. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_auto_extractor.py +0 -0
  137. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_auto_resolver.py +0 -0
  138. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_auto_validate.py +0 -0
  139. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_claim_links.py +0 -0
  140. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_claude_to_turns.py +0 -0
  141. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_cli_json_flag.py +0 -0
  142. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_cli_ready.py +0 -0
  143. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_cli_review_queue.py +0 -0
  144. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_cli_subcommands.py +0 -0
  145. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_compact_summaries.py +0 -0
  146. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_compaction_trace.py +0 -0
  147. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_config.py +0 -0
  148. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_conflict_resolver.py +0 -0
  149. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_confusion_matrix_eval.py +0 -0
  150. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_connection_retry.py +0 -0
  151. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_connectors.py +0 -0
  152. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_context_hook.py +0 -0
  153. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_context_optimizer.py +0 -0
  154. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_conversation_to_turns.py +0 -0
  155. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_dashboard.py +0 -0
  156. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_dedup.py +0 -0
  157. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_deterministic_predicates.py +0 -0
  158. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_embeddings_coverage.py +0 -0
  159. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_entity_graph.py +0 -0
  160. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_events_schema.py +0 -0
  161. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_feedback.py +0 -0
  162. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_fts5_search.py +0 -0
  163. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_human_id.py +0 -0
  164. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_incident_drill_runner.py +0 -0
  165. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_integration_workflows.py +0 -0
  166. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_lifecycle.py +0 -0
  167. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_llm_steward_coverage.py +0 -0
  168. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_llm_steward_key_rotation.py +0 -0
  169. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_mcp_helpers.py +0 -0
  170. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_metrics_exporter.py +0 -0
  171. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_obsidian_mind_patterns.py +0 -0
  172. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_operator.py +0 -0
  173. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_operator_queue.py +0 -0
  174. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_perf_smoke_config.py +0 -0
  175. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_plugins.py +0 -0
  176. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_policy_coverage.py +0 -0
  177. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_postgres_parity.py +0 -0
  178. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_qdrant_backend.py +0 -0
  179. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_qmd_bridge.py +0 -0
  180. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_query_classifier.py +0 -0
  181. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_reliability_hardening.py +0 -0
  182. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_review.py +0 -0
  183. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_rl_trainer.py +0 -0
  184. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_scheduler.py +0 -0
  185. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_schema.py +0 -0
  186. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_security_access.py +0 -0
  187. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_service_coverage.py +0 -0
  188. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_session_tracker.py +0 -0
  189. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_snapshot.py +0 -0
  190. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_sqlite_core.py +0 -0
  191. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_staleness.py +0 -0
  192. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_stealth_mode.py +0 -0
  193. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_steward.py +0 -0
  194. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_steward_resolution_parity.py +0 -0
  195. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_store_factory.py +0 -0
  196. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_tenant_isolation.py +0 -0
  197. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_turn_schema.py +0 -0
  198. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_vault_exporter.py +0 -0
  199. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_vector_search.py +0 -0
  200. {memorymaster-3.2.0 → memorymaster-3.2.2}/tests/test_webhook.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: memorymaster
3
- Version: 3.2.0
3
+ Version: 3.2.2
4
4
  Summary: Production-grade memory reliability system for AI coding agents. Lifecycle-managed claims with citations, conflict detection, steward governance, and MCP integration.
5
5
  Author: wolverin0
6
6
  License: MIT
@@ -42,9 +42,9 @@ Lifecycle-managed claims with citations, conflict detection, steward governance,
42
42
 
43
43
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
44
44
  [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
45
- [![Tests](https://img.shields.io/badge/tests-932-green.svg)]()
46
- [![MCP Tools](https://img.shields.io/badge/MCP%20tools-21-purple.svg)]()
47
- [![CLI Commands](https://img.shields.io/badge/CLI%20commands-54%2B-orange.svg)]()
45
+ [![Tests](https://img.shields.io/badge/tests-1034-green.svg)]()
46
+ [![MCP Tools](https://img.shields.io/badge/MCP%20tools-22-purple.svg)]()
47
+ [![CLI Commands](https://img.shields.io/badge/CLI%20commands-64-orange.svg)]()
48
48
 
49
49
  ---
50
50
 
@@ -55,9 +55,9 @@ MemoryMaster gives AI coding agents **persistent, verifiable memory** with a ful
55
55
  | Metric | Count |
56
56
  |--------|-------|
57
57
  | Source modules | 35+ (20,000+ lines) |
58
- | Tests | 932 across 66 test modules |
59
- | MCP tools | 21 |
60
- | CLI commands | 54+ |
58
+ | Tests | 1034 across 68 test modules |
59
+ | MCP tools | 22 |
60
+ | CLI commands | 64 |
61
61
  | Import connectors | 10+ (Git, Slack, Jira, email, GitHub, conversations) |
62
62
  | Utility scripts | 30+ (connectors, benchmarks, drills) |
63
63
 
@@ -68,7 +68,7 @@ MemoryMaster gives AI coding agents **persistent, verifiable memory** with a ful
68
68
  │ Agent Runtime │
69
69
  │ (Claude Code / Codex / any MCP-compatible agent) │
70
70
  └────────────┬────────────────────────────────┬───────────────────┘
71
- │ MCP (21 tools) │ CLI (50+ commands)
71
+ │ MCP (22 tools) │ CLI (64 commands)
72
72
  v v
73
73
  ┌─────────────────────────────────────────────────────────────────┐
74
74
  │ MemoryMaster Core │
@@ -141,13 +141,19 @@ pip install memorymaster
141
141
  memorymaster --db memorymaster.db init-db
142
142
 
143
143
  # Full setup: hooks, MCP, steward cron, Obsidian skills
144
+ memorymaster-setup # after pip install
145
+ # or, from a cloned repo:
144
146
  python scripts/setup-hooks.py
145
147
  ```
146
148
 
147
- The setup script configures everything interactively:
149
+ The setup command configures everything interactively:
148
150
  - **Recall hook** — injects relevant claims into every Claude Code prompt
149
- - **Auto-ingest hook** — uses a cheap LLM (Gemini Flash Lite/GPT-4o-mini/Haiku/Ollama) to extract learnings from each session
150
- - **MCP server** — 21 tools available in all Claude Code & Codex sessions
151
+ - **Classify hook** — regex signal matcher (DECISION/BUG/GOTCHA/CONSTRAINT/ARCHITECTURE/ENVIRONMENT/REFERENCE) that injects routing hints, Spanish + English
152
+ - **Validate-wiki hook** — PostToolUse warning for wiki articles missing frontmatter or wikilinks
153
+ - **SessionStart hook** — injects recent claims + cycle summary + pending candidates at session start
154
+ - **Auto-ingest hook** — uses a cheap LLM (Gemini Flash Lite/GPT-4o-mini/Haiku/Ollama) to extract learnings from each session, with a block-based checkpoint every 15 human messages
155
+ - **PreCompact hook** — forces save to MemoryMaster before Claude Code compacts context (permanent context loss prevention)
156
+ - **MCP server** — 22 tools available in all Claude Code & Codex sessions
151
157
  - **Steward cron** — validates and curates claims every 6 hours
152
158
  - **CLAUDE.md / AGENTS.md** — appends instructions so Claude and Codex actually use MemoryMaster
153
159
  - **Obsidian skills** — read/write/search your vault from Claude Code
@@ -205,7 +211,7 @@ Add to your `.mcp.json` (see [`.mcp.json.example`](.mcp.json.example)):
205
211
  }
206
212
  ```
207
213
 
208
- **21 MCP tools:** `init_db`, `ingest_claim`, `run_cycle`, `run_steward`, `classify_query`, `query_memory`, `query_for_context`, `list_claims`, `redact_claim_payload`, `pin_claim`, `compact_memory`, `list_events`, `open_dashboard`, `list_steward_proposals`, `resolve_steward_proposal`, `extract_entities`, `entity_stats`, `find_related_claims`, `quality_scores`, `recompute_tiers`, `federated_query`
214
+ **22 MCP tools:** `init_db`, `ingest_claim`, `run_cycle`, `run_steward`, `classify_query`, `query_memory`, `query_for_context`, `list_claims`, `redact_claim_payload`, `pin_claim`, `compact_memory`, `list_events`, `search_verbatim`, `open_dashboard`, `list_steward_proposals`, `resolve_steward_proposal`, `extract_entities`, `entity_stats`, `find_related_claims`, `quality_scores`, `recompute_tiers`, `federated_query`
209
215
 
210
216
  ## How It All Works (E2E)
211
217
 
@@ -251,7 +257,7 @@ YOU SEND A MESSAGE
251
257
  |-----------|-------------|-----------|
252
258
  | **Recall hook** | Injects relevant claims into every prompt | Every message you send |
253
259
  | **Auto-ingest hook** | LLM extracts learnings from transcript | Every time Claude stops |
254
- | **MCP server** (global) | 21 tools for query/ingest/steward | Always available |
260
+ | **MCP server** (global) | 22 tools for query/ingest/steward | Always available |
255
261
  | **CLAUDE.md append** | Instructions for Claude to use MemoryMaster | Read at session start |
256
262
  | **AGENTS.md append** | Instructions for Codex to use MemoryMaster | Read at session start |
257
263
  | **Steward cron** | Validates, decays, compacts claims | Every 6 hours |
@@ -616,7 +622,7 @@ These are optional but enhance the experience:
616
622
 
617
623
  | MCP | What it adds | Install |
618
624
  |-----|--------------|---------|
619
- | **memorymaster** | The 21 MCP tools (`ingest_claim`, `query_memory`, `run_cycle`, etc.) | `python scripts/setup-hooks.py` (interactive) |
625
+ | **memorymaster** | The 22 MCP tools (`ingest_claim`, `query_memory`, `run_cycle`, etc.) | `memorymaster-setup` (interactive; or `python scripts/setup-hooks.py` from clone) |
620
626
  | **GitNexus** | Code-graph aware impact analysis before edits | See [GitNexus Integration](#gitnexus-integration-code-intelligence) |
621
627
  | **Obsidian CLI** | Vault-aware search via the obsidian CLI tool | `npm install -g obsidian-cli` (requires Obsidian 1.12+) |
622
628
  | **Qdrant** | Vector search backend for semantic recall | `docker run -p 6333:6333 qdrant/qdrant` |
@@ -624,16 +630,18 @@ These are optional but enhance the experience:
624
630
  ### Installation
625
631
 
626
632
  ```bash
627
- # 1. Clone and install MemoryMaster
628
- git clone https://github.com/your-org/memorymaster.git
629
- cd memorymaster
630
- pip install -e .
633
+ # Option A from PyPI (recommended for users)
634
+ pip install memorymaster
635
+ memorymaster-setup # interactive installer
631
636
 
632
- # 2. Run the interactive installer (sets up MCP, hooks, env vars, steward cron)
633
- python scripts/setup-hooks.py
637
+ # Option B from a clone (recommended for contributors)
638
+ git clone https://github.com/wolverin0/memorymaster.git
639
+ cd memorymaster
640
+ pip install -e ".[dev,mcp,security]"
641
+ python scripts/setup-hooks.py # 3-line shim calling memorymaster.setup_hooks:main
634
642
 
635
- # 3. The installer copies hooks from config-templates/hooks/ to ~/.claude/hooks/
636
- # and registers them in ~/.claude/settings.json automatically.
643
+ # Either way, the installer copies hooks from memorymaster/config_templates/hooks/
644
+ # to ~/.claude/hooks/ and registers them in ~/.claude/settings.json automatically.
637
645
 
638
646
  # 4. Verify
639
647
  python -m memorymaster --db memorymaster.db query "test"
@@ -696,7 +704,7 @@ Key config groups:
696
704
  # Install with all dev dependencies
697
705
  pip install -e ".[dev,mcp,security,embeddings,qdrant]"
698
706
 
699
- # Run tests (932 tests)
707
+ # Run tests (1034 tests)
700
708
  pytest tests/ -q
701
709
 
702
710
  # Lint and format
@@ -6,9 +6,9 @@ Lifecycle-managed claims with citations, conflict detection, steward governance,
6
6
 
7
7
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
8
8
  [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
9
- [![Tests](https://img.shields.io/badge/tests-932-green.svg)]()
10
- [![MCP Tools](https://img.shields.io/badge/MCP%20tools-21-purple.svg)]()
11
- [![CLI Commands](https://img.shields.io/badge/CLI%20commands-54%2B-orange.svg)]()
9
+ [![Tests](https://img.shields.io/badge/tests-1034-green.svg)]()
10
+ [![MCP Tools](https://img.shields.io/badge/MCP%20tools-22-purple.svg)]()
11
+ [![CLI Commands](https://img.shields.io/badge/CLI%20commands-64-orange.svg)]()
12
12
 
13
13
  ---
14
14
 
@@ -19,9 +19,9 @@ MemoryMaster gives AI coding agents **persistent, verifiable memory** with a ful
19
19
  | Metric | Count |
20
20
  |--------|-------|
21
21
  | Source modules | 35+ (20,000+ lines) |
22
- | Tests | 932 across 66 test modules |
23
- | MCP tools | 21 |
24
- | CLI commands | 54+ |
22
+ | Tests | 1034 across 68 test modules |
23
+ | MCP tools | 22 |
24
+ | CLI commands | 64 |
25
25
  | Import connectors | 10+ (Git, Slack, Jira, email, GitHub, conversations) |
26
26
  | Utility scripts | 30+ (connectors, benchmarks, drills) |
27
27
 
@@ -32,7 +32,7 @@ MemoryMaster gives AI coding agents **persistent, verifiable memory** with a ful
32
32
  │ Agent Runtime │
33
33
  │ (Claude Code / Codex / any MCP-compatible agent) │
34
34
  └────────────┬────────────────────────────────┬───────────────────┘
35
- │ MCP (21 tools) │ CLI (50+ commands)
35
+ │ MCP (22 tools) │ CLI (64 commands)
36
36
  v v
37
37
  ┌─────────────────────────────────────────────────────────────────┐
38
38
  │ MemoryMaster Core │
@@ -105,13 +105,19 @@ pip install memorymaster
105
105
  memorymaster --db memorymaster.db init-db
106
106
 
107
107
  # Full setup: hooks, MCP, steward cron, Obsidian skills
108
+ memorymaster-setup # after pip install
109
+ # or, from a cloned repo:
108
110
  python scripts/setup-hooks.py
109
111
  ```
110
112
 
111
- The setup script configures everything interactively:
113
+ The setup command configures everything interactively:
112
114
  - **Recall hook** — injects relevant claims into every Claude Code prompt
113
- - **Auto-ingest hook** — uses a cheap LLM (Gemini Flash Lite/GPT-4o-mini/Haiku/Ollama) to extract learnings from each session
114
- - **MCP server** — 21 tools available in all Claude Code & Codex sessions
115
+ - **Classify hook** — regex signal matcher (DECISION/BUG/GOTCHA/CONSTRAINT/ARCHITECTURE/ENVIRONMENT/REFERENCE) that injects routing hints, Spanish + English
116
+ - **Validate-wiki hook** — PostToolUse warning for wiki articles missing frontmatter or wikilinks
117
+ - **SessionStart hook** — injects recent claims + cycle summary + pending candidates at session start
118
+ - **Auto-ingest hook** — uses a cheap LLM (Gemini Flash Lite/GPT-4o-mini/Haiku/Ollama) to extract learnings from each session, with a block-based checkpoint every 15 human messages
119
+ - **PreCompact hook** — forces save to MemoryMaster before Claude Code compacts context (permanent context loss prevention)
120
+ - **MCP server** — 22 tools available in all Claude Code & Codex sessions
115
121
  - **Steward cron** — validates and curates claims every 6 hours
116
122
  - **CLAUDE.md / AGENTS.md** — appends instructions so Claude and Codex actually use MemoryMaster
117
123
  - **Obsidian skills** — read/write/search your vault from Claude Code
@@ -169,7 +175,7 @@ Add to your `.mcp.json` (see [`.mcp.json.example`](.mcp.json.example)):
169
175
  }
170
176
  ```
171
177
 
172
- **21 MCP tools:** `init_db`, `ingest_claim`, `run_cycle`, `run_steward`, `classify_query`, `query_memory`, `query_for_context`, `list_claims`, `redact_claim_payload`, `pin_claim`, `compact_memory`, `list_events`, `open_dashboard`, `list_steward_proposals`, `resolve_steward_proposal`, `extract_entities`, `entity_stats`, `find_related_claims`, `quality_scores`, `recompute_tiers`, `federated_query`
178
+ **22 MCP tools:** `init_db`, `ingest_claim`, `run_cycle`, `run_steward`, `classify_query`, `query_memory`, `query_for_context`, `list_claims`, `redact_claim_payload`, `pin_claim`, `compact_memory`, `list_events`, `search_verbatim`, `open_dashboard`, `list_steward_proposals`, `resolve_steward_proposal`, `extract_entities`, `entity_stats`, `find_related_claims`, `quality_scores`, `recompute_tiers`, `federated_query`
173
179
 
174
180
  ## How It All Works (E2E)
175
181
 
@@ -215,7 +221,7 @@ YOU SEND A MESSAGE
215
221
  |-----------|-------------|-----------|
216
222
  | **Recall hook** | Injects relevant claims into every prompt | Every message you send |
217
223
  | **Auto-ingest hook** | LLM extracts learnings from transcript | Every time Claude stops |
218
- | **MCP server** (global) | 21 tools for query/ingest/steward | Always available |
224
+ | **MCP server** (global) | 22 tools for query/ingest/steward | Always available |
219
225
  | **CLAUDE.md append** | Instructions for Claude to use MemoryMaster | Read at session start |
220
226
  | **AGENTS.md append** | Instructions for Codex to use MemoryMaster | Read at session start |
221
227
  | **Steward cron** | Validates, decays, compacts claims | Every 6 hours |
@@ -580,7 +586,7 @@ These are optional but enhance the experience:
580
586
 
581
587
  | MCP | What it adds | Install |
582
588
  |-----|--------------|---------|
583
- | **memorymaster** | The 21 MCP tools (`ingest_claim`, `query_memory`, `run_cycle`, etc.) | `python scripts/setup-hooks.py` (interactive) |
589
+ | **memorymaster** | The 22 MCP tools (`ingest_claim`, `query_memory`, `run_cycle`, etc.) | `memorymaster-setup` (interactive; or `python scripts/setup-hooks.py` from clone) |
584
590
  | **GitNexus** | Code-graph aware impact analysis before edits | See [GitNexus Integration](#gitnexus-integration-code-intelligence) |
585
591
  | **Obsidian CLI** | Vault-aware search via the obsidian CLI tool | `npm install -g obsidian-cli` (requires Obsidian 1.12+) |
586
592
  | **Qdrant** | Vector search backend for semantic recall | `docker run -p 6333:6333 qdrant/qdrant` |
@@ -588,16 +594,18 @@ These are optional but enhance the experience:
588
594
  ### Installation
589
595
 
590
596
  ```bash
591
- # 1. Clone and install MemoryMaster
592
- git clone https://github.com/your-org/memorymaster.git
593
- cd memorymaster
594
- pip install -e .
597
+ # Option A from PyPI (recommended for users)
598
+ pip install memorymaster
599
+ memorymaster-setup # interactive installer
595
600
 
596
- # 2. Run the interactive installer (sets up MCP, hooks, env vars, steward cron)
597
- python scripts/setup-hooks.py
601
+ # Option B from a clone (recommended for contributors)
602
+ git clone https://github.com/wolverin0/memorymaster.git
603
+ cd memorymaster
604
+ pip install -e ".[dev,mcp,security]"
605
+ python scripts/setup-hooks.py # 3-line shim calling memorymaster.setup_hooks:main
598
606
 
599
- # 3. The installer copies hooks from config-templates/hooks/ to ~/.claude/hooks/
600
- # and registers them in ~/.claude/settings.json automatically.
607
+ # Either way, the installer copies hooks from memorymaster/config_templates/hooks/
608
+ # to ~/.claude/hooks/ and registers them in ~/.claude/settings.json automatically.
601
609
 
602
610
  # 4. Verify
603
611
  python -m memorymaster --db memorymaster.db query "test"
@@ -660,7 +668,7 @@ Key config groups:
660
668
  # Install with all dev dependencies
661
669
  pip install -e ".[dev,mcp,security,embeddings,qdrant]"
662
670
 
663
- # Run tests (932 tests)
671
+ # Run tests (1034 tests)
664
672
  pytest tests/ -q
665
673
 
666
674
  # Lint and format
@@ -2,4 +2,4 @@
2
2
 
3
3
  __all__ = ["__version__"]
4
4
 
5
- __version__ = "3.2.0"
5
+ __version__ = "3.2.2"
@@ -6,24 +6,18 @@ and `self.db_path`. Do not instantiate directly.
6
6
  """
7
7
  from __future__ import annotations
8
8
 
9
- import contextlib
10
- import hashlib
11
9
  import json
12
10
  import logging
13
11
  import sqlite3
14
12
  from datetime import datetime, timedelta, timezone
15
- from pathlib import Path
16
13
 
17
14
  from memorymaster.embeddings import EmbeddingProvider, cosine_similarity
18
15
  from memorymaster.models import (
19
16
  CLAIM_LINK_TYPES,
20
17
  CLAIM_STATUSES,
21
18
  STATUS_TRANSITION_EVENT_TYPES,
22
- Citation,
23
- CitationInput,
24
19
  Claim,
25
20
  ClaimLink,
26
- Event,
27
21
  validate_event_payload,
28
22
  validate_event_type,
29
23
  validate_transition_event_type,
@@ -33,12 +27,7 @@ logger = logging.getLogger(__name__)
33
27
 
34
28
  from memorymaster._storage_shared import (
35
29
  EVENT_HASH_ALGO,
36
- HUMAN_ID_PREFIX,
37
- SQLITE_CONFIRMED_TUPLE_GUARD_TRIGGERS,
38
- SQLITE_EVENTS_APPEND_ONLY_TRIGGERS,
39
30
  ConcurrentModificationError,
40
- generate_human_id_hash,
41
- generate_top_level_human_id,
42
31
  utc_now,
43
32
  )
44
33
 
@@ -6,41 +6,19 @@ and `self.db_path`. Do not instantiate directly.
6
6
  """
7
7
  from __future__ import annotations
8
8
 
9
- import contextlib
10
- import hashlib
11
- import json
12
9
  import logging
13
10
  import sqlite3
14
11
  from datetime import datetime, timedelta, timezone
15
- from pathlib import Path
16
12
 
17
- from memorymaster.embeddings import EmbeddingProvider, cosine_similarity
18
13
  from memorymaster.models import (
19
- CLAIM_LINK_TYPES,
20
- CLAIM_STATUSES,
21
- STATUS_TRANSITION_EVENT_TYPES,
22
14
  Citation,
23
- CitationInput,
24
15
  Claim,
25
16
  ClaimLink,
26
17
  Event,
27
- validate_event_payload,
28
- validate_event_type,
29
- validate_transition_event_type,
30
18
  )
31
19
 
32
20
  logger = logging.getLogger(__name__)
33
21
 
34
- from memorymaster._storage_shared import (
35
- EVENT_HASH_ALGO,
36
- HUMAN_ID_PREFIX,
37
- SQLITE_CONFIRMED_TUPLE_GUARD_TRIGGERS,
38
- SQLITE_EVENTS_APPEND_ONLY_TRIGGERS,
39
- ConcurrentModificationError,
40
- generate_human_id_hash,
41
- generate_top_level_human_id,
42
- utc_now,
43
- )
44
22
 
45
23
 
46
24
  class _ReadMixin:
@@ -6,40 +6,19 @@ and `self.db_path`. Do not instantiate directly.
6
6
  """
7
7
  from __future__ import annotations
8
8
 
9
- import contextlib
10
9
  import hashlib
11
10
  import json
12
11
  import logging
13
12
  import sqlite3
14
- from datetime import datetime, timedelta, timezone
15
- from pathlib import Path
16
-
17
- from memorymaster.embeddings import EmbeddingProvider, cosine_similarity
18
- from memorymaster.models import (
19
- CLAIM_LINK_TYPES,
20
- CLAIM_STATUSES,
21
- STATUS_TRANSITION_EVENT_TYPES,
22
- Citation,
23
- CitationInput,
24
- Claim,
25
- ClaimLink,
26
- Event,
27
- validate_event_payload,
28
- validate_event_type,
29
- validate_transition_event_type,
30
- )
13
+
31
14
 
32
15
  logger = logging.getLogger(__name__)
33
16
 
34
17
  from memorymaster._storage_shared import (
35
18
  EVENT_HASH_ALGO,
36
- HUMAN_ID_PREFIX,
37
19
  SQLITE_CONFIRMED_TUPLE_GUARD_TRIGGERS,
38
20
  SQLITE_EVENTS_APPEND_ONLY_TRIGGERS,
39
- ConcurrentModificationError,
40
- generate_human_id_hash,
41
21
  generate_top_level_human_id,
42
- utc_now,
43
22
  )
44
23
 
45
24
 
@@ -6,39 +6,19 @@ and `self.db_path`. Do not instantiate directly.
6
6
  """
7
7
  from __future__ import annotations
8
8
 
9
- import contextlib
10
- import hashlib
11
9
  import json
12
10
  import logging
13
11
  import sqlite3
14
- from datetime import datetime, timedelta, timezone
15
- from pathlib import Path
16
12
 
17
- from memorymaster.embeddings import EmbeddingProvider, cosine_similarity
18
13
  from memorymaster.models import (
19
- CLAIM_LINK_TYPES,
20
- CLAIM_STATUSES,
21
- STATUS_TRANSITION_EVENT_TYPES,
22
- Citation,
23
14
  CitationInput,
24
15
  Claim,
25
- ClaimLink,
26
- Event,
27
16
  validate_event_payload,
28
- validate_event_type,
29
- validate_transition_event_type,
30
17
  )
31
18
 
32
19
  logger = logging.getLogger(__name__)
33
20
 
34
21
  from memorymaster._storage_shared import (
35
- EVENT_HASH_ALGO,
36
- HUMAN_ID_PREFIX,
37
- SQLITE_CONFIRMED_TUPLE_GUARD_TRIGGERS,
38
- SQLITE_EVENTS_APPEND_ONLY_TRIGGERS,
39
- ConcurrentModificationError,
40
- generate_human_id_hash,
41
- generate_top_level_human_id,
42
22
  utc_now,
43
23
  )
44
24
 
@@ -3,19 +3,18 @@ from __future__ import annotations
3
3
  import argparse
4
4
  from pathlib import Path
5
5
 
6
- from memorymaster.cli_helpers import (
6
+ from memorymaster.cli_helpers import ( # noqa: F401 — re-export for backward compat with tests/external callers
7
7
  STEALTH_DB_NAME,
8
8
  _add_cycle_policy_args,
9
9
  _json_error,
10
- _resolve_claim_id, # re-export for backward-compat with tests/external callers
10
+ _resolve_claim_id,
11
11
  _resolve_db_path,
12
12
  _stealth_active,
13
13
  parse_citation,
14
14
  parse_scope_allowlist,
15
15
  )
16
16
  from memorymaster.context_optimizer import OUTPUT_FORMATS
17
- from memorymaster.models import CLAIM_LINK_TYPES, CLAIM_STATUSES, CitationInput, VOLATILITY_LEVELS
18
- from memorymaster.policy import POLICY_MODES
17
+ from memorymaster.models import CLAIM_LINK_TYPES, CLAIM_STATUSES, VOLATILITY_LEVELS
19
18
  from memorymaster.retrieval import RETRIEVAL_MODES
20
19
  from memorymaster.service import MemoryService
21
20
 
@@ -9,14 +9,13 @@ from __future__ import annotations
9
9
  import argparse
10
10
  import json
11
11
  import os
12
- from dataclasses import asdict, is_dataclass
12
+ from dataclasses import asdict
13
13
  from pathlib import Path
14
14
  import time
15
15
 
16
16
  from memorymaster.cli_helpers import (
17
17
  STEALTH_DB_NAME,
18
18
  _SCORE_KEYS,
19
- _add_cycle_policy_args,
20
19
  _claim_to_dict,
21
20
  _event_to_timeline_entry,
22
21
  _json_default,
@@ -24,19 +23,14 @@ from memorymaster.cli_helpers import (
24
23
  _json_error,
25
24
  _print_claim_brief,
26
25
  _resolve_claim_id,
27
- _resolve_db_path,
26
+ _score_str_from_payload,
28
27
  _stealth_active,
29
28
  parse_citation,
30
29
  parse_scope_allowlist,
31
30
  print_claim,
32
31
  )
33
- from memorymaster.context_optimizer import OUTPUT_FORMATS
34
- from memorymaster.models import CLAIM_LINK_TYPES, CLAIM_STATUSES, CitationInput, VOLATILITY_LEVELS
35
- from memorymaster.policy import POLICY_MODES
36
- from memorymaster.retrieval import RETRIEVAL_MODES
37
32
  from memorymaster.scheduler import run_daemon
38
33
  from memorymaster.security import resolve_allow_sensitive_access
39
- from memorymaster.service import MemoryService
40
34
 
41
35
 
42
36
  def _handle_create_snapshot(args: argparse.Namespace, db_resolved: Path) -> int:
@@ -6,8 +6,6 @@ to its handler. cli.main() imports this dict and dispatches to it.
6
6
  from __future__ import annotations
7
7
 
8
8
  import argparse
9
- import json
10
- import os
11
9
  from pathlib import Path
12
10
  import time
13
11
 
@@ -43,12 +41,13 @@ from memorymaster.cli_handlers_basic import (
43
41
  _handle_steward_proposals,
44
42
  )
45
43
  from memorymaster.cli_helpers import (
44
+ _SCORE_KEYS,
46
45
  _claim_to_dict,
47
46
  _json_envelope,
48
47
  _json_error,
49
- _resolve_claim_id,
48
+ print_claim,
50
49
  )
51
- from memorymaster.service import MemoryService
50
+ from memorymaster.models import CitationInput
52
51
 
53
52
 
54
53
  def _handle_export_vault(args: argparse.Namespace, service, parser: argparse.ArgumentParser, effective_db: str) -> int:
@@ -571,9 +570,15 @@ def _handle_daily_note(args, service, parser, effective_db) -> int:
571
570
 
572
571
  def _handle_ghost_notes(args, service, parser, effective_db) -> int:
573
572
  from memorymaster.daily_notes import find_ghost_notes
573
+ t0 = time.perf_counter()
574
574
  ghosts = find_ghost_notes(str(effective_db))
575
+ elapsed_ms = (time.perf_counter() - t0) * 1000
575
576
  if args.json_output:
576
- print(_json_envelope({"ghost_notes": ghosts, "count": len(ghosts)}))
577
+ print(_json_envelope(
578
+ {"ghost_notes": ghosts, "count": len(ghosts)},
579
+ total=len(ghosts),
580
+ query_ms=elapsed_ms,
581
+ ))
577
582
  else:
578
583
  if not ghosts:
579
584
  print("No ghost notes found (all queried topics have sufficient claims)")
@@ -0,0 +1,26 @@
1
+ ## MemoryMaster (Cross-Session Memory) — MANDATORY
2
+
3
+ You have access to the `memorymaster` MCP server. It stores facts, decisions, and constraints across ALL sessions and providers (Claude, Codex, Gemini).
4
+
5
+ ### READ before assuming
6
+ Before making architectural decisions or debugging unfamiliar code, call `mcp__memorymaster__query_memory` with the relevant topic. A previous session may have already solved this.
7
+
8
+ ### WRITE when you learn something non-obvious
9
+ After completing a task where you discovered something that would save future sessions time, call `mcp__memorymaster__ingest_claim`:
10
+
11
+ **Always ingest:** bug root causes, architectural decisions, environment gotchas, integration patterns, constraints ("never do X because Y")
12
+
13
+ **Never ingest:** credentials, API keys, tokens, private IPs, personal paths, code snippets, routine actions
14
+
15
+ ```
16
+ mcp__memorymaster__ingest_claim({
17
+ "text": "One-line factual description",
18
+ "claim_type": "fact|decision|constraint",
19
+ "subject": "entity",
20
+ "predicate": "aspect",
21
+ "object_value": "value",
22
+ "scope": "project:<project-name>"
23
+ })
24
+ ```
25
+
26
+ This is NOT optional. If you fixed a non-trivial bug, made an architecture decision, or discovered a gotcha — ingest it.
@@ -0,0 +1,35 @@
1
+ ## MemoryMaster (Cross-Session Memory)
2
+
3
+ You have access to the `memorymaster` MCP server with 21 tools for persistent memory across sessions and providers.
4
+
5
+ ### MUST DO — Query before assumptions
6
+ Before making architectural decisions, call `query_memory` or `query_for_context` with the relevant topic. Another session (Claude, Codex, or Gemini) may have already solved this or made a decision.
7
+
8
+ ### MUST DO — Ingest non-obvious learnings
9
+ When you discover something that would save future sessions time, call `ingest_claim`:
10
+
11
+ **Always ingest:**
12
+ - Decisions made ("we chose X over Y because Z")
13
+ - Bug root causes ("the 403 was caused by missing RLS policy")
14
+ - Environment gotchas ("Docker build crashes the VM, use docker pull instead")
15
+ - Integration patterns ("MercadoPago webhooks need /api/mp/webhook endpoint")
16
+ - Architecture constraints ("max 800 lines per file, immutable patterns only")
17
+
18
+ **Never ingest:**
19
+ - Credentials, API keys, tokens, passwords
20
+ - Private IPs or personal paths
21
+ - Code snippets (the code itself is in git)
22
+ - Ephemeral task state ("currently working on X")
23
+
24
+ ### Ingest format
25
+ ```
26
+ ingest_claim({
27
+ "text": "Clear one-line description of the fact/decision",
28
+ "claim_type": "fact" | "decision" | "constraint",
29
+ "subject": "the entity this is about",
30
+ "predicate": "what aspect",
31
+ "object_value": "the value",
32
+ "scope": "project:<project-name>",
33
+ "source": "codex-session"
34
+ })
35
+ ```
@@ -0,0 +1,35 @@
1
+ """PreCompact hook: ALWAYS block before compaction, force save everything.
2
+
3
+ When Claude Code is about to compress context to free up the context window,
4
+ this hook blocks and forces Claude to save ALL important context to MemoryMaster
5
+ before it's lost. This is the safety net — compaction = permanent context loss.
6
+ """
7
+ import json
8
+ import os
9
+ import sys
10
+ from datetime import datetime
11
+
12
+ STATE_DIR = os.path.join(os.path.expanduser("~"), ".memorymaster", "hook_state")
13
+ os.makedirs(STATE_DIR, exist_ok=True)
14
+
15
+
16
+ def main():
17
+ try:
18
+ data = json.loads(sys.stdin.read() or "{}")
19
+ except Exception:
20
+ data = {}
21
+
22
+ session_id = data.get("session_id", "unknown")
23
+
24
+ with open(os.path.join(STATE_DIR, "hook.log"), "a") as f:
25
+ f.write(f"[{datetime.now().strftime('%H:%M:%S')}] PRE-COMPACT triggered for {session_id}\n")
26
+
27
+ # ALWAYS block — compaction means permanent context loss
28
+ sys.stdout.write(json.dumps({
29
+ "decision": "block",
30
+ "reason": "COMPACTION IMMINENT — context will be permanently lost. Before compaction, save ALL important context to MemoryMaster using mcp__memorymaster__ingest_claim. Save: every decision made, every bug root cause, every architecture choice, every gotcha discovered, every constraint learned. Set source_agent to 'claude-session'. Be thorough — after compaction you will NOT remember any of this. NEVER ingest credentials, IPs, or tokens. After saving everything, allow compaction to proceed."
31
+ }))
32
+
33
+
34
+ if __name__ == "__main__":
35
+ main()