Grounded Vault

Grounded Vault

Teaches a three-layer Markdown knowledge store where agents compile wiki pages from immutable sources, trace each claim to its source and detect staleness with git.

Skill files2 files

references/

SKILL.md105 lines
1
---
2
name: grounded-vault
3
description: Use when maintaining a durable Markdown knowledge store that agents compile from sources, when every number or quote in a wiki page must trace back to an immutable source, or when compiled pages need cheap drift detection against the code they describe. Teaches the raw/wiki/archive layout, per-claim provenance links, and git fingerprints for zero-token staleness checks.
4
---
5
6
# Grounded Vault
7
8
A grounded vault is a three-layer Markdown store in which every compiled claim can be traced
9
back to an immutable source and every page can be checked for staleness with one `git diff`.
10
It needs a git repository and nothing else. The convention comes from the `llm-wiki-loop`
11
project, which is a reference implementation rather than a dependency; this skill teaches the
12
pattern so it works with plain files and whatever agent is in the session.
13
14
## When to Use
15
16
- An agent compiles notes, papers, transcripts, logs, or code into wiki pages that later sessions rely on.
17
- A page cites numbers, dates, or quotes, and a reader must be able to verify each one against its source.
18
- Pages describe code, and rereading the codebase every session to check whether they still hold is too expensive.
19
- Knowledge must be corrected without losing history: superseded pages are archived, never deleted.
20
21
Session state, task queues, and conversation continuity are a different problem; use the
22
context-management or conductor plugins for those. This skill is about provenance and drift on a
23
durable knowledge store.
24
25
## The three layers
26
27
| Layer | Contents | Who writes it | Rule |
28
|---|---|---|---|
29
| `raw/` | source material: notes, papers, transcripts, logs, exported data | people and ingestion only | immutable once added; agents never edit a raw file |
30
| `wiki/` | compiled pages built from `raw/` and from code | agents and people | every number, date, and quote links to its source |
31
| `archive/` | pages that drifted or were superseded | agents, during garbage collection | moved, never deleted; the header says why |
32
33
Two files sit at the vault root. `index.md` is the map of every current page. `log.md` is an
34
append-only record of what changed and why. Both change in the same commit as the page they
35
describe.
36
37
## Page header contract
38
39
Every `wiki/` page opens with a header block:
40
41
```markdown
42
# Authentication architecture
43
44
> Raw: [raw/notes/auth-v1.md](../raw/notes/auth-v1.md), [raw/adr/0007-jwt.md](../raw/adr/0007-jwt.md)
45
> Fingerprint: git:5b237fa
46
> Monitored: src/auth/jwt.ts, src/auth/session.ts, package.json
47
> Status: Current
48
```
49
50
- `Raw:` lists every source the page was compiled from. Inline claims link to their specific source as well: `Tokens expire after 15 minutes ([raw/adr/0007-jwt.md](../raw/adr/0007-jwt.md)).`
51
- `Fingerprint:` is the short commit hash the page was compiled against.
52
- `Monitored:` lists the code paths the page describes. A change to any of them after the fingerprint means the page may be stale.
53
- `Status:` is `Current`, `Outdated` (monitored code moved on), or `Disputed` (a newer source contradicts the page).
54
55
## Grounding rule
56
57
A compiled page states only what a source supports, and every number, date, or quotation
58
appears verbatim in the linked source. A synthesis says it is one and links its inputs. A gap
59
in the sources is written into the page as a gap rather than filled by guessing.
60
61
Check it mechanically: for each linked claim, search the linked raw file for the exact figure
62
or quoted phrase. A miss is a grounding error and blocks the commit. The script in
63
`references/details.md` does this for a whole vault.
64
65
## Drift detection
66
67
Compare the fingerprint with the current tree instead of rereading monitored code:
68
69
```bash
70
git diff --stat 5b237fa..HEAD -- src/auth/jwt.ts src/auth/session.ts package.json
71
```
72
73
Empty output means the page still describes the code it was compiled against. Any output means
74
recompile: reread only the changed files, update the page, and stamp the new fingerprint. The
75
check runs in milliseconds and spends no model tokens.
76
77
## Workflow
78
79
1. **Ingest.** Put new material in `raw/` under a dated or sourced filename. Never rewrite an existing raw file; add a new one beside it.
80
2. **Compile.** Write or update the `wiki/` page with the header block, a source link on every claim, and the fingerprint of the commit the code was read at.
81
3. **Check.** Run the grounding check and the drift check before committing. Fix misses at the source; do not weaken a claim to make the check pass.
82
4. **Garbage collect.** When drift or a contradicting source appears and the page is not recompiled now, change its status, move it to `archive/`, and record the reason:
83
84
```markdown
85
> Status: Outdated
86
> Reason: src/auth/session.ts changed after git:5b237fa; see log.md 2026-09-01
87
```
88
89
5. **Update the map.** Every add, move, or archive updates `index.md` and appends one line to `log.md` in the same commit.
90
91
## Commit gate
92
93
Run both checks from a pre-commit hook or a CI step so a page cannot land with an unverifiable
94
number or a stale fingerprint:
95
96
```bash
97
python3 scripts/check_vault.py --strict # exits 1 on any grounding miss or drifted page
98
```
99
100
## Going deeper
101
102
`references/details.md` covers: the vault check script, batching the drift check across pages,
103
templates for `index.md` and `log.md`, renamed or deleted monitored files, sources that are
104
binary or live at external URLs, and the reference implementation.
105

© Niksa Barlovic · MIT · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 13,332 prompts

More by @OpenSourceBuffGuy

See all
Nine Christmas portraits of one fluffy dog prompt image

Nine Christmas portraits of one fluffy dog

Makes a 3x3 grid of nine hyperrealistic Christmas portraits of the same dog from a reference photo, in trees, snow, studio and cozy indoor scenes.

image-prompt, nano-banana, reference-image, pet-portrait, christmas, holiday, animals, multi-panel, photorealistic, cinematic, soft-lighting, winter, cozy, social-media-graphic, invitation, vertical-format, vibrant-colors, dramatic-lighting, studio-lighting, for-families, pet-care, long-form, bokeh, food-photography

Lab teacher silences class as infected close in prompt image

Lab teacher silences class as infected close in

Generates a short realistic horror clip in a Japanese school science lab where a teacher and students hide silently from infected figures closing in, with sound-driven beats.

video-prompt, horror, cinematic, photorealistic, handheld, timed-beats, camera-movement, negative-prompt, guardrails, moody, short-film, seedance, for-filmmakers, for-content-creators, storytelling, thriller, dramatic-lighting, muted-colors, japan

Valentine's newspaper editorial portrait from your photo prompt image

Valentine's newspaper editorial portrait from your photo

Turns an uploaded face photo into a top-down Valentine's fashion editorial: red blazer, roses, heart balloons and a newspaper headline.

image-prompt, nano-banana, reference-image, face-reference, photo-editing, portrait, woman, fashion-shoot, editorial, valentines-day, photorealistic, studio-lighting, close-up, high-angle, film-grain, vibrant-colors, flowers, text-rendering, placeholders, fashion, holiday, soft-lighting, bokeh, vertical-format

Reviews

Loading reviews…

Discussion

Loading comments…