OKF Runtime is a lightweight, deterministic consumption engine for Open Knowledge Format (OKF) bundles. It is designed to help agents and tools discover, index, and traverse OKF repositories without requiring a database, daemon, or heavy external dependencies.
- A filesystem-first runtime for OKF markdown bundles
- A deterministic metadata and link graph builder
- A cache-friendly engine for bundle discovery, link analysis, and composition
- A thin, JSON-friendly runtime API for downstream tools and agent integrations
- Provenance, lifecycle, and derived trust signals for OKF v0.2 bundles
Most existing OKF tooling focuses on authoring, validation, or enrichment. OKF Runtime focuses on efficient consumption:
- discover bundles and markdown concepts
- parse YAML frontmatter and markdown bodies
- index metadata, tags, and types
- build forward and reverse link graphs
- compose temporary topic bundles without mutating source files
- validate links, anchors, and graph structure
- derive trust tiers and staleness from v0.2 frontmatter
- Deterministic before AI: solve retrieval tasks without consuming LLM context
- Library first: runtime logic belongs in reusable modules, not only CLI wrappers
- Filesystem is source of truth: markdown files remain authoritative
- Zero infrastructure: no database server, no background daemon, no cloud service
- Progressive enhancement: features should layer cleanly from filesystem to CLI to optional agent integrations
The implemented Phase 1 and 1.5 surface includes:
- filesystem scanner and bundle discovery
- markdown/YAML parser and metadata extraction
- cache-based metadata and link indexes
- graph construction for forward and reverse links
- v0.2 nested frontmatter, provenance, trust, lifecycle, and
okf_versionsupport - lightweight CLI commands for discovery, catalog, query, graph, compose, and linting
okf_runtime/- runtime library and CLIscripts/- thin agent-facing entry pointreferences/- agent-facing usage and specification materialdocs/- architecture, decisions, contribution guidance, and planstests/- runtime tests and fixtures
docs/ARCHITECTURE.md– runtime architecture and goalsdocs/CONTRIBUTING_GUIDE.md– contribution principlesdocs/IMPLEMENTATION_PLAN.md- phased roadmap and acceptance criteriareferences/OKFmin.SPEC.md– distilled OKF v0.1 specificationreferences/USAGE.md- implemented functionality and command examples
This directory is a conformant Agent Skill package: its okf-runtime directory matches the frontmatter name. The Python implementation lives in okf_runtime/, agent-facing material in references/, and maintainer documentation in docs/.
Contributions should include:
- tests
- documentation
- performance considerations
- rationale for changes
See docs/CONTRIBUTING_GUIDE.md for more details.
This repository is intended to be a community-driven open source project. Please refer to the repository license file for licensing details.
