aibdd.auto.php.it.refactor

Orchestrate a two-phase PHP refactor workflow while keeping tests green.

1|Updated Mar 6, 2026
One-click install
npx skills add https://github.com/zenbuapps/zenbu-powers --skill aibdd-auto-php-it-refactor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: aibdd.auto.php.it.refactor
Source: https://github.com/zenbuapps/zenbu-powers/tree/main/skills/aibdd.auto.php.it.refactor
Command: npx skills add https://github.com/zenbuapps/zenbu-powers --skill aibdd-auto-php-it-refactor

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Coordinates a safe, two-phase PHP refactor workflow that improves code quality without breaking behavior.

Core Features & Use Cases

  • Phase A: test code refactoring to improve readability and remove redundant patterns while keeping tests green.
  • Phase B: production code refactoring applying SOLID, type hints, strict types, and safer patterns with all tests green.
  • Use Case: mid-size PHP projects needing progressive improvement of testability and maintainability while preserving behavior.

Quick Start

Initiate Phase A to refactor tests, then Phase B to refactor production code, ensuring all tests remain green.

Frequently Asked Questions about aibdd.auto.php.it.refactor

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I refactor PHP code safely without breaking existing behavior?

Safe PHP refactoring requires a coordinated two-phase workflow that keeps tests green throughout. You start by refactoring test code for readability, then refactor production code applying SOLID principles and strict typing, ensuring all tests pass at every step.

What is the two-phase PHP refactor workflow and when should I use it?

The two-phase PHP refactor workflow separates test code improvements from production code changes to maintain green tests. Use it for mid-size PHP projects needing progressive improvement of testability and maintainability while preserving existing behavior.

How do I apply SOLID principles and strict typing during a PHP refactor?

To apply SOLID principles and strict typing during a PHP refactor, execute Phase B after test refactoring. This phase enforces strict types, type hints, and safer patterns in production code while continuously verifying that all tests remain green.

Can I refactor production PHP code before improving the test code?

No, you should refactor test code first in Phase A before touching production code in Phase B. Refactoring tests first improves readability and removes redundant patterns, establishing a reliable green test baseline to safely guide subsequent production code changes.

What code quality constraints are enforced during a PHP refactor?

Code quality constraints enforced during a PHP refactor include strict typing, SOLID design principles, type hints, and safer structural patterns. These guidelines ensure improved testability and maintainability without altering the application's external behavior.