@getcorespec/specguard
v0.0.2
Published
PR gating for spec coverage — checks that code changes have associated specs
Maintainers
Readme
Quickstart
Install specguard:
npm install -g @getcorespec/specguardCheck spec coverage on a PR:
specguard check
Setup
specguard uses the Vercel AI SDK — any supported provider works. Set the API key for your chosen provider:
# Anthropic (default)
export ANTHROPIC_API_KEY=sk-ant-...
# OpenAI
export OPENAI_API_KEY=sk-...Optionally create a .specguard.yml:
# LLM model — any Vercel AI SDK provider/model works
model: anthropic/claude-sonnet-4-20250514
# minimum coverage score (0-1) for a file to pass
threshold: 0.7GitHub Action
Add specguard to your CI pipeline. Set your LLM provider's API key as a repository secret:
# .github/workflows/specguard.yml
name: specguard
on: [pull_request]
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: getcorespec/corespec/packages/specguard@main
with:
anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }}See it in action: demo PR with specguard failing unspec'd code

