Test Gap Analysis
You've written some tests, CI is running — but how do you know if you've covered enough? The /twd:test-gaps skill scans your project to find untested and partially-tested routes, then classifies them by risk.
Running the Skill
plaintext
/twd:test-gapsThe skill cross-references your routes against your existing TWD test files and produces a prioritized report:


How It Works
- Route discovery — Detects all routes in your app (from framework router configs, page component patterns, or test URLs)
- Coverage classification — Each route is classified as:
- Tested — Has both
twd.visit()anduserEventinteractions - Partially tested — Has visits but missing interaction or mutation mock coverage
- Untested — No matching test files at all
- Tested — Has both
- Risk assessment — Reads component code to assign risk (HIGH/MEDIUM/LOW) based on mutations, financial handling, permissions, and UI complexity
Filling the Gaps
Once you know what's missing, you can run the /twd skill again to write tests for the high-priority gaps. Here's a video showing the full flow — from identifying gaps to writing and running the missing tests:
What's Next
Now that you've filled your gaps, let's check how good your tests actually are.