PHP Code One Task Group
| This documentation was generated with the assistance of AI. Please report any inaccuracies. |
Implement one bucket of PHP tasks from a plan’s task group end to end — a Laravel application, WordPress plugin or theme, PrestaShop module, or plain Composer library — with one quality baseline up front and one consolidated validation pass at the end, and with the container-backed integration stage serialized behind a repository-wide lock.
Purpose
iru-php-code-one-task-group is the PHP counterpart to iru-typescript-code-one-task-group, carrying the
integration-stage discipline of iru-java-springboot-code-one-task-group. Step 1 detects the project flavor, the
environment (host PHP, Sail, ddev), the runner (Pest, PHPUnit, artisan test) and — decided by what a suite needs, not
by its name — which suites are fast and which are integration (a Laravel feature suite on SQLite :memory: and Brain
Monkey/WP_Mock tests are fast; WP_UnitTestCase suites and Sail/MySQL-backed tests are integration). It captures one
pre-change iru-php-code-quality baseline, then implements each task through iru-php-code-one-task (in parallel
agents when the group is marked parallelizable, except for tasks editing the same file). Step 3 validates the bucket
once, cheapest first, every check delegated to an iru-gate-runner agent: license headers, PHPDoc, informational
composer validate/composer audit, scoped fast tests, an 80% line-coverage gate measured from fast tests only, the
full fast suite, PHPStan/Psalm/Pint/PHP-CS-Fixer/PHPCS diffed against the baseline (Rector findings informational), and
last the integration stage behind the atomic mkdir-based .integration-test.lock (stale after 60 minutes, bounded
~45-minute wait, released on every exit path). An integration stage that cannot run is reported unverified, never
silently skipped, and never affects the coverage verdict.
When the bucket touched UI (Blade/Livewire views and components, blocks, patterns, template parts, .tpl/.twig
templates or their CSS/JS assets), Step 3.9 adds a browser UI stage: iru-php-test with the ui selector (Playwright
plus @axe-core/playwright, or wp-scripts test-playwright for WordPress) behind the same lock, then a check that
.ui-screenshots/ holds every added/changed screen and component’s states × .ui-quality.yml directions × themes and
the accessibility level is applied (enforce fails the bucket, report lists violations). No browser, Docker, wp-env
or shop makes it unverified, never skipped; see Building user interfaces. With accessibility: none in .ui-quality.yml (opted out entirely), the accessibility rules and checks are neither applied nor required and are reported as "accessibility: opted out" in the group report, never unverified or failed; off still applies the rules but skips the automated checks. When .ui-quality.yml is missing in a repository that already has UI code, it doesn’t assume enforce: before the first UI task it asks once, pre-selected from iru-explore’s `Accessibility: line, and writes the file.
Plugin
Shipped by the iru-php plugin of the ai-catalog marketplace (install with /plugin install iru-php@ai-catalog; see Plugins).
Inputs
| Argument | Required | Description | Default |
|---|---|---|---|
Bucket text |
Yes |
Every PHP-tagged task/sub-task in the bucket with its own text, the group’s |
None — always invoked with a specific bucket’s text, by |
Outputs
-
Source and test files created or modified per task, via
iru-php-code-one-task. -
License headers and PHPDoc kept current across every file the bucket touched, checked once for the whole bucket.
-
Fast tests reaching at least 80% line coverage for the changed/new classes (per file for procedural code), measured without the integration suite.
-
No new PHPStan/Psalm/Pint/PHP-CS-Fixer/PHPCS issues versus the one baseline; security-relevant findings (
WordPress.Security.,WordPress.DB., PsalmTainted*) fixed or explicitly accepted. -
For UI buckets: the browser UI test result, screenshot counts per kind, any missing or malformed captures, and accessibility violations (count and rule ids) at the
.ui-quality.ymllevel — or unverified / "no UI test setup". -
implementation_plan.mdwith each task’s checkbox checked and its note replaced by the final outcome (fast-test coverage, quality, integration result). -
A bucket report to the caller: detected flavor/environment/runner and the fast/integration selectors, per-task results, Composer audit findings, informational Rector findings, accepted coverage exceptions, the integration outcome (passed, fixed, unverified with reason, or no integration suite) and lock behavior, and any blocked task.
Execution flow
Dependencies
Invokes
-
PHP Code One Task — Step 2, once per task in the bucket (concurrently or sequentially), via the
iru-isolated-skill-executoragent; implements the task, writes its tests, runs only the fast tests it touched and checks off its own checkbox.
Each of the following is invoked via the iru-gate-runner agent so reports stay out of
this skill’s context:
-
PHP Code Quality — Step 1 (baseline) and Step 3.7 (regression check against it).
-
Check License — Step 3.1, license headers for every file the bucket touched.
-
PHP PHPDoc — Step 3.2, PHPDoc for the production files.
-
PHP Test — Steps 3.4, 3.6, 3.8 and 3.9, scoped fast tests, the full fast suite, the integration run and the
uiselector browser run. -
PHP Coverage — Step 3.5, fast-test line coverage for the bucket’s targets.
Invoked by
-
Code One Task Group — Step 2, bucket for key php.
Related agents
-
iru-isolated-skill-executor— one per task in Step 2, so each task’s transcript stays out of this skill’s context. -
iru-gate-runner— the baseline (Step 1) and every validation check (Step 3), including the lock-protected integration run.
Source
SKILL.md on GitHub — the file this page was generated from.