Knowledge vault (Orion/PARA) migrated from the pre-Orion 484vault on 2026-10-01. Deliberately orphaned: prior history contained a plaintext password and stays local-only on branch archive/pre-boilerplate-history. Secrets and live Hermes state are gitignored.
3.4 KiB
| name | description |
|---|---|
| orion-fold | Roll up the oldest 2^k entries of an Orion vault's wiki/log.md into a fold page in wiki/folds/, moving the entries verbatim and leaving one pointer line, so the log stays cheap to read. Dry-run by default; writes only on --commit. Run when cascade reports more than 16 unfolded entries. Triggers on: fold the log, run a fold, log rollup, roll up the log. |
orion-fold — subtractive log rollup
The log is append-only, so it grows forever. A fold moves the oldest entries into a fold page — verbatim, lossless — and leaves one pointer line behind. Entries are never edited or deleted; they live one file over.
When: orion-cascade prints Log: N / 16 every run. Over 16 → a fold is due. Default k=4 (16 entries).
Parameters
k(default 4) — batch size2^k.--commit— write. Without it, dry-run: print the fold, write nothing.
Fewer than 2^k unfolded entries → report the shortfall and stop.
Entry format
An entry is everything from one ^## YYYY-MM-DD heading to the next. The log is newest-first, so the oldest entries are at the bottom. A heading containing [folded] is a pointer, not an entry.
Fold ID
fold-k{K}-from-{EARLIEST}-to-{LATEST}-n{COUNT} — e.g. fold-k4-from-2026-01-02-to-2026-01-30-n16. If wiki/folds/<ID>.md exists, stop.
Procedure
-
Select the oldest
2^kunfolded entries — from the bottom up. -
Self-check (blocking):
- No unfolded entry sits below your span. If one does, you've picked a middle window — a hole later folds will never revisit. Re-pick.
- Every selected entry was located exactly (date + title). Never remove an entry you didn't positively match — leave it and report.
- Every numeric claim you'll write is present in a child entry.
-
Write the fold page (
wiki/folds/<ID>.md):--- type: fold fold_id: <ID> entry_count: N entry_range: {from: YYYY-MM-DD, to: YYYY-MM-DD} created: YYYY-MM-DD tags: [meta, fold] ---Sections:
- Scope — one paragraph: period and dominant themes.
- Entries — table
Date | Title | One-sentence summary. - Key outcomes — 3–7 bullets, each citing its entry's date.
- Cross-entry themes — 0–4 bullets, each naming ≥2 entries, or "None".
- Contradictions or corrections — or "None detected".
- Entries — verbatim — the moved entries in full, headings demoted
##→###, otherwise untouched.
Extractive only. Nothing that isn't in the entries.
-
Dry-run: print the page and what commit would do. Stop.
-
On
--commit:- Write the fold page.
- Remove the folded entries from
log.md; where the newest of them sat, leave:## {TO} — [folded] {N} entries ({FROM} to {TO}) → [[wiki/folds/{ID}|{ID}]] - Add the fold to
## Foldsinwiki/index.md. - Prepend a log entry:
## {TODAY} — [vault] Log fold: {N} entries ({FROM} to {TO}), with log line count before → after.
-
Reconcile: entries remaining in
log.md+ entries in all fold pages = entries before. If it doesn't balance, stop and report.
Rules
- Dry-run by default. Write only on
--commit. - Subtractive and lossless — entries move verbatim; never edited, never deleted.
- Oldest first, verified. No unfolded entry below the span.
- Never remove what you didn't positively match.
- Extractive only.
- Reconcile before finishing.