Master Test-Driven Development with deterministic red-green-refactor workflows, test-first feature delivery, bug reproduction through failing tests, behavior-focused assertions, and refactoring safety; use when implementing new functions, changing APIs, fixing regressions, or restructuring code under test.
Does it follow best practices?
Evaluation — 86%
↑ 1.05xAgent success when using this tile
Validation for skill structure
Mutation testing introduces small bugs (mutants) into code and checks if tests catch them. A high mutation score indicates your tests actually verify behavior.
Incorrect (high coverage, low mutation score):
// Implementation
function calculateDiscount(price: number, isPremium: boolean): number {
if (isPremium) {
return price * 0.2
}
return price * 0.1
}
// Test with 100% line coverage but poor assertions
test('calculates discount', () => {
const result = calculateDiscount(100, true)
expect(result).toBeDefined() // Passes even if logic is wrong
})
// Mutation testing creates mutants like:
// - return price * 0.3 (change constant)
// - return price * 0.1 (remove premium branch)
// - return price / 0.2 (change operator)
// All mutants SURVIVE because assertion is too weakCorrect (high mutation score):
describe('calculateDiscount', () => {
it('applies 20% discount for premium customers', () => {
const result = calculateDiscount(100, true)
expect(result).toBe(20) // Specific value kills mutants
})
it('applies 10% discount for regular customers', () => {
const result = calculateDiscount(100, false)
expect(result).toBe(10)
})
it('scales discount with price', () => {
expect(calculateDiscount(200, true)).toBe(40)
expect(calculateDiscount(50, false)).toBe(5)
})
})
// All mutants are KILLED by specific assertionsInterpreting scores:
Tools:
Note: Run mutation testing periodically, not on every commit (it's slow).
Reference: Mutation Testing - Codecov
Install with Tessl CLI
npx tessl i pantheon-ai/test-driven-development@0.2.4evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
references