feat(athena): redesign Step 1 routing with two-phase classification and cross-check option

Replace the 3-route system (self-answerable/ambiguous/council-clear) with
6-category first-interaction routing (meta, wrong-agent, council-worthy,
simple/factual, tool/action, ambiguous) plus 2 pre-checks for explicit
opt-out and council requests. Add subsequent-interaction rules for direct
answers, auto-routing, and greetings. Add 'Cross-check with council'
action to all 8 guidance files for post-synthesis re-evaluation.
This commit is contained in:
ismeth
2026-03-02 15:27:59 +01:00
committed by YeonGyu-Kim
parent a9ce68c185
commit 96524c7a54
9 changed files with 36 additions and 26 deletions
@@ -77,11 +77,11 @@ describe("Athena prompt config injection placeholders", () => {
expect(athenaConfig.prompt).toContain("<constraints>")
})
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", () => {
+2
View File
@@ -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
</runtime_action_paths>`
+2 -2
View File
@@ -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.
</runtime_action_paths>`
+2
View File
@@ -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
</runtime_action_paths>`
+2 -2
View File
@@ -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.
</runtime_action_paths>`
+2 -2
View File
@@ -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.
</runtime_action_paths>`
+2 -2
View File
@@ -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.
</runtime_action_paths>`
+2 -2
View File
@@ -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.
</runtime_action_paths>`
+2
View File
@@ -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.
</runtime_action_paths>`