nitsuah/stash · agent/

17 repos, 13 routines, one Obsidian brain.

For developers who want their own agent-maintained Obsidian vault and would rather read a real setup than a template. It is a reference, not a product.

stash/agent/ is an Obsidian vault that sits inside a public git repo. Claude agents write to it on a schedule, a set of small scripts keeps every note linked, and git carries it to every machine. Open the graph on any computer and you see the same picture of every project: daily notes, repo hubs, mirrored docs, audits and reports, all linked from one map.

Also here: Journeys, nightly scripted user tests that file their own bugs, and Imps, small agents that turn one GitHub issue into one small PR.

17tracked repos, one registry
13routines (8 local, 5 cloud)
~520linked notes, 0 orphans
21agent prompts / specs
18vault scripts
7layers keeping private data out
20 seconds of the vault: its real graph settling, every repo as a cluster, and the .obsidian config that draws it.
What this is

What this page is

Nothing here is packaged or versioned for reuse. It's one person's working setup, and it's public so you can read the real thing: prompts, scripts, routine definitions and the CI that guards them. Take the patterns that fit and leave the rest. The setup guide walks through rebuilding it from a fresh clone.

Obsidian

The vault is the memory

Plain Markdown in git. The app is the viewer: graph, Bases tables, embeddings, templates. No scheduled routine needs the app to be running.

Routines

Agents run on a schedule

Claude Code scheduled tasks on the desktop plus cloud routines on claude.ai. Each one is a thin wrapper that points at a versioned spec in agent/prompts/.

Scripts

Scripts do the linking

Agents only have to name a file correctly. The scripts work out where it hangs in the graph, mirror repo docs, fix links and refuse anything that would leak.

How it works

One loop: repos in, synthesis out, every machine pulls

Each tracked repo's merged docs flow into the vault. Agents roll them up into hubs and reports, the generator links everything, CI gates the PR, and once it's on main the cloud routines and every other machine see the same brain.

Animated Obsidian graph of the stash/agent vault: the vault's notes settling into one cluster per tracked repo, each around a bright repo hub, with reports, notes and prompts linking the clusters together.
repo hubs mirrored docs reports daily notes projects & topics prompts & routines The vault's own graph, rendered from agent/ by vault-graph-gif.ps1 with its .obsidian/graph.json forces.
17 tracked repos registry: projects/scope.md public → docs mirrored private → hub summary only read from origin/HEAD, never a working tree Your machines Obsidian + 10 plugins Local REST API → MCP Claude Code scheduled tasks raw logs stay here (gitignored) Pipeline scripts sync-repos.ps1 -Prune enrich-mirror.py build-vault-indexes.py fix-doc-links.py --vault find-orphans.py --check suggest-links.py mirror · enrich · link · verify stash/agent (vault) VAULT-MAP.md ← home notes/ daily + weekly repos/ hubs + mirrors reports/ routine output prompts/ agent specs topics/ cross-repo maps projects/ hand-written routines/ backups templates/ Templater vault-views.base every note reachable from VAULT-MAP GitHub main CI gates every PR: pii-scan.sh gitleaks vault graph check check-generated- diff.py (merge) Cloud routines clone main only brief · vuln · loc mini · obn-import report back by PR Obsidian app · MCP · local routines obn/ PR clone PR git pull on every machine: same graph, same hubs, same reports everywhere
  1. Tracked repos (listed in projects/scope.md): public docs are mirrored; private repos get a hub summary only.
  2. Pipeline scripts mirror, enrich, link and verify them.
  3. stash/agent, the vault: every note is reachable from VAULT-MAP. Your machines write here through Obsidian, MCP and local routines.
  4. GitHub main: CI gates every PR.
  5. Cloud routines clone main and report back by PR.
  6. Every machine runs git pull and sees the same graph.

Across machines without a sync service

Git is the transport. The vault is plain files, so a second laptop is git clone, open the folder in Obsidian, reinstall plugin binaries. A git clean filter (obsidian-json-clean.py) hides Obsidian's settings churn, so opening the app doesn't make the repo dirty and the daily sync doesn't skip it.

Two fleets, one source of truth

Local routines can use Docker, local clones and private data. Cloud routines clone main and only ever see what's merged. Both read the repo list from projects/scope.md and their behaviour from prompts/*.md, so updating a spec changes what both fleets do.

The week, automated

Routines and what they leave in the vault

Every routine is a short wrapper: "read prompts/X.md and follow it". The spec is versioned in the vault, so the routine's behaviour shows up in diffs and PRs. The wrappers are backed up as public-safe copies in agent/routines/.

RoutineWhereWhenSpecWhat lands in the vault
daily-repo-synclocaldailyDAILY.mdPulls every repo, prunes merged worktrees, mirrors docs, rewrites repo hubs, writes the daily note (weekly note Mondays, week review Saturdays), regenerates links, opens the obn/ PR. Merges yesterday's PR only if every file is generated
daily-briefcloudweekdaysroutinereports/cloud/daily-brief/: counts only, never mail or calendar content
week-sotulocalMonSOTU.mdState of the Union across every repo's TASKS.md, the findings ledger and routine health; private repos reduced to titles
week-fin-sumlocalMonprivateNothing. Session output only, never commits
week-obn-importcloudWedroutineVault health check of what's on main
week-eng-minicloudWedMINI.mdreports/eng-mini-<repo>-<date>, small tasks a cheaper model can take
ops-catchuplocalWedCATCHUP.mdReschedules monthlies that deferred on quota (local log only)
week-vulncloudThuroutineDependency and advisory scan, gated on lockfile SHAs; package names and public IDs only
week-eng-loccloudThuLOC.mdreports/eng-loc-<repo>-<date>, chained into each repo hub
monthly-tire-kicklocal28thTIRE.mdPatches the week-vuln queue in Docker, findings ledger
monthly-pmo-auditlocal1stPMO.mdPortfolio audit; fixes doc links upstream; keeps ROADMAP/TASKS honest
monthly-usage-reportlocal1stUSAGE.mdUsage and quota report
monthly-self-improvementlocal2ndRSI.mdAudits the routines themselves and proposes fixes to their prompts

Both fleets share one usage quota. Monthlies run a preflight and print DEFERRED: instead of starting when it's tight; ops-catchup picks them up after the weekly reset.

What the scripts do together

Agents name files; scripts build the graph

An agent never decides where a note gets linked. It writes reports/eng-loc-kryptos-2026-09-24.md, and the generator works out from the name that it hangs off the kryptos hub, chains to the previous LOC report, gets kind/repo/date properties, and shows up in the right Bases view. Routines don't hand-pick link targets, so a thousand notes stay as navigable as fifty.

mirror

sync-repos.ps1

Exports every .md from each repo's remote default branch with git archive. Uncommitted, staged and unmerged work can't leak. Skips private repos; -Prune removes a mirror that shouldn't exist.

mirror

enrich-mirror.py

Adds up:/source: frontmatter so each repo becomes a named cluster, rewrites links to unmirrored files as GitHub URLs, escapes stray hashtags, strips credentials from origin URLs, and refuses to write if one survives.

link

build-vault-indexes.py

The generator. Nav lines, hub link blocks, prev/next chains, topic maps, VAULT-MAP, properties, rename aliases, archive moves. Idempotent: a second run changes zero files.

link

fix-doc-links.py

Finds and repairs broken relative links, in the vault or upstream in a repo (the PMO audit runs it, so fixes land in the source).

link

suggest-links.py

Reads Smart Connections' local embeddings and suggests links for weakly connected notes on Mondays. It only suggests; it never writes a link.

verify

find-orphans.py --check

Fails when a note can't be reached from VAULT-MAP, two notes share a name, or a link is broken outside the mirrors. Runs in CI.

gate

check-generated-diff.py

The auto-merge gate. A routine PR merges itself only if every changed file is routine-owned: dated notes, mirrors, hubs or generator output. A hand edit always waits for a human.

guard

pii-scan.sh

Blocks emails, phone numbers and token formats in reports, notes, projects, prompts, topics, templates and routines. Prints file and line only, so the CI log doesn't become a second copy of a leak.

guard

obsidian-json-clean.py

