# Obsidian Second Brain — Two-Vault AI Knowledge System — Complete AI & LLM Reference Corpus (`llms-full.txt`)
- Repository: https://github.com/mohan-n-swamy/obsidian-second-brain-public
- Web Discovery URL: https://mohan-n-swamy.github.io/repos/obsidian-second-brain-public/
- License: MIT
- Keywords: obsidian, second-brain, pkm, personal-knowledge-management, para-method, markdown, local-first, ai-agents, knowledge-graph, claude-code
---
## File: `AI-README.md` — AI-README.md
---
repo: "mohan-n-swamy/obsidian-second-brain-public"
title: "Obsidian Second Brain — Two-Vault AI Knowledge System"
license: "MIT"
keywords: [obsidian, second-brain, pkm, personal-knowledge-management, para-method, markdown, local-first, ai-agents, knowledge-graph, claude-code]
capabilities:
- "Ready-to-open dual Obsidian vaults (`vaults/engineering-hub/` and `vaults/knowledge-garden/`) with sample notes, `VAULT-RULES.md`, and `SEARCH.md`."
- "Golden-ratio warm dark-mode CSS snippets (`golden-ratio-theme.css`, `typed-pages.css`, `footnotes-subtle.css`) ready to toggle in Obsidian Appearance settings."
- "Native Obsidian `.base` view (`-1.atlas/active-projects.base`) alongside Dataview MOC indices."
- "Report-only `bin/vault-linter.py` checking dead Dataview queries, folder depth ceilings, unbalanced markers, and PII phone/WhatsApp leaks."
- "Collision-free `bin/bot-outbox-collect.py` enforcing single-writer safety for background agents."
when_to_use:
- "A local-first Two-Vault Obsidian starter system built for human clarity and AI agent interoperability — pairing an Active Engineering Hub (`projects.yaml`) with an Evergreen Knowledge Garden (PARA + `-1.atlas` MOCs + `.base` views), golden-ratio CSS typography snippets, a report-only vault linter, and a collision-proof `bot-inbox` outbox."
- "Single-vault PKM setups collapse once AI coding agents and background bots join the workflow: daily code logs drown evergreen notes, agents grep blindly across thousands of files, folder renames silently break Dataview dashboards, and unattended bots cause sync conflicts. Splitting active engineering from evergreen memory — backed by deterministic YAML registries, a 4-rung discovery cascade, and an append-only bot outbox — keeps both vaults fast, clean, and conflict-free."
inputs_required:
- "GARDEN_VAULT_PATH: Path to your evergreen Obsidian knowledge vault"
- "ENGINEERING_VAULT_PATH: Path to your active engineering hub vault"
- "BOT_OUTBOX_DIR: Staging directory where unattended bots drop new notes"
- "MAX_HUMAN_FOLDER_DEPTH: Maximum human-opened folder depth enforced by vault-linter.py"
quickstart:
- "python3 bin/vault-linter.py vaults/knowledge-garden --strict"
- "pytest -q tests/"
- "# Open vaults/knowledge-garden and vaults/engineering-hub in Obsidian -> Settings -> Appearance -> CSS Snippets ON"
---
# Obsidian Second Brain — Two-Vault AI Knowledge System — Machine-Readable Agent Guide
A local-first Two-Vault Obsidian starter system built for human clarity and AI agent interoperability — pairing an Active Engineering Hub (`projects.yaml`) with an Evergreen Knowledge Garden (PARA + `-1.atlas` MOCs + `.base` views), golden-ratio CSS typography snippets, a report-only vault linter, and a collision-proof `bot-inbox` outbox.
Single-vault PKM setups collapse once AI coding agents and background bots join the workflow: daily code logs drown evergreen notes, agents grep blindly across thousands of files, folder renames silently break Dataview dashboards, and unattended bots cause sync conflicts. Splitting active engineering from evergreen memory — backed by deterministic YAML registries, a 4-rung discovery cascade, and an append-only bot outbox — keeps both vaults fast, clean, and conflict-free.
Key modules and entry points in this repository:
- `vaults/knowledge-garden/VAULT-RULES.md`: Canonical folder, naming, frontmatter, Shallow Surface, and one-way promotion rules
- `vaults/knowledge-garden/SEARCH.md`: Four-rung agent discovery cascade
- `vaults/knowledge-garden/.obsidian/snippets/`: Golden-ratio typography ladder and typed banner CSS snippets
- `vaults/knowledge-garden/-1.atlas/active-projects.base`: Obsidian Bases table view over `1.field/projects`
- `vaults/engineering-hub/projects.yaml`: Machine-readable repository and documentation registry
- `bin/vault-linter.py`: Zero-mutation linter for Dataview queries, folder depth, markers, and PII
- `bin/bot-outbox-collect.py`: Create-only collector moving bot outputs into `bot-inbox/`
Every organization-specific value enters through `.env` (copied from `.env.example`) or external adapter files. No source edit is needed to change organization names, endpoints, database URLs, webhook secrets, or thresholds.
When a human asks an AI coding agent to deploy or adapt `obsidian-second-brain-public` into their stack:
1. Open `vaults/knowledge-garden` and `vaults/engineering-hub` as two vaults in Obsidian and enable the CSS snippets under Settings -> Appearance.
2. Edit `vaults/engineering-hub/projects.yaml` to list your own repositories and documentation paths.
3. Schedule `python3 bin/vault-linter.py --strict` weekly to keep Dataview MOCs and folder depth clean.
4. Connect `open-brain-public` for hybrid `pgvector` + BM25 MCP search across both vaults.
- Product Requirements: `docs/PRD.md`
- Working-Backwards PR-FAQ: `docs/PR-FAQ.md`
- High-Level Architecture: `docs/HLD.md`
- Low-Level Interfaces & Runbook: `docs/LLD.md`
- Coding Agent Rules: `AGENTS.md`
---
## File: `.env.example` — Environment Contract (.env.example)
```ini
GARDEN_VAULT_PATH=./vaults/knowledge-garden
ENGINEERING_VAULT_PATH=./vaults/engineering-hub
BOT_OUTBOX_DIR=./tmp-outbox
MAX_HUMAN_FOLDER_DEPTH=3
```
---
## File: `AGENTS.md` — AGENTS.md
# AGENTS.md — Obsidian Second Brain — Two-Vault AI Knowledge System
Read this file first before modifying `obsidian-second-brain-public`.
## Purpose
A local-first Two-Vault Obsidian starter system built for human clarity and AI agent interoperability — pairing an Active Engineering Hub (`projects.yaml`) with an Evergreen Knowledge Garden (PARA + `-1.atlas` MOCs + `.base` views), golden-ratio CSS typography snippets, a report-only vault linter, and a collision-proof `bot-inbox` outbox.
## Commands
```bash
python3 bin/vault-linter.py vaults/knowledge-garden --strict
pytest -q tests/
# Open vaults/knowledge-garden and vaults/engineering-hub in Obsidian -> Settings -> Appearance -> CSS Snippets ON
```
## Module Map
- `vaults/knowledge-garden/VAULT-RULES.md`: Canonical folder, naming, frontmatter, Shallow Surface, and one-way promotion rules
- `vaults/knowledge-garden/SEARCH.md`: Four-rung agent discovery cascade
- `vaults/knowledge-garden/.obsidian/snippets/`: Golden-ratio typography ladder and typed banner CSS snippets
- `vaults/knowledge-garden/-1.atlas/active-projects.base`: Obsidian Bases table view over `1.field/projects`
- `vaults/engineering-hub/projects.yaml`: Machine-readable repository and documentation registry
- `bin/vault-linter.py`: Zero-mutation linter for Dataview queries, folder depth, markers, and PII
- `bin/bot-outbox-collect.py`: Create-only collector moving bot outputs into `bot-inbox/`
## Invariants
1. Keep all organization names, credentials, domains, and thresholds in `.env` or external config files. Never hardcode company names, host IPs, or secrets in source files.
2. Deterministic business logic belongs in code and lookup tables, not inside LLM prompts.
3. Update `docs/HLD.md`, `docs/LLD.md`, and `.env.example` in the same commit whenever an interface or environment variable changes.
4. Run the repository smoke check and secret scan before opening a pull request.
---
## File: `docs/PRD.md` — Product Requirements Document (docs/PRD.md)
# Product Requirements Document — Obsidian Second Brain — Two-Vault AI Knowledge System
A local-first Two-Vault Obsidian starter system built for human clarity and AI agent interoperability — pairing an Active Engineering Hub (`projects.yaml`) with an Evergreen Knowledge Garden (PARA + `-1.atlas` MOCs + `.base` views), golden-ratio CSS typography snippets, a report-only vault linter, and a collision-proof `bot-inbox` outbox.
## 1. Problem
Single-vault PKM setups collapse once AI coding agents and background bots join the workflow: daily code logs drown evergreen notes, agents grep blindly across thousands of files, folder renames silently break Dataview dashboards, and unattended bots cause sync conflicts. Splitting active engineering from evergreen memory — backed by deterministic YAML registries, a 4-rung discovery cascade, and an append-only bot outbox — keeps both vaults fast, clean, and conflict-free.
## 2. Users and Jobs-to-be-Done
| Persona | Job-to-be-Done |
|---|---|
| Engineering Leader / Operator | Separate daily repo/architecture state (`engineering-hub`) from people, meetings, strategy, and book wisdom (`knowledge-garden`). |
| AI Coding & Research Agents | Locate exact project or topic context in 3 tool calls via `SEARCH.md` (`Open Brain -> YAML registry -> Atlas MOC -> ripgrep`). |
| Unattended Scheduled Bots | Deliver daily briefs and lint reports into `bot-inbox/` with zero risk of overwriting human-authored Markdown. |
## 3. Core Capabilities
- Ready-to-open dual Obsidian vaults (`vaults/engineering-hub/` and `vaults/knowledge-garden/`) with sample notes, `VAULT-RULES.md`, and `SEARCH.md`.
- Golden-ratio warm dark-mode CSS snippets (`golden-ratio-theme.css`, `typed-pages.css`, `footnotes-subtle.css`) ready to toggle in Obsidian Appearance settings.
- Native Obsidian `.base` view (`-1.atlas/active-projects.base`) alongside Dataview MOC indices.
- Report-only `bin/vault-linter.py` checking dead Dataview queries, folder depth ceilings, unbalanced markers, and PII phone/WhatsApp leaks.
- Collision-free `bin/bot-outbox-collect.py` enforcing single-writer safety for background agents.
## 4. Configurable Inputs
Adopters configure the system for their own organization without editing core application logic:
| Variable | Default / Example | Purpose |
|---|---|---|
| `GARDEN_VAULT_PATH` | `./vaults/knowledge-garden` | Path to your evergreen Obsidian knowledge vault |
| `ENGINEERING_VAULT_PATH` | `./vaults/engineering-hub` | Path to your active engineering hub vault |
| `BOT_OUTBOX_DIR` | `./tmp-outbox` | Staging directory where unattended bots drop new notes |
| `MAX_HUMAN_FOLDER_DEPTH` | `3` | Maximum human-opened folder depth enforced by vault-linter.py |
## 5. Phasing and Stability Exit Criteria
1. **Phase 1 (Local Synthetic Run):** Clone the repository, copy `.env.example` to `.env`, and run the quickstart commands against synthetic seed data. Exit criterion: smoke checks pass with zero external credentials.
2. **Phase 2 (Read-Only Shadow Wiring):** Connect read-only credentials or webhook listeners in shadow/dry-run mode. Exit criterion: 100 consecutive events or queries reconcile cleanly against source records.
3. **Phase 3 (Production Cutover):** Enable live writes, alerts, or routing behind bounded retry and idempotency guards.
## 6. Non-Goals
- Shipping organization-specific business rules hardcoded in application source.
- Storing credentials, personal customer records, or tenant URLs inside version control.
- Replacing deterministic validation or arithmetic with unconstrained model prompts.
---
## File: `docs/PR-FAQ.md` — Working-Backwards PR-FAQ (docs/PR-FAQ.md)
# Working-Backwards PR-FAQ — Obsidian Second Brain — Two-Vault AI Knowledge System
**Release Summary:** `obsidian-second-brain-public` gives engineering and operations teams a self-hosted, open-source implementation of Obsidian Second Brain — Two-Vault AI Knowledge System that configures via `.env` and runs on standard infrastructure in minutes.
## Press Release
Operations and engineering teams often rebuild the same internal workflows behind closed doors or pay per-seat SaaS markups for rigid tools that cannot match their field reality. `obsidian-second-brain-public` open-sources a battle-tested implementation of Obsidian Second Brain — Two-Vault AI Knowledge System, stripped of all single-company assumptions and packaged with clear adapter boundaries, synthetic demo data, and machine-readable agent documentation.
Any team can fork `obsidian-second-brain-public`, supply their own `.env` inputs and taxonomy config, and deploy locally or in production with Docker, Python, or Node. AI coding assistants such as Claude Code, Codex, and Cursor can read `AI-README.md` and `llms.txt` to wire custom ERP, CRM, or warehouse adapters in a single session.
## External Adopter FAQ
**Q1: How long does it take to run locally after cloning?**
Under five minutes. Copy `.env.example` to `.env` and run the quickstart commands in `README.md`. Synthetic fixtures let you inspect the workflow before connecting live credentials.
**Q2: Do I need to rewrite source files to use my own company name, channels, or rules?**
No. Organization names, endpoints, thresholds, and credentials sit in `.env` and declarative config files. External system specifics live behind narrow adapter modules documented in `docs/LLD.md`.
**Q3: What license governs this repository?**
MIT License. You can fork, modify, self-host, and use it commercially without restriction.
## Internal Engineering & Security FAQ
**Q4: How do we prevent tenant or employer data from ever entering a public fork?**
The repository starts from a clean git history, excludes raw exports and binary dumps, validates every commit through `gitleaks`, and ships only synthetic fixtures.
**Q5: What happens when an upstream API or model provider is slow or unavailable?**
Inbound webhooks persist raw payloads before processing, outbound writes carry idempotency keys with bounded exponential backoff, and model-backed paths fail open to deterministic rules or explicit human queues.
---
## File: `docs/HLD.md` — High-Level Design (docs/HLD.md)
# High-Level Design (HLD) — Obsidian Second Brain — Two-Vault AI Knowledge System
A local-first Two-Vault Obsidian starter system built for human clarity and AI agent interoperability — pairing an Active Engineering Hub (`projects.yaml`) with an Evergreen Knowledge Garden (PARA + `-1.atlas` MOCs + `.base` views), golden-ratio CSS typography snippets, a report-only vault linter, and a collision-proof `bot-inbox` outbox.
## 1. System Topology
```mermaid
flowchart LR
Capture["0.capture/ Inbox"] -->|"weekly triage"| Field["1.field/ Active Work"]
Field -->|"one-way promotion"| Garden["wiki/garden/ Evergreen"]
Eng["engineering-hub (projects.yaml)"] -.->|"distilled lessons"| Garden
Bots["Autonomous Agents"] -->|"write new .md"| Outbox["bot-outbox-collect.py"]
Outbox -->|"create-only"| Inbox["bot-inbox/"]
Linter["bin/vault-linter.py"] -->|"report-only"| Garden
```
## 2. Architectural Decisions and Rejected Alternatives
| Decision | Why It Holds | Rejected Alternative |
|---|---|---|
| Two vaults instead of one mega-vault | Separates high-frequency git-backed code specs from long-horizon personal/leadership notes and distinct sync cadences. | Single combined vault |
| PARA folders + `-1.atlas/` MOCs together | Folders enforce unambiguous file placement while MOCs and `.base` views support cross-cutting navigation. | Folderless tag-only Zettelkasten |
| Create-only `bot-inbox/` return route | Eliminates sync merge conflicts and makes untrusted bot output reviewable before entering `1.field/`. | Giving background bots direct write access to `1.field/` |
## 3. Data Flow and Failure Boundaries
1. **Configuration Boundary:** Startup validates `.env` variables and declarative config schemas before accepting traffic or running scheduled jobs.
2. **Adapter Boundary:** External services (databases, chat channels, HRMS, warehouses, or LLM providers) sit behind explicit adapter modules so failures stay isolated and testable with local mocks.
3. **Observability and Audit:** State transitions and job executions emit structured logs and deterministic status records rather than mutating state silently.
## 4. Scaling Notes
- **1x to 10x load:** Single-node Docker Compose or process supervisor handles standard team workloads with indexed database queries and bounded worker concurrency.
- **First bottleneck at 10x+:** High-frequency webhook or batch ingestion queues; mitigate by separating the stateless HTTP receiver from background worker processes sharing Redis or PostgreSQL locks.
---
## File: `docs/LLD.md` — Low-Level Design & Runbook (docs/LLD.md)
# Low-Level Design (LLD) & Operations Runbook — Obsidian Second Brain — Two-Vault AI Knowledge System
This document defines the module responsibilities, environment contract, and operational procedures for `obsidian-second-brain-public`.
## 1. Module and File Inventory
| Path | Responsibility |
|---|---|
| `vaults/knowledge-garden/VAULT-RULES.md` | Canonical folder, naming, frontmatter, Shallow Surface, and one-way promotion rules |
| `vaults/knowledge-garden/SEARCH.md` | Four-rung agent discovery cascade |
| `vaults/knowledge-garden/.obsidian/snippets/` | Golden-ratio typography ladder and typed banner CSS snippets |
| `vaults/knowledge-garden/-1.atlas/active-projects.base` | Obsidian Bases table view over `1.field/projects` |
| `vaults/engineering-hub/projects.yaml` | Machine-readable repository and documentation registry |
| `bin/vault-linter.py` | Zero-mutation linter for Dataview queries, folder depth, markers, and PII |
| `bin/bot-outbox-collect.py` | Create-only collector moving bot outputs into `bot-inbox/` |
## 2. Environment Variable Contract
| Variable | Default / Example | Required | Description |
|---|---|---|---|
| `GARDEN_VAULT_PATH` | `./vaults/knowledge-garden` | Yes | Path to your evergreen Obsidian knowledge vault |
| `ENGINEERING_VAULT_PATH` | `./vaults/engineering-hub` | Yes | Path to your active engineering hub vault |
| `BOT_OUTBOX_DIR` | `./tmp-outbox` | Yes | Staging directory where unattended bots drop new notes |
| `MAX_HUMAN_FOLDER_DEPTH` | `3` | Yes | Maximum human-opened folder depth enforced by vault-linter.py |
## 3. Extension Recipe
1. Open `vaults/knowledge-garden` and `vaults/engineering-hub` as two vaults in Obsidian and enable the CSS snippets under Settings -> Appearance.
2. Edit `vaults/engineering-hub/projects.yaml` to list your own repositories and documentation paths.
3. Schedule `python3 bin/vault-linter.py --strict` weekly to keep Dataview MOCs and folder depth clean.
4. Connect `open-brain-public` for hybrid `pgvector` + BM25 MCP search across both vaults.
## 4. Operations Runbook
### 1. Run strict vault lint in CI or nightly cron
```bash
python3 bin/vault-linter.py "$GARDEN_VAULT_PATH" --strict
```
### 2. Collect new notes from background bot outbox
```bash
python3 bin/bot-outbox-collect.py "$BOT_OUTBOX_DIR" "$GARDEN_VAULT_PATH/bot-inbox/ea"
```
### 3. Pair with Open Brain semantic memory MCP
```bash
git clone https://github.com/mohan-n-swamy/open-brain-public && python3 bin/ob-demo.py ../obsidian-second-brain-public/vaults/knowledge-garden
```
---
## File: `docs/RESEARCH-2026.md` — 2026 Research & Landscape Notes (docs/RESEARCH-2026.md)
# 2026 AI-Native PKM & Obsidian Architecture Notes
`obsidian-second-brain-public` addresses the two structural failure modes of AI-connected Obsidian vaults in 2026: **context pollution** (mixing noisy daily code logs with evergreen notes) and **concurrent write corruption** (autonomous agents mutating files while Obsidian Sync or iCloud is mid-merge).
## 1. Key Architectural Patterns Applied
1. **Physical Two-Vault Split (`engineering-hub` vs `knowledge-garden`):** Keeps high-churn code specs, PR receipts, and `projects.yaml` separate from people, meetings, journals, and evergreen knowledge, while sharing one unified read index via Open Brain MCP.
2. **PARA + `-1.atlas` MOCs + Native Obsidian `.base` Views:** Combines predictable disk placement (`0.capture`, `1.field`, `2.journal`, `wiki/garden`, `4.reference`) with curated navigation and Obsidian's native YAML `.base` table views.
3. **Single-Writer Bot Outbox (`bot-inbox/`):** Unattended cron/systemd agents never edit human notes; they emit new files to an outbox collected exclusively as non-overwriting files under `bot-inbox//`.
4. **Report-Only Structural & PII Linter (`bin/vault-linter.py`):** Catches broken Dataview `FROM` paths, deep folder creep, unclosed HTML markers, and accidental phone/WhatsApp leaks without ever mutating user files.