musememory 3.2.0 → 3.4.0

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 (72) hide show
  1. package/.agents/artifacts/2026-10-26-dashboard-rehaul-rashin-research-and-wave-23-tickets.md +2 -0
  2. package/.agents/artifacts/README.md +21 -0
  3. package/.agents/artifacts/TECHNICAL_DEBT-wave24-25.md +12 -0
  4. package/.agents/artifacts/TECHNICAL_DEBT-wave26.md +11 -0
  5. package/.agents/artifacts/TECHNICAL_DEBT-wave27.md +13 -0
  6. package/.agents/artifacts/gauntlet-wave23-pr1/ACCEPTANCE_PACKET.md +85 -0
  7. package/.agents/artifacts/gauntlet-wave23-pr1/GAUNTLET_JOB_CONTRACT.md +50 -0
  8. package/.agents/artifacts/gauntlet-wave23-pr1/ITERATION_LEDGER.md +131 -0
  9. package/.agents/artifacts/gauntlet-wave23-pr1/TECHNICAL_DEBT.md +28 -0
  10. package/.agents/artifacts/gauntlet-wave23-pr456/ACCEPTANCE_PACKET.md +22 -0
  11. package/.agents/artifacts/gauntlet-wave23-pr456/GAUNTLET_JOB_CONTRACT.md +41 -0
  12. package/.agents/artifacts/gauntlet-wave23-pr456/ITERATION_LEDGER.md +36 -0
  13. package/.agents/artifacts/gauntlet-wave24-25/ACCEPTANCE_PACKET.md +13 -0
  14. package/.agents/artifacts/gauntlet-wave24-25/ITERATION_LEDGER.md +28 -0
  15. package/.agents/artifacts/gauntlet-wave25-wiring/ACCEPTANCE_PACKET.md +7 -0
  16. package/.agents/artifacts/gauntlet-wave25-wiring/ITERATION_LEDGER.md +27 -0
  17. package/.agents/artifacts/gauntlet-wave27/ACCEPTANCE_PACKET.md +7 -0
  18. package/.agents/artifacts/gauntlet-wave27/ITERATION_LEDGER.md +36 -0
  19. package/.agents/artifacts/outcome-study-2026-11/README.md +64 -0
  20. package/.agents/artifacts/outcome-study-2026-11/graders/bytes.test.ts +12 -0
  21. package/.agents/artifacts/outcome-study-2026-11/graders/clone.test.ts +26 -0
  22. package/.agents/artifacts/outcome-study-2026-11/graders/csv.test.ts +11 -0
  23. package/.agents/artifacts/outcome-study-2026-11/graders/duration.test.ts +12 -0
  24. package/.agents/artifacts/outcome-study-2026-11/graders/isodate.test.ts +7 -0
  25. package/.agents/artifacts/outcome-study-2026-11/graders/money.test.ts +11 -0
  26. package/.agents/artifacts/outcome-study-2026-11/graders/percent.test.ts +11 -0
  27. package/.agents/artifacts/outcome-study-2026-11/graders/semver.test.ts +12 -0
  28. package/.agents/artifacts/outcome-study-2026-11/graders/slug.test.ts +12 -0
  29. package/.agents/artifacts/outcome-study-2026-11/graders/truncate.test.ts +10 -0
  30. package/.agents/artifacts/outcome-study-2026-11/tasks/bytes.md +3 -0
  31. package/.agents/artifacts/outcome-study-2026-11/tasks/clone.md +3 -0
  32. package/.agents/artifacts/outcome-study-2026-11/tasks/csv.md +3 -0
  33. package/.agents/artifacts/outcome-study-2026-11/tasks/duration.md +3 -0
  34. package/.agents/artifacts/outcome-study-2026-11/tasks/isodate.md +3 -0
  35. package/.agents/artifacts/outcome-study-2026-11/tasks/money.md +3 -0
  36. package/.agents/artifacts/outcome-study-2026-11/tasks/percent.md +3 -0
  37. package/.agents/artifacts/outcome-study-2026-11/tasks/semver.md +3 -0
  38. package/.agents/artifacts/outcome-study-2026-11/tasks/slug.md +3 -0
  39. package/.agents/artifacts/outcome-study-2026-11/tasks/truncate.md +3 -0
  40. package/.agents/context/architecture.md +7 -7
  41. package/.agents/context/current.md +216 -8
  42. package/.agents/context/decisions.md +8 -0
  43. package/.agents/context/deep-research-agentic-memory-evolution.md +1 -1
  44. package/.agents/context/evidence-ledger.md +99 -0
  45. package/.agents/context/index.md +1 -1
  46. package/.agents/context/product.md +4 -0
  47. package/.agents/context/roadmap.md +19 -16
  48. package/.agents/context/ticket-plan.md +147 -47
  49. package/.agents/plans/2026-10-20-wave-22-failure-attribution-negative-mining-design.md +1 -1
  50. package/.agents/plans/2026-10-20-wave-22-failure-attribution-negative-mining-plan.md +1 -1
  51. package/.agents/standards/README.md +6 -1
  52. package/.agents/standards/anti-patterns.md +116 -0
  53. package/.agents/standards/boundary-governance.md +52 -0
  54. package/.agents/standards/frontend-astro.md +3 -1
  55. package/.agents/standards/language-policy.md +115 -0
  56. package/.agents/standards/memory-context.md +1 -1
  57. package/.agents/standards/security-vibeguard.md +1 -1
  58. package/.agents/standards/test-failure-audit.md +46 -0
  59. package/.agents/standards/visual-inspection.md +31 -0
  60. package/README.md +7 -4
  61. package/claims.json +5 -5
  62. package/dist/index.js +12530 -7037
  63. package/docs/agent-reference.md +10 -1
  64. package/docs/cli-reference.md +32 -8
  65. package/docs/mcp-tool-matrix.json +12 -1
  66. package/package.json +2 -1
  67. package/schema.json +1 -0
  68. package/.agents/artifacts/2026-10-20-lifeos-memory-distillation-plan.md +0 -865
  69. package/.agents/artifacts/2026-10-26-wave-29-code-review-audit.md +0 -52
  70. package/.agents/artifacts/2026-10-26-wave-29-gauntlet-acceptance-packet.md +0 -48
  71. package/.agents/artifacts/2026-10-26-wave-29-muse-security-audit.md +0 -71
  72. package/.agents/artifacts/2026-10-26-wave-29-sovereign-lifeos-migration-plan.md +0 -88
@@ -39,6 +39,13 @@ npm install -g musememory # or: bun add -g musememory
39
39
  Both are plain files. There is no server, no port, and no service to keep
40
40
  alive. Delete the directory to delete the memory.
41
41
 
42
+ The per-entry `memories/*.yaml` mirror is the export/rollback copy of SQLite. It
43
+ is written eagerly by default; set `MUSE_YAML_MIRROR=0` (or pass
44
+ `yamlMirror: false` to `openStore`) to skip it when the store is only read
45
+ through this engine. SQLite stays authoritative either way. The WAL is bounded
46
+ to a 2 MiB autocheckpoint interval and a 64 MiB journal size limit, and
47
+ `memory io` reports the current footprint.
48
+
42
49
  ## 3. Mandatory session protocol
43
50
 
44
51
  An agent integrating Muse must follow this order.
@@ -207,7 +214,9 @@ propose → candidate → confirmed → superseded
207
214
  - **No network by default.** Semantic embeddings are opt-in and require an
208
215
  explicitly configured endpoint. Everything else runs in-process.
209
216
  - **Writes are auditable.** Every write appends to `audit.jsonl` and the
210
- tamper-evident hash chain.
217
+ tamper-evident hash chain. At 5 MiB the active file rolls into
218
+ `audit-archive/`; the chain continues across segments, and pruning records an
219
+ anchor hash so `verifyAuditChain` still validates the retained window.
211
220
 
212
221
  ## 10. Verifying the installation
213
222
 
@@ -33,6 +33,7 @@ Core Memory Lifecycle Commands:
33
33
  restore <id> [--replay [--apply]] Restore a tombstoned entry; --replay rebuilds content from audit.jsonl
34
34
  list / ls [--status S] [--type T] [--project P] List memory entries with multi-field filtering
