aibdd-refactor-execute

Refactor product code one move at a time with acceptance verification and immediate reverts.

77|15|Updated May 12, 2026
One-click install
npx skills add https://github.com/Waterball-Software-Academy/aixbdd --skill aibdd-refactor-execute
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: aibdd-refactor-execute
Source: https://github.com/Waterball-Software-Academy/aixbdd/tree/main/.agents/skills/aibdd-refactor-execute
Command: npx skills add https://github.com/Waterball-Software-Academy/aixbdd --skill aibdd-refactor-execute

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill prevents unsafe refactors by only performing one minimal structural change at a time while continuously proving the target feature set stays green.

Core Features & Use Cases

  • Green-guarded refactoring: Validates an incoming green handoff, verifies runtime refs match, and runs acceptance as a safety net before and after candidate moves.
  • One-move-at-a-time discipline: Applies structure-only refactor moves according to a move policy, immediately reverting any red result.
  • Refactor handoff output: Produces a refactor handoff that reports applied vs reverted moves, modified files, and stop reasons.

Quick Start

Ask your agent to run aibdd-refactor-execute with the provided green_handoff and the target feature files to produce a refactor handoff without introducing new behavior.

Frequently Asked Questions about aibdd-refactor-execute

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

FAQPage Schema
How do I refactor code without changing externally observable behavior?

To refactor code safely without changing observable behavior, execute structure-only moves under a confirmed green acceptance test net. This approach enforces one-move-at-a-time discipline, immediately reverting any change that causes a test failure.

What is behavior safety in refactoring and when do I need it?

Behavior safety in refactoring ensures structural changes preserve original externally observable outputs. You need it when modifying product code under a green target feature set to prevent regressions and validate that runtime references remain stable.

How to execute refactoring steps using acceptance testing as a safety net?

Execute refactoring by validating an incoming green handoff, verifying runtime references match, and running acceptance tests before and after each candidate move. Apply structure-only changes according to a move policy and immediately revert on any red result.

Can I refactor multiple files at once while preserving versioned specs?

You cannot apply multiple structural changes simultaneously. Refactoring requires a one-move-at-a-time discipline to preserve the scope of target feature files and versioned specs, ensuring that any failed move is isolated and immediately reverted.

What happens if a refactor move fails during runtime refs validation?

If a refactor move fails during runtime refs validation or acceptance testing, the system immediately reverts the change. It then generates a structured refactor handoff reporting applied versus reverted moves, modified files, and stop reasons.

Does safe refactoring require interaction gates for higher-risk actions?

Yes, safe refactoring requires interaction gates for higher-risk actions to enforce acceptance safety. These gates prevent unsafe refactors by ensuring strict runtime drift verification and baseline acceptance runner execution before proceeding with structural changes.