@diffci.com/diffci 0.2.8 → 0.2.9

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/action.yml CHANGED
@@ -1,155 +1,155 @@
1
- # DiffCI observer - the GitHub Action a third-party repository installs (Phase 02, 2026-08-26).
2
- #
3
- # WHAT THIS DOES: analyses one commit range against the checkout the job already has, writes a JSON
4
- # report to the runner's temp directory, prints a summary to the job log and the job summary, optionally
5
- # uploads the report as an artifact, and - only when `api-url` and `api-token` are both set - sends that
6
- # same report to DiffCI. With no token configured nothing leaves the runner at all.
7
- #
8
- # WHAT THIS DOES NOT DO, and cannot: run tests, skip tests, cancel a job, re-order steps, write to the
9
- # repository, comment on a pull request, or set a check status. There is no input below that turns any
10
- # of that on, because the claim being tested for seven days is that installing DiffCI leaves CI
11
- # byte-identical, and a flag that could change what CI runs would eventually be set by accident.
12
- #
13
- # INSTALL IT AS ITS OWN JOB. A job of its own is what makes the claim structural rather than careful:
14
- #
15
- # jobs:
16
- # diffci:
17
- # runs-on: ubuntu-latest
18
- # continue-on-error: true # a DiffCI failure must not become the workflow's conclusion
19
- # permissions:
20
- # contents: read
21
- # steps:
22
- # - uses: actions/checkout@v4
23
- # with:
24
- # fetch-depth: 0 # the base commit must exist locally, or DiffCI refuses
1
+ # DiffCI observer - the GitHub Action a third-party repository installs (Phase 02, 2026-08-26).
2
+ #
3
+ # WHAT THIS DOES: analyses one commit range against the checkout the job already has, writes a JSON
4
+ # report to the runner's temp directory, prints a summary to the job log and the job summary, optionally
5
+ # uploads the report as an artifact, and - only when `api-url` and `api-token` are both set - sends that
6
+ # same report to DiffCI. With no token configured nothing leaves the runner at all.
7
+ #
8
+ # WHAT THIS DOES NOT DO, and cannot: run tests, skip tests, cancel a job, re-order steps, write to the
9
+ # repository, comment on a pull request, or set a check status. There is no input below that turns any
10
+ # of that on, because the claim being tested for seven days is that installing DiffCI leaves CI
11
+ # byte-identical, and a flag that could change what CI runs would eventually be set by accident.
12
+ #
13
+ # INSTALL IT AS ITS OWN JOB. A job of its own is what makes the claim structural rather than careful:
14
+ #
15
+ # jobs:
16
+ # diffci:
17
+ # runs-on: ubuntu-latest
18
+ # continue-on-error: true # a DiffCI failure must not become the workflow's conclusion
19
+ # permissions:
20
+ # contents: read
21
+ # steps:
22
+ # - uses: actions/checkout@v4
23
+ # with:
24
+ # fetch-depth: 0 # the base commit must exist locally, or DiffCI refuses
25
25
  # - uses: DiffCI/DiffCI.com@<40-character commit sha>
26
- #
27
- # `diffci verify-workflow` checks those properties against your own workflow files and exits non-zero
28
- # if any of them does not hold. Run it before the observation window starts.
29
- name: DiffCI observer
30
- description: Observation-only change-aware CI analysis. Runs nothing, changes nothing, skips nothing.
31
- branding:
32
- icon: eye
33
- color: gray-dark
34
-
35
- inputs:
36
- repository-path:
37
- description: The checkout to observe. Defaults to the workspace.
38
- required: false
39
- default: ${{ github.workspace }}
40
- base-sha:
41
- description: Base commit. Leave empty to derive it from the event (pull request base, push before).
42
- required: false
43
- default: ""
44
- head-sha:
45
- description: Head commit. Must be given together with base-sha.
46
- required: false
47
- default: ""
48
- node-version:
49
- description: Node version used to run the observer. Only affects this job.
50
- required: false
51
- default: "22"
52
- report-path:
53
- description: Where to write the report. Must be outside the checkout. Defaults to RUNNER_TEMP.
54
- required: false
55
- default: ""
56
- redact-paths:
57
- description: Replace every file path in the report with a stable 12-character digest.
58
- required: false
59
- default: "false"
60
- upload-artifact:
61
- description: Upload the report as a workflow artifact.
62
- required: false
63
- default: "true"
64
- artifact-name:
65
- description: Name of the uploaded artifact.
66
- required: false
67
- default: diffci-observation
68
- artifact-retention-days:
69
- description: Retention for the uploaded artifact.
70
- required: false
71
- default: "7"
72
- api-url:
73
- description: >-
74
- DiffCI ingest endpoint. Leave empty and nothing is sent anywhere - the report stays on the runner
75
- as an artifact. Must be https.
76
- required: false
77
- default: ""
78
- api-token:
79
- description: >-
80
- Ingest token for THIS repository, from a repository secret. Pass it as the workflow expression
81
- for secrets.DIFFCI_TOKEN, never as a literal. Nothing is sent without it. (This text deliberately
82
- does not spell out the expression: GitHub evaluates expressions inside action metadata, and
83
- "secrets" is not a context an action file may use - a literal expression here made the whole
84
- action fail to load on every run until 2026-09-06.)
85
- required: false
86
- default: ""
87
- fail-on-error:
88
- description: >-
89
- Fail this step when the observation refuses or errors. Default false, so a DiffCI problem never
90
- shows up as a red step in your CI. Turn it on only while debugging an installation.
91
- required: false
92
- default: "false"
93
-
94
- outputs:
95
- report-path:
96
- description: Absolute path of the written report.
97
- value: ${{ steps.observe.outputs.report-path }}
98
- status:
99
- description: OBSERVED, REFUSED, or ERROR.
100
- value: ${{ steps.observe.outputs.status }}
101
-
102
- runs:
103
- using: composite
104
- steps:
105
- - name: Set up Node for the observer
106
- uses: actions/setup-node@v4
107
- with:
108
- node-version: ${{ inputs.node-version }}
109
-
110
- # Installed into the action's own directory, never into the observed repository: nothing here
111
- # touches the workspace, its node_modules, or its lockfile. --omit=dev keeps this to TypeScript and
112
- # a YAML parser; --ignore-scripts means no dependency of DiffCI's runs code on your runner.
113
- - name: Install observer dependencies
114
- shell: bash
115
- working-directory: ${{ github.action_path }}
116
- run: npm ci --omit=dev --no-audit --fund=false --ignore-scripts
117
-
118
- - name: Build observer
119
- shell: bash
120
- working-directory: ${{ github.action_path }}
121
- run: node_modules/.bin/tsc -p tsconfig.client.json
122
-
123
- - name: Observe
124
- id: observe
125
- shell: bash
126
- env:
127
- DIFFCI_REPO: ${{ inputs.repository-path }}
128
- DIFFCI_BASE: ${{ inputs.base-sha }}
129
- DIFFCI_HEAD: ${{ inputs.head-sha }}
130
- DIFFCI_OUT: ${{ inputs.report-path }}
131
- DIFFCI_REDACT: ${{ inputs.redact-paths }}
132
- DIFFCI_FAIL_ON_ERROR: ${{ inputs.fail-on-error }}
133
- # Passed through the environment, never on the command line: an argv is visible to every other
134
- # process on the runner and shows up in traces. The observer reads these directly and never
135
- # prints them.
136
- DIFFCI_API_URL: ${{ inputs.api-url }}
137
- DIFFCI_TOKEN: ${{ inputs.api-token }}
138
- run: |
139
- set -euo pipefail
140
- args=(observe --repo "$DIFFCI_REPO")
141
- if [ -n "$DIFFCI_BASE" ]; then args+=(--base "$DIFFCI_BASE"); fi
142
- if [ -n "$DIFFCI_HEAD" ]; then args+=(--head "$DIFFCI_HEAD"); fi
143
- if [ -n "$DIFFCI_OUT" ]; then args+=(--out "$DIFFCI_OUT"); fi
144
- if [ "$DIFFCI_REDACT" = "true" ]; then args+=(--redact-paths); fi
145
- if [ "$DIFFCI_FAIL_ON_ERROR" = "true" ]; then args+=(--fail-on-error); fi
146
- node "$GITHUB_ACTION_PATH/dist-client/src/client/cli.js" "${args[@]}"
147
-
148
- - name: Upload observation report
149
- if: ${{ inputs.upload-artifact == 'true' && steps.observe.outputs.report-path != '' }}
150
- uses: actions/upload-artifact@v4
151
- with:
152
- name: ${{ inputs.artifact-name }}
153
- path: ${{ steps.observe.outputs.report-path }}
154
- retention-days: ${{ inputs.artifact-retention-days }}
155
- if-no-files-found: warn
26
+ #
27
+ # `diffci verify-workflow` checks those properties against your own workflow files and exits non-zero
28
+ # if any of them does not hold. Run it before the observation window starts.
29
+ name: DiffCI observer
30
+ description: Observation-only change-aware CI analysis. Runs nothing, changes nothing, skips nothing.
31
+ branding:
32
+ icon: eye
33
+ color: gray-dark
34
+
35
+ inputs:
36
+ repository-path:
37
+ description: The checkout to observe. Defaults to the workspace.
38
+ required: false
39
+ default: ${{ github.workspace }}
40
+ base-sha:
41
+ description: Base commit. Leave empty to derive it from the event (pull request base, push before).
42
+ required: false
43
+ default: ""
44
+ head-sha:
45
+ description: Head commit. Must be given together with base-sha.
46
+ required: false
47
+ default: ""
48
+ node-version:
49
+ description: Node version used to run the observer. Only affects this job.
50
+ required: false
51
+ default: "22"
52
+ report-path:
53
+ description: Where to write the report. Must be outside the checkout. Defaults to RUNNER_TEMP.
54
+ required: false
55
+ default: ""
56
+ redact-paths:
57
+ description: Replace every file path in the report with a stable 12-character digest.
58
+ required: false
59
+ default: "false"
60
+ upload-artifact:
61
+ description: Upload the report as a workflow artifact.
62
+ required: false
63
+ default: "true"
64
+ artifact-name:
65
+ description: Name of the uploaded artifact.
66
+ required: false
67
+ default: diffci-observation
68
+ artifact-retention-days:
69
+ description: Retention for the uploaded artifact.
70
+ required: false
71
+ default: "7"
72
+ api-url:
73
+ description: >-
74
+ DiffCI ingest endpoint. Leave empty and nothing is sent anywhere - the report stays on the runner
75
+ as an artifact. Must be https.
76
+ required: false
77
+ default: ""
78
+ api-token:
79
+ description: >-
80
+ Ingest token for THIS repository, from a repository secret. Pass it as the workflow expression
81
+ for secrets.DIFFCI_TOKEN, never as a literal. Nothing is sent without it. (This text deliberately
82
+ does not spell out the expression: GitHub evaluates expressions inside action metadata, and
83
+ "secrets" is not a context an action file may use - a literal expression here made the whole
84
+ action fail to load on every run until 2026-09-06.)
85
+ required: false
86
+ default: ""
87
+ fail-on-error:
88
+ description: >-
89
+ Fail this step when the observation refuses or errors. Default false, so a DiffCI problem never
90
+ shows up as a red step in your CI. Turn it on only while debugging an installation.
91
+ required: false
92
+ default: "false"
93
+
94
+ outputs:
95
+ report-path:
96
+ description: Absolute path of the written report.
97
+ value: ${{ steps.observe.outputs.report-path }}
98
+ status:
99
+ description: OBSERVED, REFUSED, or ERROR.
100
+ value: ${{ steps.observe.outputs.status }}
101
+
102
+ runs:
103
+ using: composite
104
+ steps:
105
+ - name: Set up Node for the observer
106
+ uses: actions/setup-node@v4
107
+ with:
108
+ node-version: ${{ inputs.node-version }}
109
+
110
+ # Installed into the action's own directory, never into the observed repository: nothing here
111
+ # touches the workspace, its node_modules, or its lockfile. --omit=dev keeps this to TypeScript and
112
+ # a YAML parser; --ignore-scripts means no dependency of DiffCI's runs code on your runner.
113
+ - name: Install observer dependencies
114
+ shell: bash
115
+ working-directory: ${{ github.action_path }}
116
+ run: npm ci --omit=dev --no-audit --fund=false --ignore-scripts
117
+
118
+ - name: Build observer
119
+ shell: bash
120
+ working-directory: ${{ github.action_path }}
121
+ run: node_modules/.bin/tsc -p tsconfig.client.json
122
+
123
+ - name: Observe
124
+ id: observe
125
+ shell: bash
126
+ env:
127
+ DIFFCI_REPO: ${{ inputs.repository-path }}
128
+ DIFFCI_BASE: ${{ inputs.base-sha }}
129
+ DIFFCI_HEAD: ${{ inputs.head-sha }}
130
+ DIFFCI_OUT: ${{ inputs.report-path }}
131
+ DIFFCI_REDACT: ${{ inputs.redact-paths }}
132
+ DIFFCI_FAIL_ON_ERROR: ${{ inputs.fail-on-error }}
133
+ # Passed through the environment, never on the command line: an argv is visible to every other
134
+ # process on the runner and shows up in traces. The observer reads these directly and never
135
+ # prints them.
136
+ DIFFCI_API_URL: ${{ inputs.api-url }}
137
+ DIFFCI_TOKEN: ${{ inputs.api-token }}
138
+ run: |
139
+ set -euo pipefail
140
+ args=(observe --repo "$DIFFCI_REPO")
141
+ if [ -n "$DIFFCI_BASE" ]; then args+=(--base "$DIFFCI_BASE"); fi
142
+ if [ -n "$DIFFCI_HEAD" ]; then args+=(--head "$DIFFCI_HEAD"); fi
143
+ if [ -n "$DIFFCI_OUT" ]; then args+=(--out "$DIFFCI_OUT"); fi
144
+ if [ "$DIFFCI_REDACT" = "true" ]; then args+=(--redact-paths); fi
145
+ if [ "$DIFFCI_FAIL_ON_ERROR" = "true" ]; then args+=(--fail-on-error); fi
146
+ node "$GITHUB_ACTION_PATH/dist-client/src/client/cli.js" "${args[@]}"
147
+
148
+ - name: Upload observation report
149
+ if: ${{ inputs.upload-artifact == 'true' && steps.observe.outputs.report-path != '' }}
150
+ uses: actions/upload-artifact@v4
151
+ with:
152
+ name: ${{ inputs.artifact-name }}
153
+ path: ${{ steps.observe.outputs.report-path }}
154
+ retention-days: ${{ inputs.artifact-retention-days }}
155
+ if-no-files-found: warn
@@ -104,75 +104,75 @@ function defaultReportPath(env) {
104
104
  // Quoting the scoped package keeps the same command valid in POSIX shells, cmd.exe, and
105
105
  // PowerShell, where an unquoted leading `@` is parsed as the splatting operator.
106
106
  const AGENT_DEFAULT_COMMAND = 'npx "@diffci.com/diffci@latest" check';
107
- const AGENT_INSTRUCTIONS = `# DiffCI Agent Instructions
108
-
109
- Use DiffCI as the default CI/CD validation lens before proposing, committing, or opening pull requests.
110
-
111
- Default command:
112
-
113
- \`\`\`bash
107
+ const AGENT_INSTRUCTIONS = `# DiffCI Agent Instructions
108
+
109
+ Use DiffCI as the default CI/CD validation lens before proposing, committing, or opening pull requests.
110
+
111
+ Default command:
112
+
113
+ \`\`\`bash
114
114
  ${AGENT_DEFAULT_COMMAND}
115
- \`\`\`
116
-
117
- What this does:
118
-
119
- - analyzes the current checkout and commit range;
120
- - runs the repository's inferred full test command and DiffCI's selected command when safe to compare;
121
- - prints measured paired runtime when both commands pass;
122
- - writes reports outside the repository and sends nothing;
123
- - does not skip, cancel, or reorder required CI tests.
124
-
125
- Test commands may write generated files to the checkout. Use \`observe --no-send\` when analysis
126
- without test execution is needed.
127
-
128
- If DiffCI reports \`REFUSED\` or \`ERROR\`, treat that as an installation or analysis issue and continue with the repository's normal test commands. If DiffCI reports a selected command, prefer using it as evidence for what changed, not as permission to skip required CI.
115
+ \`\`\`
116
+
117
+ What this does:
118
+
119
+ - analyzes the current checkout and commit range;
120
+ - runs the repository's inferred full test command and DiffCI's selected command when safe to compare;
121
+ - prints measured paired runtime when both commands pass;
122
+ - writes reports outside the repository and sends nothing;
123
+ - does not skip, cancel, or reorder required CI tests.
124
+
125
+ Test commands may write generated files to the checkout. Use \`observe --no-send\` when analysis
126
+ without test execution is needed.
127
+
128
+ If DiffCI reports \`REFUSED\` or \`ERROR\`, treat that as an installation or analysis issue and continue with the repository's normal test commands. If DiffCI reports a selected command, prefer using it as evidence for what changed, not as permission to skip required CI.
129
129
  `;
130
- const CURSOR_RULE = `---
131
- description: Use DiffCI as the default CI/CD validation lens
132
- alwaysApply: true
133
- ---
134
-
135
- Before proposing, committing, or opening pull requests, run:
136
-
137
- \`\`\`bash
130
+ const CURSOR_RULE = `---
131
+ description: Use DiffCI as the default CI/CD validation lens
132
+ alwaysApply: true
133
+ ---
134
+
135
+ Before proposing, committing, or opening pull requests, run:
136
+
137
+ \`\`\`bash
138
138
  ${AGENT_DEFAULT_COMMAND}
139
- \`\`\`
140
-
141
- DiffCI check analyzes the change and runs full and selected test commands when it can infer them. It sends nothing. Test commands may write generated files. Use observe --no-send for analysis without execution. Required project CI remains authoritative.
139
+ \`\`\`
140
+
141
+ DiffCI check analyzes the change and runs full and selected test commands when it can infer them. It sends nothing. Test commands may write generated files. Use observe --no-send for analysis without execution. Required project CI remains authoritative.
142
142
  `;
143
- const GITHUB_COPILOT_INSTRUCTIONS = `# Repository CI/CD Validation
144
-
145
- Use DiffCI as the default change-aware CI/CD validation lens:
146
-
147
- \`\`\`bash
143
+ const GITHUB_COPILOT_INSTRUCTIONS = `# Repository CI/CD Validation
144
+
145
+ Use DiffCI as the default change-aware CI/CD validation lens:
146
+
147
+ \`\`\`bash
148
148
  ${AGENT_DEFAULT_COMMAND}
149
- \`\`\`
150
-
151
- DiffCI check analyzes the change and runs inferred full and selected test commands to measure a paired runtime. It sends nothing; required repository checks remain authoritative.
149
+ \`\`\`
150
+
151
+ DiffCI check analyzes the change and runs inferred full and selected test commands to measure a paired runtime. It sends nothing; required repository checks remain authoritative.
152
152
  `;
153
153
  const DIFFCI_CONFIG = `{
154
154
  "$schema": "https://diffci.com/schemas/diffci.config.schema.json",
155
155
  "agentDefaultCommand": ${JSON.stringify(AGENT_DEFAULT_COMMAND)},
156
- "mode": "check",
157
- "sendReports": false
158
- }
156
+ "mode": "check",
157
+ "sendReports": false
158
+ }
159
159
  `;
160
160
  function diffciWorkflow(version) {
161
- return `name: DiffCI observation
162
- on: [push, pull_request]
163
- permissions:
164
- contents: read
165
- jobs:
166
- diffci:
167
- runs-on: ubuntu-latest
168
- continue-on-error: true
169
- steps:
170
- - uses: actions/checkout@v4
171
- with:
172
- fetch-depth: 0
173
- - uses: actions/setup-node@v4
174
- with:
175
- node-version: 22
161
+ return `name: DiffCI observation
162
+ on: [push, pull_request]
163
+ permissions:
164
+ contents: read
165
+ jobs:
166
+ diffci:
167
+ runs-on: ubuntu-latest
168
+ continue-on-error: true
169
+ steps:
170
+ - uses: actions/checkout@v4
171
+ with:
172
+ fetch-depth: 0
173
+ - uses: actions/setup-node@v4
174
+ with:
175
+ node-version: 22
176
176
  - run: npx "@diffci.com/diffci@${version}" observe --no-send
177
177
  `;
178
178
  }
@@ -616,39 +616,39 @@ async function runPilot(flags, env) {
616
616
  console.log(` markdown: ${markdownPath}`);
617
617
  return savings.comparison.evidenceValid ? 0 : 1;
618
618
  }
619
- const USAGE = `diffci - change-aware CI analysis and paired timing
620
-
621
- Usage:
622
- diffci init [--repo <path>] [--workflow] [--install] [--force]
623
- diffci mcp
624
- diffci check [--repo <path>] [--out <file>] [--base <sha> --head <sha>]
625
- [--redact-paths] [--json] [--quiet] [--fail-on-error] [--timeout-ms <ms>] [--share-usage]
626
- diffci pilot --full <command> [--repo <path>] [--out-dir <dir>] [--label <name>]
627
- diffci observe [--repo <path>] [--out <file>] [--base <sha> --head <sha>]
628
- [--redact-paths] [--json] [--quiet] [--fail-on-error]
629
- [--api-url <url> --api-token <token>] [--no-send] [--share-usage]
630
- diffci verify-savings --repo <path> --full <command>
631
- (--selected <command> | --selected-from-report <file>)
632
- --out <file> [--markdown <file>] [--label <name>]
633
- diffci verify-workflow [--repo <path>]
634
- diffci version
635
-
636
- init writes AGENTS.md, CLAUDE.md, Cursor rules, Copilot instructions, and diffci.config.json.
637
- --workflow adds a separate non-blocking observation workflow. --install detects npm, pnpm, Yarn,
638
- or Bun, installs this DiffCI version as an exact dev dependency, updates the manager's lockfile,
639
- and adds diffci:check and diffci:observe package scripts without replacing existing scripts.
640
- mcp runs the stdio MCP server for native agent integrations.
641
- check analyzes the change, runs inferred full and selected commands, and shows measured savings.
642
- pilot runs observe and verify-savings together, writing reports to ../diffci-output by default.
643
- observe analyses the checkout and writes one JSON report. It runs nothing and changes nothing.
644
- verify-savings runs both commands and reports measured paired runtime; it is an opt-in pilot command.
645
- verify-workflow checks that the job running DiffCI cannot affect any other job, and exits 1 if it can.
646
-
647
- The report is sent only when both --api-url and --api-token are given (or DIFFCI_API_URL and
648
- DIFFCI_TOKEN are set). A failed send is reported and never fails the step - the report is on disk
649
- either way. Plain http is refused; the token is never printed.
650
- --share-usage (or DIFFCI_SHARE_USAGE=1) sends only command, outcome, and version to DiffCI.
651
- No repository, commit, test, report, or persistent identifier is sent. --no-send disables it.
619
+ const USAGE = `diffci - change-aware CI analysis and paired timing
620
+
621
+ Usage:
622
+ diffci init [--repo <path>] [--workflow] [--install] [--force]
623
+ diffci mcp
624
+ diffci check [--repo <path>] [--out <file>] [--base <sha> --head <sha>]
625
+ [--redact-paths] [--json] [--quiet] [--fail-on-error] [--timeout-ms <ms>] [--share-usage]
626
+ diffci pilot --full <command> [--repo <path>] [--out-dir <dir>] [--label <name>]
627
+ diffci observe [--repo <path>] [--out <file>] [--base <sha> --head <sha>]
628
+ [--redact-paths] [--json] [--quiet] [--fail-on-error]
629
+ [--api-url <url> --api-token <token>] [--no-send] [--share-usage]
630
+ diffci verify-savings --repo <path> --full <command>
631
+ (--selected <command> | --selected-from-report <file>)
632
+ --out <file> [--markdown <file>] [--label <name>]
633
+ diffci verify-workflow [--repo <path>]
634
+ diffci version
635
+
636
+ init writes AGENTS.md, CLAUDE.md, Cursor rules, Copilot instructions, and diffci.config.json.
637
+ --workflow adds a separate non-blocking observation workflow. --install detects npm, pnpm, Yarn,
638
+ or Bun, installs this DiffCI version as an exact dev dependency, updates the manager's lockfile,
639
+ and adds diffci:check and diffci:observe package scripts without replacing existing scripts.
640
+ mcp runs the stdio MCP server for native agent integrations.
641
+ check analyzes the change, runs inferred full and selected commands, and shows measured savings.
642
+ pilot runs observe and verify-savings together, writing reports to ../diffci-output by default.
643
+ observe analyses the checkout and writes one JSON report. It runs nothing and changes nothing.
644
+ verify-savings runs both commands and reports measured paired runtime; it is an opt-in pilot command.
645
+ verify-workflow checks that the job running DiffCI cannot affect any other job, and exits 1 if it can.
646
+
647
+ The report is sent only when both --api-url and --api-token are given (or DIFFCI_API_URL and
648
+ DIFFCI_TOKEN are set). A failed send is reported and never fails the step - the report is on disk
649
+ either way. Plain http is refused; the token is never printed.
650
+ --share-usage (or DIFFCI_SHARE_USAGE=1) sends only command, outcome, and version to DiffCI.
651
+ No repository, commit, test, report, or persistent identifier is sent. --no-send disables it.
652
652
  `;
653
653
  async function main() {
654
654
  const { command, flags } = parseArgs(process.argv);
File without changes
@@ -24,39 +24,39 @@ Route maintainers who have already run it to the
24
24
  [`Share a first DiffCI report`](../.github/ISSUE_TEMPLATE/first-diffci-report.yml) issue template.
25
25
 
26
26
  ## Opt-in CLI usage
27
-
28
- Users can run `diffci check --share-usage` or set `DIFFCI_SHARE_USAGE=1` for `check` and
29
- `observe`. `--no-send` overrides the opt-in. The CLI sends one HTTPS event after analysis to
30
- `https://app.diffci.com/v1/usage-events` with only the command (`check` or `observe`), analysis
31
- outcome (`observed`, `refused`, or `error`), and package version. It sends no repository identity,
32
- paths, commits, test names, report, token, or stable installation identifier. Delivery failure is
33
- best effort and cannot fail validation. The product Worker records `cli_usage_opt_in` in PostHog
34
- when its existing `POSTHOG_API_KEY` is configured.
35
-
36
- Count these events as **opted-in executions**, not unique users or repositories. Report the opt-in
37
- count separately from npm downloads and external merged integrations. Because there is no stable
38
- identifier, repeated runs by one user cannot be deduplicated. Network providers may still observe
39
- connection metadata such as IP address.
40
-
27
+
28
+ Users can run `diffci check --share-usage` or set `DIFFCI_SHARE_USAGE=1` for `check` and
29
+ `observe`. `--no-send` overrides the opt-in. The CLI sends one HTTPS event after analysis to
30
+ `https://app.diffci.com/v1/usage-events` with only the command (`check` or `observe`), analysis
31
+ outcome (`observed`, `refused`, or `error`), and package version. It sends no repository identity,
32
+ paths, commits, test names, report, token, or stable installation identifier. Delivery failure is
33
+ best effort and cannot fail validation. The product Worker records `cli_usage_opt_in` in PostHog
34
+ when its existing `POSTHOG_API_KEY` is configured.
35
+
36
+ Count these events as **opted-in executions**, not unique users or repositories. Report the opt-in
37
+ count separately from npm downloads and external merged integrations. Because there is no stable
38
+ identifier, repeated runs by one user cannot be deduplicated. Network providers may still observe
39
+ connection metadata such as IP address.
40
+
41
41
  ## Package
42
42
 
43
43
  - npm latest version: `npm view "@diffci.com/diffci" version`
44
44
  - npm weekly downloads: `curl "https://api.npmjs.org/downloads/point/last-week/%40diffci.com%2Fdiffci"`
45
45
  - MCP binary presence: `npm view "@diffci.com/diffci" bin --json`
46
-
47
- ## Repository
48
-
49
- - GitHub stars, forks, watchers, and release views.
50
- - Issues or PRs opened by users asking about `diffci check`, `diffci init`, or `diffci-mcp`.
51
- - External PRs merged that mention DiffCI agent validation.
52
-
53
- ## Site
54
-
46
+
47
+ ## Repository
48
+
49
+ - GitHub stars, forks, watchers, and release views.
50
+ - Issues or PRs opened by users asking about `diffci check`, `diffci init`, or `diffci-mcp`.
51
+ - External PRs merged that mention DiffCI agent validation.
52
+
53
+ ## Site
54
+
55
55
  - Visits to `https://diffci.com/docs/ai-agents`.
56
- - Visits to `https://diffci.com/llms.txt`.
57
- - Clicks from the homepage agent and MCP links.
58
- - Referrers from MCP directories, awesome lists, and agent-template repositories.
59
-
56
+ - Visits to `https://diffci.com/llms.txt`.
57
+ - Clicks from the homepage agent and MCP links.
58
+ - Referrers from MCP directories, awesome lists, and agent-template repositories.
59
+
60
60
  ## Outreach
61
61
 
62
62
  Record each submission in `docs/agent-adoption-targets.md` or a dated note. For directory listings,
@@ -97,7 +97,7 @@ They are supporting signals only.
97
97
 
98
98
  | Signal | Value | Interpretation |
99
99
  | --- | ---: | --- |
100
- | npm latest version | `0.2.7` | Current CLI and MCP binaries are publicly available. |
100
+ | npm latest version | `0.2.9` | Current CLI and MCP binaries are publicly available. |
101
101
  | npm downloads, last complete registry week (`2026-09-15`–`2026-09-21`) | 1,929 | Distribution activity; not unique users or repositories. |
102
102
  | GitHub stars / forks / watchers | 0 / 0 / 0 | No repository-level community conversion yet. |
103
103
  | GitHub views, available 14-day window | 18 views / 4 unique visitors | Early discovery signal. |
@@ -119,9 +119,9 @@ Existing outreach log:
119
119
  | 2026-09-22 | FerroxLabs/agents-md | Issue | https://github.com/FerroxLabs/agents-md/issues/2 | Open; no reply as of 2026-09-25 | Follow up once on 2026-09-30; offer a PR only if invited. |
120
120
  | 2026-09-22 | ciembor/agent-rules-books | Issue | https://github.com/ciembor/agent-rules-books/issues/8 | Open; no reply as of 2026-09-25 | Follow up once on 2026-09-30; offer a PR only if invited. |
121
121
  | 2026-09-22 | jbarbier/CLAUDE.md | Issue | https://github.com/jbarbier/CLAUDE.md/issues/12 | Open; no reply as of 2026-09-25 | Follow up once on 2026-09-30; offer a PR only if invited. |
122
- | 2026-09-22 | Official MCP Registry | Directory | `io.github.adityankale190895/diffci` | Published | Consider moving to `io.github.DiffCI/diffci` after GitHub org namespace authorization is available. |
123
- | 2026-09-22 | Glama | Directory | TBD | Planned | Submit repository URL. |
124
- | 2026-09-22 | Smithery | Directory | TBD | Blocked | Needs Smithery account/API key. |
125
-
126
- Use merged PRs and accepted directory listings as the primary adoption signal. Use stars, downloads,
127
- and page views as supporting indicators, not proof that agents are actually using DiffCI.
122
+ | 2026-09-22 | Official MCP Registry | Directory | `io.github.adityankale190895/diffci` | Published | Consider moving to `io.github.DiffCI/diffci` after GitHub org namespace authorization is available. |
123
+ | 2026-09-22 | Glama | Directory | TBD | Planned | Submit repository URL. |
124
+ | 2026-09-22 | Smithery | Directory | TBD | Blocked | Needs Smithery account/API key. |
125
+
126
+ Use merged PRs and accepted directory listings as the primary adoption signal. Use stars, downloads,
127
+ and page views as supporting indicators, not proof that agents are actually using DiffCI.