Summary
Add a root-level agents.md to the ui-toolkit repository and require AI agents to cover positive, negative, and edge cases whenever they write or update tests.
Why
ui-toolkit currently has useful AI-agent guidance in specs/planning-artifacts/architecture.md, including quality enforcement expectations, but that guidance is buried in a planning artifact instead of a root agent file.
- The repo already has multiple testing layers (
make test-unit, make test-e2e, make test-visual) plus Storybook-driven component workflows, so a root agent policy would remove ambiguity.
- Component libraries are especially vulnerable to incomplete tests when agents only verify the primary state and skip disabled, error, empty, or boundary states.
Proposed Change
Create agents.md in the repository root and include a mandatory "test scenario coverage" section for AI agents. That section should require agents to:
- Choose the correct verification layer for the change:
- unit
- integration
- e2e
- visual regression
- Storybook/state coverage where relevant
- Cover all applicable scenario classes whenever tests are added or updated:
- positive / happy path
- negative / invalid / failure path
- boundary / edge cases
- Check component state matrices, not just the default render.
- Document a concrete "not applicable" reason for any omitted category.
- Run the relevant verification commands before marking work complete.
Minimum Scenario Matrix To Document
The new agents.md should explicitly require agents to think through:
- default render / expected success state
- disabled, loading, error, empty, and success variants
- invalid props or unsupported combinations
- boundary values for size, length, count, and layout constraints
- keyboard and focus behavior for interactive components
- accessibility expectations exposed through UI state changes
- responsive and visual regression risk for reusable components
- regression coverage for previously reported component bugs
Acceptance Criteria
- A root
agents.md exists in ui-toolkit.
- It promotes the agent/testing rules from planning docs into a discoverable root instruction file.
- It explicitly states that positive, negative, and edge-case coverage is mandatory when agents write or update tests.
- It includes repo-specific verification commands for unit, e2e, and visual checks.
- It requires an explicit reason whenever an agent skips an expected scenario class.
Summary
Add a root-level
agents.mdto theui-toolkitrepository and require AI agents to cover positive, negative, and edge cases whenever they write or update tests.Why
ui-toolkitcurrently has useful AI-agent guidance inspecs/planning-artifacts/architecture.md, including quality enforcement expectations, but that guidance is buried in a planning artifact instead of a root agent file.make test-unit,make test-e2e,make test-visual) plus Storybook-driven component workflows, so a root agent policy would remove ambiguity.Proposed Change
Create
agents.mdin the repository root and include a mandatory "test scenario coverage" section for AI agents. That section should require agents to:Minimum Scenario Matrix To Document
The new
agents.mdshould explicitly require agents to think through:Acceptance Criteria
agents.mdexists inui-toolkit.