import { BaseAgent, AgentContext, AgentResult } from "./base.js"; import { IdeationEngine } from "../core/ideation.js"; export class IdeationAgent extends BaseAgent { readonly name = "ideation-agent"; readonly description = "Generates improvement ideas using git-native pattern mining, coverage gap analysis, and architectural drift detection. Output feeds directly into planning pipeline."; readonly workflow = "research"; async execute(context: AgentContext): Promise { const start = Date.now(); this.log("Generating improvement ideas..."); if (context.backend) { const result = await this.executeViaBackend( context, `Generate improvement ideas for: ${context.specification}` ); return { ...result, duration_ms: Date.now() - start }; } const engine = new IdeationEngine(context.project_path); const ideas = engine.runMechanical(); const output = engine.formatIdeas(ideas); return { success: true, output, artifacts_created: [], decisions: 0, escalations: 0, duration_ms: Date.now() - start, }; } mechanicalIdeate(projectPath: string) { const engine = new IdeationEngine(projectPath); return engine.runMechanical(); } }