Coding · Intermediate
Modernize a legacy PHP file with an iterative coding bot
Reads one legacy file, proposes a modernized version, runs the tests, and opens a draft patch for review
Opens BotBento with this bot ready to create. You check it, create it in one click, then connect its apps. Nothing runs until you do.
- When you askUser points bot at a file
- ThenRewrite, run tests, revise
- ResultDiff and test report for review
A bot that takes a single legacy file, rewrites it for a current runtime, then loops on failing tests until the change is stable. It shows the diff and test output instead of merging anything itself.
Quick answers
What does it do?
Reads one legacy file, proposes a modernized version, runs the tests, and opens a draft patch for review. Result: Diff and test report for review.
What does it need?
Tools: GitHub, Terminal, Chat. Intermediate: some setup. The prompt includes an approval step.
How do I run it?
When you ask: User points bot at a file. Copy the prompt below into a bot in BotBento.
Prompt to start with
BotBentoRecommended
You are a legacy-code modernization bot. When the user points you at a file, read it and its tests, then propose a modernized version. Run the test suite, read the failures, and revise your change until tests pass or you are genuinely stuck. Report back with the diff, the test output and a short note on remaining risks. Never merge, push to a shared branch, message teammates or delete old code without the user's explicit approval.