@diffci.com/diffci 0.3.10 → 0.3.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +7 -5
- package/README.md +18 -422
- package/dist-client/src/client/cli.js +1 -49
- package/dist-client/src/client/mcp.js +2 -1
- package/dist-client/src/client/package-identity.js +69 -0
- package/dist-client/src/client/workflow-guard.js +1 -1
- package/node_modules/@diffci.com/core/README.md +33 -0
- package/package.json +17 -131
- package/.agents/plugins/marketplace.json +0 -12
- package/.claude-plugin/marketplace.json +0 -17
- package/COMMERCIAL.md +0 -35
- package/SECURITY.md +0 -61
- package/SUPPORT.md +0 -47
- package/action.yml +0 -155
- package/docs/adoption-metrics.md +0 -161
- package/docs/adoption-outreach.md +0 -156
- package/docs/agent-adoption-kit.md +0 -97
- package/docs/agent-adoption-targets.md +0 -62
- package/docs/agent-plugin.md +0 -145
- package/docs/ai-agents.md +0 -123
- package/docs/claude-code.md +0 -18
- package/docs/codex.md +0 -18
- package/docs/copilot.md +0 -18
- package/docs/cursor.md +0 -19
- package/docs/distribution.md +0 -153
- package/docs/grok.md +0 -18
- package/docs/language-support.md +0 -118
- package/docs/mcp.md +0 -116
- package/docs/npm-adoption.md +0 -165
- package/glama.json +0 -12
- package/llms.txt +0 -41
- package/packaging/agent-plugin/.claude-plugin/plugin.json +0 -26
- package/packaging/agent-plugin/.codex-plugin/plugin.json +0 -47
- package/packaging/agent-plugin/.mcp.json +0 -13
- package/packaging/agent-plugin/README.md +0 -36
- package/packaging/agent-plugin/assets/diffci-mark.svg +0 -14
- package/packaging/agent-plugin/mcp.json +0 -15
- package/packaging/agent-plugin/plugin.json +0 -51
- package/packaging/agent-plugin/skills/diffci-verify/SKILL.md +0 -35
- package/packaging/public-plugin/README.md +0 -12
- package/packaging/public-plugin/SUBMISSION.md +0 -21
- package/packaging/public-plugin/assets/icon-dark.png +0 -0
- package/packaging/public-plugin/assets/icon.png +0 -0
- package/packaging/public-plugin/assets/logo-dark.png +0 -0
- package/packaging/public-plugin/assets/logo.png +0 -0
- package/packaging/public-plugin/mcp.json +0 -16
- package/packaging/public-plugin/plugin.json +0 -114
- package/packaging/public-plugin/review/refusal-observation.json +0 -41
- package/packaging/public-plugin/skills/diffci-remote/SKILL.md +0 -19
- package/packaging/public-plugin/skills/get-started/SKILL.md +0 -26
- package/server.json +0 -43
- package/site/assets/calcom-runtime-evidence.svg +0 -11
- package/site/llms.txt +0 -44
package/docs/ai-agents.md
DELETED
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
# DiffCI for AI Coding Agents
|
|
2
|
-
|
|
3
|
-
DiffCI is a fail-closed verification layer agents run before proposing, committing, or opening a pull
|
|
4
|
-
request. It chooses the narrowest verification it can justify and broadens to the full inferred test
|
|
5
|
-
command when the evidence is incomplete.
|
|
6
|
-
|
|
7
|
-
The default command is:
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
npx "@diffci.com/diffci@latest" verify --changed --json
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
`verify --changed` snapshots staged, unstaged, and non-ignored untracked content, runs the selected
|
|
14
|
-
command or a conservative full fallback, and fails unless that exact snapshot passes and remains
|
|
15
|
-
unchanged. Its JSON receipt is designed for agents. Use `check` for paired full-versus-selected
|
|
16
|
-
measurement and `observe --no-send` for analysis without test execution.
|
|
17
|
-
|
|
18
|
-
## Install Agent Instructions
|
|
19
|
-
|
|
20
|
-
From a repository root:
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
npx "@diffci.com/diffci@latest" init
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
This writes:
|
|
27
|
-
|
|
28
|
-
- `AGENTS.md`
|
|
29
|
-
- `CLAUDE.md`
|
|
30
|
-
- `.cursor/rules/diffci.mdc`
|
|
31
|
-
- `.github/copilot-instructions.md`
|
|
32
|
-
- `diffci.config.json`
|
|
33
|
-
|
|
34
|
-
Existing instruction files are extended with a managed DiffCI rule when possible; unrelated content
|
|
35
|
-
is preserved. Pass `--force` only when you intentionally want to replace DiffCI-managed output.
|
|
36
|
-
|
|
37
|
-
To also add a non-blocking GitHub Actions observer job:
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
|
-
npx "@diffci.com/diffci@latest" init --workflow
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
Then verify the workflow:
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
npx "@diffci.com/diffci@latest" verify-workflow
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
To add a blocking, commit-range verification check instead:
|
|
50
|
-
|
|
51
|
-
```bash
|
|
52
|
-
npx "@diffci.com/diffci@latest" init --verification-workflow
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
The generated check uploads a receipt and intentionally does not use `continue-on-error`. Make its
|
|
56
|
-
**DiffCI verification** job required only after it has passed in the repository's normal CI context.
|
|
57
|
-
|
|
58
|
-
## Copy-Paste Adoption
|
|
59
|
-
|
|
60
|
-
For a maintainer-facing snippet, PR template, and GitHub search queries for repositories that already
|
|
61
|
-
use agent instruction files, see [`agent-adoption-kit.md`](agent-adoption-kit.md).
|
|
62
|
-
For a first-pass list of repositories to review before opening PRs, see
|
|
63
|
-
[`agent-adoption-targets.md`](agent-adoption-targets.md).
|
|
64
|
-
|
|
65
|
-
Examples:
|
|
66
|
-
|
|
67
|
-
- [`examples/agent-node`](../examples/agent-node)
|
|
68
|
-
- [`examples/agent-python`](../examples/agent-python)
|
|
69
|
-
- [`examples/agent-monorepo`](../examples/agent-monorepo)
|
|
70
|
-
|
|
71
|
-
## MCP
|
|
72
|
-
|
|
73
|
-
Agents that support remote MCP can connect to the stateless, read-only guidance endpoint:
|
|
74
|
-
|
|
75
|
-
```text
|
|
76
|
-
https://diffci.com/mcp
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
To inspect the current checkout or run tests, use the native stdio tool server:
|
|
80
|
-
|
|
81
|
-
```bash
|
|
82
|
-
npx -p "@diffci.com/diffci@latest" diffci-mcp
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
See [`mcp.md`](mcp.md).
|
|
86
|
-
|
|
87
|
-
Minimal MCP config:
|
|
88
|
-
|
|
89
|
-
```json
|
|
90
|
-
{
|
|
91
|
-
"mcpServers": {
|
|
92
|
-
"diffci": {
|
|
93
|
-
"command": "npx",
|
|
94
|
-
"args": ["-p", "@diffci.com/diffci@latest", "diffci-mcp"]
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
## Agent Policy
|
|
101
|
-
|
|
102
|
-
Agents should:
|
|
103
|
-
|
|
104
|
-
- run `diffci verify --changed --json` before PR-ready answers for local edits;
|
|
105
|
-
- run `diffci verify --json` for a clean CI commit range;
|
|
106
|
-
- call `diffci_verify_changed` locally or `diffci_verify` in CI when connected through MCP;
|
|
107
|
-
- require `safe_to_continue: true` and read the receipt's verification, selected tests, fallback
|
|
108
|
-
reasons, command result, and snapshot identities;
|
|
109
|
-
- use DiffCI output to choose focused follow-up validation;
|
|
110
|
-
- keep the repository's required CI commands authoritative.
|
|
111
|
-
|
|
112
|
-
Agents should not:
|
|
113
|
-
|
|
114
|
-
- skip required CI because DiffCI selected fewer tests;
|
|
115
|
-
- treat `REFUSED` or `ERROR` as a passing validation;
|
|
116
|
-
- continue after a receipt says `safe_to_continue: false`;
|
|
117
|
-
- configure hosted report sending unless the user explicitly supplies an endpoint and token.
|
|
118
|
-
|
|
119
|
-
## Open Core Boundary
|
|
120
|
-
|
|
121
|
-
The agent-facing layer belongs in the open-source core: CLI, local reports, JSON output, instruction
|
|
122
|
-
files, and the non-blocking GitHub Action. Hosted history, organization dashboards, PR bots, policies,
|
|
123
|
-
team analytics, managed runners, and support belong to commercial DiffCI.
|
package/docs/claude-code.md
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# DiffCI for Claude Code
|
|
2
|
-
|
|
3
|
-
Install repository instructions:
|
|
4
|
-
|
|
5
|
-
```bash
|
|
6
|
-
npx "@diffci.com/diffci@latest" init
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
Default validation command:
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
npx "@diffci.com/diffci@latest" verify --changed --json
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
Use DiffCI before PR-ready answers. Continue only when `safe_to_continue` is true. Verification covers
|
|
16
|
-
the current staged, unstaged, and untracked snapshot, uses full fallback when uncertain, and sends
|
|
17
|
-
nothing by default. If tests change files, review them and rerun. Use `observe --no-send` for analysis only.
|
|
18
|
-
Keep the repository's required checks authoritative.
|
package/docs/codex.md
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# DiffCI for Codex
|
|
2
|
-
|
|
3
|
-
Install repository instructions:
|
|
4
|
-
|
|
5
|
-
```bash
|
|
6
|
-
npx "@diffci.com/diffci@latest" init
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
Default validation command:
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
npx "@diffci.com/diffci@latest" verify --changed --json
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
Use DiffCI before PR-ready answers. Continue only when `safe_to_continue` is true. Verification covers
|
|
16
|
-
the current staged, unstaged, and untracked snapshot, uses full fallback when uncertain, and sends
|
|
17
|
-
nothing by default. If tests change files, review them and rerun. Use `observe --no-send` for analysis only.
|
|
18
|
-
Keep the repository's required checks authoritative.
|
package/docs/copilot.md
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# DiffCI for GitHub Copilot
|
|
2
|
-
|
|
3
|
-
Install repository instructions:
|
|
4
|
-
|
|
5
|
-
```bash
|
|
6
|
-
npx "@diffci.com/diffci@latest" init
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
Default validation command:
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
npx "@diffci.com/diffci@latest" check
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
Use DiffCI before PR-ready answers. `init` writes `.github/copilot-instructions.md`; `check`
|
|
16
|
-
analyzes the change and runs inferred full and selected test commands to measure time. It sends
|
|
17
|
-
nothing by default. Test commands may write generated files; use `observe --no-send` for analysis
|
|
18
|
-
only. Keep the repository's required checks authoritative.
|
package/docs/cursor.md
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# DiffCI for Cursor
|
|
2
|
-
|
|
3
|
-
Install repository instructions:
|
|
4
|
-
|
|
5
|
-
```bash
|
|
6
|
-
npx "@diffci.com/diffci@latest" init
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
Default validation command:
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
npx "@diffci.com/diffci@latest" verify --changed --json
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
Use DiffCI before PR-ready changes. `init` writes `.cursor/rules/diffci.mdc`; verification covers the
|
|
16
|
-
current staged, unstaged, and untracked snapshot and uses full fallback when uncertain. Continue only
|
|
17
|
-
when `safe_to_continue` is true. It sends nothing by default. If tests change files, review them and
|
|
18
|
-
rerun; use `observe --no-send` for analysis only. Keep
|
|
19
|
-
the repository's required checks authoritative.
|
package/docs/distribution.md
DELETED
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
# DiffCI Distribution
|
|
2
|
-
|
|
3
|
-
Open-source campaigns should lead to [DiffCI/core](https://github.com/DiffCI/core). The npm CLI and MCP wrapper retain their actual source-repository metadata. Use a Core star link after a valid positive runtime comparison, and link to the engine from directory copy. See [the October execution plan](growth/30-day-execution.md) for pilot and launch drafts.
|
|
4
|
-
|
|
5
|
-
DiffCI has complementary install surfaces: a fail-closed agent verifier, a blocking CI verification
|
|
6
|
-
workflow, and an observation-only Action for measuring opportunities without changing required CI.
|
|
7
|
-
|
|
8
|
-
The product model is open core. The npm CLI and basic GitHub Action are the open-source adoption path;
|
|
9
|
-
DiffCI Cloud adds hosted history, organization dashboards, policies, managed operations, and support.
|
|
10
|
-
See [`open-core-packaging.md`](open-core-packaging.md).
|
|
11
|
-
|
|
12
|
-
## Channel strategy
|
|
13
|
-
|
|
14
|
-
Reviewed 2026-09-22. These channels have different jobs in the same adoption path:
|
|
15
|
-
|
|
16
|
-
| Channel | Role for DiffCI | Next step |
|
|
17
|
-
| --- | --- | --- |
|
|
18
|
-
| npm | Agent-native local and CI verification through `@diffci.com/diffci` | Lead with `verify --changed --json` and its content-bound receipt. |
|
|
19
|
-
| GitHub workflow | Repeatable blocking verification | Generate it with `init --verification-workflow`, pilot it, then make the job required. |
|
|
20
|
-
| GitHub Action | Observation-only adoption | Use the dedicated, non-blocking job below and verify the workflow before a pilot. |
|
|
21
|
-
| GitHub Marketplace | CI-specific discovery of the same Action | [DiffCI observer is live](https://github.com/marketplace/actions/diffci-observer); keep the installation example and release pin current. |
|
|
22
|
-
| MCP directories | Discovery for agents that install stdio tools | Publish matching npm and registry metadata, then submit to the official MCP Registry and Glama. |
|
|
23
|
-
| Tidelift | Potential package maintenance assurance and maintainer income | Pursue package acceptance using the existing submission packet; do not present support as active. |
|
|
24
|
-
| Commercial DiffCI | Paid hosted history, analytics, team workflows, and managed operations | Validate demand with design partners and distinguish available services from future acceleration capabilities. |
|
|
25
|
-
|
|
26
|
-
The Action is the integration; Marketplace is a discovery channel for that integration. See
|
|
27
|
-
[GitHub's publishing requirements](https://docs.github.com/en/actions/how-tos/create-and-publish-actions/publish-in-github-marketplace).
|
|
28
|
-
|
|
29
|
-
Prioritize npm and Action activation, then Marketplace discovery. Keep Tidelift outreach in parallel
|
|
30
|
-
without making adoption dependent on acceptance or expected payments. Defer PyPI, Cargo, and Homebrew
|
|
31
|
-
until user demand and a maintained installation experience justify each additional surface.
|
|
32
|
-
|
|
33
|
-
Measure successful first reports, repositories with repeat observations, completed pilot reviews,
|
|
34
|
-
and qualified commercial interest. Downloads and listing views alone do not demonstrate adoption.
|
|
35
|
-
Use voluntary pilot feedback or explicitly configured hosted reporting for these measurements;
|
|
36
|
-
local observation does not imply permission to collect telemetry.
|
|
37
|
-
|
|
38
|
-
Suggested positioning:
|
|
39
|
-
|
|
40
|
-
> Install DiffCI through npm or GitHub Actions to inspect what your CI could avoid running while
|
|
41
|
-
> leaving CI execution unchanged. Explore hosted reports and shared history with the DiffCI team.
|
|
42
|
-
|
|
43
|
-
Acceleration and managed infrastructure remain product directions unless a specific capability is
|
|
44
|
-
available and validated. Potential savings in shadow reports are not realized customer savings.
|
|
45
|
-
|
|
46
|
-
Tidelift's published payment policy allows individuals, for-profit organizations, and nonprofits to
|
|
47
|
-
receive payments with a signed agreement. A nonprofit recipient is therefore not inherently required.
|
|
48
|
-
Payment depends on factors including subscriber usage and package importance; this does not establish
|
|
49
|
-
DiffCI's eligibility, acceptance, or income. See [Tidelift's payment policy](https://support.tidelift.com/hc/en-us/articles/4406294816916-How-we-pay-lifters)
|
|
50
|
-
and the [DiffCI submission packet](tidelift-submission.md).
|
|
51
|
-
|
|
52
|
-
## GitHub App
|
|
53
|
-
|
|
54
|
-
The unified read-only DiffCI GitHub App is the lowest-friction research and design-partner path. It receives
|
|
55
|
-
repository events, runs shadow analysis outside the repository's CI jobs, and reconciles predictions
|
|
56
|
-
against real CI outcomes. Use it when a maintainer wants observation without adding a workflow step.
|
|
57
|
-
|
|
58
|
-
## GitHub Action
|
|
59
|
-
|
|
60
|
-
The GitHub Action is the OSS dependency-graph path. A repository installs DiffCI as its own
|
|
61
|
-
continue-on-error job:
|
|
62
|
-
|
|
63
|
-
```yaml
|
|
64
|
-
jobs:
|
|
65
|
-
diffci:
|
|
66
|
-
runs-on: ubuntu-24.04
|
|
67
|
-
continue-on-error: true
|
|
68
|
-
permissions:
|
|
69
|
-
contents: read
|
|
70
|
-
steps:
|
|
71
|
-
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # immutable checkout pin
|
|
72
|
-
with:
|
|
73
|
-
fetch-depth: 0
|
|
74
|
-
- uses: DiffCI/DiffCI.com@b35f55c1b6ba9c092f3ad623efd8baa0422c450a
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
The example pins release `v0.3.10` to its qualified feature commit SHA. `npx "@diffci.com/diffci@latest" verify-workflow`
|
|
78
|
-
checks that the job is dedicated, read-only, not required by other jobs, and unable to alter the rest
|
|
79
|
-
of CI.
|
|
80
|
-
|
|
81
|
-
## npm CLI
|
|
82
|
-
|
|
83
|
-
The CLI is the standalone npm package surface. The package name is `@diffci.com/diffci`:
|
|
84
|
-
|
|
85
|
-
```bash
|
|
86
|
-
npx "@diffci.com/diffci@latest" verify --changed --json
|
|
87
|
-
npx "@diffci.com/diffci@latest" verify --json
|
|
88
|
-
npx "@diffci.com/diffci@latest" observe
|
|
89
|
-
npx "@diffci.com/diffci@latest" verify-workflow
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
`verify --changed` covers staged, unstaged, and non-ignored untracked changes. `verify --json` covers
|
|
93
|
-
a clean CI commit range. Both execute the narrowest safe command, broaden to the full inferred test
|
|
94
|
-
command on uncertainty, fail closed, and emit a `diffci.verification.v1` receipt.
|
|
95
|
-
|
|
96
|
-
`observe` writes a JSON report outside the checkout by default. It never runs, skips, cancels, or
|
|
97
|
-
reorders tests. A hosted endpoint is opt-in: reports are sent only when both `DIFFCI_API_URL` and
|
|
98
|
-
`DIFFCI_TOKEN` are set, or when equivalent CLI flags are passed.
|
|
99
|
-
|
|
100
|
-
## Report Shape
|
|
101
|
-
|
|
102
|
-
A shadow report should answer the adoption question before it asks for operational trust:
|
|
103
|
-
|
|
104
|
-
```text
|
|
105
|
-
DiffCI - last 30 days
|
|
106
|
-
|
|
107
|
-
CI runs observed 423
|
|
108
|
-
Compute time 18,240 min
|
|
109
|
-
Potentially avoidable 6,810 min
|
|
110
|
-
Potential reduction 37.3%
|
|
111
|
-
|
|
112
|
-
Estimated compute avoided xxx CPU-hours
|
|
113
|
-
Estimated electricity xxx kWh
|
|
114
|
-
Estimated CO2 xxx kg
|
|
115
|
-
Estimated water xxx L
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
That makes the open-source proposition explicit: install DiffCI, change nothing in CI, and learn
|
|
119
|
-
how much compute may be wasted.
|
|
120
|
-
|
|
121
|
-
## Future Package Managers
|
|
122
|
-
|
|
123
|
-
npm plus the GitHub Action are enough to establish the pattern. Later package surfaces can wrap the
|
|
124
|
-
same observer contract:
|
|
125
|
-
|
|
126
|
-
```bash
|
|
127
|
-
pip install diffci
|
|
128
|
-
cargo install diffci
|
|
129
|
-
brew install diffci
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
Those should ship only after the npm CLI and Action have signed releases, provenance, pinned build
|
|
133
|
-
workflows, and repeatable package verification.
|
|
134
|
-
|
|
135
|
-
## Supported OSS Channel
|
|
136
|
-
|
|
137
|
-
Tidelift belongs to the open-source package channel. It can provide maintenance, security, license, and
|
|
138
|
-
supply-chain assurance for the npm package without requiring a hosted DiffCI account. It should support
|
|
139
|
-
the OSS core rather than define a separate feature tier. The readiness checklist lives in
|
|
140
|
-
[`tidelift-package-support.md`](tidelift-package-support.md).
|
|
141
|
-
|
|
142
|
-
## Release metadata invariant
|
|
143
|
-
|
|
144
|
-
`release-manifest.json` is the source of truth for the npm, MCP, directory, workflow, Action, website,
|
|
145
|
-
and documentation versions. Prepare a future release with:
|
|
146
|
-
|
|
147
|
-
```bash
|
|
148
|
-
npm run release:sync -- 0.2.11 <qualified-40-character-action-sha>
|
|
149
|
-
npm run check:public-metadata
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
The sync command updates every managed surface. The metadata check runs inside `npm run check` and the
|
|
153
|
-
tag-release workflow, so version or immutable Action-pin drift blocks both pull requests and releases.
|
package/docs/grok.md
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# DiffCI for Grok
|
|
2
|
-
|
|
3
|
-
Install repository instructions:
|
|
4
|
-
|
|
5
|
-
```bash
|
|
6
|
-
npx "@diffci.com/diffci@latest" init
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
Default validation command:
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
npx "@diffci.com/diffci@latest" check
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
Use DiffCI before PR-ready answers. `check` analyzes the change and runs inferred full and selected
|
|
16
|
-
test commands to measure time. It writes reports outside the checkout and sends nothing by default.
|
|
17
|
-
Test commands may write generated files. Use `observe --no-send` for analysis only.
|
|
18
|
-
Keep the repository's required checks authoritative.
|
package/docs/language-support.md
DELETED
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
# Language and framework support
|
|
2
|
-
|
|
3
|
-
DiffCI now has an extensible repository-adapter boundary and initial Vue, Go, and Maven support.
|
|
4
|
-
These additions propose selections in the existing observer; they do not enable production CI skipping.
|
|
5
|
-
|
|
6
|
-
| Surface | Implemented scope | Boundaries |
|
|
7
|
-
| --- | --- | --- |
|
|
8
|
-
| JavaScript / TypeScript | Existing dependency analysis and ten existing test-runner command mappings | Runner recognition is not a guarantee of complete framework semantics |
|
|
9
|
-
| Vue | SFC parsing with `@vue/compiler-sfc`; script imports, literal Options API component registrations, empty script fixtures, compiled template asset imports; propagation into importing JS/TS tests; protected runtime-dependent tests in verified isolated scopes | Runtime uncertainty requires full validation unless protected by the isolated-suite policy below; preprocessors, external/custom SFC blocks, style URLs/imports, Nuxt conventions and glob imports require full validation |
|
|
10
|
-
| Go | One root module; optional explicit root-module scope in a repository containing nested modules; native metadata, package-level transitive selection, embeds and Go test commands | Workspaces, changes inside excluded modules, inactive Go files, cgo/native objects, plugins, generation/linkname and incomplete metadata require full validation; root scoping rejects local replacements |
|
|
11
|
-
| Maven / Java / Kotlin | Conventional multi-module reactors with `src/main/{java,kotlin}` and `src/test/{java,kotlin}`; module dependency propagation; Surefire-style test names; proposed reactor commands | Nonstandard layouts, generated sources, integration-test conventions, and POM changes may require full validation. Maven commands are observations and must match the repository's CI lifecycle and profiles. |
|
|
12
|
-
| Mixed Go and JS/TS | Detected | Full validation until cross-language relationships are declared and modeled |
|
|
13
|
-
| Python, Svelte, Astro, C#, Rust | No new semantic support in this release | Require additional adapters and qualification |
|
|
14
|
-
|
|
15
|
-
## Using the observer
|
|
16
|
-
|
|
17
|
-
Use the existing `observe` command and commit range options. The observer now admits a root
|
|
18
|
-
`go.mod`, Vue SFCs, or a conventional Maven reactor as well as a TypeScript project. Vue projects without a tsconfig have their
|
|
19
|
-
JS/TS files parsed alongside their components. Existing TS-only corpus eligibility remains separate:
|
|
20
|
-
this release does not silently enroll Go repositories in historical JS/TS research cohorts.
|
|
21
|
-
|
|
22
|
-
For Maven, DiffCI proposes module-level commands but does not run them or change CI. The default
|
|
23
|
-
goal is `test`. If the repository's CI runs `verify` with profiles, declare that command shape in
|
|
24
|
-
`diffci.json` (or the `diffci` key in `package.json`):
|
|
25
|
-
|
|
26
|
-
```json
|
|
27
|
-
{ "maven": { "goal": "verify", "profiles": ["run-its"] } }
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
This produces a command such as `mvn -pl tools -am verify -P run-its`. The `-am` option can also run
|
|
31
|
-
tests in upstream modules. Check the proposed command against the actual CI workflow before using
|
|
32
|
-
it for execution. A single Cloudflare Resolver run showed a candidate saving of 8.6% with a
|
|
33
|
-
CI-aligned `verify -P run-its` command; it does not establish repeatable savings across repositories.
|
|
34
|
-
|
|
35
|
-
For Go, install a compatible Go toolchain on the **same host and build environment** used for analysis
|
|
36
|
-
and testing, and prepare the repository's dependencies first using its normal setup procedure.
|
|
37
|
-
DiffCI invokes `go list -mod=readonly -deps -test -json ./...` with `GOTOOLCHAIN=local`, `GOPROXY=off`,
|
|
38
|
-
`GOSUMDB=off`, and `GOWORK=off`. Missing toolchains or dependencies produce refusal/full fallback.
|
|
39
|
-
Go may populate its own build cache but must not modify the checkout. It does not run `go generate`.
|
|
40
|
-
Custom `GOFLAGS` currently require full validation. Discovered GOOS, GOARCH and CGO_ENABLED settings
|
|
41
|
-
are carried into the structured test command.
|
|
42
|
-
|
|
43
|
-
For CI that runs only the root module's `go test ./...`, a repository containing nested
|
|
44
|
-
modules can explicitly declare that scope in a committed root `diffci.json`:
|
|
45
|
-
|
|
46
|
-
```json
|
|
47
|
-
{ "go": { "scope": "root-module" } }
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
This does not cover nested-module CI jobs. Keep their validation unchanged. Without the
|
|
51
|
-
declaration, nested modules still block selection. With it, nested module trees are
|
|
52
|
-
excluded from the root test universe, but any change there (including a rename out of
|
|
53
|
-
the tree) forces full validation. Scope/configuration changes also force full validation.
|
|
54
|
-
Go workspaces and local replacements still block scoped selection. Reports identify the
|
|
55
|
-
declared `goScope`; the structured commands continue to run root-relative packages.
|
|
56
|
-
|
|
57
|
-
Empty-graph refusals now include the adapter's reason. Vue recognizes only direct imported
|
|
58
|
-
component identifiers in literal `components` registrations. Unresolved runtime dependencies
|
|
59
|
-
retain full execution unless the isolated-suite protection described below applies.
|
|
60
|
-
|
|
61
|
-
The Reka selection candidate also resolves imported Vue macro types through TypeScript aliases,
|
|
62
|
-
extended configurations and directory index files, and recognizes leading `./` in test globs.
|
|
63
|
-
For an explicitly scoped Vue suite, a component-specific blocker can be excluded only when every
|
|
64
|
-
test/setup/configuration root has been parsed and none can reach that component. This is not a
|
|
65
|
-
directory-name exclusion: imported story fixtures retain their blockers. Unresolved dependencies
|
|
66
|
-
and global configuration blockers still force full validation. Compiler-assisted components that
|
|
67
|
-
probe JSON configuration are rebuilt instead of persistently cached until every compiler input can
|
|
68
|
-
be tracked. See the [Reka experiment](research/2026-09-13-reka-selection.md) for qualification evidence.
|
|
69
|
-
|
|
70
|
-
The runtime-protection candidate can always run every test file reaching an unresolved runtime
|
|
71
|
-
component or directive, while selecting other tests normally. This requires a verified scoped
|
|
72
|
-
Vitest suite and isolated execution. Shared setup reaching a runtime blocker, disabled or ambiguous
|
|
73
|
-
isolation, custom runners/environments and unmodeled configuration keep full-suite fallback.
|
|
74
|
-
This policy protects tests despite unknown runtime edges; it does not resolve those edges or claim
|
|
75
|
-
support for non-isolated or order-dependent jobs. See the [runtime protection experiment](research/2026-09-13-vue-runtime-partition.md).
|
|
76
|
-
|
|
77
|
-
A selection such as `lib/value_test.go` becomes:
|
|
78
|
-
|
|
79
|
-
```sh
|
|
80
|
-
go test -mod=readonly -json -count=1 ./lib
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
It runs the entire package. Consumers must honor the emitted `CommandSpec.env`, preserve the build
|
|
84
|
-
context, and check fallback/command-synthesis status before execution. Commands are not portable
|
|
85
|
-
between different GOOS/GOARCH/GOFLAGS contexts. The controlled runner command policies accept `go`;
|
|
86
|
-
hosted images still need a Go installation before Go workloads can run. No deployment is performed
|
|
87
|
-
by these code changes.
|
|
88
|
-
|
|
89
|
-
Go result parsing counts failing **packages**, records failing test names, and rejects incomplete
|
|
90
|
-
JSON streams. It does not invent test-file counts from package counts, so file-based economics
|
|
91
|
-
qualification may still report an unsupported denominator for Go.
|
|
92
|
-
|
|
93
|
-
## Extension points
|
|
94
|
-
|
|
95
|
-
- `src/repo/adapters/types.ts`: adapter context and graph contribution contract.
|
|
96
|
-
- `src/repo/adapters/index.ts`: framework/language adapter registry and bounded file inventory.
|
|
97
|
-
- `src/repo/adapters/vue.ts`: Vue compiler integration.
|
|
98
|
-
- `src/repo/adapters/go.ts`: native Go package metadata and conservative dependency model.
|
|
99
|
-
- `src/repo/adapters/go-test.ts`: structured Go outcome parsing.
|
|
100
|
-
- `src/planner/test-command.ts`: runner command routing, including verified Go package targets.
|
|
101
|
-
|
|
102
|
-
Adapters contribute source and asset nodes, dependency edges, virtual JS/TS source, runnable test
|
|
103
|
-
identities and explicit blockers. Effective suite blockers persist into the profile and graph result
|
|
104
|
-
and cannot be removed by delta-specific reachability refinement. Go graphs bypass the disk cache until every cache
|
|
105
|
-
caller provides a complete toolchain/build-context identity. The cache schema was bumped to prevent
|
|
106
|
-
reuse of graphs created before adapter support.
|
|
107
|
-
|
|
108
|
-
## Validation and qualification
|
|
109
|
-
|
|
110
|
-
`tests/repo/language-adapters.test.ts` covers transitive Vue selection, unsupported-feature fallbacks,
|
|
111
|
-
Go package imports and embeds, metadata failures, command routing, and incomplete output.
|
|
112
|
-
When Go is on PATH, its native integration test runs the observer against a real Git fixture,
|
|
113
|
-
compares successful full/subset test runs, and verifies the subset catches an introduced fault.
|
|
114
|
-
Without Go, that native test is explicitly skipped.
|
|
115
|
-
|
|
116
|
-
These are implementation checks, not prospective customer safety or savings evidence. Each new
|
|
117
|
-
ecosystem still needs real repository shadow observations and economic qualification before broader
|
|
118
|
-
support or savings claims are made.
|
package/docs/mcp.md
DELETED
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
# DiffCI MCP Servers
|
|
2
|
-
|
|
3
|
-
The open-source engine is [DiffCI/core](https://github.com/DiffCI/core). Star it to support the project; watch Releases and Discussions for support and benchmark updates. [Volunteer a pilot repository](https://diffci.com/#pilot).
|
|
4
|
-
|
|
5
|
-
DiffCI provides a public Streamable HTTP endpoint for read-only validation guidance:
|
|
6
|
-
|
|
7
|
-
```text
|
|
8
|
-
https://diffci.com/mcp
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
Add that URL to clients that accept remote HTTPS MCP servers. It exposes:
|
|
12
|
-
|
|
13
|
-
- `diffci_validation_plan` for safe local command planning;
|
|
14
|
-
- `diffci_interpret_report` for validating and summarizing `diffci.observation.v1` reports;
|
|
15
|
-
- `diffci_verify_workflow_text` for a preliminary, stateless GitHub Actions isolation check;
|
|
16
|
-
- the `diffci_validate_change` prompt and agent-policy/setup resources.
|
|
17
|
-
|
|
18
|
-
The endpoint is stateless, needs no credentials, and does not execute a command. It receives no
|
|
19
|
-
repository content unless a caller explicitly supplies a report or workflow document to a tool.
|
|
20
|
-
|
|
21
|
-
Copyable Codex, Claude Code, Cursor, and VS Code setup is at https://diffci.com/mcp-server.
|
|
22
|
-
|
|
23
|
-
## MCPRush gateway analytics
|
|
24
|
-
|
|
25
|
-
MCPRush connects to `https://diffci.com/mcp/mcprush` using its `x-mcprush-token` header.
|
|
26
|
-
The site Worker validates this against the `MCPRUSH_GATEWAY_TOKEN` Cloudflare secret and
|
|
27
|
-
refuses requests when the secret or matching header is missing. Store the token using
|
|
28
|
-
`wrangler secret put MCPRUSH_GATEWAY_TOKEN --config wrangler.site.jsonc`; never commit it.
|
|
29
|
-
|
|
30
|
-
This route exposes the same three hosted guidance tools as the public endpoint. MCPRush
|
|
31
|
-
can count calls routed through its gateway; local CLI/stdio verification and direct public
|
|
32
|
-
endpoint traffic are outside those analytics. Reports or workflow text a caller explicitly
|
|
33
|
-
submits through the gateway pass through MCPRush before reaching DiffCI.
|
|
34
|
-
|
|
35
|
-
## Local Checkout Tools
|
|
36
|
-
|
|
37
|
-
DiffCI also ships a stdio MCP server. Use it when MCP tools must inspect the current checkout or run
|
|
38
|
-
tests:
|
|
39
|
-
|
|
40
|
-
Run it with:
|
|
41
|
-
|
|
42
|
-
```bash
|
|
43
|
-
npx -p "@diffci.com/diffci@latest" diffci-mcp
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
## Stdio MCP Client Config
|
|
47
|
-
|
|
48
|
-
Use this stdio configuration in clients that accept MCP JSON. Set `cwd` to the repository where the
|
|
49
|
-
agent should run DiffCI.
|
|
50
|
-
|
|
51
|
-
```json
|
|
52
|
-
{
|
|
53
|
-
"mcpServers": {
|
|
54
|
-
"diffci": {
|
|
55
|
-
"command": "npx",
|
|
56
|
-
"args": ["-p", "@diffci.com/diffci@latest", "diffci-mcp"],
|
|
57
|
-
"cwd": "/path/to/repository"
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
On Windows, keep the same command shape and use a Windows path:
|
|
64
|
-
|
|
65
|
-
```json
|
|
66
|
-
{
|
|
67
|
-
"mcpServers": {
|
|
68
|
-
"diffci": {
|
|
69
|
-
"command": "npx",
|
|
70
|
-
"args": ["-p", "@diffci.com/diffci@latest", "diffci-mcp"],
|
|
71
|
-
"cwd": "C:\\Users\\you\\path\\to\\repository"
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
For Claude Desktop, Claude Code, Cursor, Codex-style MCP clients, and other stdio-compatible agents,
|
|
78
|
-
name the server `diffci` and call the verification tool that matches the change scope before PR-ready
|
|
79
|
-
answers.
|
|
80
|
-
|
|
81
|
-
Available tools:
|
|
82
|
-
|
|
83
|
-
- `diffci_verify_changed` - verifies staged, unstaged, and non-ignored untracked changes and returns a
|
|
84
|
-
machine-readable, content-bound receipt.
|
|
85
|
-
- `diffci_verify` - verifies a clean commit range, resolving the CI range automatically or accepting
|
|
86
|
-
explicit base and head revisions.
|
|
87
|
-
- `diffci_check` - runs `diffci check`, including inferred full and selected test commands.
|
|
88
|
-
- `diffci_init` - runs `diffci init` to seed agent instruction files.
|
|
89
|
-
- `diffci_verify_workflow` - runs `diffci verify-workflow` to check non-interference.
|
|
90
|
-
|
|
91
|
-
The verification tools return the same `diffci.verification.v1` receipt as the CLI, including
|
|
92
|
-
`verification`, `safe_to_continue`, change and selection counts, fallback reasoning, the executed
|
|
93
|
-
command result, and checkout identities. The stdio MCP server delegates to the same open-source CLI
|
|
94
|
-
and sends nothing to DiffCI Cloud. Verification runs repository test commands; use the CLI's
|
|
95
|
-
`observe --no-send` for analysis only.
|
|
96
|
-
|
|
97
|
-
Keep required project CI authoritative. DiffCI output is a validation lens, not permission to skip
|
|
98
|
-
required checks.
|
|
99
|
-
|
|
100
|
-
## Directory Metadata
|
|
101
|
-
|
|
102
|
-
Discovery links:
|
|
103
|
-
|
|
104
|
-
- npm package: https://www.npmjs.com/package/@diffci.com/diffci
|
|
105
|
-
- GitHub repository: https://github.com/DiffCI/DiffCI.com
|
|
106
|
-
- Agent docs: https://diffci.com/docs/ai-agents
|
|
107
|
-
- LLM discovery file: https://diffci.com/llms.txt
|
|
108
|
-
- MCP command: `npx -p "@diffci.com/diffci@latest" diffci-mcp`
|
|
109
|
-
- HTTPS MCP endpoint: https://diffci.com/mcp
|
|
110
|
-
|
|
111
|
-
Short description:
|
|
112
|
-
|
|
113
|
-
> Fail-closed, change-aware verification for AI coding agents. DiffCI selects the minimum justified
|
|
114
|
-
> test command, broadens to full verification on uncertainty, and returns a machine-readable receipt.
|
|
115
|
-
|
|
116
|
-
See [agent-plugin.md](agent-plugin.md) for Claude Code and Codex installation.
|