Spec Compliance Audit

Validate codebase implementations against written specifications using AST parsing and grep.

Updated Oct 10, 2025
One-click install
npx skills add https://github.com/FFOO6866/lead2cash --skill spec-compliance-audit-ffoo6866
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Spec Compliance Audit
Source: https://github.com/FFOO6866/lead2cash/tree/main/.claude/skills/spec-compliance
Command: npx skills add https://github.com/FFOO6866/lead2cash --skill spec-compliance-audit-ffoo6866

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It prevents “green checks” that only confirm file paths exist by instead proving that the implementation actually matches the written spec.

Core Features & Use Cases

  • AST-driven signature verification: Confirms class/method constructor parameters and yields behavior match the plan, not just that symbols are present.
  • Deterministic compliance assertions: Turns each spec promise into an explicit acceptance-assertion table with re-runnable commands.
  • Security and correctness guardrails: Checks that promised security mitigations have corresponding tests and that “fake implementations” don’t pass as compliant.
  • Anti–self-report trust policy: Treats previous-run outputs as inputs to re-verify, never evidence of compliance.

Quick Start

Run the spec compliance audit when you receive the plan (for example, via /redteam Step 1) and produce an assertion table with verified grep/AST outputs.

Frequently Asked Questions about Spec Compliance Audit

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

FAQPage Schema
How do I verify that my Python code actually implements a written specification?

Spec compliance validation derives literal acceptance assertions from your plan and verifies them using ast.parse, targeted grep, and pytest collection on Python modules. This proves the implementation matches the written specification rather than merely confirming expected file locations exist.

What is AST-driven signature verification for code compliance?

AST-driven signature verification uses ast.parse to confirm that class and method constructor parameters match the plan. It proves that symbols exhibit the correct behavior and structure, ensuring the implementation is compliant rather than just present in the codebase.

Why does my code review pass when the implementation does not match the spec?

Code reviews often pass falsely because they only check if expected file paths exist. A true spec compliance audit applies an anti-self-report trust policy, treating previous outputs as inputs to re-verify with deterministic grep and AST checks, preventing fake implementations from passing.

How do I turn a project specification into deterministic compliance assertions?

You convert each specification promise into an explicit acceptance-assertion table containing re-runnable commands. This deterministic mapping allows you to systematically apply grep, wc -l, and ast.parse checks to validate that every spec requirement is implemented in the code.

Can I use grep and AST parsing to check for promised security mitigations in Python?

Yes, you can use targeted grep and ast.parse to verify that promised security mitigations have corresponding tests and correct code structures. This ensures security guardrails are actually implemented and that fake implementations do not pass the compliance audit.

What are the limitations of using grep audits for spec compliance?

Grep audits are limited to finding text matches and cannot verify structural correctness alone. For comprehensive spec compliance, grep must be combined with ast.parse to validate constructor parameters and pytest collection to ensure the behavior matches the specification.