Rules
rules
Public rule primitives; domain findings do not imply project quality scores.
CheckResult
Bases: BaseModel
Result of a single audit check.
Note: type: ignore[explicit-any] flags pydantic BaseModel
internals (third-party).
Source code in packages/axm-init/src/axm_init/models/check.py
earned
property
Points earned: weight if passed, 0 otherwise.
requires_toml(check_name, category, weight, fix)
Decorator that loads pyproject.toml and passes data to the check.
If pyproject.toml is missing or unparsable, returns a failure
CheckResult immediately — eliminating the repeated null-guard
preamble from every check function.
The decorated function receives (project, data) instead of just
(project) — where data is the parsed TOML dict.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
check_name
|
str
|
Check result name (e.g. |
required |
category
|
str
|
Category key (e.g. |
required |
weight
|
int
|
Points weight for this check. |
required |
fix
|
str
|
Fix message for the "not found" failure. |
required |
Source code in packages/axm-init/src/axm_init/checks/_utils.py
run_rules(path, rules)
Run explicit rules in order, preserving findings and propagating errors.
No discovery, score aggregation, exclusions, or domain interpretation is performed. Callers own their finding types and presentation policy.
Source code in packages/axm-init/src/axm_init/rules.py
section(data, key)
Return data[key] if it is a mapping, otherwise an empty mapping.
Helper for safely walking nested TOML structures without leaking
object typing through .get() chains.