35
35
  stats Display total memory counts and status/type distribution
36
+ io [--json] Process read/write counters and on-disk store usage
36
37
  stale [--days N] List entries exceeding staleness policy
37
38
  consolidate [--project P] [--dry-run] Cluster confirmed memories into scene rollups
38
39
  optimize [--dry-run] [--project P] [--force] Prune test noise, junk, duplicates & vacuum SQLite DB
@@ -44,6 +45,10 @@ Core Memory Lifecycle Commands:
44
45
  distill [--min-count N] [--dry-run] Distill recurring fix patterns into .agents/skills/ folders
45
46
  verify <id> [--timeout S] [--strict] Execute test_command or run full strict integrity gate
46
47
  briefing [--limit N] Executive summary of active and stale memories
48
+ test-feedback --command C --exit-code N [--memory ID,...] Reinforce/penalize applied memories from a real test run
49
+ sentry --command C --exit-code N [--input F|-] Read-only regression sentry against negative memories
50
+ flaky [--json] Flaky tests, failure bursts and dependency-file drift from recorded runs
51
+ remediation [--apply] Synthesize reusable playbooks from recurring, resolved test failures
47
52
 
48
53
  Evidence, Provenance & Cognitive Governance:
49
54
  source [add|list|show] Manage external documentation and URLs in provenance Source Ledger
@@ -59,6 +64,8 @@ Context & Retrieval Commands:
59
64
  reindex Rebuild the local vector index (.memory/index.json) for hybrid search
60
65
  embed [status|build|reindex] Manage semantic embeddings (llama.cpp / OpenAI-compatible endpoint; opt-in)
61
66
  recall [query] Search active/confirmed memories with filters
67
+ preflight [files...] Speculative context for the files being edited
68
+ project [name] Show or set the configured project identity
62
69
  search-transcript <query> [file.jsonl] [--window N] Full-text transcript search with bookends
63
70
 
64
71
  Wiki & Entity Knowledge Compounding:
@@ -97,8 +104,9 @@ Ecosystem, Migration & Connectivity:
97
104
  conflicts [--dry-run] Inspect recorded contradictions; --dry-run previews what would be flagged
98
105
  reconcile [--prune] [--stale] Reconcile orphaned & drifted code anchors across memories
99
106
  benchmark [--iterations N] Run microsecond speed, quality & token economy benchmark suite
107
+ playbook [--list|--tag T|<id>] [--success|--fail] Procedural playbooks: list, inspect or record an outcome
100
108
  scan-secrets [dir] [--json] Native Vibeguard secret scanner (zero external dependencies)
101
- terrain [--out file.md] Collect machine hardware, toolchain & agent ecosystem map
109
+ terrain [--workspace] [--out] Machine terrain, or --workspace for the six workspace maps
102
110
  code-impact <file> [--symbol] Synthesize code callers, ADRs, negative warnings & risk score
103
111
  pr-context [--base B] [--out] Generate memory-verified PR description from git diff
104
112
  mcp Run stdio MCP server for agent platforms
@@ -112,7 +120,7 @@ Version Control (R23):
112
120
 
113
121
  ## MCP tools
114
122
 
115
- **115 tools** are registered, exposed through **7 task-focused profiles** (`core`, `coding`, `debugging`, `review`, `architecture`, `maintenance`, `full`). The authoritative machine-readable list is [`mcp-tool-matrix.json`](./mcp-tool-matrix.json).
123
+ **126 tools** are registered, exposed through **7 task-focused profiles** (`core`, `coding`, `debugging`, `review`, `architecture`, `maintenance`, `full`). The authoritative machine-readable list is [`mcp-tool-matrix.json`](./mcp-tool-matrix.json).
116
124
 
117
125
  Select a profile with the `MUSE_MCP_PROFILE` environment variable. Call `muse_profile_list` for the live mapping.
118
126
 
