musememory 3.0.2 → 3.3.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 (47) hide show
  1. package/.agents/artifacts/2026-10-26-dashboard-rehaul-rashin-research-and-wave-23-tickets.md +236 -0
  2. package/.agents/artifacts/2026-10-26-wave-29-code-review-audit.md +52 -0
  3. package/.agents/artifacts/2026-10-26-wave-29-gauntlet-acceptance-packet.md +48 -0
  4. package/.agents/artifacts/2026-10-26-wave-29-muse-security-audit.md +71 -0
  5. package/.agents/artifacts/2026-10-26-wave-29-sovereign-lifeos-migration-plan.md +88 -0
  6. package/.agents/artifacts/HANDOFF.md +124 -15
  7. package/.agents/artifacts/TECHNICAL_DEBT-wave24-25.md +12 -0
  8. package/.agents/artifacts/TECHNICAL_DEBT-wave26.md +11 -0
  9. package/.agents/artifacts/TECHNICAL_DEBT-wave27.md +13 -0
  10. package/.agents/artifacts/WORKTREE-LEASE.md +86 -0
  11. package/.agents/artifacts/gauntlet-wave23-pr1/ACCEPTANCE_PACKET.md +85 -0
  12. package/.agents/artifacts/gauntlet-wave23-pr1/GAUNTLET_JOB_CONTRACT.md +50 -0
  13. package/.agents/artifacts/gauntlet-wave23-pr1/ITERATION_LEDGER.md +131 -0
  14. package/.agents/artifacts/gauntlet-wave23-pr1/TECHNICAL_DEBT.md +28 -0
  15. package/.agents/artifacts/gauntlet-wave23-pr456/ACCEPTANCE_PACKET.md +22 -0
  16. package/.agents/artifacts/gauntlet-wave23-pr456/GAUNTLET_JOB_CONTRACT.md +41 -0
  17. package/.agents/artifacts/gauntlet-wave23-pr456/ITERATION_LEDGER.md +36 -0
  18. package/.agents/artifacts/gauntlet-wave24-25/ACCEPTANCE_PACKET.md +13 -0
  19. package/.agents/artifacts/gauntlet-wave24-25/ITERATION_LEDGER.md +28 -0
  20. package/.agents/artifacts/gauntlet-wave25-wiring/ACCEPTANCE_PACKET.md +7 -0
  21. package/.agents/artifacts/gauntlet-wave25-wiring/ITERATION_LEDGER.md +27 -0
  22. package/.agents/artifacts/gauntlet-wave27/ACCEPTANCE_PACKET.md +7 -0
  23. package/.agents/artifacts/gauntlet-wave27/ITERATION_LEDGER.md +36 -0
  24. package/.agents/context/current.md +146 -6
  25. package/.agents/context/decisions.md +8 -0
  26. package/.agents/context/deep-research-agentic-memory-evolution.md +1 -1
  27. package/.agents/context/evidence-ledger.md +89 -0
  28. package/.agents/context/index.md +1 -1
  29. package/.agents/context/roadmap.md +11 -2
  30. package/.agents/context/ticket-plan.md +203 -10
  31. package/.agents/skills/muse-health/SKILL.md +29 -0
  32. package/.agents/standards/README.md +1 -0
  33. package/.agents/standards/dox-hierarchy.md +2 -1
  34. package/.agents/standards/frontend-astro.md +3 -1
  35. package/.agents/standards/git-workflow.md +14 -1
  36. package/.agents/standards/landing-gate.md +253 -0
  37. package/.agents/standards/memory-context.md +5 -6
  38. package/.agents/standards/security-vibeguard.md +1 -1
  39. package/.agents/standards/workflows.md +8 -2
  40. package/README.md +227 -95
  41. package/claims.json +5 -5
  42. package/dist/index.js +11330 -5944
  43. package/docs/agent-reference.md +36 -0
  44. package/docs/cli-reference.md +21 -6
  45. package/docs/mcp-tool-matrix.json +5 -1
  46. package/package.json +9 -2
  47. package/schema.json +1 -0
