Structure
structure
Structure rules — file and directory existence checks.
DirectoryExistsRule
dataclass
Bases: ProjectRule
Rule that checks if a required directory exists.
Not decorated with @register_rule — this rule is consumed by
axm-init checklist checks, not auto-discovered during audits.
The category property is set manually for the same reason.
Source code in packages/axm-audit/src/axm_audit/core/rules/structure.py
category
property
Scoring category for this rule.
rule_id
property
Unique identifier for this rule.
check(project_path)
Check if the directory exists in the project.
Source code in packages/axm-audit/src/axm_audit/core/rules/structure.py
FileExistsRule
dataclass
Bases: ProjectRule
Rule that checks if a required file exists.
Not decorated with @register_rule — this rule is consumed by
axm-init checklist checks, not auto-discovered during audits.
The category property is set manually for the same reason.
Source code in packages/axm-audit/src/axm_audit/core/rules/structure.py
category
property
Scoring category for this rule.
rule_id
property
Unique identifier for this rule.
check(project_path)
Check if the file exists in the project.
Source code in packages/axm-audit/src/axm_audit/core/rules/structure.py
PyprojectCompletenessRule
dataclass
Bases: ProjectRule
Validate PEP 621 field completeness in pyproject.toml.
Checks 9 fields: name, version/dynamic, description, requires-python, license, authors, classifiers, urls, readme. Scoring: (fields_present / 9) x 100.
Source code in packages/axm-audit/src/axm_audit/core/rules/structure.py
rule_id
property
Unique identifier for this rule.
check(project_path)
Check pyproject.toml completeness.