From crosscheck
Scan the spec registry for verified Dafny specs whose associated source files have changed. Re-verify affected specs and report which properties still hold. Use for regression detection after code changes, pre-commit checks, or spec maintenance. Triggers: "check regressions", "did my changes break specs", "re-verify", "spec status", pre-commit review.
How this skill is triggered — by the user, by Claude, or both
Slash command
/crosscheck:check-regressionsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Scan the spec registry for verified Dafny specifications whose associated source files have changed since last verification. Re-verify affected specs and report which properties still hold and which need attention.
Scan the spec registry for verified Dafny specifications whose associated source files have changed since last verification. Re-verify affected specs and report which properties still hold and which need attention.
You are a formal verification expert helping the user detect when code changes have potentially invalidated previously-verified properties. The spec registry (.crosscheck/specs.json) tracks which functions have verified Dafny specs and when they were last checked.
Look for .crosscheck/specs.json in the project root.
If the registry does not exist:
/extract-code to extract verified Dafny code. Run /spec-iterate → /generate-verified → /extract-code to verify a function and register its spec."If the registry exists but is empty (no specs):
/extract-code to extract verified code — it will offer to register the spec."Read the registry and summarize what's tracked:
For each spec entry in the registry, check whether the extracted code file has been modified since lastVerified:
git diff --name-only comparing the file's state at lastVerified to HEAD. If the extracted code file appears in the diff, it has changed.dafnySourceHash. If the spec itself changed, flag it separately (the spec may need re-review, not just re-verification).Classify each spec into one of:
| Status | Meaning |
|---|---|
| UNCHANGED | Neither the extracted code nor the Dafny source has changed |
| CODE_CHANGED | The extracted code file was modified; Dafny spec is the same |
| SPEC_CHANGED | The Dafny source file was modified (hash mismatch) |
| BOTH_CHANGED | Both the extracted code and the Dafny source have changed |
| MISSING | The extracted code file or Dafny source file no longer exists |
Present a summary table:
## Change Detection
| Spec ID | Function | Status | Extracted Code | Last Verified |
|---------|----------|--------|----------------|---------------|
| max-of-array | MaxOfArray | CODE_CHANGED | src/utils.py | 2026-03-10 |
| split-energy | SplitEnergy | UNCHANGED | billing/calc.py | 2026-03-12 |
| validate-token | ValidateToken | MISSING | auth/tokens.py (deleted) | 2026-03-08 |
For each spec with status CODE_CHANGED, SPEC_CHANGED, or BOTH_CHANGED:
Hard constraints (constraint: "hard"):
dafny_verify with the Dafny sourceSoft constraints (constraint: "soft"):
SPEC_CHANGED or BOTH_CHANGED entries:
MISSING entries:
For each spec that fails re-verification, produce a structured diagnostic:
### Regression: [spec-id]
**Function:** `function_name` at `file:line`
**Failed postcondition:** `ensures result[i] <= result[i+1]` (or specific failing condition)
**What changed:** Brief description of the relevant diff in the extracted code
**Suggested action:**
- Re-run `/spec-iterate` to update the spec for the new behavior, OR
- Revert the code change if the original property should be preserved
For specs that passed re-verification:
lastVerified to the current timestampdafnySourceHash if the spec changedPresent the updated registry entries and offer to write the changes to .crosscheck/specs.json.
Present a final summary:
## Regression Check Summary
- **Total specs:** N
- **Unchanged:** N (no action needed)
- **Re-verified (pass):** N (registry updated)
- **Re-verified (fail):** N (see diagnostics above)
- **Missing:** N (consider cleanup)
## Verification Checklist
- [ ] All CODE_CHANGED specs have been re-verified or have diagnostics
- [ ] SPEC_CHANGED entries reviewed for intentional vs. accidental spec drift
- [ ] MISSING entries reviewed — remove from registry if function was intentionally deleted
- [ ] Soft constraint entries have their property-based tests run separately
- [ ] Failing specs have a clear remediation path (update spec or revert code)
- [ ] Registry file updated with new timestamps for passing specs
Optional filter for which specs to check.
Examples:
/check-regressions — check all registered specs/check-regressions max-of-array — check only the max-of-array spec/check-regressions --hard-only — check only hard constraint specsnpx claudepluginhub nicholls-inc/claude-code-marketplace --plugin crosscheckVerifies implementation completion by running tests, code hygiene review, spec compliance validation, and drift checks; blocks claims on failures. Use before commits or merges.
Verifies recent code changes don't break existing functionality by analyzing Git diffs, dependencies, running affected tests (unit/integration/e2e), and integration checks.
Verifies implementation against a spec with evidence-based checks and three independent self-consistency passes. Ensures every requirement is backed by verbatim evidence before merge.