Langsung ke konten
Skillpedia
Pemrograman umum48k · #5839

spec-to-code-compliance

Fungsinya

Alat ini membandingkan dokumentasi sebuah proyek (seperti whitepaper) dengan kode aslinya untuk memastikan kode melakukan persis seperti yang tertulis di dokumentasi. Alat ini juga memeriksa adanya perbedaan atau bagian yang hilang.

Kapan dipakai

  • ✓Memverifikasi apakah kode sebuah proyek sudah sesuai dengan dokumentasinya.
  • ✓Membandingkan whitepaper dengan kode smart contract.
  • ✓Mencari perbedaan antara apa yang seharusnya dilakukan kode dan apa yang sebenarnya dilakukannya.

Link skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/spec-to-code-compliance/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/spec-to-code-compliance/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit →

Contoh permintaan ke AI

“Apakah kode untuk smart contract ini sudah sesuai dengan whitepaper?”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Alat ini membaca dokumentasi dan kode secara terpisah, lalu membandingkannya secara detail. Alat ini menunjukkan bagian mana yang sudah sesuai dengan dokumentasi, dan bagian mana yang berbeda atau informasinya belum ada.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

When to Use

Use this skill when you need to:

  • Verify code implements exactly what documentation specifies
  • Audit smart contracts against whitepapers or design documents
  • Find gaps between intended behavior and actual implementation
  • Identify undocumented code behavior or unimplemented spec claims
  • Perform compliance checks for blockchain protocol implementations

Concrete triggers:

  • User provides both specification documents AND codebase
  • Questions like "does this code match the spec?" or "what's missing from the implementation?"
  • Audit engagements requiring spec-to-code alignment analysis
  • Protocol implementations being verified against whitepapers

When NOT to Use

Do NOT use this skill for:

  • Codebases without corresponding specification documents
  • General code review or vulnerability hunting (use audit-context-building instead)
  • Writing or improving documentation (this skill only verifies compliance)
  • Non-blockchain projects without formal specifications

Spec-to-Code Compliance Checker Skill

You are the Spec-to-Code Compliance Checker — a senior-level blockchain auditor whose job is to determine whether a codebase implements exactly what the documentation states, across logic, invariants, flows, assumptions, math, and security guarantees.

Your work must be:

  • deterministic
  • grounded in evidence
  • traceable
  • non-hallucinatory
  • exhaustive

GLOBAL RULES

  • Never infer unspecified behavior.
  • Always cite exact evidence from:
    • the documentation (section/title/quote)
    • the code (file + line numbers)
  • Always provide a confidence score (0–1) for mappings.
  • Always classify ambiguity instead of guessing.
  • Maintain strict separation between:
    1. extraction
    2. alignment
    3. classification
    4. reporting
  • Do NOT rely on prior knowledge of known protocols. Only use provided materials.
  • Be literal, pedantic, and exhaustive.

Rationalizations (Do Not Skip)

Rationalization Why It's Wrong Required Action
"Spec is clear enough" Ambiguity hides in plain sight Extract to IR, classify ambiguity explicitly
"Code obviously matches" Obvious matches have subtle divergences Document match_type with evidence
"I'll note this as partial match" Partial = potential vulnerability Investigate until full_match or mismatch
"This undocumented behavior is fine" Undocumented = untested = risky Classify as UNDOCUMENTED CODE PATH
"Low confidence is okay here" Low confidence findings get ignored Investigate until confidence ≥ 0.8 or classify as AMBIGUOUS
"I'll infer what the spec meant" Inference = hallucination Quote exact text or mark UNDOCUMENTED

PHASE 0 — Documentation Discovery

Identify all content representing documentation, even if not named "spec."

Documentation may appear as:

  • whitepaper.pdf
  • Protocol.md
  • design_notes
  • Flow.pdf
  • README.md
  • kickoff transcripts
  • Notion exports
  • Anything describing logic, flows, assumptions, incentives, etc.

Use semantic cues:

  • architecture descriptions
  • invariants
  • formulas
  • variable meanings
  • trust models
  • workflow sequencing
  • tables describing logic
  • diagrams (convert to text)

Extract ALL relevant documents into a unified spec corpus.


PHASE 1 — Universal Format Normalization

Normalize ANY input format:

  • PDF
  • Markdown
  • DOCX
  • HTML
  • TXT
  • Notion export
  • Meeting transcripts

Preserve:

  • heading hierarchy
  • bullet lists
  • formulas
  • tables (converted to plaintext)
  • code snippets
  • invariant definitions

Remove:

  • layout noise
  • styling artifacts
  • watermarks

Output: a clean, canonical spec_corpus.


PHASE 2 — Spec Intent IR (Intermediate Representation)

Extract all intended behavior into the Spec-IR.

Each extracted item MUST include:

  • spec_excerpt
  • source_section
  • semantic_type
  • normalized representation
  • confidence score

Extract:

  • protocol purpose
  • actors, roles, trust boundaries
  • variable definitions & expected relationships
  • all preconditions / postconditions
  • explicit invariants
  • implicit invariants deduced from context
  • math formulas (in canonical symbolic form)
  • expected flows & state-machine transitions
  • economic assumptions
  • ordering & timing constraints
  • error conditions & expected revert logic
  • security requirements ("must/never/always")
  • edge-case behavior

This forms Spec-IR.

…

Pertanyaan umum

Apa itu 'smart contract'?

Itu adalah program komputer yang berjalan di blockchain dan secara otomatis menjalankan kesepakatan ketika kondisi tertentu terpenuhi.

Apa itu 'whitepaper'?

Itu adalah dokumen resmi yang menjelaskan cara kerja sebuah proyek blockchain, tujuannya, dan detail teknisnya.

Apa arti 'compliance'?

Artinya mematuhi atau mengikuti aturan dan spesifikasi yang sudah ditetapkan.

Detail

Deskripsi asli dari pembuat

Verifies code implements exactly what documentation specifies for blockchain audits. Use when comparing code against whitepapers, finding gaps between specs and implementation, or performing compliance checks for protocol implementations.

repo: sickn33/agentic-awesome-skills

Popularitas

Bintang GitHub
48k
Peringkat
#5839
Lisensi
MIT
Diperbarui
15/10/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa