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
In the GREEN phase, write the absolute minimum code needed to make the failing test pass. Resist the urge to add features, optimizations, or "obvious" improvements not yet required by a test.
Incorrect (over-engineering in GREEN phase):
test('returns user by id', async () => {
const user = await userService.getById('user-123')
expect(user.id).toBe('user-123')
})
// Implementation does more than needed
class UserService {
private cache = new Map<string, User>()
private logger = new Logger()
async getById(id: string): Promise<User> {
// Caching not required by any test yet
if (this.cache.has(id)) {
this.logger.info('Cache hit', { id })
return this.cache.get(id)!
}
const user = await this.repository.findById(id)
this.cache.set(id, user)
this.logger.info('Cache miss', { id })
return user
}
}Correct (minimal implementation):
test('returns user by id', async () => {
const user = await userService.getById('user-123')
expect(user.id).toBe('user-123')
})
// Implementation does exactly what's needed
class UserService {
async getById(id: string): Promise<User> {
return this.repository.findById(id)
}
}
// Add caching only when a test requires itWhen to expand:
Reference: The Cycles of TDD - Clean Coder Blog
Install with Tessl CLI
npx tessl i pantheon-ai/test-driven-developmentevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
references