@@ -223,12 +231,12 @@ Select a profile with the `MUSE_MCP_PROFILE` environment variable. Call `muse_pr
223
231
  | `memory_adr_list` | `target` | List all Architecture Decision Records (ADRs) recorded in the memory store, optionally filtered by status |
224
232
  | `memory_drift_audit` | `target` | Run bidirectional documentation <-> code drift audit: verifies if documented decisions are implemented in code and flags missing/stale/conflicting code or docs |
225
233
  | `muse_why` | `target` | Autonomous Engineering Cognition: Explain WHY code was designed or modified the way it is by tracing historical bug fixes, ADRs, trade-offs, and invariants |
226
- | `muse_bug_clusters` | `packet` | Analyze and cluster recurring bug fixes, negative lessons, and failures into architectural fragility hotspots with root-cause hypotheses |
227
- | `muse_tech_debt` | `packet` | Scan repository and memory store for technical debt indicators (TODO/FIXME/HACK, unsafe 'as any' casts, drifted code anchors) and generate refactoring priorities |
228
- | `muse_health` | `packet` | Unified 5-Pillar Project Health Gate: audit memory store integrity, code anchor validity, documentation drift, anti-pattern sentry, and technical debt with overall grade (A-F) and pass/fail gate status |
234
+ | `muse_bug_clusters` | — | Analyze and cluster recurring bug fixes, negative lessons, and failures into architectural fragility hotspots with root-cause hypotheses |
235
+ | `muse_tech_debt` | — | Scan repository and memory store for technical debt indicators (TODO/FIXME/HACK, unsafe 'as any' casts, drifted code anchors) and generate refactoring priorities |
236
+ | `muse_health` | — | Unified 5-Pillar Project Health Gate: audit memory store integrity, code anchor validity, documentation drift, anti-pattern sentry, and technical debt with overall grade (A-F) and pass/fail gate status |
229
237
  | `muse_code_impact` | `file_path` | Evaluates comprehensive code and memory impact before editing: callers, test suites, ADRs, negative warnings, active constraints, and composite risk level |
230
- | `muse_pr_context` | — | Generates rich GitHub PR descriptions from git diff linking touched code anchors, respected ADRs, tested invariants, and composite risk assessment |
231
- | `muse_reconcile_anchors` | — | Interactively audits, prunes, or updates drifted and orphaned code anchors across memories when code is refactored or deleted |
238
+ | `muse_pr_context` | `command`, `exit_code` | Generates rich GitHub PR descriptions from git diff linking touched code anchors, respected ADRs, tested invariants, and composite risk assessment |
239
+ | `muse_reconcile_anchors` | `command`, `exit_code` | Interactively audits, prunes, or updates drifted and orphaned code anchors across memories when code is refactored or deleted |
232
240
 
233
241
  ### Knowledge compounding
234
242
 
@@ -261,6 +269,22 @@ Select a profile with the `MUSE_MCP_PROFILE` environment variable. Call `muse_pr
261
269
  | `graph_index` | `query` | Index AST symbols from the project's CodeGraph/Graphify provider and cache in .memory/ |
262
270
  | `muse_profile_list` | `title`, `context_and_drivers`, `decision`, `consequences` | List all available task-focused MCP profiles (core, coding, debugging, review, architecture, maintenance, full) and their exposed tools |
263
271
 
272
+ ### Other
273
+
274
+ | Tool | Required parameters | Description |
275
+ | --- | --- | --- |
276
+ | `muse_preflight` | — | Read-only pre-flight: anchored invariants, blast-radius risk and a token-budgeted context pack for the files about to be edited |
277
+ | `muse_episodes` | `packet` | Recall recent episodic narratives (goal → hypothesis → trajectory → verification → retrospective) built from observations |
278
+ | `muse_playbook_recall` | `packet` | Recall procedural playbooks: list by tag, or fetch one by id/title |
279
+ | `muse_playbook_record` | `packet` | Save a playbook trajectory, or record success/failure for an existing playbook |
280
+ | `memory_test_feedback` | `command`, `exit_code` | Bind a real test run to the memories that were applied: green runs reinforce them, red runs record a failed application and a regression strike for anchor-relevant memories. Returns the parsed run plus regression-sentry matches. |
281
+ | `muse_regression_sentry` | `client` | Read-only: match failing tests against recorded BUG_PRONE_PATTERN / DO_NOT_USE / failed-approach memories and return remediation playbooks |
282
+ | `muse_flaky_tests` | `client` | Read-only: flaky tests, failure bursts and dependency-file drift derived from recorded test_feedback runs |
283
+ | `muse_remediation_playbooks` | `client` | Read-only: synthesize remediation playbook candidates from recurring, resolved test failures (nothing is persisted) |
284
+ | `muse_enclave_recall` | `client` | Read-only: decrypt and return entries from one client enclave vault. Requires an explicit client; every read is audit-logged. |
285
+ | `muse_overlay_status` | `public_key` | Read-only: list branch memory overlays and their entry counts, or inspect one branch overlay's entries |
286
+ | `muse_attestation_verify` | `public_key` | Read-only: verify an Ed25519 packet attestation or an attestation chain against an inline public key |
287
+
264
288
  ---
