@theaiteam/promptdiff 1.0.0-rc.1
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/CHANGELOG.md +48 -0
- package/LICENSE +21 -0
- package/README.md +697 -0
- package/SPEC.md +314 -0
- package/package.json +54 -0
- package/promptdiff +4 -0
- package/src/args.ts +83 -0
- package/src/cli.ts +685 -0
- package/src/engine/cache.ts +150 -0
- package/src/engine/compare.ts +563 -0
- package/src/engine/config.ts +502 -0
- package/src/engine/grader.ts +149 -0
- package/src/engine/json-assert.ts +277 -0
- package/src/engine/judge.ts +388 -0
- package/src/engine/receipt.ts +150 -0
- package/src/engine/render.ts +59 -0
- package/src/engine/report.ts +49 -0
- package/src/engine/sandbox.ts +97 -0
- package/src/engine/skill-install.ts +112 -0
- package/src/engine/stats.ts +41 -0
- package/src/prompt.ts +16 -0
- package/src/runner/claude-p.ts +156 -0
- package/src/runner/index.ts +31 -0
- package/src/runner/openai-compat.ts +228 -0
- package/src/types.ts +65 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 1.0.0 — 2026-07-31
|
|
4
|
+
|
|
5
|
+
First stable release. promptdiff is a Bun CLI for testing whether an LLM
|
|
6
|
+
prompt or skill change actually changes behavior — with any model, not just
|
|
7
|
+
Claude.
|
|
8
|
+
|
|
9
|
+
### Commands
|
|
10
|
+
|
|
11
|
+
- `run` — one bounded model invocation with an agent file and optional skills
|
|
12
|
+
- `compare` — N-run baseline-vs-proposed comparison with deterministic
|
|
13
|
+
grading, pass-rate assertions, and honest statistics
|
|
14
|
+
- `measure` — single-arm characterization: per-case pass rates, no
|
|
15
|
+
comparison semantics (#18)
|
|
16
|
+
- `calibrate` — measure a judge rubric's accuracy against labeled fixtures
|
|
17
|
+
before it is trusted to grade anything (#21/#22)
|
|
18
|
+
|
|
19
|
+
### Runners
|
|
20
|
+
|
|
21
|
+
- `claude-p` (default): headless Claude Code — tools, artifact sandboxes,
|
|
22
|
+
skill-registry install testing, explicit budget-abort errors (#3)
|
|
23
|
+
- `openai`: any OpenAI-compatible endpoint (OpenAI, ollama, vLLM, llama.cpp,
|
|
24
|
+
OpenRouter) — vision inputs, `requestParams` passthrough, transient-failure
|
|
25
|
+
retries with backoff (#17), and usage-based cost accounting so
|
|
26
|
+
`maxBudgetUsd` enforces (#20)
|
|
27
|
+
- Per-arm model/runner/endpoint for model-vs-model comparisons, with
|
|
28
|
+
cross-runner caveats surfaced in the summary
|
|
29
|
+
|
|
30
|
+
### Graders
|
|
31
|
+
|
|
32
|
+
- `text` — contains / notContains / regex over the final output
|
|
33
|
+
- `command` — shell exit codes in the per-run sandbox, with
|
|
34
|
+
`$PROMPTDIFF_OUTPUT_FILE` for completion-style runs
|
|
35
|
+
- `json` — path assertions over the last balanced JSON value (#19)
|
|
36
|
+
- `judge` — LLM judge with a rubric, labeled calibration fixtures, and a
|
|
37
|
+
refuse-to-grade gate on per-class accuracy (#21/#22)
|
|
38
|
+
|
|
39
|
+
### Trustworthy receipts
|
|
40
|
+
|
|
41
|
+
- Template rendering (`render.vars`, `--var`) so scenarios test the prompt
|
|
42
|
+
files that actually ship (#15)
|
|
43
|
+
- Sampling-noise labels via exact Fisher tests (#13)
|
|
44
|
+
- `productionModel` divergence warnings (#14)
|
|
45
|
+
- Grader evidence for failing runs in the summary (#4)
|
|
46
|
+
- `--report ndjson` append-only run history (#11)
|
|
47
|
+
- `--receipts` content-addressed eval receipts keyed on prompt hashes (#10)
|
|
48
|
+
- `--cache` opt-in baseline-arm caching keyed on content (#12)
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Josh Owens
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|