test-driven-development

Enforces RED-GREEN-REFACTOR test-driven development with verified failing tests before implementation code.

Updated Aug 22, 2026
One-click install
npx skills add https://github.com/xegheplimo-web/hermes-ops --skill test-driven-development-xegheplimo-web
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/xegheplimo-web/hermes-ops/tree/main/skills/software-development/execution-discipline/test-driven-development
Command: npx skills add https://github.com/xegheplimo-web/hermes-ops --skill test-driven-development-xegheplimo-web

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? It prevents untested or incorrectly tested code by requiring a failing test to be written and observed before any production code, ensuring tests actually verify the intended behavior. ## Core Features & Use Cases - RED-GREEN-REFACTOR cycle enforcement: Write one minimal failing test, verify it fails for the right reason, implement minimal code to pass, then refactor while keeping tests green. - Test quality rules: The companion reference defines how to write honest tests — name the break each test catches, derive expectations independently, and avoid mock assertions and change detectors. - Hermes pipeline integration: TDD requirements flow into Devin task plans, dispatch prompts, and systematic-debugging regression tests. - Use Case: When fixing a bug, write a regression test that reproduces the bug first, watch it fail, then implement the minimal fix and confirm the suite passes. ## Quick Start Apply test-driven development to implement this feature by writing a failing test first, then the minimal code to make it pass.

Frequently Asked Questions about test-driven-development

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I practice test-driven development with the RED-GREEN-REFACTOR cycle?

Write one minimal failing test describing a single behavior, run it and confirm it fails for the expected reason, then write the simplest code to make it pass. After green, refactor to remove duplication while keeping all tests passing, then repeat for the next behavior.

How do I write a regression test for a bug fix?

Write a test that reproduces the bug before touching the fix, and watch it fail to confirm it captures the defect. Then implement the minimal fix and verify the new test passes along with the rest of the suite.

When is strict TDD not required?

Pragmatic exceptions include generated code (use generator validation), configuration (use schema checks), legacy code without a test harness (add characterization tests when practical), and UI or visual changes (use functional plus screenshot verification).

Why should I avoid asserting on mocks in unit tests?

A mock assertion only proves the mock exists, not that the component behaves correctly. Assert the real component's behavior, mock only slow or external dependencies, and mirror the complete real data structure in any mock responses.

What makes a test a change detector instead of a useful test?

A change detector fails only on intentional decisions like constant values or exact message wording while sleeping through real bugs. Instead, test the observable behavior that depends on the decision, such as verifying a failing call is retried five times.