Docs/Documentation

Documentation

Learn how to use Cadence to detect AI-generated content

Welcome to Cadence

Cadence is an open-source CLI tool that detects AI-generated content in Git repositories and websites. It uses 38 pattern-based detection strategies combined with optional AI validation to identify suspicious content with confidence scores and detailed reporting.

[!TIP] New here? Start with the Quick Start guide to analyze your first repository in under 5 minutes.

Documentation Sections

Getting Started

Installation, quick start guides, and basic configuration to get you up and running.

CLI Reference

Complete command-line interface documentation including all commands and detection strategies.

Analysis

Deep-dive guides for analyzing Git repositories and websites with best practices.

Integrations

Connect Cadence to CI/CD pipelines, webhook-based workflows, and AI agent platforms.

Reference

Advanced configuration, development guides, and troubleshooting resources.

Community

Contributing guidelines, security policy, and community resources.

Quick Start

Bash
# Clone and build
git clone https://github.com/TryCadence/Cadence.git
cd Cadence && make build

# Analyze a Git repository
./bin/cadence analyze --repo /path/to/repo

# Analyze a remote GitHub repo
./bin/cadence analyze --repo https://github.com/user/repo

# Analyze a website
./bin/cadence analyze --url https://example.com

[!NOTE] On Windows, use .\scripts\build.ps1 or go build -o cadence.exe ./cmd/cadence instead of make build.

Key Capabilities

CapabilityDetails
Git Detection18 strategies — size, velocity, timing, merge commits, dispersion, ratio, precision, commit messages, naming patterns, structural consistency, burst patterns, error handling, templates, file extensions, statistical anomalies, timing anomalies, emoji usage, special characters
Web Detection20 strategies — overused phrases, generic language, excessive structure, perfect grammar, boilerplate text, repetitive patterns, missing nuance, excessive transitions, uniform sentence length, AI vocabulary, emoji overuse, special characters, missing alt text, semantic HTML, accessibility markers, heading hierarchy, hardcoded values, form issues, link text quality, generic styling
Confidence Scoring0.0–1.0 scores with severity levels and per-finding reasoning
Output FormatsJSON, text, HTML, YAML, and BSON
StreamingSSE endpoints for real-time analysis progress
AI ValidationOptional OpenAI / Anthropic analysis on top of heuristic detections
Webhook ServerFiber-based HTTP server with signature verification, job queue, caching
Plugin SystemRegister custom StrategyPlugin implementations at runtime
ConfigurationYAML config with thresholds, exclusions, strategy toggles, and env var overrides

Learning Paths

Analyze a Git repository
  1. Installation — Build or download the binary
  2. Quick Start — Run your first analysis
  3. Repository Analysis — Understand output and scoring
  4. Git Analysis Guide — Deep-dive into Git-specific strategies
Analyze a website
  1. Installation — Build or download the binary
  2. Quick Start — Run your first analysis
  3. Web Analysis Guide — URL scanning, depth control, and selectors
Set up AI-enhanced analysis
  1. AI Providers — Overview of OpenAI + Anthropic support
  2. AI Configuration — API keys, model selection, skill toggles
  3. AI Examples — Real-world usage patterns
Deploy as a service
  1. Configuration — Set up cadence.yml
  2. Webhooks — Run a webhook server for GitHub/GitLab push events
  3. Agent Skills — Expose skills to AI assistants and pipelines
Contribute to Cadence
  1. Build & Development — Clone, build, and test locally
  2. Contributing — PR guidelines and code standards

Architecture Overview

Cadence uses a source-agnostic, extensible pipeline built in Go 1.24+:

Sources → Detectors → Runner → Reporter
  │           │          │         │
  ├─ Git      ├─ 18 Git  ├─ Sync   ├─ JSON
  └─ Web      ├─ 20 Web  └─ SSE    ├─ Text
               └─ Plugin            ├─ HTML
                                    ├─ YAML
                                    └─ BSON

Core Pipeline:

  • SourcesGitRepositorySource, WebsiteSource (extensible)
  • DetectorsGitDetector (18 strategies), WebDetector (20 strategies), PluginDetector
  • RunnersDefaultDetectionRunner (sync), StreamingRunner (async SSE)

Supporting Systems:

  • AI — Provider registry (OpenAI + Anthropic), 4 built-in skills
  • Webhook Server — Fiber HTTP with HMAC-SHA256, job queue, SSE streaming
  • Config — YAML with env var overrides via spf13/viper
  • Plugin System — Runtime strategy registration with enable/disable
  • Caching — In-memory TTL cache with LRU eviction
  • Metrics — Prometheus-compatible with per-source/strategy tracking