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
bm extension namespace where OKF has no native equivalent, including typed relation/context and observation categories.
- Emit conformant reserved files:
index.md has no frontmatter except optional root okf_version;
index.md entries use standard Markdown links;
log.md has no frontmatter and uses ISO YYYY-MM-DD sections;
index.md and log.md are 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.md and log.md files 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_style switch 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
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
bmextension namespace where OKF has no native equivalent, including typed relation/context and observation categories.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.Check requirements
Validate at least the normative OKF v0.2 structural rules:
type;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
bm okf check.Out of scope
relation_link_styleswitch for canonical Basic Memory notes.References