spec-to-code-compliance

Compare blockchain protocol specifications against smart contract implementations.

Updated Jul 10, 2025
One-click install
npx skills add https://github.com/Superlend/superloop-core-contracts --skill spec-to-code-compliance
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: spec-to-code-compliance
Source: https://github.com/Superlend/superloop-core-contracts/tree/main/.cursor/skills/spec-to-code-compliance/skills/spec-to-code-compliance
Command: npx skills add https://github.com/Superlend/superloop-core-contracts --skill spec-to-code-compliance

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill verifies that code implements exactly what the documentation specifies for blockchain audits, ensuring there are no gaps between design docs and implementation.

Core Features & Use Cases

  • Spec-to-code alignment: Compare specifications against smart contracts and protocols to identify gaps.
  • Compliance auditing: Trace invariants, math, security guarantees, and workflow flows across codebases to ensure adherence to docs.
  • Proof of accuracy: Provide evidence-backed mappings with exact quotes and line references for every claim.

Quick Start

Run the spec-to-code compliance workflow on a repository containing both the spec and code, then review the generated Spec-IR and Alignment-IR for review.

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 audit smart contracts against their specification documentation?

To audit smart contracts against specification documentation, compare the documented invariants, math, and security guarantees directly against the protocol implementation to identify compliance gaps. This process requires accessing both the codebase and the design docs to trace workflow flows accurately across contracts.

What is spec-to-code compliance verification for blockchain protocols?

Spec-to-code compliance verification for blockchain protocols is the process of ensuring that a codebase strictly implements the documented specification. It traces invariants, math, and security guarantees across contracts to confirm no gaps exist between design docs and implementation.

How do I trace security invariants across a blockchain codebase during a review?

Tracing security invariants across a blockchain codebase during a review involves comparing the documented security guarantees against the actual contract logic. This compliance audit maps specification requirements to the implementation to verify adherence and identify deviations.

Can I get exact line references when comparing protocol specs to source code?

Yes, comparing protocol specs to source code can generate evidence-backed mappings with exact quotes and line references for every claim. This structured intermediate representation provides precise citations and confidence scores for each identified alignment or gap.

What do I need to provide to run a spec-to-code alignment check?

To run a spec-to-code alignment check, you need to provide access to a repository containing both the documentation specification and the smart contract code. The workflow uses both inputs to generate structured alignment reports for review.