DiffSense

Registre officiel Médias et design

MR/PR risk audit MCP server: semantic diff + rule engine, strict read-only. Run as image or pip.

Que pouvez-vous faire avec DiffSense ?

  • CI / Local: Performs semantic risk auditing on MR/PR diffs, outputting review_level and recommended actions. Analyzes only changed content without slowing down pipelines. Low-quality rules are automatically downgraded. Does not automatically modify CI...
  • Agent / LLM Integration: Deterministic, machine-readable surfaces for agents and CI gates — versioned JSON contract (schema_version), SARIF 2.1.0 output, and a read-only MCP server (audit_diff / audit_replay / list_rules / explain_rule). See t...
  • VSCode Extension: Maintained in the vscode-extension directory of this repository (dual-artifact layout). Install from the Marketplace or download the VSIX from Releases.

Installation

Ajoutez ceci à la configuration MCP de votre client (Claude Desktop : claude_desktop_config.json ; Cursor : .cursor/mcp.json ; VS Code et les autres utilisent la même forme « mcpServers »).

PYPI package diffsense
Claude Code
claude mcp add diffsense -- uvx diffsense==2.3.1
Configuration JSON (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "diffsense": {
            "command": "uvx",
            "args": [
                "diffsense==2.3.1"
            ]
        }
    }
}

Documentation

Tirée du README du projet sur GitHub, actualisée chaque semaine. Les liens ouvrent GitHub.

Sommaire
  1. DiffSense
  2. Quick Start
  3. Features
  4. Quick Start (Detailed)
  5. Project Structure (This Branch)
  6. Development
  7. License & Links

DiffSense

DiffSense is a Change Risk Gate for the PR stage: it evaluates whether the current diff introduces regression risks without performing full codebase scans or style checks. Designed for minimal alerts, high precision, low latency, and interpretable results.


Quick Start

ScenarioAction
GitHub Pull RequestCopy the workflow from diffsense/docs/quickstart.md (Method 1) to .github/workflows/diffsense.yml in your target repository. Uses the default GITHUB_TOKEN with no additional configuration required. After committing and creating/updating a PR, the workflow will automatically execute the audit and post results under the PR.
Local AuditRun pip install -e diffsense in the repository root, or pip install "git+https://github.com/GoldenSupremeSaltedFish/DiffSense.git@main#subdirectory=diffsense", then execute diffsense replay <path-to-diff>.
Agent / LLM IntegrationInstall the MCP server with pip install "diffsense[mcp]" and run diffsense-mcp, or consume the JSON contract / SARIF directly. See Agent Integration Guide.

Complete steps are available at diffsense/docs/quickstart.md.

Optional: Add .diffsense.yaml to your repository root to use the officially recommended configuration, suitable for most teams.


Features

  • CI / Local: Performs semantic risk auditing on MR/PR diffs, outputting review_level and recommended actions. Analyzes only changed content without slowing down pipelines. Low-quality rules are automatically downgraded. Does not automatically modify CI status; decisions to block are made manually or by downstream processes.
  • Agent / LLM Integration: Deterministic, machine-readable surfaces for agents and CI gates — versioned JSON contract (schema_version), SARIF 2.1.0 output, and a read-only MCP server (audit_diff / audit_replay / list_rules / explain_rule). See the Agent Integration Guide and CLI Contract.
  • VSCode Extension: Maintained in the vscode-extension directory of this repository (dual-artifact layout). Install from the Marketplace or download the VSIX from Releases.

Quick Start (Detailed)

GitHub Actions

Copy the complete YAML from diffsense/docs/quickstart.md (Method 1) to your repository's .github/workflows/diffsense.yml to enable PR auditing.

GitLab CI
  1. In your project, go to Settings → CI/CD → Variables and add the variable DIFFSENSE_TOKEN (Personal Access Token with api permissions; recommended to check Mask variable).
  2. Add the corresponding job to .gitlab-ci.yml. See the example at diffsense/gitlab-ci-example.yml.
VSCode Extension

Maintained in the vscode-extension directory of this repository. Install from the Marketplace or download the VSIX from Releases.


Project Structure (This Branch)

DiffSense/
├── diffsense/          # CLI, rule engine, GitHub/GitLab adapters, MCP server; see docs/quickstart.md for quick start
├── vscode-extension/   # VS Code extension (dual-artifact line)
├── AGENTS.md           # repository guide for AI coding agents
└── technical_documentation/

Development

git clone https://github.com/GoldenSupremeSaltedFish/DiffSense.git
cd DiffSense/diffsense
pip install -e ".[dev]"
pytest tests/ -v

See diffsense/CONTRIBUTING.md for details.


English | 中文版(存档)

Questions fréquentes

Qu'est-ce que DiffSense ?

MR/PR risk audit MCP server: semantic diff + rule engine, strict read-only. Run as image or pip.

Comment installer DiffSense ?

Il s'exécute sur votre machine. Dans Claude Code : claude mcp add diffsense -- uvx diffsense==2.3.1. Pour les autres clients, collez la configuration JSON de cette page dans leurs réglages MCP.

Faut-il une clé API pour DiffSense ?

Son entrée au registre n'indique aucune clé ni secret obligatoire. Certaines fonctions peuvent tout de même demander un compte auprès du service auquel il se connecte.

DiffSense est-il open source ?

Son code est public sur GitHub, mais le dépôt ne déclare pas de licence standard.

Qui maintient DiffSense ?

Il est publié par GoldenSupremeSaltedFish. AI.tn le référence sans le maintenir ni le recommander.

Issu du registre MCP officiel. Être listé n'est pas une recommandation : vérifiez le code et les permissions d'un serveur avant de lui donner accès à vos données.