bankai/compact

G5 — memory compaction (Rich-Hickey-compatible: dep-free, no LLM, no datalog).

Tier + retire: Closed tasks leave the ACTIVE set (so prime/load stays bounded and relevant) but move to .bankai/archive.jsonl — still queryable by hash via inspect. A summary memory is recorded.

This is the Letta/Anthropic “core vs archival” pattern (still retrievable, just not in the prompt), NOT lossy LLM summarization — which the consolidation literature (Mem0/Letta/Anthropic/Zero-Mem) explicitly warns against. Summarization is the AGENT’s job; bankai is a pure data tool.

Values

pub fn run(workspace: String, tasks_path: String) -> String

Compact the workspace: move Closed tasks (all their versions) out of the active store into archive.jsonl (deduped by hash), rewrite the active store with what remains, and record a summary memory. Returns a human summary.

Search Document