testing-strategy

Enforces test-driven development order and coverage gates for implementation tasks.

6|Updated May 18, 2026
One-click install
npx skills add https://github.com/mokhtarabadi/cognitive-lead-hq --skill testing-strategy-mokhtarabadi
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: testing-strategy
Source: https://github.com/mokhtarabadi/cognitive-lead-hq/tree/main/skill-templates/testing-strategy
Command: npx skills add https://github.com/mokhtarabadi/cognitive-lead-hq --skill testing-strategy-mokhtarabadi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? AI-generated code frequently ships without tests, and error paths often go completely untested. This Skill turns testing from an afterthought into a hard gate: every implementation task must include tests written first or alongside the code, with coverage requirements enforced at QA. ## Core Features & Use Cases - Mandatory Red-Green-Refactor Order: Requires a failing test before any implementation code, then minimal code to pass, then refactoring with tests green. - Coverage Gates: Blocks tasks where changed behavior lines lack test execution, and requires tests for every new error path, exception handler, or error return. - Test-Placement Map: Directs new tests into the project's existing test layout by mirroring source paths, avoiding invented parallel structures. - Use Case: When an agent adds a new validation function to a service, this Skill ensures a failing test is written first, the error branch is covered, and the task is rejected at QA if behavior changed without test changes. ## Quick Start Apply the testing-strategy skill to enforce TDD order and coverage gates on this implementation task before marking it done.

Frequently Asked Questions about testing-strategy

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

FAQPage Schema
How do I enforce test-driven development with an AI coding agent?▼

Require the red-green-refactor cycle as a hard gate: the agent writes a failing test first, then minimal implementation code, then refactors with tests green. Reject any task at QA that changes behavior without a corresponding test change.

What coverage should be required for AI-generated code?▼

Require diff coverage so every changed line of behavior code is executed by at least one test, plus mandatory tests for every new error path, raise statement, or exception handler. Happy-path-only test suites should fail the gate.

Where should new tests be placed in an existing project?▼

Locate the project's existing test layout first, such as tests/, test/, __tests__, or colocated test files, and mirror the source path. For example, src/users/service.py maps to tests/users/test_service.py. Never invent a parallel layout.

Can any code changes skip writing new tests?▼

Only trivial single-file changes with zero behavior delta, such as typo fixes, comment-only edits, or pure renames proven by the suite, qualify for the exemption. Anything touching logic, money, auth, or migrations never qualifies, and the existing suite must still pass.

What happens if a failing test is deleted to make the suite pass?▼

Deleting or weakening a failing test to pass is treated as a QA rejection. Failing tests must be fixed in the code itself, and the project's test command must run green before the task can be claimed as done.