swarm-vault
Skill5 starsChanged 4 months agoMITView on GitHub
The vault contract — how any agent reads, writes, and queries the SwarmVault. Use at the start of work in any vault-connected project, before exploring the repo, when deciding where to record memory/plans/decisions/sessions, when handing off between sessions or agents, or whenever unsure how the vault works.
In this repository14 other files it gives its agents.
- swarm-debugSkill
- swarm-design-deepSkill
- swarm-designSkill
- swarm-design-uiSkill
- swarm-ejectSkill
- swarm-flowSkill
- swarm-implementSkill
- swarm-initSkill
- swarm-migrateSkill
- swarm-orchestrateSkill
- swarm-reviewSkill
- swarm-skill-forgeSkill
- swarm-specSkill
- swarm-writeSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are 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.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 56
Never compress the human lane, and never compress away information a future agent needs — if compression costs precision, don't.
- Distinctive: line 71
All guidelines are quality-bounded: when quality needs tokens, spend them.
- Distinctive: line 76
Never quote isolated-project content into another project's notes.
≈ “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
swarm-vault — the vault contract
The vault is the shared brain of every agent on this machine. Query it before exploring; write to it so parallel and future agents inherit what you learned. It is plain markdown — Obsidian is an optional viewer, never a dependency.
The CLI is swarmvault.py — your platform's SwarmVault section (CLAUDE.md / AGENTS.md)
records its full path; default install is ~/.swarmvault/scripts/swarmvault.py.
Reading (query first, explore second)
swarmvault.py query --search "auth flow" # BM25, names + descriptions
swarmvault.py query --project X --type memory # structured filters
swarmvault.py show <note-name> # one body, once found
swarmvault.py context . # the compact project briefDescriptions are the payload — most questions are answered without opening a note.
Open bodies (show) only for what you actually need. Reach for Glob/Grep on the repo
only for what the vault cannot answer. If quality genuinely needs more context, take
more — the budget curbs habit, not necessity.
Writing (own files only)
| What | Where | Lane |
| Memory (facts, footguns, decisions learned) | platform memory dir, or <project>/.swarm/memory/ on Codex — sync mirrors both | machine |
| Session journal (end of session) | 40 Sessions/<P>/YYYY-MM-DD <slug>.md | machine |
| Specs, plans, question queue | 30 Plans/<P>/ | human (specs) / machine (queue) |
| Tickets + claims | 30 Plans/<P>/tickets/ — claim via CLI only (see swarm-implement) | machine |
| ADRs | 50 Decisions/<P>/ADR-NNN-<slug>.md | human |
| Code-notes (deep reasoning for a hot file) | 10 Projects/<P>/code-notes/ | human |
Rules: frontmatter always (name, one-line description that carries the fact,
project, type); [[wikilinks]] liberally; templates in 90 Templates/. Never edit
MOCs, Home, or generated: true notes — sync regenerates them. Never write another
agent's session/claim files.
The two lanes
Human lane (specs, design docs, ADRs, README): full prose, complete sentences. Machine lane (tickets, claims, queue entries, session notes, memory descriptions): compact telegraphic style — imperative, no filler, quality content in minimal tokens:
Verbose: "In this session we worked on the authentication system and managed to fix the token refresh bug that was causing users to be logged out unexpectedly." Compact: "DID: fixed token-refresh logout bug (src/auth.ts:142, race on expiry). NEXT: add regression test for concurrent refresh. BLOCKED: nothing."
Never compress the human lane, and never compress away information a future agent needs — if compression costs precision, don't.
Token economy & state doctrine
- Offload, don't carry — write durable state to the vault; reference notes by name instead of re-explaining them in context.
- Checkpoint continuously — durable state is written when it changes (ticket claimed/progressed/done, question answered, phase advanced), never batched to session end. The compliance test: kill the session at any moment — a fresh session must resume correctly from the vault alone, no transcript needed.
- Handoff by vault — still end sessions with a journal note (
DID/NEXT/BLOCKED) as history; but it is journal, not required state — resume never depends on it. - Tier models — top models for spec/design/review/complex logic; smaller for boilerplate (swarm-implement carries the table).
- All guidelines are quality-bounded: when quality needs tokens, spend them.
Isolation etiquette
Projects registered isolated are excluded from cross-project queries automatically.
Never quote isolated-project content into another project's notes. This is cooperative
filtering, not a security boundary.
Self-diagnosis
Vault not finding your project? swarmvault.py doctor — checks config
(~/.swarmvault.json / $SWARMVAULT_HOME), the .swarmvault marker, and the registry.
A moved project: swarmvault.py register --repair from its new path.
Influences: the original Claude Vault design; caveman plugin (compression); Obsidian MOC practice — see CREDITS.md.
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.

