Part of the Brain ⇄ OKF compatibility effort (plan: docs/brain-okf-compat.md).
Why
OKF §9 defines conformance (parseable frontmatter, non-empty type, reserved files follow §6/§7) and a consumer-tolerance contract (tolerate missing optional fields, unknown type, unknown keys, broken links, missing index.md). §11 declares okf_version. Formalizing this turns "convention" into a checkable contract and lets us assert the tree is a conformant OKF bundle.
Scope
- A conformance pass folded into
brain.curate (or a brain.okf_check tool): flag every non-reserved .md lacking parseable frontmatter or a non-empty type; verify reserved files (index.md/log.md) match OKF shape.
- Auto-fix: back-fill a folder-derived
type for legacy/unconformant files (additive, safe) — this is the migration path for pre-OKF trees.
- Declare
okf_version: "0.1" at each scope-root index.
- Document the consumer-tolerance rules in the brain SKILL +
brain-implementation.md.
Acceptance criteria
Files (likely)
packages/@boringos/brain/src/curate.ts (+ optional okf.ts), packages/@boringos/core/src/modules/brain.ts, docs.
Part of the Brain ⇄ OKF compatibility effort (plan:
docs/brain-okf-compat.md).Why
OKF §9 defines conformance (parseable frontmatter, non-empty
type, reserved files follow §6/§7) and a consumer-tolerance contract (tolerate missing optional fields, unknowntype, unknown keys, broken links, missingindex.md). §11 declaresokf_version. Formalizing this turns "convention" into a checkable contract and lets us assert the tree is a conformant OKF bundle.Scope
brain.curate(or abrain.okf_checktool): flag every non-reserved.mdlacking parseable frontmatter or a non-emptytype; verify reserved files (index.md/log.md) match OKF shape.typefor legacy/unconformant files (additive, safe) — this is the migration path for pre-OKF trees.okf_version: "0.1"at each scope-root index.brain-implementation.md.Acceptance criteria
brain.curatereports non-conformant files and auto-fills a folder-derivedtype.typeis flagged then back-filled; re-run is clean.okf_versionpresent at the scope root.Files (likely)
packages/@boringos/brain/src/curate.ts(+ optionalokf.ts),packages/@boringos/core/src/modules/brain.ts, docs.