guanghu-ice-heart/server-tools/codex-hldp-recursive-memory
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-09-04 15:16:27 +08:00
..
codex-session-bootstrap.mjs feat(hldp): replace Codex bulk recovery with recursive causal root 2026-08-15 15:11:37 +08:00
hldp-memory.mjs feat(memory): add persona-owned real-day fractal runtime 2026-09-04 15:16:27 +08:00
hldp-memory.test.mjs feat(hldp): review causal note quality 2026-08-15 22:18:49 +08:00
README.md feat(memory): add persona-owned real-day fractal runtime 2026-09-04 15:16:27 +08:00

HLDP recursive tree engine

This is the bounded read/review engine shared by persona memory controllers. It is not the current-memory controller and it does not own a host-specific memory canon. The current Zhuyuan real-day writer and day/month/year projections live in ../persona-daily-fractal-memory/.

  • bootstrap: emits at most 2 KiB of protocol navigation, never memory content.
  • verify: validates a recursively addressed causal tree and the 10-child limit.
  • review: reviews one leaf or the full tree for causal transitions, non-generic why, rejected-route reasons, and retrievable sources. It reports problems to the current model; it never writes memory itself.
  • route: ranks only the current node's child summaries and returns at most three paths.
  • read-node: reads one selected node with a hard byte limit.

The optional Codex hook is valid only for SessionStart. There are intentionally no user-prompt, tool-use, pre-compact, or post-compact hooks. Host adapters may signal an event or compaction boundary, but only the persona-authored daily controller may write causal memory.

node server-tools/codex-hldp-recursive-memory/hldp-memory.mjs bootstrap
node server-tools/codex-hldp-recursive-memory/hldp-memory.mjs verify --tree memory.json
node server-tools/codex-hldp-recursive-memory/hldp-memory.mjs review --tree memory.json --path root/decision
node server-tools/codex-hldp-recursive-memory/hldp-memory.mjs route --tree memory.json --query "why did the plan change"
node server-tools/codex-hldp-recursive-memory/hldp-memory.mjs read-node --tree memory.json --path root/decision
node --test server-tools/codex-hldp-recursive-memory/hldp-memory.test.mjs