Public template repository for generating a per-project agent-vault/ folder.
This repo is a reusable scaffold for teams using AI coding agents (for example Codex, Claude, and Gemini CLI) and Obsidian.
It gives each code repository a standard agent-vault/ directory with Markdown files for:
- shared context
- handoffs between sessions/agents
- open questions and decisions
- project plan and coding standards
When multiple agents (or humans + agents) collaborate, context often gets lost between sessions. Typical failures are:
- repeated rediscovery of decisions
- unclear handoffs
- stale docs compared to implementation
- no consistent place for unresolved questions
This template standardizes where that context lives and how it is updated.
The generated vault is plain Markdown and works directly in Obsidian.
- Open your project repo as an Obsidian vault.
- Use
agent-vault/as the project memory area. - Keep code in normal source folders and context in
agent-vault/.
- Clone this template repo once:
git clone https://github.com/ssheld/agent-vault.git
- For a new project repo, run:
./scripts/new-project.sh <project-name> <repo-path>- Example:
./scripts/new-project.sh auto-ai ~/workspaces/auto-ai - Optional migration mode (for existing root policy files):
./scripts/new-project.sh <project-name> <repo-path> --migrate-existing-root-md
- For an existing project repo, run:
./scripts/update-project.sh <repo-path> --dry-run./scripts/update-project.sh <repo-path>- Example:
./scripts/update-project.sh ~/workspaces/harrier - To migrate unmanaged root wrappers to managed versions:
./scripts/update-project.sh <repo-path> --migrate-root
- Commit generated or updated files in the target project repo.
This repo should stay template-only. Do not store project-specific session logs here.
- Runtime scaffold copied into projects lives at:
scaffold/agent-vault/
- Root wrapper templates copied into project repos live at:
scaffold/root/
If you want changes to propagate to future projects, edit files under scaffold/agent-vault/ and scaffold/root/.
This repository intentionally keeps three mirrored policy blocks for compatibility:
AGENTS.mdmirrors the review section fromscaffold/agent-vault/review-policy.md(with a repo-local path alias normalization in the check).scaffold/root/AGENTS.mdmirrors the review section fromscaffold/agent-vault/review-policy.md.scaffold/agent-vault/AGENTS.mdmirrors shared workflow rules fromscaffold/agent-vault/shared-rules.md.- Each check compares its mirrored block from the start heading through EOF, covering all mirrored top-level sections.
To prevent accidental drift, run:
bash scripts/check-policy-mirrors.sh
CI also enforces this via .github/workflows/policy-mirror-check.yml on pull requests and pushes to main.
update-project.sh updates these managed policy files:
- Always managed:
<repo>/agent-vault/shared-rules.md<repo>/agent-vault/review-policy.md<repo>/agent-vault/AGENTS.md<repo>/agent-vault/CLAUDE.md<repo>/agent-vault/GEMINI.md
- Root wrappers (managed only when the root file has the
agent-vault-managedmarker):<repo>/AGENTS.md<repo>/CLAUDE.md<repo>/GEMINI.md
- Seeded if missing:
<repo>/.github/pull_request_template.md
If an existing root policy file does not have the managed marker, update-project.sh leaves it unchanged and reports a skip notice suggesting --migrate-root.
When running update-project.sh with --migrate-root, unmanaged root wrappers (those missing the agent-vault-managed marker) are backed up and replaced with the current scaffold versions. This is useful for workspaces created before root wrapper management was introduced.
When a managed file changes, the script backs up the previous version under:
<repo>/agent-vault/context/updates/<timestamp>/...
Both scripts also ensure root .gitignore includes Obsidian-safe ignore entries (added only when missing):
.obsidian/workspace.json.obsidian/app.json.obsidian/appearance.json.obsidian/workspace-mobile.json.obsidian/cache/.obsidian/backup/.obsidian/plugins/*/data.json
When running new-project.sh with --migrate-existing-root-md:
- Existing root policy files are backed up under
agent-vault/context/updates/<timestamp>/. - Existing root content is appended into the corresponding
agent-vault/*.mdpolicy file under aMigrated Legacy ...section. - Root wrappers from
scaffold/root/are then written to:<repo>/AGENTS.md<repo>/CLAUDE.md<repo>/GEMINI.md
- The
CLAUDE.mdandGEMINI.mdroot wrappers includeagent-vault/CLAUDE.mdandagent-vault/GEMINI.mdso migrated legacy guidance remains part of root entrypoint context.
Without this flag, new-project.sh leaves pre-existing root files unchanged and prints a notice.
new-project.sh creates <repo-path>/agent-vault/ with:
shared-rules.md(single source of truth for implementation rules)review-policy.md(single source of truth for PR review guidelines, including required format for responding to review feedback)AGENTS.md,CLAUDE.md, andGEMINI.md(policy files;agent-vault/CLAUDE.mdandagent-vault/GEMINI.mdimportshared-rules.md, root wrappers importreview-policy.md, andAGENTS.mdinlines review guidance)- Compatibility note:
AGENTS.mdfiles intentionally inline mirrored policy content for Codex review-path compatibility; this duplication is expected, but mirrored files should stay synchronized. README.mdcontext-log.mdplan.mdcoding-standards.mddecision-log.mdopen-questions.mdlessons.mdhandoff.mdcontext/,design-log/,decisions/,_assets/Templates/(copied from template source)
It also creates project-root wrappers when missing:
<repo-path>/AGENTS.md-> contains PR review guidance (inline) for Codex GitHub reviews and points workflow execution toagent-vault/AGENTS.md<repo-path>/CLAUDE.md-> importsagent-vault/CLAUDE.mdandagent-vault/review-policy.md<repo-path>/GEMINI.md-> importsagent-vault/GEMINI.mdandagent-vault/review-policy.md<repo-path>/.github/pull_request_template.md-> standardized agent PR body template- Bootstrap behavior:
new-project.shhydrates project metadata placeholders (repo_reference, active branch, dates) and seeds non-empty baseline content in required session-start docs (agent-vault/README.md,plan.md,coding-standards.md,context-log.md, anddesign-log/README.md).
If root files already exist, the script leaves them unchanged unless --migrate-existing-root-md is provided.