import { BaseAgent, AgentContext, AgentResult } from "./base.js"; export class PhaseResearcherAgent extends BaseAgent { readonly name = "phase-researcher"; readonly description = "Researches how to implement a specific phase well."; readonly workflow = "research"; async execute(context: AgentContext): Promise { const start = Date.now(); this.log("Researching phase implementation..."); if (context.backend) { const result = await this.executeViaBackend( context, `Research how to implement phase ${context.phase} well. Specification: ${context.specification}` ); return { ...result, duration_ms: Date.now() - start }; } return { success: false, output: "Phase research requires an intelligence backend.", artifacts_created: [], decisions: 0, escalations: 0, duration_ms: Date.now() - start, error: "No intelligence backend available", }; } }