diff --git a/metagpt/actions/write_code_plan_and_change_an.py b/metagpt/actions/write_code_plan_and_change_an.py index f14e10ea5..7d40d0695 100644 --- a/metagpt/actions/write_code_plan_and_change_an.py +++ b/metagpt/actions/write_code_plan_and_change_an.py @@ -18,21 +18,21 @@ from metagpt.schema import CodePlanAndChangeContext DEVELOPMENT_PLAN = ActionNode( key="Development Plan", expected_type=str, - instruction="Develop a comprehensive and step-by-step incremental development plan, providing the essential " - "changes to be implemented at each step", - example="""To implement the new feature, we will create/change/update the methods in the calculator to support subtraction, multiplication, and division operations. Additionally, the ... -\nHere are the steps based on the order of 'Task List' we will follow:\n + instruction="Develop a comprehensive and step-by-step incremental development plan, providing the detail " + "changes to be implemented at each step based on the order of 'Task List'", + example="""To implement the new feature, we will create/change/update the methods in the calculator to support subtraction, multiplication, and division operations. +\nSteps to be followed:\n 1. Enhance the functionality of `calculator.py` by extending it to incorporate methods for subtraction, multiplication, and division. Also, the ... 2. Integrate new API endpoints for subtraction, multiplication, and division into the existing codebase of `main.py`. Then, ensure ... 3. ...""", ) -IMPLEMENT_CHANGE = ActionNode( - key="Implement Change", +INCREMENTAL_CHANGE = ActionNode( + key="Incremental Change", expected_type=List[str], instruction="Write Incremental Change by making a code draft that how to implement incremental development " "including detailed steps based on the context. Note: Track incremental changes using the marks `+` and `-` to " - "indicate added, deleted, or modified code, and ensure compliance with the output format of `git diff`", + "indicate additions and deletions, and ensure compliance with the output format of `git diff`", example=[ '''```diff --- Old/calculator.py @@ -197,7 +197,7 @@ Role: You are a professional engineer; The main goal is to complete incremental """ WRITE_CODE_PLAN_AND_CHANGE_NODE = ActionNode.from_children( - "WriteCodePlanAndChange", [DEVELOPMENT_PLAN, IMPLEMENT_CHANGE] + "WriteCodePlanAndChange", [DEVELOPMENT_PLAN, INCREMENTAL_CHANGE] ) diff --git a/tests/data/incremental_dev_project/Gomoku.zip b/tests/data/incremental_dev_project/Gomoku.zip index a110ccdd2..5877b8b81 100644 Binary files a/tests/data/incremental_dev_project/Gomoku.zip and b/tests/data/incremental_dev_project/Gomoku.zip differ diff --git a/tests/data/incremental_dev_project/dice_simulator_new.zip b/tests/data/incremental_dev_project/dice_simulator_new.zip index 377eaa4f5..f6956cadf 100644 Binary files a/tests/data/incremental_dev_project/dice_simulator_new.zip and b/tests/data/incremental_dev_project/dice_simulator_new.zip differ diff --git a/tests/data/incremental_dev_project/number_guessing_game.zip b/tests/data/incremental_dev_project/number_guessing_game.zip index 9d192c1e6..f5d983d6c 100644 Binary files a/tests/data/incremental_dev_project/number_guessing_game.zip and b/tests/data/incremental_dev_project/number_guessing_game.zip differ diff --git a/tests/data/incremental_dev_project/pygame_2048.zip b/tests/data/incremental_dev_project/pygame_2048.zip index d589a59b3..35cd74259 100644 Binary files a/tests/data/incremental_dev_project/pygame_2048.zip and b/tests/data/incremental_dev_project/pygame_2048.zip differ diff --git a/tests/data/incremental_dev_project/simple_add_calculator.zip b/tests/data/incremental_dev_project/simple_add_calculator.zip index 945e2af5d..57975c8f3 100644 Binary files a/tests/data/incremental_dev_project/simple_add_calculator.zip and b/tests/data/incremental_dev_project/simple_add_calculator.zip differ diff --git a/tests/data/incremental_dev_project/snake_game.zip b/tests/data/incremental_dev_project/snake_game.zip index 739c2a1d1..2c7b01b7c 100644 Binary files a/tests/data/incremental_dev_project/snake_game.zip and b/tests/data/incremental_dev_project/snake_game.zip differ diff --git a/tests/data/incremental_dev_project/word_cloud.zip b/tests/data/incremental_dev_project/word_cloud.zip index 01f83f053..a929fdeaf 100644 Binary files a/tests/data/incremental_dev_project/word_cloud.zip and b/tests/data/incremental_dev_project/word_cloud.zip differ