cli-audit-drift

Detect semantic drift between code and CONTRACTS.md functional contracts.

5|1|Updated Mar 2, 2026
One-click install
npx skills add https://github.com/Destynova2/cli-code-skills --skill cli-audit-drift
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cli-audit-drift
Source: https://github.com/Destynova2/cli-code-skills/tree/main/cli-audit-drift
Command: npx skills add https://github.com/Destynova2/cli-code-skills --skill cli-audit-drift

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill identifies silent semantic drift between intended behavior (documented in CONTRACTS.md) and actual implementation, preventing behavioral regressions and ensuring code integrity.

Core Features & Use Cases

  • Semantic Drift Detection: Compares code against functional contracts to identify behavioral changes that violate the original intention.
  • Codebase Scanning: Supports scanning of single functions, files, directories, or entire projects.
  • Bootstrap Mode: Generates CONTRACTS.md for projects without existing contracts.
  • Drift Classification: Classifies detected drifts into 'Miss', 'Evolution', 'Ambiguity', 'Stale contract', or 'Orphan code'.

Quick Start

Run /cli-audit-drift path/to/your/code to detect semantic drift in your codebase.

Frequently Asked Questions about cli-audit-drift

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

FAQPage Schema
What is semantic drift in code and how does contract checking detect it?

Semantic drift occurs when code implementation silently diverges from its intended behavior. Contract checking detects this drift by comparing code against functional contracts in CONTRACTS.md, classifying violations into categories like Miss, Evolution, or Stale contract.

How do I audit my codebase for intention verification and behavioral regressions?

You can audit your codebase for intention verification by running a scan on a specific function, file, directory, or entire project. The audit compares code against documented contracts to identify behavioral regressions and propose minimal fixes.

Can I check code quality for an entire project or just single files?

You can check code quality at multiple levels of granularity. The tool supports scanning single functions, individual files, directories, or entire projects to detect semantic drift and ensure implementation matches functional contracts.

Do I need an existing CONTRACTS.md file to perform a code audit?

No, you do not need an existing CONTRACTS.md file. The tool includes a Bootstrap Mode that generates CONTRACTS.md for projects without existing contracts, allowing you to establish functional contracts before verifying intention.

How are detected semantic drifts classified during a contract audit?

Detected semantic drifts are classified into five categories: Miss, Evolution, Ambiguity, Stale contract, and Orphan code. This classification helps determine whether to apply minimal fixes to the code or update the contract definitions.