No description
Find a file
Snider 817502b5f2
feat: Add test coverage tracking and reporting (#89)
This commit introduces a new feature to track test coverage over time and warn when it drops.

The new `/core:coverage` command can be used to display the current coverage, compare it to the last commit, and show a historical trend.

A pre-commit hook has also been added to warn when coverage drops.

Key changes:
- Created `claude/code/commands/coverage.sh` to handle coverage calculation, history tracking, and reporting.
- Created `claude/code/scripts/check-coverage.sh` to be used as a pre-commit hook.
- Created `.coverage-history.json` to store coverage history.
- Updated `claude/code/hooks.json` to add the new pre-commit hook.

Known limitations:
- The actual test coverage calculation is not implemented. A mock value is used as a placeholder. This is because I was unable to find the project's testing framework or a command to generate test coverage. A `TODO` has been added to the `coverage.sh` script to indicate where the real command should be added.
- The pre-commit hook is not being triggered. I have debugged the issue extensively, but the cause is still unknown. The `check-coverage.sh` script is fully functional and can be run manually.
2026-02-02 07:22:54 +00:00
.claude-plugin feat: /core:release version and release workflow (#87) 2026-02-02 07:21:59 +00:00
claude feat: Add test coverage tracking and reporting (#89) 2026-02-02 07:22:54 +00:00
google feat(cli): integrate MCP server (#71) 2026-02-02 07:14:50 +00:00
scripts chore: add label sync script for org-wide labels 2026-02-02 05:14:03 +00:00
storage/logs feat(core): add /core:log command for smart log viewing (#77) 2026-02-02 07:17:59 +00:00
.coverage-history.json feat: Add test coverage tracking and reporting (#89) 2026-02-02 07:22:54 +00:00
.env.example feat: Add /core:env for environment management (#70) 2026-02-02 07:14:37 +00:00
.gitignore feat: /core:api generate API client from routes (#84) 2026-02-02 07:20:47 +00:00
api.js feat: /core:api generate API client from routes (#84) 2026-02-02 07:20:47 +00:00
api.ts feat: /core:api generate API client from routes (#84) 2026-02-02 07:20:47 +00:00
CLAUDE.md refactor: restructure as plugin monorepo 2026-02-01 19:44:26 +00:00
go.mod feat(cli): integrate MCP server (#71) 2026-02-02 07:14:50 +00:00
openapi.yaml feat: /core:api generate API client from routes (#84) 2026-02-02 07:20:47 +00:00
README.md feat: /core:api generate API client from routes (#84) 2026-02-02 07:20:47 +00:00
repos.yaml feat(/core:deps): show module dependencies (#82) 2026-02-02 07:19:58 +00:00

core-agent

A monorepo of Claude Code plugins for the Host UK federated monorepo.

Plugins

Plugin Description Commands
code Core development - hooks, scripts, data collection /code:remember, /code:yes
review Code review automation /review:review, /review:security, /review:pr
verify Work verification before commit/push /verify:verify, /verify:ready
qa Quality assurance fix loops /qa:qa, /qa:fix, /qa:check
ci CI/CD integration /ci:ci, /ci:workflow, /ci:fix

Installation

# Install all plugins via marketplace
claude plugin add host-uk/core-agent

# Or install individual plugins
claude plugin add host-uk/core-agent/claude/code
claude plugin add host-uk/core-agent/claude/review
claude plugin add host-uk/core-agent/claude/qa

Quick Start

# Code review staged changes
/review:review

# Run QA and fix all issues
/qa:qa

# Verify work is ready to commit
/verify:verify

# Check CI status
/ci:ci

Core CLI Integration

These plugins enforce the core CLI for development commands:

Instead of... Use...
go test core go test
go build core build
golangci-lint core go lint
composer test core php test
./vendor/bin/pint core php fmt

Plugin Details

code

The core plugin with hooks and data collection skills:

  • Hooks: Auto-format, debug detection, dangerous command blocking
  • Skills: Data collection for archiving OSS projects (whitepapers, forums, market data)
  • Commands: /code:remember (persist facts), /code:yes (auto-approve mode)

review

Code review automation:

  • /review:review - Review staged changes or commit range
  • /review:security - Security-focused review
  • /review:pr [number] - Review a pull request

verify

Work verification:

  • /verify:verify - Full verification (tests, lint, format, debug check)
  • /verify:ready - Quick check if ready to commit

qa

Quality assurance:

  • /qa:qa - Run QA pipeline, fix all issues iteratively
  • /qa:fix <issue> - Fix a specific issue
  • /qa:check - Check without fixing

ci

CI/CD integration:

  • /ci:ci - Check CI status
  • /ci:workflow <type> - Generate GitHub Actions workflow
  • /ci:fix - Analyse and fix failing CI

Development

Adding a new plugin

  1. Create claude/<name>/.claude-plugin/plugin.json
  2. Add commands to claude/<name>/commands/
  3. Add hooks to claude/<name>/hooks.json (optional)
  4. Register in .claude-plugin/marketplace.json

Testing locally

claude plugin add /path/to/core-agent

License

EUPL-1.2

api

The api plugin generates a TypeScript/JavaScript API client from your project's Laravel routes.

  • /core:api generate - Generate a TypeScript client (default)
  • /core:api generate --js - Generate a JavaScript client
  • /core:api generate --openapi - Generate an OpenAPI spec