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:
Auto
2026-01-18 13:49:50 +02:00
parent 5f786078fa
commit 13128361b0
27 changed files with 1885 additions and 536 deletions

View File

@@ -200,6 +200,8 @@ export async function startAgent(
yoloMode?: boolean
parallelMode?: boolean
maxConcurrency?: number
testingAgentRatio?: number
countTestingInConcurrency?: boolean
} = {}
): Promise<AgentActionResponse> {
return fetchJSON(`/projects/${encodeURIComponent(projectName)}/agent/start`, {
@@ -208,6 +210,8 @@ export async function startAgent(
yolo_mode: options.yoloMode ?? false,
parallel_mode: options.parallelMode ?? false,
max_concurrency: options.maxConcurrency,
testing_agent_ratio: options.testingAgentRatio,
count_testing_in_concurrency: options.countTestingInConcurrency,
}),
})
}

View File

@@ -119,7 +119,7 @@ export interface FeatureUpdate {
}
// Agent types
export type AgentStatus = 'stopped' | 'running' | 'paused' | 'crashed'
export type AgentStatus = 'stopped' | 'running' | 'paused' | 'crashed' | 'loading'
export interface AgentStatusResponse {
status: AgentStatus
@@ -127,8 +127,10 @@ export interface AgentStatusResponse {
started_at: string | null
yolo_mode: boolean
model: string | null // Model being used by running agent
parallel_mode: boolean
parallel_mode: boolean // DEPRECATED: Always true now (unified orchestrator)
max_concurrency: number | null
testing_agent_ratio: number // Testing agents per coding agent (0-3)
count_testing_in_concurrency: boolean // Count testing toward concurrency limit
}
export interface AgentActionResponse {
@@ -171,12 +173,20 @@ export interface TerminalInfo {
}
// Agent mascot names for multi-agent UI
export const AGENT_MASCOTS = ['Spark', 'Fizz', 'Octo', 'Hoot', 'Buzz'] as const
export const AGENT_MASCOTS = [
'Spark', 'Fizz', 'Octo', 'Hoot', 'Buzz', // Original 5
'Pixel', 'Byte', 'Nova', 'Chip', 'Bolt', // Tech-inspired
'Dash', 'Zap', 'Gizmo', 'Turbo', 'Blip', // Energetic
'Neon', 'Widget', 'Zippy', 'Quirk', 'Flux', // Playful
] as const
export type AgentMascot = typeof AGENT_MASCOTS[number]
// Agent state for Mission Control
export type AgentState = 'idle' | 'thinking' | 'working' | 'testing' | 'success' | 'error' | 'struggling'
// Agent type (coding vs testing)
export type AgentType = 'coding' | 'testing'
// Individual log entry for an agent
export interface AgentLogEntry {
line: string
@@ -188,6 +198,7 @@ export interface AgentLogEntry {
export interface ActiveAgent {
agentIndex: number
agentName: AgentMascot
agentType: AgentType // "coding" or "testing"
featureId: number
featureName: string
state: AgentState
@@ -226,6 +237,7 @@ export interface WSAgentUpdateMessage {
type: 'agent_update'
agentIndex: number
agentName: AgentMascot
agentType: AgentType // "coding" or "testing"
featureId: number
featureName: string
state: AgentState
@@ -467,9 +479,13 @@ export interface Settings {
yolo_mode: boolean
model: string
glm_mode: boolean
testing_agent_ratio: number // Testing agents per coding agent (0-3)
count_testing_in_concurrency: boolean // Count testing toward concurrency limit
}
export interface SettingsUpdate {
yolo_mode?: boolean
model?: string
testing_agent_ratio?: number
count_testing_in_concurrency?: boolean
}