AI-agent CI validation
Give coding agents evidence before they call a change CI-ready.
DiffCI analyzes the current Git change, traces affected tests, explains conservative fallbacks, and can run the inferred full and selected commands as a paired measurement.
npx "@diffci.com/diffci@latest" check
The command sends nothing to DiffCI Cloud. It does not skip, cancel, reorder, or replace required CI checks.
Choose the command that matches the task
check: validate and measure
check analyzes the checkout and, when DiffCI can infer safe commands, executes the full and selected test paths sequentially. It reports paired runtime only when both commands pass and the checkout identity remains valid. Test commands may create generated files in the repository.
observe --no-send: analyze without test execution
Use observation mode when the agent should inspect selection evidence without executing repository scripts. It writes the report outside the checkout and sends nothing.
verify-workflow: inspect Action integration
This checks that the DiffCI observer remains separate, non-blocking, and outside the dependency chain of required jobs.
Install repository instructions
npx "@diffci.com/diffci@latest" init
init creates DiffCI guidance for supported agent instruction surfaces, including AGENTS.md, CLAUDE.md, Cursor rules, Copilot instructions, and diffci.config.json. Existing files are preserved unless replacement is explicitly requested.
Agent-specific setup:
- Codex — repository instructions, command interpretation, and PowerShell.
- Claude Code —
CLAUDE.mdworkflow and guardrails. - Cursor — project rules and optional MCP integration.
- GitHub Copilot — repository instructions and the observer Action.
- Grok — portable repository policy and CLI use.
Use DiffCI through MCP
Remote MCP clients can connect to the stateless, read-only guidance endpoint:
https://diffci.com/mcp
When tools must inspect the current checkout or run tests, configure the local stdio server:
{
"mcpServers": {
"diffci": {
"command": "npx",
"args": ["-p", "@diffci.com/diffci@latest", "diffci-mcp"],
"cwd": "/path/to/repository"
}
}
}
Call diffci_check before a PR-ready answer. It has the same execution behavior as the CLI check command.
Interpret the result conservatively
- A selected command is evidence, not authority. Required project CI remains authoritative.
REFUSEDandERRORare not passes. Run the repository's normal validation commands.- Selection counts are not savings. Use paired execution before making a runtime claim.
- Fallback is a valid result. Lockfiles, workflows, root configuration, or incomplete dependency evidence can require the full suite.
For the measurement boundary, read the open evidence study and the affected-tests guide.