Component state auditor

From ShuaiMXu/happyhands · View interactive version

Component state auditor is an AI agent skill from the GitHub repository ShuaiMXu/happyhands. Audit documented components against a versioned rubric of the states their class has to be able to express.

How to use this skill

Skill file

Component State Auditor

A surface that renders only its success state is not finished. The states nobody drew are the ones that decide whether a person can keep working: the queue before anything happens, the half-finished run, the failure with no way back.

Required evidence

The rubric

rubric.json names classes of component and what each class has to be able to express. A class is matched from the component name. The default rubric ships three classes:

The required sets are the judgement of this Skill version, not a universal rule. A project with different classes of component replaces rubric.json, and every result records which rubric version produced it.

Two tiers, kept apart

Documented. The states a component declares in the foundation, compared with what its class requires. A data comparison with nothing inferred, so it can be stated plainly: this component documents four states and its class requires six.

Observed. State words found in the component's source. This is evidence, never proof. The absence of a word is not the absence of a state, and the presence of one is not a state that works. Report it at low confidence, with the file it came from, for a person to check.

A state the source shows but the foundation does not document is its own result: the implementation moved and the documentation did not.

Component lineage

When repeated UI is part of an issue, trace same-purpose instances to their implementation, token or documented variant, and affected consumers. Compare Design.md examples, the component catalog, and product pages where they share the component. Source-defined variants and isolated third-party examples can legitimately differ.

Use the current originals and recorded actions to check the relevant rendered states. If the source relationship or a necessary state is unavailable, record an evidence gap. Report a defect only when the evidence shows a broken state or a departure from a component contract the project has adopted.

Decisions

Boundary

Source analysis cannot prove that a runtime state is reachable, correct or accessible. Keyboard focus, screen-reader behaviour and visual treatment of each state remain outside this audit.

Match the recorded repository-relative source path exactly. A legacy path without an extension may match one unique implementation at that same path; a same-named file in another directory or an ambiguous extension is not evidence. Missing sources and truncated snapshots keep the result needs-evidence, while preserving the documented-state comparison. The release regression corpus covers documented controls, missing states, wrong same-named sources, ambiguous implementations and missing/truncated inputs; it does not establish runtime state quality or operational maturity.

For an offline HTML bundle, scan only its explicit decoded JSON template using the shared source decoder. Preserve template coordinates and the enclosing source identity. Loader code and manifest payloads are not component state or recovery evidence. An unreadable template stays unavailable, with its decoding error; never fall back to scanning the outer bundle. Template text still provides only static candidates, not proof of rendered behaviour.

Return structured evidence, findings, proposed updates and limitations. Use needs-evidence when required inputs or professional review are missing. Never invent an Experience Score or promote a project observation into a universal rule.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.