Skip to content

Rules

These are the rules of @okforest/validate 0.20.0, which the OKForest CLI, the OKForest Validate action, and the OKForest service all run, so a tree gets the same results everywhere. Each finding names the rule, with the file, line, and column. The OKForest service also checks changes with rules of its own.

Every rule has one severity:

Severity Meaning
error Fails okforest validate (exit code 1) and, by default, the OKForest Validate action.
warning Reported; fails only the action, with fail-on: warning.
info A note; never fails validation.

By default only errors fail validation; the action’s fail-on input can fail on warnings too, or never fail. The OKF specification says never to reject a bundle for a broken link, for example, so okf/broken-link is a warning.

A rule’s severity can’t be changed today: neither the CLI nor .okforest/settings.yaml can raise, lower, or turn off a rule. Instead, you can:

Errors are what the OKF specification requires, by the version a tree declares; warnings and info are what it recommends.

Rule Severity Checks
okf/actor warning generated.by, verified[].by, and sources[].author follow the actor convention: <producer>/<version>, or <scheme>:<id> such as human:<id>, team:<id>, or process:<id> (OKF §7).
okf/attested-computation error An Attested Computation has a runtime, well-formed parameters, executor, and attester, and a computation (a computation path or a code block under # Computation) (OKF §10).
okf/broken-link warning Links within the tree point at files that exist (a warning: OKF says never reject a bundle for broken links, §6.1, §11).
okf/datetime error Timestamps are ISO 8601 date-times with an explicit UTC offset, e.g. 2026-06-30T14:00:00Z, or dates, e.g. 2026-06-30 (OKF §5).
okf/description warning Concepts have a one-sentence description (recommended, OKF §4.1).
okf/draft-verified warning A draft isn’t verified as it stands: a draft is not reviewed yet (OKF §5.3, §5.4).
okf/extension-key warning Under OKF 0.3, frontmatter keys OKF doesn’t define start with x-, such as x-owner (OKF §4.1).
okf/field-types warning title, description, and resource are strings, and tags is a list of strings (OKF §4.1).
okf/footnote-source warning In a concept that has sources with ids, every footnote label matches one of them (OKF §5.1 per-claim attribution).
okf/frontmatter error Frontmatter blocks parse as YAML, and under OKF 0.2 every concept starts with one (OKF §4, §11).
okf/generated error generated is a mapping with a required by actor (OKF §5.2).
okf/index-entries warning index.md lists its directory as * [Title](path) - description entries under headings (OKF §8).
okf/index-frontmatter error index.md files carry no frontmatter, except the bundle-root index.md: okf_version, and from OKF 0.3 the bundle’s title, description, license, and extension keys (OKF §8, §12).
okf/index-scope warning index.md lists its own directory’s contents (OKF §8): each entry points within the directory.
okf/legacy-v01 info Flags OKF v0.1 conventions superseded in v0.2: timestamp and a body # Citations list (OKF Appendix B).
okf/log-date error log.md groups entries under second-level headings in ISO 8601 YYYY-MM-DD form (OKF §9).
okf/log-frontmatter error Under OKF 0.3, log.md files carry no frontmatter (OKF §9).
okf/log-order warning log.md lists its dates newest first, each once (OKF §9).
okf/not-a-concept warning Under OKF 0.3, a .md file without frontmatter or a type isn’t a concept: consumers skip it (OKF §3.2).
okf/okf-version info The bundle-root index.md declares its OKF version, as a quoted string: okf_version: "0.3" (OKF §12).
okf/sources error sources is a list of mappings, each with a resource, unique ids, and well-formed credibility signals (OKF §5.1).
okf/status warning status is one of draft, stable, or deprecated, and superseded_by goes with deprecated (OKF §5.4).
okf/title warning Concepts have a title (recommended, OKF §4.1).
okf/type error Under OKF 0.2, every concept’s frontmatter has a non-empty string type (OKF §4.1, §11).
okf/verified error verified is a { by, at } mapping or a list of them (OKF §5.2).

OKForest’s own conventions, beyond the specification.

Rule Severity Checks
okforest/claude-md warning Instructions for AI agents are in AGENTS.md, which agents of every provider read (Claude Code too, since 2.1.277), not CLAUDE.md, which only Claude Code reads.
okforest/d2-syntax error d2 code blocks are valid D2 (diagrams as code).
okforest/diagram-unchecked info Reports diagram blocks whose syntax could not be checked (tool not installed or unsupported here).
okforest/mermaid-syntax error mermaid code blocks are valid Mermaid (diagrams as code).
okforest/okf-version-current warning The tree declares the current OKF version, 0.3: one behind it should move when ready, and one ahead of this validator needs a newer one.
okforest/placeholder warning Bodies contain no unrendered template placeholders ({{name}}, <concept>, [INSERT ...]) or example link paths (path/to/...).
okforest/settings error .okforest/settings.yaml (spelled .yaml) holds well-formed settings: a name of up to 100 characters, a description of up to 4,000, ignore globs, and what draws Mermaid diagrams (diagrams.mermaid.renderer: mermaid or pele).
okforest/settings-keys warning .okforest/settings.yaml uses only the settings OKForest knows; others, such as a misspelled key, are ignored.
okforest/similar-tag warning A concept’s tags aren’t near-duplicates (case, punctuation, plural, or spelling) of tags more concepts use.
okforest/similar-type warning A concept’s type isn’t a near-duplicate (case, punctuation, plural, or spelling) of a type more concepts use, or one with a schema.
okforest/slug warning File and directory names of concepts are slugs: lowercase letters, digits, hyphens, and underscores.
okforest/type-file-name warning A type’s schema and template in .okforest/types/ are named for it: Customer Profile in customer-profile.schema.json and customer-profile.template.md.
okforest/type-schema error Concepts match their type’s JSON Schema in .okforest/types/, and each schema there is a usable JSON Schema for one type.
okforest/type-template error Each type template in .okforest/types/ starts with front matter naming its type, and a type has one template.
okforest/undeclared-type info In a tree with type schemas, each type its concepts give has one in .okforest/types/.
okforest/unused-type info Each type schema and template in .okforest/types/ is for a type some concept in the tree gives.
okforest/wikilink warning Concepts link with standard markdown links, not [[wikilinks]] (OKF §6.1).

Rules only the OKForest service checks, on a change’s pages when the change is saved: they’re shown on the change’s page, and to propose_change and OKForest’s AI drafts. okforest validate and the OKForest Validate action don’t check them, since they depend on when the change is checked, not only on the files. A warning never stops a change from being applied.

Rule Severity Checks
service/stale-after warning A change leaves a concept past its stale_after (OKF §5.5).