feat(okf-check): error on a blueprint cite and a discharged phase verify step

Cite resolvability moves above the blueprints/ferries `continue`, so a
blueprint's or ferry's `cites:` are validated at every status, `implemented`
included; the `no cites:` warning stays gated to warrant pages. A
`type: Roadmap` phase entry carrying both a tick and a `**Verify:**` step
is now an error — the mechanical half of R-020's prune.

Repairs the nine stale cites the new rule makes visible (four dropped,
five repointed onto live text), stops architect contradicting R-020 in
three places, and supersedes the stranded blueprint 020.

Implements blueprint 022.
This commit is contained in:
Łukasz Boryń 2026-07-31 10:12:01 +02:00
parent 1b9aa038b2
commit 4dfe4e200a
12 changed files with 60 additions and 25 deletions

View File

@ -6,7 +6,6 @@ sounded: 2026-07-30
cites: cites:
- skills/productivity/conjure-a-skill/SKILL.md:topic-named siblings - skills/productivity/conjure-a-skill/SKILL.md:topic-named siblings
- skills/loop/write-OKF/scripts/okf-check:cite_resolves - skills/loop/write-OKF/scripts/okf-check:cite_resolves
- CLAUDE.md:EXAMPLES.md
--- ---
# 014 — unify skill sibling-file naming on lowercase-kebab topic names # 014 — unify skill sibling-file naming on lowercase-kebab topic names

View File

@ -9,7 +9,7 @@ cites:
- OKF/decisions/020-every-page-has-a-growth-path.md:twelve pages - OKF/decisions/020-every-page-has-a-growth-path.md:twelve pages
- OKF/blueprints/016-pull-two-skills-under-cap-and-level-commit-twins.md:A line-cap lint - OKF/blueprints/016-pull-two-skills-under-cap-and-level-commit-twins.md:A line-cap lint
- skills/productivity/conjure-a-skill/SKILL.md:exceed 110 lines - skills/productivity/conjure-a-skill/SKILL.md:exceed 110 lines
- skills/productivity/conjure-a-skill/SKILL.md:is ≤ 110 lines - skills/productivity/conjure-a-skill/SKILL.md:≤ 110 lines** — octobot's house cap
- skills/loop/write-OKF/scripts/okf-check:CAP = 110 - skills/loop/write-OKF/scripts/okf-check:CAP = 110
- skills/loop/write-OKF/scripts/okf-check:a check that cannot fail - skills/loop/write-OKF/scripts/okf-check:a check that cannot fail
- skills/loop/write-OKF/SKILL.md:output pasted - skills/loop/write-OKF/SKILL.md:output pasted

View File

@ -10,14 +10,12 @@ cites:
- README.md:### loop — the metaharness spine - README.md:### loop — the metaharness spine
- CLAUDE.md:**The loop.** - CLAUDE.md:**The loop.**
- skills/loop/steer/SKILL.md:## The loop (the metaharness spine) - skills/loop/steer/SKILL.md:## The loop (the metaharness spine)
- skills/loop/steer/SKILL.md:zero context load
- skills/loop/ferry/SKILL.md:more than one agent - skills/loop/ferry/SKILL.md:more than one agent
- skills/loop/call-charon/SKILL.md:implementation spans multiple blueprints - skills/loop/call-charon/SKILL.md:implementation spans multiple blueprints
- skills/loop/moor/SKILL.md:a ferry-traced chain - skills/loop/moor/SKILL.md:a ferry-traced chain
- skills/loop/weave/SKILL.md:Close the loop - skills/loop/weave/SKILL.md:Close the loop
- skills/loop/blueprint/blueprint-format.md:traces-to: - skills/loop/blueprint/blueprint-format.md:traces-to:
- skills/loop/architect/SKILL.md:Owns `OKF/ROADMAP.md` - skills/loop/architect/SKILL.md:Owns `OKF/ROADMAP.md`
- OKF/ROADMAP.md:loop diagram in
--- ---
# 018 — own the loop's shape in ARCHITECTURE flow 1 # 018 — own the loop's shape in ARCHITECTURE flow 1

View File

