Get the FREE Ultimate OpenClaw Setup Guide →

atdd-developer

npx machina-cli add skill jikig-ai/soleur/atdd-developer --openclaw
Files (1)
SKILL.md
2.1 KB

ATDD Developer

Guide feature implementation through the Acceptance Test Driven Development cycle. Each phase requires explicit user approval before proceeding.

When to Use

  • Implementing a new feature with acceptance criteria
  • Practicing test-driven development on user stories
  • Teaching or reinforcing TDD discipline

The Cycle

RED Phase: Write Failing Acceptance Tests

  1. Read the user story or feature requirements
  2. Write acceptance tests in Given/When/Then format
  3. Run the tests -- confirm they fail
  4. STOP and ask permission to proceed to GREEN

Do not write any implementation code during this phase.

GREEN Phase: Minimal Implementation

  1. Write the minimum code to make the acceptance tests pass
  2. Run the tests -- confirm they pass
  3. Do not refactor, optimize, or add extra code
  4. STOP and ask permission to proceed to REFACTOR

The goal is passing tests, not beautiful code. Resist the urge to clean up.

REFACTOR Phase: Improve the Code

  1. Apply refactoring techniques while keeping all tests green
  2. Use code-simplicity-reviewer or code-quality-analyst via Task tool for guidance if needed
  3. Run the full test suite after each refactoring step
  4. STOP and ask permission to proceed to COMMIT

If any test fails during refactoring, undo the last change immediately.

COMMIT Phase: Record the Change

  1. Create a commit with a meaningful message referencing the user story
  2. Use conventional commit format (e.g., feat(scope): implement user story)
  3. Ask if there are more stories to implement

Key Principles

  • Never skip phases or combine them
  • Always ask permission before transitioning between phases
  • The RED phase defines the contract; the GREEN phase fulfills it
  • Refactoring is only safe when tests are green
  • Small cycles are better than large ones

Source

git clone https://github.com/jikig-ai/soleur/blob/main/plugins/soleur/skills/atdd-developer/SKILL.mdView on GitHub

Overview

Guides feature work using Acceptance Test Driven Development. It enforces explicit permission gates between RED, GREEN, and REFACTOR phases, ensuring tests drive implementation and quality.

How This Skill Works

Start with the RED phase by writing failing acceptance tests in Given/When/Then and stopping for permission. In GREEN, implement the minimal code needed to satisfy the tests, then stop and proceed to REFACTOR. During REFACTOR, improve the code while keeping all tests green, then move to COMMIT.

When to Use It

  • Implementing a new feature with acceptance criteria
  • Practicing test-driven development on user stories
  • Teaching or reinforcing TDD discipline
  • Facilitating acceptance-test-first approaches within a team
  • Where explicit phase-by-phase discipline is needed to maintain quality

Quick Start

  1. Step 1: Read the user story, write failing acceptance tests in Given/When/Then, and run tests to confirm they fail.
  2. Step 2: GREEN Phase — implement the minimal code to make tests pass and run tests again to confirm.
  3. Step 3: REFACTOR Phase — clean up and improve the code while keeping tests green, then prepare for COMMIT.

Best Practices

  • Never skip phases or combine them
  • Always ask permission before transitioning between phases
  • The RED phase defines the contract; the GREEN phase fulfills it
  • Refactoring is only safe when tests are green
  • Keep cycles small and focused

Example Use Cases

  • Implement a new user registration feature with acceptance tests written in Given/When/Then, followed by a RED/GREEN/REFACTOR cycle.
  • Add a multi-step checkout flow and gate progress with explicit phase permissions.
  • Refactor a validator or business rule after all acceptance tests remain green.
  • Expose a new API endpoint guarded by acceptance tests and drive development through ATDD.
  • Run a short ATDD cycle in a team demo to reinforce disciplined TDD practices on a user story.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers