my_bundle/what-okf-is.mdtype: Guide

A knowledge format you can cat.

The Open Knowledge Format v0.1 is Google's open, human- and agent-friendly format for representing knowledge as a directory of markdown files with YAML frontmatter. It is intentionally minimal — and OKF4net implements all of it.

##

Terminology

§2–§3 — bundle, concept, id
bundle

A directory tree of UTF-8 markdown files — the unit of distribution. Ship it with git clone, read it with cat.

concept

One markdown document: a YAML frontmatter block delimited by ---, followed by a markdown body.

concept id

The file's path within the bundle with .md removed: tables/users.md tables/users.

cross-links

Concepts link via ordinary markdown links — absolute (/tables/users.md, bundle-relative) or relative (./other.md). Backlinks are derived.

##

Reserved files

§6–§7 — index.md, log.md

Two filenames are reserved in every directory of a bundle:

  • index.md — a generated directory listing, for progressive disclosure: an agent (or a human) reads the index first and descends only into what looks relevant.
  • log.md — a date-grouped change history for the directory's concepts.

OKF4net generates both: IndexGenerator (re)builds every index.md, ChangeLog parses and builds log.md histories — verified byte-exact against the reference implementation's output.

##

Conformance is one rule

§9 — permissive by design
A concept is conformant if it has a non-empty type. That's it.

Everything else is deliberately permissive: consumers must tolerate unknown types, unknown frontmatter keys, broken links, and missing optional fields. This is what lets independently produced bundles interoperate.

OKF4net honors both sides of that bargain. OkfDocument.ValidateConformance() enforces only the §9 rule; OkfDocument.Validate() matches the stricter producer-side check from the reference agent (type, title, description, timestamp). And Bundle.Load never aborts on a bad file — it collects parse failures and keeps going.

##

Spec → implementation

§2–§11, section by section

The library mirrors the spec's structure, so a spec citation in an issue or a PR points straight at the responsible type:

Spec sectionImplemented by
§2 Terminology / concept idOKF4net.ConceptId
§3 Bundle structureOKF4net.Bundle, Bundle.ReservedFilenames
§4 Concept documentsOKF4net.OkfDocument, OKF4net.Frontmatter
§5 Cross-linkingOKF4net.LinkScanner, Bundle.LinksFrom / Bundle.Backlinks
§6 Index filesOKF4net.IndexGenerator
§7 Log filesOKF4net.ChangeLog
§8 CitationsLinkScanner, OkfDocument.Citations()
§9 ConformanceOKF4net.BundleValidator
§11 VersioningBundle.OkfVersion, OKF4net.OkfSpec.Version

library.md — how to use those types, with examples