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>
4.1 KiB
4.1 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. - Materialise the skeleton from templates/ — headers,
typefrontmatter, andTODO(scribe)markers only. Never invent facts: an empty section with a TODO beats a fabricated architecture claim. - Fill only what is derivable from disk right now: SUMMARY from an existing README, ARCHITECTURE bones from the directory tree and manifests, ROADMAP/CONTEXT stay TODO until architect / model-domain produce them.
- 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. - Smallest edit per delta — never rewrite a page wholesale.
- 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(orpath:line) inline. 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.
Output / done criteria
scripts/okf-check <okf-dir>run and its output pasted, exiting 0. Invoke it by this skill's own base directory —skills/loop/...resolves only inside octobot. A claim of conformance is not a gate.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 110 lines per page — split and index instead.
- 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.