Skip to content

API Reference parrot.knowledge.lint.rule

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot.knowledge.lint.rule

View source

LintRule protocol and fingerprint helper (FEAT-625).

Alias Finding

Re-exported from parrot.knowledge.lint.models.Finding.

Alias FixResult

Re-exported from parrot.knowledge.lint.models.FixResult.

Alias LintContext

Re-exported from parrot.knowledge.lint.context.LintContext.

Class LintRule

A single lint rule; packs are plain classes satisfying this protocol.

Attributes:

Attribute Type Description
rule_id str
pack str
default_severity Severity

Method LintRule.check

Return findings; MUST NOT mutate the store.

check(ctx: 'LintContext') -> list[Finding]

Parameter Type Default Description
ctx 'LintContext'

Returns: list[Finding]

Method LintRule.fix

Apply an idempotent safe fix, or return None when the rule never fixes.

fix(ctx: 'LintContext', finding: Finding) -> FixResult | None

Parameter Type Default Description
ctx 'LintContext'
finding Finding

Returns: FixResult | None

Alias Severity

Re-exported from parrot.knowledge.lint.models.Severity.

Function make_fingerprint

Return a stable sha1 over rule_id and the SORTED subjects.

make_fingerprint(rule_id: str, subjects: Sequence[str]) -> str

Parameter Type Default Description
rule_id str
subjects Sequence[str]

Returns: str

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally