diff --git a/src/agents/athena/athena-config-injection.test.ts b/src/agents/athena/athena-config-injection.test.ts index 85ae79b3b..077c8c752 100644 --- a/src/agents/athena/athena-config-injection.test.ts +++ b/src/agents/athena/athena-config-injection.test.ts @@ -77,11 +77,11 @@ describe("Athena prompt config injection placeholders", () => { expect(athenaConfig.prompt).toContain("") }) - it("#then places council setup after step 1 and removes first-action wording", () => { + it("#then places council setup after step 1 routing and removes first-action wording", () => { const prompt = athenaConfig.prompt ?? "" expect(prompt).not.toContain("CRITICAL: Council Setup (Your First Action)") - const step1Index = prompt.indexOf("Step 1: Understand the question and decide the route.") + const step1Index = prompt.indexOf("Step 1: Route the message.") const step2Index = prompt.indexOf("Step 2: Council setup (default flow before launch).") expect(step1Index).toBeGreaterThan(-1) @@ -94,25 +94,29 @@ describe("Athena prompt config injection placeholders", () => { expect(prompt).not.toContain("Classification disambiguation rule:") }) - it("#then requires question tool routing in self-answerable path", () => { - expect(athenaConfig.prompt).toContain("Athena MUST ask the user to choose direct answer vs council using the Question tool") - expect(athenaConfig.prompt).toContain("header: \"Routing\"") - expect(athenaConfig.prompt).toContain("label: \"Answer directly\"") - expect(athenaConfig.prompt).toContain("label: \"Consult council\"") + it("#then uses two-phase routing with 6 categories and pre-checks", () => { + const prompt = athenaConfig.prompt ?? "" + expect(prompt).toContain("FIRST INTERACTION") + expect(prompt).toContain("SUBSEQUENT INTERACTIONS") + expect(prompt).toContain("Pre-checks (override all categories)") + expect(prompt).toContain("Council-worthy & clear") + expect(prompt).toContain("Simple/factual") + expect(prompt).toContain("Wrong-agent") }) - it("#then requires question tool clarifications in ambiguous council path", () => { - expect(athenaConfig.prompt).toContain("Use the Question tool (not open-ended free text) for 1-2 targeted clarifications") - expect(athenaConfig.prompt).toContain("Formulate the questions and options dynamically") - expect(athenaConfig.prompt).not.toContain("header: \"Output Type\"") - expect(athenaConfig.prompt).not.toContain("header: \"Scope\"") + it("#then uses targeted Question tool for ambiguous routing", () => { + const prompt = athenaConfig.prompt ?? "" + expect(prompt).toContain("Clarify with targeted Question tool") + expect(prompt).not.toContain("header: \"Output Type\"") + expect(prompt).not.toContain("header: \"Scope\"") }) it("#then keeps intent classification anchored to step 3 wording", () => { - expect(athenaConfig.prompt).toContain("Step 3: Classify the question intent by primary objective.") - expect(athenaConfig.prompt).toContain("Then proceed to Step 2.") - expect(athenaConfig.prompt).not.toContain("Then classify intent and proceed to Step 2.") - expect(athenaConfig.prompt).not.toContain("Classify intent immediately and proceed to Step 2.") + const prompt = athenaConfig.prompt ?? "" + expect(prompt).toContain("Step 3: Classify the question intent by primary objective.") + expect(prompt).toContain("Proceed directly to Step 2") + expect(prompt).not.toContain("Then classify intent and proceed to Step 2.") + expect(prompt).not.toContain("Classify intent immediately and proceed to Step 2.") }) it("#then excludes non-interactive mode branch from runtime prompt", () => { diff --git a/src/agents/athena/guidance/audit.ts b/src/agents/athena/guidance/audit.ts index b564fc86d..9a43bcd3c 100644 --- a/src/agents/athena/guidance/audit.ts +++ b/src/agents/athena/guidance/audit.ts @@ -140,6 +140,7 @@ Question({ options: [ { label: "Fix now (Atlas)", description: "Hand off to Atlas for direct implementation" }, { label: "Create plan (Prometheus)", description: "Hand off to Prometheus for planning and phased execution" }, + { label: "Cross-check with council", description: "Launch a new council session with this synthesis as context" }, { label: "No action", description: "Review only - no delegation" } ], multiple: false @@ -149,5 +150,6 @@ Question({ 6) Execute selected action: - Fix now (Atlas) -> switch_agent(agent="atlas") with ONLY selected findings - Create plan (Prometheus) -> switch_agent(agent="prometheus") with ONLY selected findings +- Cross-check with council -> launch a new council session with the current synthesis as context. Restart from Step 2 (council setup) with the synthesis included in the prompt. - No action -> acknowledge and end ` diff --git a/src/agents/athena/guidance/create.ts b/src/agents/athena/guidance/create.ts index 11a0fff9f..960578fa3 100644 --- a/src/agents/athena/guidance/create.ts +++ b/src/agents/athena/guidance/create.ts @@ -45,7 +45,7 @@ Question({ { label: "Implement selected creation (Sisyphus ultrawork)", description: "Implementation with Sisyphus using ultrawork mode" }, { label: "Write selected creation to document", description: "Save to .sisyphus/athena/notes/ (named after this council session)" }, { label: "Ask follow-up", description: "Ask another creation-focused question" }, - { label: "Done", description: "No further action needed" } + { label: "Cross-check with council", description: "Launch a new council session with this synthesis as context" }, ], multiple: false }] @@ -57,5 +57,5 @@ Question({ - Implement selected creation (Sisyphus ultrawork) -> switch_agent(agent="sisyphus") and prefix handoff context with "ultrawork ", including only selected creation(s). - Write selected creation to document -> write the document to the ".sisyphus/athena/notes/" directory using the council session name from the council_finalize archive_dir, then report the exact path. - Ask follow-up -> ask user then restart the council workflow from Step 3 (intent classification). -- Done -> acknowledge and end. +- Cross-check with council -> launch a new council session with the current synthesis as context. Restart from Step 2 (council setup) with the synthesis included in the prompt. ` diff --git a/src/agents/athena/guidance/diagnose.ts b/src/agents/athena/guidance/diagnose.ts index 61c6cfa59..8d633f773 100644 --- a/src/agents/athena/guidance/diagnose.ts +++ b/src/agents/athena/guidance/diagnose.ts @@ -33,6 +33,7 @@ Question({ { label: "Implement (Hephaestus)", description: "Hand off to Hephaestus for direct implementation" }, { label: "Implement (Sisyphus)", description: "Hand off to Sisyphus for implementation" }, { label: "Implement (Sisyphus ultrawork)", description: "Hand off to Sisyphus with ultrawork mode" }, + { label: "Cross-check with council", description: "Launch a new council session with this synthesis as context" }, { label: "No action", description: "Review only - no delegation" } ], multiple: false @@ -43,5 +44,6 @@ Question({ - Implement (Hephaestus) -> switch_agent(agent="hephaestus") - Implement (Sisyphus) -> switch_agent(agent="sisyphus") - Implement (Sisyphus ultrawork) -> switch_agent(agent="sisyphus") and prefix the handoff context with "ultrawork " +- Cross-check with council -> launch a new council session with the current synthesis as context. Restart from Step 2 (council setup) with the synthesis included in the prompt. - No action -> acknowledge and end ` diff --git a/src/agents/athena/guidance/evaluate.ts b/src/agents/athena/guidance/evaluate.ts index 55011441c..0344810f1 100644 --- a/src/agents/athena/guidance/evaluate.ts +++ b/src/agents/athena/guidance/evaluate.ts @@ -19,7 +19,7 @@ Question({ { label: "Adopt option -> implement now", description: "Implement a selected option immediately" }, { label: "Write to document", description: "Save to .sisyphus/athena/notes/ (named after this council session)" }, { label: "Ask follow-up", description: "Ask another comparison question" }, - { label: "Done", description: "No further action needed" } + { label: "Cross-check with council", description: "Launch a new council session with this synthesis as context" }, ], multiple: false }] @@ -58,5 +58,5 @@ Question({ - Adopt option -> implement now + Sisyphus ultrawork -> switch_agent(agent="sisyphus") and prefix handoff context with "ultrawork ". - Write to document -> write the document to the ".sisyphus/athena/notes/" directory using the council session name from the council_finalize archive_dir, then report the exact path. - Ask follow-up -> ask user then restart the council workflow from Step 3 (intent classification). -- Done -> acknowledge and end. +- Cross-check with council -> launch a new council session with the current synthesis as context. Restart from Step 2 (council setup) with the synthesis included in the prompt. ` diff --git a/src/agents/athena/guidance/explain.ts b/src/agents/athena/guidance/explain.ts index 24788eebc..49bc1f6b9 100644 --- a/src/agents/athena/guidance/explain.ts +++ b/src/agents/athena/guidance/explain.ts @@ -19,7 +19,7 @@ Question({ { label: "Convert to action plan (Prometheus)", description: "Turn insights into a phased plan" }, { label: "Write to document", description: "Save to .sisyphus/athena/notes/ (named after this council session)" }, { label: "Ask follow-up", description: "Ask another explanatory question" }, - { label: "Done", description: "No further action needed" } + { label: "Cross-check with council", description: "Launch a new council session with this synthesis as context" }, ], multiple: false }] @@ -29,5 +29,5 @@ Question({ - Convert to action plan (Prometheus) -> switch_agent(agent="prometheus") with synthesized explanation and target outcome. - Write to document -> write the document to the ".sisyphus/athena/notes/" directory using the council session name from the council_finalize archive_dir, then report the exact path. - Ask follow-up -> ask user then restart the council workflow from Step 3 (intent classification). -- Done -> acknowledge and end. +- Cross-check with council -> launch a new council session with the current synthesis as context. Restart from Step 2 (council setup) with the synthesis included in the prompt. ` diff --git a/src/agents/athena/guidance/freeform.ts b/src/agents/athena/guidance/freeform.ts index 5b708479c..83b79266c 100644 --- a/src/agents/athena/guidance/freeform.ts +++ b/src/agents/athena/guidance/freeform.ts @@ -19,7 +19,7 @@ Question({ { label: "Implement now", description: "Implement directly from this result" }, { label: "Write to document", description: "Save to .sisyphus/athena/notes/ (named after this council session)" }, { label: "Ask follow-up", description: "Ask another question" }, - { label: "Done", description: "No further action needed" } + { label: "Cross-check with council", description: "Launch a new council session with this synthesis as context" }, ], multiple: false }] @@ -46,5 +46,5 @@ Question({ - Implement now + Sisyphus ultrawork -> switch_agent(agent="sisyphus") and prefix handoff context with "ultrawork ". - Write to document -> write the document to the ".sisyphus/athena/notes/" directory using the council session name from the council_finalize archive_dir, then report the exact path. - Ask follow-up -> ask user then restart the council workflow from Step 3 (intent classification). -- Done -> acknowledge and end. +- Cross-check with council -> launch a new council session with the current synthesis as context. Restart from Step 2 (council setup) with the synthesis included in the prompt. ` diff --git a/src/agents/athena/guidance/perspectives.ts b/src/agents/athena/guidance/perspectives.ts index fe63eeeb9..968743984 100644 --- a/src/agents/athena/guidance/perspectives.ts +++ b/src/agents/athena/guidance/perspectives.ts @@ -21,7 +21,7 @@ Question({ { label: "Commit to stance -> implement now", description: "Implement based on a chosen stance immediately" }, { label: "Write to document", description: "Save to .sisyphus/athena/notes/ (named after this council session)" }, { label: "Ask follow-up", description: "Ask another perspective question" }, - { label: "Done", description: "No further action needed" } + { label: "Cross-check with council", description: "Launch a new council session with this synthesis as context" }, ], multiple: false }] @@ -60,5 +60,5 @@ Question({ - Commit to stance -> implement now + Sisyphus ultrawork -> switch_agent(agent="sisyphus") and prefix handoff context with "ultrawork ". - Write to document -> write the document to the ".sisyphus/athena/notes/" directory using the council session name from the council_finalize archive_dir, then report the exact path. - Ask follow-up -> ask user then restart the council workflow from Step 3 (intent classification). -- Done -> acknowledge and end. +- Cross-check with council -> launch a new council session with the current synthesis as context. Restart from Step 2 (council setup) with the synthesis included in the prompt. ` diff --git a/src/agents/athena/guidance/plan.ts b/src/agents/athena/guidance/plan.ts index 44a61c0a5..3cc8c3d12 100644 --- a/src/agents/athena/guidance/plan.ts +++ b/src/agents/athena/guidance/plan.ts @@ -20,6 +20,7 @@ Question({ { label: "Plan selected phase (Prometheus)", description: "Choose one phase for Prometheus to plan. Run /start-work to execute." }, { label: "Write to document", description: "Save to .sisyphus/athena/notes/ (named after this council session)" }, { label: "Ask follow-up", description: "Ask another planning question" }, + { label: "Cross-check with council", description: "Launch a new council session with this synthesis as context" }, { label: "Done", description: "No further action needed" } ], multiple: false @@ -44,5 +45,6 @@ Question({ - Plan selected phase (Prometheus) -> switch_agent(agent="prometheus") with only the selected phase plus dependencies, framed as work to be planned. - Write to document -> write the document to the ".sisyphus/athena/notes/" directory using the council session name from the council_finalize archive_dir, then report the exact path to the user. - Ask follow-up -> ask user then restart the council workflow from Step 3 (intent classification). +- Cross-check with council -> launch a new council session with the current synthesis as context. Restart from Step 2 (council setup) with the synthesis included in the prompt. - Done -> acknowledge and end. `