12 Commits

Author SHA1 Message Date
b6bc88ca29 docs(blueprint): implement blueprint 030
Filename search needs the prefix on disk, not just in prose; a bare
NNN can't tell decisions and blueprints apart by ls or grep.

* refactor(okf): rename decision and blueprint files to R-/B- prefix
* fix(write-OKF): recognize R-/B- filenames in register_numbers
* docs(blueprint): fix numbering step and filename-pattern docs
2026-09-23 14:50:22 +02:00
5535d89963 feat(lints): okf-check validates OKF directory completeness
- feat(lints): error on an OKF/ directory holding .md files with no
  index.md (open ferry topic dirs may carry MAP.md instead)
- feat(lints): error on an index.md not directly linking every .md file
  beside it
- docs(okf): add blueprints/index.md and ferries/index.md, delegating
  from OKF/index.md the way decisions/ and learnings/ already do

implements blueprint 029
2026-09-23 13:04:01 +02:00
68c8c18d0d feat(lints): error when a mustered blueprint reaches implemented on matches: no
okf-check only checked that a mustered blueprint carried a tally: block
before implemented, never what it said. tally: matches: no is a non-empty
block, so it passed the same check a missing block failed — the muster
gate silently let a known miss through.

The check now reads the verdict: matches: no on an implemented, mustered
blueprint is now an error distinct from the missing-tally: one; matches:
yes and everything else are untouched. Verified against a fixture and the
real tree per blueprint 027 §Verify.

027 traces to a user request, carries muster: false (the Verify proves
the exact fixed case, not just tree-green), and flips to implemented.
Filed as a learning at OKF/learnings/validators.md — presence of a field
is not a verdict on it.

implements blueprint 027
2026-09-23 10:08:17 +02:00
4dfe4e200a 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.
2026-07-31 10:16:24 +02:00
51ffca5a6a feat(okf-check): error on an unprefixed register cite in prose
R-022 ruled that a prose cite carries its register's prefix — B-NNN for a
blueprint, R-NNN for the why-register — and its own Consequences noted
nothing enforced it. This is the enforcement: a bare three-digit run
naming a live file in either register, standing in the body of a root or
decisions/ page, is an error.

The exclusions are the rule's hard half and all mechanical: frontmatter,
fenced blocks, code spans, whole markdown links (the path already says
which register), the page's own H1, a number touching / - . or a word
character, and type: Learnings pages — append-only by their own header,
per R-022 §Consequences. Typing that last exemption rather than naming
LEARNINGS.md is what will survive the split into learnings/<theme>.md.

Blueprints and ferries sit outside the check for the same reason their
warrants do: a locked blueprint's prose cannot be legally repaired.

One live site fired — R-022's own example sentence naming the three
collided numbers — repaired with code spans, which the rule permits.

blueprint 021, rule 2.
2026-07-30 20:29:30 +02:00
3421847c15 feat(loop): add blueprint-level muster, the human review gate in weave
implements blueprint 011:
- okf-check: error on muster+implemented without a tally: (pin-style parser)
- weave: Muster step halts after the seal; review-base recorded at Frame
- blueprint-format, okf-layout: document muster / review-base / tally
2026-07-24 10:38:32 +02:00
e66be91c73 feat(write-OKF): enforce the line cap by giving every page a growth path
- 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
2026-07-24 00:17:37 +02:00
aa61a3f51f fix(okf-check): treat a cite line range as a reading aid, not a symbol
A `path:92-97` cite fell through the `isdigit()` suffix rule and was
matched as a literal symbol, so it could never resolve. Line ranges are
the same reading aid a bare line number is, and are idiomatic in this
repo prose, so the grammar now admits `N` and `N-M` alike.
2026-07-22 14:17:24 +02:00
6441d0f425 feat(sound): add verified recon before a blueprint locks
New `skills/loop/sound/` — a three-step spine run in order: read the OKF
pages the question touches, query the nostos MCP server when one is
configured, then confirm both against live code, because either can have
gone stale. A claim with no internal owner is followed to its primary
source; nothing else leaves the repo.

