tao-tdd-pipeline

Enforce test-driven development with a pytest gate around tao-loop execution.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/CleanExpo/Pi-Dev-Ops --skill tao-tdd-pipeline
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tao-tdd-pipeline
Source: https://github.com/CleanExpo/Pi-Dev-Ops/tree/main/skills/tao-tdd-pipeline
Command: npx skills add https://github.com/CleanExpo/Pi-Dev-Ops --skill tao-tdd-pipeline

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Prevents an agent from claiming completion based on a goal description alone by enforcing a disciplined red→green→refactor loop with test verification.

Core Features & Use Cases

  • Test-first workflow enforcement: Writes failing tests first, then implements to make them pass, then refactors.
  • Conjunctive completion gate: Marks the goal as done only when the existing judge signals done and the diff shows new/modified test files and pytest runs clean.
  • Discipline-violation reporting: Returns structured reasons (including missing test modifications or non-green pytest results) when the loop result conflicts with the TDD gate.

Quick Start

Run the TDD pipeline to implement your feature by telling it the test scenarios first (as the goal) so it can add failing tests, complete the implementation, and only finish when pytest is green.

Frequently Asked Questions about tao-tdd-pipeline

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

FAQPage Schema
How do I enforce test-driven development with an AI agent using pytest?

To enforce test-driven development with an AI agent, you need a pipeline gate that requires red→green→refactor discipline and verifies pytest runs clean before allowing the goal to be marked complete.

How do I stop an agent from claiming a goal is met before tests are green?

To stop an agent from claiming a goal is met before tests are green, apply a conjunctive completion gate that rejects GOAL_MET unless the git diff shows new or modified pytest test files and pytest exits successfully.

How does a red green refactor loop work with repo automation?

A red green refactor loop with repo automation works by first writing failing tests, then implementing code to make them pass, and finally refactoring while a completion gate verifies pytest output remains green.

Does the pytest completion gate work with my existing test conventions?

Yes, the pytest completion gate works with existing test conventions by requiring the worker to modify test files matching pytest conventions and successfully run python -m pytest -q tests/.

Why does my agent workflow return a discipline violation during TDD?

Your agent workflow returns a discipline violation during TDD when the loop result conflicts with the TDD gate, specifically when test modifications are missing in the git diff or pytest results are not green.