@fede0089/skill-eval 1.4.0 → 1.4.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.
Files changed (3) hide show
  1. package/README.md +5 -15
  2. package/dist/index.js +12 -10
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -20,7 +20,7 @@ For each eval prompt, skill-eval spins up parallel agent processes with the curr
20
20
  └───────┬───────┘
21
21
 
22
22
  ┌───────────┴───────────┐
23
- ─ with skill ─ ─ baseline ─
23
+ ─ with skill ─ ─ baseline (opt)
24
24
  ┌──────┴──────┐ ┌─────┴──────┐
25
25
  agent 1 agent 2 agent 3 agent 4
26
26
  │ │ │ │
@@ -32,6 +32,8 @@ For each eval prompt, skill-eval spins up parallel agent processes with the curr
32
32
  ```
33
33
 
34
34
  > The `trigger` command only runs with-skill trials and checks whether the skill dispatch tool was actually invoked — no judge or baseline needed.
35
+ >
36
+ > The baseline branch is opt-in: enable it with `--compare-baseline` (no-skill control) or `--compare-ref <ref>` (historical skill versions).
35
37
 
36
38
  ## Installation
37
39
 
@@ -157,6 +159,7 @@ Refer to your runner's documentation for the full list of available settings and
157
159
  This repo includes a `mock-skill/` directory — a complete, working example of a license-generator skill with trigger and functional evals. Run it directly with:
158
160
 
159
161
  ```sh
162
+ npm run test:unit # run the unit test suite
160
163
  npm run test:trigger # trigger evaluation against mock-skill
161
164
  npm run test:functional # functional evaluation against mock-skill
162
165
  ```
@@ -181,17 +184,4 @@ The factory, preflight check, and CLI all pick it up automatically.
181
184
  ### Adding a new report format
182
185
 
183
186
  1. Create `src/reporters/<format>-reporter.ts` implementing `Reporter`.
184
- 2. Export it and add a case in `createReporter()` in `src/reporters/index.ts`.
185
- 3. Add the format string to `ReportFormat` in `src/types/index.ts`.
186
- er, binary: '<cli-binary-name>' },
187
- ```
188
-
189
- The factory, preflight check, and CLI all pick it up automatically.
190
-
191
- > Implement `applyRunnerConfig(evalConfigBaseDir, worktreePath)` to copy `evalConfigBaseDir/<your-agent>/` into the appropriate config directory in the worktree (e.g. `.claude/` for a Claude runner). No-op silently if the directory doesn't exist.
192
-
193
- ### Adding a new report format
194
-
195
- 1. Create `src/reporters/<format>-reporter.ts` implementing `Reporter`.
196
- 2. Export it and add a case in `createReporter()` in `src/reporters/index.ts`.
197
- 3. Add the format string to `ReportFormat` in `src/types/index.ts`.
187
+ 2. Add a case for it in `createReporter()` in `src/reporters/index.ts`.
package/dist/index.js CHANGED
@@ -8,7 +8,9 @@ import { HtmlReporter } from './reporters/index.js';
8
8
  import { DEFAULT_AGENT } from './runners/registry.js';
9
9
  import * as path from 'path';
10
10
  import * as fs from 'fs';
11
+ import { createRequire } from 'module';
11
12
  import { fileURLToPath } from 'url';
13
+ const pkg = createRequire(import.meta.url)('../package.json');
12
14
  export const program = new Command();
13
15
  const errorHandler = (err) => {
14
16
  if (err instanceof AppError) {
@@ -26,7 +28,7 @@ const errorHandler = (err) => {
26
28
  program
27
29
  .name('skill-eval')
28
30
  .description('CLI to evaluate agent skills triggering and functionality')
29
- .version('1.0.0')
31
+ .version(pkg.version)
30
32
  .option('-v, --debug', 'Enable debug logging', false);
31
33
  program.on('option:debug', () => {
32
34
  process.env.DEBUG = 'true';
@@ -36,16 +38,16 @@ program
36
38
  .description('Evaluate triggering of an agent skill')
37
39
  .requiredOption('--workspace <path>', 'Path to the workspace/repo to evaluate against')
38
40
  .requiredOption('--skill <path>', 'Path to the skill directory')
39
- .option('--agents <number>', 'Number of parallel agents')
40
- .option('--trials <number>', 'Number of trials per task for pass@k calculation')
41
+ .option('--agents <number>', 'Number of parallel agents', '4')
42
+ .option('--trials <number>', 'Number of trials per task for pass@k calculation', '3')
41
43
  .option('--timeout <seconds>', 'Agent timeout in seconds')
42
44
  .option('--eval-id <id>', 'Run only the eval with this ID (numeric)')
43
45
  .option('--compare-ref [refs...]', 'Compare against historical git references')
44
46
  .action((agent, options) => {
45
47
  const workspace = path.resolve(options.workspace);
46
48
  const selectedAgent = agent || DEFAULT_AGENT;
47
- const maxAgents = parseInt(options.agents, 10) || 4;
48
- const numTrials = options.trials !== undefined ? (parseInt(options.trials, 10) || 3) : 3;
49
+ const maxAgents = parseInt(options.agents, 10);
50
+ const numTrials = parseInt(options.trials, 10);
49
51
  const timeoutMs = options.timeout ? parseInt(options.timeout, 10) * 1000 : undefined;
50
52
  const evalId = options.evalId !== undefined ? parseInt(options.evalId, 10) : undefined;
51
53
  const compareRefs = options.compareRef || [];
@@ -53,11 +55,11 @@ program
53
55
  });
54
56
  program
55
57
  .command('functional [agent]')
56
- .description('Evaluate functional correctness of an agent skill based on assertions')
58
+ .description('Evaluate functional correctness of an agent skill against expectations')
57
59
  .requiredOption('--workspace <path>', 'Path to the workspace/repo to evaluate against')
58
60
  .requiredOption('--skill <path>', 'Path to the skill directory')
59
- .option('--agents <number>', 'Number of parallel agents')
60
- .option('--trials <number>', 'Number of trials per task for pass@k calculation')
61
+ .option('--agents <number>', 'Number of parallel agents', '4')
62
+ .option('--trials <number>', 'Number of trials per task for pass@k calculation', '3')
61
63
  .option('--timeout <seconds>', 'Agent timeout in seconds')
62
64
  .option('--eval-id <id>', 'Run only the eval with this ID (numeric)')
63
65
  .option('--compare-ref [refs...]', 'Compare against historical git references')
@@ -65,8 +67,8 @@ program
65
67
  .action((agent, options) => {
66
68
  const workspace = path.resolve(options.workspace);
67
69
  const selectedAgent = agent || DEFAULT_AGENT;
68
- const maxAgents = parseInt(options.agents, 10) || 4;
69
- const numTrials = options.trials !== undefined ? (parseInt(options.trials, 10) || 3) : 3;
70
+ const maxAgents = parseInt(options.agents, 10);
71
+ const numTrials = parseInt(options.trials, 10);
70
72
  const timeoutMs = options.timeout ? parseInt(options.timeout, 10) * 1000 : undefined;
71
73
  const evalId = options.evalId !== undefined ? parseInt(options.evalId, 10) : undefined;
72
74
  const compareRefs = options.compareRef || [];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fede0089/skill-eval",
3
- "version": "1.4.0",
4
- "description": "CLI to evaluate agent skills triggering",
3
+ "version": "1.4.1",
4
+ "description": "CLI to evaluate agent skills triggering and functionality",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
7
7
  "skill-eval": "dist/index.js"