Two mouths, per 019. Reached by name it refines the blueprint it sounded
and stamps `sounded: <date>`; self-fired it reports and writes nothing —
a stamp a self-fire cannot make is a stamp a lock can trust. It is the
loop's only model-invoked skill, so README's "All loop skills are
user-invoked" and ARCHITECTURE's invocation seam both stop being true
and are corrected here.

Sounding becomes a precondition of lock: okf-check warns `locked without
sounded:` on a locked blueprint carrying no stamp — never at draft
(not-yet-sounded is correct there) nor at implemented (it would
retro-flag 002-006). Warning, not error, so exit status stays 0.

Implements blueprint 007. The script leg of its Verify is green; the
four session checks need fresh sessions and stay open in ROADMAP.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-22 13:23:18 +02:00
1b6a5c3ae8 feat(write-OKF): give cites teeth and fence the derived zone
Blueprint 004. A `cites:` entry now takes three shapes: `path`,
`path:line` (the number is a reading aid, never validated), and
`path:symbol`, which resolves only if the symbol is a literal substring
of the file — so a cite breaks when the thing it cites moves.

Cite drift belongs to okf-check, not refresh: a cite needs only the
working tree, so decision 017's visibility split leaves refresh's DRIFT
rule covering `sealed:` pins alone.

okf-check also validates derived-zone shape — at most one begin/end pair
per page, begin first — with each marker anchored to its whole line, so
a page that documents the markers is not fenced by mentioning them.

The warrant contract and the `sealed:` block move to page-warrant.md,
buying okf-layout.md the headroom for the two new contracts. ROADMAP
phase 6 records its split into 004 (cites + fences) and 005 (taxonomy
scan) and corrects the two Verify clauses this change made false.

Blueprint 004's Verify: PASS.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-22 00:45:22 +02:00
2e9e6a7f44 feat(moor): graduate ferry decisions and collapse the moored ferry
Implements blueprint 003, phase 7's second half. moor gains two steps:
every resolved D-<n> that passes the warrant test graduates into the
why-register at the next free number, resolution body verbatim and
blocked-by edges dropped; then ferries/<topic>/ collapses into
ferries/<topic>.md carrying a sealed: pin (jj change id, git hash, ISO
date) read off @-, since the sealing commit cannot name itself.
Directory means open, file means moored, so `ls OKF/ferries/` finally
answers what deliberation is in flight.

Both guardrails that contradicted decisions 14/15 narrow rather than
gain exceptions: never collapse without a resolvable pin, never graduate
a decision that fails the warrant test. Done-criteria gate on okf-check,
deferred from blueprint 002 pending this rule.

okf-check learns the ferry shape rule — a page directly under ferries/
carries all three sealed: fields with a hex hash and an ISO date, and
may not coexist with its directory. Shape only: resolving the pin needs
the repo in hand, so refresh owns it, and a validator that cannot exit 0
on a tree copied outside its jj repo trains people to ignore it. That
split earns decision 017.

Verified against a throwaway scratch jj repo moored by hand per the
rewritten SKILL.md: blueprint 003's Verify block PASS, okf-check clean
on the fixture and on OKF/, moor at 106 lines and ROADMAP at 106.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-22 00:28:33 +02:00
4dd65c22be feat(write-OKF): add the okf-check validator
Errors on a missing type, a missing or duplicate warrant, an unresolvable
cite, a page unreachable from index.md, and a register index line that
disagrees with its decision file. Over-cap pages and pages with no cites
warn, so the validator exits 0 on a clean tree.

Stdlib only; the OKF directory is an argument, so callers reach it from
the skill base directory rather than a repo-relative path.

implements blueprint 002
2026-07-21 23:04:50 +02:00