Build Iterative Refactoring and Testing Loop

implementationChallenge

Prompt Content

Implement the core refactoring loop. The 'Planning Agent' (GPT-5) retrieves context from the Memory Manager and selects a refactoring task. The 'Code Editor Agent' (GPT-5) generates the refactored code. The 'Testing Agent' executes unit tests on the modified codebase within a Docker container. Based on test results and code quality metrics, the Planning Agent decides to commit, revert, or iterate. Ensure all agent communications adhere to MCP, and all steps are logged in an audit trail.

Try this prompt

Open the workspace to execute this prompt with free credits, or use your own API keys for unlimited usage.

Usage Tips

Copy the prompt and paste it into your preferred AI tool (Claude, ChatGPT, Gemini)

Customize placeholder values with your specific requirements and context

For best results, provide clear examples and test different variations