Skip to main content

Code quality gate — mutation testing, static analysis, and risk scoring for AI-generated code

Project description

Seraph

Code quality gate for AI-generated code. Mutation testing, static analysis, flaky test detection, and risk scoring in one pipeline.

Seraph takes a git diff and stress-tests it across 5 dimensions before it ships.

Install

pip install seraph-ai

With optional tools:

pip install "seraph-ai[mutation]"   # mutmut for mutation testing
pip install "seraph-ai[sentinel]"   # git-sentinel for risk signals
pip install "seraph-ai[all]"        # everything

Quick Start

# Assess current changes (skipping heavy steps for speed)
seraph assess --skip-baseline --skip-mutations

# Full assessment with mutation testing
seraph assess

# View past assessments
seraph history

# JSON output for CI integration
seraph assess --json

# Debug mode
seraph assess --verbose

What It Does

Seraph runs your code changes through 5 tests and produces an overall grade (A-F):

Dimension Weight What It Checks
Mutation Score 30% Deliberately breaks your code — do your tests catch it?
Static Cleanliness 20% Ruff + mypy findings weighted by severity
Test Baseline 15% Runs tests 3x to detect flaky tests
Sentinel Risk 20% Hot files, pitfall patterns, and risk signals from git history
Co-change Coverage 15% Did you forget files that historically change together?

Grades: A >= 90, B >= 75, C >= 60, D >= 40, F < 40

MCP Server

Seraph works as an MCP server for AI assistants (Claude, etc.):

seraph-mcp

Tools: seraph_assess, seraph_mutate, seraph_history, seraph_feedback

Claude Desktop Config

{
  "mcpServers": {
    "seraph": {
      "command": "seraph-mcp",
      "env": {
        "SERAPH_REPO_PATH": "/path/to/your/repo"
      }
    }
  }
}

Configuration

Create .seraph/config.toml in your repo to customize:

[timeouts]
mutation_per_file = 300
static_analysis = 60

[scoring]
mutation_weight = 0.40
static_weight = 0.15

[pipeline]
baseline_runs = 5

[retention]
retention_days = 30

[logging]
level = "DEBUG"

Environment variables override TOML (e.g. SERAPH_TIMEOUT_MUTATION_PER_FILE=300).

Commands

seraph assess [repo_path]    # Run full assessment
seraph history [repo_path]   # View past assessments
seraph feedback <id> <outcome>  # Submit feedback (accepted/rejected/modified)
seraph prune [repo_path]     # Delete old data (--days N --yes)

Works With

  • Sentinel — Git history intelligence (hot files, co-change patterns, pitfall detection)
  • mutmut — Mutation testing
  • ruff — Fast Python linter
  • mypy — Type checker

Part of the EvoIntel MCP Suite

Seraph solves AI Blindness #4: Code Quality — mutation survival, flaky tests, and risk signals that "all tests pass" will never reveal.

Part of the EvoIntel MCP Suite by Evolving Intelligence AI: five tools for five blindnesses no model improvement will ever fix.

Tool Blindness Install
Sentinel Project History pip install git-sentinel
Niobe Runtime Behavior pip install niobe
Merovingian Cross-Service Dependencies pip install merovingian
Seraph Code Quality pip install seraph-ai
Anno Web Content npm install -g @evointel/anno

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

seraph_ai-0.1.1.tar.gz (52.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

seraph_ai-0.1.1-py3-none-any.whl (40.5 kB view details)

Uploaded Python 3

File details

Details for the file seraph_ai-0.1.1.tar.gz.

File metadata

  • Download URL: seraph_ai-0.1.1.tar.gz
  • Upload date:
  • Size: 52.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for seraph_ai-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f9261af5ac8fe118fd63a3680700824aa36bff5ec281a19e405e28aeea328ab5
MD5 8c226ec1e10f816ba92985c5b00483f9
BLAKE2b-256 a16a4bb8a8a0fa168663c99d7c837132f3896130dcc257af1acc2ddd3860c049

See more details on using hashes here.

File details

Details for the file seraph_ai-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: seraph_ai-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 40.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for seraph_ai-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e4bff162880d1aa9284ce42d77035e32ef9bc1e03e200888b6bf44bc84864a77
MD5 951566223d4478010cbd017fc85ed296
BLAKE2b-256 671d0b246c5f19b46ccdf96a9c8690ca18398864c0b84841de817ade26cc169f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page