trax/.claude/commands/tdd-cycle.md

891 B

TDD Cycle

Execute complete TDD cycle for current task.

Steps:

  1. Get current task from Task Master
  2. Enter plan mode and create detailed spec
  3. Write comprehensive tests
  4. Implement minimal code to pass tests
  5. Run quality checks
  6. Mark task complete

Process:

1. Get Task

task-master next
task-master show <id>

2. Plan

  • Enter plan mode (I'll do this automatically)
  • Create plan at .claude/tasks/<feature>.md
  • Break into phases

3. Test

  • Write tests that define behavior
  • Cover edge cases
  • Use real test data

4. Implement

  • Minimal code to pass tests
  • Keep files under 300 lines
  • Follow existing patterns

5. Validate

uv run pytest
uv run black src/ tests/
uv run ruff check --fix src/
./scripts/validate_loc.sh

6. Complete

task-master set-status --id=<id> --status=done

Let's start the TDD cycle now.