Refactor Messy AI Code
Debugging
60-120 minutes0/6 steps0%
Step 1 of 6
Capture the behavior baseline
You cannot verify 'nothing broke' without a before-list.
First time here? Paste the Context Pack first so the AI understands your project - open it from the header above.
Prompt Capsule
Before any refactoring, produce the behavior baseline: a checklist of every feature and its verifiable behavior (action -> expected result), covering all pages, forms, and CRUD operations. Execute the checklist now and record PASS/FAIL per item - this snapshot is the contract every later stage must re-verify against. Also list known-broken items so they are not blamed on the refactor.
Paste into EmergentFull Build: complete implementation prompt with explicit requirements
Quick is short. Full Build is recommended for most steps. Strict forces real logic when the AI keeps faking output.
Actual change check
Expected after this step
An executed baseline checklist with current PASS/FAIL truth.
Should NOT happen
- An existing feature broke
- A button only logs to console
- Data disappears after refresh
- Errors fail silently with no visible state
This is what should exist before you continue. If reality does not match, do not move on.
Track what changed, failed, or needs follow-up. Notes export with the flow.
Pass the Verify Gate to complete this step