Przejdź do treści
Biblioteka skilli
Programowanie · Przegląd i audyt

test-coverage-guardian

/test-coverage-guardian

Analizuje pokrycie testami, wykrywa martwy kod i poprawia jakość testów, gdy trzeba sprawdzić nieprzetestowany kod lub kruchość testów.

Repozytorium
ailang ↗
Licencja
Apache-2.0
Ostatnia zmiana repozytorium
27.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 27.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

Co robi i kiedy

Analizuje pokrycie testami, wykrywa martwy kod i poprawia jakość testów, gdy trzeba sprawdzić nieprzetestowany kod lub kruchość testów.

Oryginalny opis (EN)

Analyze test coverage, identify gaps, detect dead code, and improve test quality. Use when user asks to check coverage, review tests, find untested code, or improve test robustness.

Jak działa

  1. Quick Start
  2. When to Use This Skill
  3. Coverage Commands
  4. Coverage Standards
  5. Analysis Workflow
  6. Test Quality Checklist
  7. CI/CD Monitoring
  8. Example Session
  9. Quality Gates
  10. Tips
Sekcje z nagłówków SKILL.md, w oryginale · 211 linii, 701 słów
Podgląd SKILL.md
---
name: test-coverage-guardian
description: Analyze test coverage, identify gaps, detect dead code, and improve test quality. Use when user asks to check coverage, review tests, find untested code, or improve test robustness.
---

# Test Coverage Guardian

Analyze and improve test coverage for the AILANG codebase.

## Quick Start

**Most common usage:**
```bash
# Quick coverage check
make test-coverage-badge  # Shows: "Coverage: 29.9%"

# Detailed coverage report
make test-coverage        # Generates HTML report

# Coverage for specific package
go test -cover ./internal/parser/...
```

## When to Use This Skill

Invoke when user says:
- "Check test coverage"
- "What's untested?"
- "Review the test suite"
- "Find dead code"
- "Tests keep breaking" (brittleness analysis)

## Coverage Commands

### Quick Check
```bash
make test-coverage-badge
# Output: Coverage: 29.9%
```

### Detailed HTML Report
```bash
make test-coverage
# Opens: coverage.html in browser
```

### Per-Package Coverage
```bash
go test -cover ./internal/parser/...
go test -cover ./internal/types/...
go test -cover ./internal/eval/...
```

### Coverage with Profile
```bash
go test -coverprofile=coverage.out ./...
go tool cover -func=coverage.out | grep -E "^total:|0\.0%"
```

## Coverage Standards

| Module | Target | Priority |
|--------|--------|----------|
| lexer | 80%+ | High |
| parser | 80%+ | High |
| types | 80%+ | High |
| eval | 70%+ | Medium |
| effects | 70%+ | Medium |
| repl | 50%+ | Low |

**Critical paths (100% target):**
- Type inference
- Effect checking
- Pattern matching exhaustiveness

## Analysis Workflow

### Step 1: Get Current Coverage

```bash
# Overall coverage
make test-coverage-badge

# Per-package breakdown
go test -cover ./internal/... 2>&1 | grep -E "coverage:|ok"
```

### Step 2: Identify Gaps

```bash
# Find 0% coverage functions
go test -coverprofile=coverage.out ./...
go tool cover -func=coverage.out | grep "0.0%"

# Visual inspection
go tool cover -html=coverage.out
```

### Step 3: Categorize Gaps

| Category | Action |
|----------|--------|
| Core logic uncovered | Write tests (high priority) |
| Error paths uncovered | Add error case tests |
| Dead code (never called) | Consider removal |
| Experimental code | Accept lower coverage |

### Step 4: Report Findings

```markdown
## Coverage Report

### Summary
- Overall: 29.9%
- Core modules: 45%
- Target: 50%+ overall, 80%+ core

### Critical Gaps
1. internal/types/unify.go - row polymorphism (0%)
2. internal/eval/effects.go - effect handlers (15%)

### Dead Code Candidates
- internal/legacy/old_parser.go (0%, no references)

### Recommendations
1. Add unification tests for row types
2. Add effect handler integration tests
3. Remove legacy parser code
```

## Test Quality Checklist

### Anti-Brittleness
- [ ] Tests public APIs, not private implementation
- [ ] Uses interface-based testing where appropriate
- [ ] Tests error types, not exact messages
- [ ] Mocks external dependencies at boundaries
- [ ] Tests behavior, not call sequences

### Good Patterns
- [ ] Table-driven tests for comprehensive inputs
- [ ] Property-based tests for invariants
- [ ] Error path testing
- [ ] Integration tests at module boundaries

### AILANG-Specific
- [ ] Expression-based tests (everything returns value)
- [ ] Effect tracking tests
- [ ] Pattern matching exhaustiveness tests
- [ ] Deterministic execution tests

## CI/CD Monitoring

```bash
# View recent CI runs
gh run list --limit 10

# Check failed run
gh run view <run-id> --log-failed

# Watch run in progress
gh run watch <run-id>
```

**Common CI failures:**
- Example validation failures
- Module path issues
- Coverage regressions

## Example Session

**User**: "Check test coverage"

**Response**:
```
Running coverage analysis...

## Coverage Report

### Overall: 29.9%

### Per-Module Breakdown
  internal/lexer:    85.2%  (good)
  internal/parser:   42.1%  (needs work)
  internal/types:    38.5%  (needs work)
  internal/eval:     25.3%  (low)
  internal/effects:  18.7%  (low)

### Critical Gaps (0% coverage)
1. internal/types/row.go:UnifyRows() - row polymorphism
2. internal/eval/match.go:matchADT() - ADT pattern matching
3. internal/effects/budget.go - entire file

### Recommendations
1. Priority: Add tests for UnifyRows (critical for type system)
2. Add ADT matching tests
3. Review effects/budget.go - possibly dead code

Would you like me to generate test stubs for any of these?
```

## Quality Gates

- No PR should decrease overall coverage
- New features must include tests
- Bug fixes must include regression tests
- Breaking changes require test updates

## Tips

- **Focus on branch coverage**, not just line coverage
- **Test the sad path** - error conditions matter
- **Golden tests** for complex outputs (parser, codegen)
- **Property tests** for mathematical invariants

Wersje

W bazie nie ma innych skilli o nazwie test-coverage-guardian.

Identyczna treść występuje jeszcze w 1 innych folderach na GitHubie. Tu pokazujemy jedną, najlepiej ocenioną kopię.

Migawka bazy z 13.11.2026 · wersja paczki f11c0ecc6e9a (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100test-coverage-improver
    Analizuje luki w pokryciu testami, znajduje nieprzetestowany kod i generuje brakujące testy.
  • 100analyzing-test-coverage
    Analizuje metryki pokrycia kodu testami i wskazuje nieprzetestowane fragmenty kodu.
  • 100analyzing-test-coverage
    Analizuje metryki pokrycia kodu testami i wskazuje nieprzetestowane fragmenty kodu.
  • 90test-coverage-analyzer
    Analizuje pokrycie testami, znajduje nieprzetestowany kod, generuje raporty i pilnuje progów jakości w różnych frameworkach.
  • 100tdd-guardian-reviewer
    Ocenia jakość kodu, testów i pokrycia, wskazuje testy sprawdzające tylko podłączenie elementów, bez ich poprawiania.
  • 90Coverage Guard
    Sprawdza pokrycie testami, znajduje nieprzetestowany kod i dopisuje brakujące testy, dążąc do pełnego pokrycia.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.