@ -4,7 +4,6 @@ status: implemented
traces-to: ROADMAP.md phase 11 traces-to: ROADMAP.md phase 11
sounded: 2026-07-30 sounded: 2026-07-30
cites: cites:
- OKF/ROADMAP.md:checked by script
- OKF/blueprints/018-own-the-loop-shape-in-flow-1.md:**The lint.** - OKF/blueprints/018-own-the-loop-shape-in-flow-1.md:**The lint.**
- OKF/blueprints/017-add-a-line-cap-lint-over-skills.md:Why a sibling script - OKF/blueprints/017-add-a-line-cap-lint-over-skills.md:Why a sibling script
- OKF/decisions/016-one-okf-check-validator.md:One `okf-check` validator - OKF/decisions/016-one-okf-check-validator.md:One `okf-check` validator
@ -13,9 +12,9 @@ cites:
- README.md:### loop — the metaharness spine - README.md:### loop — the metaharness spine
- skills/loop/steer/SKILL.md:## The loop - skills/loop/steer/SKILL.md:## The loop
- skills/loop/write-OKF/scripts/okf-check:a check that cannot fail - skills/loop/write-OKF/scripts/okf-check:a check that cannot fail
- skills/loop/write-OKF/SKILL.md:run and its output pasted - skills/loop/write-OKF/SKILL.md:run and output pasted
- skills/productivity/conjure-a-skill/scripts/skill-check:usage: skill-check - skills/productivity/conjure-a-skill/scripts/skill-check:usage: skill-check
- OKF/LEARNINGS.md:Append-only - OKF/learnings/index.md:Append-only
--- ---
# 019 — add a render lint over the loop's shape # 019 — add a render lint over the loop's shape

View File

@ -1,6 +1,6 @@
--- ---
type: Blueprint type: Blueprint
status: locked status: superseded-by-022
traces-to: user request 2026-07-30 traces-to: user request 2026-07-30
sounded: 2026-07-30 sounded: 2026-07-30
cites: cites:
@ -13,7 +13,7 @@ cites:
- skills/loop/write-OKF/split-page.md - skills/loop/write-OKF/split-page.md
- skills/loop/architect/SKILL.md - skills/loop/architect/SKILL.md
- skills/loop/architect/revise.md - skills/loop/architect/revise.md
- OKF/LEARNINGS.md:Append-only - OKF/learnings/index.md:Append-only
--- ---
# 020 — enforce the roadmap prune and validate every page's cites # 020 — enforce the roadmap prune and validate every page's cites

View File

@ -9,7 +9,7 @@ cites:
- skills/loop/write-OKF/scripts/okf-check - skills/loop/write-OKF/scripts/okf-check
- skills/loop/blueprint/blueprint-format.md - skills/loop/blueprint/blueprint-format.md
- OKF/decisions/022-prose-cites-carry-a-register-prefix.md - OKF/decisions/022-prose-cites-carry-a-register-prefix.md
- OKF/LEARNINGS.md - OKF/learnings/index.md
- OKF/index.md - OKF/index.md
- OKF/decisions/020-every-page-has-a-growth-path.md:alone **splits** - OKF/decisions/020-every-page-has-a-growth-path.md:alone **splits**
- OKF/blueprints/020-enforce-the-prune-and-validate-every-cite.md:declaring `cites:` - OKF/blueprints/020-enforce-the-prune-and-validate-every-cite.md:declaring `cites:`

View File

@ -1,6 +1,6 @@
--- ---
type: Blueprint type: Blueprint
status: locked status: implemented
traces-to: user request 2026-07-31 (B-020 stranded by the learnings/ split) traces-to: user request 2026-07-31 (B-020 stranded by the learnings/ split)
sounded: 2026-07-31 sounded: 2026-07-31
cites: cites:

View File

