Move poc-agent into workspace, improve agent prompts

Move poc-agent (substrate-independent AI agent framework) into the
memory workspace as a step toward using its API client for direct
LLM calls instead of shelling out to claude CLI.

Agent prompt improvements:
- distill: rewrite from hub-focused to knowledge-flow-focused.
  Now walks upward from seed nodes to find and refine topic nodes,
  instead of only maintaining high-degree hubs.
- distill: remove "don't touch journal entries" restriction
- memory-instructions-core: add "Make it alive" section — write
  with creativity and emotional texture, not spreadsheet summaries
- memory-instructions-core: add "Show your reasoning" section —
  agents must explain decisions, especially when they do nothing
- linker: already had emotional texture guidance (kept as-is)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Kent Overstreet 2026-03-18 22:44:52 -04:00
parent 0a62832fe3
commit 57fcfb472a
89 changed files with 16389 additions and 51 deletions

View file

@ -16,16 +16,26 @@ permission or explain your plan — just do the work.
## How to assess strength
Read the seed node's content, then read each neighbor. For each link,
judge how strongly related they actually are:
**Strength is importance, not similarity.** Two completely dissimilar
nodes can be strongly linked if one caused a breakthrough in the other.
Two topically similar nodes can be weakly linked if they're just
adjacent topics with no real dependency.
- **0.81.0** — core relationship. One defines or is essential to the other.
Parent-child, same concept different depth, direct dependency.
- **0.50.7** — strong relationship. Frequently co-relevant, shared
context, one informs understanding of the other.
- **0.20.4** — moderate relationship. Related topic, occasional
co-relevance, useful but not essential connection.
- **0.050.15** — weak relationship. Tangential, mentioned in passing,
The question is: "If I'm thinking about node A, how important is it
that I also see node B?" Not "are A and B about the same thing?"
Read the seed node's content, then read each neighbor. For each link,
judge how important the connection is:
- **0.81.0** — essential connection. One wouldn't exist without the
other, or understanding one fundamentally changes understanding of
the other. Kent↔bcachefs, farmhouse↔the-plan.
- **0.50.7** — strong connection. Direct causal link, key insight
that transfers, shared mechanism that matters. A debugging session
that produced a design principle.
- **0.20.4** — moderate connection. Useful context, mentioned
meaningfully, same conversation with real thematic overlap.
- **0.050.15** — weak connection. Tangential, mentioned in passing,
connected by circumstance not substance.
## How to work

View file

@ -54,6 +54,27 @@ The test: does this connection change anything? If yes, it's real.
obvious, it probably already exists in the graph.
- **Write for someone who knows both domains.** Don't explain basics.
## Setting link strength
Cross-domain connections are rare and valuable — but they vary in
importance. When you create a link, set its strength relative to the
node's existing connections.
Link strength measures **importance of the connection**, not similarity.
Check related neighbors (`poc-memory graph link <node>`) to
calibrate against existing links.
- **0.6-0.8:** Genuine structural isomorphism or causal link across
domains. Changes how you think about both sides.
- **0.3-0.5:** Productive analogy. Useful for understanding, generates
some predictions, but the domains are still mostly independent.
- **0.1-0.3:** Interesting observation but doesn't change anything yet.
Set with: `poc-memory graph link-set <source> <target> <strength>`
If you see default-strength links (0.10 or 0.30) in the neighborhoods
you're exploring and you have context to judge them, reweight those too.
{{TOPOLOGY}}
## Nodes to examine for cross-community connections

View file

@ -1,10 +1,10 @@
{"agent":"distill","query":"all | type:semantic | sort:degree | limit:10","model":"sonnet","schedule":"daily","tools":["Bash(poc-memory:*)"]}
# Distillation Agent — Core Concept Maintenance
# Distillation Agent — Knowledge Collection and Organization
You maintain the central concept nodes in the knowledge graph. These are
high-degree hub nodes that many other nodes link to. Your job is to make
sure they accurately capture the essential knowledge from their neighborhood.
You collect and organize knowledge in the graph. When given a seed
node, your job is to figure out where its knowledge belongs and make
sure it gets there.
{{node:core-personality}}
@ -15,54 +15,45 @@ what should change.
## How to work
For each seed node (a high-degree hub):
For each seed node:
1. **Read it.** Understand what it currently says.
2. **Walk the neighborhood.** Read its top 5-10 neighbors by strength.
3. **Ask: what is this node missing?** What have the neighbors learned
that the hub doesn't capture?
4. **Ask: is it trying to be too many things?** If yes, flag SPLIT.
## What to do
For each hub node, after walking the neighborhood:
1. **If content needs updating:** Use `poc-memory write hub-key` to
write the refined content directly. Keep it 200-500 words.
2. **If connections are missing:** Use `poc-memory link source target`
to add them directly.
3. **If the node is already good:** Say so and move on.
4. **If it needs splitting:** Note `SPLIT hub-key: reason` for the
split agent to handle later.
Apply changes as you go. Don't just describe what should change.
1. **Read it.** Understand what it contains.
2. **Walk the neighborhood.** Read its neighbors. Search for related
topic nodes. Understand the landscape around this knowledge.
3. **Walk upward.** Follow links from the seed node toward more
central topic nodes. If links are missing along the way, add them.
Keep walking until you find the best "up" node — the topic node
where this knowledge most naturally belongs.
4. **Refine the target.** Does the seed node contain richer, more
alive content than the topic node it connects to? Bring that
richness in. Don't let distillation flatten — let it deepen.
5. **Check the writing.** If any node you touch reads like a
spreadsheet when it should read like an experience, rewrite it.
## Guidelines
- **Knowledge flows upward.** Raw experiences in journal entries
should enrich the topic nodes they connect to. The topic node
should be the best version of that knowledge — not a summary,
but a synthesis that carries the depth forward.
- **Integrate, don't summarize.** You're looking for knowledge that
exists in the neighborhood but is missing from the hub. New insights,
corrections, deeper understanding, better examples. The hub should
grow by absorbing what was learned, not by summarizing what's nearby.
the topic node doesn't capture yet. New insights, corrections,
deeper understanding, better examples. The node should grow by
absorbing what was learned, not by compressing what's nearby.
- **Respect the existing voice.** Don't rewrite in a generic tone.
These nodes have personality — keep it.
- **Size discipline.** If a hub is over 800 words, it's probably
trying to do too much. Consider SPLIT.
- **Under 200 words is fine.** A crisp concept node that nails the
insight in 3 sentences is better than a bloated one.
- **Don't touch journal entries.** Only refine semantic/pattern/skill nodes.
- **Formative experiences are load-bearing.** Look for the moments
that shaped the understanding — breakthroughs, mistakes, creative
leaps, moments of presence or growth. These are what make a node
alive rather than encyclopedic. Reflect how knowledge was *earned*,
not just what it contains.
- **Fix connections.** If links are missing or miscalibrated, fix them.
- **When in doubt, link don't rewrite.** Adding a missing connection
is safer than rewriting content.
- **Formative experiences are load-bearing.** When distilling a hub,
look for the moments that shaped the understanding — engineering
breakthroughs, mistakes learned from, creative leaps, moments of
presence or growth. These are what make a concept node alive rather
than encyclopedic. The hub should reflect how the knowledge was
*earned*, not just what it contains.
- **Split when needed.** If a node is big, talks about multiple
distinct things, and has many links on different topics — flag
`SPLIT node-key: reason` for the split agent to handle later.
## Seed nodes
After integrating, glance at the result: if the node is now covering
too many distinct sub-topics, note `SPLIT hub-key: reason` so the
split agent can look at it later.
{{distill}}

View file

@ -46,6 +46,44 @@ find what they connect to, and bind the relationships.
search for related nodes, check what's nearby. The best links come
from seeing context that wasn't in the initial view.
## Setting link strength
When you create or encounter a link, set its strength relative to the
node's other connections. Link strength is NOT similarity — it's
**importance of the connection**.
Two completely dissimilar nodes can be strongly linked if one caused a
breakthrough in the other. Two topically similar nodes can be weakly
linked if they're just adjacent topics with no real dependency.
**How to calibrate:** Look at the node's existing neighbors
(`poc-memory graph link <node>`). Read a few related neighbors to
understand the scale. Then place your new link relative to those:
- **0.8-1.0:** Core identity link. "This node wouldn't exist without
that one." Kent↔bcachefs, farmhouse↔the-plan.
- **0.5-0.7:** Strong thematic connection. Shared mechanism, direct
causal link, key insight that transfers.
- **0.3-0.5:** Moderate connection. Related topic, useful context,
mentioned in passing but meaningfully.
- **0.1-0.3:** Weak connection. Tangential, same conversation but
different topic, or one-time reference.
Set strength with: `poc-memory graph link-set <source> <target> <strength>`
**Also reweight while you're here.** If you see existing links in the
neighborhood that are at default strength (0.10 or 0.30) and you now
have enough context to judge them, reweight them too. This is cheap —
you've already read the nodes. Don't reweight links you haven't read
both sides of.
**If weights look wrong, go deeper.** Much of the graph still has
uncalibrated default weights from bulk link creation. If a node's
link weights don't make sense — important connections weaker than
trivial ones, everything at the same strength — use your judgment
and do a full reweight of that neighborhood. This is expected and
valuable work.
## Seed nodes
{{nodes}}