Deep-analyze a single PHP function — trace all code paths, find callers, classify bugs and smells, and generate exhaustive TinyTest unit tests. Useful before /test-cover-file when a function is complex.
Project-wide coverage audit — runs phpdbg across all tests, finds every uncovered function, analyzes each one in context with caller data, generates comprehensive tests for all code paths, and produces a structured bug/smell report with operator decisions. Requires phpdbg.
Project-wide bootstrap — scans all PHP source files, registers any without a test file in test_sources.md, and spawns sub-agents to generate initial test files for each. Run this first on a new project before using test-audit.
Achieve full coverage for a single PHP source file. Phase 1 iterates until every function is called. Phase 2 iterates until every reachable statement and branch is exercised. Requires phpdbg.
Diagnose and fix a failing TinyTest test. Reads the error output, compares test vs source, and repairs the test or explains the source bug.
Generate an initial TinyTest test file for a PHP source file. Creates the test file, runs it, fixes failures, and registers it in test_sources.md. Contains the full TinyTest assertion and annotation reference.
Review an existing TinyTest test file for quality problems — weak assertions, missing messages, wrong parameter order, PHPUnit drift, incomplete tests, and anti-patterns — then fix all approved issues and verify the suite still passes.
Migrate one or more PHPUnit test files to TinyTest. Handles structural conversion (class → global functions), full assertion remapping, exception annotations, data providers, setUp/tearDown, and PHPUnit mock objects. Writes a new TinyTest file, runs it, fixes failures, and registers it in test_sources.md.