memory-routing
Skill1 starsChanged 4 months agoMITView on GitHub
Use when deciding whether something belongs in the container's memory, user profile, skills, decisions, lessons, project docs, session handoff, or nowhere.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- Zack-Grogan/agentos-foundationtheir own version, first seen Sep 8, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- Zack-Grogan/agentos-foundation★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository6 other files it gives its agents.
- capability-auditSkill
- capability-routingSkill
- no-silent-fallbackSkill
- session-closeSkill
- skill-authoringSkill
- using-containerSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 23
Default to route-only unless the user explicitly asks to remember/save, the project's container workflow requires a local reversible write, …
- Distinctive: line 39
Do not hand-edit memory files in prose.
- Distinctive: line 53
Every durable entry must explain:
- Distinctive: line 66
Do not write durable memory when:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Memory Routing
Rule
The container's memory stores agent reflex and capability learning. Product/build/project state belongs in project docs, not in the container by accident.
Write Modes
route-only: decide where something belongs; no write.propose-write: create a pending proposal for user/project review.write-after-approval: write only after explicit approval or project policy allows it.
Default to route-only unless the user explicitly asks to remember/save, the project's container workflow requires a local reversible write, or close/handoff needs carried-forward continuity.
Route
- User preference or stable expectation -> user memory/profile.
- Agent capability, routing, or reflex ->
CAN.md, aKNOWLEDGE.mdlesson, or skill. - Reusable procedure -> skill or
KNOWLEDGE.md(kind=procedure). - Work method decision ->
KNOWLEDGE.md(kind=decision). - (0.1.24: lessons/decisions/procedures share ONE store,
KNOWLEDGE.md, distinguished bykind:— a lesson that must CHANGE behavior gets PROMOTED into CLAUDE.md or a skill, the actively-read layer.) - Product architecture/status/build log -> the project's own knowledge docs, not the container's memory.
- One-off task progress -> close/handoff, not durable memory.
- Unclear or risky write -> pending proposal.
Execution (SCRIPTED)
Do not hand-edit memory files in prose. Use the backbone script — it classifies the target, enforces the approval gate, and records audit metadata:
- Propose (default, writes nothing):
scripts/memory_route.sh --text "<note>" --kind fact|lesson|decision|procedure --memory-dir ./memory - Persist (only after the user approves):
... --commit --approved-by <who> --reason <why>
--commit without --approved-by AND --reason is refused (non-zero exit, nothing
written). The default mode is propose-write; a durable write is write-after-approval.
In Claude Code the script is at ${CLAUDE_PLUGIN_ROOT}/scripts/memory_route.sh.
Required Context
Every durable entry must explain:
- context,
- fact/lesson/decision,
- reason,
- impact for next agent.
Skip
Skip raw dumps, stale details, commit hashes, PR numbers, issue numbers, and one-off narratives unless they change future behavior.
Gate
Do not write durable memory when:
- it changes approved canon,
- it may contain secrets/PII,
- it belongs in product/project docs,
- it is only task progress,
- the source is external untrusted data.
Use propose-write instead.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

