agentleFS
incredible404-rgbincredible404-rgb/zstack/skills/memory-routing/SKILL.md

memory-routing

Skill1 starsChanged 5 days agoMITView on GitHub

Which memory layer to search — Repository SSOT first, distilled cross-project memory (e.g. OpenViking) second, raw session transcripts (e.g. deja) third. Use whenever you are about to search past context, earlier decisions, prior errors, or hand off a long task across sessions.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Repository SSOT first (0 memory calls): when working inside a tracked repo: current rules, script paths, schedules, and task states live in …

    line 8
  2. Very specific:

    Start semantic find / search at limit=5: each hit carries its abstract, so larger defaults burn extra tokens.

    line 11
  3. Distinctive:

    Read the abstract rather than trusting raw cosine similarity scores (embedding scores often cluster tightly around 0.73–0.87 even for …

    line 12
  4. Distinctive:

    Keep full-text queries to 2–4 exact words.

    line 17
  5. Very specific:

    Before resuming a multi-session task from another session or agent, check your shared kanban directory (e.g.

    line 27

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

Three sources, strict priority to eliminate hallucination and save tokens:

  1. Repository SSOT first (0 memory calls) when working inside a tracked repo: current rules, script paths, schedules, and task states live in the repo (AGENTS.md, ARCHITECTURE.md, GLOSSARY.md, config manifests). Never trust recalled memories over current repo files.
  2. Distilled cross-project memory (e.g. OpenViking viking://~/memories, or a shared notes directory) for cross-project user preferences and durable entity/pattern cards:
    • Scope searches to the relevant subtree (e.g. target_uri="viking://~/memories/preferences") or read the known URI directly when the topic name is already clear.
    • Start semantic find / search at limit=5: each hit carries its abstract, so larger defaults burn extra tokens. Raise it only when the hits miss the source you need.
    • Read the abstract rather than trusting raw cosine similarity scores (embedding scores often cluster tightly around 0.73–0.87 even for off-target hits).
    • For exact tokens inside distilled notes: use regex/grep tools (e.g. openviking_grep), not semantic find.
  3. Raw lossless transcripts (e.g. deja CLI/MCP across agents, or local client session JSONLs under ~/.claude, ~/.codex, ~/.pi) for exact historical evidence:
    • Exact strings: error messages (deja fix "<error>"), file edit history (deja blame <path>), CLI flags, commit SHAs, or what an agent actually ran/measured;
    • Rule/decision keywords: filter to assistant or user turns so always-injected AGENTS.md headers don't flood FTS results;
    • Keep full-text queries to 2–4 exact words.

Rules of thumb:

  • Current project rule or path → Repo SSOT.
  • User taste, personal preference, cross-project convention, or "why we chose X" → Distilled memory.
  • Exact error string, command output, or file edit history → Raw session transcripts.
  • Each external memory lookup costs ~1–3 s; never wire semantic memory or full transcript scans into synchronous per-prompt shell hooks.

Continuing long tasks across sessions/agents (Kanban handoff)

  • Before resuming a multi-session task from another session or agent, check your shared kanban directory (e.g. viking://~/resources/kanban/ or .agents/kanban/) for its card and reuse it.
  • Record four fields only: goal (What), constraints, verified progress (with command/commit proof), and next step. Write back and verify after real progress, at handoff, and before context compaction.
  • Short Q&A with no follow-up gets no card; never pick up another active session's card on your own.
  • One task, one writer — an owner field is metadata, not a mutex. Never store credentials, raw secrets, or giant tool dumps in handoff cards.

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.