ha-quality-scale-verify
Verify Quality Scale Rule
You are verifying whether a Home Assistant integration follows a quality scale rule. Verify one rule at a time; to check a full tier, verify each of that tier's rules (parallel subagents when possible).
Reading the code is not enough. Many rules have an objective threshold or a validator that CI enforces — run the tool and read its result instead of inferring from the source. Report the measured number or the tool's verdict; when a rule is a judgment from reading code, say so; when you could not check it, mark it unverified rather than implying a pass.
1. Understand the rule
Fetch the rule doc from https://raw.githubusercontent.com/home-assistant/developers.home-assistant/refs/heads/master/docs/core/integration-quality-scale/rules/{rule_name}.md and read the exact requirement — the wording matters (e.g. test-coverage is "Above 95% test coverage for all integration modules": per module, strictly above 95%). Note the tier the rule belongs to, its required patterns, and its exemption criteria.
2. Inspect the integration
Verify the code as it currently is (local working tree, or a checked-out PR head), not the base branch. In homeassistant/components/<domain>, read manifest.json (declared quality_scale tier), quality_scale.yaml (each rule's done/todo/exempt), and the modules and tests/components/<domain> relevant to the rule.
Other sources: the library on PyPI (https://pypi.org/pypi/<package>/json); and the integration docs, resolved in this order — the docs change under review, its linked docs PR, the next branch, then the current branch of home-assistant.io (.../home-assistant.io/refs/heads/<branch>/source/_integrations/<domain>.markdown). Docs for a tier bump usually land on next or a docs PR, so current alone is often stale.
3. Which rules to verify
- Tier bump (the
quality_scalevalue inmanifest.jsonchanges): verify every rule from Bronze up to the target tier, from scratch — do not trust the existingdone/exemptmarks. - Rule status changes, same tier (flips in
quality_scale.yaml, or a new scorecard): verify every rule whose status the diff changes, in any direction. A revert totodoat or below the declared tier breaks the tier claim. - Code change only (no
quality_scale.yamlor tier change): verify the changed code still satisfies the rules in force at the integration's current tier. Map the diff to the rules it implicates and check those — the bar is no regression. - A single requested rule: verify just that rule.