chore(knowledge): make the knowledge bundle actually OKF v0.2 conformant#2206
Merged
Conversation
The specs-to-knowledge migration adopted OKF in name only: concepts carried title/summary frontmatter with no 'type' (the sole required OKF key), index.md files carried frontmatter and prose, and nothing validated the bundle. - Add required 'type' to every concept; rename 'summary' to 'description'. - Strip frontmatter from reserved index.md files; declare okf_version at root. - Reshape index bodies into the spec's link-list form. - Move maintenance rules out of index.md into knowledge/knowledge-contract.md. - Describe the generated builtin inventory as a concept; add knowledge/log.md. - Add scripts/check_okf.py + tests, wired into 'just check' and CI lint.
Evaluated four OKF implementations against the bundle and against a fixture per regression class. okf-lint is the only one that enforces the reserved index.md/log.md structures, cites spec sections, and ships on crates.io. It does not subsume scripts/check_okf.py: it accepts 'summary' in place of 'description' and concepts missing from index.md, the former being the defect the original migration shipped. Both now run in CI and in 'just check-okf'. Also drops a stray double blank line okf-lint flagged.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
bashkit | 890bc7b | Commit Preview URL Branch Preview URL |
Jul 26 2026, 12:40 AM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
The
specs/→knowledge/migration (#2202) adopted OKF in name only. This makes the bundle conform to OKF v0.2 and adds a gate so it stays that way.Four spec violations, every one of which made the bundle non-conformant:
typeon any concept — the only always-required key, so zero documents conformedtypeon all 31 conceptssummary:— not an OKF fielddescription:index.mdfiles carriedtitle/summary/tagsfrontmatterokf_versionokf_version: "0.2"* [Title](url) - descriptionsectionsAlongside that:
index.md(prose does not belong in a reserved index) intoknowledge/knowledge-contract.md, which also records the OKF rules and the type vocabulary.AGENTS.mdpoints there.knowledge/status/builtins.jsonwas an unreferenced blob; it is now described by aGenerated Inventoryconcept withresource:pointing at it.knowledge/log.md(§9 date-grouped history).Enforcement is two checks that cover different things:
okf-lint0.1.1 (crates.io, pinned) — upstream spec gate. It enforces the reservedindex.md/log.mdstructures and cites the spec section in every diagnostic.scripts/check_okf.py— no dependencies, covers the bundle-local conventions okf-lint does not:description(notsummary), and every concept listed in its directory'sindex.md.Both run in the CI lint job and in
just check-okf(wired intojust check).Why
An OKF bundle that no OKF consumer would accept is worse than not claiming the format: agents and tooling route on
type, and every document was missing it. Nothing validated the bundle, so the defects shipped silently.Before / After
Conformance, checked with the upstream linter:
Four OKF implementations were built and run against the bundle and against a fixture per regression class, to pick the gate.
fail= regression caught,pass= slipped through:okfokftoolokf-lintcheck_okf.pytypesummaryinstead ofdescriptionindex.mdindex.mdlog.mdheading notYYYY-MM-DDokf-lintis the strongest available and is adopted. It does not subsume the local check: the two rows it lets through are bundle-local conventions, and the first is exactly the defect #2202 shipped. The rejected alternatives are recorded with rationale inknowledge/knowledge-contract.md—okftooltreats everything buttypeas advisory,okfimplements OKF v0.1 (wrong revision for this bundle), andokflintvalidates against a hand-authored manifest rather than the spec and needs Python 3.12+ against this repo's 3.9 floor.No runtime behavior changes: no
.rsfiles are touched.just pre-prgreen, includingcargo vet.Risk
cargo install okf-lint --version 0.1.1 --lockedin the lint job. It is a lint tool, not a workspace dependency, sodeny.toml/cargo vetare unaffected. Failure mode is a red lint job; removing the two lines reverts it. The version is pinned in bothci.ymland thejustfileand must be bumped together.--max-line-length 10000effectively disables okf-lint's line-length rule; knowledge docs wrap prose at author discretion, and the rule otherwise fires 183 times.Checklist
scripts/tests/test_check_okf.py, one case per rejection class plus a positive control, asunittest.TestCasesounittest discoveractually executes themGenerated by Claude Code