/okf-skills:okf-bundlefrom okf-skills
Scaffold or restructure an Open Knowledge Format bundle — the directory layout, the reserved files and their constraints, link conventions, versioning, and gate wiring. Use when creating a new OKF bundle, extracting one from a parent repository, or auditing an existing bundle's structure.
Ships in okf-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A bundle is a directory tree of Markdown concepts plus the metadata a consumer needs to judge them.
OKF calls it the unit of distribution, which is the property that should drive every structural
decision here: if it cannot leave the repository it was written in, it is not a bundle, it is a
docs/ folder.
Not for: writing the concepts themselves (okf-concept) or running the review cycle
(okf-verify).
<bundle-repo>/
├── CLAUDE.md # conventions: type vocabulary, stale_after tiers, link rules
├── CHANGELOG.md # releases, Keep a Changelog
├── knowledge/ # THE BUNDLE — this is what gets distributed
│ ├── index.md # bundle root: okf_version, then links out
│ ├── log.md # content changes; ISO date headings (§9) + a release map in the preamble
│ ├── landscape.md # optional: the read-straight-through explanation
│ └── <theme>/
│ ├── index.md # subdirectory index — NO frontmatter
│ └── <concept>.md
└── .lefthook.yml # gates
knowledge/ is the bundle. Everything above it is repository furniture that a consumer copying the
bundle will not receive — which is the constraint that drives the versioning decision below.
index.md and log.md are reserved by the specification. The constraints on index.md are easy to
break and are not enforced by generic Markdown tooling:
okf_version is permitted only in the bundle-root index.md (§8), and it declares which
specification revision the bundle targets. It is not a content version.index.md takes no frontmatter at all.log.md headings MUST be ISO 8601 dates (§9) — see Versioning below, where this bites.No gate reads an index.md heading. okf validate and okf lint both pass on a subdirectory
index whose title is wrong, misspelled or empty, and the link checker does not open index.md at all
— so a broken link inside an index is invisible to it too. These are the files where the tooling
stops helping, and the only ones that need reading with eyes before release.
Observed: four of six category indexes in a bundle shipped headed # Uarchitecture, # Uinception,
# Ulearning, # Uorchestration. Every gate passed. Only the two written by hand were correct.
The cause is worth knowing, because it is not an OKF problem. Those headings were generated with
sed 's/^./\U&/' to capitalise the directory name. \U is a GNU sed extension; BSD sed — the
default sed on macOS — has no case-conversion escape and emits the letter literally:
echo architecture | sed 's/^./\U&/' # BSD → Uarchitecture ← silently wrong
echo architecture | gsed 's/^./\U&/' # GNU → Architecture
It fails plausibly rather than loudly, which is why it survived. When scaffolding index files, write
the headings by hand — there are six of them, once — or capitalise in the shell (${name^}, bash 4+)
rather than reaching for a sed escape whose availability varies by platform.
The section above says no gate reads an index.md heading. The same gap runs deeper: no gate
compares an index's claims to the corpus it indexes. An index that only links onward cannot drift.
One that also characterises the collection — how many concepts, how many verified, what state the
whole is in — holds a second copy of facts that live in the concept files, and nothing will ever tell
you the two disagree.
Three observed failures, in escalating subtlety:
Prefer describing the kind of evidence over quantifying it. "One concept is measured against running software; the rest rest on specification text" stays true when a concept is added, because it describes a distribution rather than a tally. If a number really is the point, put it where it is derived — a command in the prose that the reader can run — rather than in a sentence that has to be maintained.
The moment to re-read the index is the moment you finish changing concepts, which is exactly when
attention has moved on. okf-verify puts it in the release step for that reason.
index.mdThe three failures above are all tallies, and a reader who takes them as the pattern will search for numbers. A corpus audited on 2026-08-26 found nineteen false or superseded summary claims, and most of them were not counts. They were claims a concept had already corrected in its own body:
A concept's line 4 read "neither European body lists it at all". Line 67 of the same file opened: "This record said neither European body lists SUSI. That was wrong." The correction reached the body and never the summary.
Six kinds of file hold a summary, and only one of them is index.md:
a concept's description: | OKF §4.1 frontmatter, and the field most likely to be written once |
a subdirectory index.md entry, and that file's prose | |
the bundle-root index.md | where it characterises the corpus |
a read-straight-through explanation — its body as well as its own description: | in the audit above, the body carried five faults and the description one |
| a chronology or timeline, if one exists | a copied event is still a copy |
any declared-exception file the bundle keeps beside knowledge/ | a declaration outlives the claim it was made for |
⚠ The diagnostic, because nineteen of nineteen shared it: when a concept records that it was wrong about something, search the whole corpus for the thing it was wrong about. Corrections travel to the body and stop. This is cheaper than re-reading everything and finds the class that matters.
⚠ A count and its list are two places. A list of five items under a lead-in reading four kinds was produced by the very release auditing that corpus for summary drift — the bullet was added and the lead-in was not. Editing a list means editing its lead-in.
⚠ verified drifts the same way and okf does not check it. OKF §5.2 constrains the timestamp's
form, not whether it matches the last substantive edit. Two concepts in that audit were rewritten
while their newest verified.at was three days old. Add the entry in the same pass as the edit.
Two mechanical checks were designed and measured before being refused, and the measurements are worth having because the ideas are obvious:
Write down the occasion and the file list instead. A rule that names one file of six will be followed and still miss five, which is what the audit found: the rule existed, and nineteen faults accumulated under it.
A bundle sometimes cannot cite anything a reader can open. The material came from private repositories, or a client engagement, or internal incidents, and the sources were anonymised — often to reserved documentation hosts under RFC 2606 — so the bundle could be distributed at all.
That is a legitimate trade and it is invisible from inside the bundle. Every concept still shows a citation on every claim. A reader can work through a dozen of them, see sourcing throughout, and never learn that following any of it is impossible.
Say it in the index, in the reader's terms, not in a note at the end of one concept and not only in the tooling's output. Three things are worth stating plainly:
The tooling will report it too: a quotation checker that finds nothing to check is telling you the same thing. Tooling output is not where a reader meets a bundle, and a count of unverifiable in a build log has never persuaded anyone of anything.
OKF requires type and constrains no value. Setting type: Bananas on a concept passes both
okf validate and okf lint with zero errors and zero warnings — run rather than assumed. So §4.1
guarantees the field exists and guarantees nothing about what goes in it, and by default nothing
stands between a deliberate new type and a typo.
Declare the vocabulary in a plain list beside knowledge/, one type per line — beside, not
inside, because it is a maintenance constraint rather than something a reader of a copied tree
needs. Then check it in both directions:
| Direction | What it catches |
|---|---|
| used but not declared | a typo, and any new type introduced without a decision |
| declared but not used | drift — a vocabulary that outlived the concepts it described |
The second direction is the one usually skipped and the one that pays. Two failures it catches:
Do not declare a type before a concept uses it. A type reserved for a file you intend to write is drift by this rule, and the check will say so. Withhold it until the file exists; the ceremony of adding one line is the point, because a new type is a decision rather than a side effect.
Write the admission test before the first concept, and write it somewhere that is not the bundle.
A corpus grows by individually-defensible additions: each new subject is plausibly related, and the result is a bundle nobody can keep current. The defence is a stated test that a candidate either passes or fails, applied when the subject is proposed rather than after it is written.
A worked example, from a corpus about how bills of materials are obliged:
Does the instrument change what a bill of materials must contain, or when one must exist?
That test excluded material that was genuinely interesting and genuinely adjacent. That is what a test is for.
Decisions about the corpus do not belong in the corpus. Scope boundary, admission test, pruning criterion and licence reasoning are decisions — put them in the governing project's decision log. The bundle carries knowledge; a reader fetching it should not receive your ADRs.
/ meaning the bundle root — /naming/purl.md — not the
filesystem root./ does not cross bundle boundaries. Two bundles sitting side by side on disk are still two
units of distribution; a link from one into the other breaks the moment either is fetched alone.
Cite the other bundle in prose, naming it.OKF has no in-band content-version field. okf_version is the specification revision, and it is
the only frontmatter an index.md may carry (§8) — so there is no conformant field for "which
release of this corpus is this".
A git tag does not solve it. A tag is a property of the repository; the bundle is knowledge/. A
tree copied into a container, vendored, or pasted into a context window arrives with no version at
all.
Do not reach for a release heading in log.md. It is the obvious move and the spec forbids it:
§9: Date headings MUST use ISO 8601
YYYY-MM-DDform.
This was tried on two bundles on 2026-08-03, on the assumption that log.md bodies are unconstrained
prose. That assumption came from reading §5 and §8 and not reading §9. okf validate reported it as
six errors per bundle.
The deeper constraint is worth understanding rather than working around: OKF's log model is date-grouped, not release-grouped. Five releases landing on one day share one heading and become indistinguishable. Per-entry release attribution is not expressible in a conformant log — the format has no concept of a release anywhere.
What is conformant: a release map in the preamble, which is unconstrained prose.
# Bundle Update Log
**Releases**, newest first: **v0.5.0** 2026-08-02 · **v0.4.0** 2026-08-02 · **v0.1.0** 2026-08-01.
Unreleased work sits at the top of the newest date.
## 2026-08-03
* **Corrected**: …
## 2026-08-02
* **Added**: …
Update the map when cutting a release. CHANGELOG.md stays as the repository-level view.
Be honest about what this buys: a local convention that nothing validates and no consumer knows to look for. It survives a copy. It is not interoperability.
SemVer's contract is about breaking a build; a knowledge bundle has no build. Define the surface explicitly or the number carries nothing:
| Event | |
|---|---|
| MAJOR | a concept removed or moved (its path is its identifier), or a claim reversed |
| MINOR | concepts added, or one rewritten with its claims intact |
| PATCH | re-verification, added sources, expiry extension, prose fixes |
The reversal case is the one the number handles badly: a claim can flip at a stable path, which is mechanically invisible. The changelog carries what the number cannot — write the reversal out, name what it invalidates, and accept that the number is only an ordering.
A bundle needs two kinds of check, and one of them cannot be a hook:
| When | Checks | Catches |
|---|---|---|
| every commit | conformance, attribution, links, date format | anything a change breaks |
| scheduled, unattended | stale_after expiry | a corpus going stale with no commits |
Expiry is a function of today's date, not of a diff. A concept expires on a repository nobody is
committing to, so no commit hook will ever fire for it. Wire a scheduled run — launchd, cron, or
a CI schedule — and make its failure visible somewhere a human looks.
okf validate exits 0 on most of what it finds — footnote faults, dead links in a concept
body, expiry — so a hook that reads only its exit code passes a broken bundle. okf-quality gives
the gates that read the findings instead, and the self-test that proves they can fail.
If the checkers live outside the bundle repository, fail loudly when they are absent rather than skipping. A gate that quietly does nothing is worse than no gate: it reports success.
Use okf — do not hand-roll conformance. The vendor-neutral Go CLI
(okfcli/okf) validates the spec far more thoroughly than a local
script will: §5.2 ISO datetimes, §5.5 expiry, §8 index frontmatter, §9 log headings, and link
resolution. It is one static binary, emits JSON, and exits non-zero on error.
go install github.com/okfcli/okf/cmd/okf@latest # or fetch a signed release + verify checksums
BUNDLE=knowledge
okf validate "$BUNDLE" # exit 1 on any ERROR — and 0 on warnings; see okf-quality
okf lint "$BUNDLE" # recommended fields; footnote -> sources[].id join (§5.1)
Expected on a clean bundle: "errors": 0 and an empty findings array from both.
Then the release map, which is a local convention and therefore nobody else's job to check:
grep -qE '^\*\*Releases\*\*' "$BUNDLE/log.md" \
&& echo "release map present — a detached copy can name its version" \
|| echo "FAIL: no release map in log.md preamble"
# and confirm no heading violates §9, which is what a release heading would do
grep -nE '^## ' "$BUNDLE/log.md" | grep -vE '^[0-9]+:## [0-9]{4}-[0-9]{2}-[0-9]{2}$' \
&& echo "FAIL: non-ISO date heading above (OKF §9)" \
|| echo "all log.md headings are ISO dates"
knowledge/ only makes sense inside the repository
that holds it, it is documentation with extra frontmatter.okf_version in a subdirectory index, or any other frontmatter there (§8).log.md — ## v0.5.0 — 2026-08-02. §9 says date headings MUST be ISO
8601 YYYY-MM-DD, so this is a spec violation however sensible it looks. Put the release map in
the preamble.okf validate exists, covers more of the spec than a local
script will, and is maintained by people reading the spec. Write local checks only for what it
does not cover.docs/ tree. Reference facts belong in the bundle; decisions belong in the governing
project. A third location is where drift starts.okf-concept — write the concepts this structure holdsokf-quality — the gates: what fails a commit, what runs on a scheduleokf-verify — the cycle that keeps them truebootstrap-project (project-orchestration-skills) — tier, distribution profile and the repository
furniture around the bundleWhat SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
4 skills in this plugin
/okf-conceptAuthor or revise a single concept in an Open Knowledge Format bundle. Use when adding a concept to an OKF bundle, correcting one, deciding whether a subject earns a file at all, choosing its `stale_after`, or wiring per-claim attribution between footnotes and `sources`.
/okf-qualityWire the quality gates for an OKF bundle repository — which checks run on every commit, which run on a schedule, and how to make the `okf` CLI fail a build, because it exits 0 on warnings. Use when creating a bundle repository, adding hooks or CI to an existing one, after a gate passed something it should have failed, or when scheduling the expiry sweep. Complements setup-git-hooks with the checks only a bundle needs.
/okf-verifyRun the re-verification cycle over an OKF bundle — triage by expiry, re-check claims against upstream, run a version-currency sweep, prune what no longer earns its place, and stamp the release. Use when concepts are approaching `stale_after`, after a scheduled gate reports expiry, or before cutting a bundle release.
okf-skills@jrjsmrtn-skills is listed by jrjsmrtn/jrjsmrtn-skills — review the source before installing
npx claudepluginhub jrjsmrtn/jrjsmrtn-skills --plugin okf-skills