feat(athena): harden council config — mandatory name, guard prompt, no-crash duplicates

- Add council config guard prompt: when Athena has no valid council members,
  inject a STOP instruction telling the user how to configure council members
  instead of failing messily with generic agents
- Make council member 'name' field mandatory (was optional with auto-naming)
- Remove humanizeModelId and UPPERCASE_TOKENS — no more fragile auto-naming
- Replace throw on duplicate names with log + skip (graceful degradation)
- Update schema, types, tests (87 pass), and documentation
This commit is contained in:
ismeth
2026-02-20 13:15:23 +01:00
committed by YeonGyu-Kim
parent b582cef9dc
commit afab3e658a
9 changed files with 144 additions and 65 deletions
+5
View File
@@ -30,6 +30,7 @@ import { maybeCreateSisyphusConfig } from "./builtin-agents/sisyphus-agent"
import { maybeCreateHephaestusConfig } from "./builtin-agents/hephaestus-agent"
import { maybeCreateAtlasConfig } from "./builtin-agents/atlas-agent"
import { registerCouncilMemberAgents } from "./builtin-agents/council-member-agents"
import { appendMissingCouncilPrompt } from "./builtin-agents/athena-council-guard"
import type { CouncilConfig } from "./athena/types"
type AgentSource = AgentFactory | AgentConfig
@@ -200,9 +201,13 @@ export async function createBuiltinAgents(
...result["athena"],
prompt: (result["athena"].prompt ?? "") + councilTaskInstructions,
}
} else {
result["athena"] = appendMissingCouncilPrompt(result["athena"])
}
} else if (councilConfig && councilConfig.members.length >= 2 && !result["athena"]) {
log("[builtin-agents] Skipping council member registration — Athena is disabled")
} else if (result["athena"]) {
result["athena"] = appendMissingCouncilPrompt(result["athena"])
}
return result