musememory 3.3.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 (53) hide show
  1. package/.agents/artifacts/README.md +21 -0
  2. package/.agents/artifacts/TECHNICAL_DEBT-wave24-25.md +1 -1
  3. package/.agents/artifacts/TECHNICAL_DEBT-wave26.md +2 -2
  4. package/.agents/artifacts/TECHNICAL_DEBT-wave27.md +3 -3
  5. package/.agents/artifacts/outcome-study-2026-11/README.md +64 -0
  6. package/.agents/artifacts/outcome-study-2026-11/graders/bytes.test.ts +12 -0
  7. package/.agents/artifacts/outcome-study-2026-11/graders/clone.test.ts +26 -0
  8. package/.agents/artifacts/outcome-study-2026-11/graders/csv.test.ts +11 -0
  9. package/.agents/artifacts/outcome-study-2026-11/graders/duration.test.ts +12 -0
  10. package/.agents/artifacts/outcome-study-2026-11/graders/isodate.test.ts +7 -0
  11. package/.agents/artifacts/outcome-study-2026-11/graders/money.test.ts +11 -0
  12. package/.agents/artifacts/outcome-study-2026-11/graders/percent.test.ts +11 -0
  13. package/.agents/artifacts/outcome-study-2026-11/graders/semver.test.ts +12 -0
  14. package/.agents/artifacts/outcome-study-2026-11/graders/slug.test.ts +12 -0
  15. package/.agents/artifacts/outcome-study-2026-11/graders/truncate.test.ts +10 -0
  16. package/.agents/artifacts/outcome-study-2026-11/tasks/bytes.md +3 -0
  17. package/.agents/artifacts/outcome-study-2026-11/tasks/clone.md +3 -0
  18. package/.agents/artifacts/outcome-study-2026-11/tasks/csv.md +3 -0
  19. package/.agents/artifacts/outcome-study-2026-11/tasks/duration.md +3 -0
  20. package/.agents/artifacts/outcome-study-2026-11/tasks/isodate.md +3 -0
  21. package/.agents/artifacts/outcome-study-2026-11/tasks/money.md +3 -0
  22. package/.agents/artifacts/outcome-study-2026-11/tasks/percent.md +3 -0
  23. package/.agents/artifacts/outcome-study-2026-11/tasks/semver.md +3 -0
  24. package/.agents/artifacts/outcome-study-2026-11/tasks/slug.md +3 -0
  25. package/.agents/artifacts/outcome-study-2026-11/tasks/truncate.md +3 -0
  26. package/.agents/context/architecture.md +7 -7
  27. package/.agents/context/current.md +160 -7
  28. package/.agents/context/evidence-ledger.md +21 -11
  29. package/.agents/context/index.md +1 -1
  30. package/.agents/context/product.md +4 -0
  31. package/.agents/context/roadmap.md +12 -9
  32. package/.agents/context/ticket-plan.md +7 -7
  33. package/.agents/plans/2026-10-20-wave-22-failure-attribution-negative-mining-design.md +1 -1
  34. package/.agents/plans/2026-10-20-wave-22-failure-attribution-negative-mining-plan.md +1 -1
  35. package/.agents/standards/README.md +6 -1
  36. package/.agents/standards/anti-patterns.md +116 -0
  37. package/.agents/standards/boundary-governance.md +52 -0
  38. package/.agents/standards/language-policy.md +115 -0
  39. package/.agents/standards/memory-context.md +1 -1
  40. package/.agents/standards/security-vibeguard.md +1 -1
  41. package/.agents/standards/test-failure-audit.md +46 -0
  42. package/.agents/standards/visual-inspection.md +31 -0
  43. package/claims.json +5 -5
  44. package/dist/index.js +6486 -4904
  45. package/docs/agent-reference.md +10 -1
  46. package/docs/cli-reference.md +16 -4
  47. package/docs/mcp-tool-matrix.json +8 -1
  48. package/package.json +2 -1
  49. package/.agents/artifacts/2026-10-20-lifeos-memory-distillation-plan.md +0 -865
  50. package/.agents/artifacts/2026-10-26-wave-29-code-review-audit.md +0 -52
  51. package/.agents/artifacts/2026-10-26-wave-29-gauntlet-acceptance-packet.md +0 -48
  52. package/.agents/artifacts/2026-10-26-wave-29-muse-security-audit.md +0 -71
  53. 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
@@ -115,7 +120,7 @@ Version Control (R23):
115
120
 
116
121
  ## MCP tools
117
122
 
118
- **119 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).
119
124
 
120
125
  Select a profile with the `MUSE_MCP_PROFILE` environment variable. Call `muse_profile_list` for the live mapping.
121
126
 
@@ -230,8 +235,8 @@ Select a profile with the `MUSE_MCP_PROFILE` environment variable. Call `muse_pr
230
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 |
231
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 |
232
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 |
233
- | `muse_pr_context` | — | Generates rich GitHub PR descriptions from git diff linking touched code anchors, respected ADRs, tested invariants, and composite risk assessment |
234
- | `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 |
235
240
 
236
241
  ### Knowledge compounding
237
242
 
@@ -272,7 +277,14 @@ Select a profile with the `MUSE_MCP_PROFILE` environment variable. Call `muse_pr
272
277
  | `muse_episodes` | `packet` | Recall recent episodic narratives (goal → hypothesis → trajectory → verification → retrospective) built from observations |
273
278
  | `muse_playbook_recall` | `packet` | Recall procedural playbooks: list by tag, or fetch one by id/title |
274
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 |
275
287
 
276
288
  ---
277
289
 
278
- Counts in this file are generated from the same source as [`claims.json`](../claims.json): 119 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": 119,
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,23 +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",
103
106
  "muse_episodes",
107
+ "muse_flaky_tests",
104
108
  "muse_health",
105
109
  "muse_memory_for_code",
106
110
  "muse_mesh_audit",
107
111
  "muse_mesh_link",
108
112
  "muse_mesh_query",
109
113
  "muse_mesh_status",
114
+ "muse_overlay_status",
110
115
  "muse_playbook_recall",
111
116
  "muse_playbook_record",
112
117
  "muse_pr_context",
113
118
  "muse_preflight",
114
119
  "muse_profile_list",
115
120
  "muse_reconcile_anchors",
121
+ "muse_regression_sentry",
122
+ "muse_remediation_playbooks",
116
123
  "muse_sync_broadcast",
117
124
  "muse_sync_ingest",
118
125
  "muse_sync_pool",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "musememory",
3
- "version": "3.3.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",