19
19
from core .agents .tech_writer import TechnicalWriter
20
20
from core .agents .troubleshooter import Troubleshooter
21
21
from core .db .models .project_state import TaskStatus
22
- from core .db .models .specification import Complexity
23
22
from core .log import get_logger
24
23
from core .telemetry import telemetry
25
24
from core .ui .base import ProjectStage
@@ -180,6 +179,8 @@ def create_agent(self, prev_response: Optional[AgentResponse]) -> BaseAgent:
180
179
return Developer (self .state_manager , self .ui , prev_response = prev_response )
181
180
if prev_response .type == ResponseType .IMPORT_PROJECT :
182
181
return Importer (self .state_manager , self .ui , prev_response = prev_response )
182
+ if prev_response .type == ResponseType .EXTERNAL_DOCS_REQUIRED :
183
+ return ExternalDocumentation (self .state_manager , self .ui , prev_response = prev_response )
183
184
184
185
if not state .specification .description :
185
186
if state .files :
@@ -199,9 +200,6 @@ def create_agent(self, prev_response: Optional[AgentResponse]) -> BaseAgent:
199
200
# Ask the Tech Lead to break down the initial project or feature into tasks and apply project templates
200
201
return TechLead (self .state_manager , self .ui , process_manager = self .process_manager )
201
202
202
- if state .current_task and state .docs is None and state .specification .complexity != Complexity .SIMPLE :
203
- return ExternalDocumentation (self .state_manager , self .ui )
204
-
205
203
# Current task status must be checked before Developer is called because we might want
206
204
# to skip it instead of breaking it down
207
205
current_task_status = state .current_task .get ("status" ) if state .current_task else None
0 commit comments