Validate an OKF bundle for conformance
okf_validateValidate an OKF bundle for conformance to the v0.2 spec, checking frontmatter, types, and reserved files, and returning errors and warnings.
Instructions
Check a bundle against the OKF v0.2 specification.
Errors are the three conformance rules of spec §11: every non-reserved .md file has a parseable YAML frontmatter block, every block has a non-empty type, and reserved files (index.md, log.md) follow their structure.
Warnings are soft guidance the spec says consumers MUST tolerate — broken links, missing optional fields, unknown types. A bundle with warnings is still conformant, and §11 explicitly forbids rejecting a bundle for them.
Args:
bundle_path (string): directory containing the bundle
response_format ('markdown' | 'json'): default 'markdown'
Returns: { "conformant": boolean, // true when there are zero errors "checked_version": string, // OKF version validated against "declared_version": string, // okf_version from the root index.md, when declared (§12) "concept_count": number, "error_count": number, "warning_count": number, "errors": string[], "warnings": string[] }
Examples:
Use when: "Is this bundle valid OKF?"
Use when: authoring a bundle and checking work before publishing
Don't use when: you want quality signals rather than conformance (use okf_health_report)
Error Handling:
A missing or non-directory path returns a message naming it
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bundle_path | Yes | Path to the OKF bundle directory | |
| response_format | No | 'markdown' for reading, 'json' for machine processing | markdown |