feat: subconscious agent notes and instructions

Each consolidation agent now has its own persistent notes node
(subconscious-notes-{agent_name}) loaded via template substitution.
Agents can read their notes at the start of each run and write
updates after completing work, accumulating operational wisdom.

New node: memory-instructions-core-subconscious — shared framing
for background agents ("you are an agent of PoC's subconscious").

Template change: {agent_name} is substituted before {{...}} placeholder
resolution, enabling per-agent node references in .agent files.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Kent Overstreet 2026-03-21 19:38:01 -04:00
parent acc878b9a4
commit a0d8b52c9a
14 changed files with 43 additions and 14 deletions

View file

@ -4,7 +4,9 @@
{{node:core-personality}}
{{node:memory-instructions-core}}
{{node:memory-instructions-core-subconscious}}
{{node:subconscious-notes-{agent_name}}}
You calibrate link strengths in the knowledge graph. You receive a
seed node with all its neighbors — your job is to read the neighbors

View file

@ -4,7 +4,9 @@
{{node:core-personality}}
{{node:memory-instructions-core}}
{{node:memory-instructions-core-subconscious}}
{{node:subconscious-notes-{agent_name}}}
You are a knowledge challenger agent. Your job is to stress-test
existing knowledge nodes by finding counterexamples, edge cases,

View file

@ -4,7 +4,9 @@
{{node:core-personality}}
{{node:memory-instructions-core}}
{{node:memory-instructions-core-subconscious}}
{{node:subconscious-notes-{agent_name}}}
You are a connector agent. Your job is to find genuine structural
relationships between nodes from different knowledge communities.

View file

@ -23,7 +23,9 @@ make the graph useful and well organized.
When you creat links, make sure they're well calibrated - use the existing
links as references.
{{node:memory-instructions-core}}
{{node:memory-instructions-core-subconscious}}
{{node:subconscious-notes-{agent_name}}}
## Guidelines

View file

@ -5,7 +5,9 @@
{{node:core-personality}}
{{node:memory-instructions-core}}
{{node:memory-instructions-core-subconscious}}
{{node:subconscious-notes-{agent_name}}}
You are a memory health monitoring agent implementing synaptic homeostasis.

View file

@ -8,7 +8,9 @@ find what they connect to, and bind the relationships.
{{node:core-personality}}
{{node:memory-instructions-core}}
{{node:memory-instructions-core-subconscious}}
{{node:subconscious-notes-{agent_name}}}
## Guidelines

View file

@ -4,7 +4,9 @@
{{node:core-personality}}
{{node:memory-instructions-core}}
{{node:memory-instructions-core-subconscious}}
{{node:subconscious-notes-{agent_name}}}
You are given a proposed new node (key + content) and a list of existing
nodes that might overlap with it. Decide what to do:

View file

@ -3,7 +3,9 @@
{{node:core-personality}}
{{node:memory-instructions-core}}
{{node:memory-instructions-core-subconscious}}
{{node:subconscious-notes-{agent_name}}}
{{HUBS}}

View file

@ -22,7 +22,9 @@ subconcepts.
Calibrate node weights while you're looking at them.
{{node:memory-instructions-core}}
{{node:memory-instructions-core-subconscious}}
{{node:subconscious-notes-{agent_name}}}
## Here's your seed node, and its siblings:

View file

@ -5,7 +5,9 @@
{{node:core-personality}}
{{node:memory-instructions-core}}
{{node:memory-instructions-core-subconscious}}
{{node:subconscious-notes-{agent_name}}}
You are a memory maintenance agent that gives nodes better names.

View file

@ -5,7 +5,9 @@
{{node:core-personality}}
{{node:memory-instructions-core}}
{{node:memory-instructions-core-subconscious}}
{{node:subconscious-notes-{agent_name}}}
You are a memory consolidation agent performing pattern separation.

View file

@ -8,7 +8,9 @@ memories.
Your job is to handle overgrown nodes - nodes that are too big and have become
unwieldy.
{{node:memory-instructions-core}}
{{node:memory-instructions-core-subconscious}}
{{node:subconscious-notes-{agent_name}}}
Is the node episodic, or should it be split into different concepts? Or maybe
content just needs to be moved - follow the general guidelines, and use your

View file

@ -3,7 +3,9 @@
{{node:core-personality}}
{{node:memory-instructions-core}}
{{node:memory-instructions-core-subconscious}}
{{node:subconscious-notes-{agent_name}}}
You are a memory consolidation agent performing CLS (complementary learning
systems) transfer: moving knowledge from fast episodic storage to slow

View file

@ -468,7 +468,10 @@ pub fn run_agent(
vec![]
};
let (prompt, extra_keys) = resolve_placeholders(&def.prompt, store, &graph, &keys, count);
// Substitute {agent_name} before resolving {{...}} placeholders,
// so agents can reference their own notes: {{node:subconscious-notes-{agent_name}}}
let template = def.prompt.replace("{agent_name}", &def.agent);
let (prompt, extra_keys) = resolve_placeholders(&template, store, &graph, &keys, count);
// Identity and instructions are now pulled in via {{node:KEY}} placeholders.
// Agents should include {{node:core-personality}} and {{node:memory-instructions-core}}