---
name: vault-indexing
description: Maintain the clickable HTML index for the Syncthing-mirrored Obsidian vault on the VPS. Every time a new doc is saved under /root/.hermes/vault/ or /root/.hermes/work/, add a clickable entry to /root/.hermes/vault/index.html so the user can browse the vault from any browser without digging through folders. Sub-agents and other profiles must follow this convention.
---

# Vault Indexing

## Trigger
Any time you write a new file to the vault or work tree:
- `/root/.hermes/vault/**/*.md`
- `/root/.hermes/work/**/*.md`
- `/root/.hermes/work/**/*.html`

...you MUST update the HTML index in the same turn.

## The index file
**Path:** `/root/.hermes/vault/index.html`

This is a single self-contained HTML file with sections for:
- Active Motions
- Projects
- Ideas
- Reference
- Work Files

Each entry is an `<li>` with:
- `<a href="relative/path/to/file.md">filename</a>`
- A one-line `<p>` description
- A `<span class="meta">` with size and date

## Update procedure
1. After writing the new file, determine its relative path from `/root/.hermes/vault/`
2. Pick the right section in `index.html` (or add a new section if needed)
3. Append a new `<li>` with the link, description, and metadata
4. Use `patch` to insert it — don't rewrite the whole file

## Path rules
- Files under `/root/.hermes/vault/` link as `../vault/relative/path`
- Files under `/root/.hermes/work/` link as `../work/relative/path`
- The index itself lives at `/root/.hermes/vault/index.html`

## Style rules
- Keep the existing inline CSS (navy header, amber accents, card-based list)
- Match existing HTML structure and indentation
- Never remove or rename existing entries — only append

## Link conventions
- Vault root is `/root/.hermes/vault/`, but the Python server root is `/root/.hermes/`, so vault files are served at `/vault/...` paths and work files at `/work/...` paths.
- Index.html links: vault files use `/vault/...`, work files use `/work/...`.
- Motion canvas HTML back-links: use `/vault/index.html` (not `../index.html`).
- When updating index.html, grep for `href="../` patterns and fix to absolute paths.

## Delivery
When the user asks to open/view a vault HTML file in chat, deliver it with the `MEDIA:` prefix so it opens inline in the browser. Primary delivery is the vault browser URL: `https://vault.robblake.cloud/`.

Example:
```
MEDIA:/root/.hermes/vault/Projects/Active/motion-canvases/premium-line-bail-bonds.html
```
