Memory Routing Protocol
Route every fact to exactly one layer: wiki, agent config, or session context.
Memory routing keeps the system from storing the same idea in five places or losing durable knowledge in chat. The question is not "where can I write this fastest?" It is "where will the next agent naturally look?" Source: AGENTS.md Memory Routing
The Three Layers
| Question | If yes | Examples |
|---|---|---|
| Is this about the world, Kevin, a person, a tool, a project, a concept, or a decision? | wiki/ |
"Sigil uses token constraints", "Kevin values taste", "Agent Machines targets persistent agent computers" |
| Is this about how agents should behave, which tools load, or what rules/hooks apply? | wiki/meta/ for generic policy, plus config/ or executable skills/ for harness projections |
Capability routing map, Cursor rules, hooks, MCP config, skill bodies |
| Is this only relevant to the current conversation? | session context only | "The file I just attached", "we are currently discussing line 42" |
Common Cases
| Signal | Route |
|---|---|
| Kevin preference about output style | SOUL.md, USER.md, or agent config depending on scope |
| Kevin belief or philosophy | wiki/philosophies/ and possibly USER.md summary |
| New tool capability | wiki/tools/, Capability Routing Map, SKILL-RESOLVER, maybe a harness projection |
| Repeatable agent workflow | executable skills/ plus Skill Registry and the relevant skill-family page |
| Recurring scheduled task | automations/ plus Automation Schema |
| Project-specific instruction | project AGENTS.md / SKILL.md, with wiki reference if durable |
| One-off reminder for this turn | do not persist unless Kevin asks |
Filing Handoff
Memory routing chooses the layer. Filing happens only after the layer is wiki/.
- If the signal is session-only, do not write.
- If the signal changes agent behavior, update the durable meta page and the executable projection; use Generated Surface Contract for derived projections.
- If the signal is world knowledge, decide page shape with Wiki Brain Operating Model.
- If it becomes a wiki page, choose the directory with Filing Decision Tree.
This keeps the filing resolver from becoming a dumping ground for agent config, reminders, or generated artifacts.
Rule of Durability
Critical world knowledge belongs in the wiki because it survives across Cursor, Claude Code, Codex, OpenClaw, Hermes, and future harnesses. Agent config is effective for tool behavior, but it is local to each harness. Chat context evaporates.
Conflict Rule
When the same instruction appears in multiple layers:
- System/developer/runtime instructions win for the current agent.
- Repo
AGENTS.mdand nearest project docs define local work. - Wiki meta pages define durable Kevin-specific operating knowledge.
- Config/rules should be updated when durable meta behavior needs enforcement.
If durable docs and executable config disagree, update both rather than trusting one stale layer.
Timeline
- 2026-07-01 | Added generated-surface routing to the agent-behavior memory layer so derived projections refresh from source truth. Source: User request, 2026-07-01
- 2026-07-01 | Added the filing handoff so memory routing, brain-shape decisions, and Filing Decision Tree act in sequence instead of overlapping. Source: User request, 2026-07-01
- 2026-06-18 | Expanded memory routing with common cases, durability rule, and conflict-resolution behavior. Source: User request, 2026-06-18; AGENTS.md
- 2026-04-12 | Three-layer memory routing documented in AGENTS.md upgrade. Source: Wiki Log
- 2026-05-31 | Meta page formalized. Source: AGENTS.md