leftover changes when moving from tasks to epics

This commit is contained in:
LeonOstrez
2024-07-02 09:48:16 +01:00
parent 76e7d37f7c
commit 12da174dc9
3 changed files with 13 additions and 14 deletions

View File

@@ -18,19 +18,19 @@ from core.ui.base import ProjectStage, success_source
log = get_logger(__name__)
class Task(BaseModel):
description: str = Field(description=("Very detailed description of a development task."))
class Epic(BaseModel):
description: str = Field(description=("Description of an epic."))
class DevelopmentPlan(BaseModel):
plan: list[Task] = Field(description="List of development tasks that need to be done to implement the entire plan.")
plan: list[Epic] = Field(description="List of epics that need to be done to implement the entire plan.")
class UpdatedDevelopmentPlan(BaseModel):
updated_current_epic: Task = Field(
description="Updated detailed description of what was implemented while working on the current development task."
updated_current_epic: Epic = Field(
description="Updated description of what was implemented while working on the current epic."
)
plan: list[Task] = Field(description="List of unfinished development tasks.")
plan: list[Epic] = Field(description="List of unfinished epics.")
class TechLead(BaseAgent):

View File

@@ -1,4 +1,3 @@
You are an experienced tech lead in a software development agency.
Your main task is to break down the project into smaller tasks that developers will do.
You must specify each task as clear as possible.
Each task must have a description of what needs to be implemented.
Your main job is to break down the project into epics that developers will do.
You must specify each epic as clear as possible.

View File

@@ -1,7 +1,7 @@
import pytest
from core.agents.response import ResponseType
from core.agents.tech_lead import DevelopmentPlan, Task, TechLead, UpdatedDevelopmentPlan
from core.agents.tech_lead import DevelopmentPlan, Epic, TechLead, UpdatedDevelopmentPlan
from core.db.models import Complexity
from core.db.models.project_state import TaskStatus
from core.ui.base import UserInput
@@ -87,8 +87,8 @@ async def test_plan_epic(agentcontext):
tl.get_llm = mock_get_llm(
return_value=DevelopmentPlan(
plan=[
Task(description="Task 1"),
Task(description="Task 2"),
Epic(description="Task 1"),
Epic(description="Task 2"),
]
)
)
@@ -122,8 +122,8 @@ async def test_update_epic(agentcontext):
tl = TechLead(sm, ui)
tl.get_llm = mock_get_llm(
return_value=UpdatedDevelopmentPlan(
updated_current_epic=Task(description="Updated Just Finished"),
plan=[Task(description="Alternative Future Task")],
updated_current_epic=Epic(description="Updated Just Finished"),
plan=[Epic(description="Alternative Future Task")],
)
)