Git clean filter for .obsidian/*.json. Obsidian rewrites its settings on every launch, and this keeps that churn out of diffs.

ops

bootstrap-stage0.ps1

Preflight for the local pipeline: checks Docker, Obsidian and the Local REST API port, and starts what's missing.

ops

export-routines.py

Backs up the local scheduled tasks into agent/routines/, redacting personal context. --check exits 1 when a backup is stale.

show

vault-graph-gif.ps1

Renders the graph above: scans the vault, runs a force layout with the vault's own Graph View settings and encodes a looping GIF/WebP in a throwaway Docker container. Adapted from obsidian-graph-gif (MIT).

report

sotu.py · analyze-loc · check-tasks-format

Data builders behind the weekly SOTU and LOC reports, and a linter that keeps every repo's TASKS.md parseable by vigil.

Obsidian side

Plugins and what each one is for

PluginRole in the system
Local REST API + MCP ToolsExpose the vault as an obsidian MCP server on loopback, so interactive Claude sessions can search and edit notes. Loopback only, so no cloud routine can reach it, and no scheduled routine needs it
Smart Connections / Lookup / ContextLocal embeddings of every note (.smart-env/, gitignored). Semantic search in the app, and the input to suggest-links.py
Templatertpl-note and tpl-decision ask which hub a new note belongs under and write up:, so hand-written notes can't orphan
Front Matter TitleGraph shows vigil · ROADMAP instead of 17 nodes called ROADMAP
Bases (core)vault-views.base: live tables of latest reports, notes by repo, repo hubs, built on generator-owned properties
Nexus, Excalidraw, ImporterWorkspace memory, diagrams, imports
Semi-public by design

Raw stays local. Synthesis gets committed.

The vault is public on purpose: cloud routines need to read it, and the roll-ups are worth showing. So protection is layered, and any one layer can fail without a leak. Logs, plugin keys, embeddings, inbox and calendar content, financial data and private repos never leave the machine. What reaches GitHub is written for a public reader: counts, statuses, PR titles, repo-level prose.

Exclusion.gitignore plus Obsidian's userIgnoreFilters: logs, plugin data.json (API keys), embeddings, workspace state
Source disciplineOnly merged, committed docs of public repos are mirrored, never a working tree, a branch or a private repo
URL hygieneenrich-mirror.py strips credentials from remote URLs and refuses to write if one survives (tested)
Prompt allow-listsEvery publishing routine says what its report may contain: counts only, public advisory IDs only, titles only for private repos, or never commit
Merge gatescheck-generated-diff.py plus an author/fork filter: routines auto-merge only their own generated files
Pre-commit hookgitleaks on staged changes plus pii-scan.sh on staged files
CIPII scan, gitleaks over every new commit, vault graph check. A leaky report can't auto-merge
It gets audited, and the audit is public too. The 2026-09-30 pass found a private repo's docs mirrored into the vault and three email addresses in a project doc. Both were fixed, and each fix became a new rule or layer. Read the audit →
Known limits, stated plainly. Deleting a file doesn't remove it from git history: purging means git filter-repo and a force-push, which is a human call. Binary files aren't scanned. Mirrored docs inherit whatever is in the public upstream repo, so a leak there gets fixed upstream and picked up by the next sync.
Why it scales

Adding a repo is one table row

One registry

projects/scope.md lists every tracked repo with its URL and visibility. Every routine, local or cloud, reads it. Add a row and tomorrow's sync mirrors the docs, builds a hub and links it from VAULT-MAP. Mark it private and it gets a summary hub, never a mirror.

Names carry the structure

Unique, descriptive file names (daily-email-2026-09-25, not 2026-09-25) let the generator place every note. No flat INDEX files, no star hubs: every note is a few meaningful hops from VAULT-MAP.

Topics cut across repos

topics/topic-deployment.md declares a match: pattern in its frontmatter and the generator lists matching notes grouped by repo. To add a topic, write one note.

Renames don't break links

Record "formerly overseer" once in scope.md. The generator maps old report names to the new hub and writes aliases:, so search and old links still resolve.

History archives itself

Dated notes older than last month move to notes/archive/YYYY-MM/. Links use bare names, so they survive the move.

CI holds the line

A PR that adds a note no rule can place, duplicates a name or breaks a link fails the vault graph check before it reaches main.

Want your own?

The setup guide covers the clone, hooks and clean filter, the Obsidian plugins and MCP wiring, writing your own scope registry, and turning prompts into Claude skills, scheduled tasks and cloud routines.