docs(write-OKF): move the parent to <theme-dir>/index.md on a split

split-page.md §Rewiring the index said the capped page keeps its name and
becomes its subpages' index, but okf-check's reachable() walks on only
through pages named index.md or MAP.md — so every subpage of such a
parent errors 'not reachable from index.md'. Doctrine instructing into a
validator error.

The parent now moves to <theme-dir>/index.md and index.md's single line
repoints at it; reachable() is untouched. Widening the walk was rejected:
the narrow rule is what buys the spine guarantee, and a split is rare
enough to pay a rename. okf-layout.md's LEARNINGS.md contract and tree
comment follow.

blueprint 021, rule 1 — doctrine half.
This commit is contained in:
Łukasz Boryń 2026-07-30 20:17:18 +02:00
parent d7c365adf7
commit 579bf5e804
2 changed files with 17 additions and 6 deletions

View File

@ -24,7 +24,7 @@ OKF/
├── modules/ # proposable, never mandatory: <name>.md per code
├── analyses/ # directory / analysis directory a scan found
└── LEARNINGS.md # debunked claims, gotchas — append-only, sourced;
# splits into learnings/<theme>.md at the cap
# splits into learnings/ (index.md + <theme>.md)
```
The spine above is a diagram, not a required page set — `okf-check`
@ -108,8 +108,9 @@ loop, not on disk.
and drift rule in [page-warrant.md](page-warrant.md).
- **LEARNINGS.md** — what was believed / what is true / source. Never
edited retroactively, only appended or superseded. At the cap it splits
into `learnings/<theme>.md` and becomes their index; both contracts hold
per page, and supersession then works **across** pages —
into `learnings/`: the page itself moves to `learnings/index.md` and the
themes land beside it as `learnings/<theme>.md`; both contracts hold per
page, and supersession then works **across** pages —
[split-page.md](split-page.md).
## Rules

View File

@ -33,9 +33,19 @@ repo's layers as they actually are.
## Rewiring the index
The parent becomes an index of its subpages, and `index.md` keeps its
single line to the parent. Subpages are **not** listed in `index.md` — it
is capped too, and would grow with every theme added.
**The parent moves.** `PAGE.md` becomes `<theme-dir>/index.md`, the
subpages land beside it, and `index.md`'s single line repoints at the new
parent. Subpages are **not** listed in `index.md` — it is capped too, and
would grow with every theme added.
The rename is what keeps the bundle reachable: `okf-check`'s `reachable()`
walks on through pages named `index.md` or `MAP.md` and no others, so a
parent that kept its old name would strand every subpage. Widening the
walk was rejected — the narrow rule is what buys the spine guarantee
(every page hangs off the map), and a split is rare enough to pay a rename.
Links pointing at the old path are repointed in the same change, and a
relative link *inside* the moved page gains the `../` its new depth needs.
Three frontmatter obligations, all enforced by `okf-check`: