Verify test execution by replaying trajectory and checking script coverage. Ensures tests actually happened as recorded and scripts cover all test cases. WHEN TO USE: - After tests claim to pass (verify they actually ran) - Before marking ticket complete (audit trail) - When reviewing someone else's work - User says "validate", "verify tests", "check coverage" - Periodic audit of test integrity CHECKS: 1. TRAJECTORY - Steps match recorded actions 2. EVIDENCE - Screenshots, logs, outputs exist 3. COVERAGE - Scripts test all cases from 3-spec.md 4. COMPLETENESS - All required tests have trajectory
Verify test execution by replaying trajectories and checking script coverage against specifications. Used after tests pass, before marking tickets complete, or when auditing test integrity.
/plugin marketplace add jayprimer/pmc-marketplace/plugin install jayprimer-pmc-plugins-pmc@jayprimer/pmc-marketplaceThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Verify tests happened as claimed and scripts cover all test cases.
ALWAYS run /pmc:kb first to understand test format.
| Mode | Scope | Use When |
|---|---|---|
| Quick | Check trajectory exists, evidence files present | Before commit |
| Full | Replay trajectory, verify each step | Before ticket completion |
| Coverage | Audit scripts against 3-spec.md | After writing tests |
Read: .pmc/docs/tests/tickets/T0000N/tests.json
Read: .pmc/docs/tickets/T0000N/3-spec.md
Glob: .pmc/docs/tests/tickets/T0000N/screenshots/*.png
Glob: .pmc/docs/tests/tickets/T0000N/*.py # Test scripts
Every test with status: passed MUST have trajectory.
Format: See kb/references/test-formats.md (trajectory section)
Red Flags:
For each test, check:
| Check | Valid If |
|---|---|
| RED phase | Has [RED] entry with timestamp and failure reason |
| GREEN phase | Has [GREEN] entry and all do: and verify: entries |
| Steps match spec | Trajectory steps match tests.json steps |
| All verify recorded | Each verify in steps has trajectory entry |
## Trajectory Validation
| Test | Status | Issues |
|------|--------|--------|
| T00001-01 | VALID | - |
| T00001-02 | INVALID | Missing RED phase, 2 verify entries missing |
| T00001-03 | INVALID | Empty trajectory |
For tests with screenshot: actions:
.pmc/docs/tests/tickets/T0000N/screenshots/{name}.png{test_id}_{step}_{description}.pngGlob: .pmc/docs/tests/tickets/T0000N/screenshots/*.png
Expected vs Found:
## Screenshot Evidence
| Expected | Found | Status |
|----------|-------|--------|
| T00001-01_login-page.png | T00001-01_login-page.png | OK |
| T00001-01_dashboard.png | (missing) | MISSING |
For tests with script: or cli: actions:
For tests with log: verification:
Read 3-spec.md and extract test cases:
## Test Cases (from 3-spec.md)
### Unit Tests
| Test | Input | Expected |
|------|-------|----------|
| test_login_valid | valid creds | success |
| test_login_invalid | bad password | error |
| test_login_empty | empty fields | validation error |
### Edge Cases
| Case | Input | Expected |
|------|-------|----------|
| empty email | "" | validation error |
| SQL injection | "'; DROP" | sanitized |
Map each 3-spec.md case to tests.json:
## Coverage Analysis
| 3-spec.md Case | tests.json Test | Status |
|----------------|-----------------|--------|
| test_login_valid | T00001-01 | COVERED |
| test_login_invalid | T00001-02 | COVERED |
| test_login_empty | (none) | MISSING |
| edge: empty email | (none) | MISSING |
| edge: SQL injection | (none) | MISSING |
For script-based tests, read the test file:
# tests/test_auth.py
def test_login_valid(): ...
def test_login_invalid(): ...
# Missing: test_login_empty, edge cases
Compare to 3-spec.md:
## Script Coverage
File: tests/test_auth.py
| 3-spec.md Case | Function | Status |
|----------------|----------|--------|
| test_login_valid | test_login_valid() | COVERED |
| test_login_invalid | test_login_invalid() | COVERED |
| test_login_empty | (none) | MISSING |
| edge: empty email | (none) | MISSING |
| edge: SQL injection | (none) | MISSING |
Coverage: 2/5 (40%)
For critical validations, actually replay the trajectory:
do: actionverify: check## Replay Results
| Step | Recorded | Actual | Match |
|------|----------|--------|-------|
| browser:navigate:/login | OK | OK | YES |
| element:#login-form exists | PASS | PASS | YES |
| browser:fill:#email | OK | OK | YES |
| url contains /dashboard | PASS | FAIL | NO |
Discrepancy at step 4: URL is /login, not /dashboard
Possible causes:
- Implementation changed since test
- Test was recorded incorrectly
- Environment difference
## Quick Validation: T00001
| Check | Status |
|-------|--------|
| tests.json exists | OK |
| All required tests have trajectory | OK |
| Screenshots present | 1 missing |
| TDD markers present | OK |
Result: WARNINGS (1 missing screenshot)
## Full Validation: T00001
### Trajectory
| Test | RED | GREEN | Complete |
|------|-----|-------|----------|
| T00001-01 | OK | OK | YES |
| T00001-02 | OK | OK | YES |
### Evidence
| Type | Expected | Found | Status |
|------|----------|-------|--------|
| Screenshots | 4 | 3 | 1 MISSING |
| Logs | 2 | 2 | OK |
### Coverage
| Source | Cases | Covered | % |
|--------|-------|---------|---|
| 3-spec.md | 8 | 6 | 75% |
| Edge cases | 5 | 2 | 40% |
### Issues
1. Missing screenshot: T00001-01_dashboard.png
2. Missing test coverage for: test_login_empty, edge cases
Result: INCOMPLETE (75% coverage, missing evidence)
do: and verify: entries present$ /pmc:validate T00001
## Validating T00001: User Authentication
### Trajectory Check
| Test | Trajectory | TDD Markers | Status |
|------|------------|-------------|--------|
| T00001-01 | 12 entries | RED, GREEN | VALID |
| T00001-02 | 8 entries | RED, GREEN | VALID |
| T00001-03 | (empty) | - | INVALID |
### Evidence Check
| Expected | Status |
|----------|--------|
| login-page.png | FOUND |
| dashboard.png | FOUND |
| error-state.png | MISSING |
### Coverage Check
| 3-spec.md Cases | Covered |
|-----------------|---------|
| Unit tests (5) | 5/5 |
| Integration (3) | 2/3 |
| Edge cases (4) | 2/4 |
Total: 9/12 (75%)
### Issues Found
1. T00001-03 has no trajectory but status=passed
2. Missing screenshot: error-state.png
3. Missing coverage:
- integration: concurrent_login
- edge: unicode_email
- edge: max_length_password
### Recommendation
- Re-run T00001-03 and record trajectory
- Add missing screenshot
- Add tests for uncovered cases
Result: NEEDS ATTENTION
Some issues can be auto-fixed:
| Issue | Fix |
|---|---|
| status=passed, empty trajectory | Reset status to "pending" |
| Missing screenshots | Run test again with screenshot capture |
| Low coverage | Generate stub tests for missing cases |
/pmc:validate T00001 --fix
Auto-fixing:
- Reset T00001-03 status to pending
- Generated test stubs for 3 uncovered cases
Remaining manual fixes needed:
- Run T00001-03 with proper trajectory recording
- Add error-state.png screenshot
This skill should be used when the user asks to "create a hookify rule", "write a hook rule", "configure hookify", "add a hookify rule", or needs guidance on hookify rule syntax and patterns.
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.