Skip to content

coverctl

Agent-loop coverage governance for all sorts of languages — Python, TypeScript, Java, Rust, Go, and 10 more. Coverage your AI coding agent calls before commit, not a dashboard you read after CI. MCP-native, local-first.
The agent loopFour nodes arranged on a circle, connected by clockwise arrows. You ask the agent to make a change. The agent edits source files such as email.ts under src/api. The agent calls coverctl check via MCP. The verdict in the centre reads: api 78.2 percent, fail. Tests run across 15 languages. The agent then calls suggest, fixes the gap, and re-runs check until the verdict passes.coverctl checkapi 78.2% — failYOU"add emailvalidation"AGENTeditsemail.tsclaude codeCOVERCTLpolicy gatevia mcpTESTSgo testpytest --cov15 langs
1. You ask the agent for a change.2. The agent edits source files.3. coverctl check runs via MCP and returns a verdict — in the example: api 78.2 % — fail.4. The agent calls suggest, fixes the gap, re-runs check until it passes, then commits.

“Our AI agents ship code fast, but they’re blind to coverage policy while editing. We only see breakage in CI, after context is gone, and the same agent then guesses its way to a fix.”

Works with all sorts of languages — Python, TypeScript/JavaScript, Java, Rust, Go, C#, C/C++, PHP, Ruby, Swift, Dart, Scala, Elixir, Shell — same domains and MCP tools. Mock-heavy or exotic layouts may need an explicit domains: block — see trust calibration.

coverctl is not go tool cover or a Go-only cover CLI — it is policy + MCP over each language’s native runner. See coverctl vs native commands.


What it looks like

After coverctl mcp serve is wired into Claude Code. Rendered for clarity — your client may format tool-calls differently.

You: Add the email-validation feature to the api domain.
Claude: I'll add EmailValidator + tests under src/api/.
[edits: src/api/email.ts, src/api/email.test.ts]
Tool call → coverctl check
Result → passed: false; failing: api (78.2%, required 80%)
uncovered: src/api/email.ts:42-58 (error paths)
Tool call → coverctl suggest api
Result → uncovered files: email.ts (16 lines), retry.ts (4 lines)
Two error branches in EmailValidator.validate are uncovered.
I'll add cases for empty-input and malformed-domain so api meets
the 80% threshold before we commit.

The regression that used to surface in CI 8 minutes later is fixed in the same agent turn.


Today Why it fails for agent-edited code
Red-CI agent loop (status quo) Agent edits → tests fail in CI 8 minutes later → context lost. coverctl: feedback in seconds, in the same turn.
Codecov / Coveralls dashboards Post-merge visibility for humans. coverctl: pre-commit signal for agents.
Native runners (go test -cover, pytest --cov, nyc, …) Substrate only — one language, no domain policy, no MCP. coverctl uses them; it does not replace Go cover or become a Go-cover wrapper. Comparison →

Working from a terminal instead? Terminal quickstart →

Terminal window
# Install
brew install klarlabs-studio/tap/coverctl # or: go install go.klarlabs.de/coverctl@latest
# One-time project setup
coverctl init
# Then either run from terminal:
coverctl check
# ...or wire into Claude Code / Cursor / Cline (default agent mode)
# and let the agent invoke coverctl during editing.

Why this is different

Four moves that make this a category, not a feature

Section titled “Four moves that make this a category, not a feature”

Pre-commit, not post-CI

Coverage feedback in the agent’s edit turn — before the diff lands in CI. The wedge metric is regressions caught pre-commit, not coverage percent.

Agent-callable through MCP

Speaks MCP — the multi-vendor agent-tool standard governed by Anthropic, OpenAI, Google, Microsoft, AWS. Works with every MCP-capable client today; works with whatever ships next.

Polyglot governance, one config

Built for all sorts of languages — one .coverctl.yaml across Python, TypeScript/JavaScript, Java, Rust, Go, C#, C/C++, PHP, Ruby, Swift, Dart, Scala, Elixir, Shell.

Local-first, hardened boundary

No SaaS account, no source upload, no third-party dependency in the agent’s reach. Input + output sanitization defends against prompt-injection through test-runner flags and hostile filenames.