spec-to-code-compliance

Extract Spec-IR and Code-IR to verify blockchain code matches documentation.

Updated May 2, 2026
One-click install
npx skills add https://github.com/ayehiaa/my-travel-assistant --skill spec-to-code-compliance-ayehiaa
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: spec-to-code-compliance
Source: https://github.com/ayehiaa/my-travel-assistant/tree/main/.agents/skills/spec-to-code-compliance
Command: npx skills add https://github.com/ayehiaa/my-travel-assistant --skill spec-to-code-compliance-ayehiaa

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill removes guesswork from blockchain audits by determining whether an implementation matches its specification exactly, with evidence-based mappings from documentation to code behavior.

Core Features & Use Cases

  • Spec-to-Code Evidence Mapping: Converts documentation into a traceable Spec-IR and compares it against a line-referenced Code-IR.
  • Alignment With Confidence Scoring: Produces an Alignment-IR with full/partial/mismatch classifications and a confidence score for every mapping.
  • Divergence Findings for Audit Reporting: Classifies divergences by severity (CRITICAL/HIGH/MEDIUM/LOW) and generates remediation guidance tied to evidence.

Typical use cases:

  • Auditing smart contracts against a whitepaper or design document
  • Checking whether the code enforces stated invariants, flows, security requirements, and math/economic assumptions
  • Identifying missing implementations, undocumented code paths, and spec contradictions

Quick Start

Use the spec-to-code-compliance skill by providing the specification documents and the target codebase, then ask the auditor to verify spec-to-code alignment with evidence and line-number citations.

Frequently Asked Questions about spec-to-code-compliance

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

FAQPage Schema
How do I verify smart contract compliance against a whitepaper?

Verify smart contract compliance by extracting a Spec-IR from documentation and mapping it line-by-line against a Code-IR from the codebase. This generates an Alignment-IR with divergence classifications and confidence scores for evidence-backed audit reporting.

What is spec-to-code evidence mapping for blockchain audits?

Spec-to-code evidence mapping is the process of converting design documents into a traceable intermediate representation and comparing it against protocol implementations to identify missing paths or contradictions. It produces deterministic, audit-grade alignment reports with line-number citations.

Can I check if protocol code enforces stated security invariants?

Yes, checking security invariants involves building a Code-IR from the codebase to validate that stated spec requirements are implemented exactly. The process classifies any divergence in invariant enforcement by severity and provides remediation guidance tied to evidence.

How do I perform a gap analysis between a design document and protocol implementation?

Perform gap analysis by extracting a Spec-IR from design documents and comparing it against a line-referenced Code-IR to classify divergences. This produces an Alignment-IR with full, partial, or mismatch classifications and confidence scores for every mapped requirement.

Does spec compliance verification work without external dependencies?

Yes, spec compliance verification operates without external dependencies by internally extracting Spec-IR and Code-IR representations directly from the provided text. It applies exhaustive anti-hallucination rules to ensure deterministic, evidence-backed alignment outputs.

When do I need traceable spec-to-code alignment for an audit engagement?

You need traceable spec-to-code alignment when auditing smart contracts to ensure code behavior matches documentation exactly. It is required for producing audit-grade final compliance reports with divergence severity classifications and line-number evidence citations.