Skip to content

Memory Bridge follow-ups (M1/M2/M3) — v1.8.2-rc.1#77

Merged
Ryfter merged 4 commits into
masterfrom
feature/memory-bridge-followups
Jul 5, 2026
Merged

Memory Bridge follow-ups (M1/M2/M3) — v1.8.2-rc.1#77
Ryfter merged 4 commits into
masterfrom
feature/memory-bridge-followups

Conversation

@Ryfter

@Ryfter Ryfter commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Package 1 of the 2026-07-04 backlog batch (see docs/superpowers/plans/2026-07-04-backlog-execution-handoff.md). Finishes Sprint 5's three tracked Memory Bridge review follow-ups. Spec docs/superpowers/specs/2026-07-04-memory-bridge-followups-design.md, plan docs/superpowers/plans/2026-07-04-memory-bridge-followups.md.

What shipped

  • M1 — routed promotion writes (269e686): Write-PromotionToGrimdex becomes a router behind the existing -Writer seam — scope/kind → the real Grimdex tree (universal/mistakes.md avoid, universal/winners.md prefer, projects/<id>/decision-guidance.md). New pure Get-PromotionWriteTarget + leaf-library Get-MemoryProjectId. Absent/unwritable root, unknown scope, or missing project id → box-private lessons file + warning. A promotion is never lost.
  • M2 — order-stable atomic stamp (22a8711): Set-MemoryPromoted now round-trips touched rows through [ordered] (original field order), preserves untouched AND malformed lines byte-verbatim (the old code silently dropped malformed lines — latent data loss, fixed), and writes temp + Move-Item -Force (atomic, same-volume). Re-stringifies the ts datetime (ConvertFrom-Json trap).
  • M3 — recall --json coverage (4fb024e): empty → valid JSON empty array; single match stays a one-element array; populated shape. Coverage-only, no production change.
  • Docs + bump (ade0ab1): commands/memory-promote.md routing section; plugin 1.8.1 → 1.8.2-rc.1 (plan's stale 1.8.1-rc.1 target corrected — v1.8.1 already shipped this session).

Quality

  • test-memory-lib.ps1 51/51, test-bootstrap.ps1 48/48 green.
  • Opus whole-branch adversarial review: READY TO MERGE, 0 Critical / 0 Important. Hermeticity verified fully closed (no test can reach the real Grimdex/KB/home). Minor follow-ups (non-blocking): default writer derives project id from cwd not journal origin; whitespace-only journal lines skipped (benign for JSONL); unknown-scope → project-tier per documented plan delta.

Spec deltas caught during planning (grounded against the real Grimdex)

  • Spec's universal/lessons.md / projects/<id>/lessons.md don't exist — routed to the real shelf per GRIMDEX.md law Plan 3: Job & phase scaffold + KB foundation #1.
  • Found + fixed the pre-existing malformed-line drop in the journal rewrite.

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings July 5, 2026 00:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Implements the Sprint 5 “Memory Bridge” follow-ups by improving promotion routing into a Grimdex working copy, making promoted stamping safer (atomic, order-stable, and preserving malformed lines), and extending CLI JSON output coverage; includes docs and a plugin version bump to 1.8.2-rc.1.

Changes:

  • Add routed promotion targeting (Get-PromotionWriteTarget + Get-MemoryProjectId) and upgrade Write-PromotionToGrimdex to route into BATON_GRIMDEX_ROOT when available.
  • Rewrite Set-MemoryPromoted to be line-wise, order-stable, and atomic via temp + replace, preserving malformed lines.
  • Extend scripts/test-memory-lib.ps1 coverage for routing, stamping behavior, and recall --json; update command docs and bump plugin version.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
scripts/test-memory-lib.ps1 Adds hermetic tests for promotion routing (M1), atomic/order-stable stamping (M2), and recall --json shapes (M3), including env pinning for BATON_GRIMDEX_ROOT.
scripts/memory-lib.ps1 Implements routed promotion write targeting and updates journal stamping to be atomic and order-stable.
commands/memory-promote.md Documents where promotion writes land when BATON_GRIMDEX_ROOT is set.
.claude-plugin/plugin.json Bumps plugin version to 1.8.2-rc.1.

Comment thread scripts/memory-lib.ps1
Comment thread commands/memory-promote.md
Comment thread scripts/memory-lib.ps1
@Ryfter
Ryfter merged commit fbf0d08 into master Jul 5, 2026
1 check passed
@Ryfter
Ryfter deleted the feature/memory-bridge-followups branch July 5, 2026 02:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants