@diffci.com/diffci 0.2.7 → 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.
@@ -1,146 +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
- 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
-
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
+
97
97
  What the report means:
98
98
 
99
99
  Run both steps from the same repository root with the same checked-out revision. These commands
100
100
  execute repository code. The full run can warm caches for the selected run, so repeat comparisons
101
101
  with controlled cache state before drawing conclusions. A passing pair does not establish selection safety.
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.
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.
110
110
  - The savings report binds the pair to the observation's base/head SHAs and SHA-256 digest, and records
111
111
  the checked-out HEAD plus a worktree-status digest before, between, and after the two commands. A
112
112
  missing identity, SHA mismatch, or worktree change invalidates the comparison even when both commands
113
113
  pass.
114
114
 
115
- If the proposed command needs adjustment for the repository's runner, pass the selected command
116
- manually:
117
-
118
- ```bash
119
- npx @diffci.com/diffci@latest verify-savings \
120
- --label owner/repo \
121
- --repo /path/to/their/repo \
122
- --full "pnpm test" \
123
- --selected "pnpm test packages/a/src/a.test.ts packages/b/src/b.test.ts" \
124
- --analysis-overhead-ms 1200 \
125
- --out ./diffci-verify-savings.json \
126
- --markdown ./diffci-verify-savings.md
127
- ```
115
+ Before sharing a Markdown report with a maintainer, check that it answers these review questions:
128
116
 
129
- Common command shapes:
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?
130
127
 
131
- ```bash
132
- --full "npm test"
133
- --full "pnpm test"
134
- --full "yarn test"
135
- --selected "npx vitest run path/to/file.test.ts"
136
- --selected "npx jest path/to/file.test.ts"
137
- --selected "node --test path/to/file.test.mjs"
138
- ```
139
-
140
- ## Trust Points
141
-
142
- - Published as `@diffci.com/diffci` on npm.
143
- - Stable `latest` release is signed with npm provenance.
144
- - The package boundary is checked by `npm run check:oss-boundary`.
145
- - The default observer writes a local report and sends nothing without both `DIFFCI_API_URL` and
146
- `DIFFCI_TOKEN`.
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