fix(agents): add anti-duplication rules to Atlas agent prompts
This commit is contained in:
@@ -77,6 +77,21 @@ describe("Atlas prompts auto-continue policy", () => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
describe("Atlas prompts anti-duplication coverage", () => {
|
||||||
|
test("all variants should include anti-duplication rules for delegated exploration", () => {
|
||||||
|
// given
|
||||||
|
const prompts = [ATLAS_SYSTEM_PROMPT, ATLAS_GPT_SYSTEM_PROMPT, ATLAS_GEMINI_SYSTEM_PROMPT]
|
||||||
|
|
||||||
|
// when / then
|
||||||
|
for (const prompt of prompts) {
|
||||||
|
expect(prompt).toContain("<Anti_Duplication>")
|
||||||
|
expect(prompt).toContain("Anti-Duplication Rule")
|
||||||
|
expect(prompt).toContain("DO NOT perform the same search yourself")
|
||||||
|
expect(prompt).toContain("non-overlapping work")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
describe("Atlas prompts plan path consistency", () => {
|
describe("Atlas prompts plan path consistency", () => {
|
||||||
test("default variant should use .sisyphus/plans/{plan-name}.md path", () => {
|
test("default variant should use .sisyphus/plans/{plan-name}.md path", () => {
|
||||||
// given
|
// given
|
||||||
|
|||||||
@@ -8,6 +8,8 @@
|
|||||||
* - Extended reasoning sections
|
* - Extended reasoning sections
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import { buildAntiDuplicationSection } from "../dynamic-agent-prompt-builder"
|
||||||
|
|
||||||
export const ATLAS_SYSTEM_PROMPT = `
|
export const ATLAS_SYSTEM_PROMPT = `
|
||||||
<identity>
|
<identity>
|
||||||
You are Atlas - the Master Orchestrator from OhMyOpenCode.
|
You are Atlas - the Master Orchestrator from OhMyOpenCode.
|
||||||
@@ -24,6 +26,8 @@ Implementation tasks are the means. Final Wave approval is the goal.
|
|||||||
One task per delegation. Parallel when independent. Verify everything.
|
One task per delegation. Parallel when independent. Verify everything.
|
||||||
</mission>
|
</mission>
|
||||||
|
|
||||||
|
${buildAntiDuplicationSection()}
|
||||||
|
|
||||||
<delegation_system>
|
<delegation_system>
|
||||||
## How to Delegate
|
## How to Delegate
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,8 @@
|
|||||||
* - Consequence-driven framing (Gemini ignores soft warnings)
|
* - Consequence-driven framing (Gemini ignores soft warnings)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import { buildAntiDuplicationSection } from "../dynamic-agent-prompt-builder"
|
||||||
|
|
||||||
export const ATLAS_GEMINI_SYSTEM_PROMPT = `
|
export const ATLAS_GEMINI_SYSTEM_PROMPT = `
|
||||||
<identity>
|
<identity>
|
||||||
You are Atlas - Master Orchestrator from OhMyOpenCode.
|
You are Atlas - Master Orchestrator from OhMyOpenCode.
|
||||||
@@ -51,6 +53,8 @@ Implementation tasks are the means. Final Wave approval is the goal.
|
|||||||
- **Your creativity should go into ORCHESTRATION QUALITY, not implementation decisions.**
|
- **Your creativity should go into ORCHESTRATION QUALITY, not implementation decisions.**
|
||||||
</scope_and_design_constraints>
|
</scope_and_design_constraints>
|
||||||
|
|
||||||
|
${buildAntiDuplicationSection()}
|
||||||
|
|
||||||
<delegation_system>
|
<delegation_system>
|
||||||
## How to Delegate
|
## How to Delegate
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,8 @@
|
|||||||
* - Scope discipline (no extra features)
|
* - Scope discipline (no extra features)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import { buildAntiDuplicationSection } from "../dynamic-agent-prompt-builder"
|
||||||
|
|
||||||
export const ATLAS_GPT_SYSTEM_PROMPT = `
|
export const ATLAS_GPT_SYSTEM_PROMPT = `
|
||||||
<identity>
|
<identity>
|
||||||
You are Atlas - Master Orchestrator from OhMyOpenCode.
|
You are Atlas - Master Orchestrator from OhMyOpenCode.
|
||||||
@@ -61,6 +63,8 @@ Implementation tasks are the means. Final Wave approval is the goal.
|
|||||||
3. \`Read\` for changed files
|
3. \`Read\` for changed files
|
||||||
</tool_usage_rules>
|
</tool_usage_rules>
|
||||||
|
|
||||||
|
${buildAntiDuplicationSection()}
|
||||||
|
|
||||||
<delegation_system>
|
<delegation_system>
|
||||||
## Delegation API
|
## Delegation API
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user