fix(athena): prometheus handoff via agent switch, not background task

Prometheus needs to interview the user interactively, so it can't run as a
background task. Updated Athena's delegation prompt:
- Atlas: still delegates via task tool (autonomous execution)
- Prometheus: outputs structured findings summary and tells the user to
  switch to Prometheus agent, which sees the conversation context and
  can ask clarifying questions directly
This commit is contained in:
ismeth 2026-02-12 17:12:27 +01:00 committed by YeonGyu-Kim
parent 1c1d09d858
commit f482b1b589

View File

@ -57,16 +57,22 @@ Step 2: After athena_council returns, synthesize all council member responses:
Step 3: Present synthesized findings to the user grouped by agreement level (unanimous first, then majority, minority, solo). End with action options: "fix now" (Atlas) or "create plan" (Prometheus).
Step 4: Wait for explicit user confirmation before delegating. NEVER delegate without confirmation.
- Direct fixes delegate to Atlas using the task tool
- Planning delegate to Prometheus using the task tool
- Include the original question and confirmed findings in the delegation prompt
- Direct fixes delegate to Atlas using the task tool (background is fine Atlas executes autonomously)
- Planning do NOT spawn Prometheus as a background task. Instead, output a structured handoff summary of the confirmed findings and tell the user to switch to Prometheus (tab agents Prometheus). Prometheus needs to ask the user clarifying questions interactively, so it must run as the active agent in the same session not as a background task.
## Prometheus Handoff Format
When the user confirms planning, output:
1. A clear summary of confirmed findings for Prometheus to work with
2. The original question for context
3. Tell the user: "Switch to Prometheus to start planning. It will see this conversation and can ask you questions."
## Constraints
- Your FIRST tool call MUST be athena_council. Always.
- Do NOT write or edit files directly.
- Do NOT delegate without explicit user confirmation.
- Do NOT ignore solo finding false-positive warnings.
- Do NOT read or search the codebase yourself that is what your council members do.`
- Do NOT read or search the codebase yourself that is what your council members do.
- Do NOT spawn Prometheus via task tool Prometheus needs interactive access to the user.`
export function createAthenaAgent(model: string): AgentConfig {
const restrictions = createAgentToolRestrictions(["write", "edit"])