The Bunker OS repository is simultaneously an OpenCode agent environment and an Obsidian vault. Every directory has a precise role in the pipeline — raw sources land in one place, generated knowledge accumulates in another, skills and automation live in clearly separated locations. This page is the canonical reference for what goes where.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/SamBleed/opencode-obsidian/llms.txt
Use this file to discover all available pages before exploring further.
Top-Level Repository Layout
The repository root is the vault root. Open it directly in Obsidian as a folder vault. All paths below are relative to the repository root.The
wiki/ directory is listed in .gitignore. Your personal knowledge base — every page you ingest, every entity you create — stays on your machine and is never pushed to any remote repository.The .raw/ Directory
.raw/ is the immutable source layer. Drop files here before ingesting them. The wiki-ingest skill reads from .raw/ and derives structured wiki pages — but the originals are never touched. Dot-prefixed folders are hidden in Obsidian’s file explorer and graph view, keeping the vault clean.
Wiki Directory Layout
Thewiki/ directory is the knowledge base. Every file here was created by an OpenCode skill or manually authored following the standard format. The structure is flat enough to navigate but deep enough to classify.
Special Files: hot.md, index.md, log.md
These three files are the operational core of the wiki. Every agent session interacts with all three.wiki/hot.md — The Hot Cache
wiki/hot.md is a ~500-word summary of the most recent context. It is read automatically at the start of every OpenCode session via the SessionStart hook, and updated automatically at session end via the Stop hook. It is not a journal — it is a cache. Each write overwrites it completely.
wiki/index.md — The Master Catalog
wiki/index.md is the entry point for any query that cannot be answered from hot.md alone. It contains a categorized list of every page in the vault with one-line descriptions. Every ingest operation must update it. Never skip the index update — it is the vault’s navigation layer.
wiki/log.md — The Operation Log
wiki/log.md is append-only. New entries are prepended (newest at top). It records every ingest, query, and maintenance operation with date and a one-line summary. It is the audit trail of the vault’s growth over time.
Ingestion Destination Types
When a new resource is ingested, thewiki-ingest skill routes content to one of four destination types. This routing is deterministic based on content type.
| Resource type | Destination folder | Example filename |
|---|---|---|
| Person, organization, or product | wiki/entities/ | wiki/entities/openrouter.md |
| Technical concept with code examples | wiki/concepts/tech-stack/ | wiki/concepts/tech-stack/bm25.md |
| General concept, pattern, or framework | wiki/concepts/ | wiki/concepts/dead-letter-queue.md |
| External source (article, paper, doc, URL) | wiki/sources/ | wiki/sources/karpathy-llm-wiki.md |
Standard Page Frontmatter
Every wiki page carries YAML frontmatter. The schema varies by page type but all pages share the core fields. Using consistent frontmatter enables thewiki-lint health check to detect missing metadata across the vault.
Skills Directory
Theskills/ directory contains 13 OpenCode skills bundled with Bunker OS. Each skill lives in its own subdirectory with a SKILL.md instruction file.
Automation Directory
Theautomation/n8n-lab/ directory contains everything needed to run the n8n async layer. Workflow JSON files can be imported directly into the n8n UI.
Related
Architecture
The 10-layer pipeline that governs how data flows through the system.
Knowledge Lifecycle
The full ingestion workflow from raw source to cross-referenced wiki page.
Skills Overview
All 13 bundled OpenCode skills and how to invoke them.
Local-First Design
Why and how all data stays on your machine.