tdd-strict

Solid

Use when high-assurance reliability is required (Bug fixes, Critical Features, Quality Hardening).

Testing & QA 4 stars 0 forks Updated today Apache-2.0

Install

View on GitHub

Quality Score: 80/100

Stars 20%
23
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Strict TDD Protocol (High Assurance) This skill enforces a rigorous, evidence-based TDD cycle designed to eliminate "lucky passes" and "code hallucinations". It is stricter than the standard `tdd-stub-first`. > [!IMPORTANT] > **ACTIVATION:** This skill replaces the standard TDD cycle. When active, you MUST follow the **Strict Cycle** below. ## 1. The Strict Cycle (Red-Red-Green-Refactor) You must strictly follow this 4-step loop for EVERY test case. ### Step 1: Write Test + `EXPECTED_FAIL_REASON` Write the test case (or stub) and explicitly comment what exact error it *should* raise. * **Why**: Prove that you know *why* it fails. * *Example*: ```python # EXPECTED_FAIL_REASON: AssertionError: Expected 200 OK, got 404 because endpoint is not registered. def test_create_user(client): resp = client.post("/users", json={"name": "Alice"}) assert resp.status_code == 200 ``` ### Step 2: Verify Fail (The "Red" Check) Run the test. It **MUST FAIL**. 1. **Check**: Does the actual error match `EXPECTED_FAIL_REASON`? 2. **Pass (on Fail)**: If it fails as expected -> Proceed. 3. **Fail (on Logic)**: If it crashes with `SyntaxError` or `ImportError` -> Fix the test, do not touch code. 4. **Fail (on Pass)**: If the test passes immediately -> **STOP**. You have a Logic Leak or a bad test. Delete code and investigate. ### Step 3: Minimal Code Implementation (The "Minimalism Law") Implement **ONLY** the code required to make the test pass. * **...

Details

Author
MatrixFounder
Repository
MatrixFounder/Agentic-development
Created
7 months ago
Last Updated
today
Language
Python
License
Apache-2.0

Similar Skills

Semantically similar based on skill content — not just same category