TDD Guidelines

Enforce Red-Green-Refactor cycles with evidence-logged FAIL→PASS test validation.

48|18|Updated Feb 4, 2026
One-click install
npx skills add https://github.com/pageel/para-workspace --skill tdd-guidelines-pageel
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: TDD Guidelines
Source: https://github.com/pageel/para-workspace/tree/main/templates/common/agents/skills/tdd
Command: npx skills add https://github.com/pageel/para-workspace --skill tdd-guidelines-pageel

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This skill prevents hallucinated or weak implementations by enforcing strict test-driven development so production code is only added when a failing test proves the gap.

Core Features & Use Cases

  • Red-Green-Refactor enforcement: Requires a failing test first (Red), then minimal code to make it pass (Green), then safe cleanup only when tests are green (Refactor).
  • TDD evidence and compliance gates: Uses the evidence logger wrapper to produce an auditable FAIL→PASS history before any commit.
  • Workspace isolation for safety: Ensures tests and generated scripts don’t pollute the repository by sandboxing outputs under artifacts and keeping temporary scripts out of the OSS template repo.

Quick Start

Ask your agent to implement the feature using the Red-Green-Refactor cycle and run tests through the TDD evidence logger script at the workspace root.

Frequently Asked Questions about TDD Guidelines

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

FAQPage Schema
How do I enforce strict test-driven development workflows for AI coding agents?

To enforce strict test-driven development, this skill requires agents to only write production code backed by a failing test that becomes passing evidence. It uses Red-Green-Refactor enforcement and compliance gates to prevent hallucinated or weak implementations.

What is the Red-Green-Refactor cycle and how does it prevent code bloat?

The Red-Green-Refactor cycle requires writing a failing test first (Red), adding minimal code to pass it (Green), then cleaning up safely when tests are green (Refactor). This prevents code bloat by ensuring correctness and non-bloated implementations through repeatable workflows.

How do I log auditable FAIL to PASS test evidence before committing code?

You log auditable FAIL to PASS test evidence by running tests through the TDD evidence logger script at the workspace root. This produces an evidence-logged validation history required before any disciplined commit checkpoints.

Can I run tests in watch mode while using strict TDD agent workflows?

No, you cannot run tests in watch mode. The strict TDD agent workflow requires one-shot test execution to ensure reliable FAIL to PASS validation and generate accurate test evidence for compliance gates.

How do I isolate generated test scripts and artifacts in my repository?

You isolate generated scripts and test outputs by sandboxing them under artifacts. This workspace isolation keeps temporary scripts out of the OSS template repo, ensuring tests don't pollute your codebase.

When do I need test-driven development evidence gates in software engineering?

You need test-driven development evidence gates during coding, refactoring, and test-writing scenarios where correctness and repeatable workflows are required. They prevent weak implementations by producing an auditable FAIL to PASS history before commits.