265
289
 
266
- Counts in this file are generated from the same source as [`claims.json`](../claims.json): 115 tools, 7 profiles, 30 import formats, 8 credential rule families.
290
+ Counts in this file are generated from the same source as [`claims.json`](../claims.json): 126 tools, 7 profiles, 30 import formats, 8 credential rule families.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$comment": "Generated by scripts/generate-claims.ts — the authoritative MCP tool list.",
3
- "count": 115,
3
+ "count": 126,
4
4
  "tools": [
5
5
  "confirm_fix",
6
6
  "get_context",
@@ -88,6 +88,7 @@
88
88
  "memory_source_add",
89
89
  "memory_source_list",
90
90
  "memory_supersede",
91
+ "memory_test_feedback",
91
92
  "memory_trace",
92
93
  "memory_tree_search",
93
94
  "memory_validate",
@@ -96,19 +97,29 @@
96
97
  "memory_wiki_compile",
97
98
  "memory_wiki_get",
98
99
  "memory_wiki_search",
100
+ "muse_attestation_verify",
99
101
  "muse_bug_clusters",
100
102
  "muse_code_for_memory",
101
103
  "muse_code_impact",
102
104
  "muse_context",
105
+ "muse_enclave_recall",
106
+ "muse_episodes",
107
+ "muse_flaky_tests",
103
108
  "muse_health",
104
109
  "muse_memory_for_code",
105
110
  "muse_mesh_audit",
106
111
  "muse_mesh_link",
107
112
  "muse_mesh_query",
108
113
  "muse_mesh_status",
114
+ "muse_overlay_status",
115
+ "muse_playbook_recall",
116
+ "muse_playbook_record",
109
117
  "muse_pr_context",
118
+ "muse_preflight",
110
119
  "muse_profile_list",
111
120
  "muse_reconcile_anchors",
121
+ "muse_regression_sentry",
122
+ "muse_remediation_playbooks",
112
123
  "muse_sync_broadcast",
113
124
  "muse_sync_ingest",
114
125
  "muse_sync_pool",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "musememory",
3
- "version": "3.2.0",
3
+ "version": "3.4.0",
4
4
  "description": "Autonomous, self-organizing cognitive memory system for AI agents and agency networks",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -10,6 +10,7 @@
10
10
  ],
11
11
  "scripts": {
12
12
  "bench:graph": "bun scripts/bench-graph.ts",
13
+ "agents:terrain": "bun run bin/musememory.ts terrain --workspace --out .agents/terrain",
13
14
  "build": "bun build bin/musememory.ts --outfile dist/index.js --target node",
14
15
  "site:dev": "bun run --cwd apps/website dev",
15
16
  "site:build": "bun run --cwd apps/website build",
package/schema.json CHANGED
@@ -15,6 +15,7 @@
15
15
  "salience": { "type": "number", "minimum": 0, "maximum": 1 },
16
16
  "created_at": { "type": "string", "format": "date-time" },
17
17
  "updated_at": { "type": "string", "format": "date-time" },
18
+ "asserted_at": { "type": "string", "format": "date-time" },
18
19
  "valid_from": { "type": "string", "format": "date-time" },
19
20
  "valid_to": { "type": "string", "format": "date-time" },
20
21
  "valid_to_exact": { "type": "boolean" },