@diffci.com/diffci 0.2.6 → 0.2.8
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 +1 -1
- package/README.md +322 -320
- package/action.yml +154 -154
- package/dist-client/src/client/cli.js +107 -95
- package/dist-client/src/client/usage-signal.js +18 -0
- package/dist-client/src/client/verify-savings.js +17 -0
- package/docs/adoption-metrics.md +110 -22
- package/docs/adoption-outreach.md +99 -62
- package/docs/agent-adoption-kit.md +78 -67
- package/docs/agent-adoption-targets.md +62 -62
- package/docs/ai-agents.md +102 -102
- package/docs/claude-code.md +2 -2
- package/docs/codex.md +2 -2
- package/docs/copilot.md +2 -2
- package/docs/cursor.md +2 -2
- package/docs/distribution.md +131 -131
- package/docs/grok.md +2 -2
- package/docs/language-support.md +118 -118
- package/docs/mcp.md +70 -70
- package/docs/npm-adoption.md +147 -123
- package/llms.txt +39 -39
- package/node_modules/@babel/parser/bin/babel-parser.js +0 -0
- package/node_modules/nanoid/bin/nanoid.cjs +0 -0
- package/node_modules/typescript/bin/tsc +0 -0
- package/node_modules/typescript/bin/tsserver +0 -0
- package/node_modules/yaml/bin.mjs +0 -0
- package/package.json +157 -153
- package/server.json +28 -28
- package/node_modules/@babel/parser/CHANGELOG.md +0 -1073
- package/node_modules/estree-walker/CHANGELOG.md +0 -92
package/docs/npm-adoption.md
CHANGED
|
@@ -1,135 +1,159 @@
|
|
|
1
|
-
# Promoting the DiffCI npm Package
|
|
2
|
-
|
|
3
|
-
DiffCI's npm package should be promoted as a low-risk CI observer:
|
|
4
|
-
|
|
5
|
-
> DiffCI observes your CI and reports which tests it would have selected, without skipping, cancelling,
|
|
6
|
-
> or changing any job.
|
|
7
|
-
|
|
8
|
-
## Install
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
1
|
+
# Promoting the DiffCI npm Package
|
|
2
|
+
|
|
3
|
+
DiffCI's npm package should be promoted as a low-risk CI observer:
|
|
4
|
+
|
|
5
|
+
> DiffCI observes your CI and reports which tests it would have selected, without skipping, cancelling,
|
|
6
|
+
> or changing any job.
|
|
7
|
+
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
For a pinned project dependency, run the initializer from the repository root. It detects npm, pnpm,
|
|
11
|
+
Yarn, or Bun, adds the current DiffCI version as an exact development dependency, and updates the
|
|
12
|
+
corresponding lockfile:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npx "@diffci.com/diffci@latest" init --install
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Add `--workflow` to also create the separate, non-blocking GitHub Actions observation job. Installation
|
|
19
|
+
is explicit: plain `init` never changes `package.json` or a lockfile.
|
|
20
|
+
|
|
21
|
+
Use the npm CLI when someone wants to try DiffCI locally or inside an existing CI step:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npx "@diffci.com/diffci@latest" observe
|
|
25
|
+
npx "@diffci.com/diffci@latest" verify-workflow
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Use the GitHub Action when someone wants the normal non-blocking CI installation:
|
|
29
|
+
|
|
30
|
+
```yaml
|
|
31
|
+
jobs:
|
|
32
|
+
diffci:
|
|
33
|
+
runs-on: ubuntu-latest
|
|
34
|
+
continue-on-error: true
|
|
35
|
+
permissions:
|
|
36
|
+
contents: read
|
|
37
|
+
steps:
|
|
38
|
+
- uses: actions/checkout@v4
|
|
39
|
+
with:
|
|
40
|
+
fetch-depth: 0
|
|
41
|
+
- uses: DiffCI/DiffCI.com@e852523fade14bf5e0457a6331e97c8a76eedc2b
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Outreach Copy
|
|
45
|
+
|
|
46
|
+
Short version:
|
|
47
|
+
|
|
48
|
+
> I built DiffCI as an observation-only CI dependency. It looks at a PR diff and reports which tests it
|
|
49
|
+
> would have selected, but it never skips, cancels, or changes CI. You can run it with
|
|
50
|
+
> `npx "@diffci.com/diffci@latest" observe` or as a non-blocking GitHub Action. I am looking for OSS
|
|
51
|
+
> repos willing to run it in shadow mode for a week.
|
|
52
|
+
|
|
53
|
+
Issue/PR version:
|
|
54
|
+
|
|
55
|
+
> Would you be open to running DiffCI in shadow mode for a week? It adds one non-blocking job that
|
|
56
|
+
> observes each PR/push and writes a report artifact. It does not alter required checks, skip tests,
|
|
57
|
+
> cancel jobs, or send data anywhere unless you explicitly configure an endpoint/token.
|
|
58
|
+
|
|
59
|
+
## Pilot Ask
|
|
60
|
+
|
|
61
|
+
Ask maintainers for a small, reversible experiment:
|
|
62
|
+
|
|
63
|
+
- Run one non-blocking DiffCI job for seven days.
|
|
64
|
+
- Keep all existing CI behavior unchanged.
|
|
65
|
+
- Share the report artifacts or a summary of whether DiffCI found avoidable test work.
|
|
66
|
+
- Remove the job at any time if it is noisy, slow, or unhelpful.
|
|
67
|
+
|
|
68
|
+
## Self-Serve Runtime Pilot
|
|
69
|
+
|
|
70
|
+
Use this when a maintainer asks whether selecting fewer tests would actually make their CI faster.
|
|
71
|
+
This is a paired local measurement, not a production-savings claim.
|
|
72
|
+
|
|
73
|
+
For one command that infers the full test command and prints the measured percentage when both runs
|
|
74
|
+
pass, use `npx "@diffci.com/diffci@latest" check` from the repository root. For Maven, `check` reads
|
|
75
|
+
the goal and profiles from `diffci.json` when present; otherwise it uses `mvn test` and says that
|
|
76
|
+
the default may differ from CI. Run it on the intended CI runner: timings from another machine are
|
|
77
|
+
not CI savings. A full-validation fallback runs the full command once and reports 0% reduction.
|
|
78
|
+
|
|
79
|
+
Step 1: create an observation report without sending it anywhere.
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
npx "@diffci.com/diffci@latest" observe --no-send --out ../diffci-output/diffci-observation.json
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Step 2: run the paired pilot.
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
npx "@diffci.com/diffci@latest" verify-savings \
|
|
89
|
+
--label owner/repo \
|
|
90
|
+
--repo /path/to/their/repo \
|
|
91
|
+
--full "npm test" \
|
|
92
|
+
--selected-from-report ../diffci-output/diffci-observation.json \
|
|
93
|
+
--out ../diffci-output/diffci-verify-savings.json \
|
|
94
|
+
--markdown ../diffci-output/diffci-verify-savings.md
|
|
95
|
+
```
|
|
96
|
+
|
|
86
97
|
What the report means:
|
|
87
98
|
|
|
88
99
|
Run both steps from the same repository root with the same checked-out revision. These commands
|
|
89
100
|
execute repository code. The full run can warm caches for the selected run, so repeat comparisons
|
|
90
101
|
with controlled cache state before drawing conclusions. A passing pair does not establish selection safety.
|
|
91
|
-
|
|
92
|
-
- Full runtime is measured from `--full`.
|
|
93
|
-
- Selected runtime is measured from DiffCI's proposed command in the observation report.
|
|
94
|
-
- DiffCI analysis overhead is imported from `timings.totalMs` in the observation report unless
|
|
95
|
-
`--analysis-overhead-ms` is provided.
|
|
96
|
-
- Net selected runtime is selected runtime plus analysis overhead.
|
|
97
|
-
- If the full command fails while the selected command passes, the report is a safety warning, not a
|
|
98
|
-
savings result.
|
|
102
|
+
|
|
103
|
+
- Full runtime is measured from `--full`.
|
|
104
|
+
- Selected runtime is measured from DiffCI's proposed command in the observation report.
|
|
105
|
+
- DiffCI analysis overhead is imported from `timings.totalMs` in the observation report unless
|
|
106
|
+
`--analysis-overhead-ms` is provided.
|
|
107
|
+
- Net selected runtime is selected runtime plus analysis overhead.
|
|
108
|
+
- If the full command fails while the selected command passes, the report is a safety warning, not a
|
|
109
|
+
savings result.
|
|
99
110
|
- The savings report binds the pair to the observation's base/head SHAs and SHA-256 digest, and records
|
|
100
111
|
the checked-out HEAD plus a worktree-status digest before, between, and after the two commands. A
|
|
101
112
|
missing identity, SHA mismatch, or worktree change invalidates the comparison even when both commands
|
|
102
113
|
pass.
|
|
103
114
|
|
|
104
|
-
|
|
105
|
-
manually:
|
|
106
|
-
|
|
107
|
-
```bash
|
|
108
|
-
npx @diffci.com/diffci@latest verify-savings \
|
|
109
|
-
--label owner/repo \
|
|
110
|
-
--repo /path/to/their/repo \
|
|
111
|
-
--full "pnpm test" \
|
|
112
|
-
--selected "pnpm test packages/a/src/a.test.ts packages/b/src/b.test.ts" \
|
|
113
|
-
--analysis-overhead-ms 1200 \
|
|
114
|
-
--out ./diffci-verify-savings.json \
|
|
115
|
-
--markdown ./diffci-verify-savings.md
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
Common command shapes:
|
|
115
|
+
Before sharing a Markdown report with a maintainer, check that it answers these review questions:
|
|
119
116
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
117
|
+
- Which exact repository, base SHA, head SHA, DiffCI version, full command, and selected command were
|
|
118
|
+
measured?
|
|
119
|
+
- Did the selected command cover the complete DiffCI selection, or was an explicit command override
|
|
120
|
+
required?
|
|
121
|
+
- Were cache conditions controlled or repeated, and if not, is the report labelled as one preliminary
|
|
122
|
+
paired run?
|
|
123
|
+
- Did both commands pass, did checkout provenance stay stable, and are invalid runs clearly labelled
|
|
124
|
+
diagnostic only?
|
|
125
|
+
- What should the maintainer do next: inspect a fallback/refusal, repeat with controlled cache state,
|
|
126
|
+
run a seven-day observation job, or ignore the result because the repository is unsupported?
|
|
128
127
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
128
|
+
If the proposed command needs adjustment for the repository's runner, pass the selected command
|
|
129
|
+
manually:
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
npx "@diffci.com/diffci@latest" verify-savings \
|
|
133
|
+
--label owner/repo \
|
|
134
|
+
--repo /path/to/their/repo \
|
|
135
|
+
--full "pnpm test" \
|
|
136
|
+
--selected "pnpm test packages/a/src/a.test.ts packages/b/src/b.test.ts" \
|
|
137
|
+
--analysis-overhead-ms 1200 \
|
|
138
|
+
--out ./diffci-verify-savings.json \
|
|
139
|
+
--markdown ./diffci-verify-savings.md
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Common command shapes:
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
--full "npm test"
|
|
146
|
+
--full "pnpm test"
|
|
147
|
+
--full "yarn test"
|
|
148
|
+
--selected "npx vitest run path/to/file.test.ts"
|
|
149
|
+
--selected "npx jest path/to/file.test.ts"
|
|
150
|
+
--selected "node --test path/to/file.test.mjs"
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## Trust Points
|
|
154
|
+
|
|
155
|
+
- Published as `@diffci.com/diffci` on npm.
|
|
156
|
+
- Stable `latest` release is signed with npm provenance.
|
|
157
|
+
- The package boundary is checked by `npm run check:oss-boundary`.
|
|
158
|
+
- The default observer writes a local report and sends nothing without both `DIFFCI_API_URL` and
|
|
159
|
+
`DIFFCI_TOKEN`.
|
package/llms.txt
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
# DiffCI
|
|
2
|
-
|
|
3
|
-
DiffCI is an observation-only, change-aware CI analysis tool for AI coding agents and development teams.
|
|
4
|
-
|
|
5
|
-
Default AI-agent command:
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npx @diffci.com/diffci@latest check
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
Initialization command:
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
npx @diffci.com/diffci@latest init
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
What agents should know:
|
|
18
|
-
|
|
19
|
-
- `diffci check` analyzes the repository checkout and writes a JSON observation report.
|
|
20
|
-
- It runs no tests, skips no tests, cancels no jobs, and changes no CI behavior.
|
|
21
|
-
- It sends no report unless `DIFFCI_API_URL` and `DIFFCI_TOKEN` are explicitly configured.
|
|
22
|
-
- Treat selected commands as evidence about the change, not as permission to skip required project CI.
|
|
23
|
-
- If DiffCI reports `REFUSED` or `ERROR`, fall back to the repository's normal validation commands.
|
|
24
|
-
|
|
25
|
-
Useful docs:
|
|
26
|
-
|
|
27
|
-
- AI agents: https://diffci.com/docs/ai-agents.html
|
|
28
|
-
- Codex: https://diffci.com/docs/codex.html
|
|
29
|
-
- Claude Code: https://diffci.com/docs/claude-code.html
|
|
30
|
-
- Cursor: https://diffci.com/docs/cursor.html
|
|
31
|
-
- GitHub Copilot: https://diffci.com/docs/copilot.html
|
|
32
|
-
- Grok: https://diffci.com/docs/grok.html
|
|
33
|
-
- Adoption kit: https://github.com/DiffCI/DiffCI.com/blob/main/docs/agent-adoption-kit.md
|
|
34
|
-
- Adoption outreach: https://github.com/DiffCI/DiffCI.com/blob/main/docs/adoption-outreach.md
|
|
35
|
-
- Adoption metrics: https://github.com/DiffCI/DiffCI.com/blob/main/docs/adoption-metrics.md
|
|
36
|
-
- Adoption targets: https://github.com/DiffCI/DiffCI.com/blob/main/docs/agent-adoption-targets.md
|
|
37
|
-
- MCP server: https://github.com/DiffCI/DiffCI.com/blob/main/docs/mcp.md
|
|
38
|
-
- Distribution: https://github.com/DiffCI/DiffCI.com/blob/main/docs/distribution.md
|
|
39
|
-
- Language support: https://github.com/DiffCI/DiffCI.com/blob/main/docs/language-support.md
|
|
1
|
+
# DiffCI
|
|
2
|
+
|
|
3
|
+
DiffCI is an observation-only, change-aware CI analysis tool for AI coding agents and development teams.
|
|
4
|
+
|
|
5
|
+
Default AI-agent command:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npx "@diffci.com/diffci@latest" check
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Initialization command:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npx "@diffci.com/diffci@latest" init
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
What agents should know:
|
|
18
|
+
|
|
19
|
+
- `diffci check` analyzes the repository checkout and writes a JSON observation report.
|
|
20
|
+
- It runs no tests, skips no tests, cancels no jobs, and changes no CI behavior.
|
|
21
|
+
- It sends no report unless `DIFFCI_API_URL` and `DIFFCI_TOKEN` are explicitly configured.
|
|
22
|
+
- Treat selected commands as evidence about the change, not as permission to skip required project CI.
|
|
23
|
+
- If DiffCI reports `REFUSED` or `ERROR`, fall back to the repository's normal validation commands.
|
|
24
|
+
|
|
25
|
+
Useful docs:
|
|
26
|
+
|
|
27
|
+
- AI agents: https://diffci.com/docs/ai-agents.html
|
|
28
|
+
- Codex: https://diffci.com/docs/codex.html
|
|
29
|
+
- Claude Code: https://diffci.com/docs/claude-code.html
|
|
30
|
+
- Cursor: https://diffci.com/docs/cursor.html
|
|
31
|
+
- GitHub Copilot: https://diffci.com/docs/copilot.html
|
|
32
|
+
- Grok: https://diffci.com/docs/grok.html
|
|
33
|
+
- Adoption kit: https://github.com/DiffCI/DiffCI.com/blob/main/docs/agent-adoption-kit.md
|
|
34
|
+
- Adoption outreach: https://github.com/DiffCI/DiffCI.com/blob/main/docs/adoption-outreach.md
|
|
35
|
+
- Adoption metrics: https://github.com/DiffCI/DiffCI.com/blob/main/docs/adoption-metrics.md
|
|
36
|
+
- Adoption targets: https://github.com/DiffCI/DiffCI.com/blob/main/docs/agent-adoption-targets.md
|
|
37
|
+
- MCP server: https://github.com/DiffCI/DiffCI.com/blob/main/docs/mcp.md
|
|
38
|
+
- Distribution: https://github.com/DiffCI/DiffCI.com/blob/main/docs/distribution.md
|
|
39
|
+
- Language support: https://github.com/DiffCI/DiffCI.com/blob/main/docs/language-support.md
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|