@ -42,9 +42,9 @@ your task needs. Humans welcome too.
- [017](blueprints/017-add-a-line-cap-lint-over-skills.md) — add a line-cap lint over skills/ — implemented - [017](blueprints/017-add-a-line-cap-lint-over-skills.md) — add a line-cap lint over skills/ — implemented
- [018](blueprints/018-own-the-loop-shape-in-flow-1.md) — own the loop's shape in ARCHITECTURE flow 1 — implemented - [018](blueprints/018-own-the-loop-shape-in-flow-1.md) — own the loop's shape in ARCHITECTURE flow 1 — implemented
- [019](blueprints/019-add-a-render-lint-over-the-loop-shape.md) — add a render lint over the loop's shape — implemented - [019](blueprints/019-add-a-render-lint-over-the-loop-shape.md) — add a render lint over the loop's shape — implemented
- [020](blueprints/020-enforce-the-prune-and-validate-every-cite.md) — enforce the roadmap prune and validate every page's cites — locked - [020](blueprints/020-enforce-the-prune-and-validate-every-cite.md) — enforce the roadmap prune and validate every page's cites — superseded-by-022
- [021](blueprints/021-align-validator-and-doctrine.md) — align the validator and the doctrine on splits, prefixes and cites — implemented - [021](blueprints/021-align-validator-and-doctrine.md) — align the validator and the doctrine on splits, prefixes and cites — implemented
- [022](blueprints/022-validate-every-cite-at-every-status.md) — enforce the roadmap prune and validate every cite at every status — locked - [022](blueprints/022-validate-every-cite-at-every-status.md) — enforce the roadmap prune and validate every cite at every status — implemented
## Ferries ## Ferries

View File

@ -58,3 +58,10 @@ status: live
any later blueprint can invalidate; supersession is the only exit, so a any later blueprint can invalidate; supersession is the only exit, so a
blueprint that moves a path owes a check of which locked Verify already blueprint that moves a path owes a check of which locked Verify already
names it. Source: weave of B-021. names it. Source: weave of B-021.
- Believed: validating a blueprint's `cites:` is a cheap lint. True: a
blueprint cites the very text it is about to change, so the weave that
lands it breaks its own pointers and must then repair them — B-022 found
nine stale cites, five of them written by blueprints that had already
weaved. The durable practice is to cite a file the blueprint *edits* by
**path alone**, and spend `:symbol` only on text the change leaves
standing. Source: weave of B-022.

View File

@ -33,7 +33,7 @@ fill the missing sections as deltas, don't restart.
## Why <project> (gap vs prior art) ← gap table with sources ## Why <project> (gap vs prior art) ← gap table with sources
## Locked decisions ← numbered; rationale + reversibility ## Locked decisions ← numbered; rationale + reversibility
## Architecture ← one ASCII sketch + main flow in words ## Architecture ← one ASCII sketch + main flow in words
## Phases ← each ends "**Verify:** <observable check>" ## Phases ← each open one ends "**Verify:** <check>"
## Risks & gotchas ← debunked claims: believed / true / source ## Risks & gotchas ← debunked claims: believed / true / source
## Out of scope ← explicit non-goals ## Out of scope ← explicit non-goals
``` ```
@ -51,7 +51,8 @@ fill the missing sections as deltas, don't restart.
concrete enough that a blueprint can trace to them. concrete enough that a blueprint can trace to them.
## Output / done criteria ## Output / done criteria
- `OKF/ROADMAP.md` matches the skeleton; every phase has a verify step; - `OKF/ROADMAP.md` matches the skeleton; every *open* phase has a verify
step and every discharged one is pruned to `✅ verified <date>, [NNN](…)`;
every locked decision traces to a user answer or sourced finding. every locked decision traces to a user answer or sourced finding.
- Revision: superseded decisions remain visible; every edit traces to a - Revision: superseded decisions remain visible; every edit traces to a
named delta. named delta.

View File

