f2a5ef0966
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
80 lines
2.7 KiB
TypeScript
80 lines
2.7 KiB
TypeScript
import { describe, it, expect } from "bun:test"
|
|
import {
|
|
BOULDER_COMPLETE_PROMPT,
|
|
BOULDER_CONTINUATION_PROMPT,
|
|
SINGLE_TASK_DIRECTIVE,
|
|
VERIFICATION_REMINDER,
|
|
VERIFICATION_REMINDER_GEMINI,
|
|
} from "./system-reminder-templates"
|
|
|
|
describe("BOULDER_CONTINUATION_PROMPT", () => {
|
|
describe("checkbox-first priority rules", () => {
|
|
it("first rule after RULES: mentions both reading the plan AND marking a still-unchecked completed task", () => {
|
|
const rulesSection = BOULDER_CONTINUATION_PROMPT.split("RULES:")[1]!
|
|
const firstRule = rulesSection.split("\n")[1]!.trim()
|
|
|
|
expect(firstRule).toContain("Read the plan")
|
|
expect(firstRule).toContain("mark")
|
|
expect(firstRule).toContain("completed")
|
|
})
|
|
|
|
it("first rule includes IMMEDIATELY keyword", () => {
|
|
const rulesSection = BOULDER_CONTINUATION_PROMPT.split("RULES:")[1]!
|
|
const firstRule = rulesSection.split("\n")[1]!.trim()
|
|
|
|
expect(firstRule).toContain("IMMEDIATELY")
|
|
})
|
|
|
|
it("checkbox-marking guidance appears BEFORE Proceed without asking for permission", () => {
|
|
const rulesSection = BOULDER_CONTINUATION_PROMPT.split("RULES:")[1]!
|
|
|
|
const checkboxMarkingMatch = rulesSection.match(/- \[x\]/i)
|
|
const proceedMatch = rulesSection.match(/Proceed without asking for permission/)
|
|
|
|
expect(checkboxMarkingMatch).not.toBeNull()
|
|
expect(proceedMatch).not.toBeNull()
|
|
|
|
const checkboxPosition = checkboxMarkingMatch!.index ?? -1
|
|
const proceedPosition = proceedMatch!.index ?? -1
|
|
|
|
expect(checkboxPosition).toBeLessThan(proceedPosition)
|
|
})
|
|
})
|
|
})
|
|
|
|
describe("VERIFICATION_REMINDER", () => {
|
|
it("contains node_modules exclusion pathspec in git diff command", () => {
|
|
expect(VERIFICATION_REMINDER).toContain(":!node_modules")
|
|
})
|
|
})
|
|
|
|
describe("BOULDER_COMPLETE_PROMPT", () => {
|
|
it("contains the required placeholders", () => {
|
|
expect(BOULDER_COMPLETE_PROMPT).toContain("{PLAN_NAME}")
|
|
expect(BOULDER_COMPLETE_PROMPT).toContain("{ELAPSED_HUMAN}")
|
|
expect(BOULDER_COMPLETE_PROMPT).toContain("{TASK_BREAKDOWN}")
|
|
})
|
|
})
|
|
|
|
describe("VERIFICATION_REMINDER_GEMINI", () => {
|
|
it("contains node_modules exclusion pathspec in git diff command", () => {
|
|
expect(VERIFICATION_REMINDER_GEMINI).toContain(":!node_modules")
|
|
})
|
|
})
|
|
|
|
describe("SINGLE_TASK_DIRECTIVE", () => {
|
|
it("does not contain refusal language", () => {
|
|
// given
|
|
const lowerCaseDirective = SINGLE_TASK_DIRECTIVE.toLowerCase()
|
|
|
|
// when / then
|
|
expect(lowerCaseDirective).not.toContain("refuse")
|
|
expect(SINGLE_TASK_DIRECTIVE).not.toContain("I refuse")
|
|
})
|
|
|
|
it("contains systematic execution guidance", () => {
|
|
expect(SINGLE_TASK_DIRECTIVE).toContain("EXECUTION PROTOCOL")
|
|
expect(SINGLE_TASK_DIRECTIVE).toContain("VERIFICATION IS MANDATORY")
|
|
})
|
|
})
|