@diffci.com/diffci 0.3.9 → 0.3.11

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,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.9` 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.
@@ -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,104 +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
- ## Local Checkout Tools
24
-
25
- DiffCI also ships a stdio MCP server. Use it when MCP tools must inspect the current checkout or run
26
- tests:
27
-
28
- Run it with:
29
-
30
- ```bash
31
- npx -p "@diffci.com/diffci@latest" diffci-mcp
32
- ```
33
-
34
- ## Stdio MCP Client Config
35
-
36
- Use this stdio configuration in clients that accept MCP JSON. Set `cwd` to the repository where the
37
- agent should run DiffCI.
38
-
39
- ```json
40
- {
41
- "mcpServers": {
42
- "diffci": {
43
- "command": "npx",
44
- "args": ["-p", "@diffci.com/diffci@latest", "diffci-mcp"],
45
- "cwd": "/path/to/repository"
46
- }
47
- }
48
- }
49
- ```
50
-
51
- On Windows, keep the same command shape and use a Windows path:
52
-
53
- ```json
54
- {
55
- "mcpServers": {
56
- "diffci": {
57
- "command": "npx",
58
- "args": ["-p", "@diffci.com/diffci@latest", "diffci-mcp"],
59
- "cwd": "C:\\Users\\you\\path\\to\\repository"
60
- }
61
- }
62
- }
63
- ```
64
-
65
- For Claude Desktop, Claude Code, Cursor, Codex-style MCP clients, and other stdio-compatible agents,
66
- name the server `diffci` and call the verification tool that matches the change scope before PR-ready
67
- answers.
68
-
69
- Available tools:
70
-
71
- - `diffci_verify_changed` - verifies staged, unstaged, and non-ignored untracked changes and returns a
72
- machine-readable, content-bound receipt.
73
- - `diffci_verify` - verifies a clean commit range, resolving the CI range automatically or accepting
74
- explicit base and head revisions.
75
- - `diffci_check` - runs `diffci check`, including inferred full and selected test commands.
76
- - `diffci_init` - runs `diffci init` to seed agent instruction files.
77
- - `diffci_verify_workflow` - runs `diffci verify-workflow` to check non-interference.
78
-
79
- The verification tools return the same `diffci.verification.v1` receipt as the CLI, including
80
- `verification`, `safe_to_continue`, change and selection counts, fallback reasoning, the executed
81
- command result, and checkout identities. The stdio MCP server delegates to the same open-source CLI
82
- and sends nothing to DiffCI Cloud. Verification runs repository test commands; use the CLI's
83
- `observe --no-send` for analysis only.
84
-
85
- Keep required project CI authoritative. DiffCI output is a validation lens, not permission to skip
86
- required checks.
87
-
88
- ## Directory Metadata
89
-
90
- Discovery links:
91
-
92
- - npm package: https://www.npmjs.com/package/@diffci.com/diffci
93
- - GitHub repository: https://github.com/DiffCI/DiffCI.com
94
- - Agent docs: https://diffci.com/docs/ai-agents
95
- - LLM discovery file: https://diffci.com/llms.txt
96
- - MCP command: `npx -p "@diffci.com/diffci@latest" diffci-mcp`
97
- - HTTPS MCP endpoint: https://diffci.com/mcp
98
-
99
- Short description:
100
-
101
- > Fail-closed, change-aware verification for AI coding agents. DiffCI selects the minimum justified
102
- > test command, broadens to full verification on uncertainty, and returns a machine-readable receipt.
103
-
104
- See [agent-plugin.md](agent-plugin.md) for Claude Code and Codex installation.
@@ -1,165 +0,0 @@
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-24.04
34
- continue-on-error: true
35
- permissions:
36
- contents: read
37
- steps:
38
- - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # immutable checkout pin
39
- with:
40
- fetch-depth: 0
41
- - uses: DiffCI/DiffCI.com@b35f55c1b6ba9c092f3ad623efd8baa0422c450a
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
- What the report means:
98
-
99
- Run both steps from the same repository root with the same checked-out revision. These commands
100
- execute repository code. The full run can warm caches for the selected run, so repeat comparisons
101
- with controlled cache state before drawing conclusions. Add `--repetitions 3` to alternate arm order.
102
- Use `--cache-state cold|warm` together with `--cache-prepare <command>` to run a repository-owned cache
103
- preparation/reset step before every arm. Without all three, runtime evidence remains labelled
104
- `PRELIMINARY`. DiffCI never deletes caches automatically. A passing pair does not establish selection safety.
105
-
106
- - Full runtime is measured from `--full`.
107
- - Selected runtime is measured from DiffCI's proposed command in the observation report.
108
- - DiffCI analysis overhead is imported from `timings.totalMs` in the observation report unless
109
- `--analysis-overhead-ms` is provided.
110
- - Net selected runtime is selected runtime plus analysis overhead.
111
- - If the full command fails while the selected command passes, the report is a safety warning, not a
112
- savings result.
113
- - Repeated runs classify stable full-only failures, likely flakes, shared/pre-existing failures,
114
- infrastructure failures, and inconclusive evidence. Fewer than three repetitions never establish a
115
- high-confidence selection miss.
116
- - The savings report binds the pair to the observation's base/head SHAs and SHA-256 digest, and records
117
- the checked-out HEAD plus byte-level dirty-worktree, manifest/lockfile, available resolved-dependency,
118
- and runner fingerprints at every execution boundary. A missing identity or changed fingerprint
119
- invalidates the comparison even when both commands pass.
120
-
121
- Before sharing a Markdown report with a maintainer, check that it answers these review questions:
122
-
123
- - Which exact repository, base SHA, head SHA, DiffCI version, full command, and selected command were
124
- measured?
125
- - Did the selected command cover the complete DiffCI selection, or was an explicit command override
126
- required?
127
- - Were cache conditions controlled or repeated, and if not, is the report labelled as one preliminary
128
- paired run?
129
- - Did both commands pass, did checkout provenance stay stable, and are invalid runs clearly labelled
130
- diagnostic only?
131
- - What should the maintainer do next: inspect a fallback/refusal, repeat with controlled cache state,
132
- run a seven-day observation job, or ignore the result because the repository is unsupported?
133
-
134
- If the proposed command needs adjustment for the repository's runner, pass the selected command
135
- manually:
136
-
137
- ```bash
138
- npx "@diffci.com/diffci@latest" verify-savings \
139
- --label owner/repo \
140
- --repo /path/to/their/repo \
141
- --full "pnpm test" \
142
- --selected "pnpm test packages/a/src/a.test.ts packages/b/src/b.test.ts" \
143
- --analysis-overhead-ms 1200 \
144
- --out ./diffci-verify-savings.json \
145
- --markdown ./diffci-verify-savings.md
146
- ```
147
-
148
- Common command shapes:
149
-
150
- ```bash
151
- --full "npm test"
152
- --full "pnpm test"
153
- --full "yarn test"
154
- --selected "npx vitest run path/to/file.test.ts"
155
- --selected "npx jest path/to/file.test.ts"
156
- --selected "node --test path/to/file.test.mjs"
157
- ```
158
-
159
- ## Trust Points
160
-
161
- - Published as `@diffci.com/diffci` on npm.
162
- - Stable `latest` release is signed with npm provenance.
163
- - The package boundary is checked by `npm run check:oss-boundary`.
164
- - The default observer writes a local report and sends nothing without both `DIFFCI_API_URL` and
165
- `DIFFCI_TOKEN`.
package/glama.json DELETED
@@ -1,12 +0,0 @@
1
- {
2
- "name": "DiffCI",
3
- "description": "Fail-closed verification, affected-test selection, and workflow safety for AI coding agents.",
4
- "category": "developer-tools",
5
- "homepage": "https://diffci.com/mcp-server",
6
- "repository": "https://github.com/DiffCI/DiffCI.com",
7
- "license": "AGPL-3.0-only",
8
- "install": {
9
- "command": "npx",
10
- "args": ["-p", "@diffci.com/diffci@latest", "diffci-mcp"]
11
- }
12
- }
package/llms.txt DELETED
@@ -1,41 +0,0 @@
1
- # DiffCI
2
-
3
- DiffCI is a fail-closed, change-aware verification layer for AI coding agents and development teams.
4
-
5
- Default AI-agent command:
6
-
7
- ```bash
8
- npx "@diffci.com/diffci@latest" verify --changed --json
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 verify --changed --json` verifies staged, unstaged, and non-ignored untracked changes.
20
- - It runs the selected test command or conservatively falls back to the full inferred command.
21
- - Continue only when the `diffci.verification.v1` receipt says `safe_to_continue: true`.
22
- - `diffci check` remains the paired full-versus-selected measurement command.
23
- - It sends no report unless `DIFFCI_API_URL` and `DIFFCI_TOKEN` are explicitly configured.
24
- - Treat selected commands as evidence about the change, not as permission to skip required project CI.
25
- - If DiffCI reports `REFUSED` or `ERROR`, fall back to the repository's normal validation commands.
26
-
27
- Useful docs:
28
-
29
- - AI agents: https://diffci.com/docs/ai-agents.html
30
- - Codex: https://diffci.com/docs/codex.html
31
- - Claude Code: https://diffci.com/docs/claude-code.html
32
- - Cursor: https://diffci.com/docs/cursor.html
33
- - GitHub Copilot: https://diffci.com/docs/copilot.html
34
- - Grok: https://diffci.com/docs/grok.html
35
- - Adoption kit: https://github.com/DiffCI/DiffCI.com/blob/main/docs/agent-adoption-kit.md
36
- - Adoption outreach: https://github.com/DiffCI/DiffCI.com/blob/main/docs/adoption-outreach.md
37
- - Adoption metrics: https://github.com/DiffCI/DiffCI.com/blob/main/docs/adoption-metrics.md
38
- - Adoption targets: https://github.com/DiffCI/DiffCI.com/blob/main/docs/agent-adoption-targets.md
39
- - MCP server: https://github.com/DiffCI/DiffCI.com/blob/main/docs/mcp.md
40
- - Distribution: https://github.com/DiffCI/DiffCI.com/blob/main/docs/distribution.md
41
- - Language support: https://github.com/DiffCI/DiffCI.com/blob/main/docs/language-support.md
@@ -1,6 +0,0 @@
1
- {
2
- "name": "diffci",
3
- "version": "0.1.0",
4
- "description": "Verify coding changes with affected tests and conservative full fallback.",
5
- "license": "AGPL-3.0-only"
6
- }
@@ -1,8 +0,0 @@
1
- {
2
- "name": "diffci",
3
- "version": "0.1.0",
4
- "description": "Verify coding changes with affected tests and conservative full fallback.",
5
- "license": "AGPL-3.0-only",
6
- "skills": "./skills/",
7
- "mcpServers": "./.mcp.json"
8
- }
@@ -1,13 +0,0 @@
1
- {
2
- "mcpServers": {
3
- "diffci": {
4
- "command": "npx",
5
- "args": [
6
- "--yes",
7
- "--package",
8
- "@diffci.com/diffci@0.3.9",
9
- "diffci-mcp"
10
- ]
11
- }
12
- }
13
- }