Files
oh-my-opencode/src/hooks/atlas/system-reminder-templates.test.ts
T
YeonGyu-Kim 7e96af5f28 fix(atlas): exclude node_modules from verification git diff --stat (#3215)
Atlas verification reminders instructed 'git diff --stat' which
included node_modules noise in the output. Added pathspec exclude
to both VERIFICATION_REMINDER and VERIFICATION_REMINDER_GEMINI
templates.

🤖 Generated with OhMyOpenCode assistance
https://github.com/code-yeongyu/oh-my-opencode
2026-04-12 02:29:08 +09:00

54 lines
1.9 KiB
TypeScript

import { describe, it, expect } from "bun:test"
import {
BOULDER_CONTINUATION_PROMPT,
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
const proceedPosition = proceedMatch!.index
expect(checkboxPosition).toBeLessThan(proceedPosition)
})
})
})
describe("VERIFICATION_REMINDER", () => {
it("contains node_modules exclusion pathspec in git diff command", () => {
expect(VERIFICATION_REMINDER).toContain(":!node_modules")
})
})
describe("VERIFICATION_REMINDER_GEMINI", () => {
it("contains node_modules exclusion pathspec in git diff command", () => {
expect(VERIFICATION_REMINDER_GEMINI).toContain(":!node_modules")
})
})