DiffCI
OfficialProvides a non-blocking GitHub Actions workflow that analyzes commit changes and dependency graphs to report test-selection opportunities and fallback reasons without altering required CI jobs.
DiffCI
Find test-selection opportunities in your CI before changing what it runs. DiffCI analyzes a
commit's changes and dependency graph, then reports which test files it would select, why it falls
back to a full run, and whether it can propose a test command. check also runs paired full and
selected commands when it can infer them. The observe command and Action remain observation-only.
Try DiffCI
From a Git repository checkout, with Node.js 22.5+ and Git installed, run:
npx @diffci.com/diffci@latest checkcheck explains affected tests and, when it can infer safe commands, runs both the full and selected
test commands to measure the difference. It sends nothing to DiffCI. Test commands can create files
in the checkout. For analysis without test execution, use npx @diffci.com/diffci@latest observe --no-send.
To add instructions for coding agents, run:
npx @diffci.com/diffci@latest initOn Windows PowerShell, quote the package name:
npx '@diffci.com/diffci@latest' checkThe copyable adoption kit includes an AGENTS.md instruction and
maintainer PR text. AI-readable documentation is on Context7 CLI
and Context7 Core. Use the GitHub Marketplace Action
for a separate, non-blocking observation job. Required project CI remains authoritative.
One paired run is preliminary evidence; repeat comparisons and account for cache effects before
claiming CI savings. On a full-validation fallback, check runs the full command once and reports
0% reduction.
Upgrade from 0.1.3: tests excluded by a source-only tsconfig.json could be discovered without
their dependency edges, producing an incomplete selection. This is fixed in 0.1.4. Revalidate
affected observations before using them as opportunity evidence; see the
historical validation and
release qualification.
The local default compares HEAD with its first parent; both commits must be available. For a specific
comparison, add --base <base-sha> --head <head-sha>. DiffCI prints the selection, fallback reasons,
and the path to a JSON report outside your checkout. REFUSED or ERROR is not a successful analysis;
check the reported status even when the command exits successfully. See the
support matrix for setup requirements and supported workloads.
check runs inferred full and selected commands in the checkout and sends nothing by default.
The commands may write generated files. Use observe --no-send for analysis without execution.
See docs/ai-agents.md for Claude Code, Codex,
Cursor, GitHub Copilot, and similar tools.
Measured example: a controlled Cal.com replay showed 44.2% net reduction in a job-equivalent install + pretest + test workload, including analysis overhead. This is one sandbox comparison, not Cal.com's production savings or a prediction for your repository. Read the timings and method.
Selection counts alone do not establish runtime savings. check reports a measured percentage only
when both commands pass; observe does not execute tests.
For an advanced paired runtime check, you can still run observe first and then run verify-savings
against the observation report. It compares your normal full command with
DiffCI's proposed selected command and writes JSON plus Markdown evidence; see
docs/npm-adoption.md.
Related MCP server: phionyx-pipeline-mcp
Observe in GitHub Actions
Save this as .github/workflows/diffci.yml to add a dedicated, non-blocking observation job:
name: DiffCI observation
on: [push, pull_request]
permissions:
contents: read
jobs:
diffci:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: DiffCI/DiffCI.com@3aa76a84919691cf7e8f9d1f1f6a80399325d1aeThen check the workflow locally with npx @diffci.com/diffci@latest verify-workflow. Keep the observer
out of required checks and other jobs' needs lists. The Action adds a job summary and a
diffci-observation artifact to the run; it does not alter which tests your other jobs execute.
The example pins release v0.2.2 to its full commit SHA for reproducibility.
The CLI sends no report with --no-send. The Action uploads a GitHub artifact by default; sending to
DiffCI's hosted service requires an explicitly configured endpoint and token.
Installation details · Seven-day pilot
Use DiffCI
Surface | Use it for | Current distribution |
Try | Published npm CLI and Action |
The CLI bundles a pinned revision of the Core engine from GitHub. Users install only
@diffci.com/diffci; the check command above uses it directly. Core performs Git analysis,
dependency graphs, impact, path baseline, and selected-command planning. The report format and
non-interfering GitHub Action remain in this repository. See
docs/package-relationship.md for the source relationship.
For evaluation results and their limits, start with
docs/adoption-evidence.md.
Agent Adoption
Add DiffCI instructions to a repository:
npx @diffci.com/diffci@latest initThen ask your coding agent to run:
npx @diffci.com/diffci@latest checkAgent-specific docs:
Codex ·
Claude Code ·
Cursor ·
GitHub Copilot ·
Grok.
Live discovery files:
llms.txt ·
AI agents.
Adoption materials:
outreach copy ·
metrics ·
targets.
For native agent integrations, DiffCI also ships a stdio MCP server:
npx -p @diffci.com/diffci@latest diffci-mcpSee docs/mcp.md for Claude, Cursor, Codex, and generic MCP config snippets.
Project background
Public Core and private Cloud
DiffCI's public-good analysis engine is released separately from its commercial hosted product.
The project lives in the DiffCI GitHub organization.
This repository was transferred to DiffCI/DiffCI.com on 2026-09-16.
Component | Scope | Licensing |
Standalone dependency/change analysis, CI graph inference, safety/fallback, advisory test selection, synthetic benchmarking and local compute measurement | AGPL-3.0-only; public | |
DiffCI Cloud | Hosted infrastructure, billing, enterprise dashboard, organization management, proprietary data/services, and managed acceleration | Proprietary |
Optional enterprise code | Separately scoped, visible and auditable enterprise capabilities | Source available, with commercial production rights controlled by DiffCI |
This mixed repository is public. The reviewed Core extraction was published separately, with fresh Git history. This repository retains its existing engine snapshot while package integration is migrated separately. No blanket AGPL license applies to this repository. Public Core is advisory-only; energy/carbon/cost are modeled estimates, not verified environmental savings. The exact extraction is recorded in the Core release audit.
The funded Core should run independently of DiffCI Cloud. AGPL permits commercial use and competing hosting; it adds source-sharing obligations for covered modifications, including qualifying remote network use. Grant eligibility depends on each grant's agreement and funded deliverables.
See the licensing boundaries, organization and migration plan, and prepared organization profile.
This repository moved out of the DentalPresence.in
monorepo (previously diffci/ there) into its own repo on 2026-08-21, once the project outgrew being a
subfolder. DentalPresence.in remains DiffCI's original dogfooding target - some code (the planner
DentalPresence-specific PATH baseline/task registry, a few fixture tests) still reflects that origin - but
the research and shadow-validation pipelines are generic and have been exercised against dozens of
real third-party repositories.
Current state
Language expansion: initial Vue SFC, Go package-level, and conventional Maven reactor analysis is implemented through repository adapters. See the support matrix and setup requirements for exact scope, fallback behavior, and validation boundaries.
Three completed research stages plus an in-progress prospective-validation stage, in order:
Stage 0 - a 2,000-delta historical benchmark across 20 real repositories, run through a real Cloudflare orchestrator. Verdict: GO WITH CONDITIONS.
Stage 1A - forensic root-cause investigation of every repository/delta where Stage 0's confidence model degraded to UNSAFE, and of every historical "unsafe miss" candidate. Identified the top 3 highest-leverage fixes.
Stage 1B - implemented those 3 fixes (reachability-aware confidence narrowing, an improved historical safety-measurement methodology, a tsconfig-scope + package.json-diffing fix), validated them live against real repositories (coverage improved, zero contradicted safety cases), and ran a real wall-clock FULL/PATH/DiffCI runtime pilot.
Stage 2 (current) - prospective shadow validation on real, currently-arriving CI events, not more historical benchmarking. A live pipeline (Cloudflare Sandbox Containers + Worker, D1 + R2) observes real repositories, predicts before their outcome is known, and later reconciles against the real CI result. Current verdict: EXTEND SHADOW VALIDATION - the pipeline is real and defect-free, and since 2026-08-21 it runs autonomously: a Cron Trigger polls enrolled repositories every 10 minutes (
src/research/cloudflare/shadow-cron.ts), and the registered DiffCI Shadow GitHub App (read-only; seedocs/github-app-registration.md) delivers push/workflow events to/v1/shadow/webhookfor instant predictions and exactly-on-time reconciliation - this repository shadow-observes itself through that App. Seedocs/research/2026-08-21-stage2-final-report.mdfor the full picture; what's honestly still missing is real observation volume, working GitHub Actions on our own repositories (account billing), and real design-partner repositories.
Every dated report behind these stages lives in docs/research/ - start with
2026-08-21-stage2-architecture.md for the fullest current picture of what's built vs not, or the
Stage 0/1A/1B reports for the historical-validation story.
For the next product milestone, see docs/alpha-readiness.md. It tracks the
private-alpha bar: install DiffCI, keep CI unchanged, collect real shadow observations, and render a
trustworthy potential-savings report.
Architecture
DiffCI is now framed as an open-core product:
DiffCI
|
├── Open-source core
| ├── DiffCI engine
| ├── CLI / npm package
| ├── Local analysis
| └── Basic GitHub Action
| |
| └── Tidelift package support
|
└── Commercial DiffCI
├── Hosted service / DiffCI Cloud
├── Organization dashboard
├── Historical analytics
├── Advanced CI/CD optimization
├── Enterprise policies
├── Managed runners
├── Team features
└── Support / enterprise servicesThe open-source core is the trust and adoption surface. It runs locally or in the host repository's own
CI, writes a report, and changes nothing about CI execution. Commercial DiffCI adds hosted history,
organization views, policy, managed operations, runners, and support. Tidelift belongs to the supported
open-source package path, not the hosted product feature boundary. See
docs/open-core-packaging.md and
docs/tidelift-package-support.md.
The source tree follows that split:
src/git/,src/repo/,src/planner/, andsrc/client/are the installable OSS observer path.action.ymlwraps the observer as a basic non-blocking GitHub Action.src/research/andsrc/shadow/run validation, GitHub App shadow observation, and reconciliation.src/product/,src/auth/,src/billing/,src/ingest/,src/ledger/,src/runner/, andsrc/usage/are the commercial/control-plane layer.docs/oss-boundary.mdrecords what is allowed into the npm package.
Commands
# Type-check and run the full test suite
npm run check
# Generate an example delta / impact / plan for the current repo's latest commit
npm run diffci
npm run impact
# Run a real Stage 0-style historical benchmark locally
npm run research:stage0
# Deploy the Cloudflare research/shadow Worker (D1 + R2 + Sandbox Containers)
npm run research:sandbox:deployInstall Surfaces
DiffCI is intended to be installable as infrastructure, not only as a hosted shadow experiment:
- uses: DiffCI/DiffCI.com@3aa76a84919691cf7e8f9d1f1f6a80399325d1aenpx @diffci.com/diffci@latest observe
npx @diffci.com/diffci@latest check
npx @diffci.com/diffci@latest init
npx @diffci.com/diffci@latest verify-workflowThe GitHub Action and npm CLI establish the OSS/package distribution path. The hosted GitHub App and
DiffCI Cloud build on that trust boundary for teams that want shared reports and history. See
docs/distribution.md for the package and Action positioning,
docs/open-core-packaging.md for the commercial split, and
docs/npm-adoption.md for copy-paste pilot material.
This server cannot be deployed
Maintenance
Related MCP Connectors
Security reviews for coding agents: diffs checked against your org policy and live infrastructure.
Read-only AI coding tools for change verification, release readiness, capacity, and guidance.
Guardian agent for AI coding: four frontier models review risky diffs and commits before they ship.
Risk-scan a diff, flag AI-generated-code tells, find secrets. 5 of 7 tools need no account.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceA validation layer for AI coding assistants that enforces explicit LLM evaluations on plans, code diffs, and tests to ensure safer and higher-quality code.22 PyPI17MIT
- AlicenseAqualityAmaintenanceEnables verification of AI coding agent self-reports against git diff truth and a deterministic gate, producing pass/regenerate/reject directives to ensure claimed work matches actual changes.6AGPL 3.0
- AlicenseNot gradedqualityAmaintenanceA runtime gate for coding agents. Blocks the tool calls that wreck a repo (force-push main, rm -rf, secret exfiltration, CI wipe) and lets normal build and commit work through. Machine-checked git-branch core (z3); the rest is high-precision heuristics. Tested on 3,790 real CI commands, 0 false blocks.1MIT
- AlicenseAqualityBmaintenanceEnables AI coding agents to run fast, sandboxed pre-flight validation—tests, type-checking, linting, security audits, Git safety scans, and fix suggestions—before committing or pushing code, with instant caching and optional Docker isolation.1019 npmMIT