Expand description
Opinionated bundle health checks, beyond §11 conformance.
validate_bundle enforces only the spec’s hard
requirements and reports soft guidance as warnings. lint_bundle goes
further: it flags the hygiene issues a continuously-authored corpus drifts
into, such as orphan concepts no link or index points at, an index.md
that has fallen behind its directory, or a verification that predates the
last regeneration.
Every finding is tagged with a stable rule code so CI can pin or
silence individual checks. None of them is a conformance failure: a bundle
with lint findings is still conformant if validate_bundle says so, which
is why okf lint is a separate command rather than a stricter
okf validate.
| Code | Severity | Finding |
|---|---|---|
| L1 | warning | missing title |
| L2 | warning | missing description |
| L3 | warning | missing generated (and no legacy timestamp) |
| L4 | info | no verified events, trust tier is unverified |
| L5 | warning | legacy v0.1 timestamp present |
| L6 | warning | legacy v0.1 body # Citations list present |
| L7 | warning | body is empty |
| L8 | warning | body has no top-level # heading |
| L9 | warning | latest verified.at predates generated.at |
| L10 | warning | links to a status: deprecated concept |
| L11 | warning | past stale_after (with --today) |
| L12 | info | status: draft |
| L13 | info | self-link |
| L14 | warning | title shared with another concept |
| L15 | warning | orphan: no inbound links and not listed in any index.md |
| L16 | warning | an existing index.md is out of sync with its directory |
Functions§
- lint_
bundle - Lints a loaded bundle, returning all findings.
- lint_
bundle_ at - Lints a bundle, additionally flagging concepts that are stale on
today.