Commit graph

12 commits

Author SHA1 Message Date
Kent Overstreet
a0d8b52c9a 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>
2026-03-21 19:38:01 -04:00
Kent Overstreet
6069efb7fc agents: always use API backend, remove tools field from .agent files
- Remove is_split special case in daemon — split now goes through
  job_consolidation_agent like all other agents
- call_for_def uses API whenever api_base_url is configured, regardless
  of tools field (was requiring non-empty tools to use API)
- Remove "tools" field from all .agent files — memory tools are always
  provided by the API layer, not configured per-agent
- Add prompt size guard: reject prompts over 800KB (~200K tokens) with
  clear error instead of hitting the model's context limit

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 14:26:39 -04:00
Kent Overstreet
f4599d0379 agents: use composite sort for linker and organize queries
linker: sort:isolation*0.7+recency(linker)*0.3
  Prioritizes nodes in isolated communities that haven't been linked
  recently. Bridges poorly-connected clusters into the main graph.

organize: sort:degree*0.5+isolation*0.3+recency(organize)*0.2
  Prioritizes high-degree hubs in isolated clusters that haven't been
  organized recently. Structural work where it matters most.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 13:07:27 -04:00
Kent Overstreet
57fcfb472a 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>
2026-03-18 22:45:01 -04:00
ProofOfConcept
b709d58a4f agents: strip old output format, use tool calls exclusively
All 12 agents with WRITE_NODE/REFINE/END_NODE output format blocks
now rely on tool calls (poc-memory write/link-add/etc) via the
Bash(poc-memory:*) tool. Guidelines preserved, format sections removed.

Also changed linker query from type:episodic to all nodes — it was
missing semantic nodes entirely, which is why skills-bcachefs-* nodes
were never getting linked to their hubs.
2026-03-17 00:24:35 -04:00
Kent Overstreet
0e4a65eb98 agents: shared instructions via graph node includes
All 17 agents now include {{node:core-personality}} and
{{node:memory-instructions-core}} instead of duplicating tool
blocks and graph walk instructions in each file. Stripped
duplicated tool/navigation sections from linker, organize,
distill, and evaluate. All agents now have Bash(poc-memory:*)
tool access for graph walking.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 17:09:51 -04:00
Kent Overstreet
5d6b2021f8 Agent identity, parallel scheduling, memory-search fixes, stemmer optimization
- Agent identity injection: prepend core-personality to all agent prompts
  so agents dream as me, not as generic graph workers. Include instructions
  to walk the graph and connect new nodes to core concepts.

- Parallel agent scheduling: sequential within type, parallel across types.
  Different agent types (linker, organize, replay) run concurrently.

- Linker prompt: graph walking instead of keyword search for connections.
  "Explore the local topology and walk the graph until you find the best
  connections."

- memory-search fixes: format_results no longer truncates to 5 results,
  pipeline default raised to 50, returned file cleared on compaction,
  --seen and --seen-full merged, compaction timestamp in --seen output,
  max_entries=3 per prompt for steady memory drip.

- Stemmer optimization: strip_suffix now works in-place on a single String
  buffer instead of allocating 18 new Strings per word. Note for future:
  reversed-suffix trie for O(suffix_len) instead of O(n_rules).

- Transcript: add compaction_timestamp() for --seen display.

- Agent budget configurable (default 4000 from config).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 12:49:10 -04:00
ProofOfConcept
b903cf5fb4 agents: encourage hub creation and knowledge percolation
Tell linker and organize agents to:
- Name unnamed concepts: when 3+ nodes share a theme with no hub,
  create one with WRITE_NODE that synthesizes the generalization
- Percolate up: gather key insights from children into hub content,
  so the hub is self-contained without needing to follow every link

This addresses the gap where agents are good at extraction and linking
but not synthesis — turning episodic observations into semantic concepts.

Co-Authored-By: Kent Overstreet <kent.overstreet@linux.dev>
2026-03-14 17:21:07 -04:00
ProofOfConcept
ce94e1cac1 agents: simplify prompts now that # is gone from keys
Remove all the quoting instructions, warnings about shell comments,
and "CRITICAL" blocks about single quotes. Keys are plain dashes now.
Agent tool examples are clean and minimal.

Co-Authored-By: Kent Overstreet <kent.overstreet@linux.dev>
2026-03-14 13:14:07 -04:00
ProofOfConcept
35bc93c22b agents: rewrite linker with tools, make organize conservative
Linker: give it Bash(poc-memory:*) tools so it can render nodes,
query neighbors, and search before creating. Adds search-before-create
discipline to reduce redundant node creation.

Organize: remove MERGE operation, make DELETE conservative (only true
duplicates or garbage). Add "Preserve diversity" rule — multiple nodes
on similar topics are features, not bugs. LINK is primary operation.

Co-Authored-By: Kent Overstreet <kent.overstreet@linux.dev>
2026-03-14 02:40:19 -04:00
ProofOfConcept
fe7f636ad3 agents: extract shared run_one_agent, standardize output formats
Three places duplicated the agent execution loop (build prompt → call
LLM → store output → parse actions → record visits): consolidate.rs,
knowledge.rs, and daemon.rs. Extract into run_one_agent() in
knowledge.rs that all three now call.

Also standardize consolidation agent prompts to use WRITE_NODE/LINK/REFINE
— the same commands the parser handles. Previously agents output
CATEGORIZE/NOTE/EXTRACT/DIGEST/DIFFERENTIATE/MERGE/COMPRESS which were
silently dropped after the second-LLM-call removal.
2026-03-10 17:33:12 -04:00
Kent Overstreet
b4e674806d agents: self-contained agent files with embedded prompts
Each agent is a .agent file: JSON config on the first line, blank line,
then the raw prompt markdown. Fully self-contained, fully readable.
No separate template files needed.

Agents dir: checked into repo at poc-memory/agents/. Code looks there
first (via CARGO_MANIFEST_DIR), falls back to ~/.claude/memory/agents/.

Three agents migrated: replay, linker, transfer.

Co-Authored-By: ProofOfConcept <poc@bcachefs.org>
2026-03-10 15:29:55 -04:00