Specification-to-code compliance checker for blockchain audits with evidence-based alignment analysis.
Author: Omar Inuwa
Use this skill when you need to:
- Verify that code implements exactly what documentation specifies
- Find gaps between intended behavior and actual implementation
- Audit smart contracts against whitepapers or design documents
- Identify undocumented code behavior or unimplemented spec claims
This skill performs deterministic, evidence-based alignment between specifications and code:
- Documentation Discovery - Finds all spec sources (whitepapers, READMEs, design notes)
- Spec Intent Extraction - Normalizes all intended behavior into structured format
- Code Behavior Analysis - Line-by-line semantic analysis of actual implementation
- Alignment Comparison - Maps spec items to code with match types and confidence scores
- Divergence Classification - Categorizes misalignments by severity (Critical/High/Medium/Low)
Zero speculation. Every claim must be backed by:
- Exact quotes from documentation (section/title)
- Specific code references (file + line numbers)
- Confidence scores (0-1) for all mappings
/plugin install trailofbits/skills/plugins/spec-to-code-compliance
- Documentation Discovery - Identify all spec sources
- Format Normalization - Create clean spec corpus
- Spec Intent IR - Extract all intended behavior
- Code Behavior IR - Line-by-line code analysis
- Alignment IR - Compare spec to code
- Divergence Classification - Categorize misalignments
- Final Report - Generate audit-grade compliance report
full_match- Code exactly implements specpartial_match- Incomplete implementationmismatch- Spec says X, code does Ymissing_in_code- Spec claim not implementedcode_stronger_than_spec- Code adds behaviorcode_weaker_than_spec- Code misses requirements
- If spec is silent: classify as UNDOCUMENTED
- If code adds behavior: classify as UNDOCUMENTED CODE PATH
- If unclear: classify as AMBIGUOUS
- Every claim must quote original text or line numbers
context-building- Deep code understandingissue-writer- Format compliance gaps as findings