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
This commit is contained in:
24
src/agents/athena/council-prompt.ts
Normal file
24
src/agents/athena/council-prompt.ts
Normal file
@@ -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}`
|
||||
}
|
||||
@@ -1,2 +1,4 @@
|
||||
export * from "./types"
|
||||
export * from "./model-parser"
|
||||
export * from "./council-prompt"
|
||||
export * from "../../config/schema/athena"
|
||||
|
||||
23
src/agents/athena/model-parser.ts
Normal file
23
src/agents/athena/model-parser.ts
Normal file
@@ -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 }
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user