feat(testing): close the testing gap in ce:work, ce:plan, and testing-reviewer (#438)

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Trevin Chow
2026-03-29 13:07:05 -07:00
committed by GitHub
parent a301a08205
commit 35678b8add
8 changed files with 399 additions and 6 deletions

View File

@@ -48,6 +48,45 @@ describe("ce:work review contract", () => {
expect(beta).toContain("`git-commit` skill")
expect(beta).not.toContain("gh pr create")
})
test("includes per-task testing deliberation in execution loop", async () => {
const content = await readRepoFile("plugins/compound-engineering/skills/ce-work/SKILL.md")
// Testing deliberation exists in the execution loop
expect(content).toContain("Assess testing coverage")
// Deliberation is between "Run tests after changes" and "Mark task as completed"
const runTestsIdx = content.indexOf("Run tests after changes")
const assessIdx = content.indexOf("Assess testing coverage")
const markDoneIdx = content.indexOf("Mark task as completed")
expect(runTestsIdx).toBeLessThan(assessIdx)
expect(assessIdx).toBeLessThan(markDoneIdx)
})
test("quality checklist says 'Testing addressed' not 'Tests pass'", async () => {
const content = await readRepoFile("plugins/compound-engineering/skills/ce-work/SKILL.md")
// New language present
expect(content).toContain("Testing addressed")
// Old language fully removed
expect(content).not.toContain("Tests pass (run project's test command)")
expect(content).not.toContain("- All tests pass")
})
test("ce:work-beta mirrors testing deliberation and checklist changes", async () => {
const beta = await readRepoFile("plugins/compound-engineering/skills/ce-work-beta/SKILL.md")
// Testing deliberation in loop
expect(beta).toContain("Assess testing coverage")
// New checklist language
expect(beta).toContain("Testing addressed")
// Old language removed
expect(beta).not.toContain("Tests pass (run project's test command)")
expect(beta).not.toContain("- All tests pass")
})
})
describe("ce:brainstorm review contract", () => {
@@ -64,6 +103,19 @@ describe("ce:brainstorm review contract", () => {
})
})
describe("ce:plan testing contract", () => {
test("flags blank test scenarios on feature-bearing units as incomplete", async () => {
const content = await readRepoFile("plugins/compound-engineering/skills/ce-plan/SKILL.md")
// Phase 5.1 review checklist addresses blank test scenarios
expect(content).toContain("blank or missing test scenarios")
expect(content).toContain("Test expectation: none")
// Template comment mentions the annotation convention
expect(content).toContain("Test expectation: none -- [reason]")
})
})
describe("ce:plan review contract", () => {
test("requires document review after confidence check", async () => {
const content = await readRepoFile("plugins/compound-engineering/skills/ce-plan/SKILL.md")

View File

@@ -245,3 +245,18 @@ describe("ce-review contract", () => {
expect(slfg).toContain("/ce:review mode:autofix")
})
})
describe("testing-reviewer contract", () => {
test("includes behavioral-changes-with-no-test-additions check", async () => {
const content = await readRepoFile("plugins/compound-engineering/agents/review/testing-reviewer.md")
// New check exists in "What you're hunting for" section
expect(content).toContain("Behavioral changes with no test additions")
// Check is distinct from untested branches check
expect(content).toContain("distinct from untested branches")
// Non-behavioral changes are excluded
expect(content).toContain("Non-behavioral changes")
})
})