From 47c6bd9de9831a3b4511a7e4a9c4ef313fcdfc9c Mon Sep 17 00:00:00 2001 From: ismeth Date: Thu, 12 Feb 2026 12:29:21 +0100 Subject: [PATCH] feat(02-01): add athena council execution primitives - Add council execution result and member response types for orchestration - Implement provider/model parser for BackgroundManager-compatible model input - Add shared council prompt builder and export new athena modules --- src/agents/athena/council-prompt.ts | 24 ++++++++++++++++++++++++ src/agents/athena/index.ts | 2 ++ src/agents/athena/model-parser.ts | 23 +++++++++++++++++++++++ src/agents/athena/types.ts | 17 +++++++++++++++++ 4 files changed, 66 insertions(+) create mode 100644 src/agents/athena/council-prompt.ts create mode 100644 src/agents/athena/model-parser.ts diff --git a/src/agents/athena/council-prompt.ts b/src/agents/athena/council-prompt.ts new file mode 100644 index 00000000..9ccdff64 --- /dev/null +++ b/src/agents/athena/council-prompt.ts @@ -0,0 +1,24 @@ +export function buildCouncilPrompt(question: string): string { + return `You are a council member in a multi-model analysis council. Your role is to provide independent, thorough analysis of the question below. + +## Your Role +- You are one of several AI models analyzing the same question independently +- Your analysis should be thorough and evidence-based +- You are read-only - you cannot modify any files, only analyze +- Focus on finding real issues, not hypothetical ones + +## Instructions +1. Analyze the question carefully +2. Search the codebase thoroughly using available tools (Read, Grep, Glob, LSP) +3. Report your findings with evidence (file paths, line numbers, code snippets) +4. For each finding, state: + - What the issue/observation is + - Where it is (file path, line number) + - Why it matters (severity: critical/high/medium/low) + - Your confidence level (high/medium/low) +5. Be concise but thorough - quality over quantity + +## Question + +${question}` +} diff --git a/src/agents/athena/index.ts b/src/agents/athena/index.ts index 123b68d1..6e920498 100644 --- a/src/agents/athena/index.ts +++ b/src/agents/athena/index.ts @@ -1,2 +1,4 @@ export * from "./types" +export * from "./model-parser" +export * from "./council-prompt" export * from "../../config/schema/athena" diff --git a/src/agents/athena/model-parser.ts b/src/agents/athena/model-parser.ts new file mode 100644 index 00000000..6a408832 --- /dev/null +++ b/src/agents/athena/model-parser.ts @@ -0,0 +1,23 @@ +export interface ParsedModel { + providerID: string + modelID: string +} + +export function parseModelString(model: string): ParsedModel | null { + if (!model) { + return null + } + + const slashIndex = model.indexOf("/") + if (slashIndex <= 0) { + return null + } + + const providerID = model.substring(0, slashIndex) + const modelID = model.substring(slashIndex + 1) + if (!modelID) { + return null + } + + return { providerID, modelID } +} diff --git a/src/agents/athena/types.ts b/src/agents/athena/types.ts index 13a3f748..a79e2f67 100644 --- a/src/agents/athena/types.ts +++ b/src/agents/athena/types.ts @@ -17,3 +17,20 @@ export interface AthenaConfig { export type CouncilMemberStatus = "completed" | "timeout" | "error" export type AgreementLevel = "unanimous" | "majority" | "minority" | "solo" + +export interface CouncilMemberResponse { + member: CouncilMemberConfig + status: CouncilMemberStatus + response?: string + error?: string + taskId: string + durationMs: number +} + +export interface CouncilExecutionResult { + question: string + responses: CouncilMemberResponse[] + totalMembers: number + completedCount: number + failedCount: number +}