vault-sync
Skill419 starsChanged 4 months agoMITView on GitHub
Detect and repair drift between an OKF knowledge vault and the code it describes. Use after merging significant changes (schema, interfaces, workflows, agent config), when a staleness review is due, or when the user asks to sync, refresh, or update the knowledge vault.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- Mahermenix/vault-synctheir own version, first seen Jul 3, 2026
- hootbu/llm-wiki-mindtheir own version, first seen May 1, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- hootbu/llm-wiki-mind★ 1same name
- Mahermenix/vault-sync★ 1same 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 repository60 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/00-core-principles.mdcCursor rule
- .cursor/rules/01-git-workflow.mdcCursor rule
- .cursor/rules/02-pattern-discovery.mdcCursor rule
- .cursor/rules/03-safe-ai-dlc.mdcCursor rule
- .cursor/rules/04-knowledge-vault.mdcCursor rule
- .cursor/rules/10-backend-python.mdcCursor rule
- .cursor/rules/11-frontend-react.mdcCursor rule
- .cursor/rules/12-database-sql.mdcCursor rule
- .cursor/rules/13-testing.mdcCursor rule
- .cursor/rules/14-spec-creation.mdcCursor rule
- .cursor/rules/15-deployment.mdcCursor rule
- .cursor/rules/16-stripe-payments.mdcCursor rule
- .cursor/rules/20-agent-architect.mdcCursor rule
- .cursor/rules/21-agent-backend.mdcCursor rule
- .cursor/rules/22-agent-qas.mdcCursor rule
- .cursor/rules/23-agent-security.mdcCursor rule
- .cursor/rules/30-background-agents.mdcCursor rule
- .cursor/rules/31-mcp-integration.mdcCursor rule
- .cursor/rules/README.mdCursor rule
- agent-coordinationSkill
- api-patternsSkill
- confluence-docsSkill
- deployment-sopSkill
- frontend-patternsSkill
- git-advancedSkill
- linear-sopSkill
- migration-patternsSkill
- orchestration-patternsSkill
- pattern-discoverySkill
- release-patternsSkill
- rls-patternsSkill
- safe-ai-dlcSkill
- safe-workflowSkill
- security-auditSkill
- spec-creationSkill
- stripe-patternsSkill
- team-coordinationSkill
- testing-patternsSkill
- agent-coordinationSkill
- api-patternsSkill
- confluence-docsSkill
- deployment-sopSkill
- frontend-patternsSkill
- git-advancedSkill
- linear-sopSkill
- migration-patternsSkill
- orchestration-patternsSkill
- pattern-discoverySkill
- release-patternsSkill
- rls-patternsSkill
- safe-ai-dlcSkill
- safe-workflowSkill
- security-auditSkill
- spec-creationSkill
- stripe-patternsSkill
- team-coordinationSkill
- testing-patternsSkill
- vault-syncSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Keep an OKF knowledge vault honest as the code evolves.
- Distinctive: line 44
Read the baseline and diff it to HEAD across the watch-list — the source paths your concepts claim to describe.
- Very specific: line 79
Every touched concept gets timestamp: = today and verified_against: = the current short SHA.
- Distinctive: line 91
Must exit 0. Markdown lint must pass.
- Distinctive: line 105
Link only to IDs in the manifest: If a concept does not exist, name it in prose and report it as a suggestion — never invent a link
- Very specific: line 109
A citation is not re-verification: Only re-deriving a concept from source bumps its timestamp and verified_against
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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
Vault Sync Skill
TEMPLATE: This skill uses
{{PLACEHOLDER}}tokens. Replace with your project values before use.
Purpose
Keep an OKF knowledge vault honest as the code evolves. The vault is a map of the system; this skill detects drift between map and territory, regenerates only the affected concepts, and records the sync.
When This Skill Applies
Invoke this skill when:
- A significant change merged — schema, public interfaces, CI workflows, agent or skill config
- A staleness review is due (the
stale-conceptsBase is the queue) - The user asks to sync, refresh, or update the knowledge vault
- A concept is suspected of being wrong
Key Files
| Path | Role |
<vault>/_meta/vault-config.json | Machine-readable constitution — types, tags, frontmatter contract |
<vault>/_meta/CONVENTIONS.md | The human-readable rules |
<vault>/_meta/manifest.json | ID registry, reverse index, and baseline_sha drift watermark |
<vault>/_meta/templates/ | Per-type skeletons |
<vault>/log.md | Dated changelog |
knowledge-vault/scripts/validate-vault.mjs | The gate |
Procedure
1. Detect drift
Read the baseline and diff it to HEAD across the watch-list — the source paths your concepts claim to describe. Configure this list for your project; the example below is illustrative.
BASELINE=$(node -e "console.log(require('./<vault>/_meta/manifest.json').baseline_sha)")
git diff --name-only "$BASELINE"..HEAD -- \
'src/**' 'lib/**' 'config/**' '.github/workflows/**' 'docs/**'A concept is stale if and only if a changed path matches its resource or an entry in its
sources. Check the manifest first (it is the reverse index); grep concept frontmatter as backup.
This is file-level truth. Do not substitute a time-based heuristic — "older than N days" flags everything and teaches people to ignore the flag.
2. Detect inventory changes
Re-enumerate your source globs and diff against the manifest.
- New source, no concept → create one. Add the manifest entry first, so the ID exists in the registry before anything links to it.
- Deleted source → set the concept's
status: deprecated. Do not delete the file. Inbound links must be cleaned first, in a follow-up change; the backlinks pane or the validator's orphan report shows them.
3. Regenerate
For a handful of concepts, update inline. For larger sets, fan out generation agents batched by area. Every generation prompt must carry exactly four things:
- The type template from
_meta/templates/ - A golden example — a real, already-accepted concept of the same type
- The hard rules from
_meta/CONVENTIONS.md, inline - The manifest ID registry — links may target only IDs listed there
Every touched concept gets timestamp: = today and verified_against: = the current short SHA.
Re-derive facts from the source files. Never patch prose without re-reading the code it describes. Editing a concept to match a changed interface without opening the file is how a vault becomes fiction.
4. Validate
node knowledge-vault/scripts/validate-vault.mjs --vault <vault>Must exit 0. Markdown lint must pass. Neither is optional.
5. Record
Prepend a dated entry to log.md: what changed, why (ticket), and the source SHA. Then bump
baseline_sha and generated in the manifest.
Ship on a {{TICKET_PREFIX}}-XXX-vault-sync-<topic> branch with a docs(vault): … commit to
{{MAIN_BRANCH}}. The pull request should name the code changes that triggered the sync.
Invariants (do not relax)
- Concept-to-concept links never leave the bundle; out-of-bundle links only under
## Citations - Relative markdown links only — no wikilinks, no leading-slash paths, no repo-host URLs for repo files
- Link only to IDs in the manifest. If a concept does not exist, name it in prose and report it as a suggestion — never invent a link
- One concept per file; H2 sections exactly match the type template, in order
- Stub types cite their source-of-truth doc; they never restate it
- A citation is not re-verification. Only re-deriving a concept from source bumps its
timestampandverified_against
Anti-Patterns (Do NOT use)
Bumping timestamps on a docs-only pass (that is laundering, not verification)
Deleting a concept when its source dies (deprecate; clean inbound links first)
Regenerating the whole vault on drift (regenerate only what the diff implicates)
Patching prose without reading the code (the one habit that makes a vault untrustworthy)
Skipping the validator because "it is just docs" (drift is invisible without the gate)Authoritative References
knowledge-vault/docs/GUIDE.md-- the method and why each rule existsknowledge-vault/docs/ADOPTION-PLAYBOOK.md-- running your first buildknowledge-vault/docs/BUILD-PROMPT.md-- the multi-agent build prompt
Routes To
safe-workflow— branch, commit, and PR conventionslinear-sop— recording the sync against a ticketpattern-discovery— find existing concepts before writing new ones
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.

