vault-cortex AGENTS.md

Repository instructions for AI coding agents working on vault-cortex, a remote server that lets AI applications access an Obsidian note vault over the internet. They explain the project’s containers, deployment setup, note operations, search system, and memory features.

In plain words
What is it for?
Use them when developing vault-cortex, including its note create/read/update/delete operations, keyword and vector search, Obsidian synchronization, containers, or cloud infrastructure.
Why use it?
They give an agent the project’s architecture and conventions before it changes code, reducing the risk of breaking the server, authentication, synchronization, or deployment.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/aliasunder/vault-cortex/agents-md
Clone the repo
git clone --depth 1 https://github.com/aliasunder/vault-cortex

Made for: Codex, OpenCode.

Per session 18,812 This file is loaded in full into every session.
When invoked 18,812 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.18812 $0.18812
Opus 5 $0.09406 $0.09406
Sonnet 5 $0.03762 $0.03762
Haiku 4.5 $0.01881 $0.01881

Measured yesterday against content hash 675dfe50e77f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

vault-cortex AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 1,310 lines

How it starts

The opening of the file, as written. The whole thing — 1,310 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md

Project conventions for AI-assisted development on vault-cortex — for Claude Code and other AI agents.

What this project is

Remote MCP server exposing an Obsidian vault over HTTPS. One two-target Dockerfile builds the ghcr.io/aliasunder/vault-cortex image: the local target (:latest, the default stage) is tini + the MCP server alone; the remote target (:remote) adds s6-overlay supervising both obsidian-sync (bidirectional Obsidian Sync via the obsidian-headless npm CLI) and the MCP server in a single container — s6 service definitions live in rootfs/, and the init chain registers the initial Sync device under DEVICE_NAME. Both processes run as UID 1000 (PUID/PGID-adjustable). Production runs the :remote image on Lightsail as a single Compose service, fronted by API Gateway with a smart Lambda authorizer (path-aware: OAuth endpoints pass through, /mcp validates static token or JWT). IaC via SST v4.

The server provides vault CRUD, hybrid search (FTS5 keyword + sqlite-vec vector + cross-encoder reranking via RRF fusion and position-aware score blending), and the About Me/ memory layer. The Docker image uses Debian slim (node:24-trixie-slim) because onnxruntime-node requires glibc, and specifically trixie because better-sqlite3 v13's bundled linux-arm64 prebuild needs glibc >= 2.38 (bookworm's 2.36 crash-loops arm64 images).

All solutions must be portable — they can't rely on one-off manual fixes, hardcoded paths, or user-specific configuration. If it works only on the author's machine, it's not done.

Design for the Obsidian user. The end user is always an Obsidian user, so anything that mirrors an Obsidian concept — backlinks, outgoing links, orphans, the graph, tags, properties, daily notes — must match what Obsidian itself does. At minimum, recognize every form Obsidian recognizes; behavior that is a strict subset of Obsidian's is a bug, not a limitation. For link resolution specifically, that means all of Obsidian's link styles ([[wikilink]], [[wikilink|alias]], [[wikilink#heading]], ![[embed]], [md](path.md), ![alt](image.png)), links in frontmatter properties (e.g. related:), and all three "New link format" modes — shortest path, path from vault folder, and path from current file (including relative ../ paths).

Read the full file on GitHub · 1,310 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 1,310 lines · 18,812 tokens per session scan A 675dfe50e77f

Subscribe to this mod's changes

vault-cortex AGENTS.md is an instructions file published in the GitHub repository aliasunder/vault-cortex (16 stars, last pushed yesterday), licensed MIT. It adds 18,812 tokens to every session, about $0.0941 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.