Skip to content

Commit

Permalink
change updated_current_task to updated_current_epic
Browse files Browse the repository at this point in the history
  • Loading branch information
LeonOstrez committed Jun 19, 2024
1 parent cb978dd commit 43d3191
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions core/agents/tech_lead.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class DevelopmentPlan(BaseModel):


class UpdatedDevelopmentPlan(BaseModel):
updated_current_task: Task = Field(
updated_current_epic: Task = Field(
description="Updated detailed description of what was implemented while working on the current development task."
)
plan: list[Task] = Field(description="List of unfinished development tasks.")
Expand Down Expand Up @@ -198,8 +198,8 @@ async def update_epic(self) -> AgentResponse:
parser=JSONParser(UpdatedDevelopmentPlan),
temperature=0,
)
log.debug(f"Reworded last task as: {response.updated_current_task.description}")
finished_tasks[-1]["description"] = response.updated_current_task.description
log.debug(f"Reworded last task as: {response.updated_current_epic.description}")
finished_tasks[-1]["description"] = response.updated_current_epic.description

self.next_state.tasks = finished_tasks + [
{
Expand Down
2 changes: 2 additions & 0 deletions core/prompts/code-monkey/implement_changes.prompt
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,5 @@ Here is how `{{ file_name }}` looks like currently:
{% else %}
You need to create a new file `{{ file_name }}`.
{% endif %}

{% include "partials/files_list.prompt" %}
2 changes: 1 addition & 1 deletion core/prompts/tech-lead/update_plan.prompt
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ Here are files that were modified during this epic implementation:

You need to think step by step what was done in last epic and update development plan if needed. All iterations that were mentioned were executed and finished successfully and that needs to be reflected in updated development plan.
As output you have to give 2 things:
1. Reword/update current epic, "updated_current_task", ONLY IF NECESSARY, based on what is implemented so far. Consider current epic description, all iterations that were implemented during this epic and all changes that were made to the code.
1. Reword/update current epic, "updated_current_epic", ONLY IF NECESSARY, based on what is implemented so far. Consider current epic description, all iterations that were implemented during this epic and all changes that were made to the code.

2. Give me updated list of epics that still have to be implemented. Take into consideration all epics in current development plan, previous epics that were finished and everything that was implemented in this epic. There should be minimum possible number of epics that still have to be executed to finish the app. You must list only epics that need implementation and were not done in scope of previous epics or during iterations on current epic. Do not create new epics, only remove epics from list of epics that still have to be implemented in case they were implemented during current epic.
2 changes: 1 addition & 1 deletion tests/agents/test_tech_lead.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ async def test_update_epic(agentcontext):
tl = TechLead(sm, ui)
tl.get_llm = mock_get_llm(
return_value=UpdatedDevelopmentPlan(
updated_current_task=Task(description="Updated Just Finished"),
updated_current_epic=Task(description="Updated Just Finished"),
plan=[Task(description="Alternative Future Task")],
)
)
Expand Down

0 comments on commit 43d3191

Please sign in to comment.