@@ -0,0 +1,41 @@
1
+ # GAUNTLET JOB CONTRACT — Wave 23 PR 4–6 (`T-460`–`T-468`)
2
+
3
+ > Frozen 2026-11-08. Classification: **bounded** (three merged PR groups: agents hub, About/onboarding/deck, performance).
4
+ > Bar: **Grafana Play** dashboard shell (live) as the external reference; the repository's own website as the internal design reference.
5
+ > Budget: 2 rounds (hard ceiling 5). Round 1 = audit; code changes start in the fix round.
6
+
7
+ ## Goal
8
+
9
+ Verify the Wave 23 PR 4–6 surfaces are correct, secure, responsive and honestly tested:
10
+
11
+ - **T-460–T-462**: agents hub with WIRED/UNWIRED/ABSENT discovery, one-click wire/unwire (harness opt-in + config backup), point-any-agent manifest.
12
+ - **T-463–T-465**: poster About panel with live facts, quick-start cards, searchable command deck.
13
+ - **T-466–T-468**: projection cache with write invalidation, hidden-tab pause, sub-10ms cached projections.
14
+
15
+ ## Acceptance criteria (binary)
16
+
17
+ 1. `bun test` 0 failures; `tsc --noEmit` exit 0; `bun run build` exit 0.
18
+ 2. Headers: CSP (no wildcard), XFO DENY, nosniff, Referrer-Policy; HSTS N/A on localhost HTTP.
19
+ 3. 375 / 768 / 1280: `scrollWidth <= innerWidth`; no clipped primary controls.
20
+ 4. Agents: statuses are exactly WIRED/UNWIRED/ABSENT; the UI shows an explicit confirm before wiring and sends a harness opt-in; every config file the writer touches is backed up (timestamped) before writing; backup failure aborts; unwire removes the memory server; unknown agents fail loud on both routes.
21
+ 5. Manifest: returns the memory directory, DB path, `memory mcp`, and a snippet containing `memory_search`; no secret-shaped content.
22
+ 6. About/onboarding/deck: live facts render; four quick-start commands; seven deck commands filtered by input; every copy action is wired.
23
+ 7. Cache: second read is `X-Cache: HIT`; any mutating UI POST (or external WAL/dir change) makes the next read `MISS`; read-only POSTs stay HIT; cached bodies match.
24
+ 8. Visibility: hidden tab stops the loop; visible tab wakes it; no `setInterval`.
25
+ 9. Benchmark: median cached `/api/memories` and `/api/stats` < 10ms.
26
+ 10. No lowered bar (no skips/only/weakened assertions); `scan-secrets src` clean.
27
+
28
+ ## Proof commands
29
+
30
+ ```bash
31
+ bun test
32
+ bunx tsc --noEmit
33
+ bun run build
34
+ bun bin/musememory.ts scan-secrets src
35
+ curl -sI http://127.0.0.1:3899/ | rg -i '(content-security-policy|x-frame-options|x-content-type-options|referrer-policy)'
36
+ # viewport + shell audit via the Playwright script used in PR 1
37
+ ```
38
+
39
+ ## Scoring
40
+
41
+ `S = 0.40·Correctness + 0.25·MinimalDiff + 0.20·EdgeCases + 0.15·Cleanliness`. Pass: `S >= 9.0`, zero blockers, all criteria true.
@@ -0,0 +1,36 @@
1
+ # ITERATION LEDGER — Wave 23 PR 4–6
2
+
3
+ > Contract: `GAUNTLET_JOB_CONTRACT.md`. Budget 2 rounds; Round 1 audit, fix round applied.
4
+
5
+ ## Round 1 — audit (2026-11-08)
6
+
7
+ - **Gate**: green. 1471/0, tsc clean, build 434 modules, headers 4/4, 375/768/1280 no overflow, cache MISS→HIT, secret scan clean.
8
+ - **Fresh Critic: 7.35/10 — FAIL**, criterion 4 false:
9
+ - **B1** wire backed up only `detected.configPath`; `claude-json` also rewrites `~/.claude/settings.json` with no backup; backup failures were swallowed; fixed `.bak` name overwrote the pristine copy; `id:"all"` wrote every agent with zero backups; XDG divergence.
10
+ - **B2** projection cache invalidated only by in-process POSTs, so external writes were invisible until a UI POST; read-only POSTs (`/api/search`, `/api/cognition/why`) invalidated unnecessarily.
11
+ - **B3** unwire unknown agent returned 200 `success:false`; the client flashed success on any 200; harness opt-in was a silent client constant.
12
+ - **B4** 44×44 claim was contradicted by bare `.btn-icon` copy buttons and a 24px chip override.
13
+ - Non-blocking: agents detection on every load (sync `$HOME` sweep), source-grep-only tests, missing count assertions.
14
+
15
+ ## Fix round (branch `fix/wave23-gauntlet`)
16
+
17
+ - Wire: rejects `id:"all"`; typed unknown-agent 404 for wire and unwire; backs up every target the write can touch (`~/.claude.json` + `~/.claude/settings.json`, XDG-aware via the detector path); timestamped backups that never overwrite; backup failure aborts the request with 500; response carries the backup paths.
18
+ - Cache: key includes directory + DB mtime freshness, so external writes miss; version bump restricted to an explicit mutating-route allowlist.
19
+ - Client: explicit confirm before wiring; only flashes success when `data.success === true`; failure shows the report message; backup path surfaced.
20
+ - CSS: 44px applies to every phone control (`btn-icon`, chips, buttons, inputs), 24px chip override removed.
21
+
22
+ **Verification**: `bun test` **1471 pass / 0 fail**, tsc clean, build 434 modules, secret scan clean, cache MISS→HIT, 375/768 targets 44×44.
23
+
24
+ Status: **CAPPED** — fixed after the only critic round (budget 2); no second critic. Code review follows.
25
+
26
+ ## Code review — diff mode (Linus style)
27
+
28
+ Verdict: **REQUEST-CHANGES** on the gauntlet fix commit. Findings and resolution:
29
+
30
+ - **CR1 (blocking)** `freshnessToken` probed only `<memoryDir>` and a hardcoded `memory.db`, so WAL commits (`memory.db-wal`) and the `memories/` mirror were invisible; a failed stat collapsed to `0`. Fixed: probe `dir`, `getStorageLayout(dir).memoriesDir`, `dbPath`, `dbPath-wal`, `dbPath-journal`; a missing path contributes `"-"`, never a fake zero.
31
+ - **CR2 (blocking)** neither new cache behavior had a test, and the fail-loud backup path was unverified. Added: read-only POST (`/api/cognition/why`) stays `HIT`; an external `propose` through a second open store yields `MISS` and the new memory; an unwritable backup directory returns 500 and leaves the config without a memory server.
32
+ - **Doc drift** the contract said "any UI POST" while the packet scored a mutation allowlist. Both now say: mutating POST or external WAL/dir change → `MISS`; read-only POSTs stay `HIT`. The harness row now names the confirm dialog as the consent surface.
33
+ - **Accepted nitpicks**: invalidation inverted to a read-only set (forgotten routes miss, never stale), backup names carry a monotonic counter, all backup paths are surfaced to the user.
34
+ - Noted, not changed in this branch: unwire leaves `allowedTools` grants; `.bak` files accumulate; mesh projections have no freshness signal.
35
+
36
+ **Post-review gate**: `bun test` 1471/0, tsc clean, build 434 modules, secret scan clean.
@@ -0,0 +1,13 @@
1
+ # ACCEPTANCE PACKET — Waves 24–25
2
+
3
+ **Status: `CAPPED`** — the diff review returned REJECT and all blocking findings were fixed and re-gated; there was no second review round. Website visual verification is **N/A** because the repository's Astro prerender fails on its own `cookie` dependency before page generation.
4
+
5
+ ## Receipts
6
+
7
+ - `bun test` 1488 / 0 (226 files)
8
+ - `tsc --noEmit` clean
9
+ - `bun run build` 434 modules
10
+ - `scan-secrets src` clean
11
+ - Playbook safety rails survive MCP step-only updates; corrupt store fails loud and stays byte-identical; episode ids unique; bi-temporal offsets parsed; CLI honours `--dir`.
12
+
13
+ Residual debt: `TECHNICAL_DEBT-wave24-25.md` (wiring episodes/temporal/decay, Astro cookie interop, playbook execution semantics).
@@ -0,0 +1,28 @@
1
+ # ITERATION LEDGER — Waves 24–25 (2026-11-08)
2
+
3
+ ## Automated gate
4
+
5
+ - `bun test`: 1488 pass / 0 fail (226 files)
6
+ - `tsc --noEmit`: clean
7
+ - `bun run build`: 434 modules
8
+ - `scan-secrets src`: clean
9
+ - Website visual gate: **N/A** — `astro build` fails in Astro's own prerender import (`cookie` CommonJS named export `parseCookie`) before page generation; Vite entrypoints compile. Not caused by this diff; blocks rendering `agents.astro` and `playground.astro`.
10
+
11
+ ## Diff review (Linus style) — REJECT, then fixed
12
+
13
+ Findings and resolution:
14
+ - **B1** MCP updates synthesized `[]` for absent arrays, erasing playbook safety rails. Fixed: arrays are spread only when present; MCP resolves title→id before updates; test asserts rails survive a step-only update.
15
+ - **B2** corrupt `playbooks.json` read as empty and was overwritten. Fixed: `PlaybookStoreError` on invalid/non-array JSON; CLI returns 1; MCP returns a tool error; test asserts the file is left byte-identical.
16
+ - **RC1** CLI printed the pre-outcome snapshot. Fixed: print the updated record.
17
+ - **RC2** title was the write identity. Fixed: updates key on `id` (with title→id resolution at the MCP boundary); same-titled playbooks coexist.
18
+ - **RC3** CLI ignored `--dir`/`--global` and treated `--run` as list. Fixed: dir/global resolution, `--run`/`--show` aliases.
19
+ - **RC4/RC5** episode ids collided within a second; `test` preempted goal. Fixed: per-session sequence ids; kind-first and anchored phase patterns.
20
+ - **RC8** timestamps compared as strings. Fixed: epoch parsing, invalid timestamps throw, `ended_at` fallback removed.
21
+ - **RC9** step shape/goal unvalidated. Fixed: non-empty goal and per-step action validation.
22
+ - **RC10** benchmark page commands/wording were wrong. Fixed: `claims:check`, real CLI benchmark command, single-value claims semantics, descope note.
23
+ - **RC11** playground claimed schema parity. Fixed: copy says four-column subset.
24
+ - **RC6/RC7** `episodes`, `temporal`, `decay` have no production callers. Documented as scaffolding in `TECHNICAL_DEBT-wave24-25.md` and ticket-plan notes.
25
+
26
+ ## Status
27
+
28
+ **CAPPED** — fixed after the single review round; no second reviewer. Visual/a11y gate remains blocked by the Astro prerender issue.
@@ -0,0 +1,7 @@
1
+ # ACCEPTANCE PACKET — site build + Wave 25 wiring
2
+
3
+ **Status: CAPPED.** Audit mode returned REQUEST-CHANGES; every blocking finding was fixed and re-gated. No second audit round.
4
+
5
+ Receipts: tests 1487/0; tsc clean; build 434 modules; secret scan clean; site build 6 pages; site QA 17/17 SHIP.
6
+
7
+ Residual: failure observations (`source: test`) still classify as verification in episodes; `asserted_at` has no SQL column/index (JS gate only); no second audit.
@@ -0,0 +1,27 @@
1
+ # ITERATION LEDGER — site build + Wave 25 wiring audit (2026-11-08)
2
+
3
+ ## Audit (code-review, audit mode) — REQUEST-CHANGES
4
+
5
+ | Finding | Resolution |
6
+ |---|---|
7
+ | B1 global `cookie` override rewrote express's dependency and fixed nothing | Override removed; lock regenerated |
8
+ | B2 `patch-astro-cookie.mjs` was cargo-cult and could mask a bad resolution | Script and call sites deleted; Node launcher alone builds |
9
+ | R3 `asserted_at` had readers and no writer | `propose` accepts `asserted_at`; `memory_write` schema declares it; persistence tested |
10
+ | R4 two absent-value semantics | `temporal.ts` and `retrieval.ts` now both treat absent as "no belief constraint" |
11
+ | R5 briefing test used type-illegal observation sources | Fixtures use `manual`/`test`; failure provenance still classified as verification (debt) |
12
+ | R6 briefing truncated observations before episodes | Episodes built over the full stream, then sliced |
13
+ | R7 "wired" claims were one shared string | Ticket/debt notes now state per-ticket facts |
14
+ | D6 site prerender open in debt | Struck as fixed |
15
+
16
+ Also updated `.agents/standards/frontend-astro.md` (Astro 7.4.7 + Node launcher note).
17
+
18
+ ## Gate
19
+
20
+ - `bun test`: 1487 pass / 0 fail (227 files)
21
+ - `tsc --noEmit`: clean
22
+ - `bun run build`: 434 modules
23
+ - `scan-secrets src`: clean
24
+ - `node scripts/astro.mjs build`: 6 pages
25
+ - `site:qa`: 17/17 passed, VERDICT SHIP
26
+
27
+ Status: **CAPPED** — fixes applied after the audit; no second audit round.
@@ -0,0 +1,7 @@
1
+ # ACCEPTANCE PACKET — Wave 27 hardening
2
+
3
+ **Status: CAPPED.** Code review and muse-security both rejected the first cut; blockers were fixed and re-gated. No second critic round.
4
+
5
+ Receipts: 1521/0 tests; tsc clean; build 434 modules; secret scan clean. Crypto: GCM AAD + key id, Ed25519 domain-separated signatures, strict tenant/branch names, 0600/0700 files, overlay merge through the three-way resolver with audit.
6
+
7
+ Residual: `TECHNICAL_DEBT-wave27.md` (chain truncation/TOFU, key rotation, semantic merge poisoning, scope:client not wired, overlay GC, branch identity from store.dir).
@@ -0,0 +1,36 @@
1
+ # ITERATION LEDGER — Wave 27 (2026-11-09)
2
+
3
+ ## Critics
4
+
5
+ - **code-review audit / gauntlet**: REJECT, 4.5/10 (Correctness 4, Diff 6, Edge 4, Architecture 4).
6
+ - **muse-security audit**: 8 High, 9 Medium, 0 Critical; headline claims overstated.
7
+
8
+ ## Fixed in this round
9
+
10
+ | Finding | Fix |
11
+ |---|---|
12
+ | Enclave `safeName` collisions | Strict `[A-Za-z0-9._-]` validation; reject instead of rewrite |
13
+ | Envelope metadata not authenticated | GCM AAD over version/key_id/client/division; request metadata asserted |
14
+ | Master-key TOCTOU | `wx` creation + EEXIST re-read; 64-hex env only; `key_id` in envelope/AAD |
15
+ | Enclave path traversal (`..`) | Name validation + containment by construction |
16
+ | Enclave permissions | 0700 dirs, 0600 envelopes; key 0600 |
17
+ | Branch name collisions | Reversible base64url filenames; `meta.branch` identity check |
18
+ | Overlay path collision with memory versioning | Moved to `.memory/overlays/` |
19
+ | Overlay merge lost updates | Captured `base_entries`; merge now calls `mergeMemories3Way` (T-439 wiring) |
20
+ | Overlay merge non-atomic / unaudited | Whole-batch validation + `withStoreLock` + per-entry `overlay_merge` audit + `archiveMemory` for deletions |
21
+ | Overlay CLI had no write path | `overlay set` / `overlay rm` + audit |
22
+ | Detached HEAD treated as branch "HEAD" | `git symbolic-ref`; null on detached, requires `--branch` |
23
+ | `overlay list` ignored `--branch` | Uses resolved branch |
24
+ | Attest keygen unsafe default/overwrite | Defaults to `~/.config/musememory/keys` (0700), refuses overwrite unless `--force`, audit event |
25
+ | Canonical JSON collisions | Rejects unsafe numbers, non-plain objects; omits undefined keys; domain separator |
26
+ | Chain semantics | Empty chain rejected; version/algorithm signed and checked; `verify-chain` CLI |
27
+ | merge3 fail-open/manual contract | Exit 1 on conflicts unless `--allow-conflicts`; TTY guard; stderr prompts; 0600 output; secret scan |
28
+ | Enclave CLI type/traversal/content | Enum validation, name validation, `--file`/stdin |
29
+
30
+ ## Gate
31
+
32
+ - `bun test` 1521 pass / 0 fail (240 files)
33
+ - `tsc --noEmit` clean; build 434 modules; secret scan clean
34
+ - New regression tests: name collisions, AAD relabel, empty/tampered chains, overlay 3-way conflict, CLI fail-closed, overlay write surface.
35
+
36
+ Status: **CAPPED** — one critic round; residual items in `TECHNICAL_DEBT-wave27.md`.
@@ -1,7 +1,46 @@
1
1
  # 📍 Current Shipped State & Active Invariants