@ -12,8 +12,8 @@ For a roadmap that exists and reality that moved. Formerly
gotchas, scope changes. Ambiguous delta → grill, one question at a gotchas, scope changes. Ambiguous delta → grill, one question at a
time. time.
3. **Apply, smallest edit per delta:** 3. **Apply, smallest edit per delta:**
- Phase done → mark `✅ verified <how>` on its verify line — never - Phase done → *replace* its verify line with `✅ verified <date>,
without naming the observable check that passed. [NNN](blueprints/…)`, R-020's prune — never a tick beside a live step.
- Verify failed → record what failed under the phase; do not delete - Verify failed → record what failed under the phase; do not delete
the phase. Re-plan it only if the user agrees. the phase. Re-plan it only if the user agrees.
- New gotcha/learning → append to *Risks & gotchas* (and mirror to - New gotcha/learning → append to *Risks & gotchas* (and mirror to

View File

@ -2,10 +2,11 @@
"""Validate an OKF bundle. Usage: okf-check <okf-dir> """Validate an OKF bundle. Usage: okf-check <okf-dir>
Errors (exit 1): missing type, missing warrant, duplicate answer, Errors (exit 1): missing type, missing warrant, duplicate answer,
unresolvable cite, unprefixed register cite in prose, malformed unresolvable cite, unprefixed register cite in prose, discharged roadmap
`okf:derived` fence, page unreachable from index.md, page over its line phase keeping a verify step, malformed `okf:derived` fence, page
cap, register index line disagreeing with its decision file, moored ferry unreachable from index.md, page over its line cap, register index line
with a malformed `sealed:` pin or a surviving directory. Warnings disagreeing with its decision file, moored ferry with a malformed
`sealed:` pin or a surviving directory. Warnings
(exit 0): page with no cites, blueprint locked without a `sounded:` stamp. (exit 0): page with no cites, blueprint locked without a `sounded:` stamp.
Pin *shape* only — whether the change id still resolves needs the repo in Pin *shape* only — whether the change id still resolves needs the repo in
@ -172,6 +173,30 @@ def tally(text):
return dict(re.findall(r"([a-z]+):\s*(\S+)", block.group(1))) if block else {} return dict(re.findall(r"([a-z]+):\s*(\S+)", block.group(1))) if block else {}
def check_roadmap(text, rel, errors):
"""A discharged phase keeps no verify step — R-020's prune, mechanised.
A phase entry runs from its `^\\d+\\. ` line to the next such line or the
next `## ` heading, so a wrapped `**Verify:**` still belongs to the phase
above it. The tick says the step ran; where it ran is jj history.
"""
entry = []
def close():
block = "\n".join(entry)
if entry and "✅" in block and "**Verify:**" in block:
errors.append(f"{rel}: discharged phase keeps a verify step: {entry[0][:40]}")
for line in text.splitlines():
phase = re.match(r"\d+\. ", line)
if phase or line.startswith("## "):
close()
entry = [line] if phase else []
elif entry:
entry.append(line)
close()
def check_ferries(okf, errors): def check_ferries(okf, errors):
"""A page directly under ferries/ is a moored ferry: pinned, collapsed.""" """A page directly under ferries/ is a moored ferry: pinned, collapsed."""
ferries = okf / "ferries" ferries = okf / "ferries"
@ -267,6 +292,16 @@ def main(argv):
and not tally(text)): and not tally(text)):
errors.append(f"{rel}: muster: true, implemented without tally:") errors.append(f"{rel}: muster: true, implemented without tally:")
# A cite is a working pointer, so every page carries the rule at
# every status — a blueprint's `cites:` are not frozen by lock.
cites = fields.get("cites") or []
for cite in cites:
if not cite_resolves(cite, page, okf):
errors.append(f"{rel}: unresolvable cite: {cite}")
if fields.get("type") == "Roadmap":
check_roadmap(text, rel, errors)
# The warrant contract covers durable synthesis pages; blueprints # The warrant contract covers durable synthesis pages; blueprints
# and ferries carry their own frontmatter contracts. # and ferries carry their own frontmatter contracts.
if {"blueprints", "ferries"} & set(rel.parts) or page.name == "index.md": if {"blueprints", "ferries"} & set(rel.parts) or page.name == "index.md":
@ -280,12 +315,8 @@ def main(argv):
errors.append(f"{rel}: answers a question {answered[answer]} owns: {answer}") errors.append(f"{rel}: answers a question {answered[answer]} owns: {answer}")
else: else:
answered[answer] = rel answered[answer] = rel
cites = fields.get("cites") or []
if not cites: if not cites:
warnings.append(f"{rel}: no cites:") warnings.append(f"{rel}: no cites:")
for cite in cites:
if not cite_resolves(cite, page, okf):
errors.append(f"{rel}: unresolvable cite: {cite}")
# A prose cite carries its register's prefix. Learnings pages are # A prose cite carries its register's prefix. Learnings pages are
# exempt — append-only by their own header, so their bare numbers # exempt — append-only by their own header, so their bare numbers