spec-violation-detector

Analyze code behavior against formal specifications and classify mismatches.

1|Updated Jan 22, 2026
One-click install
npx skills add https://github.com/hohai99/antigravity-skills --skill spec-violation-detector
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: spec-violation-detector
Source: https://github.com/hohai99/antigravity-skills/tree/main/.agent/skills/spec-violation-detector
Command: npx skills add https://github.com/hohai99/antigravity-skills --skill spec-violation-detector

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Detects mismatches between implementation and formal specifications, guiding whether to fix code or update the spec.

Core Features & Use Cases

  • Compare Code Behavior vs Spec and classify results (match, ambiguous, violation).
  • Identify unclear or missing spec clauses and propose updates without changing code.
  • Integrate with the autonomous-test-runner and generate actionable reports for stakeholders.

Quick Start

After a failing test, run the spec-violation-detector to analyze the discrepancy, review the violation report, and decide whether to fix code or propose a spec update.

Frequently Asked Questions about spec-violation-detector

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect formal specification violations when my code behavior seems intentional?

To detect specification violations, analyze code behavior against formal specifications to classify discrepancies as matches, ambiguous results, or violations. This process identifies whether intentional behavior requires a specification update rather than a code fix.

What should I do when failing tests reveal unclear or missing specification clauses?

When failing tests reveal unclear or missing specification clauses, generate spec-update proposals without changing the code. This clarifies ambiguous requirements and aligns the formal documentation with the actual implementation behavior.

How does an autonomous test runner workflow integrate with spec violation reporting?

An autonomous test runner workflow integrates with spec violation reporting by triggering discrepancy analysis after a test fails, producing an actionable violation report that stakeholders use to decide between fixing code or proposing spec updates.

Can I compare code behavior against a formal specification without modifying the implementation?

Yes, you can compare code behavior against a formal specification without modifying the implementation. The analysis focuses on classifying misalignments and drafting specification updates, ensuring the codebase remains untouched during the evaluation.

When should I update a specification instead of fixing the code during debugging?

You should update a specification instead of fixing the code during debugging when the analyzed behavior is intentional but mismatches the formal specification. Generating a violation report helps stakeholders decide if a spec-update proposal is the correct resolution.