Per blueprint 019. ROADMAP phase 11 paired 018's ownership move with a lint "so the copies cannot diverge again", and phase 11 did not verify until it landed. Divergence already happened once — six sites, three forms — and what held them together was 018's Verify, a sed range typed into a blueprint, which expires with it. That check also carried a live defect: `CANON=$(sed -n ...)` yields the empty string on a file missing the block, so both copies compared empty-to-empty and printed `match`. A check that cannot fail is not a check; the script errors on a missing owner block instead. A third script rather than a widened sibling: README.md sits at the repo root, outside `okf-check <okf-dir>` and `skill-check <skills-dir>` both, and widening either one's root changes the argv contract 017 built skill-check to mirror. - feat(write-OKF): add scripts/render-check <repo-root> — OKF/ARCHITECTURE.md is the named owner, copies are discovered by walking *.md, and a file with no such fence is a pointer, which phase 11 declares legal. Three error legs: no owner block (or more than one), a copy diverging byte-for-byte after per-line trailing-whitespace strip, and the retired flat form surviving anywhere. OKF/blueprints/ is skipped — a locked Contract is immutable, so a rule that could turn one red would be unfixable, and blueprints quote retired forms as record. - docs(write-OKF): SKILL.md's done-criterion names both scripts, one line for one line — the page sits at the 110-line cap. - docs(okf): append the learning — a Contract carrying a byte-exact artifact eats the blueprint cap. LEARNINGS.md lands at exactly 110. - docs(okf): phase 11 ticked and pruned to the verified form per 013. implements blueprint 019
5.3 KiB
5.3 KiB
name, description, disable-model-invocation
| name | description | disable-model-invocation |
|---|---|---|
| write-OKF | Scaffold or refresh a project's OKF (open-knowledge-format) wiki — the agent-first knowledge folder at ./OKF/ that AGENTS.md points every agent at before it touches code. | true |
write-OKF
The OKF is a Karpathy-LLM-wiki-style knowledge substrate: dense synthesis, not raw dumps; agents read it before code; every page inspectable, versioned, agent-maintained. Layout and Google-OKF-v0.1 conformance contract: okf-layout.md.
When to use
- User says "scribe OKF", "/write-OKF", "set up the knowledge folder", "refresh the wiki".
- Another loop skill (architect,
weave) requires an
OKF/that is absent or stale.
Mode detection
| State | Mode |
|---|---|
no ./OKF/ |
Scaffold |
./OKF/ exists |
Refresh |
Scaffold mode
- Confirm the first write — creating
OKF/in a repo is a new convention; get a yes before writing anything. - Propose the page plan, don't assume one — run
scripts/okf-scan <repo-root>, show the candidate lines, and let the user cut, rename, and add the spine pages no tree walk can see. What survives becomesindex.md, from templates/. Contract: taxonomy-scan.md. - Materialise what the plan lists and a producer can fill. A page is listed when planned, written when its producer has something to say: SUMMARY from an existing README, ARCHITECTURE bones from the directory tree and manifests, while ROADMAP and CONTEXT stay listed-not-written until architect / model-domain produce them. Never invent facts — an empty section with a TODO beats a fabricated architecture claim, and an unwritten page beats an empty one.
- Wire
AGENTS.md: insert the block from agents-md-hook.md (create the file if absent; append if it exists — never overwrite prose). - Migrate legacy artifacts with consent: root
CONTEXT.md→OKF/CONTEXT.md,docs/Roadmap.md→OKF/ROADMAP.md,docs/adr/→OKF/decisions/. Offer, show the move, wait for yes.
Refresh mode
- Diff wiki against reality: code and manifests on disk,
jj log(orgit log) since the last scribe commit, session learnings. Rescan the page plan —scripts/okf-scan <repo-root>, sorted againstindex.md'smodules//analyses/lines into new / standing / unwarranted, and locked by the user as at scaffold; nothing is added or removed unasked. An unwarranted page is deleted only when wholly derived, else superseded per step 3. Contract: taxonomy-scan.md. - Smallest edit per delta — never rewrite a page wholesale; a page over its cap splits per split-page.md, alone.
- Supersede, don't delete: outdated claims get struck with a pointer to the replacement, mirroring architect/revise.md discipline.
- Every ARCHITECTURE.md claim must be traceable to a file — cite
path:symbolwhen a symbol carries the claim,pathorpath:lineotherwise; grammar in okf-layout.md. A claim you can't cite doesn't go in. - Keep
index.mdcomplete: every page and everyblueprints/entry listed, one line each (NNN — title — status); every ferry one line, in the shape its state calls for per okf-layout.md. - Resolve the pins: for each moored
ferries/<topic>.md, check itssealed:change id against the repo and report DRIFT if it is gone.okf-checkvalidates the pin's shape; only refresh can resolve it. DRIFT stops at pins — a cite needs no repo, sookf-checkowns cite drift whole. - Regenerate inside the fences only: a page's
okf:derivedregion is rewritten wholesale, and every byte outside it is judgement zone — append or supersede, never scan-edit. An unfenced page is all judgement.
Output / done criteria
scripts/okf-check <okf-dir>andscripts/render-check <repo-root>run and output pasted, exiting 0 — invoke by this skill's own base directory,skills/loop/...being octobot-only. Claims are not gates.OKF/matches okf-layout.md including its conformance block;index.mdlinks every page that exists.AGENTS.mdcarries the hook block.- Scaffold: no fabricated content — unfillable sections carry
TODO(scribe). - Refresh: every edit traces to a named delta (commit, file, or session fact); superseded claims remain visible.
- Nothing committed — hand to
commit-atomic-jj
(
docs(okf): ...).
Guardrails
- Never fabricate architecture, dependencies, or domain terms.
- Never duplicate content between pages — one fact, one home, cross-link the rest.
- Never write raw logs, transcripts, or scratch into OKF — durable synthesis only.
- Never exceed a page's cap — split per split-page.md.
- Never move legacy files without explicit consent.
See also
- ../architect/SKILL.md — writes ROADMAP.md.
- ../blueprint/SKILL.md — writes blueprints/.
- ../../engineering/model-domain/SKILL.md — owns CONTEXT.md content; scribe only places it.