diff --git a/omp-docs/references/okf-maintenance.md b/omp-docs/references/okf-maintenance.md index 609da21..b361b3a 100644 --- a/omp-docs/references/okf-maintenance.md +++ b/omp-docs/references/okf-maintenance.md @@ -21,32 +21,46 @@ Knowledge bundles rot. It is the nature of knowledge to attract cobwebs, much li ## Change Tracking with `log.md` -Every OKF bundle has a `log.md` file. It is not optional. It is the bundle's memory. +Every OKF bundle has a `log.md`, and it is the bundle's **only** work log: one file, +at the bundle root. A subdirectory never gets its own — not `core/log.md`, not +`notes.md`, not a per-project, per-branch or per-run diary. Sprawl is not caution: +with fifty logs the entry is never where the next agent looks, and each copy re-dates +the same event on its own authority. `scripts/kb-lint.sh` reports any `log.md` that is +not the root's. -**Format:** Date-grouped entries, newest first. One line per change with timestamp, file path, and what changed. +**Format:** one dated section per day, newest first; a few lines per change — what +happened, and the durable lesson. It is not a file manifest. ```markdown # Bundle Change Log -## 2026-01-15 -- `/docs/ghostty.md` — Updated keybind table after v1.2 release -- `/docs/pi-permission-system/` — Added `policy.md` and `audit.md` -- `/docs/index.md` — Synced with directory contents +## 2026-01-15 — the gate was reading the wrong files + +A gate that gets an empty file list reports success. Law: a check MUST fail closed; +a silently-passing gate is worse than none, because it buys the belief of safety. +Details: [secret gate](../tools/index.md). ``` **Rules:** -- **Newest entries first.** Putting old entries at the top inverts the timeline and makes it impossible to see what just happened. -- **One line per change.** A single line is sufficient. The git history is there if someone wants the gory details. -- **Group by date.** Batch all changes from the same day together. -- **Always date-stamp the section.** Use `## YYYY-MM-DD`. -- **Mention `index.md` whenever you change a bundle.** If you added or removed a file, update the index and note it in the log. +- **Newest entries first.** Old entries at the top invert the timeline. +- **What changed + the durable lesson, a few lines.** Full narratives are recoverable + from git (`git log --follow log.md`); never re-expand one in place. +- **Laws and incidents, never bookkeeping.** No per-file inventories, no run-by-run + numbers, no transcripts. Measured numbers still have to pass the purpose test. +- **Link, do not duplicate.** Knowledge that outlives the entry belongs on its concept + page; the entry points there. +- **One dated section per day** (`## YYYY-MM-DD`), and mention `index.md` whenever a + file is added or removed. ### Common Mistakes -- ❌ Writing `"Updated ghostty.md"` — Updated it with what? Be specific. -- ❌ Forgetting to write to `log.md` — This is the equivalent of doing surgery without keeping a record. -- ❌ Using relative paths — Use absolute paths (`/docs/ghostty.md`). -- ❌ Leaving stale entries from manual edits — The log is the single source of truth. +- ❌ `Updated ghostty.md` — updated it with what, and what did it teach? +- ❌ Forgetting the entry — the change lands undocumented and the next agent rediscovers + the failure the hard way. +- ❌ Starting a second log in a subdirectory — the sprawl that makes logging useless. +- ❌ Invented absolute paths in links — links resolve relative to the page, and the + linter checks them. +- ❌ Re-expanding an old entry in place — the entry is a pointer; git is the transcript. --- @@ -84,6 +98,14 @@ OKF is built on the principle that a file is one concept. - ❌ Don't create a file called `misc.md` — `misc` is a graveyard, not a category. - ❌ Don't use `# Other` or `# Additional Notes` sections — these are taping things to the wall. +## Quarantine, Not Deletion + +A page is never deleted outright: it moves to `.AGENTTRASH/` beside where it lived and +waits for a pruning session with Frank present. The quarantine is not part of the +bundle — `scripts/kb-lint.sh` and `scripts/kb-coverage.py` skip any path containing +`.AGENTTRASH`. That exemption is deliberate: a gate that goes green only once the +quarantined copy is gone is a gate that deletes history. + --- ## Auto-Generation Strategies diff --git a/omp-docs/references/okf-spec.md b/omp-docs/references/okf-spec.md index e5099c5..6add03b 100644 --- a/omp-docs/references/okf-spec.md +++ b/omp-docs/references/okf-spec.md @@ -42,7 +42,7 @@ An OKF knowledge bundle is a directory tree. Every concept is one file. The file ``` my-bundle/ ├── index.md # Optional directory listing -├── log.md # Optional update history +├── log.md # The bundle's ONE update history — root only ├── concept-one.md # A concept at the root level └── subdirectory/ ├── index.md # Optional subdirectory listing @@ -55,7 +55,13 @@ my-bundle/ | Filename | Purpose | |----------|---------| | `index.md` | Directory listing for progressive disclosure | -| `log.md` | Chronological update history | +| `log.md` | Chronological update history — **exactly one, at the bundle root** | + +**One work log per bundle.** `log.md` is reserved, and it is reserved for a single +file: the bundle root's. A subdirectory never keeps its own change log — a bundle +that logs in fifty places has no log, because the entry is never where the next +reader looks and every copy re-dates the same event. `scripts/kb-lint.sh` reports +any `log.md` that is not the root's. ---