keep.lintΒΆ

Linter for Keep workspace documents.

Validates all documents in a workspace, checks for hard violations that block graduation, emits soft warnings for completeness and staleness, and auto-injects missing reciprocal relations.

The linter produces a structured LintReport which is both persisted as .keep/lint.json and rendered for the terminal by the CLI.

Hard violations (block graduation to published or canon):

  • dangling_slug: a relation target does not resolve to a known slug.

  • private_target_in_public_doc: a non-private document relates to a private one.

  • missing_reciprocal: a contradicts or supersedes relation exists without the corresponding backlink (should only occur if auto-injection failed).

  • invalid_promotion: a document is published or canon but has outstanding hard violations.

Soft warnings (advisory, do not block graduation):

  • incomplete: completeness ratio is below the configured threshold.

  • stale: document has not had a meaningful modification within the threshold for its status.

Typical usage:

from keep.lint import run

settings = Settings.load(workspace)
report = run(settings)