import { BaseAgent, AgentContext, AgentResult } from "./base.js"; export class PlanCheckerAgent extends BaseAgent { readonly name = "plan-checker"; readonly description = "Verifies plan quality. On ISSUES FOUND, triggers automatic plan revision (up to 3 iterations)."; readonly workflow = "plan"; async execute(context: AgentContext): Promise { const start = Date.now(); this.log("Checking plan quality..."); if (context.backend) { const result = await this.executeViaBackend( context, `Verify plan quality for phase ${context.phase}. Specification: ${context.specification}` ); return { ...result, duration_ms: Date.now() - start }; } return { success: false, output: "Plan checking requires an intelligence backend.", artifacts_created: [], decisions: 0, escalations: 0, duration_ms: Date.now() - start, error: "No intelligence backend available", }; } }