agentleFS
farky-techfarky-tech/containers/skills/memory-routing/SKILL.md

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

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    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.

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
  1. Very specific:

    Default to route-only unless the user explicitly asks to remember/save, the project's container workflow requires a local reversible write, …

    line 23
  2. Distinctive:

    Do not hand-edit memory files in prose.

    line 39
  3. Distinctive:

    Every durable entry must explain:

    line 53
  4. Distinctive:

    Do not write durable memory when:

    line 66

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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, a KNOWLEDGE.md lesson, 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 by kind: — 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.