jmagly/aiwg/tdd-enforce
Claude Code and agent skill by jmagly/aiwg
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
Configure TDD enforcement via pre-commit hooks and CI coverage gates. Use when setting up test-first workflows or adding coverage gates.
Install
npx vskill@latest install jmagly/aiwg/tdd-enforceSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
Skill access pattern (post-kernel-pivot, 2026.5+)Skill names referenced in this document are AIWG skills, not slash commands. Most are not kernel-listed and cannot be invoked as/skill-nameby the platform. Reach them via:```bashaiwg discover "<capability>"aiwg show skill <name> --body```Only kernel-listed skills (aiwg-doctor,aiwg-refresh,aiwg-status,aiwg-help,use,aiwg-steward-routingon Claude Code) are directly invokable as slash commands. See skill-discovery rule.
TDD Enforce Skill
Purpose
Configure Test-Driven Development enforcement through pre-commit hooks, CI coverage gates, and automated test execution. Ensures code cannot be committed or merged without adequate test coverage.
Research Foundation
| Principle | Source | Reference | |
|---|---|---|---|
| TDD Methodology | Kent Beck (2002) | "Test-Driven Development by Example" | |
| 80% Coverage | Google Testing Blog (2010) | Code Coverage Goal | |
| Pre-commit Hooks | Industry Best Practice | Husky, pre-commit | |
| CI Gates | ISTQB CT-TAS | Test Automation Strategy |
When This Skill Applies
- User asks to "set up TDD" or "enforce test-first"
- User wants to "add coverage gates" or "block commits without tests"
- User mentions "pre-commit hooks for tests" or "CI test gates"
- Project needs test quality enforcement
- Brownfield project needs TDD adoption
Trigger Phrases
| Natural Language | Action | |
|---|---|---|
| "Set up TDD enforcement" | Configure pre-commit + CI gates | |
| "Add coverage gates" | Configure CI coverage thresholds | |
| "Block commits without tests" | Set up pre-commit test hooks | |
| "Enforce test-first development" | Full TDD setup | |
| "Run tests on commit" | Configure pre-commit test execution | |
| "Check if tests exist for new code" | Configure test presence validation |
Configuration Options
Coverage Thresholds
Enforcement Levels
| Level | Pre-commit | CI Gate | Description | |
|---|---|---|---|---|
strict | Block | Fail | No exceptions, 100% enforcement | |
standard | Warn + Block | Fail | Standard TDD enforcement | |
gradual | Warn | Warn | For TDD adoption in brownfield | |
audit | Log only | Report | Visibility without blocking |
Implementation Process
1. Detect Project Type
2. Install Pre-commit Hooks
JavaScript (Husky + lint-staged):
.husky/pre-commit:
Python (pre-commit):
.pre-commit-config.yaml:
3. Configure CI Coverage Gates
GitHub Actions:
4. Configure Test Presence Validation
Check that new/modified files have corresponding tests:
Output Format
When reporting TDD enforcement setup:
Gradual Adoption for Brownfield
For existing projects without tests:
Phase 1: Audit Mode (Week 1-2)
Phase 2: New Code Only (Week 3-4)
Phase 3: Full Enforcement (Week 5+)
Integration Points
- Works with
setup-tddcommand - Integrates with
mutation-testskill for quality validation - Feeds into
flow-gate-checkfor phase transitions - Reports to Test Architect agent
Related Skills
mutation-test- Validate test quality beyond coverageflaky-detect- Identify unreliable testsgenerate-factory- Create test data infrastructuretest-sync- Maintain test-code alignment
Script Reference
tdd_setup.py
Configure TDD enforcement for project:
Options:
--level: Enforcement level (strict, standard, gradual, audit)--threshold: Line coverage threshold (default: 80)--branch-threshold: Branch coverage threshold (default: 75)--dry-run: Show what would be done without making changes
References
- @$AIWG_ROOT/agentic/code/addons/testing-quality/README.md — Testing quality addon overview
- @$AIWG_ROOT/agentic/code/frameworks/sdlc-complete/README.md — SDLC framework context for quality gates and phase transitions
- @$AIWG_ROOT/agentic/code/addons/aiwg-utils/rules/vague-discretion.md — Measurable enforcement thresholds
- @$AIWG_ROOT/docs/cli-reference.md — CLI reference for setup-tdd command
Security
- Security scanPassed, 96 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingagentic/code/addons/testing-quality/skills/tdd-enforce/SKILL.md
Popularity
- Repository stars
- 96
- Repository forks
- 12
- Repository npm downloads, 7 days
- 2,424
- 7-day trend score
- 41
Stars and forks are for the whole GitHub repository, not this skill alone. Downloads are for the repository's npm package. Refreshed 19 Mar 2026, 8 months ago.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/jmagly/aiwg/tdd-enforce)