A dry dock for ideas: a Markdown-first knowledge base that humans can edit and AI agents can maintain.
Brainyard is a reusable Obsidian vault framework for people who want an AI-assisted second brain without giving up file ownership, auditability, or the ability to leave the tool.
It treats Markdown as the source of truth, Git as the recovery layer, and AI indexing as a rebuildable cache. Optional helper scripts discover changes, run structural checks, create Git checkpoints, and leave disputed decisions in a maintenance queue.
A shipyard is where vessels are assembled, inspected, repaired, and sent back into service. Brainyard applies the same idea to notes and project knowledge: capture evidence, assemble useful cards, inspect links, and schedule maintenance.
- Provides a domain-neutral Obsidian folder model.
- Separates read-only source material from editable knowledge pages.
- Gives AI agents explicit classification, merge, privacy, and stop rules.
- Detects Markdown changes in the working tree and in commits since the last successful checkpoint.
- Validates frontmatter, headings, internal links, orphan pages, empty files, and duplicate basenames.
- Optionally reindexes Basic Memory as a search cache.
- Commits only approved Markdown and control pages after validation passes.
- Pushes a Git checkpoint and advances the maintenance state.
- Includes a Windows Task Scheduler installer and a GitHub Actions validation workflow.
- Not a cloud-drive replacement.
- Not a note generator that invents facts about you.
- Not a system that silently deletes, merges, or moves contested knowledge.
- Not tied to Basic Memory. The core vault and checker work without it.
- Not affiliated with Obsidian or Basic Memory.
Brainyard works well when:
- you keep long-lived notes in Markdown;
- you use Obsidian or another editor that can open a normal folder;
- you want Git history and an optional remote backup;
- you work with AI agents on a desktop;
- you want automation to stop before risky deletions or structural migrations.
It is probably overkill for a small recipe collection or a single short-lived project. It also expects some comfort with PowerShell, Git, and command-line tools.
Brainyard/
├── AGENTS.md Agent operating contract
├── index.md Full knowledge index
├── log.md Append-only maintenance history
├── brainyard.config.json Local settings, ignored by Git
├── 00_navigation/ Human and agent control pages
├── 01_materials/ Read-only source evidence
├── 10_domains/ Long-lived subject and project knowledge
├── 20_tools/ Tool and software reference cards
├── 90_templates/ Reusable Markdown templates
├── docs/ Setup, architecture and reference notes
├── tools/ Validation and maintenance scripts
└── .github/ CI, issue forms and contribution templates
The main data flow is:
source material
→ editable knowledge cards
→ navigation and links
→ validation
→ Git checkpoint
→ optional semantic index
Use this repository as a GitHub template, or clone it manually:
git clone <your-new-repository-url> my-brainyard
Set-Location my-brainyardOpen the folder as an Obsidian vault.
Copy-Item brainyard.config.example.json brainyard.config.jsonbrainyard.config.json is ignored by Git. Leave basicMemoryProject empty when you do not use Basic Memory.
pwsh ./tools/wiki_check.ps1 -IncludeWarningsExpected result: zero issues and zero warnings.
- Put original PDFs, screenshots, transcripts, and clippings in
01_materials/. - Create durable knowledge under
10_domains/. - Put software and tool notes under
20_tools/. - Start new pages from
90_templates/. - Keep every new card linked from a parent page and
index.md.
git add .
git commit -m "Initialize my Brainyard"
git remote add origin <your-private-or-public-repository-url>
git push -u origin mainA private repository is recommended when the knowledge base contains personal research, drafts, or internal project data.
Brainyard can use Basic Memory as a semantic search cache. Markdown remains the source of truth.
- Install Basic Memory.
- Register this vault as a Basic Memory project.
- Set
basicMemoryProjectinbrainyard.config.json. - Run
basic-memory reindex --project <project-name>once.
If basicMemoryProject is empty, the maintenance wrapper skips reindexing.
The full agent runner currently targets a Codex-style CLI that supports:
codex exec -C <vault> -s workspace-write -
Review tools/maintenance-prompt.txt before enabling it. Then install the Windows tasks:
pwsh ./tools/install_windows_tasks.ps1This creates:
- a daily maintenance task at 00:00;
- a startup fallback that runs five minutes after login;
- battery-friendly and missed-trigger recovery settings.
Run a safe check without invoking an agent:
pwsh ./tools/run_maintenance.ps1 -CheckOnly -IdleMinutes 0The automation has two separate jobs:
scan_changes.ps1discovers content changes and writes a machine-readable candidate list.run_maintenance.ps1invokes the agent, validates the result, optionally reindexes, commits approved files, pushes Git, and advances the checkpoint.
Approved automatic changes include:
- adding missing internal links;
- updating parent pages and navigation;
- correcting tags or classification when the relation is unambiguous;
- updating
index.mdand appending tolog.md; - creating a checkpoint after successful validation.
Changes that remain manual:
- deleting source material or body text;
- resolving contradictory sources;
- merging disputed pages;
- changing top-level folders;
- inventing personal facts, credentials, or achievements;
- moving or rewriting
01_materials/.
See docs/system-design.md, docs/setup.md, and docs/automation.md.
.obsidian/workspace.json, caches, sessions, and local configuration are ignored.01_materials/is treated as read-only evidence.- The scanner excludes raw material, navigation, templates, tools, and editor state.
- The maintenance commit stages only scanned content and the three approved control pages.
- Pre-staged changes cause the automatic run to stop.
- Validation failure blocks commit and checkpoint advancement.
Read SECURITY.md before committing private records.
Brainyard is an independent framework. It borrows concepts, not third-party application code, from:
- Obsidian documentation: local Markdown vaults and editable views.
- Basic Memory: an optional Markdown-backed semantic knowledge index.
- PARA: action-oriented separation between areas, projects, resources, and archives; Brainyard adapts the idea into source, domain, tool, and template layers.
- AGENTS.md: repository-local operating instructions for coding agents.
- GitHub community profile guidance: README, license, contribution, security, and issue-template files.
- Keep a Changelog and Semantic Versioning: release documentation.
- MIT License: permissive reuse.
Detailed attribution and scope are in docs/references.md.
Read CONTRIBUTING.md and run:
pwsh ./tools/tests/test_scan_changes.ps1
pwsh ./tools/wiki_check.ps1 -IncludeWarningsMIT. See LICENSE.