Source: Source pull request number: 679 in rohitg00/agentmemory (URL omitted to avoid GitHub cross-reference)
Title: feat: add memory metacognition foundation
Author: RayShark
State: open
Draft: no
Merged: no
Head: RayShark/agentmemory:feat/hermes-memory-fusion @ f6e66a7
Base: main @ 26980a8
Labels: (none)
Changed files: 0
Commits: 0
Created: 2026-05-27T15:01:19Z
Updated: 2026-05-27T15:08:45Z
Closed: (not closed)
Merged at: (not merged)
Original PR body:
Summary
- Add Phase 1 memory metacognition state, policy functions, and deterministic policy query expansion.
- Add shadow-first write candidates plus readback verification without automatic durable writes.
- Expose 8 authenticated REST endpoints for policy, write candidates, and readback; update REST endpoint counts to 132.
Scope notes
- No MCP tools are added in this phase.
- Policy suggestions remain deferred to Phase 2.
- Shadow candidate approval only changes candidate status; it does not call
mem::remember.
Related
- Related to Hermes integration context in #107.
- Related Hermes follow-ups: #465 and #665.
- Inspired by RayShark/hermes-patches memory metacognition and shadow write pipeline.
Testing
npm test -- test/api-memory-metacognition.test.ts test/consistency.test.ts test/memory-policy.test.ts test/memory-policy-types.test.ts test/write-candidates.test.ts test/readback.test.ts
npm run build
env HOME="$(mktemp -d)" npm test (113 files, 1192 tests)
git diff --check
Summary by CodeRabbit
-
New Features
- Memory policy management system with query expansion and preflight rules
- Write candidate generation pipeline for intelligent memory suggestions
- Readback verification to validate memory retrieval accuracy
- Eight new REST API endpoints for policy, write-candidate, and readback workflows
-
Documentation
- Updated API endpoint count from 124 to 132
- Added Memory Metacognition implementation roadmap

Local branch:
Fork PR:
Fork decision:
Verification:
Notes:
Source: Source pull request number: 679 in rohitg00/agentmemory (URL omitted to avoid GitHub cross-reference)
Title: feat: add memory metacognition foundation
Author: RayShark
State: open
Draft: no
Merged: no
Head: RayShark/agentmemory:feat/hermes-memory-fusion @ f6e66a7
Base: main @ 26980a8
Labels: (none)
Changed files: 0
Commits: 0
Created: 2026-05-27T15:01:19Z
Updated: 2026-05-27T15:08:45Z
Closed: (not closed)
Merged at: (not merged)
Original PR body:
Summary
Scope notes
mem::remember.Related
Testing
npm test -- test/api-memory-metacognition.test.ts test/consistency.test.ts test/memory-policy.test.ts test/memory-policy-types.test.ts test/write-candidates.test.ts test/readback.test.tsnpm run buildenv HOME="$(mktemp -d)" npm test(113 files, 1192 tests)git diff --checkSummary by CodeRabbit
New Features
Documentation
Local branch:
Fork PR:
Fork decision:
Verification:
Notes: