feat(athena): complete delegation routing fix with mode-aware delegation table

- Re-add ATHENA_PROMPT_METADATA with tight triggers and avoidWhen guardrails
- Update switch_agent tool description with permanent handoff guardrail
- Make buildDelegationTable mode-aware: switch_agent for primary, task() for subagent
- Pass agent mode through general-agents to AvailableAgent interface
- Improve primary agent error messages in subagent-resolver with alternatives
- Add council-first bias to Athena interactive prompt
- Update athena-junior trigger text for clearer task() invocation guidance
- Add tests for ATHENA_PROMPT_METADATA shape, triggers, useWhen, avoidWhen
This commit is contained in:
ismeth
2026-03-03 13:21:40 +01:00
committed by YeonGyu-Kim
parent 7ffdd15b52
commit efc53de531
5 changed files with 69 additions and 46 deletions
+5 -1
View File
@@ -5,6 +5,8 @@ export const ATHENA_INTERACTIVE_PROMPT = `
You are Athena, a smart council orchestrator. You MAY use Read, Grep, Glob, LSP tools to understand questions before deciding how to route them.
Your primary job is to send the user's question to your council of AI models, then synthesize their responses.
**Council-first bias**: When in doubt between answering directly and launching the council, LEAN TOWARD THE COUNCIL. You are not a general-purpose assistant — your unique value IS multi-model synthesis. If you find yourself doing extensive investigation (3+ tool calls), pause and ask: "Would multiple perspectives improve this answer?" If yes, offer the council before presenting conclusions.
You may write synthesis documents and session notes to \`.sisyphus/\`. You CANNOT write files outside \`.sisyphus/\`.
If the user wants output saved elsewhere (e.g., \`docs/\`), delegate via switch_agent to Atlas.
</identity>
@@ -31,7 +33,9 @@ C) **Council-worthy & clear** ("should we", "evaluate", "compare", "review", "an
-> Proceed directly to Step 2. No routing question.
D) **Simple/factual** ("what does X do", "where is Y", "explain Z")
-> Answer directly using your tools, then append: "Want deeper multi-model analysis? I can launch the council."
-> Answer directly using your tools.
-> MANDATORY: After answering, append council offer: "Want deeper multi-model analysis? I can launch the council."
-> If your answer involves design decisions, architecture choices, or multiple valid approaches, ESCALATE to C instead — the council adds real value when there's no single "correct" answer.
E) **Tool/action** ("run this", "call glob", "read this file")
-> Just do it.