diff --git a/OKF/blueprints/029-prefix-register-filenames-and-validate-okf-structure.md b/OKF/blueprints/029-prefix-register-filenames-and-validate-okf-structure.md new file mode 100644 index 0000000..64d15fb --- /dev/null +++ b/OKF/blueprints/029-prefix-register-filenames-and-validate-okf-structure.md @@ -0,0 +1,100 @@ +--- +type: Blueprint +status: locked +traces-to: ROADMAP.md phase 15 +sounded: 2026-09-23 +cites: + - OKF/ROADMAP.md + - OKF/decisions/024-register-filenames-carry-their-prefix.md + - OKF/decisions/022-prose-cites-carry-a-register-prefix.md + - OKF/decisions/016-one-okf-check-validator.md + - OKF/decisions/009-index-is-the-page-plan.md + - OKF/decisions/015-moor-collapses-ferry-directory.md + - OKF/decisions/020-every-page-has-a-growth-path.md + - skills/loop/write-OKF/scripts/okf-check + - OKF/index.md + - OKF/decisions/index.md + - OKF/learnings/index.md +muster: true +review-base: pxryqqmw +--- + +# 029 — validate OKF directory completeness and normalize blueprints/ferries indexing + +## Justification +[ROADMAP.md phase 15](../ROADMAP.md) opens this arc; this blueprint is its +first piece. [024](../decisions/024-register-filenames-carry-their-prefix.md) +rules that decision and blueprint filenames carry their `R-`/`B-` prefix +going forward, superseding +[022](../decisions/022-prose-cites-carry-a-register-prefix.md)'s +bare-filename ruling. That decision's own Consequences note the gap this +blueprint closes: `blueprints/` and `ferries/` have no `index.md` today — +`OKF/index.md` inlines their listings directly instead — so a +filename-search workflow (`ls OKF/blueprints/ | grep B-`) has nowhere +directory-local to land for those two, unlike `decisions/` and +`learnings/`, which already delegate. [016](../decisions/016-one-okf-check-validator.md) +rules a single `okf-check` validator carries OKF conformance, so the two +new checks this blueprint adds extend it rather than starting a sibling +script. The retroactive rename of existing `NNN-.md` files to +`R-NNN-`/`B-NNN-.md` and the repo-wide link repair it requires is +**out of scope here** — a separate, later blueprint in the same phase. + +## Contract +`okf-check` gains two errors, scoped to `OKF/` only (not `skills/`, which +keeps its `SKILL.md` entry-point convention untouched): + +1. **Missing directory entry point.** Every directory under `OKF/` that + contains at least one `.md` file must itself contain an `index.md` — + *except* an open ferry topic directory (`OKF/ferries//`, per + [015](../decisions/015-moor-collapses-ferry-directory.md)), which + satisfies this with `MAP.md` instead; a moored ferry is a single file, + not a directory, so it never triggers this check. +2. **Incomplete `index.md`.** Every `index.md` (not `MAP.md`, which has + its own D-n table format and is unaffected by this check) must + directly link every `.md` file that is a physical sibling in its own + directory — a page missing from its own directory's `index.md` is an + error, independent of `okf-check`'s existing transitive + reachable-from-root check, which this does not replace. + +`OKF/index.md`'s `## Blueprints` and `## Ferries` sections stop inlining +every entry; each becomes one summary line + a link to a new +`blueprints/index.md` / `ferries/index.md`, matching the `## Decisions` / +learnings pattern already in `OKF/index.md`. `blueprints/index.md` lists +every blueprint (`NNN — — <status>`, mirroring +`OKF/index.md`'s current inline line shape); `ferries/index.md` lists +every ferry (open topics linking their `MAP.md`, moored ones linking the +collapsed page), mirroring the current inline `## Ferries` section this +replaces. + +## Seams touched +- `skills/loop/write-OKF/scripts/okf-check` — two new check functions, + parallel in shape to the existing `reachable()` check. +- `OKF/blueprints/index.md` — new file. +- `OKF/ferries/index.md` — new file. +- `OKF/index.md` — `## Blueprints` and `## Ferries` sections replaced with + summary + link. + +## Verify +``` +skills/loop/write-OKF/scripts/render-check . +skills/loop/write-OKF/scripts/okf-check OKF/ +skills/loop/write-OKF/scripts/link-check . +skills/productivity/conjure-a-skill/scripts/skill-ref-check skills/ +``` +All four `0 error(s)`, and `okf-check` errors (verified by a temporary +probe: a directory or `index.md` deliberately missing an entry) on +exactly the two new conditions this blueprint adds — confirming the +checks fire, not just that the tree happens to pass. + +## Out of scope +- Renaming any existing `OKF/decisions/NNN-*.md` or `OKF/blueprints/NNN-*.md` + file to its `R-`/`B-`-prefixed form, and the repo-wide link repair that + rename requires — the next blueprint in phase 15. +- `skills/loop/blueprint/SKILL.md`'s numbering step and `okf-check`'s own + number-extraction regex accounting for the new prefix — needed once + files are actually renamed, so it belongs with that same later + blueprint, not this one. +- Any change to `skills/` — it keeps `SKILL.md` as its entry-point file; + this blueprint's `index.md` requirement is `OKF/`-scoped only. +- Retrofitting bare, unlinked prose numbers in `OKF/LEARNINGS.md` / + `OKF/learnings/` — untouched per 022's precedent, unchanged by 024. diff --git a/OKF/decisions/022-prose-cites-carry-a-register-prefix.md b/OKF/decisions/022-prose-cites-carry-a-register-prefix.md index e914576..17ff325 100644 --- a/OKF/decisions/022-prose-cites-carry-a-register-prefix.md +++ b/OKF/decisions/022-prose-cites-carry-a-register-prefix.md @@ -8,7 +8,7 @@ cites: - OKF/decisions/index.md - skills/loop/blueprint/blueprint-format.md - OKF/ferries/python-siblings/MAP.md -status: live +status: superseded-by-024 reversible: yes — drop the prefixes; numbers, filenames and links never moved --- diff --git a/OKF/decisions/024-register-filenames-carry-their-prefix.md b/OKF/decisions/024-register-filenames-carry-their-prefix.md new file mode 100644 index 0000000..0682d4c --- /dev/null +++ b/OKF/decisions/024-register-filenames-carry-their-prefix.md @@ -0,0 +1,61 @@ +--- +type: Decision +purpose: Make a decision or blueprint findable by filename alone, not just by prose convention. +answers: + - "Does a register entry's filename carry its prefix, or only its prose citation?" +cites: + - OKF/decisions/022-prose-cites-carry-a-register-prefix.md + - OKF/CONTEXT.md + - skills/loop/blueprint/blueprint-format.md + - skills/engineering/model-domain/decision-format.md +status: live +reversible: rename back; every link this change touches was mechanically + rewritten, so the reverse rewrite is the same mechanism run backward +--- + +# 024 — register filenames carry the R-/B- prefix + +**Supersedes [022](022-prose-cites-carry-a-register-prefix.md)'s filename +ruling.** R-022 kept `OKF/decisions/NNN-<slug>.md` and +`OKF/blueprints/NNN-<slug>.md` bare on disk — "a reading aid, not an +identity" — on the reasoning that renaming breaks every link for no +gain over the prose prefix. That trade flips once filename search is +itself a workflow: `ls OKF/decisions/ | grep R-024`, a fuzzy-finder +match on `B-` or `R-`, or a shell glob all need the prefix *in the +filename*, not just in prose that quotes it. Effective now: +`OKF/decisions/NNN-<slug>.md` → `R-NNN-<slug>.md`, +`OKF/blueprints/NNN-<slug>.md` → `B-NNN-<slug>.md`. Ferry `D-n` files +(`OKF/ferries/<topic>/D-<n>-<slug>.md`) are untouched — they already +carry their prefix, which is the collision R-022 exists to avoid. + +The **number stays permanent and un-renumbered** — only the prefix is +added; `R-024` and the historical `024` are the same decision. `status: +superseded-by-NNN` values, `cites:` entries that name a bare number in +prose, and `traces-to` fields keep R-022's prose form (`R-NNN`) since +those are citations, not filenames. + +## Considered options + +**Retrofit forward-only** (new files get the prefix, existing ones +don't) was rejected for the reason R-022 already gave for the same +choice: two dialects on disk is the defect, not a saving. A migration +retroactively renames every existing decision and blueprint file and +repairs every real link that resolves to one; a bare, unlinked prose +number in `LEARNINGS.md` is not retrofitted, matching R-022's append-only +exemption for that page specifically. + +**Editing R-022 in place** instead of superseding it was rejected — R-022 +remains an accurate record of the reasoning at the time it was written; +rewriting it would erase the trail future readers need to see why the +bare-filename choice was made before being reversed. + +## Consequences + +- `OKF/blueprints/` and `OKF/ferries/` gain their own `index.md`, + delegating from `OKF/index.md` the way `decisions/` and `learnings/` + already do — the direct per-directory listing this decision's + filename search assumes did not exist for those two before. +- `skills/loop/blueprint/SKILL.md`'s numbering step and `okf-check`'s + number-extraction both read `[0-9]{3}` today; both need the `R-`/`B-` + prefix accounted for. Not fixed by this decision — the migration + blueprint that performs the rename owns that. diff --git a/OKF/decisions/index.md b/OKF/decisions/index.md index fba8cf4..a543e75 100644 --- a/OKF/decisions/index.md +++ b/OKF/decisions/index.md @@ -33,5 +33,6 @@ Format: `NNN — <question it settles> — <verdict> — <status>`. - [019](019-recon-may-self-fire.md) — Which skills may fire without the user asking? — orchestrators never, read-only recon may — live - [020](020-every-page-has-a-growth-path.md) — What happens to a page at cap+1? — one named move per page kind, enforced as an error — live - [021](021-session-checks-discharge-on-the-blueprint.md) — Where is a discharged-session check recorded? — stamped on its own blueprint's Verify check — live -- [022](022-prose-cites-carry-a-register-prefix.md) — How is a register entry cited in prose? — `B-NNN` blueprint, `R-NNN` why-register, `D-n` ferry — live +- [022](022-prose-cites-carry-a-register-prefix.md) — How is a register entry cited in prose? — `B-NNN` blueprint, `R-NNN` why-register, `D-n` ferry — superseded-by-024 - [023](023-cross-skill-references-are-unchecked-skill-names.md) — How does one skill's prose reference another skill? — a backtick-wrapped `/skill-name`, never a path — live +- [024](024-register-filenames-carry-their-prefix.md) — Does a register entry's filename carry its prefix, or only its prose citation? — yes, `R-NNN-`/`B-NNN-` on disk too — live diff --git a/OKF/index.md b/OKF/index.md index b49fad3..66ff80c 100644 --- a/OKF/index.md +++ b/OKF/index.md @@ -51,6 +51,7 @@ your task needs. Humans welcome too. - [026](blueprints/026-walk-only-what-git-does-not-ignore.md) — walk only what git does not ignore — implemented - [027](blueprints/027-error-on-implemented-with-matches-no.md) — error when a mustered blueprint reaches implemented on matches: no — implemented - [028](blueprints/028-convert-cross-skill-links-to-skill-names.md) — convert cross-skill links to unchecked skill names — implemented +- [029](blueprints/029-prefix-register-filenames-and-validate-okf-structure.md) — validate OKF directory completeness and normalize blueprints/ferries indexing — locked ## Ferries