OpenLoreDocumentationGitHub ↗
Browse documentation
ReferenceOpenLore / Manual

Rules standard library

On this page

link/alias

link/alias — rule, scope: bundle
evaluated: by lore validate only (never on write)

Warn when a link originates from or targets an aliased docset path.

link/resolves

link/resolves — rule, scope: bundle
evaluated: by lore validate only (never on write)

Require every local link to resolve to a target inside the validated bundle.

okf

okf — rule, scope: file
evaluated: on every write (rejects) and by lore validate

Validate one file for OKF concept conformance.

okf/bundle

okf/bundle — rule, scope: bundle
evaluated: by lore validate only (never on write)

Validate root index.md and log.md structure, okf_version, and OKF family fields.

size/kilobytes

size/kilobytes — rule, scope: file
evaluated: on every write (rejects) and by lore validate

Reject writes whose size exceeds max KiB.

PARAMETERS
  max     integer|initial  required  Fixed cap, or baseline × growth.
  growth  number           optional  Multiplier when max is "initial".

EXAMPLE
  use: size/kilobytes
  with: { max: initial, growth: 1.1 }

size/lines

size/lines — rule, scope: file
evaluated: on every write (rejects) and by lore validate

Reject writes whose line count exceeds max.

PARAMETERS
  max     integer|initial  required  Fixed cap, or baseline × growth.
  growth  number           optional  Multiplier when max is "initial".

EXAMPLE
  use: size/lines
  with: { max: initial, growth: 1.1 }

size/tokens

size/tokens — rule, scope: file
evaluated: on every write (rejects) and by lore validate

Reject writes whose estimated token count exceeds max. Tokens use estimate/v1: ceil(bytes / 4).

PARAMETERS
  max     integer|initial  required  Fixed cap, or baseline × growth.
  growth  number           optional  Multiplier when max is "initial".

EXAMPLE
  use: size/tokens
  with: { max: initial, growth: 1.1 }
Edit this page on GitHub ↗Source: docs/rules-stdlib.md

Search the manual

Search the project documentation. No external service.