fix(athena): address 9 council-audit findings — dead code, bugs, and hardening
Fixes from multi-model council audit (7 members, 19 findings, 9 selected): - Use parseModelString() for cross-provider Anthropic thinking config (#3) - Update stale AGENTS.md athena directory listing (#4) - Replace prompt in appendMissingCouncilPrompt instead of appending (#5) - Extract duplicated session cleanup logic in agent-switch hook (#6) - Surface skipped council members when >=2 valid members exist (#9) - Expand fallback handoff regex with negation guards (#11) - Remove dead council-member agent from agentSources and tests (#12) - Make runtime council member duplicate check case-insensitive (#14) - Fix false-positive schema tests by adding required name field (#18)
This commit is contained in:
@@ -14,7 +14,6 @@ import { createMomusAgent, momusPromptMetadata } from "./momus"
|
||||
import { createHephaestusAgent } from "./hephaestus"
|
||||
import { createSisyphusJuniorAgentWithOverrides } from "./sisyphus-junior"
|
||||
import { createAthenaAgent, ATHENA_PROMPT_METADATA } from "./athena/agent"
|
||||
import { createCouncilMemberAgent } from "./athena/council-member-agent"
|
||||
import type { AvailableCategory } from "./dynamic-agent-prompt-builder"
|
||||
import {
|
||||
fetchAvailableModels,
|
||||
@@ -45,7 +44,6 @@ const agentSources: Partial<Record<BuiltinAgentName, AgentSource>> = {
|
||||
metis: createMetisAgent,
|
||||
momus: createMomusAgent,
|
||||
athena: createAthenaAgent,
|
||||
"council-member": createCouncilMemberAgent,
|
||||
// Note: Atlas is handled specially in createBuiltinAgents()
|
||||
// because it needs OrchestratorContext, not just a model string
|
||||
atlas: createAtlasAgent as AgentFactory,
|
||||
@@ -196,7 +194,14 @@ export async function createBuiltinAgents(
|
||||
|
||||
if (registeredKeys.length > 0) {
|
||||
const memberList = registeredKeys.map((key) => `- "${key}"`).join("\n")
|
||||
const councilTaskInstructions = `\n\n## Registered Council Members\n\nUse these as subagent_type in task calls:\n\n${memberList}`
|
||||
let councilTaskInstructions = `\n\n## Registered Council Members\n\nUse these as subagent_type in task calls:\n\n${memberList}`
|
||||
|
||||
if (skippedMembers.length > 0) {
|
||||
const skipDetails = skippedMembers.map((m) => `- **${m.name}**: ${m.reason}`).join("\n")
|
||||
councilTaskInstructions += `\n\n> **Note**: Some configured council members were skipped:\n${skipDetails}`
|
||||
log("[builtin-agents] Some council members were skipped during registration", { skippedMembers })
|
||||
}
|
||||
|
||||
result["athena"] = {
|
||||
...result["athena"],
|
||||
prompt: (result["athena"].prompt ?? "") + councilTaskInstructions,
|
||||
|
||||
Reference in New Issue
Block a user