2
2
 
3
- > **Version**: `v3.0.2`
4
- > **Status**: Patch Release — correctness fixes from the cross-file invariant audit, machine-verified published claims, and the website redesign.
3
+ > **Version**: `v3.1.3`
4
+ > **Status**: Wave 29 Landed — Sovereign LifeOS Migration & Complete Decommissioning (T-444 to T-448).
5
+
6
+ ---
7
+
8
+ ## 🧾 Session — Ticket Ledger Renumber & Remainder Audit (2026-11-08)
9
+
10
+ Wave 23's `T-405`–`T-422` collided with the already-landed `T-405` (conflicted injection) and `T-406` (project casing), so that block is now `T-451`–`T-468` across the plan, roadmap and this file. The historical blueprint keeps its original IDs with a translation note; `HANDOFF.md`'s `T-405`/`T-406` are the unrelated landed fixes and were left untouched. Every unchecked ticket was then verified against source: 4 were already implemented (`T-150`, `T-151`, `T-153`, `T-384`) and are now marked done, 15 are partial, 86 are genuinely unbuilt, `T-163` is dropped by principal decision D3, and `T-449`/`T-450` remain filed/deferred. Full evidence table: `.agents/context/ticket-plan.md` → v15. Doc-claim gate re-run green (20/20).
11
+
12
+ ### Wave 23 PR 1 implemented (local, not landed)
13
+
14
+ `T-451`–`T-453` are implemented in the new `src/ui_assets.ts` module and wired through `src/ui.ts`:
15
+
16
+ - **T-451** — the studio now renders a fixed 76px left rail with six numbered sections (`01 OVERVIEW` … `06 ABOUT`), a tools group for the pre-existing views, a warm `#0c0a09` palette, and Archivo Black / JetBrains Mono typography. The rail uses words and numbers, not emoji.
17
+ - **T-452** — the header carries a project / global / mesh segmented switcher that refetches live. `/api/memories`, `/api/stats`, `/api/current`, `/api/wiki`, `/api/user-profile` and `/api/audit` resolve the scope; the global store (`~/.memory`) opens lazily and is never created by a read; mesh results carry `origin_project`. Mutations stay project-scoped and the studio shows a scope banner whenever it is not viewing the project store.
18
+ - **T-453** — CSS, markup and client JS are split out of the old 2,700-line template literal and served from `/assets/studio.css` and `/assets/studio.js` with strong ETags, pre-gzipped buffers, `Vary: Accept-Encoding` and 304 fast paths. The standalone export inlines the same modules.
19
+
20
+ Gate at merge: `bun test` **1451 pass / 0 fail** across 217 files, `tsc --noEmit` clean, `bun run build` 434 modules. **Landed in [PR #337](https://github.com/harshsinghmp/musememory/pull/337) at `d0c9600`** (2026-11-08); `check:landed` → `RESULT: LANDED`.
21
+
22
+ ### Gauntlet run — CAPPED at the 5-round ceiling (2026-11-08)
23
+
24
+ Ran the bounded gauntlet loop against this PR (contract + ledger + packet in `.agents/artifacts/gauntlet-wave23-pr1/`). Five rounds: Fresh Critic scores **5.95 → 7.63 → 7.90 → 8.85 → 7.99**. Both R5 blockers were confirmed closed (mesh-link cache invalidation; scope-generation guards on every scoped fetch); the final critic left only small markup/ARIA/banner defects, which were fixed in the post-ceiling Integrator delta and verified by the gate but not re-critiqued. The packet is explicitly **CAPPED, not a PASS**. Final gate: **1450/0**, tsc clean, build 434 modules, zero overflow at 375/768/1280, 44×44 targets at 375/768, headers 4/4 (HSTS N/A), per-encoding ETags + wildcard 304 + 406 negotiation, secret scan clean. Residual debt (scope-race test, CSP `unsafe-inline`, mesh read-only store minting, duplicated `escapeHtml`, standalone export zeros) is in `TECHNICAL_DEBT.md`.
25
+
26
+ ---
27
+
28
+ ## 🔧 Session — Sync Recovery (2026-11-03)
29
+
30
+ Restored `AGENTS.md` byte-exact from HEAD after an `updateagents` run from the umbrella directory replaced it (and persona files in sibling repos) with three-line adapters. Added `.commandcode/` and `.stversions/` to `.gitignore`, made the Syncthing ignore rules canonical in `~/.dotfiles/syncthing/`, and recorded the workspace-isolation invariant. The engine fix now stops at nested repository roots and refuses umbrella directories; the global install was refreshed. Repo-local recovery for `muse-agents` and `muse-skills` is owned by their respective agents.
31
+
32
+ ---
33
+
34
+ ## 🏛️ Wave 29 — Sovereign Ecosystem Migration & Decommissioning Complete (2026-10-26)
35
+
36
+ All personal identity, telos, operational rules, and hardware terrain scanning migrated into sovereign `musememory` engines, native Vibeguard secret scanning, and de-LifeOSified agent governance. Legacy import tools have been permanently purged from source:
37
+
38
+ - **Sovereign Persona & Store Ingestion (`T-444`)**: Identity, telos, and operational rules synthesized directly into sovereign `~/.memory/USER.md` persona and SQLite store. Legacy tool `import_lifeos.ts` permanently deleted from source.
39
+ - **Native Vibeguard CLI (`T-445`)**: `memory scan-secrets [dir]` standalone zero-dependency secret scanner replacing legacy external scripts (`test/cli_secrets.test.ts`).
40
+ - **Machine Terrain Collector (`T-446`)**: `memory terrain [--out file.md]` compiles deterministic hardware, toolchain, and local agent ecosystem maps into `system.md` (`test/vault_system.test.ts`).
41
+ - **Global Governance De-LifeOSification (`T-447`)**: Removed all 6 legacy imports and paths from `~/.agents/AGENTS.md` and repository standards, binding truth directly to `~/.memory/USER.md` and `memory` MCP.
42
+ - **Sovereignty Decommissioning Gate (`T-448`)**: Enforces zero external legacy imports, confirms legacy tool removal, and passes 100% cleanly in `test/sovereignty_gate.test.ts`.
43
+ - **Golden Sequence Documentation**: Published the complete 4-phase best-practice sequence for using Muse Memory with AI coding agents in `README.md`, `docs/agent-reference.md`, and `docs/cli-reference.md`.
5
44
 
6
45
  ---
7
46
 
@@ -125,15 +164,113 @@ on any blocking failure, so CI runs it. Report:
125
164
 
126
165
  ---
127
166
 
128
- ## ⏭️ Next Up (Post-Wave 22 Focus)
129
- - **Production-Grade Showcase Demo**: Re-record high-fidelity terminal demo video/GIF reflecting v3.0.0 capabilities (failure attribution, HOT.md compounding, memory branch/checkout, MCP context recall) to replace removed legacy demo.
130
- - **Wave 23**: Review next backlog items from `.agents/context/ticket-plan.md` (e.g. Hebbian co-activation retrieval expansion, query-seeded PPR restart set, retrieval weight auto-tuner, and contradiction engine calibration).
131
- - **Consolidate the remaining duplicated tables** (deferred from this session as behaviour-changing; full detail with exact locations in [`docs/roadmap.md`](../../docs/roadmap.md) → *Engineering debt*): the three divergent per-type TTL tables in `src/retention.ts`, the eight separate token estimators, the divergent limit-clamping ceilings across retrieval paths, and the remaining zero-caller exports.
167
+ ## ⏭️ Next Up (Post-Release Focus)
168
+ - **Waves 23–25 are complete.** Next is **Wave 26–29** (`T-432`–`T-443`): AST associative retrieval (`T-432`–`T-435`), branchable/enclave memory (`T-436`–`T-439`), test-driven reinforcement (`T-440`–`T-443`). Site note: unblock the Astro/cookie prerender error before any visual QA on the new pages:
169
+ - Full UI overhaul inspired by Ryoku Rashin (`http://127.0.0.1:3600`): fixed 76px left-rail cyber-minimalist navigation, instant Canvas Graph ↔ Filterable List toggle, 60fps kinetic-settling physics loop, and 52-week activity calendar heatmap.
170
+ - Multi-scope switcher: Project Scope (`./.memory`) vs Global User Scope (`~/.memory`) vs Cross-Project Mesh.
171
+ - Workspace Terrain Maps (`stack.md`, `habits.md`, `ownership.md`, `packages.md`, `repo.md`, `logs.md`) for token-efficient agent orientation.
172
+ - Universal Agents Hub: Auto-discovery, 1-click MCP wiring, and drop-in prompt snippets for 10+ agents (Antigravity, OpenCode, Claude Code, Cursor, Copilot, Hermes).
173
+ - Poster-style About panel with live architectural facts, interactive quick start onboarding, and CLI command deck.
174
+ - Sub-10ms UI serving performance with in-memory SQLite read caching and visibility-based zero-CPU idling.
175
+ - **Production-Grade Showcase Demo**: Re-record high-fidelity terminal demo video/GIF reflecting v3.0.0 capabilities to replace removed legacy demo.
176
+ - **Wave 24 remainder**: `T-316` (Hebbian co-activation edges into write-time `linked_memory_ids` seeding — **unblocked**, dep `T-095` landed; note the ticket premise is partly stale: `T-307` already landed the retrieval-expansion side) and `T-318` (retrieval weight auto-tuner from ROI telemetry — **unblocked**, deps `T-127` + `T-140` both landed). `T-317` (query-seeded PPR restart set) stays **blocked** on `T-178` (graph retrieval A/B gate).
177
+ - **Consolidate the remaining duplicated tables** (deferred from this session as behaviour-changing; full detail with exact locations in [`docs/roadmap.md`](../../docs/roadmap.md) → *Engineering debt*): the three divergent per-type TTL tables (`src/retention.ts` **and** `src/retention/expiry_policy.ts` — only two of the three are in `retention.ts`), the **nine** separate token estimators (across nine files, plus six inline expressions — the collapse is *not* behaviour-neutral, because `src/orchestrator/context.ts` deliberately consumes the pessimistic measure), the divergent limit-clamping ceilings across retrieval paths (**seven** sites in `src/mcp.ts` alone), and the remaining zero-caller exports (twelve genuinely dead; 74 exported with no external caller).
132
178
  - **Remove the legacy `web/` directory** — done in this session. It was a second, hand-written copy of the site that `apps/website/` superseded; keeping it was the same "second copy that gets forgotten" failure mode this session fixed everywhere else.
133
179
 
134
180
  ---
135
181
 
136
182
  ## 🏁 Recently Landed Waves (Verified on `dev`)
183
+ - [x] **Outcome pilot + RC blockers** (2026-11-09) — with/without pilot 2/2 vs 1/2; latency claims corrected to p95 targets; T-450 ADR-008 boundary; overlay GC, branch root identity, enclave put lock.
184
+ - [x] **Evidence + key lifecycle** (2026-11-09) — dogfood benchmark (hit@3 10/10, MRR 0.933, 68% token savings), evidence ledger with 2 quarantined claims, benchmark title-less crash fixed, `enclave keys/prune`, backup drill, runbook.
185
+ - [x] **Enclave key rotation + client-scope descope** (2026-11-09) — versioned keyring, `enclave rotate`, old-key rollback; `scope: client` descoped per ADR-007.
186
+ - [x] **Attestation v2 + merge guard** (2026-11-09) — seq/head/key-id pinning, truncation rejection; semantic merge blocks untrusted lineage, inflation and protected constraints.
187
+ - [x] **Wave 27 hardening** (2026-11-09) — audit-REJECT fixes: strict names, GCM AAD/key id, audited overlay merge via T-439, fail-closed merge3, corrected claims. Gate 1521/0; CAPPED.
188
+ - [x] **Wave 27 (`T-436`–`T-439`)** (2026-11-09) — branch overlays (#377), encrypted enclaves (#378), packet attestations (#379), three-way merge (#380). Tests 1514/0.
189
+ - [x] **Sensitive-read audit + project identity** (2026-11-09) — `read` audit events for `scope: "all"`/untrusted; configured project via env/config/`memory project`.
190
+ - [x] **Code-context security boundary** (2026-11-09) — project-scoped by default, untrusted opt-in, read-time redaction/sanitization, bounded inputs; `muse_memory_for_code` accepts project/include_untrusted.
191
+ - [x] **Unified code resolver** (2026-11-09) — `resolveMemoriesForCode` is the single matcher; pre-flight and PR context adapt it.
192
+ - [x] **Pre-flight surfaces** (2026-11-09) — PreToolUse hook + read-only `muse_preflight` MCP tool; 119 tools.
193
+ - [x] **Wave 26 (`T-432`–`T-435`)** (2026-11-09) — recursive-CTE associative expansion (`T-432`, direct `dev`), pre-flight context (`T-433`, #370), blast-radius risk (`T-434`, #371), anchor-matched auto-recall (`T-435`, #372). Tests 1495/0.
194
+ - [x] **Site build + scaffolding wiring** (2026-11-08) — PR #367 (Node Astro launcher; site:qa 17/17 SHIP) and #368 (briefing episodes, explicit `asserted_at` belief clock in `as_of`, duplicate decay removed).
195
+ - [x] **Wave 24–25 review hardening** (2026-11-08) — PR #366 merged at `a485875`; playbook rail preservation, fail-loud corrupt store, id-keyed updates, unique episode ids, goal-first phases, epoch timestamps, CLI flags, doc honesty. Gauntlet: REJECT → fixed, CAPPED; website visual gate blocked by pre-existing Astro/cookie prerender error.
196
+ - [x] **Wave 24 (`T-423`–`T-426`)** (2026-11-08) — terminal demo script/recipe, vendored sql.js playground, capability-only benchmark matrix, accessible agent demos. PRs #362–#365. Site prerender has a pre-existing Astro/cookie CJS blocker (entrypoints compile).
197
+ - [x] **Wave 25 (`T-427`–`T-431`)** (2026-11-08) — playbooks, episodes, bi-temporal belief windows, reinforced decay, and playbook CLI/MCP commands. PRs #356–#361.
198
+ - [x] **Post-Wave-23 debt sweep** (2026-11-08) — PR #355 merged at `432cf01`: agents discovery cache, backup retention, unwire tool-grant cleanup, mesh freshness bucket.
199
+ - [x] **Wave 23 gauntlet hardening** (2026-11-08) — PR #354 merged at `d2ea59c`; complete config backups (XDG-aware, timestamped, fail-loud), unknown-agent 404s, honest wire reporting, WAL/layout cache freshness, 44px phone controls. Gauntlet: 7.35 critic → REQUEST-CHANGES review → fixed; **CAPPED, not a PASS**. Evidence: `.agents/artifacts/gauntlet-wave23-pr456/`.
200
+ - [x] **Wave 23 PR 6 (`T-466`–`T-468`)** (2026-11-08) — projection cache, hidden-tab pause and the UI performance benchmark. **Wave 23 complete.** PRs #351–#353.
201
+ - [x] **Wave 23 PR 5 (`T-463`–`T-465`)** (2026-11-08) — poster About panel, quick-start cards and searchable command deck. PRs #348–#350.
202
+ - [x] **Wave 23 PR 4 (`T-460`–`T-462`)** (2026-11-08) — agents hub: discovery statuses, one-click wire/unwire with `.bak` backups and harness opt-in, point-any-agent manifest. PRs #345–#347.
203
+ - [x] **Wave 23 PR 3 / `T-459`** (2026-11-08) — PR #344 merged; generation-time redaction plus a token-savings and leak test (`test/vault_terrain.test.ts`).
204
+ - [x] **Wave 23 PR 3 / `T-458`** (2026-11-08) — PR #343 merged at `65113af`; terrain vault split-pane (tree, GEN badges, markdown viewer, REINDEX scanline).
205
+ - [x] **Wave 23 PR 3 / `T-457`** (2026-11-08) — PR #342 merged at `8006427`; deterministic workspace terrain generator and `terrain --workspace` CLI.
206
+ - [x] **Wave 23 PR 2 / `T-455`** (2026-11-08) — PR #340 merged at `05b4fdf`; energy-settling loop with wake hooks, deterministic ring seed, pointer capture.
207
+ - [x] **Wave 23 PR 2 / `T-456`** (2026-11-08) — PR #341 merged at `436d198`; scope-aware activity endpoint, 52-week heatmap and agent session cards.
208
+ - [x] **T-449 test hermeticity** (2026-11-08) — PR #338 merged at `94620895`; `findProjectRoot` no longer adopts `$HOME`/`/` as a project root, doc-link scan skips local sync state, regression test with a fake home. Earlier caller-scan fix merged via #337 (`c0f7aef`). Issue #336 closes.
209
+ - [x] **Wave 23 PR 2 / `T-454`** (2026-11-08) — PR #339 merged at `3e621fa`; instant graph/list toggle with a sortable table, `aria-sort`, and a 100ms debounced filter.
210
+ - [x] **Wave 23 PR 1 (`T-451`–`T-453`)** (2026-11-08) — merged in PR #337 at `d0c9600`; `check:landed` → **LANDED**. Left rail, dual-scope switcher, modular ETag/gzip assets, read-only global/mesh reads, 375/768/1280 verified, 1451/0 at merge. Follow-ups in PR #337's thread: stateful-regex flake fixed (`c0f7aef`), npm Bun CI fallback (`b298beb`). Gauntlet verdict: CAPPED at 7.99 (not a 9.0 PASS) — evidence in `.agents/artifacts/gauntlet-wave23-pr1/`.
211
+ - [x] **Released: v3.1.2** (2026-10-25) — completes the silent-casing fan-out:
212
+ - PR #330 merged at `d7e875b` (*"Release: v3.1.2"*); annotated tag
213
+ [`v3.1.2`](https://github.com/harshsinghmp/musememory/releases/tag/v3.1.2)
214
+ pushed on `d7e875b`; GitHub release published. Back-merge #331 merged at
215
+ `fb8ff75`; `dev` re-synced.
216
+ - `package.json` is `3.1.2`; `[Unreleased]` empty.
217
+ - npm publish still blocked (same E404 as v3.1.0/v3.1.1 — principal-only).
218
+
219
+ - [x] **Released: v3.1.1** (2026-10-24) — the two post-release defect fixes shipped to `main`:
220
+ - PR #324 merged at `5f97870` (*"Release: v3.1.1"*); annotated tag
221
+ [`v3.1.1`](https://github.com/harshsinghmp/musememory/releases/tag/v3.1.1)
222
+ pushed on the release merge; GitHub release published with notes derived
223
+ from the stamped changelog. `package.json` is `3.1.1` and `[Unreleased]`
224
+ is empty again.
225
+ - Governance disclosure: the `main` branch-guard ruleset requires one
226
+ approving review; the merge used `--admin` on the principal's order to
227
+ cut the release (the `test` check was green on the release branch first:
228
+ 1408 / 0 across 213 files).
229
+ - Back-merge reunited `main` with `dev` (PR #325; `dev` push CI green,
230
+ 3·m·12s). Post-merge `check:landed` → **RESULT: LANDED** at `ebf4040`.
231
+ - Standing blocker disclosed again: the `npm-publish` workflow failed on the
232
+ tag with the same E404 as v3.1.0's tag (query history: v3.0.1/v3.0.2
233
+ published fine on Oct 22; v3.1.0 + v3.1.1 both 404 on `PUT musememory@…`,
234
+ so the CI npm token lost owner rights to the package between Oct 22 and
235
+ Oct 24). npm publishing stays **principal-only** (owner credentials + 2FA)
236
+ until the token is repaired.
237
+ - CI false positive filed: the #325 back-merge PR's delivery-gate step
238
+ failed `check-landed --pr --branch main` because the gate greps for an
239
+ *open* PR at the head branch and the run's queue lag let the merge close
240
+ it first (`RESULT: NOT REVIEWABLE` on identical, separately-green
241
+ content). Fence in the gate's head-branch semantics for back-merge PRs.
242
+ - [x] **Fix trains: T-405 + T-406** (2026-10-24) — issues #313/#314, delivered through the gauntlet-loop + code-review engines (contract-frozen scope, blind Fresh Critic, mutation-verified tests):
243
+ - **T-405** ([#313](https://github.com/harshsinghmp/musememory/issues/313)): PR #321 merged at `e30a1b7`. Conflicted memories are now excluded **by default** from every prompt-serving retrieval path — queryContext lifecycle gate (hidden_count-aware, status-scoped-guarded), FTS store gate with the overfetch connective armed iff any post-fetch hide-gate stays active, vector row gate + engine passthrough, ranking candidate veto before scoring, muse-context pool choke point + anchor/route lens strips + constraint projection + withheld notice — all sharing one `includeConflicted` opt-in (`SearchOptions` cascade; MCP `include_conflicted` schema symmetry on both search/memory_recall tools; CLI `--include-conflicted`). The frozen golden recall fixture was deliberately untouched — the eval corpus carries zero conflicted entries (verified, not assumed); new tests use a self-contained corpus (T-143 promotion discipline respected). RED receipts real (conflicted entry served `kept:high_relevance` into `confident_answers`); critic verdict **9.5/10** with a mutation-verified overfetch test. As-of/temporal queries deliberately keep serving state-at-the-time (documented decision).
244
+ - **T-406** ([#314](https://github.com/harshsinghmp/musememory/issues/314)): PR #322 merged at `d3a8f6b`. Project names resolve case-insensitively (`resolveProjectName`/`listProjectNames`/`formatAvailable`, `src/health/resolve.ts`) on all three health surfaces, failing **loud** (CLI exit 1 · MCP isError · Studio 404) with the requested name echoed and the available list; resolved-with-case-diff surfaces the canonical label plus a note naming the requested form; `--json` stdout stays pure JSON (probe-verified). The gate stays a pure exact-canonical reporter — `git diff test/health_project_scope.test.ts` empty. Final critic verdict **9/10**.
245
+ - Full-suite receipts at merge time: `bun test` **1408 pass / 0 fail** (213 files, +13 tests); `tsc --noEmit` clean; claims `1400→1408`; docs links all resolve; secret scan clean; `check:landed:pr` → `RESULT: REVIEWABLE` before both merges, `check:landed` → **`RESULT: LANDED`** after (at `e30a1b7`, then at `d3a8f6b`).
246
+ - **T-406 fan-out** ([#327](https://github.com/harshsinghmp/musememory/issues/327)): PR #328 merged at `17c0abe`. Same silent-casing defect closed on the remaining 7 audit surfaces — MCP `memory_anchor_audit`, `memory_drift_audit`, `muse_bug_clusters`, `muse_tech_debt` + studio `/api/cognition/anchors`, `/api/cognition/debt`, `/api/cognition/clusters` — all routed through the existing `resolveProjectName()` owner; unknown projects now fail loud (MCP tool error · Studio 404) with the available list. Gates/engines stay exact. +17 tests (1425 total, 0 new failures vs the 9 pre-existing env failures on dev).
247
+ - Filed follow-ups (deliberate ledger, see HANDOFF): ambiguous-case wording, Studio client 404 echo, silent-casing fan-out (`muse_tech_debt`, anchor/drift audits, `/api/drift`, `/api/cognition/*`), wikilink hop-gate conflicted filter, `get_context` include_superseded schema-vs-handler mismatch, hybrid-path status plumbing, queryContext superseded-gate status guard.
248
+ - [x] **Released: v3.1.0** (2026-10-24) — Waves 23–26 shipped to `main`:
249
+ - PR #318 merged at `c5a141d` (*"Release: v3.1.0"*); annotated tag
250
+ [`v3.1.0`](https://github.com/harshsinghmp/musememory/releases/tag/v3.1.0)
251
+ pushed on the release commit; GitHub release published with notes
252
+ derived from the stamped changelog. `package.json` is `3.1.0` and
253
+ `[Unreleased]` is empty again.
254
+ - Governance disclosure: the `main` branch-guard ruleset requires one
255
+ approving review; the merge used `--admin` on the principal's order to
256
+ cut the release (the `test` check was green first). Disclosed also in
257
+ the handoff.
258
+ - The post-release back-merge reunited `main` with `dev`
259
+ (`fix/showreel-hash-path` lived only on `main` until now; the branch is
260
+ pruned). Gate evidence, quoted: `bun run check:landed` →
261
+ **RESULT: LANDED**; `git merge-base --is-ancestor HEAD origin/dev`
262
+ exits 0 at `c5a141d`; `bun test` re-run on the merged tree: 1393 / 0.
263
+ - [x] **Wave 26: The Landing Gate — a commit is not a delivery**:
264
+ - On 2026-10-22 two complete waves (T-320, T-321) were committed to a local branch and a local `dev`, and the session ended. No push, no PR, no CI run — while the close-out document described them as landed, under a heading reading *"Recently Landed Waves (Verified on `dev`)"*. `dev` did not contain them; `origin/dev` had already moved to v3.0.2, so the branch had diverged and the work was invisible to review and to the release. **The code was correct and every test was green. The failure was a false claim about the remote that nothing had ever checked.**
265
+ - `scripts/check-landed.ts` is now the machine-checkable form of that claim: work is **landed** only when it is reachable from the integration branch **on the remote**, and until then it is **local**. The gate verifies `HEAD` is an ancestor of `origin/dev` and that nothing is unpushed, exits non-zero otherwise, and prints the exact commands and SHAs so a report can quote the evidence rather than assert it. A pre-review mode (`--pr --branch <name>`) verifies a branch is pushed, has an open PR, and has no failing checks. Wired into CI for both `pull_request` and `push`.
266
+ - `.agents/standards/landing-gate.md` (routed from `AGENTS.md` as core invariant #7) restricts the vocabulary — *landed / shipped / merged / released / "verified on `dev`"* may only be used after the gate exits 0 — and requires every final report to carry a Remote State block. The closeout DOX pass runs the gate before writing under a "Landed Waves" heading.
267
+ - `.agents/artifacts/WORKTREE-LEASE.md` — the file was referenced by an earlier handoff but did not exist. It now defines the shared-checkout lease (taken before git mutations, released **after the push**, not the commit) and the staging rule: **never `git add -A` in a checkout another agent may be writing.** A broad `git add` silently absorbs a concurrent agent's in-progress edits into your commit, producing a commit whose message describes work that is not in it — which happened for real on 2026-10-22 and was caught only because a subagent reported it.
268
+ - [x] **Wave 25: T-321 Surface Completion**:
269
+ - A verification audit of the Wave 24 close-out found the *functions* took `options.project` but five *surfaces* never plumbed it: `memory_anchor_audit` and `memory_drift_audit` (MCP), and `/api/drift`, `/api/cognition/clusters`, `/api/cognition/debt` (studio). A user could scope the health gate but **not** an anchor or drift audit — the capability existed one layer below the surface and was unreachable. All five now take the filter, and the studio gained a labelled **Project Scope** control in the header that drives the health, drift, bug-cluster and technical-debt fetches, seeds from the URL query string (so a scoped link is shareable and reloadable), and renders the report's `scope` back to the user in the CLI's own wording. Cover: `test/health_project_scope_surfaces.test.ts` (7 cases) alongside the original `test/health_project_scope.test.ts` (9 cases).
270
+ - [x] **Wave 24: Per-Project Health Gate Scope**:
271
+ - `T-321`: The health gate, the bug-clustering scanner and the technical-debt scanner all read the whole store, and the report was then labelled with `entries[0].project` — whichever memory happened to sort first. A number covering every project was presented as one project's health, and there was no way to ask for a single project's health at all. `listForProject()` (`src/store.ts`) is now the single owner of the "filter by project, or take the whole store" decision; the gate, the anchor audit, the drift audit, bug clustering and technical debt all take the same `project` option. The report carries a `scope` object (`filter`, `projects`, `entry_count`, `code_scope`), and its `project` label is the requested filter, the sole project present, or `all` — never a guess. Code-side metrics deliberately stay workspace-wide: source code is shared between projects and cannot be attributed to one. Surfaces: `memory health --project P`, a `project` argument on `muse_health`/`muse_tech_debt`/`muse_bug_clusters`, and `?project=` on the studio's `/api/health` (`test/health_project_scope.test.ts`, 9 cases, commits `60b1aa2`, `27bdc81`).
272
+ - [x] **Wave 23: Contradiction Engine Calibration**:
273
+ - `T-320`: The contradiction engine compared two memories by testing seven bare regex pairs against their concatenated title and content, so any two memories containing an "enable"-ish and a "disable"-ish word were flagged as contradictory regardless of subject or context. Measured: **8 of 10** realistic non-contradictory pairs were flagged. Flagging flips *both* memories to `conflicted` — 25 health points each (four false positives fail the store-integrity pillar), removal from every future sync broadcast, and still served into agent prompts. Detection now extracts **polarity claims** (`subject`, `relation`, `target`, `scope`) and opposes claims only about the same subject in a compatible scope; re-probe of the same ten pairs: **0 of 10** flagged. New `src/quality/scope.ts` (canonical scope vocabulary, general qualifier extraction, strong/weak scope classification) and `src/quality/polarity.ts` (claim extraction + comparison); scope is now resolved per claim instead of per entry in `src/quality/invalidation.ts`. Dry-run surfaces: `memory conflicts [--dry-run]` (new CLI, read-only preview of what peer-to-peer sync would flag — the one path that flags automatically), `propose({ checkConflict: true, conflictDryRun: true })`, and `detectConflict(store, candidate, { dryRun: true })`. Calibration fixture `test/calibration/contradiction_calibration.json` (21 labelled pairs) gated at precision and recall ≥ 0.9 (`test/contradiction_calibration.test.ts`, `test/cli_conflicts.test.ts`, commits `18bf4f9`, `dc90539`).
137
274
  - [x] **Wave 22: Failure Attribution, Negative Memory Mining & Retrieval Compounding**:
138
275
  - `T-313`: Scoped failure attribution matching code anchors (`file_path`, `symbol_name`), affected paths, and reproduction commands; session-deduplicated strikes (max 1/session); dual-decay strike counter (2 clean runs or 30 days without failure); constitutional immunity protecting constraints, timeless memories, and salience $\ge 0.95$ from auto-dispute (`test/failure_attribution.test.ts`, commit `41feec4`, `3b270b5`).
139
276
  - `T-144`: Trajectory fix-pair mining discovering negative memories (`AVOID: ...`) from *Error ➔ Remediation ➔ No Recurrence* observation sequences with affinity filters excluding non-mutating commands (`ls`, `cat`), dynamic line number normalization, Vibeguard secret scrubbing, and session volume cap of max 3 candidates (`test/fix_pair_mining.test.ts`, commit `cc4b5c5`).
@@ -332,6 +469,9 @@ Removed remaining competitor product names and external comparison links from we
332
469
  - **Zero External Daemons**: All operations must execute in-process via SQLite (`memory.db`) or flat files. Never depend on background servers.
333
470
  - **Fail Fast**: Throw loudly on secret detection, invalid schema shapes, or unconfirmed supersessions.
334
471
  - **Verification Gate**: Before declaring changes complete, `bun test`, `bun run build`, and `tsc --noEmit` must pass.
472
+ - **Workspace Isolation & Sync Boundary**: Never run repo-mutating scaffolders from a parent directory; nested clones are separate scopes. Never sync `.git` or a live SQLite store (`.memory/`).
335
473
 
336
474
  ## 1. Verified Shipped Reality
475
+ - **2026-10-22**: T-321 per-project health gate scope
476
+ - **2026-10-22**: T-320 contradiction engine calibration
337
477
  - **2026-10-20**: Wave 21: LifeOS Distillation, Mutation Safety & Knowledge Routing (T-050, T-177, T-324)
@@ -27,3 +27,11 @@
27
27
  ### ADR-006: Harness-Independent Hook Installation (Global Standard First)
28
28
  - **Decision**: `memory hooks install` resolves its target as explicit `settingsPath` → explicit `--harness` opt-in → global standard (project `.agents/hooks.json` when a `.agents/` directory exists, otherwise `~/.agents/hooks.json`). A harness path (e.g. `~/.claude/settings.json`) is never auto-selected, and `connectAgent` skips harness-specific agents without an explicit `--harness` opt-in.
29
29
  - **Rationale** (principal ruling, 2026-10-15): the runtime is vendor-neutral — hooks must not couple memory to one harness or create a harness directory unprompted. A pre-existing harness settings file does not imply consent; only `--harness claude` does.
30
+
31
+ ### ADR-007: Client Scope Descoped from the Memory Store
32
+ - **Decision** (2026-11-09): `scope: client` is not added to `MemoryScope`. Client enclaves remain an explicit encrypted vault (`memory enclave create|list|put|rotate`) outside normal retrieval, recall, and MCP surfaces.
33
+ - **Rationale**: wiring a tenant scope through store/retrieval/sync would make cross-tenant disclosure a single filter bug away. The encrypted vault has its own key lifecycle and is auditable at the CLI boundary. Revisit only with a tenant-aware store substrate and per-client key rotation tests.
34
+
35
+ ### ADR-008: Agent Workspace Tracking Boundary (T-450)
36
+ - **Decision** (2026-11-09): keep `.agents/standards/`, `.agents/skills/`, `.agents/context/`, `.agents/brand/`, `.agents/artifacts/` and `.agents/research/` tracked. Ignore new ephemeral state under `.agents/plans/`, `.agents/archive/`, `.agents/worktree-leases/` and `.agents/scratch/`. Already-tracked files stay tracked for history; the rule applies to new files.
37
+ - **Rationale**: standards, skills, decisions, evidence and audit artifacts are collaborator-facing truth. Plans, leases and scratch are per-agent working state that causes churn and merge noise. Removing already-tracked history would break links in prior tickets, so the boundary moves forward only.
@@ -181,7 +181,7 @@ Currently, Muse Memory excels at **Semantic Memory** (facts, rules, ADRs, prefer
181
181
  #### B. Multi-Tenant Agency Enclaves (`scope: client`)
182
182
  - Tailored for Harsh's agency model with 4 internal divisions: Sol, Jasper, Crew, Nexus.
183
183
  - **Isolation Rule**:
184
- - `scope: client`: Enclave isolated per client ID (`client_id: "client-acme"`).
184
+ - `scope: client`: **Descoped** (ADR-007). Enclaves are explicit encrypted vaults; not a store scope.
185
185
  - Client A’s confidential database schemas and domain logic are never exposed to Client B.
186
186
  - Universal architectural principles (`scope: global`) propagate freely across all client workspaces.
187
187
 
@@ -0,0 +1,89 @@
1
+ # Evidence Ledger
2
+
3
+ ## Dashboard
4
+
5
+ | Category | Count |
6
+ |---|---|
7
+ | DECISION | 1 |
8
+ | CLAIM | 5 |
9
+ | STATUS | 1 |
10
+
11
+ | Status | Count |
12
+ |---|---|
13
+ | VERIFIED | 4 |
14
+ | QUARANTINED | 1 |
15
+ | ACTIVE | 1 |
16
+
17
+ **Health score**: 5 / 6 verifiable entries (83%) — one claim is quarantined, not contradicted.
18
+
19
+ ---
20
+
21
+ ### EVD-001 | 2026-11-09 | STATUS
22
+ **Statement**: `memory benchmark` crashed on title-less memories; fixed in the token-budget packing loop.
23
+ **Category**: `STATUS`
24
+ **Confidence**: `[RAW]` — reproduced with `bun bin/musememory.ts benchmark --iterations 5` (TypeError at `item.entry.title.length`), then passed after the null-safe patch.
25
+ **Epistemology**: `[EMPIRICAL]`
26
+ **Evidence**: `src/retrieval/ranking.ts` token estimate; `test/ranking_titleless.test.ts`.
27
+ **Status**: `ACTIVE`
28
+
29
+ ---
30
+
31
+ ### EVD-002 | 2026-11-09 | CLAIM
32
+ **Statement**: On a 34-entry synthetic corpus, retrieval hit the target in the top 3 for 10/10 queries (MRR 0.933, 2.69 ms average, 68% token savings).
33
+ **Category**: `CLAIM`
34
+ **Confidence**: `[RAW]` — scratch benchmark run, output JSON retained in session.
35
+ **Epistemology**: `[EMPIRICAL]`
36
+ **Evidence**: `docs/evidence/2026-11-dogfood.md`; query set and metrics table.
37
+ **Status**: `VERIFIED`
38
+
39
+ ---
40
+
41
+ ### EVD-003 | 2026-11-09 | CLAIM
42
+ **Statement**: On the real 799-memory store, the benchmark reports FTS5 p50 12.81 ms, context assembly p50 15.64 ms, and 99% token compression.
43
+ **Category**: `CLAIM`
44
+ **Confidence**: `[RAW]` — `bun bin/musememory.ts benchmark --iterations 10`.
45
+ **Epistemology**: `[EMPIRICAL]`
46
+ **Evidence**: benchmark table in `docs/evidence/2026-11-dogfood.md`.
47
+ **Status**: `VERIFIED`
48
+
49
+ ---
50
+
51
+ ### EVD-004 | 2026-11-09 | CLAIM
52
+ **Statement**: The engine targets p95 latency: hot cache < 250 µs, FTS5 < 50 ms, context < 50 ms.
53
+ **Category**: `CLAIM`
54
+ **Confidence**: `[RAW]` — 50-iteration benchmark: 176.25 µs, 15.66 ms, 26.69 ms.
55
+ **Epistemology**: `[EMPIRICAL]`
56
+ **Evidence**: `docs/evidence/2026-11-dogfood.md`; benchmark `[TARGET]` line.
57
+ **Status**: `VERIFIED` — the earlier "< 15 ms" claim was a p50 value mislabeled as a bound; it has been corrected.
58
+
59
+ ---
60
+
61
+ ### EVD-005 | 2026-11-09 | CLAIM
62
+ **Statement**: Muse Memory improves coding-agent task success.
63
+ **Category**: `CLAIM`
64
+ **Confidence**: `[INFER]` — plausible from retrieval quality, but no with/without task-outcome study exists.
65
+ **Epistemology**: `[SPECULATIVE]`
66
+ **Evidence**: none yet; retrieval evidence only (EVD-002/003).
67
+ **Status**: `QUARANTINED` — a 2-task pilot (EVD-007) is suggestive, not sufficient.
68
+
69
+ ---
70
+
71
+ ### EVD-006 | 2026-11-09 | DECISION
72
+ **Statement**: Before starting Wave 28, fix the benchmark defect, record evidence, harden the enclave key lifecycle, then cut a release candidate.
73
+ **Category**: `DECISION`
74
+ **Confidence**: `[RAW]` — based on EVD-001 through EVD-005.
75
+ **Epistemology**: `[EMPIRICAL]`
76
+ **Options considered**: (a) continue feature waves; (b) evidence + security + release gate; (c) release immediately without evidence.
77
+ **Trade-offs**: (b) delays new features but converts unverified claims into measurable ones and protects client data.
78
+ **Evidence**: this ledger + `TECHNICAL_DEBT-wave27.md`.
79
+ **Status**: `ACTIVE`
80
+
81
+ ---
82
+
83
+ ### EVD-007 | 2026-11-09 | CLAIM
84
+ **Statement**: In a 2-task pilot, an agent with memory passed 2/2 hidden tests; the same model without memory passed 1/2 (missed the 32-character tag cap).
85
+ **Category**: `CLAIM`
86
+ **Confidence**: `[RAW]` — hidden Bun tests run against both fixture implementations.
87
+ **Epistemology**: `[EMPIRICAL]`
88
+ **Evidence**: `docs/evidence/2026-11-outcome-pilot.md`.
89
+ **Status**: `VERIFIED` — pilot only (n=2, single run).
@@ -13,7 +13,7 @@
13
13
  | [`product.md`](./product.md) | Product scope, the live MCP tool matrix, the 7 task profiles, the CLI surface, and the trust gates an agent must assume | Understanding user commands, capabilities, and MCP protocols |
14
14
  | [`architecture.md`](./architecture.md) | Dual-Scope storage (`.memory/`), SQLite DB, retrieval scoring formula, and file layout | System design, file locations, state machine, and data flow |
15
15
  | [`brand.md`](./brand.md) | Persona profiles (`USER.md` archetypes), voice, and presentation rules | Writing prompts, terminal output copy, and user documentation |
16
- | [`current.md`](./current.md) | Current shipped state (**v3.0.2**), test coverage, and active constraints | Before starting work on bugs, features, or refactors |
16
+ | [`current.md`](./current.md) | Current shipped state (**v3.1.0**), test coverage, and active constraints | Before starting work on bugs, features, or refactors |
17
17
  | [`decisions.md`](./decisions.md) | Locked architectural decisions (zero-daemon, file-backed SQLite, atomic I/O) | Evaluating technical choices or refactors |
18
18
  | [`roadmap.md`](./roadmap.md) | Planned improvements, ecosystem expansions, and backlog | Scoping new capabilities |
19
19
  | [`ticket-plan.md`](./ticket-plan.md) | Detailed ticket plan for the next work waves | Planning a specific wave of work |
@@ -53,7 +53,7 @@
53
53
  - **Git-Aware Branchable Memory Overlays (`memory branch`)**:
54
54
  - Branch-isolated working memory overlays that mirror git branch lifecycles (`feature/*`, `fix/*`).
55
55
  - Automated `memory branch-merge` command with interactive semantic contradiction resolution when merging feature branches into `main`.
56
- - **Agency Multi-Tenant Enclaves (`scope: client`)**:
56
+ - **Agency Multi-Tenant Enclaves** (`scope: client` descoped — ADR-007; vaults are explicit):
57
57
  - Cryptographically isolated client memory vaults tailored for multi-client agency delivery (Sol, Jasper, Crew, Nexus).
58
58
  - Enforces zero cross-client knowledge contamination while allowing global engineering invariants (`scope: global`) to propagate safely.
59
59
  - **Zero-Knowledge Memory Attestation**:
@@ -167,7 +167,7 @@
167
167
  |---|---|---|
168
168
  | **Speed & Observability** | ✅ Shipped (sub-2ms, <50µs hot cache, 527 tests) | R25 (--include-abstract, --scope) |
169
169
  | **Hands-free hooks** | ✅ 3/6 events shipped (GAP-2) | R24 (full plugin registry) |
170
- | **Trust gates** | ✅ Write-time verify + recall-time freshness gate (GAP-1, GAP-3) | R23 (extend to multi-repo) |
170
+ | **Trust gates** | ✅ Write-time verify + recall-time freshness gate (GAP-1, GAP-3) + calibrated contradiction engine (T-320) | R23 (extend to multi-repo) |
171
171
  | **Version control** | ⚠️ No branch-aware memory | R23 (memory branch/checkout/blame) |
172
172
  | **Compounding** | ✅ 7-state lifecycle + archival ladder | R23 (access-weighted retention, half-life decay) |
173
173
  | **Team/SaaS** | ⚠️ Not yet built | R26 (pricing page, Plausible, SaaS prototype) |
@@ -379,3 +379,12 @@ Exploded ticket plan: `.agents/context/ticket-plan.md` (269 tracked tickets, 21
379
379
  - `T-153`: Multi-DB topology (shared team store + personal DBs)
380
380
  - `T-387`: Client configuration recipes & shared+personal scoping governance
381
381
 
382
+ 9. **Wave 23: Dashboard Overhaul, Workspace Terrain Maps & High-Speed Agent Hub (v3.1.0 Roadmap)**
383
+ - `T-451`–`T-453`: Cyber-minimalist left-rail poster navigation shell, dual-scope switcher (`project` | `global` | `mesh`), and sub-10ms UI static route serving
384
+ - `T-454`–`T-456`: Memory Studio 2.0 with instant Canvas Graph ↔ Filterable List toggle, 60fps kinetic-settling physics loop, and 52-week activity calendar heatmap
385
+ - `T-457`–`T-459`: Workspace Terrain Generator (`stack.md`, `habits.md`, `ownership.md`, `packages.md`, `repo.md`, `logs.md`) & split-pane markdown reader with scanline reindexing
386
+ - `T-460`–`T-462`: Universal Agents Hub with live auto-discovery (Antigravity, OpenCode, Claude Code, Cursor, Copilot, Hermes), 1-click MCP wiring, and drop-in prompt snippets
387
+ - `T-463`–`T-465`: Poster-style About panel (WHAT, THE PIECES live facts table, PRIVACY guarantee), multi-agent quick start guide, and interactive CLI command deck
388
+ - `T-466`–`T-468`: In-memory SQLite read projection cache, tab visibility sensors for zero idle CPU burn, and headless UI performance benchmark suite
389
+
390
+