Expand description
Plugin API for loading rules from YAML configuration files.
Users can define custom rules via YAML files in:
~/.kardo/plugins/*.yaml(global plugins).kardo/rules/*.yaml(project-local rules)- Standard rule packages (shipped with Kardo)
YAML schema:
id: "custom-my-rule"
name: "My Custom Rule"
category: freshness | integrity | configuration | agent_setup | structure | custom
severity: high | medium | low
pattern:
type: file_missing | file_stale | content_match | regex
target: "CLAUDE.md" # file path or pattern
threshold: 30 # for file_stale: days
message: "Description of what's wrong"
suggestion: "How to fix it"Structs§
- Plugin
Loader - Discovers and loads YAML rule plugins from multiple directories.
- Rule
Plugin - A collection of YAML rules loaded from a directory.
- Yaml
Rule - A rule loaded from a YAML definition file.
Implements the
Ruletrait so it can be added to aRuleSet. - Yaml
Rule Def - A rule definition loaded from YAML.
Enums§
- Yaml
Pattern - The pattern type that determines how a YAML rule matches.
- Yaml
Rule Error - Validation errors for YAML rule definitions.