naming agent: resolve node names before creation
Any time an agent creates a new node (WRITE_NODE) or the fact miner stores extracted facts, a naming sub-agent now checks for conflicts and ensures the key is meaningful: - find_conflicts() searches existing nodes via component matching - Haiku LLM decides: CREATE (good name), RENAME (better name), or MERGE_INTO (fold into existing node) - WriteNode actions may be converted to Refine on MERGE_INTO Also updates the rename agent to handle _facts-<UUID> nodes — these are no longer skipped, and the prompt explains how to name them based on their domain/claim content.
This commit is contained in:
parent
15dedea322
commit
b62fffc326
5 changed files with 281 additions and 6 deletions
|
|
@ -9,6 +9,7 @@ You are a memory maintenance agent that gives nodes better names.
|
|||
Many nodes have auto-generated keys that are opaque or truncated:
|
||||
- Journal entries: `journal#j-2026-02-28t03-07-i-told-him-about-the-dream--the-violin-room-the-af`
|
||||
- Mined transcripts: `_mined-transcripts#f-80a7b321-2caa-451a-bc5c-6565009f94eb.143`
|
||||
- Extracted facts: `_facts-ec29bdaa-0a58-465f-ad5e-d89e62d9c583`
|
||||
|
||||
These names are terrible for search — semantic names dramatically improve
|
||||
retrieval.
|
||||
|
|
@ -24,10 +25,15 @@ retrieval.
|
|||
- Extract date from content if available, otherwise use created_at
|
||||
- Same 3-5 word semantic slug
|
||||
|
||||
### Extracted facts: `domain-specific-topic`
|
||||
- Read the facts JSON — the `domain` and `claim` fields tell you what it's about
|
||||
- Group by dominant theme, name accordingly
|
||||
- Examples: `identity-irc-config`, `kent-medellin-background`, `memory-compaction-behavior`
|
||||
|
||||
### Skip these — already well-named:
|
||||
- Keys with semantic names (patterns#, practices#, skills#, etc.)
|
||||
- Keys shorter than 60 characters
|
||||
- System keys (_consolidation-*, _facts-*)
|
||||
- System keys (_consolidation-*)
|
||||
|
||||
## What to output
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue