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 check:all
Use these for rapid iteration (they run on PHP 8.3 only):
composer check:fastcomposer check:static
Use targeted checks only when narrowing scope for speed:
composer check:testcomposer check:phpunitcomposer check:behat
Run Composer scripts on the host; they invoke Docker themselves and fail inside a container.
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 running Git commands, always append | cat or use --no-pager (e.g., git --no-pager diff ...). Do not rely on user or environment configuration to disable paging; paged output can break automation.
- This document is the canonical reference for agent-agnostic automation, validation, and review policy. Skill and instruction files should defer to it and override it only for skill-specific or agent-specific needs.
- Do not make Git commits unless specifically asked to.