Skip to content

Commit a8b1d1e

Browse files
authored
Unify tool language across docs and code (#30)
1 parent 560f668 commit a8b1d1e

61 files changed

Lines changed: 1010 additions & 992 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

AGENTS.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
## Naming
2+
3+
Follow `DICTIONARY.md`.
4+
5+
- Reuse existing dictionary terms in code, docs, tests, and CLI text.
6+
- Before introducing a new name, check `DICTIONARY.md` and ask the user for approval.

CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66

77
- [#19](https://github.com/callstackincubator/skillgym/pull/19) [`ae5aed5`](https://github.com/callstackincubator/skillgym/commit/ae5aed524592b954be6225d4d47d16e3bbcd35f4) Thanks [@V3RON](https://github.com/V3RON)! - Classify assertion failures (for example timeouts vs expectation mismatches) and show the kind in standard, JSON summary, and GitHub Actions output.
88

9-
- [#20](https://github.com/callstackincubator/skillgym/pull/20) [`39393cc`](https://github.com/callstackincubator/skillgym/commit/39393cc07cb22ce713e35f9fc2dd86b56a4ffa19) Thanks [@V3RON](https://github.com/V3RON)! - Add soft assertions so a test case can record multiple failures and report them together instead of stopping at the first one.
9+
- [#20](https://github.com/callstackincubator/skillgym/pull/20) [`39393cc`](https://github.com/callstackincubator/skillgym/commit/39393cc07cb22ce713e35f9fc2dd86b56a4ffa19) Thanks [@V3RON](https://github.com/V3RON)! - Add soft assertions so a case can record multiple failures and report them together instead of stopping at the first one.
1010

1111
## 0.6.0
1212

1313
### Minor Changes
1414

1515
- [#10](https://github.com/callstackincubator/skillgym/pull/10) [`adb3708`](https://github.com/callstackincubator/skillgym/commit/adb3708a8cb234b79f3acd6356c6f249736363ea) Thanks [@V3RON](https://github.com/V3RON)! - You can now mark known failures so expected problems do not block a run.
1616

17-
- [`ff92fea`](https://github.com/callstackincubator/skillgym/commit/ff92fea9a4c316729ecb4e21ba2b3909e9ff82f1) Thanks [@V3RON](https://github.com/V3RON)! - You can now filter benchmark runs by tag.
17+
- [`ff92fea`](https://github.com/callstackincubator/skillgym/commit/ff92fea9a4c316729ecb4e21ba2b3909e9ff82f1) Thanks [@V3RON](https://github.com/V3RON)! - You can now filter benchmark executions by tag.
1818

1919
- [`ff92fea`](https://github.com/callstackincubator/skillgym/commit/ff92fea9a4c316729ecb4e21ba2b3909e9ff82f1) Thanks [@V3RON](https://github.com/V3RON)! - Asserting on commands is now easier and more reliable.
2020

@@ -28,4 +28,4 @@
2828

2929
- [`ff92fea`](https://github.com/callstackincubator/skillgym/commit/ff92fea9a4c316729ecb4e21ba2b3909e9ff82f1) Thanks [@V3RON](https://github.com/V3RON)! - Benchmark suites now use available CPU capacity more efficiently.
3030

31-
- [`ff92fea`](https://github.com/callstackincubator/skillgym/commit/ff92fea9a4c316729ecb4e21ba2b3909e9ff82f1) Thanks [@V3RON](https://github.com/V3RON)! - The basic example now includes the latest max-steps scenario.
31+
- [`ff92fea`](https://github.com/callstackincubator/skillgym/commit/ff92fea9a4c316729ecb4e21ba2b3909e9ff82f1) Thanks [@V3RON](https://github.com/V3RON)! - The basic example now includes the latest max-steps case.

DICTIONARY.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# SkillGym Dictionary
2+
3+
This is the domain dictionary for `skillgym`.
4+
5+
Use the existing vocabulary in code, docs, tests, issues, and conversations.
6+
Prefer reusing an existing term over inventing a new one.
7+
Before adding or changing a term, check this file and ask the user for approval.
8+
9+
## Terms
10+
11+
- `SkillGym`: The product, package, CLI, and repository.
12+
- `suite file`: Module file that exports one suite.
13+
- `suite`: User-authored collection of cases and optional workspace config.
14+
- `case`: One definition with a prompt, assertions, and optional metadata.
15+
- `prompt`: Exact instruction sent to the agent.
16+
- `runner`: Configured execution target: agent type plus model.
17+
- `agent`: External coding agent doing the work.
18+
- `suite run`: One top-level `skillgym run ...` over one suite.
19+
- `execution`: One case x runner unit of work, including all its repetitions and retries.
20+
- `repetition`: One planned sample within an execution.
21+
- `retry`: Rerunning the same repetition after failure.
22+
- `session`: One concrete agent interaction; not a synonym for `repetition`.
23+
- `session report`: Normalized record of a completed session, exposed to assertions.
24+
- `assertion`: Rule deciding whether a case passed or failed.
25+
- `expected failure`: Assertion failure treated as suite-successful because it captures a known gap.
26+
- `failure classification`: Stable category assigned to a failure.
27+
- `failure class`: The value representing a failure classification.
28+
- `result`: Pass/fail outcome object; not a session report.
29+
- `artifact`: Preserved file or directory written by SkillGym.
30+
- `artifact directory`: Directory holding artifacts for one scope such as a suite run, execution, repetition, retry, or session.
31+
- `workspace`: Directory where the agent runs.
32+
- `shared workspace`: Run directly in one real directory.
33+
- `isolated workspace`: Fresh workspace created per execution.
34+
- `workspace template`: Directory copied into an isolated workspace before execution.
35+
- `workspace bootstrap`: Command run in an isolated workspace before the agent starts.
36+
- `schedule`: Execution ordering and concurrency policy.
37+
- `reporter`: Component rendering suite-run progress and results.
38+
- `skill detection`: Evidence that a skill was used, with confidence and evidence.
39+
- `session event`: Normalized event observed during a session.
40+
- `snapshot baseline`: Stored token baseline for a benchmark case x runner pair.
41+
- `token regression check`: Comparison of current token usage against the snapshot baseline.

README.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
## Why it's useful
1010

11-
When you evaluate agent skills manually, it is hard to tell whether the agent actually selected the right skill, used it at the right time, and behaved correctly end to end. `skillgym` gives you a repeatable way to run real sessions, preserve session artifacts, verify outcomes with TypeScript assertions, and catch token regressions with snapshots.
11+
When you evaluate agent skills manually, it is hard to tell whether the agent actually selected the right skill, used it at the right time, and behaved correctly end to end. `skillgym` gives you a repeatable way to run real sessions, preserve session artifacts, verify results with TypeScript assertions, and catch token regressions with snapshots.
1212

1313
## Supported runners
1414

@@ -75,10 +75,10 @@ export default config;
7575
Create a suite file such as `./skillgym/basic-suite.ts`:
7676

7777
```ts
78-
import type { TestSuite } from "skillgym";
78+
import type { Suite } from "skillgym";
7979
import { assert } from "skillgym";
8080

81-
const suite: TestSuite = [
81+
const suite: Suite = [
8282
{
8383
id: "always-passes",
8484
prompt: "Say only: skillgym ready",
@@ -113,7 +113,7 @@ npx skillgym skills list
113113
npx skillgym skills get core
114114
```
115115

116-
Explain a failed run by resuming the original runner session from the exact failed leaf artifact directory:
116+
Explain a failed execution by resuming the original runner session from the exact failed artifact directory:
117117

118118
```bash
119119
npx skillgym explain ./.skillgym-results/run-1/case-a/open-main/repeat-1
@@ -137,7 +137,7 @@ TypeScript runtime limitations:
137137
- a `skillgym.config.*` file with a non-empty `runners` map
138138
- at least one configured runner with `agent.type` and `agent.model`
139139
- the corresponding CLI installed and working in your environment
140-
- a suite file that exports test cases
140+
- a suite file that exports cases
141141

142142
Config is discovered upward from the suite file directory. CLI flags override config values.
143143

@@ -148,21 +148,21 @@ Use `agent.model` instead of `commandArgs` when you need to select the agent mod
148148

149149
A runner is one configured agent target. It tells `skillgym` which CLI to launch and which model to use for a run.
150150

151-
Each test case runs once per selected runner. For example, 3 cases and 2 runners produce 6 executions.
151+
Each case runs once per selected runner. For example, 3 cases and 2 runners produce 6 executions.
152152

153153
## Configuration
154154

155155
Most important config properties:
156156

157-
- `run.cwd`: working directory used for shared-workspace runs
158-
- `run.outputDir`: where artifacts, reports, and preserved workspaces are written
157+
- `run.cwd`: working directory used for shared-workspace executions
158+
- `run.outputDir`: suite-run artifact directory where artifacts, reports, and preserved workspaces are written
159159
- `run.reporter`: built-in `standard` reporter or a custom reporter module path
160160
- `run.schedule`: execution scheduling mode for case x runner pairs
161161
- `run.maxParallel`: maximum concurrent executions for non-serial schedules, defaulting to available CPU parallelism
162162
- `run.repeat`: require this many successful repetitions per case x runner execution
163-
- `run.repeatFailure`: retry the current repetition up to this many additional attempts after failure
163+
- `run.repeatFailure`: retry the current repetition up to this many additional sessions after failure
164164
- `run.retryFailed`: compatibility alias for `run.repeatFailure`
165-
- `run.maxSteps`: best-effort limit on streamed agent steps before skillgym terminates the run
165+
- `run.maxSteps`: best-effort limit on streamed agent steps before skillgym terminates the execution
166166
- `run.workspace`: default workspace mode for the suite
167167
- `defaults.timeoutMs`: default per-case timeout
168168
- `runners.<id>.agent.type`: which agent integration to use, currently `opencode`, `codex`, `claude-code`, or `cursor-agent`
@@ -181,15 +181,15 @@ The execution unit is one case x runner pair. `skillgym` expands the suite into
181181

182182
For concurrent schedules, `run.maxParallel` defaults to `os.availableParallelism()`. This limits how many SkillGym executions are active at once; it does not pin or limit CPU cores used by an individual agent process.
183183

184-
Concurrent schedules do not copy or isolate the workspace by themselves. Overlapping runs may still interact through the same filesystem state and live runner output unless you use isolated workspaces. OpenCode, Codex, and Claude Code runtime state are isolated per run under each artifact directory.
184+
Concurrent schedules do not copy or isolate the workspace by themselves. Overlapping executions may still interact through the same filesystem state and live runner output unless you use isolated workspaces. OpenCode, Codex, and Claude Code runtime state are isolated per execution under each artifact directory.
185185

186-
`run.repeat` is useful when you want stability sampling instead of a single lucky pass. Each case x runner execution keeps running until it records the requested number of successful classified outcomes, or stops early when one repetition still fails after exhausting `run.repeatFailure` retries.
186+
`run.repeat` is useful when you want stability sampling instead of a single lucky pass. Each case x runner execution keeps running until it records the requested number of successful classified results, or stops early when one repetition still fails after exhausting `run.repeatFailure` retries.
187187

188-
`run.repeatFailure` retries only the current repetition when it still counts as failed after result classification. SkillGym keeps all repetition and retry artifacts, averages visible duration and token metrics across the final outcomes of completed successful repetitions, and preserves the full nested detail in `results.json`.
188+
`run.repeatFailure` retries only the current repetition when it still counts as failed after result classification. SkillGym keeps all repetition and retry artifacts, averages visible duration and token metrics across the final results of completed successful repetitions, and preserves the full nested detail in `results.json`.
189189

190-
Artifacts for repeated runs are grouped under the stable case x runner directory using `repeat-N` directories, with retry attempts nested as `attempt-N` inside the repetition that needed recovery.
190+
Artifacts for repeated executions are grouped under the stable case x runner directory using `repeat-N` directories, with retry sessions nested as `session-N` inside the repetition that needed recovery.
191191

192-
`run.maxSteps` is enforced on a best-effort basis by monitoring each runner's streamed JSONL output. A step is one observed model round, not one token and not necessarily one tool call, but the exact boundary is still runner-defined, so the same prompt may consume different numbers of steps across agents. When the observed step count exceeds the configured limit, skillgym kills the agent process, fails the run with origin `max-steps`, and preserves raw stdout/stderr artifacts for debugging. No partial normalized report is produced for that failure.
192+
`run.maxSteps` is enforced on a best-effort basis by monitoring each runner's streamed JSONL output. A step is one observed model round, not one token and not necessarily one tool call, but the exact boundary is still runner-defined, so the same prompt may consume different numbers of steps across agents. When the observed step count exceeds the configured limit, skillgym kills the agent process, fails the execution with origin `max-steps`, and preserves raw stdout/stderr artifacts for debugging. No partial session report is produced for that failure.
193193

194194
## Workspaces
195195

@@ -200,7 +200,7 @@ A workspace is the directory where an execution runs.
200200
- `shared`: run directly in one real directory
201201
- `isolated`: create a fresh temporary workspace per case x runner execution
202202

203-
Use `shared` when you want the agent to work against your real project checkout. Use `isolated` when you want clean filesystem state per execution or need to prepare each run from a template.
203+
Use `shared` when you want the agent to work against your real project checkout. Use `isolated` when you want clean filesystem state per execution or need to prepare each execution from a template.
204204

205205
You can configure workspaces in `skillgym.config.*` with `run.workspace`, or per suite with a named `workspace` export. Suite-level workspace config overrides config-level `run.workspace`.
206206

@@ -217,15 +217,15 @@ export const workspace = {
217217
};
218218
```
219219

220-
In isolated mode, each execution gets its own workspace. `templateDir` copies a starter project into that workspace, and `bootstrap` runs before the agent starts. Successful isolated runs are cleaned up; failed ones are preserved under `outputDir/workspaces` for debugging.
220+
In isolated mode, each execution gets its own workspace. `templateDir` copies a starter project into that workspace, and `bootstrap` runs before the agent starts. Successful isolated executions are cleaned up; failed ones are preserved under `outputDir/workspaces` for debugging.
221221

222222
See [Workspaces](docs/workspaces.md) for the full workspace reference.
223223

224224
## Assertions
225225

226226
`assert` extends Node's `node:assert/strict` helpers, so standard methods like `assert.ok`, `assert.equal`, and `assert.match` still work.
227227

228-
`assert.soft.*` mirrors the same sync assertion surface and collects failures until the current test case finishes, so one run can report multiple assertion mismatches together.
228+
`assert.soft.*` mirrors the same sync assertion surface and collects failures until the current case finishes, so one execution can report multiple assertion mismatches together.
229229

230230
Built-in grouped assertions cover:
231231

@@ -269,16 +269,16 @@ assert.fileReads.includes(report, /SKILL\.md$/, {
269269
});
270270
```
271271

272-
When at least one explainable assertion fails, skillgym writes `explain.json` into the failed leaf artifact directory. Running `skillgym explain <artifactDir>` resumes the original runner session, asks each persisted question, and writes `explanations.json` with the answers.
272+
When at least one explainable assertion fails, skillgym writes `explain.json` into the failed artifact directory. Running `skillgym explain <artifactDir>` resumes the original runner session, asks each persisted question, and writes `explanations.json` with the answers.
273273

274-
For historical isolated-workspace runs, deferred explain currently depends on the recorded workspace still being resumable by the underlying runner.
274+
For historical isolated-workspace executions, deferred explain currently depends on the recorded workspace still being resumable by the underlying runner.
275275

276276
See the [assertion reference](docs/assertions.md).
277277
See [Deferred Explain](docs/explain.md).
278278

279279
## Snapshots
280280

281-
Snapshot checks can fail runs when token usage regresses beyond a configured tolerance.
281+
Snapshot checks can fail executions when token usage regresses beyond a configured tolerance.
282282

283283
```bash
284284
npx skillgym run ./examples/basic-suite.ts --update-snapshots
@@ -294,7 +294,7 @@ The [skill selection suite](examples/skill-selection-suite.ts) targets a real in
294294
npx skillgym run ./examples/skill-selection-suite.ts
295295
```
296296

297-
The [workspace isolation suite](examples/workspace-isolation-suite.ts) demonstrates isolated workspace setup with a template directory and bootstrap command:
297+
The [workspace isolation suite](examples/workspace-isolation-suite.ts) demonstrates an isolated workspace with a template directory and bootstrap command:
298298

299299
```bash
300300
npx skillgym run ./examples/workspace-isolation-suite.ts
@@ -311,7 +311,7 @@ npx skillgym run ./examples/failure-classification-suite.ts
311311
The documentation site is at [incubator.callstack.com/skillgym](https://incubator.callstack.com/skillgym/). Repository docs:
312312

313313
- [Docs Overview](docs/readme.md)
314-
- [Test Cases](docs/test-cases.md)
314+
- [Test Cases](docs/cases.md)
315315
- [Assertions](docs/assertions.md)
316316
- [Workspaces](docs/workspaces.md)
317317
- [Reporters](docs/reporters.md)

docs/assertions.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ assert.classify("missing-flag", () => {
2121

2222
## Failure classification
2323

24-
Use `assert.classify(...)` when you want an assertion failure to carry a stable structured class that reporters can group across runs.
24+
Use `assert.classify(...)` when you want an assertion failure to carry a stable structured class that reporters can group across executions.
2525

2626
```ts
2727
assert.classify({ id: "wrong-cli-alias", label: "Wrong CLI alias" }, () => {
@@ -51,7 +51,7 @@ Rules:
5151
`assert.soft` mirrors the sync assertion methods on the root `assert` export and the grouped SkillGym helpers.
5252

5353
- soft failures are collected in execution order
54-
- the runner throws a single `AssertionError` after `testCase.assert(report, ctx)` completes
54+
- the runner throws a single `AssertionError` after `case_.assert(report, ctx)` completes
5555
- if a hard `AssertionError` is thrown after soft failures were collected, the final failure includes both
5656
- `assert.soft.rejects(...)` and `assert.soft.doesNotReject(...)` remain hard assertions in the first implementation
5757

@@ -116,7 +116,7 @@ Grouped assertions can attach a follow-up question that `skillgym` persists when
116116

117117
- `explain.question` can be a fixed string
118118
- or a callback that renders a question from the failing assertion context
119-
- questions are persisted only for failed runs
119+
- questions are persisted only for failed executions
120120
- unsupported assertions are skipped unless you provide a custom `explain.question`
121121

122122
Example:
@@ -130,7 +130,7 @@ assert.fileReads.includes(report, /SKILL\.md$/, {
130130
});
131131
```
132132

133-
When at least one explainable assertion fails, `skillgym` writes `explain.json` into the failed leaf artifact directory. You can later resume the original runner session with `skillgym explain <artifactDir>`.
133+
When at least one explainable assertion fails, `skillgym` writes `explain.json` into the failed artifact directory. You can later resume the original runner session with `skillgym explain <artifactDir>`.
134134

135135
## Skills
136136

@@ -350,5 +350,5 @@ assert.output.notEmpty(report);
350350

351351
## Related docs
352352

353-
- `test-cases.md`
353+
- `cases.md`
354354
- `session-report.md`

0 commit comments

Comments
 (0)