Repository navigation
Description
Summary
Add an explicit CLI boundary for producing and validating Open Knowledge Format (OKF) v0.2 bundles.
This is the remaining producer/conformance work split from #1246. Basic Memory already consumes project-local Markdown links as graph relations and preserves its wikilink-native canonical note format. The live Wiki projector is a Basic Memory view, not the interchange artifact.
Proposed commands
bm okf export— render a project into a static, self-contained OKF bundle.bm okf check— validate a bundle against the supported OKF structural contract.
The final command shape can differ if it fits the existing CLI better, but export and validation should remain an explicit boundary rather than a project-wide canonical syntax mode.
Export requirements
- Emit standard Markdown links for graph relationships.
- Preserve useful Basic Memory semantics through a documented
bmextension namespace where OKF has no native equivalent, including typed relation/context and observation categories. - Emit conformant reserved files:
index.mdhas no frontmatter except optional rootokf_version;index.mdentries use standard Markdown links;log.mdhas no frontmatter and uses ISOYYYY-MM-DDsections;index.mdandlog.mdare not concept documents.
- Leave canonical project files unchanged.
- Produce deterministic output for the same accepted project state.
Check requirements
Validate at least the normative OKF v0.2 structural rules:
- every non-reserved Markdown file has parseable YAML frontmatter;
- every concept has a non-empty
type; - reserved
index.mdandlog.mdfiles follow their required structure.
Diagnostics must name the offending file and rule. Validation must not reject unknown types, unknown frontmatter keys, missing optional fields, broken cross-links, or missing indexes.
Compatibility verification
- Exercise an exported Basic Memory fixture against a pinned upstream OKF consumer/reference implementation.
- Assert the expected concept count so silently skipped parse failures cannot look like success.
- Validate and ingest a pinned upstream sample bundle, then prove project-local links are searchable/retrievable.
- Keep the pin explicit: passing a permissive viewer is compatibility evidence, not a substitute for
bm okf check.
Out of scope
- A
relation_link_styleswitch for canonical Basic Memory notes. - Rewriting existing project files in place.
- Making the live Wiki projector itself strict OKF output.
- Runtime execution or attestation support beyond preserving supported frontmatter.
References
- [FEATURE] opt-in Open Knowledge Format (OKF) conformance for the note format #1246
- OKF v0.2 specification
- feat(core): index Markdown links to project files #1514
- feat(core): add PDF page citations to document observations #1490
- feat(core): add deterministic wiki projector #1381
- refactor(core): converge wiki logs on the accepted-change vocabulary #1396
Activity
claude commentedon Sep 14, 2026
Claude finished @phernandez's task in 32s —— View job
Triage
Type: Enhancement — a feature request for new
bm okf export/bm okf checkCLI commands and their supporting export/validation logic. No defect is reported.Component: CLI commands (new
okfsubcommand group), touching the markdown export/serialization and validation layers. Not cloud-specific, so nocloudlabel applied.Priority: Medium. This is scoped producer/conformance follow-on work split from #1246 rather than a fix for broken or blocking functionality; it extends interop rather than addressing a regression.
Complexity: Complex. The request spans a new export pipeline (standard-Markdown-link rendering, a documented
bmextension namespace, conformantindex.md/log.mdreserved-file emission, deterministic output), a structural validator with precise diagnostics, and compatibility verification against a pinned external OKF reference implementation and a pinned upstream sample bundle — each a substantial, separately testable piece of work.Duplicates: None found. Searched issues for "OKF" — only #1246 (closed, the issue this work was split from) is related; the referenced PRs (#1514, #1490, #1381, #1396) are merged foundational work, not open duplicates.
Scope is already well-defined. The issue lays out clear export requirements, check requirements, and explicit out-of-scope items (no
relation_link_styleswitch, no in-place rewriting, no strict-OKF Wiki projector, no runtime/attestation support), so no clarifying questions are needed before implementation planning.Labels applied:
enhancement.phernandez commentedon Sep 14, 2026
Milestone status (2026-09-14): ready for implementation; no PR exists yet.
This is the focused remainder split from #1246. Consumer-side Markdown-link interoperability is already merged; this issue owns only the static producer/validator boundary: deterministic
bm okf export, strictbm okf check, conformant reserved files, and pinned upstream compatibility fixtures.Next step: design the export value model and validator as separate testable layers, then expose them through the CLI. Do not change canonical Basic Memory syntax or make the live Wiki projector double as the export format.
docs(core): cut the v0.24.0 changelog