fix(athena): interpolate MIN_RESPONSE_LENGTH constant and add solo mode tests

This commit is contained in:
ismeth
2026-03-02 00:45:39 +01:00
committed by YeonGyu-Kim
parent d87d0256ba
commit a9ce68c185
2 changed files with 21 additions and 2 deletions
+19 -1
View File
@@ -1,5 +1,5 @@
import { describe, expect, it } from "bun:test"
import { COUNCIL_MEMBER_PROMPT, createCouncilMemberAgent } from "./council-member-agent"
import { COUNCIL_MEMBER_PROMPT, COUNCIL_SOLO_ADDENDUM, createCouncilMemberAgent } from "./council-member-agent"
describe("COUNCIL_MEMBER_PROMPT", () => {
describe("#given the prompt constant", () => {
@@ -45,6 +45,24 @@ describe("COUNCIL_MEMBER_PROMPT", () => {
})
})
describe("COUNCIL_SOLO_ADDENDUM", () => {
describe("#given the solo mode addendum", () => {
describe("#when checking for prohibition language", () => {
it("#then contains call_omo_agent (prohibition)", () => {
expect(COUNCIL_SOLO_ADDENDUM).toContain("call_omo_agent")
})
it("#then contains Do NOT (prohibition language)", () => {
expect(COUNCIL_SOLO_ADDENDUM).toContain("Do NOT")
})
it("#then contains ALL exploration yourself (self-reliance instruction)", () => {
expect(COUNCIL_SOLO_ADDENDUM).toContain("ALL exploration yourself")
})
})
})
})
describe("createCouncilMemberAgent", () => {
describe("#given a model string", () => {
describe("#when creating a council member agent", () => {
+2 -1
View File
@@ -1,3 +1,4 @@
import { MIN_RESPONSE_LENGTH } from "../../tools/council-archive/council-response-extractor"
import type { AgentConfig } from "@opencode-ai/sdk"
import type { AgentMode } from "../types"
import { createAgentToolAllowlist } from "../../shared"
@@ -37,7 +38,7 @@ Your analysis here...
</COUNCIL_MEMBER_RESPONSE>
If you do not wrap your response in <COUNCIL_MEMBER_RESPONSE> tags, your analysis will not be included in the synthesis.
Your response inside the tags must be at least 100 characters of substantive content. Empty or trivially short responses will be treated as missing and will not count toward quorum.`
Your response inside the tags must be at least ${MIN_RESPONSE_LENGTH} characters of substantive content. Empty or trivially short responses will be treated as missing and will not count toward quorum.`
export const COUNCIL_SOLO_ADDENDUM = `
## Solo Analysis Mode