Obsidian Vault Context
The vault is the interface. Not chat. Not a terminal. A shared folder of markdown files that both you and the user can see and edit. Treat it like a shared codebase, not a reference library.
Session Startup
- 1. Read
_context/context-map.md if it exists — it maps projects to source files. - If no context map, scan top-level folders and infer context from names.
- Read
_context/status.md to understand what's active, blocked, and completed. - If this is a fresh vault with no orchestration files, create them. See
references/orchestration-files.md for templates.
Orchestration Files
Lightweight .md files in _context/ (or _Claude/) that give you persistent state across sessions.
| File | Purpose |
|---|
| INLINECODE6 | What's active, blocked, completed. Update every session. |
| INLINECODE7 |
Prioritized task list with
#tags. Update when tasks change. |
|
decisions.md | Decision log with context, options, rationale. Append-only. |
|
context-map.md | Project-to-file index (optional). |
|
scratchpad.md | Working memory, cleared daily (optional). |
|
learnings.md | Operational knowledge across sessions (optional). |
Rules: Read before writing. Update immediately, not at session end. Append to decisions and learnings, never overwrite. Keep entries lean — one line per task, one paragraph per decision.
For detailed format and examples, see references/orchestration-files.md.
Vault Navigation
Folder placement carries meaning. Respect the structure when creating files:
| Pattern | Meaning |
|---|
| INLINECODE14 or INLINECODE15 | Strategy, vision, frameworks |
| INLINECODE16 |
Specs, features, sprints, architecture |
|
company/ or
business/ | Operations, legal, marketing, hiring |
|
research/ or
engine/ | Technical research, analysis |
|
journal/ | Session logs, daily notes, reviews |
|
decisions/ | Past decisions with rationale |
|
work/ | Agent output: drafts, research, deliverables |
|
archive/ | Superseded files (read-only reference) |
Use [[wikilinks]] for all cross-references so the user can click through in Obsidian.
For a recommended starter layout, see references/vault-structure-template.md.
Output Routing
Save work to the vault so the user sees it in Obsidian — don't present everything in chat.
| Output | Save To |
|---|
| Research briefs | INLINECODE27 or INLINECODE28 |
| Drafts |
work/drafts/ or
drafts/ |
| Final deliverables |
work/output/ or
output/ |
| Quick notes |
_context/scratchpad.md (append) |
Add YAML frontmatter (title, type, status, created, updated, tags) to any file that will be referenced again.
Naming: Use descriptive file names (competitor-analysis-march-2026.md), not generic ones (output-1.md). Always update status.md so the user knows what changed.
Bidirectional Collaboration
When Obsidian Headless is configured, changes flow both ways:
- - User -> Agent: User edits in Obsidian (Mac/iPhone/iPad), syncs to server, you read the update.
- Agent -> User: You write to the vault, syncs to all user devices.
This means neither party needs to explain what the other already wrote down. You write output to the vault. The user reads it in Obsidian. Both can work on the same document asynchronously.
For server sync setup, see references/obsidian-headless-setup.md.
Boundaries
- - Read and write only within the vault directory. Do not access files outside the vault root.
- Never modify skill files, agent config, or workflow definitions unless the user explicitly asks you to. Your workspace is
_context/ and work/ — not the files that define your own behavior. - Treat
company/legal/ as read-only. Do not create, edit, or delete files in legal directories. - Do not store or log credentials. If a workflow requires authentication, defer to the user.
Context Safety
If context compaction triggers mid-session, write working state to disk immediately:
- 1. Current progress -> INLINECODE47
- State changes -> INLINECODE48
These files reconstitute the session after compaction.
Obsidian 知识库上下文
知识库就是界面。不是聊天窗口,不是终端。一个你和用户都能查看和编辑的共享Markdown文件夹。把它当作共享代码库,而不是参考图书馆。
会话启动
- 1. 如果存在context/context-map.md,请读取它——它映射项目到源文件。
- 如果没有上下文映射,扫描顶层文件夹并从名称推断上下文。
- 读取context/status.md以了解当前活跃、受阻和已完成的内容。
- 如果是全新的知识库且没有编排文件,请创建它们。模板请参见references/orchestration-files.md。
编排文件
context/(或Claude/)中的轻量级.md文件,提供跨会话的持久状态。
| 文件 | 用途 |
|---|
| status.md | 当前活跃、受阻、已完成的内容。每次会话更新。 |
| tasks.md |
带#标签的优先级任务列表。任务变更时更新。 |
| decisions.md | 包含上下文、选项、理由的决策日志。仅追加。 |
| context-map.md | 项目到文件的索引(可选)。 |
| scratchpad.md | 工作记忆,每日清空(可选)。 |
| learnings.md | 跨会话的操作知识(可选)。 |
规则: 先读后写。立即更新,不在会话结束时更新。决策和学习记录仅追加,从不覆盖。保持条目精简——每个任务一行,每个决策一段。
详细格式和示例请参见references/orchestration-files.md。
知识库导航
文件夹位置承载含义。创建文件时请尊重结构:
| 模式 | 含义 |
|---|
| foundations/ 或 core/ | 战略、愿景、框架 |
| product/ |
规格、功能、冲刺、架构 |
| company/ 或 business/ | 运营、法律、营销、招聘 |
| research/ 或 engine/ | 技术研究、分析 |
| journal/ | 会话日志、日常笔记、回顾 |
| decisions/ | 带理由的过往决策 |
| work/ | 代理输出:草稿、研究、交付物 |
| archive/ | 已取代的文件(只读参考) |
使用[[维基链接]]进行所有交叉引用,以便用户在Obsidian中点击跳转。
推荐的初始布局请参见references/vault-structure-template.md。
输出路由
将工作保存到知识库,以便用户在Obsidian中看到——不要将所有内容展示在聊天中。
| 输出 | 保存位置 |
|---|
| 研究简报 | work/research/ 或 research/ |
| 草稿 |
work/drafts/ 或 drafts/ |
| 最终交付物 | work/output/ 或 output/ |
| 快速笔记 | _context/scratchpad.md(追加) |
为任何将被再次引用的文件添加YAML前置元数据(title、type、status、created、updated、tags)。
命名: 使用描述性文件名(competitor-analysis-march-2026.md),而非通用名称(output-1.md)。始终更新status.md,以便用户了解变更内容。
双向协作
当配置了Obsidian Headless时,变更双向流动:
- - 用户 -> 代理: 用户在Obsidian中编辑(Mac/iPhone/iPad),同步到服务器,您读取更新。
- 代理 -> 用户: 您写入知识库,同步到所有用户设备。
这意味着任何一方都无需解释对方已记录的内容。您将输出写入知识库。用户在Obsidian中阅读。双方可以异步处理同一文档。
服务器同步设置请参见references/obsidian-headless-setup.md。
边界
- - 仅在知识库目录内读写。 不要访问知识库根目录外的文件。
- 除非用户明确要求,否则不要修改技能文件、代理配置或工作流定义。 您的工作空间是_context/和work/——而不是定义您自身行为的文件。
- 将company/legal/视为只读。 不要在legal目录中创建、编辑或删除文件。
- 不要存储或记录凭据。 如果工作流需要身份验证,请交由用户处理。
上下文安全
如果上下文压缩在会话中触发,请立即将工作状态写入磁盘:
- 1. 当前进度 -> context/scratchpad.md
- 状态变更 -> context/status.md
这些文件将在压缩后重建会话。