AgentSkillsCN

Coverage Check

覆盖范围检查

SKILL.md

/coverage-check — Test Coverage vs. PRD Validation

Run this skill anytime to check test coverage against PRD requirements.

Usage

code
/coverage-check                  # Check all milestones
/coverage-check <milestone>      # Check specific milestone (e.g., /coverage-check 3)

Workflow

1. Read PRD Test Matrix

Read docs/PRD.md Section 6 (E2E Test Matrix) for the complete mapping of use cases to expected test files.

2. Read Milestone Scope

If a specific milestone is given, read docs/milestones/M<N>.md to determine which UCs should be covered. Otherwise, check all completed milestones.

3. Scan CLI Tests

Search e2e/cli/*.bats files for actual test implementations:

  • Look for @test blocks
  • Map each test to its corresponding UC based on file name and test description
  • Count tests per UC

4. Scan Web Tests

Search e2e/web/*.spec.ts files for actual test implementations:

  • Look for test( or it( blocks
  • Map each test to its corresponding UC
  • Count tests per UC

5. Cross-Reference

For each UC in scope:

  • Check if at least one CLI test exists (where applicable)
  • Check if at least one web test exists (where applicable)
  • Note: UC_0803 (Seed) has no Playwright test per PRD

6. Report

code
## Test Coverage Report

### Summary
- Total UCs in scope: N
- Fully covered (CLI + Web): N
- CLI only: N
- Web only: N
- Uncovered: N

### Detailed Coverage

| UC | Description | CLI Test | Web Test | Status |
|----|-------------|----------|----------|--------|
| UC_0101 | Login | e2e/cli/auth.bats:3 | e2e/web/auth.spec.ts:2 | COVERED |
| UC_0201 | Create org | — | — | MISSING |
...

### Missing Tests
- UC_XXXX: No CLI test (expected in e2e/cli/FILE.bats)
- UC_XXXX: No web test (expected in e2e/web/FILE.spec.ts)

### Recommendations
- Priority missing tests to write
- Files that need the most attention