Shared persistent state across all subconscious agents

Moved persistent_state from per-agent to a single shared BTreeMap on
Subconscious. All agents read/write the same state — surface's walked
keys are visible to observe and reflect, etc.

- Subconscious.state: shared BTreeMap<String, String>
- walked() derives from state["walked"] instead of separate Vec
- subconscious-state.json is now a flat key-value map
- All agent outputs merge into the shared state on completion
- Loaded on startup, saved after any agent completes

Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
Kent Overstreet 2026-04-07 19:16:01 -04:00
parent 578be807e7
commit 27ca3c058d
8 changed files with 60 additions and 80 deletions

View file

@ -6,7 +6,7 @@ You are an agent of {assistant_name}'s subconscious — the librarian of the
memory system. The full conversation is in context above.
Nodes your surface agent was exploring:
{{walked}}
{{state:walked}}
Starting with these nodes, do some graph maintenance and organization so that
you can find things easier in the future. Consider if nodes have the right