---
name: "Per-file test coverage report with improvement targets"
---

# Story 474: Per-file test coverage report with improvement targets

## User Story

As a developer, I want a standardised JSON output format for test coverage so that any language's coverage tool can produce it and huskies can read it without language-specific logic.

## Acceptance Criteria

- [ ] Define a standard `.coverage_report.json` format: `{ "overall": float, "threshold": float, "files": [{ "path": string, "coverage": float }] }`
- [ ] Update huskies' own `script/test_coverage` to write `.coverage_report.json` in this format (Rust via `cargo llvm-cov --json`, frontend via vitest)
- [ ] `coverage` bot command reads `.coverage_report.json` and shows overall percentage plus top 5 lowest-covered files as improvement targets
- [ ] Document the `.coverage_report.json` format in `.huskies/README.md` so other projects can produce it from any language
- [ ] Huskies server has zero language-specific coverage logic — all intelligence is in the project's `script/test_coverage`

## Out of Scope

- TBD
