mcpField
T
tdd-workflow

tdd-workflow

github.com/ruvnetTesting & quality80.1k743 installsUpdated today
Repository

About tdd-workflow

tdd-workflow is a skill for applying the TDD London School, starting with mocked tests and progressing through implementation and refactoring. It guides behavior-focused, incremental test development.

Key features

  1. 01Write mocked failing tests first
  2. 02Verify the expected failure
  3. 03Implement the minimal solution
  4. 04Refactor while tests pass
  5. 05Use descriptive behavior-based names

Use cases

  1. 01Adding a feature with tests first
  2. 02Testing behavior at dependency boundaries
  3. 03Developing incrementally while keeping tests green

MCP support

Uses Ruflo MCP pre-task and post-task hooks to mark the start and completion of a TDD task.

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/ruvnet/ruflo --skill tdd-workflow

After installing, type/tdd-workflowin Claude Code to confirm it loaded.

Details

From the project README

Follow the TDD London School (mock-first) approach:

  1. Write the failing test first -- define expected behavior with mocked dependencies
  2. Run the test -- confirm it fails for the right reason
  3. Implement minimal code -- make the test pass with the simplest solution
  4. Refactor -- clean up while keeping tests green
  5. Repeat -- add the next behavior

Before starting: mcp__plugin_ruflo-core_ruflo__hooks_pre-task({ description: "TDD: FEATURE_NAME" }) After completing: mcp__plugin_ruflo-core_ruflo__hooks_post-task({ taskId: "tdd-FEATURE", success: true, storeResults: true })

Principles:

  • Mock external dependencies at boundaries
  • Test behavior, not implementation
  • One assertion per test when possible
  • Descriptive names: should [behavior] when [condition]

Comments

Markdown supported