Skip to content

Add root agents.md with mandatory positive/negative/edge-case test guidance #302

@RudoiDmytro

Description

@RudoiDmytro

Summary

Add a root-level agents.md to the website repository and make it explicit that whenever an AI agent writes or updates tests, covering positive, negative, and edge cases is mandatory rather than optional.

Why

  • website already has clear test commands (make test-unit-client, make test-unit-server, make test-e2e, make test-visual, make test-visual-update) and testing guidance in README.md, but it does not have a root agent-instructions file.
  • That leaves AI agents without a single repository-local rule that defines what "good test coverage" means when they add or modify tests.
  • We keep getting generic "happy path only" tests unless the expectations are written down explicitly.

Proposed Change

Create agents.md in the repository root with a mandatory testing section for all AI agents. That section should require agents to:

  1. Identify the relevant test layer before writing tests:
    • client unit
    • server unit
    • e2e
    • visual regression
  2. Cover all applicable scenario classes whenever tests are added or updated:
    • positive / happy path
    • negative / invalid / failure path
    • boundary / edge cases
  3. Record a concrete "not applicable" reason for any category they intentionally skip.
  4. Prefer meaningful behavior assertions over shallow rendering or snapshot-only coverage.
  5. Run the relevant repo test commands before claiming completion.

Minimum Scenario Matrix To Document

The new agents.md should require agents to consider, where relevant:

  • valid input and expected success behavior
  • invalid input and validation failures
  • empty / null / missing data states
  • loading, retry, timeout, and error states
  • permission / auth / role-based behavior
  • boundary values and off-by-one conditions
  • locale, formatting, and translation-sensitive behavior
  • responsive / mobile differences for user-facing flows
  • accessibility-visible behavior when UI interactions change
  • regression protection for previously fixed bugs

Acceptance Criteria

  • A root agents.md exists in website.
  • It contains a clearly labeled mandatory test-coverage policy for AI agents.
  • The policy explicitly says positive, negative, and edge-case coverage is required when writing or updating tests.
  • The policy includes repo-specific commands for verifying client, server, e2e, and visual tests.
  • The policy requires an explicit justification when a scenario category is skipped.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions