CC integration: Unit test rules#4323
Draft
stracker-phil wants to merge 1 commit intodev/developfrom
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds Claude Code developer tooling to standardize PHP unit test writing across the project.
What's included
.claude/agents/unit-test-writer.md: A sub-agent with instructions for writing PHPUnit tests in this codebase. It includes:.claude/rules/unit-test-conventions.md: A Claude Code rule scoped totests/PHPUnit/**/*.phpthat instructs the assistant to always delegate test writing to the newunit-test-writeragent, never inline..gitignoreupdate: Adds general support to track relevant claude code files (include all.claude/content, but exclude all*.local.*files in all folders).Why
Test quality has been inconsistent - missing doc blocks, mocks where stubs suffice, no data providers, tests asserting implementation details. Routing all test work through a specialized agent with hard-wired conventions prevents regressions in test quality without requiring manual review of every test PR.