Test Driven Development — TDD: enforce RED-GREEN-REFACTOR, tests before code
Test Driven Development — TDD: enforce RED-GREEN-REFACTOR, tests before code
Start with meaning, then move to detail.
This lesson explains Test Driven Development — TDD: enforce RED-GREEN-REFACTOR, tests before code as part of extending Hermes and connecting external tools. You will learn what it does, when it matters, and the smallest safe test that proves it works.
If you are new, do not memorize names. Focus on three questions: what problem does this solve, what access does it need, and how can you verify the result?
For practice, inspect the first example, identify its effects, run it on test data, and compare the result with the source claim.
For advanced readers, inspect Skill metadata, Reference: full SKILL.md, Overview, then verify failure modes and version compatibility.
Complete installation and one successful task before adding new capabilities.
A clear outcome before you read.
- Understand Test Driven Development — TDD: enforce RED-GREEN-REFACTOR, tests before code without assumed prior knowledge.
- Separate the source description from what still needs testing in your environment.
- Read the first command and identify its inputs and outputs before copying it.
Short definitions before the details.
- Skill
- An instruction bundle that teaches Hermes a repeatable workflow without necessarily adding an external service.
TDD: enforce RED-GREEN-REFACTOR, tests before code
What does the source say, and in what order?
- 01Skill metadata
Start here to understand the core idea or structure.
- 02Reference: full SKILL.md
Read this after the foundation, then connect it to the previous step.
- 03Overview
Read this after the foundation, then connect it to the previous step.
- 04When to Use
Read this after the foundation, then connect it to the previous step.
- 05The Iron Law
Read this after the foundation, then connect it to the previous step.
- 06Red-Green-Refactor Cycle
Read this after the foundation, then connect it to the previous step.
- 07RED — Write Failing Test
Read this after the foundation, then connect it to the previous step.
- 08Verify RED — Watch It Fail
Read this after the foundation, then connect it to the previous step.
- 09GREEN — Minimal Code
Read this after the foundation, then connect it to the previous step.
- 10Verify GREEN — Watch It Pass
Finish here to verify the result and special cases.
Copy only after you understand the effect.
NO PRODUCTION CODE WITHOUT A FAILING TEST FIRSTClear name, tests real behavior, one thing.
**Bad test:**Vague name, tests mock not real code.
**Requirements:**
- One behavior per test
- Clear descriptive name ("and" in name? Split it)
- Real code, not mocks (unless truly unavoidable)
- Name describes behavior, not implementation
### Verify RED — Watch It Fail
**MANDATORY. Never skip.**Read the first command and identify its inputs and outputs before copying it.
Match every command to your installed Hermes version, review the files and accounts it can reach, and use non-sensitive data for the first test. If this explanation differs from the source, the official source wins.