niceeval 0.4.4 → 0.4.6
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/README.md +21 -12
- package/README.zh.md +8 -9
- package/docs-site/.mintignore +13 -0
- package/docs-site/AGENTS.md +46 -0
- package/docs-site/concepts/adapter.mdx +287 -0
- package/docs-site/concepts/assert.mdx +243 -0
- package/docs-site/concepts/drive.mdx +118 -0
- package/docs-site/concepts/evals.mdx +108 -0
- package/docs-site/concepts/experiment.mdx +37 -0
- package/docs-site/concepts/hitl.mdx +83 -0
- package/docs-site/concepts/judge.mdx +129 -0
- package/docs-site/concepts/overview.mdx +98 -0
- package/docs-site/concepts/tier.mdx +42 -0
- package/docs-site/docs-ref/00-index.md +23 -0
- package/docs-site/docs-ref/01-page-types.md +43 -0
- package/docs-site/docs-ref/03-style-rules.md +45 -0
- package/docs-site/docs-ref/04-code-examples.md +37 -0
- package/docs-site/docs-ref/05-dx-failure-paths.md +45 -0
- package/docs-site/docs-ref/06-checklists.md +53 -0
- package/docs-site/docs.json +256 -0
- package/docs-site/example/ai-agent-application.mdx +148 -0
- package/docs-site/example/claude-code-codex-plugin.mdx +162 -0
- package/docs-site/example/claude-code-codex-skill.mdx +147 -0
- package/docs-site/example/showcase.mdx +39 -0
- package/docs-site/example/tier1-ai-sdk-v7.mdx +136 -0
- package/docs-site/example/tier1-claude-sdk.mdx +119 -0
- package/docs-site/example/tier1-codex-sdk.mdx +111 -0
- package/docs-site/example/tier1-langgraph.mdx +119 -0
- package/docs-site/example/tier1-pi-sdk.mdx +119 -0
- package/docs-site/favicon.svg +5 -0
- package/docs-site/github-diff.css +135 -0
- package/docs-site/github-diff.js +11 -0
- package/docs-site/guides/authoring.mdx +129 -0
- package/docs-site/guides/ci-integration.mdx +97 -0
- package/docs-site/guides/connect-otel.mdx +209 -0
- package/docs-site/guides/connect-your-agent.mdx +221 -0
- package/docs-site/guides/dataset-fanout.mdx +98 -0
- package/docs-site/guides/experiments.mdx +71 -0
- package/docs-site/guides/fixtures.mdx +147 -0
- package/docs-site/guides/reporters.mdx +113 -0
- package/docs-site/guides/runner.mdx +79 -0
- package/docs-site/guides/sandbox-agent.mdx +138 -0
- package/docs-site/guides/sandbox-backends.mdx +64 -0
- package/docs-site/guides/scoring-guide.mdx +92 -0
- package/docs-site/guides/viewing-results.mdx +195 -0
- package/docs-site/guides/write-experiment.mdx +81 -0
- package/docs-site/guides/write-send.mdx +347 -0
- package/docs-site/images/adapter-tiers-zh.svg +60 -0
- package/docs-site/images/agent-turn-roundtrip-en.svg +62 -0
- package/docs-site/images/agent-turn-roundtrip-zh.svg +77 -0
- package/docs-site/images/hitl-handshake-zh.svg +89 -0
- package/docs-site/images/logo.svg +6 -0
- package/docs-site/index.mdx +181 -0
- package/docs-site/introduction.mdx +141 -0
- package/docs-site/quickstart.mdx +136 -0
- package/docs-site/reference/builtin-agents.mdx +161 -0
- package/docs-site/reference/capabilities.mdx +76 -0
- package/docs-site/reference/cli.mdx +120 -0
- package/docs-site/reference/define-agent.mdx +168 -0
- package/docs-site/reference/define-config.mdx +41 -0
- package/docs-site/reference/define-eval.mdx +160 -0
- package/docs-site/reference/events.mdx +131 -0
- package/docs-site/reference/expect.mdx +112 -0
- package/docs-site/tracker.js +8 -0
- package/docs-site/zh/concepts/adapter.mdx +286 -0
- package/docs-site/zh/concepts/assert.mdx +243 -0
- package/docs-site/zh/concepts/drive.mdx +118 -0
- package/docs-site/zh/concepts/evals.mdx +124 -0
- package/docs-site/zh/concepts/experiment.mdx +37 -0
- package/docs-site/zh/concepts/hitl.mdx +83 -0
- package/docs-site/zh/concepts/judge.mdx +130 -0
- package/docs-site/zh/concepts/overview.mdx +109 -0
- package/docs-site/zh/concepts/tier.mdx +44 -0
- package/docs-site/zh/example/ai-agent-application.mdx +152 -0
- package/docs-site/zh/example/claude-code-codex-plugin.mdx +163 -0
- package/docs-site/zh/example/claude-code-codex-skill.mdx +147 -0
- package/docs-site/zh/example/showcase.mdx +39 -0
- package/docs-site/zh/example/tier1-ai-sdk-v7.mdx +140 -0
- package/docs-site/zh/example/tier1-claude-sdk.mdx +122 -0
- package/docs-site/zh/example/tier1-codex-sdk.mdx +117 -0
- package/docs-site/zh/example/tier1-langgraph.mdx +123 -0
- package/docs-site/zh/example/tier1-pi-sdk.mdx +122 -0
- package/docs-site/zh/guides/agent-feedback-loop.mdx +79 -0
- package/docs-site/zh/guides/authoring.mdx +129 -0
- package/docs-site/zh/guides/ci-integration.mdx +97 -0
- package/docs-site/zh/guides/connect-otel.mdx +208 -0
- package/docs-site/zh/guides/connect-your-agent.mdx +226 -0
- package/docs-site/zh/guides/dataset-fanout.mdx +83 -0
- package/docs-site/zh/guides/experiments.mdx +72 -0
- package/docs-site/zh/guides/fixtures.mdx +147 -0
- package/docs-site/zh/guides/official-adapters.mdx +132 -0
- package/docs-site/zh/guides/reporters.mdx +113 -0
- package/docs-site/zh/guides/runner.mdx +82 -0
- package/docs-site/zh/guides/sandbox-agent.mdx +139 -0
- package/docs-site/zh/guides/sandbox-backends.mdx +75 -0
- package/docs-site/zh/guides/scoring-guide.mdx +92 -0
- package/docs-site/zh/guides/viewing-results.mdx +195 -0
- package/docs-site/zh/guides/write-experiment.mdx +101 -0
- package/docs-site/zh/guides/write-send.mdx +353 -0
- package/docs-site/zh/index.mdx +180 -0
- package/docs-site/zh/introduction.mdx +140 -0
- package/docs-site/zh/quickstart.mdx +137 -0
- package/docs-site/zh/reference/builtin-agents.mdx +364 -0
- package/docs-site/zh/reference/capabilities.mdx +76 -0
- package/docs-site/zh/reference/cli.mdx +140 -0
- package/docs-site/zh/reference/define-agent.mdx +461 -0
- package/docs-site/zh/reference/define-config.mdx +107 -0
- package/docs-site/zh/reference/define-eval.mdx +674 -0
- package/docs-site/zh/reference/events.mdx +252 -0
- package/docs-site/zh/reference/expect.mdx +208 -0
- package/package.json +3 -2
- package/src/agents/bub.ts +15 -5
- package/src/agents/claude-code.ts +8 -5
- package/src/agents/codex.ts +9 -5
- package/src/agents/sdk-streams.test.ts +4 -4
- package/src/agents/sdk-streams.ts +14 -9
- package/src/agents/types.ts +40 -1
- package/src/agents/ui-message-stream.ts +1 -0
- package/src/cli.ts +36 -7
- package/src/context/types.ts +140 -0
- package/src/expect/index.ts +15 -8
- package/src/i18n/en.ts +19 -6
- package/src/i18n/zh-CN.ts +19 -6
- package/src/o11y/parsers/bub.test.ts +71 -0
- package/src/o11y/parsers/bub.ts +5 -0
- package/src/o11y/types.ts +27 -2
- package/src/runner/reporters/artifacts.ts +11 -3
- package/src/runner/reporters/live.ts +45 -8
- package/src/runner/run.ts +71 -21
- package/src/runner/types.ts +45 -2
- package/src/sandbox/types.ts +18 -0
- package/src/scoring/types.ts +5 -0
- package/src/shared/types.ts +3 -0
- package/src/util.test.ts +26 -1
- package/src/util.ts +16 -0
- package/src/view/app/App.tsx +2 -2
- package/src/view/app/components/AttemptModal.tsx +2 -0
- package/src/view/app/components/CopyControls.tsx +87 -28
- package/src/view/app/i18n.ts +3 -3
- package/src/view/client-dist/app.css +1 -1
- package/src/view/client-dist/app.js +18 -18
- package/docs/README.md +0 -120
- package/docs/adapters/README.md +0 -60
- package/docs/adapters/authoring.md +0 -179
- package/docs/adapters/coding-agent-skills-plugins.md +0 -324
- package/docs/adapters/collection.md +0 -128
- package/docs/adapters/contract.md +0 -264
- package/docs/adapters/reference/agent-eval.md +0 -215
- package/docs/adapters/reference/agent-loop-apis.md +0 -69
- package/docs/adapters/reference/claude-code-otel-telemetry.md +0 -100
- package/docs/adapters/reference/eve-protocol.md +0 -127
- package/docs/adapters/reference/otel-genai.md +0 -107
- package/docs/adapters/reference/otel-instrumentation.md +0 -65
- package/docs/adapters/targets.md +0 -99
- package/docs/architecture.md +0 -140
- package/docs/assertions.md +0 -387
- package/docs/capabilities-by-construction.md +0 -48
- package/docs/cli.md +0 -173
- package/docs/concepts.md +0 -106
- package/docs/e2e-ci.md +0 -332
- package/docs/eval-authoring.md +0 -319
- package/docs/experiments.md +0 -157
- package/docs/getting-started.md +0 -224
- package/docs/multi-agent.md +0 -145
- package/docs/observability.md +0 -337
- package/docs/origin-integration.md +0 -195
- package/docs/references.md +0 -35
- package/docs/reports.md +0 -551
- package/docs/results-format.md +0 -228
- package/docs/results-lib.md +0 -191
- package/docs/runner.md +0 -104
- package/docs/sandbox.md +0 -276
- package/docs/scoring.md +0 -119
- package/docs/source-map.md +0 -126
- package/docs/tier-sync.md +0 -193
- package/docs/view.md +0 -194
- package/docs/vision.md +0 -88
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Eval Your Skill on Claude Code / Codex"
|
|
3
|
+
sidebarTitle: "Eval Skills in Agents"
|
|
4
|
+
description: "Compare coding-agent tasks with and without a Skill by using real workspaces, assertions, and judge scoring."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
A Skill's quality is not only whether the final answer is correct. It is whether the agent follows the intended process in the right situation, avoids known anti-patterns, and reliably improves pass rate, cost, and latency. The recommended niceeval shape is to inject the Skill into a sandboxed coding-agent workspace, then compare against a no-Skill baseline.
|
|
8
|
+
|
|
9
|
+
The runnable reference is [`examples/zh/coding-agent-skill`](https://github.com/CorrectRoadH/niceeval/tree/main/examples/zh/coding-agent-skill). It contains two suites:
|
|
10
|
+
|
|
11
|
+
- Zod skill: a local `skills/zod.md` that steers request-body and environment-variable validation.
|
|
12
|
+
- Ponytail plugin: a migrated third-party benchmark for safety, reuse, and simplicity.
|
|
13
|
+
|
|
14
|
+
## Directory structure
|
|
15
|
+
|
|
16
|
+
```text
|
|
17
|
+
examples/zh/coding-agent-skill/
|
|
18
|
+
├─ skills/
|
|
19
|
+
│ ├─ zod.md
|
|
20
|
+
│ └─ ponytail.md
|
|
21
|
+
├─ workspaces/
|
|
22
|
+
│ └─ ts-starter/
|
|
23
|
+
├─ evals/
|
|
24
|
+
│ ├─ api-validation.eval.ts
|
|
25
|
+
│ ├─ config-schema.eval.ts
|
|
26
|
+
│ ├─ ponytail-safe-path.eval.ts
|
|
27
|
+
│ ├─ ponytail-csv-sum.eval.ts
|
|
28
|
+
│ └─ ponytail-reuse.eval.ts
|
|
29
|
+
└─ experiments/
|
|
30
|
+
├─ with-skill.ts
|
|
31
|
+
├─ baseline.ts
|
|
32
|
+
├─ ponytail.ts
|
|
33
|
+
└─ ponytail-baseline.ts
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Define the Skill experiment
|
|
37
|
+
|
|
38
|
+
Skill injection belongs to the experiment. The example writes `skills/zod.md` into `CLAUDE.md` during sandbox setup, so Claude Code reads it when it starts.
|
|
39
|
+
|
|
40
|
+
```ts
|
|
41
|
+
import { defineExperiment } from "niceeval";
|
|
42
|
+
import { claudeCodeAgent } from "niceeval/adapter";
|
|
43
|
+
import { dockerSandbox } from "niceeval/sandbox";
|
|
44
|
+
import { readFileSync } from "node:fs";
|
|
45
|
+
import { dirname, join } from "node:path";
|
|
46
|
+
import { fileURLToPath } from "node:url";
|
|
47
|
+
|
|
48
|
+
const __dir = dirname(fileURLToPath(import.meta.url));
|
|
49
|
+
const zodSkill = readFileSync(join(__dir, "../skills/zod.md"), "utf-8");
|
|
50
|
+
const baseAgent = claudeCodeAgent();
|
|
51
|
+
|
|
52
|
+
const zodAgent = {
|
|
53
|
+
...baseAgent,
|
|
54
|
+
name: "claude-code+zod-skill",
|
|
55
|
+
async setup(sb, ctx) {
|
|
56
|
+
const cleanup = await baseAgent.setup?.(sb, ctx);
|
|
57
|
+
await sb.writeFiles({ "CLAUDE.md": zodSkill });
|
|
58
|
+
return cleanup;
|
|
59
|
+
},
|
|
60
|
+
} satisfies typeof baseAgent;
|
|
61
|
+
|
|
62
|
+
export default defineExperiment({
|
|
63
|
+
description: "claude-code + zod skill",
|
|
64
|
+
agent: zodAgent,
|
|
65
|
+
model: "claude-sonnet-4-6",
|
|
66
|
+
sandbox: dockerSandbox(),
|
|
67
|
+
runs: 3,
|
|
68
|
+
earlyExit: false,
|
|
69
|
+
budget: 10,
|
|
70
|
+
evals: (id) => !id.startsWith("ponytail-"),
|
|
71
|
+
});
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
The baseline keeps the same eval filter, model, runs, and budget, but uses plain `claudeCodeAgent()`.
|
|
75
|
+
|
|
76
|
+
## Write the eval
|
|
77
|
+
|
|
78
|
+
A `.eval.ts` file prepares the workspace, sends the task, and verifies the result. This is a shortened version of the Zod request-body validation task.
|
|
79
|
+
|
|
80
|
+
```ts
|
|
81
|
+
import { defineEval } from "niceeval";
|
|
82
|
+
import { excludes, includes } from "niceeval/expect";
|
|
83
|
+
|
|
84
|
+
export default defineEval({
|
|
85
|
+
description: "Validate POST /users request bodies with Zod and structured errors",
|
|
86
|
+
|
|
87
|
+
async test(t) {
|
|
88
|
+
await t.sandbox.uploadDirectory("../workspaces/ts-starter");
|
|
89
|
+
|
|
90
|
+
await t
|
|
91
|
+
.send(
|
|
92
|
+
`Implement POST /users in src/routes/users.ts.
|
|
93
|
+
Requirements:
|
|
94
|
+
- Define CreateUserSchema with Zod
|
|
95
|
+
- Validate req.body with .safeParse(), not .parse()
|
|
96
|
+
- On validation failure, return HTTP 422 with { errors: result.error.issues }
|
|
97
|
+
- On success, return HTTP 201`,
|
|
98
|
+
)
|
|
99
|
+
.then((turn) => turn.succeeded());
|
|
100
|
+
|
|
101
|
+
const src = await t.sandbox.readSourceFiles({ extensions: ["ts"] });
|
|
102
|
+
const route = src.fileMatching(/users/);
|
|
103
|
+
const code = route?.content ?? "";
|
|
104
|
+
|
|
105
|
+
t.check(code, includes(/z\.object\s*\(/));
|
|
106
|
+
t.check(code, includes(/\.safeParse\s*\(/));
|
|
107
|
+
t.check(code, includes(/422|UNPROCESSABLE/));
|
|
108
|
+
t.check(code, excludes(/JSON\.parse/));
|
|
109
|
+
t.sandbox.fileChanged("src/routes/users.ts");
|
|
110
|
+
|
|
111
|
+
t.judge.autoevals
|
|
112
|
+
.closedQA("Does the code use the idiomatic Zod validation pattern?", { on: code })
|
|
113
|
+
.atLeast(0.75);
|
|
114
|
+
},
|
|
115
|
+
});
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Prefer verifying the final artifact and real tests. Only make Skill-load or tool-call events hard gates when those event names are stable for the agent.
|
|
119
|
+
|
|
120
|
+
## Run
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
cd examples/zh/coding-agent-skill
|
|
124
|
+
pnpm install
|
|
125
|
+
|
|
126
|
+
# Zod Skill A/B comparison
|
|
127
|
+
pnpm exec niceeval exp compare
|
|
128
|
+
|
|
129
|
+
# Ponytail plugin A/B comparison
|
|
130
|
+
pnpm exec niceeval exp ponytail ponytail-baseline
|
|
131
|
+
|
|
132
|
+
pnpm exec niceeval view
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## What to evaluate
|
|
136
|
+
|
|
137
|
+
- Whether the Skill improves pass rate.
|
|
138
|
+
- Whether it reduces anti-patterns such as raw `JSON.parse`, unsafe path joins, or needless rewrites.
|
|
139
|
+
- Whether the agent consistently changes the intended files.
|
|
140
|
+
- Whether cost and latency remain acceptable.
|
|
141
|
+
- Whether failures mean the Skill was not read, was read but ignored, or the eval target was unclear.
|
|
142
|
+
|
|
143
|
+
## Next steps
|
|
144
|
+
|
|
145
|
+
- [Fixtures](/guides/fixtures) — organize sandbox workspaces, tasks, and verification.
|
|
146
|
+
- [Experiments](/guides/experiments) — run with-Skill vs without-Skill controlled experiments.
|
|
147
|
+
- [Scoring Guide](/guides/scoring-guide) — score final results and behavioral constraints together.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Showcase"
|
|
3
|
+
sidebarTitle: "Showcase"
|
|
4
|
+
description: "Real projects and live sites that build evals with NiceEval, collected over time."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
This page collects real projects and live sites that use [NiceEval](https://niceeval.com/) to build evals. Each case is a runnable, reproducible repository, not an excerpt. Open the source repository to inspect the full eval, experiment, and sandbox configuration.
|
|
8
|
+
|
|
9
|
+
## coding-agent-memory-evals
|
|
10
|
+
|
|
11
|
+
Tape, Nowledge Mem, mem9, db9.ai, OpenClaw... memory implementations for coding agents are diverging, but the ecosystem needs a reproducible eval surface to answer whether those mechanisms help in practice. [coding-agent-memory-evals](https://github.com/CorrectRoadH/coding-agent-memory-evals) builds that benchmark with NiceEval: the same coding tasks, the same model (`gpt-5.4`), and only the agent memory mechanism changes. It compares [bub](https://github.com/CorrectRoadH/coding-agent-memory-evals), which includes [Tape](https://tape.systems/), against codex without the corresponding persistent memory.
|
|
12
|
+
|
|
13
|
+
- Online report: [coding-agent-memory-evals.vercel.app](https://coding-agent-memory-evals.vercel.app/)
|
|
14
|
+
- Source repository: [github.com/CorrectRoadH/coding-agent-memory-evals](https://github.com/CorrectRoadH/coding-agent-memory-evals)
|
|
15
|
+
|
|
16
|
+
The primary score only checks whether the development task itself was completed, such as build, tests, or the upstream verifier. It does not add a separate question like "did the agent remember this fact?" The value of memory shows up in secondary metrics such as duration, tokens, cost, and `pass^k`.
|
|
17
|
+
|
|
18
|
+
### Cases
|
|
19
|
+
|
|
20
|
+
Each eval connects the original task and verification script from a public benchmark. These are not rewritten assertions.
|
|
21
|
+
|
|
22
|
+
| Eval | Source | What It Verifies |
|
|
23
|
+
|---|---|---|
|
|
24
|
+
| [`agent-029-use-cache-directive`](https://github.com/CorrectRoadH/coding-agent-memory-evals/blob/main/evals/memory/agent-029-use-cache-directive.eval.ts) | next-evals | Whether a Server Action uses `use cache` + `revalidateTag` for eventually consistent directory-data refreshes. |
|
|
25
|
+
| [`agent-030-app-router-migration-hard`](https://github.com/CorrectRoadH/coding-agent-memory-evals/blob/main/evals/memory/agent-030-app-router-migration-hard.eval.ts) | next-evals | Whether a complex Pages Router app is fully migrated to App Router, legacy files are deleted, and legacy APIs do not remain. |
|
|
26
|
+
| [`agent-037-updatetag-cache`](https://github.com/CorrectRoadH/coding-agent-memory-evals/blob/main/evals/memory/agent-037-updatetag-cache.eval.ts) | next-evals | Whether read-your-own-writes scenarios use `updateTag` instead of only `revalidateTag`. |
|
|
27
|
+
| [`terminal-cancel-async-tasks`](https://github.com/CorrectRoadH/coding-agent-memory-evals/blob/main/evals/memory/terminal-cancel-async-tasks.eval.ts) | [Terminal-Bench](https://www.tbench.ai/) | Implements a cancellable concurrency-limited async task runner and runs the original `pytest` verifier. |
|
|
28
|
+
| [`repomod-hello-world-api`](https://github.com/CorrectRoadH/coding-agent-memory-evals/blob/main/evals/memory/repomod-hello-world-api.eval.ts) | RepoMod-Bench | Migrates a Flask API to Java Spring Boot, starts the service, and runs upstream hidden HTTP tests. |
|
|
29
|
+
| [`tool-call-observability`](https://github.com/CorrectRoadH/coding-agent-memory-evals/blob/main/evals/memory/tool-call-observability.eval.ts) | Custom smoke | Whether the agent's shell tool calls are correctly recorded as standard events. |
|
|
30
|
+
|
|
31
|
+
### Comparison Experiments
|
|
32
|
+
|
|
33
|
+
[`experiments/compare/`](https://github.com/CorrectRoadH/coding-agent-memory-evals/tree/main/experiments/compare) is the only comparable experiment set. It pins the same model (`gpt-5.4`) and the same sandbox (`docker`), and changes only the agent: [`bub-gpt-5.4.ts`](https://github.com/CorrectRoadH/coding-agent-memory-evals/blob/main/experiments/compare/bub-gpt-5.4.ts) vs. [`codex-gpt-5.4.ts`](https://github.com/CorrectRoadH/coding-agent-memory-evals/blob/main/experiments/compare/codex-gpt-5.4.ts). That makes the difference attributable to the memory mechanism rather than the model or runtime environment. `niceeval exp compare` runs the whole set, and the result snapshot is published to the online report.
|
|
34
|
+
|
|
35
|
+
## Next Steps
|
|
36
|
+
|
|
37
|
+
- [Connect Your Agent](/guides/connect-your-agent) — integrate a coding-agent adapter from scratch.
|
|
38
|
+
- [Experiments](/guides/experiments) — organize comparable experiment matrices.
|
|
39
|
+
- [Evaluate Skill Impact](/example/claude-code-codex-skill) — use the same "with / without X" comparison pattern for Skills.
|