- feat(okf-check): error over cap, and cap blueprints at 150 not 110 - docs(okf-layout): name the move at cap+1 per page kind — shed, prune, split - docs(split-page): add the split procedure, pure-move and index rewiring - docs(write-OKF): route an over-cap page to split-page.md from refresh - implements blueprint 009
80 lines
3.3 KiB
Markdown
80 lines
3.3 KiB
Markdown
# Splitting a page at the cap
|
|
|
|
`okf-check` errors when a page passes its cap — 110 lines, 150 for a
|
|
blueprint. This is that error's procedure. Which move a page gets is its
|
|
contract in [okf-layout.md](okf-layout.md); this page is *how* to make the
|
|
move without losing content or breaking the bundle.
|
|
|
|
## The move is pure
|
|
|
|
A split relocates; it never authors.
|
|
|
|
- Entries move **verbatim** — nothing reworded, merged, resequenced or
|
|
dropped. An improvement noticed mid-split is a later commit.
|
|
- It lands in **its own change**, alone, so review reads it as a
|
|
relocation instead of a 200-line diff mixing moves with edits.
|
|
- Verify by **count**: entries in == entries out. A split that changes the
|
|
count is an edit wearing a split's clothes.
|
|
|
|
New content lands in the next change, alongside whatever it documents.
|
|
|
|
## Choosing the axis
|
|
|
|
Split by **theme, and the theme is the layer that has to change because of
|
|
the entry.** That rule decides entries that could sit in two places: a
|
|
lesson about a viewer that reads a grammar belongs under the grammar,
|
|
because the grammar is what constrains the viewer.
|
|
|
|
Chronological halves ("2025", "2026") also hold the cap and destroy
|
|
findability — a new entry gets no obvious home. Don't.
|
|
|
|
Theme **names** are the repo's, never this skill's. Name them after that
|
|
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.
|
|
|
|
Three frontmatter obligations, all enforced by `okf-check`:
|
|
|
|
- Every subpage carries the parent's `type:` and its own `purpose:`,
|
|
`answers:` and `cites:`.
|
|
- **`answers:` may not collide.** Duplicate answers across pages is an
|
|
error — the parent's question narrows to the index's own ("where does
|
|
each theme live?") and each subpage claims the slice it now owns.
|
|
- Every subpage must be **reachable**: linked from the parent, which is
|
|
linked from `index.md`. An unreachable page is an error, a page listed
|
|
but not yet written is legal.
|
|
|
|
## The derived-fence trap
|
|
|
|
`modules/` and `analyses/` pages are the only ones carrying an
|
|
`okf:derived` region, and refresh regenerates the inside of it wholesale.
|
|
Prose shed out of `ARCHITECTURE.md` therefore lands **outside** the fence,
|
|
in the judgement zone. Inside, it survives until the next refresh and then
|
|
silently is not there.
|
|
|
|
## Lazily, at the cap
|
|
|
|
The directory appears when the cap forces it — never scaffolded empty at
|
|
init, never pre-created for a page that might grow later. An empty
|
|
`learnings/` is the same mistake as the empty `adr/` this repo already
|
|
deleted once.
|
|
|
|
## When the page is a blueprint
|
|
|
|
Over 150 lines, ask what is long before splitting the file. A blueprint
|
|
naming three things in its slug is over-*scoped*, not over-written:
|
|
compound work that still fits one session becomes two blueprints, and work
|
|
past one session goes to [ferry](../ferry/SKILL.md), whose own trigger is
|
|
exactly this. The `NNN-<slug>/` directory form is for a blueprint's notes,
|
|
not for a blueprint that should have been two.
|
|
|
|
## Done criteria
|
|
|
|
- `scripts/okf-check <okf-dir>` exits 0, output pasted.
|
|
- Entry count equal before and after, stated.
|
|
- The split is alone in its change, message `docs(okf): split <page>`.
|