luum-home/luum-cognitive-os/coverage-enforcement
- community
Checking that the SKILL.md file is still in the repository.
Run Go test coverage for all services, enforce thresholds from cognitive-os.yaml,
Install
npx vskill@latest install luum-home/luum-cognitive-os/coverage-enforcementSKILL.md
Coverage Enforcement Skill
Purpose
Run Go test coverage across all Go services (per cognitive-os.yaml -> project.architecture.services_root.go), enforce minimum thresholds, and generate a per-package coverage report with actionable guidance on what needs more tests.
Invocation
- No arguments: run coverage on ALL Go services discovered from config
- With service name: run coverage only for that service (e.g.,
/coverage-report wallet)
Steps
1. Read Configuration
Read cognitive-os.yaml from the project root to get:
project.architecture.services_root.go— root path for Go services (default:apps)quality.coverage.minimum— global minimum coverage % (default: 80)quality.coverage.per_package— whether to enforce per-package (default: true)quality.coverage.exclude— glob patterns to exclude from enforcement
If cognitive-os.yaml is missing, use defaults: apps services root, 80% minimum, per-package enforcement, exclude */mocks/*, */test/*, cmd/*.
Store the services root in a variable: SERVICES_ROOT (read from config, fallback to apps).
2. Discover Services
List all directories in ${SERVICES_ROOT}/ that contain a go.mod file. Each is a Go service module.
If ${SERVICES_ROOT} does not exist, check if a go.mod exists at the project root (mono-module project) and adjust discovery accordingly.
3. Run Coverage Per Service
For each service (or the specified one):
If tests fail, capture the output but continue to next service.
4. Parse Coverage Output
For each successful coverage profile:
Parse the output to extract:
- Per-function coverage percentages
- Per-package coverage (aggregate functions by package)
- Overall service coverage (the
total:line)
5. Apply Exclusions
Skip packages matching any pattern in quality.coverage.exclude:
*/mocks/*— mock implementations*/test/*— test helperscmd/*— main entry points (usually trivial)
6. Identify Violations
For each non-excluded package, check if coverage is below the threshold.
A package violates the threshold if:
per_package: trueand the package coverage < minimumper_package: falseand only the overall service coverage < minimum
7. Generate Report
Output a structured report with:
Summary Table
Per-Package Detail (for failing services)
Uncovered Functions
List the top 10 functions with 0% coverage per failing service, formatted as:
Configuration Reference
Show current config:
8. Exit Code
- Exit 0 if all services pass
- Exit 1 if any service fails (for CI integration)
Error Handling
- If a service has no test files, report it as "NO TESTS" (not PASS or FAIL)
- If
go testfails (compilation error), report the error and continue - If
cognitive-os.yamlis missing or malformed, use defaults and warn
Integration
- Local command:
bash tests/coverage-report.shruns the coverage gate locally - GitHub Action:
claude-pr-review.ymlruns the full version and blocks PRs - Agent:
test-coverage-enforcer.mdauto-triggers on Go file changes
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingpackages/verification-audit/skills/coverage-enforcement/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/luum-home/luum-cognitive-os/coverage-enforcement)