Implement
Implement a task with Test-Driven Development.
terminal Command: /ak_cm_implement
Usage
/ak_cm_implement task-001
/ak_cm_implement "add login form"
Workflow
- LOAD - Get task details from
.beads/or plan - TEST - Write failing tests first (RED)
- IMPLEMENT - Write minimal code to pass (GREEN)
- REFACTOR - Clean up while keeping tests green
- VERIFY - Run full test suite
Hard Gates
Before marking complete:
- All new tests pass
- No regressions
- Type check passes
- Linting passes
Example
# Plan first
/ak_cm_plan user login
# Implement with TDD
/ak_cm_implement
# AIKit follows RED-GREEN-REFACTOR:
# RED: Write test
test('should login with valid credentials', () => {
expect(login('user', 'pass')).toBe(true);
});
# GREEN: Write minimum code
function login(user: string, pass: string): boolean {
return user === 'user' && pass === 'pass';
}
# REFACTOR: Clean up
function login(credentials: LoginInput): AuthResult {
return validateAndAuthenticate(credentials);
}
Related Commands
- /ak_cm_plan - Plan first
- /ak_cm_finish - Complete with quality gates
- Skills Guide - Learn TDD skill (use
/ak_sk_test-driven-development)