memorymaster 1.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 (87) hide show
  1. memorymaster-1.0.0/LICENSE +21 -0
  2. memorymaster-1.0.0/PKG-INFO +265 -0
  3. memorymaster-1.0.0/README.md +236 -0
  4. memorymaster-1.0.0/benchmarks/perf_smoke.py +338 -0
  5. memorymaster-1.0.0/memorymaster/__init__.py +5 -0
  6. memorymaster-1.0.0/memorymaster/__main__.py +3 -0
  7. memorymaster-1.0.0/memorymaster/cli.py +696 -0
  8. memorymaster-1.0.0/memorymaster/dashboard.py +933 -0
  9. memorymaster-1.0.0/memorymaster/embeddings.py +90 -0
  10. memorymaster-1.0.0/memorymaster/jobs/__init__.py +5 -0
  11. memorymaster-1.0.0/memorymaster/jobs/compactor.py +206 -0
  12. memorymaster-1.0.0/memorymaster/jobs/decay.py +49 -0
  13. memorymaster-1.0.0/memorymaster/jobs/deterministic.py +379 -0
  14. memorymaster-1.0.0/memorymaster/jobs/extractor.py +67 -0
  15. memorymaster-1.0.0/memorymaster/jobs/validator.py +169 -0
  16. memorymaster-1.0.0/memorymaster/lifecycle.py +42 -0
  17. memorymaster-1.0.0/memorymaster/mcp_server.py +491 -0
  18. memorymaster-1.0.0/memorymaster/metrics_exporter.py +459 -0
  19. memorymaster-1.0.0/memorymaster/models.py +255 -0
  20. memorymaster-1.0.0/memorymaster/operator.py +946 -0
  21. memorymaster-1.0.0/memorymaster/policy.py +115 -0
  22. memorymaster-1.0.0/memorymaster/postgres_store.py +1359 -0
  23. memorymaster-1.0.0/memorymaster/retrieval.py +204 -0
  24. memorymaster-1.0.0/memorymaster/review.py +121 -0
  25. memorymaster-1.0.0/memorymaster/scheduler.py +93 -0
  26. memorymaster-1.0.0/memorymaster/schema.py +11 -0
  27. memorymaster-1.0.0/memorymaster/schema.sql +114 -0
  28. memorymaster-1.0.0/memorymaster/schema_postgres.sql +164 -0
  29. memorymaster-1.0.0/memorymaster/security.py +182 -0
  30. memorymaster-1.0.0/memorymaster/service.py +377 -0
  31. memorymaster-1.0.0/memorymaster/steward.py +1583 -0
  32. memorymaster-1.0.0/memorymaster/storage.py +1158 -0
  33. memorymaster-1.0.0/memorymaster/store_factory.py +19 -0
  34. memorymaster-1.0.0/memorymaster/turn_schema.py +128 -0
  35. memorymaster-1.0.0/memorymaster.egg-info/PKG-INFO +265 -0
  36. memorymaster-1.0.0/memorymaster.egg-info/SOURCES.txt +85 -0
  37. memorymaster-1.0.0/memorymaster.egg-info/dependency_links.txt +1 -0
  38. memorymaster-1.0.0/memorymaster.egg-info/entry_points.txt +4 -0
  39. memorymaster-1.0.0/memorymaster.egg-info/requires.txt +12 -0
  40. memorymaster-1.0.0/memorymaster.egg-info/top_level.txt +8 -0
  41. memorymaster-1.0.0/pyproject.toml +42 -0
  42. memorymaster-1.0.0/scripts/alert_operator_metrics.py +477 -0
  43. memorymaster-1.0.0/scripts/claude_to_turns.py +416 -0
  44. memorymaster-1.0.0/scripts/compaction_edge_cases.py +294 -0
  45. memorymaster-1.0.0/scripts/compaction_trace_report.py +167 -0
  46. memorymaster-1.0.0/scripts/compaction_trace_validate.py +511 -0
  47. memorymaster-1.0.0/scripts/confusion_matrix_eval.py +177 -0
  48. memorymaster-1.0.0/scripts/conversation_importer.py +194 -0
  49. memorymaster-1.0.0/scripts/conversation_to_turns.py +532 -0
  50. memorymaster-1.0.0/scripts/e2e_operator.py +372 -0
  51. memorymaster-1.0.0/scripts/email_live_to_turns.py +376 -0
  52. memorymaster-1.0.0/scripts/eval_memorymaster.py +416 -0
  53. memorymaster-1.0.0/scripts/generate_drill_signoff.py +279 -0
  54. memorymaster-1.0.0/scripts/git_to_turns.py +407 -0
  55. memorymaster-1.0.0/scripts/github_live_to_turns.py +605 -0
  56. memorymaster-1.0.0/scripts/jira_live_to_turns.py +482 -0
  57. memorymaster-1.0.0/scripts/messages_to_turns.py +445 -0
  58. memorymaster-1.0.0/scripts/operator_metrics.py +248 -0
  59. memorymaster-1.0.0/scripts/recurring_incident_drill.py +306 -0
  60. memorymaster-1.0.0/scripts/release_readiness.py +424 -0
  61. memorymaster-1.0.0/scripts/run_incident_drill.py +657 -0
  62. memorymaster-1.0.0/scripts/scheduled_ingest.py +595 -0
  63. memorymaster-1.0.0/scripts/slack_live_to_turns.py +475 -0
  64. memorymaster-1.0.0/scripts/tickets_to_turns.py +373 -0
  65. memorymaster-1.0.0/scripts/webhook_to_turns.py +452 -0
  66. memorymaster-1.0.0/setup.cfg +4 -0
  67. memorymaster-1.0.0/tests/conftest.py +35 -0
  68. memorymaster-1.0.0/tests/test_claude_to_turns.py +194 -0
  69. memorymaster-1.0.0/tests/test_cli_review_queue.py +77 -0
  70. memorymaster-1.0.0/tests/test_compaction_trace.py +141 -0
  71. memorymaster-1.0.0/tests/test_confusion_matrix_eval.py +100 -0
  72. memorymaster-1.0.0/tests/test_connectors.py +473 -0
  73. memorymaster-1.0.0/tests/test_conversation_to_turns.py +234 -0
  74. memorymaster-1.0.0/tests/test_dashboard.py +204 -0
  75. memorymaster-1.0.0/tests/test_deterministic_predicates.py +72 -0
  76. memorymaster-1.0.0/tests/test_events_schema.py +243 -0
  77. memorymaster-1.0.0/tests/test_incident_drill_runner.py +105 -0
  78. memorymaster-1.0.0/tests/test_metrics_exporter.py +112 -0
  79. memorymaster-1.0.0/tests/test_operator.py +373 -0
  80. memorymaster-1.0.0/tests/test_perf_smoke_config.py +94 -0
  81. memorymaster-1.0.0/tests/test_postgres_parity.py +50 -0
  82. memorymaster-1.0.0/tests/test_reliability_hardening.py +120 -0
  83. memorymaster-1.0.0/tests/test_review.py +113 -0
  84. memorymaster-1.0.0/tests/test_sqlite_core.py +253 -0
  85. memorymaster-1.0.0/tests/test_steward.py +348 -0
  86. memorymaster-1.0.0/tests/test_steward_resolution_parity.py +219 -0
  87. memorymaster-1.0.0/tests/test_turn_schema.py +92 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 wolverin0
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,265 @@
1
+ Metadata-Version: 2.4
2
+ Name: memorymaster
3
+ Version: 1.0.0
4
+ Summary: Production-grade memory reliability system for AI coding agents. Lifecycle-managed claims with citations, conflict detection, steward governance, and MCP integration.
5
+ Author: wolverin0
6
+ License: MIT
7
+ Keywords: memory,ai-agents,claims,lifecycle,mcp,sqlite,postgres,coding-agents
8
+ Classifier: Development Status :: 5 - Production/Stable
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.10
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Topic :: Software Development :: Libraries
16
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
17
+ Requires-Python: >=3.10
18
+ Description-Content-Type: text/markdown
19
+ License-File: LICENSE
20
+ Provides-Extra: postgres
21
+ Requires-Dist: psycopg[binary]>=3.2; extra == "postgres"
22
+ Provides-Extra: security
23
+ Requires-Dist: cryptography>=42; extra == "security"
24
+ Provides-Extra: dev
25
+ Requires-Dist: pytest>=8.2; extra == "dev"
26
+ Provides-Extra: mcp
27
+ Requires-Dist: mcp>=1.2; extra == "mcp"
28
+ Dynamic: license-file
29
+
30
+ <p align="center">
31
+ <h1 align="center">MemoryMaster</h1>
32
+ <p align="center">
33
+ <strong>Production-grade memory reliability for AI coding agents</strong>
34
+ </p>
35
+ <p align="center">
36
+ <a href="https://github.com/wolverin0/memorymaster/actions/workflows/ci.yml"><img src="https://github.com/wolverin0/memorymaster/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
37
+ <a href="https://github.com/wolverin0/memorymaster/releases"><img src="https://img.shields.io/github/v/release/wolverin0/memorymaster?color=blue" alt="Release"></a>
38
+ <a href="https://pypi.org/project/memorymaster/"><img src="https://img.shields.io/pypi/v/memorymaster?color=green" alt="PyPI"></a>
39
+ <a href="https://github.com/wolverin0/memorymaster/blob/main/LICENSE"><img src="https://img.shields.io/github/license/wolverin0/memorymaster" alt="License"></a>
40
+ <img src="https://img.shields.io/badge/python-3.10%2B-blue" alt="Python 3.10+">
41
+ <img src="https://img.shields.io/badge/tests-82%20passed-brightgreen" alt="Tests">
42
+ <img src="https://img.shields.io/badge/coverage-SQLite%20%2B%20Postgres-purple" alt="Backend Coverage">
43
+ </p>
44
+ </p>
45
+
46
+ ---
47
+
48
+ MemoryMaster gives AI coding agents **persistent, verifiable memory** with a full claim lifecycle, citation tracking, conflict detection, and human-in-the-loop governance. It prevents the #1 problem with agent memory: **drift, stale assumptions, and unsafe disclosure**.
49
+
50
+ ## Key Features
51
+
52
+ | Feature | Description |
53
+ |---------|-------------|
54
+ | **6-State Lifecycle** | `candidate` -> `confirmed` -> `stale` -> `superseded` -> `conflicted` -> `archived` |
55
+ | **Citation Tracking** | Every claim links to source evidence with provenance |
56
+ | **Hybrid Retrieval** | Lexical + vector + freshness + confidence ranking |
57
+ | **Steward Governance** | Multi-probe validators with proposal/approve/reject workflow |
58
+ | **MCP Integration** | 12 tools for Claude Code, Codex, and any MCP-compatible agent |
59
+ | **Real-time Dashboard** | HTML UI with SSE streaming, conflict view, and triage actions |
60
+ | **Auto-Redaction** | Tokens, keys, and passwords scrubbed at ingest time |
61
+ | **Dual Backend** | SQLite (zero-config) and Postgres (with optional pgvector) |
62
+ | **Incident Drills** | Automated perf + eval + integrity checks with HMAC-signed evidence |
63
+ | **10+ Connectors** | Git, Slack, Jira, email, GitHub, and conversation imports |
64
+
65
+ ## Architecture
66
+
67
+ ```
68
+ Agent Runtime
69
+ -> Event Ingestor -> Event Log (append-only)
70
+ -> Claim Extractor -> Claims Store
71
+ -> State Engine (6-state lifecycle)
72
+ Steward Loop -> Multi-Probe Validators -> Proposals -> Human Review
73
+ Operator Runtime -> JSONL Inbox -> Progressive Retrieval -> Maintenance
74
+ Query Path -> Hybrid Ranker -> Response Context Builder
75
+ Compactor -> Summaries + Citation Graph -> Archive
76
+ ```
77
+
78
+ ## Quick Start
79
+
80
+ ```bash
81
+ pip install memorymaster
82
+ ```
83
+
84
+ ```bash
85
+ # Initialize database
86
+ memorymaster --db memory.db init-db
87
+
88
+ # Ingest a claim with citation
89
+ memorymaster --db memory.db ingest \
90
+ --text "Server IP is 10.0.0.2" \
91
+ --source "session://chat|turn-1|user confirmed"
92
+
93
+ # Run validation cycle
94
+ memorymaster --db memory.db run-cycle
95
+
96
+ # Query memory
97
+ memorymaster --db memory.db query "server ip" --retrieval-mode hybrid
98
+ ```
99
+
100
+ ## MCP Server (Claude Code / Codex)
101
+
102
+ ```bash
103
+ pip install "memorymaster[mcp]"
104
+ ```
105
+
106
+ Add to your MCP config:
107
+
108
+ ```json
109
+ {
110
+ "mcpServers": {
111
+ "memorymaster": {
112
+ "command": "memorymaster-mcp"
113
+ }
114
+ }
115
+ }
116
+ ```
117
+
118
+ **12 MCP tools available:** `init_db`, `ingest_claim`, `run_cycle`, `query_memory`, `list_claims`, `list_events`, `pin_claim`, `compact_memory`, `run_steward`, `list_steward_proposals`, `resolve_steward_proposal`, `open_dashboard`
119
+
120
+ ## Operator Runtime
121
+
122
+ Process conversation turns from a JSONL inbox with automatic claim extraction, retrieval, and maintenance:
123
+
124
+ ```bash
125
+ memorymaster --db memory.db run-operator \
126
+ --inbox-jsonl turns.jsonl \
127
+ --retrieval-mode hybrid \
128
+ --policy-mode cadence \
129
+ --max-idle-seconds 120 \
130
+ --log-jsonl artifacts/operator/events.jsonl
131
+ ```
132
+
133
+ Features: restart-safe checkpointing, durable pending-turn queue, progressive tiered retrieval, configurable maintenance cadence, `<private>...</private>` block exclusion.
134
+
135
+ ## Dashboard
136
+
137
+ ```bash
138
+ memorymaster --db memory.db run-dashboard --port 8765
139
+ ```
140
+
141
+ Open `http://127.0.0.1:8765/dashboard` for:
142
+ - Claims table with status filters
143
+ - Timeline feed with transition history
144
+ - Conflict comparison view
145
+ - Review queue with approve/reject actions
146
+ - Live SSE operator event stream
147
+
148
+ **API endpoints:** `/health`, `/api/claims`, `/api/events`, `/api/timeline`, `/api/conflicts`, `/api/review-queue`, `/api/triage/action`, `/api/operator/stream`
149
+
150
+ ## Steward Governance
151
+
152
+ The steward probes confirmed claims for staleness using multiple validators:
153
+
154
+ | Probe | What it checks |
155
+ |-------|----------------|
156
+ | `filesystem_grep` | Does the claim value appear in workspace files? |
157
+ | `deterministic_format` | Is the object value well-formed (IP, URL, email, date)? |
158
+ | `deterministic_citation_locator` | Do cited sources still exist and match? |
159
+ | `semantic_probe` | Does surrounding context still support the claim? |
160
+ | `tool_probe` | Does running the relevant tool confirm the value? |
161
+
162
+ ```bash
163
+ # Non-destructive audit (proposals only)
164
+ memorymaster --db memory.db --workspace . run-steward --mode manual --max-cycles 1
165
+
166
+ # Apply transitions
167
+ memorymaster --db memory.db --workspace . run-steward --mode manual --apply
168
+
169
+ # Review and resolve proposals
170
+ memorymaster --db memory.db steward-proposals --limit 50
171
+ memorymaster --db memory.db resolve-proposal --action approve --claim-id 42
172
+ ```
173
+
174
+ ## Connectors
175
+
176
+ Import from any source into the operator inbox:
177
+
178
+ ```bash
179
+ # Git commits
180
+ python scripts/git_to_turns.py --input export.json --output turns.jsonl
181
+
182
+ # Slack messages
183
+ python scripts/slack_live_to_turns.py --input config.json --output turns.jsonl
184
+
185
+ # Jira issues
186
+ python scripts/jira_live_to_turns.py --input config.json --output turns.jsonl
187
+
188
+ # Email (IMAP)
189
+ python scripts/email_live_to_turns.py --input config.json --output turns.jsonl
190
+
191
+ # Generic AI conversations (OpenAI/Claude/Gemini)
192
+ python scripts/conversation_importer.py --input chat.json --output turns.jsonl
193
+ ```
194
+
195
+ ## Security
196
+
197
+ - **Auto-redaction**: Tokens, API keys, passwords, and secrets are scrubbed at ingest time
198
+ - **Policy-gated access**: `--allow-sensitive` requires `MEMORYMASTER_ALLOW_SENSITIVE_BYPASS=1`
199
+ - **Non-destructive redaction**: `redact-claim` scrubs claim/citation data with full audit trail
200
+ - **Encryption**: Optional Fernet encryption for sensitive payloads (`pip install "memorymaster[security]"`)
201
+
202
+ ## Performance
203
+
204
+ SLO-driven benchmarks with configurable profiles:
205
+
206
+ | Metric | Quick Profile | Production Profile |
207
+ |--------|--------------|-------------------|
208
+ | Ingest p95 | <= 60ms | <= 80ms |
209
+ | Ingest throughput | >= 80 ops/sec | >= 60 ops/sec |
210
+ | Query p95 | <= 250ms | <= 400ms |
211
+ | Query throughput | >= 12 ops/sec | >= 8 ops/sec |
212
+ | Cycle p95 | <= 3.5s | <= 6.0s |
213
+ | End-to-end runtime | <= 20s | <= 45s |
214
+
215
+ ```bash
216
+ python benchmarks/perf_smoke.py --slo-config benchmarks/slo_targets.json
217
+ ```
218
+
219
+ ## Backends
220
+
221
+ | Backend | Install | Use case |
222
+ |---------|---------|----------|
223
+ | **SQLite** | Built-in | Local development, single-agent, zero-config |
224
+ | **Postgres** | `pip install "memorymaster[postgres]"` | Team deployment, multi-agent, pgvector search |
225
+
226
+ ## Development
227
+
228
+ ```bash
229
+ # Install with dev dependencies
230
+ pip install -e ".[dev,mcp,security]"
231
+
232
+ # Run tests
233
+ pytest tests/ -q
234
+
235
+ # Run performance benchmarks
236
+ python benchmarks/perf_smoke.py
237
+
238
+ # Run evaluation suite
239
+ python scripts/eval_memorymaster.py --strict
240
+
241
+ # Run incident drill
242
+ python scripts/run_incident_drill.py --dry-run
243
+ ```
244
+
245
+ ## Project Stats
246
+
247
+ - **22 source modules** (10,000+ lines)
248
+ - **82 tests** across 21 test modules
249
+ - **24 utility scripts** (connectors, benchmarks, drills)
250
+ - **12 MCP tools** for agent integration
251
+ - **6 API endpoints** + SSE streaming
252
+ - **10+ import connectors** (Git, Slack, Jira, email, GitHub, conversations)
253
+
254
+ ## Documentation
255
+
256
+ | Document | Description |
257
+ |----------|-------------|
258
+ | [ARCHITECTURE.md](ARCHITECTURE.md) | System design and subsystem details |
259
+ | [ROADMAP.md](ROADMAP.md) | Release plan and future tracks |
260
+ | [CHANGELOG.md](CHANGELOG.md) | Version history and release notes |
261
+ | [USER_GUIDE.md](USER_GUIDE.md) | Setup, usage, MCP integration, troubleshooting |
262
+
263
+ ## License
264
+
265
+ [MIT](LICENSE) - Built by [wolverin0](https://github.com/wolverin0)
@@ -0,0 +1,236 @@
1
+ <p align="center">
2
+ <h1 align="center">MemoryMaster</h1>
3
+ <p align="center">
4
+ <strong>Production-grade memory reliability for AI coding agents</strong>
5
+ </p>
6
+ <p align="center">
7
+ <a href="https://github.com/wolverin0/memorymaster/actions/workflows/ci.yml"><img src="https://github.com/wolverin0/memorymaster/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
8
+ <a href="https://github.com/wolverin0/memorymaster/releases"><img src="https://img.shields.io/github/v/release/wolverin0/memorymaster?color=blue" alt="Release"></a>
9
+ <a href="https://pypi.org/project/memorymaster/"><img src="https://img.shields.io/pypi/v/memorymaster?color=green" alt="PyPI"></a>
10
+ <a href="https://github.com/wolverin0/memorymaster/blob/main/LICENSE"><img src="https://img.shields.io/github/license/wolverin0/memorymaster" alt="License"></a>
11
+ <img src="https://img.shields.io/badge/python-3.10%2B-blue" alt="Python 3.10+">
12
+ <img src="https://img.shields.io/badge/tests-82%20passed-brightgreen" alt="Tests">
13
+ <img src="https://img.shields.io/badge/coverage-SQLite%20%2B%20Postgres-purple" alt="Backend Coverage">
14
+ </p>
15
+ </p>
16
+
17
+ ---
18
+
19
+ MemoryMaster gives AI coding agents **persistent, verifiable memory** with a full claim lifecycle, citation tracking, conflict detection, and human-in-the-loop governance. It prevents the #1 problem with agent memory: **drift, stale assumptions, and unsafe disclosure**.
20
+
21
+ ## Key Features
22
+
23
+ | Feature | Description |
24
+ |---------|-------------|
25
+ | **6-State Lifecycle** | `candidate` -> `confirmed` -> `stale` -> `superseded` -> `conflicted` -> `archived` |
26
+ | **Citation Tracking** | Every claim links to source evidence with provenance |
27
+ | **Hybrid Retrieval** | Lexical + vector + freshness + confidence ranking |
28
+ | **Steward Governance** | Multi-probe validators with proposal/approve/reject workflow |
29
+ | **MCP Integration** | 12 tools for Claude Code, Codex, and any MCP-compatible agent |
30
+ | **Real-time Dashboard** | HTML UI with SSE streaming, conflict view, and triage actions |
31
+ | **Auto-Redaction** | Tokens, keys, and passwords scrubbed at ingest time |
32
+ | **Dual Backend** | SQLite (zero-config) and Postgres (with optional pgvector) |
33
+ | **Incident Drills** | Automated perf + eval + integrity checks with HMAC-signed evidence |
34
+ | **10+ Connectors** | Git, Slack, Jira, email, GitHub, and conversation imports |
35
+
36
+ ## Architecture
37
+
38
+ ```
39
+ Agent Runtime
40
+ -> Event Ingestor -> Event Log (append-only)
41
+ -> Claim Extractor -> Claims Store
42
+ -> State Engine (6-state lifecycle)
43
+ Steward Loop -> Multi-Probe Validators -> Proposals -> Human Review
44
+ Operator Runtime -> JSONL Inbox -> Progressive Retrieval -> Maintenance
45
+ Query Path -> Hybrid Ranker -> Response Context Builder
46
+ Compactor -> Summaries + Citation Graph -> Archive
47
+ ```
48
+
49
+ ## Quick Start
50
+
51
+ ```bash
52
+ pip install memorymaster
53
+ ```
54
+
55
+ ```bash
56
+ # Initialize database
57
+ memorymaster --db memory.db init-db
58
+
59
+ # Ingest a claim with citation
60
+ memorymaster --db memory.db ingest \
61
+ --text "Server IP is 10.0.0.2" \
62
+ --source "session://chat|turn-1|user confirmed"
63
+
64
+ # Run validation cycle
65
+ memorymaster --db memory.db run-cycle
66
+
67
+ # Query memory
68
+ memorymaster --db memory.db query "server ip" --retrieval-mode hybrid
69
+ ```
70
+
71
+ ## MCP Server (Claude Code / Codex)
72
+
73
+ ```bash
74
+ pip install "memorymaster[mcp]"
75
+ ```
76
+
77
+ Add to your MCP config:
78
+
79
+ ```json
80
+ {
81
+ "mcpServers": {
82
+ "memorymaster": {
83
+ "command": "memorymaster-mcp"
84
+ }
85
+ }
86
+ }
87
+ ```
88
+
89
+ **12 MCP tools available:** `init_db`, `ingest_claim`, `run_cycle`, `query_memory`, `list_claims`, `list_events`, `pin_claim`, `compact_memory`, `run_steward`, `list_steward_proposals`, `resolve_steward_proposal`, `open_dashboard`
90
+
91
+ ## Operator Runtime
92
+
93
+ Process conversation turns from a JSONL inbox with automatic claim extraction, retrieval, and maintenance:
94
+
95
+ ```bash
96
+ memorymaster --db memory.db run-operator \
97
+ --inbox-jsonl turns.jsonl \
98
+ --retrieval-mode hybrid \
99
+ --policy-mode cadence \
100
+ --max-idle-seconds 120 \
101
+ --log-jsonl artifacts/operator/events.jsonl
102
+ ```
103
+
104
+ Features: restart-safe checkpointing, durable pending-turn queue, progressive tiered retrieval, configurable maintenance cadence, `<private>...</private>` block exclusion.
105
+
106
+ ## Dashboard
107
+
108
+ ```bash
109
+ memorymaster --db memory.db run-dashboard --port 8765
110
+ ```
111
+
112
+ Open `http://127.0.0.1:8765/dashboard` for:
113
+ - Claims table with status filters
114
+ - Timeline feed with transition history
115
+ - Conflict comparison view
116
+ - Review queue with approve/reject actions
117
+ - Live SSE operator event stream
118
+
119
+ **API endpoints:** `/health`, `/api/claims`, `/api/events`, `/api/timeline`, `/api/conflicts`, `/api/review-queue`, `/api/triage/action`, `/api/operator/stream`
120
+
121
+ ## Steward Governance
122
+
123
+ The steward probes confirmed claims for staleness using multiple validators:
124
+
125
+ | Probe | What it checks |
126
+ |-------|----------------|
127
+ | `filesystem_grep` | Does the claim value appear in workspace files? |
128
+ | `deterministic_format` | Is the object value well-formed (IP, URL, email, date)? |
129
+ | `deterministic_citation_locator` | Do cited sources still exist and match? |
130
+ | `semantic_probe` | Does surrounding context still support the claim? |
131
+ | `tool_probe` | Does running the relevant tool confirm the value? |
132
+
133
+ ```bash
134
+ # Non-destructive audit (proposals only)
135
+ memorymaster --db memory.db --workspace . run-steward --mode manual --max-cycles 1
136
+
137
+ # Apply transitions
138
+ memorymaster --db memory.db --workspace . run-steward --mode manual --apply
139
+
140
+ # Review and resolve proposals
141
+ memorymaster --db memory.db steward-proposals --limit 50
142
+ memorymaster --db memory.db resolve-proposal --action approve --claim-id 42
143
+ ```
144
+
145
+ ## Connectors
146
+
147
+ Import from any source into the operator inbox:
148
+
149
+ ```bash
150
+ # Git commits
151
+ python scripts/git_to_turns.py --input export.json --output turns.jsonl
152
+
153
+ # Slack messages
154
+ python scripts/slack_live_to_turns.py --input config.json --output turns.jsonl
155
+
156
+ # Jira issues
157
+ python scripts/jira_live_to_turns.py --input config.json --output turns.jsonl
158
+
159
+ # Email (IMAP)
160
+ python scripts/email_live_to_turns.py --input config.json --output turns.jsonl
161
+
162
+ # Generic AI conversations (OpenAI/Claude/Gemini)
163
+ python scripts/conversation_importer.py --input chat.json --output turns.jsonl
164
+ ```
165
+
166
+ ## Security
167
+
168
+ - **Auto-redaction**: Tokens, API keys, passwords, and secrets are scrubbed at ingest time
169
+ - **Policy-gated access**: `--allow-sensitive` requires `MEMORYMASTER_ALLOW_SENSITIVE_BYPASS=1`
170
+ - **Non-destructive redaction**: `redact-claim` scrubs claim/citation data with full audit trail
171
+ - **Encryption**: Optional Fernet encryption for sensitive payloads (`pip install "memorymaster[security]"`)
172
+
173
+ ## Performance
174
+
175
+ SLO-driven benchmarks with configurable profiles:
176
+
177
+ | Metric | Quick Profile | Production Profile |
178
+ |--------|--------------|-------------------|
179
+ | Ingest p95 | <= 60ms | <= 80ms |
180
+ | Ingest throughput | >= 80 ops/sec | >= 60 ops/sec |
181
+ | Query p95 | <= 250ms | <= 400ms |
182
+ | Query throughput | >= 12 ops/sec | >= 8 ops/sec |
183
+ | Cycle p95 | <= 3.5s | <= 6.0s |
184
+ | End-to-end runtime | <= 20s | <= 45s |
185
+
186
+ ```bash
187
+ python benchmarks/perf_smoke.py --slo-config benchmarks/slo_targets.json
188
+ ```
189
+
190
+ ## Backends
191
+
192
+ | Backend | Install | Use case |
193
+ |---------|---------|----------|
194
+ | **SQLite** | Built-in | Local development, single-agent, zero-config |
195
+ | **Postgres** | `pip install "memorymaster[postgres]"` | Team deployment, multi-agent, pgvector search |
196
+
197
+ ## Development
198
+
199
+ ```bash
200
+ # Install with dev dependencies
201
+ pip install -e ".[dev,mcp,security]"
202
+
203
+ # Run tests
204
+ pytest tests/ -q
205
+
206
+ # Run performance benchmarks
207
+ python benchmarks/perf_smoke.py
208
+
209
+ # Run evaluation suite
210
+ python scripts/eval_memorymaster.py --strict
211
+
212
+ # Run incident drill
213
+ python scripts/run_incident_drill.py --dry-run
214
+ ```
215
+
216
+ ## Project Stats
217
+
218
+ - **22 source modules** (10,000+ lines)
219
+ - **82 tests** across 21 test modules
220
+ - **24 utility scripts** (connectors, benchmarks, drills)
221
+ - **12 MCP tools** for agent integration
222
+ - **6 API endpoints** + SSE streaming
223
+ - **10+ import connectors** (Git, Slack, Jira, email, GitHub, conversations)
224
+
225
+ ## Documentation
226
+
227
+ | Document | Description |
228
+ |----------|-------------|
229
+ | [ARCHITECTURE.md](ARCHITECTURE.md) | System design and subsystem details |
230
+ | [ROADMAP.md](ROADMAP.md) | Release plan and future tracks |
231
+ | [CHANGELOG.md](CHANGELOG.md) | Version history and release notes |
232
+ | [USER_GUIDE.md](USER_GUIDE.md) | Setup, usage, MCP integration, troubleshooting |
233
+
234
+ ## License
235
+
236
+ [MIT](LICENSE) - Built by [wolverin0](https://github.com/wolverin0)