You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Refactoring with Iterative Refinement Example #1414
Create an example in the examples directory that is "refactoring with iterative refinement". It will be based on "COBOL to Java Refactoring", where we try to convert a COBOL directory to a Java directory.
It will be based on a for loop, where repeatedly:
the agent is called with a prompt asking it to refactor all the COBOL files in a directory to JAVA files in another
a new agent is asked to generate a critique giving a score of how complete the refactoring of each file in the directory is with a report created in a specified format. the total grade will be the average of the grades for each of the original files.
at the end of "2.", if the overall grade is less than 90%, then we return to step 1 and provide the agent the location of the critique file so it can understand what needs to be improved.
When this is done, open a draft PR on the software-agent-sdk examples directory and check if CI passes. It probably won't due to missing documentation, so also create the missing documentation. Then once that is done, run the example in the background and sleep while it's working repeatedly until you confirm that it finishes successfully. If it does, add a comment on the PR with a snippet of the final critique file then conclude.
Activity
openhands-ai commentedon Dec 17, 2025
I'm on it! neubig can track my progress at all-hands.dev
Add iterative refinement example for COBOL to Java refactoring
Add documentation for iterative refinement example
openhands-ai commentedon Dec 17, 2025
Summary
I have successfully completed issue #1414 - "Refactoring with Iterative Refinement Example". Here's what was accomplished:
Checklist
examples/01_standalone_sdk/31_iterative_refinement.pyFiles Created
software-agent-sdk:
examples/01_standalone_sdk/31_iterative_refinement.py(469 lines)OpenHands/docs:
sdk/guides/iterative-refinement.mdx(620 lines)Example Run Results
The example successfully converted 3 COBOL files to Java:
Pull Requests
software-agent-sdk PR Add iterative refinement example for COBOL to Java refactoring #1415 (draft): Add iterative refinement example for COBOL to Java refactoring #1415
docs PR Move prompts in context directory #191 (draft): Add documentation for iterative refinement example docs#191
View full conversation
Add documentation for iterative refinement example
Add documentation for iterative refinement example
Add documentation for iterative refinement example
Add documentation for iterative refinement example (#191)