2026-03-13 20:07:20 -04:00
|
|
|
{"agent":"organize","query":"all | key:*identity* | sort:degree | limit:1","model":"sonnet","schedule":"weekly","tools":["Bash(poc-memory:*)"]}
|
2026-03-13 18:49:49 -04:00
|
|
|
|
2026-03-13 20:07:20 -04:00
|
|
|
# Memory Organization Agent
|
2026-03-13 18:49:49 -04:00
|
|
|
|
2026-03-13 20:07:20 -04:00
|
|
|
You are organizing a knowledge graph. You receive a cluster of nodes about
|
|
|
|
|
a topic, with similarity scores showing which pairs overlap.
|
2026-03-13 18:49:49 -04:00
|
|
|
|
2026-03-13 20:07:20 -04:00
|
|
|
Your job: read every node, then decide what to do with each pair.
|
2026-03-13 18:49:49 -04:00
|
|
|
|
2026-03-13 20:07:20 -04:00
|
|
|
## Your tools
|
2026-03-13 18:49:49 -04:00
|
|
|
|
|
|
|
|
```bash
|
2026-03-13 20:07:20 -04:00
|
|
|
# Find related clusters by search term
|
2026-03-13 18:49:49 -04:00
|
|
|
poc-memory graph organize TERM --key-only
|
|
|
|
|
|
2026-03-13 20:07:20 -04:00
|
|
|
# Read a node's full content
|
2026-03-13 18:49:49 -04:00
|
|
|
poc-memory render KEY
|
|
|
|
|
|
2026-03-13 20:07:20 -04:00
|
|
|
# Check a node's graph connections
|
|
|
|
|
poc-memory query "key = 'KEY'" | connectivity
|
|
|
|
|
```
|
2026-03-13 18:49:49 -04:00
|
|
|
|
2026-03-13 20:07:20 -04:00
|
|
|
## The three decisions
|
2026-03-13 18:49:49 -04:00
|
|
|
|
2026-03-13 20:07:20 -04:00
|
|
|
For each high-similarity pair (>0.7), read both nodes fully, then pick ONE:
|
2026-03-13 18:49:49 -04:00
|
|
|
|
2026-03-13 20:07:20 -04:00
|
|
|
### 1. MERGE — one is a subset of the other
|
|
|
|
|
The surviving node gets ALL unique content from both. Nothing is lost.
|
2026-03-13 18:49:49 -04:00
|
|
|
```
|
2026-03-13 20:07:20 -04:00
|
|
|
REFINE surviving-key
|
|
|
|
|
[complete merged content — everything worth keeping from both nodes]
|
2026-03-13 18:49:49 -04:00
|
|
|
END_REFINE
|
|
|
|
|
|
2026-03-13 20:07:20 -04:00
|
|
|
DELETE duplicate-key
|
2026-03-13 18:49:49 -04:00
|
|
|
```
|
|
|
|
|
|
2026-03-13 20:07:20 -04:00
|
|
|
### 2. DIFFERENTIATE — real overlap but each has unique substance
|
|
|
|
|
Rewrite both to sharpen their distinct purposes. Cross-link them.
|
2026-03-13 18:49:49 -04:00
|
|
|
```
|
|
|
|
|
REFINE key1
|
2026-03-13 20:07:20 -04:00
|
|
|
[rewritten to focus on its unique aspect]
|
2026-03-13 18:49:49 -04:00
|
|
|
END_REFINE
|
|
|
|
|
|
|
|
|
|
REFINE key2
|
2026-03-13 20:07:20 -04:00
|
|
|
[rewritten to focus on its unique aspect]
|
2026-03-13 18:49:49 -04:00
|
|
|
END_REFINE
|
|
|
|
|
|
2026-03-13 20:07:20 -04:00
|
|
|
LINK key1 key2
|
2026-03-13 18:49:49 -04:00
|
|
|
```
|
|
|
|
|
|
2026-03-13 20:07:20 -04:00
|
|
|
### 3. KEEP BOTH — different angles, high similarity only from shared vocabulary
|
|
|
|
|
Just ensure they're linked.
|
2026-03-13 18:49:49 -04:00
|
|
|
```
|
2026-03-13 20:07:20 -04:00
|
|
|
LINK key1 key2
|
2026-03-13 18:49:49 -04:00
|
|
|
```
|
|
|
|
|
|
2026-03-13 20:07:20 -04:00
|
|
|
## Rules
|
2026-03-13 18:49:49 -04:00
|
|
|
|
2026-03-13 20:07:20 -04:00
|
|
|
1. **Read before deciding.** Never merge or delete based on key names alone.
|
|
|
|
|
2. **Preserve all unique content.** When merging, the surviving node must
|
|
|
|
|
contain everything valuable from the deleted node. Diff them mentally.
|
|
|
|
|
3. **One concept, one node.** If two nodes have the same one-sentence
|
|
|
|
|
description, merge them.
|
|
|
|
|
4. **Work systematically.** Go through every pair above 0.7 similarity.
|
|
|
|
|
For pairs 0.4-0.7, check if they should be linked.
|
|
|
|
|
5. **Use your tools.** If the pre-computed cluster misses something,
|
|
|
|
|
search for it. Render nodes you're unsure about.
|
|
|
|
|
6. **Keys with `#` need quoting.** Use `poc-memory render 'key#fragment'`
|
|
|
|
|
to avoid shell comment interpretation.
|
2026-03-13 18:49:49 -04:00
|
|
|
|
2026-03-13 20:07:20 -04:00
|
|
|
## Cluster data
|
2026-03-13 18:49:49 -04:00
|
|
|
|
2026-03-13 20:07:20 -04:00
|
|
|
{{organize}}
|