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
The REFACTOR phase is not optional. Once tests pass, immediately clean up both production and test code. Skipping refactoring accumulates technical debt that compounds over time.
Incorrect (skipping refactor phase):
// Test passes, move on to next feature
test('calculates order total with tax', () => {
const order = { items: [{ price: 100 }, { price: 50 }], taxRate: 0.1 }
expect(calculateTotal(order)).toBe(165)
})
// Quick and dirty implementation, "will clean up later"
function calculateTotal(order: Order): number {
let t = 0
for (let i = 0; i < order.items.length; i++) {
t = t + order.items[i].price
}
t = t + t * order.taxRate
return t
}
// Technical debt: unclear variable names, imperative styleCorrect (refactor while context is fresh):
test('calculates order total with tax', () => {
const order = { items: [{ price: 100 }, { price: 50 }], taxRate: 0.1 }
expect(calculateTotal(order)).toBe(165)
})
// After GREEN, immediately refactor
function calculateTotal(order: Order): number {
const subtotal = order.items.reduce((sum, item) => sum + item.price, 0)
const tax = subtotal * order.taxRate
return subtotal + tax
}
// Clean: descriptive names, functional style, clear intentThe refactor checklist:
Note: Run tests after each refactoring step to ensure behavior is preserved.
Reference: Red-Green-Refactor - James Shore
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