mirror of
https://github.com/leonvanzyl/autocoder.git
synced 2026-01-30 06:12:06 +00:00
feat: add dedicated testing agents and enhanced parallel orchestration
Introduce a new testing agent architecture that runs regression tests independently from coding agents, improving quality assurance in parallel mode. Key changes: Testing Agent System: - Add testing_prompt.template.md for dedicated testing agent role - Add feature_mark_failing MCP tool for regression detection - Add --agent-type flag to select initializer/coding/testing mode - Remove regression testing from coding prompt (now handled by testing agents) Parallel Orchestrator Enhancements: - Add testing agent spawning with configurable ratio (--testing-agent-ratio) - Add comprehensive debug logging system (DebugLog class) - Improve database session management to prevent stale reads - Add engine.dispose() calls to refresh connections after subprocess commits - Fix f-string linting issues (remove unnecessary f-prefixes) UI Improvements: - Add testing agent mascot (Chip) to AgentAvatar - Enhance AgentCard to display testing agent status - Add testing agent ratio slider in SettingsModal - Update WebSocket handling for testing agent updates - Improve ActivityFeed to show testing agent activity API & Server Updates: - Add testing_agent_ratio to settings schema and endpoints - Update process manager to support testing agent type - Enhance WebSocket messages for agent_update events Template Changes: - Delete coding_prompt_yolo.template.md (consolidated into main prompt) - Update initializer_prompt.template.md with improved structure - Streamline coding_prompt.template.md workflow Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
21
prompts.py
21
prompts.py
@@ -74,31 +74,30 @@ def get_coding_prompt(project_dir: Path | None = None) -> str:
|
||||
return load_prompt("coding_prompt", project_dir)
|
||||
|
||||
|
||||
def get_coding_prompt_yolo(project_dir: Path | None = None) -> str:
|
||||
"""Load the YOLO mode coding agent prompt (project-specific if available)."""
|
||||
return load_prompt("coding_prompt_yolo", project_dir)
|
||||
def get_testing_prompt(project_dir: Path | None = None) -> str:
|
||||
"""Load the testing agent prompt (project-specific if available)."""
|
||||
return load_prompt("testing_prompt", project_dir)
|
||||
|
||||
|
||||
def get_single_feature_prompt(feature_id: int, project_dir: Path | None = None, yolo_mode: bool = False) -> str:
|
||||
"""
|
||||
Load the coding prompt with single-feature focus instructions prepended.
|
||||
|
||||
When the parallel orchestrator assigns a specific feature to an agent,
|
||||
When the orchestrator assigns a specific feature to a coding agent,
|
||||
this prompt ensures the agent works ONLY on that feature.
|
||||
|
||||
Args:
|
||||
feature_id: The specific feature ID to work on
|
||||
project_dir: Optional project directory for project-specific prompts
|
||||
yolo_mode: If True, use the YOLO prompt variant
|
||||
yolo_mode: Ignored (kept for backward compatibility). Testing is now
|
||||
handled by separate testing agents, not YOLO prompts.
|
||||
|
||||
Returns:
|
||||
The prompt with single-feature instructions prepended
|
||||
"""
|
||||
# Get the base prompt
|
||||
if yolo_mode:
|
||||
base_prompt = get_coding_prompt_yolo(project_dir)
|
||||
else:
|
||||
base_prompt = get_coding_prompt(project_dir)
|
||||
# Always use the standard coding prompt
|
||||
# (Testing/regression is handled by separate testing agents)
|
||||
base_prompt = get_coding_prompt(project_dir)
|
||||
|
||||
# Prepend single-feature instructions
|
||||
single_feature_header = f"""## SINGLE FEATURE MODE
|
||||
@@ -185,8 +184,8 @@ def scaffold_project_prompts(project_dir: Path) -> Path:
|
||||
templates = [
|
||||
("app_spec.template.txt", "app_spec.txt"),
|
||||
("coding_prompt.template.md", "coding_prompt.md"),
|
||||
("coding_prompt_yolo.template.md", "coding_prompt_yolo.md"),
|
||||
("initializer_prompt.template.md", "initializer_prompt.md"),
|
||||
("testing_prompt.template.md", "testing_prompt.md"),
|
||||
]
|
||||
|
||||
copied_files = []
|
||||
|
||||
Reference in New Issue
Block a user