PRODUCT.ENGINEER
ManifestoThe RolePlaybookLoops
All loops
TestingManualHardened

Coverage Until Threshold

Add focused tests until coverage target met (default 80%).

Compatible tools:Claude CodeCursor
Start the "Coverage Until Threshold" loop.

- Goal: Test coverage meets the target threshold (default 80%) with all tests passing.
- Max iterations: 12
- Between iterations run: `npm test -- --coverage`
- Exit when: coverage percentage meets or exceeds the threshold AND all tests pass.

Steps:
1. Run the test suite with coverage reporting
2. If threshold is met, stop — exit condition met
3. Identify the file/module with the largest coverage gap (lowest coverage, most uncovered lines)
4. Write focused tests for the uncovered paths — prioritize: error handling, edge cases, branching logic
5. Do not change production code to increase coverage — only add tests
6. Run tests to verify the new tests pass and coverage improved
7. Repeat, targeting the next largest gap

Self-pacing instructions: After each iteration, run the check command, read the output, and only continue if the exit condition is not met. Stop when exit condition passes or max iterations reached. Give a short status update each pass.

How it works

Coverage Until Threshold

>= 80%underRun coverage reportThreshold met?Find biggest gapWrite focused testsNew tests pass?Coverage met
product.engineer

Owning the whole loop, from idea to impact.

Learn

  • Blog
  • Manifesto
  • Authors
  • RSS Feed

Tools

  • Loops
  • Playbook
  • Discovery
  • Cloud Maturity
  • 5 Whys

Opportunities

  • Jobs
  • Hot Jobs
  • Companies
  • The Role
© 2026 product.engineer
||