cortex-vault
Skill15 starsChanged 5 months agoApache-2.0View on GitHub
Cortex vault layout — wiki, raw, feedback folders, frontmatter, wikilinks, .cortex manifests, VaultWatcher. Use for note paths, vault structure, or filesystem layout.
- Reads credentials
In this repository10 other files it gives its agents.
- AGENTS.mdAGENTS.md
- cortex-apiSkill
- cortex-authSkill
- cortex-compilerSkill
- cortex-contributingSkill
- cortex-deploySkill
- cortex-feedbackSkill
- cortex-graph-searchSkill
- cortex-mcpSkill
- cortexSkill
The file
Files
Cortex vault
Code: cortex/vault/ (reader.py, writer.py, watcher.py, index.py, feedback.py, models.py).
Folder semantics
| Path | Purpose |
{VAULT_WIKI_DIR}/ | Published Markdown articles (default wiki/; e.g. wiki1/) |
{VAULT_RAW_DIR}/ | Source files before/during compilation (default raw/; e.g. raw1/) |
agents/ | Agent definition notes |
sessions/ | Per-session notes |
daily/ | Daily notes |
feedback/ | Feedback submissions (type: feedback) |
Paths in APIs are relative to vault root (e.g. wiki1/transformers.md when CORTEX_VAULT_WIKI_DIR=wiki1).
Configure via CORTEX_VAULT_RAW_DIR / CORTEX_VAULT_WIKI_DIR (or VAULT_RAW_DIR / VAULT_WIKI_DIR in .env for Compose).
.cortex/ metadata
| File | Purpose |
graph.json | Serialized knowledge graph (NetworkX) |
index.md | Human-readable vault index (rebuilt after bulk ops) |
log.md | Append-only audit log (cortex/log/audit.py) |
ingest-manifest.json | SHA-256 hashes of successfully compiled raw files |
ingest-skip-manifest.json | Skipped/failed ingest records |
Notes and frontmatter
- Parsed via
python-frontmatterinread_note/write_note. infer_node_type()inreader.py: path prefix ortypein frontmatter →NodeType.- Common fields:
title,tags,authored_by,created_at,updated_at,source_path. - Feedback notes add
status: OPEN,related_paths(list of vault-relative.mdpaths).
Wikilinks and tags
- Wikilinks:
[[page]]or[[page|label]]— resolved underwiki/,agents/,sessions/,daily/,feedback/. - Tags in frontmatter become graph nodes
tag:{name}withtagged_withedges.
Validation rules
- Feedback
related_paths: each path must exist, be a file, and end in.md. Raw.txtcannot be linked — mention in feedback body instead. - Writes use
mode="create"or update;write_notesets timestamps and provenance.
VaultWatcher
cortex/vault/watcher.py uses watchfiles to sync graph nodes/edges when markdown changes on disk. Started in cortex/main.py lifespan.
Related skills
- Graph edges:
cortex-graph-search - Feedback CRUD:
cortex-feedback - Compile raw → wiki:
cortex-compiler
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.

