mandatory-tdd

Enforce TDD and BDD with mandatory test execution and coverage thresholds before commits.

2|1|Updated May 27, 2025
One-click install
npx skills add https://github.com/PAIPalooza/chicommerce --skill mandatory-tdd-paipalooza
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mandatory-tdd
Source: https://github.com/PAIPalooza/chicommerce/tree/main/.ainative/skills/mandatory-tdd
Command: npx skills add https://github.com/PAIPalooza/chicommerce --skill mandatory-tdd-paipalooza

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill ensures that all code changes are rigorously tested using Test-Driven Development (TDD) and Behavior-Driven Development (BDD) principles, preventing regressions and ensuring code quality.

Core Features & Use Cases

  • Mandatory Test Execution: Guarantees that tests are actually run and pass with sufficient coverage before any commit, PR, or issue closure.
  • BDD Syntax Enforcement: Promotes a clear, human-readable testing style using describe/it blocks.
  • Use Case: When developing a new feature for the e-commerce platform, this Skill will require you to write failing tests first, then implement the code to make them pass, and finally provide proof of execution and coverage before merging.

Quick Start

Run the backend tests using the command python3 -m pytest tests/test_your_feature.py -v --cov=app.your.module --cov-report=term-missing.

Frequently Asked Questions about mandatory-tdd

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

FAQPage Schema
How do I enforce TDD with mandatory test execution before code commits?

To enforce Test-Driven Development before code commits, you must mandate test execution and verify a minimum coverage threshold. This ensures all code changes pass tests and provide coverage reports prior to merging or closing issues.

Can I use BDD syntax for testing both Python and TypeScript workflows?

Yes, you can use BDD syntax for both Python/FastAPI backend and TypeScript/React frontend workflows. The testing process enforces human-readable describe/it blocks to verify behavior across your full stack.

What is the best way to require proof of passing tests for issue closures?

The best way to require proof of passing tests for issue closures is to enforce a workflow that demands passing status and coverage reports. This prevents regressions by ensuring code quality through mandatory test verification.

How do I run pytest with coverage reports for a FastAPI backend feature?

You run pytest with coverage reports for a FastAPI backend feature by executing `python3 -m pytest tests/test_your_feature.py -v --cov=app.your.module --cov-report=term-missing`. This command provides the required proof of test execution and coverage.

Why enforce a minimum coverage threshold during TDD development?

Enforcing a minimum coverage threshold during TDD development prevents regressions and ensures rigorous code quality. By mandating sufficient coverage before commits, you guarantee that new features are thoroughly validated against failing tests written initially.