This document provides agent-agnostic guidance for all automation, AI, and code review agents working in this repository.
- Main code:
src/ - Unit tests:
tests/unit/(PHPUnit) - Self-test scenarios:
tests/behat/features/andtests/behat/bootstrap/(Behat) - Runnable examples:
examples/features/andexamples/bootstrap/ - Public API center:
TableEqualityAssertionandUnequalTablesException - Contract source of truth:
docs/contract-surface.md
- PHP
^8.3is the supported range; write to the floor of that range. Do not use language features or functions introduced after PHP 8.3 (for example, features from PHP 8.4+). - Preserve fluent API behavior on
TableEqualityAssertionsetters (return $this). - Keep behavior changes minimal and explicit; do not silently rename labels or message sections.
- Follow existing PSR-2 style and current naming conventions in the file being edited.
- Ensure every non-automated file ends with a trailing linebreak (for example, exclude generated lockfiles like
composer.lock).
- Do not modify
vendor/, CI history badges, or unrelated project metadata unless explicitly requested. - Treat
docs/contract-surface.mdas authoritative for what is stable in1.x. - For behavior changes, update both:
- PHPUnit tests in
tests/unit/ - Behat integration coverage in
tests/behat/features/integration-tests.featurewhen user-facing output changes
- PHPUnit tests in
- When error message text changes, also update
docs/README.mdsections that document output labels and diagnostics. - If a change alters public methods, exception behavior, or diagnostics semantics, update
docs/contract-surface.mdin the same change. - When adding any new file or directory that is not part of the production library, tests, documentation, or examples (for example CI config, Docker files, editor config, build artifacts), add it to
.gitattributeswithexport-ignoreso it is excluded from Composer/GitHub package archives. Always keep.gitattributesup-to-date when new files are added.
Prefer this command after non-trivial edits to validate across all supported PHP versions:
composer docker:check-fast-all
Use local (single-version) checks for rapid iteration:
composer check:testcomposer check:staticcomposer check:fast
Use targeted checks only when narrowing scope for speed:
composer check:phpunitcomposer check:behat
If running a narrower check for speed, state what was not run.
- Call out contract impact using:
none,additive,behavior-changing, orbreaking. - In reviews, prioritize correctness and regression risk over style.
- Include file/line evidence for findings.
When generating or running Git commands, always append | cat or use --no-pager (e.g., git --no-pager diff ... or git diff ... | cat).
This ensures output is never sent to a pager, regardless of user shell or Git config, and prevents issues in Zsh or CI environments where paged output can break automation or agent workflows.
Do not rely on user or environment configuration to disable paging—always specify it explicitly in agent-generated commands.
- Use this document as the canonical reference for all agent-agnostic automation, validation, and review policy.
- Skill and instruction files should reference this document for validation and review policy, and only override for skill-specific or agent-specific needs.
- If in doubt, defer to
AGENTS.mdfor project-wide policy.
- Do not make Git commits unless specifically asked to.