@vibe-agent-toolkit/cli 0.1.41-rc.4 → 0.1.41-rc.5

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.
@@ -8,6 +8,7 @@
8
8
  import { runSkillTestHarness, type SkillPackagingConfig } from '@vibe-agent-toolkit/agent-skills';
9
9
  import type { SkillSourceDescriptor } from '@vibe-agent-toolkit/resources';
10
10
  import { Command } from 'commander';
11
+ import { type BuildableReference } from '../../../skill-resolution/index.js';
11
12
  export interface SkillTestRunOptions {
12
13
  with?: string[];
13
14
  withOptional?: string[];
@@ -103,18 +104,81 @@ export interface ResolvedSubject {
103
104
  */
104
105
  declaredExecutables?: DeclaredExecutable[];
105
106
  }
107
+ /**
108
+ * Build GATING for a declared skill: the flags that decide IF a build happens.
109
+ * Assembled once per run in {@link runSkillTestRun} and threaded, unchanged, through
110
+ * SUBJECT and COMPANION resolution so both arms share one gate.
111
+ *
112
+ * Deliberately carries NO `test.build` command. That hook is per-SKILL, not per-run:
113
+ * it is declared by one skill in one config and runs with THAT config's root as cwd,
114
+ * so it travels beside the ref being built (see {@link buildDeclaredSkill}'s
115
+ * `buildCommand`), never inside this shared gate. A subject's command riding in here
116
+ * would execute against every companion's config root.
117
+ */
118
+ export interface BuildFlags {
119
+ /** Skip the build entirely and stage the existing dist (errors if absent). */
120
+ noBuild: boolean;
121
+ /** Assemble a preview only — never build, never spawn. */
122
+ dryRun: boolean;
123
+ /** The §12 security acknowledgment: required before ANY build command runs. */
124
+ acknowledged: boolean;
125
+ }
106
126
  /**
107
127
  * Project-aware subject resolution for `vat skill test run`. Resolves the subject
108
128
  * reference; for a declared skill, builds it (real entry points) and returns the
109
129
  * dist dir to stage; everything else is staged as-is. Throws SkillBuildError
110
130
  * (exit 2) for name-miss / not-found / --no-build-without-dist / build failure.
131
+ *
132
+ * `memo` is the per-run build memo (see {@link BuildMemo}) — pass the SAME map used
133
+ * for companion resolution so a skill that is both subject and companion builds once.
134
+ *
135
+ * `buildCommand` is the SUBJECT's own `test.build` hook, resolved by
136
+ * {@link loadTestConfig} (which carries a bare-name/basename fallback a raw config
137
+ * lookup lacks). It applies to the subject's build ONLY — companions resolve theirs
138
+ * from their own governing config.
111
139
  */
112
- export declare function resolveSubjectForTest(ref: string, cwd: string, flags: {
113
- noBuild: boolean;
114
- dryRun: boolean;
115
- acknowledged: boolean;
116
- build?: string;
117
- }): Promise<ResolvedSubject>;
140
+ export declare function resolveSubjectForTest(ref: string, cwd: string, flags: BuildFlags, memo: BuildMemo, buildCommand: string | undefined): Promise<ResolvedSubject>;
141
+ /** Result of {@link buildDeclaredSkill}: where the built (or reused) dist landed. */
142
+ export interface BuildDeclaredSkillResult {
143
+ distDir: string;
144
+ rebuilt: boolean;
145
+ /**
146
+ * Set only under --dry-run: true = an existing dist was staged WITHOUT
147
+ * rebuilding (may be stale); false = no dist existed yet so the preview fell
148
+ * back to the source dir. Absent for a real (non-dry-run) build.
149
+ */
150
+ dryRunStagedExistingDist?: boolean;
151
+ }
152
+ /**
153
+ * Per-run memo of BUILD OPERATIONS, so one build operation never runs twice in a
154
+ * run. Two disjoint key namespaces share the set: the declared-skill build itself
155
+ * (`pool:` / `plugin:`, see {@link buildMemoKey}) and the `test.build` pre-stage
156
+ * shell hook (`hook:`, see {@link preStageHookMemoKey}) — the hook needs its own
157
+ * because two DIFFERENT skills in one config may declare the SAME command, which
158
+ * is one hook invocation but two distinct builds.
159
+ *
160
+ * A `Set` of operation keys, NOT a `Map` caching results: the key identifies an
161
+ * OPERATION, not a skill, and a
162
+ * `plugin-local` operation rebuilds the WHOLE marketplace, so two different skills
163
+ * in that marketplace deliberately share one key while having DIFFERENT
164
+ * `expectedDistDir`s. A result cached under that shared key would be valid only for
165
+ * the ref that recorded it — handing it to the other ref would stage the WRONG
166
+ * skill's dist. {@link verifyBuiltDist} is what a memo hit re-derives (always keyed
167
+ * off THIS ref, never a cached value) to avoid exactly that bug.
168
+ */
169
+ export type BuildMemo = Set<string>;
170
+ /**
171
+ * Identity of the BUILD OPERATION a {@link BuildableReference} triggers — the memo key.
172
+ *
173
+ * A `pool` skill is built by `packageSkill` into its own `expectedDistDir`, so that
174
+ * dir IS the operation's identity. A `plugin-local` skill is built by
175
+ * `runClaudePluginBuild`, which `rm -rf`s and rebuilds EVERY plugin in the whole
176
+ * marketplace — so the operation's identity is the (configRoot, marketplace) pair,
177
+ * NOT the skill. Keying plugin-local per skill would make a second companion in the
178
+ * same marketplace trigger a full marketplace wipe-and-rebuild that reproduces work
179
+ * the first call already did.
180
+ */
181
+ export declare function buildMemoKey(ref: BuildableReference): string;
118
182
  /**
119
183
  * Companion analog of {@link resolveBuildableSubject} (issue #158): resolve every
120
184
  * `--with`/`--with-optional` companion whose spec is a `{ path }` pointing at a
@@ -123,26 +187,22 @@ export declare function resolveSubjectForTest(ref: string, cwd: string, flags: {
123
187
  * url:/vendored specs, or a path outside this project's config — is "a different
124
188
  * story" (per the issue's own framing): left untouched, staged as today.
125
189
  *
126
- * A REQUIRED companion's build failure propagates (matches the existing "--with
127
- * fails if a source cannot be resolved" contract, extended to "cannot be built").
128
- * An OPTIONAL companion's build failure falls back to the ORIGINAL (unbuilt) path
129
- * spec — this fix must never make an already-degraded optional companion WORSE;
130
- * staging's existing skip-with-warning fallback still applies if that raw copy
131
- * also fails to stage.
190
+ * The `test.build` hook used is the COMPANION's own — read from the config that
191
+ * governs IT ({@link declaredSkillTestConfig}), not the subject's. The subject's hook
192
+ * is a different skill's command in a (possibly) different package, and running it
193
+ * here would execute it with the companion's config root as cwd.
194
+ *
195
+ * FAILURE HANDLING. A REQUIRED companion's failure ALWAYS propagates (the existing
196
+ * "--with fails if a source cannot be resolved" contract, extended to "cannot be
197
+ * built"), re-messaged to name the alias the user typed. An OPTIONAL companion
198
+ * degrades to the ORIGINAL (unbuilt) path spec — with a mandatory stderr note — only
199
+ * for the narrow, non-destructive case {@link isSurvivableCompanionFailure} allows;
200
+ * every other failure propagates for it too. Staging's existing skip-with-warning
201
+ * fallback still applies if the raw copy also fails to stage.
132
202
  */
133
- export declare function resolveCompanionSpec(name: string, spec: SkillSourceSpec, repoRoot: string, flags: {
134
- noBuild: boolean;
135
- dryRun: boolean;
136
- acknowledged: boolean;
137
- build?: string;
138
- }, optional: boolean): Promise<SkillSourceSpec>;
203
+ export declare function resolveCompanionSpec(name: string, spec: SkillSourceSpec, repoRoot: string, flags: BuildFlags, optional: boolean, memo: BuildMemo): Promise<SkillSourceSpec>;
139
204
  /** Resolve every entry of a `--with`/`--with-optional` companion record (see {@link resolveCompanionSpec}). */
140
- export declare function resolveCompanionSources(sources: Record<string, SkillSourceSpec> | undefined, repoRoot: string, flags: {
141
- noBuild: boolean;
142
- dryRun: boolean;
143
- acknowledged: boolean;
144
- build?: string;
145
- }, optional: boolean): Promise<Record<string, SkillSourceSpec> | undefined>;
205
+ export declare function resolveCompanionSources(sources: Record<string, SkillSourceSpec> | undefined, repoRoot: string, flags: BuildFlags, optional: boolean, memo: BuildMemo): Promise<Record<string, SkillSourceSpec> | undefined>;
146
206
  /**
147
207
  * True when the resolved subject is a CONFIG-BLIND path target: a `{ path }` source
148
208
  * staged AS-IS (not built) that does NOT map back to a declared skill, so the project's
@@ -1 +1 @@
1
- {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../../src/commands/skill/test/run.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,EAQL,mBAAmB,EAKnB,KAAK,oBAAoB,EAC1B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAiB,qBAAqB,EAAc,MAAM,+BAA+B,CAAC;AAEtG,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAgDpC,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,G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,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,eAAe,CAAC;IAC/B,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC,GAAG,OAAO,CAEV;AAqFD;;;;;;;;GAQG;AACH,wBAAsB,eAAe,CACnC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,IAAI,CAAC,CAyEf;AAMD,wBAAgB,yBAAyB,IAAI,OAAO,CAgHnD"}
@@ -12,7 +12,7 @@ import { findProjectRoot, safePath, toForwardSlash } from '@vibe-agent-toolkit/u
12
12
  import { Command } from 'commander';
13
13
  import { parseSourceSpec } from '../../../skill-resolution/classify.js';
14
14
  import { findDeclaredSkillForPath, findDeclaredSkillForSourceDir, resolveSkillReference, } from '../../../skill-resolution/index.js';
15
- import { ConfigLoadError, loadConfig } from '../../../utils/config-loader.js';
15
+ import { ConfigLoadError, loadConfig, loadConfigCached } from '../../../utils/config-loader.js';
16
16
  import { runClaudePluginBuild } from '../../claude/plugin/build.js';
17
17
  import { assertValidAuth, assertValidRequireAuth } from './auth-flags.js';
18
18
  /** Extract the trailing path segment (cross-platform) from a path-like string. */
@@ -164,6 +164,17 @@ export function descriptorsToRecord(list) {
164
164
  // ---------------------------------------------------------------------------
165
165
  // Precedence resolution: flag > config > default
166
166
  // ---------------------------------------------------------------------------
167
+ /**
168
+ * Read a DECLARED skill's own `skills.config.<name>.test` block from the config that
169
+ * governs IT — keyed by the declared name against that skill's `configRoot`, never by
170
+ * cwd. The one lookup used wherever "what did THIS skill declare?" is the question:
171
+ * {@link loadTestConfig}'s path-target arm and companion `test.build` resolution
172
+ * ({@link resolveCompanionSpec}), so a companion in a nested config never inherits the
173
+ * subject's block.
174
+ */
175
+ function declaredSkillTestConfig(link) {
176
+ return loadConfigCached(link.configRoot)?.skills?.config?.[link.name]?.test;
177
+ }
167
178
  /**
168
179
  * Load the persisted `skills.config.<skill>.test` block for the subject skill,
169
180
  * PROJECT-AWARE (mirrors the resolver — not a parallel cwd+basename resolver).
@@ -183,9 +194,8 @@ async function loadTestConfig(subject, cwd) {
183
194
  // Path target → resolve the declared skill it materializes, and read its test
184
195
  // block from that skill's own governing config root (cwd-independent).
185
196
  const link = await findDeclaredSkillForPath(subject, cwd);
186
- if (link !== undefined) {
187
- return loadConfig(link.configRoot)?.skills?.config?.[link.name]?.test;
188
- }
197
+ if (link !== undefined)
198
+ return declaredSkillTestConfig(link);
189
199
  const projectRoot = findProjectRoot(cwd);
190
200
  if (projectRoot === null)
191
201
  return undefined;
@@ -399,8 +409,16 @@ function sourceScaffoldFields(source, declaredSkill, cwd) {
399
409
  * reference; for a declared skill, builds it (real entry points) and returns the
400
410
  * dist dir to stage; everything else is staged as-is. Throws SkillBuildError
401
411
  * (exit 2) for name-miss / not-found / --no-build-without-dist / build failure.
412
+ *
413
+ * `memo` is the per-run build memo (see {@link BuildMemo}) — pass the SAME map used
414
+ * for companion resolution so a skill that is both subject and companion builds once.
415
+ *
416
+ * `buildCommand` is the SUBJECT's own `test.build` hook, resolved by
417
+ * {@link loadTestConfig} (which carries a bare-name/basename fallback a raw config
418
+ * lookup lacks). It applies to the subject's build ONLY — companions resolve theirs
419
+ * from their own governing config.
402
420
  */
403
- export async function resolveSubjectForTest(ref, cwd, flags) {
421
+ export async function resolveSubjectForTest(ref, cwd, flags, memo, buildCommand) {
404
422
  const resolved = await resolveSkillReference(ref, cwd);
405
423
  switch (resolved.kind) {
406
424
  case 'source':
@@ -418,7 +436,7 @@ export async function resolveSubjectForTest(ref, cwd, flags) {
418
436
  // A buildable ref carries `packagingConfig` — the ONE cleanly-reachable place
419
437
  // the subject's declared executables live — so attach the grader recognition
420
438
  // aid here (a plain source has no packaging config and leaves it undefined).
421
- const subject = await resolveBuildableSubject(resolved, flags);
439
+ const subject = await resolveBuildableSubject(resolved, flags, memo, buildCommand);
422
440
  const declaredExecutables = deriveDeclaredExecutableNames(resolved.packagingConfig.executables);
423
441
  return declaredExecutables === undefined ? subject : { ...subject, declaredExecutables };
424
442
  }
@@ -449,6 +467,98 @@ function resolveExistingDistOrThrow(ref, flags) {
449
467
  }
450
468
  throw new SkillBuildError(`--no-build: no built dist at ${ref.expectedDistDir} for '${ref.name}'. Run \`vat build\` first, or point at a built path.`);
451
469
  }
470
+ /**
471
+ * Identity of the BUILD OPERATION a {@link BuildableReference} triggers — the memo key.
472
+ *
473
+ * A `pool` skill is built by `packageSkill` into its own `expectedDistDir`, so that
474
+ * dir IS the operation's identity. A `plugin-local` skill is built by
475
+ * `runClaudePluginBuild`, which `rm -rf`s and rebuilds EVERY plugin in the whole
476
+ * marketplace — so the operation's identity is the (configRoot, marketplace) pair,
477
+ * NOT the skill. Keying plugin-local per skill would make a second companion in the
478
+ * same marketplace trigger a full marketplace wipe-and-rebuild that reproduces work
479
+ * the first call already did.
480
+ */
481
+ export function buildMemoKey(ref) {
482
+ return ref.distribution.kind === 'pool'
483
+ ? `pool:${ref.expectedDistDir}`
484
+ : `plugin:${ref.configRoot}:${ref.distribution.marketplaceName}`;
485
+ }
486
+ /**
487
+ * Assert a completed build actually MATERIALIZED `ref.expectedDistDir` with a real
488
+ * skill in it, and return the result to stage. A build that reports success but
489
+ * writes nothing (or writes an empty shell with no `SKILL.md`) would otherwise hand
490
+ * back a path a required companion then fails opaquely at staging, or an OPTIONAL
491
+ * one silently skips — the exact non-functional-companion-with-no-diagnostic
492
+ * symptom of issue #158. Two distinct checks, two distinct messages, so the error
493
+ * tells the author which failure mode they hit:
494
+ * 1. `expectedDistDir` itself is missing — "no output at all".
495
+ * 2. `expectedDistDir` exists but has no `SKILL.md` — an empty/incomplete shell.
496
+ *
497
+ * Also runs on a memo HIT, because a plugin-local hit may have been recorded by a
498
+ * DIFFERENT skill in the same marketplace: the dist dir always comes from THIS ref
499
+ * and is always checked.
500
+ */
501
+ function verifyBuiltDist(ref) {
502
+ // eslint-disable-next-line security/detect-non-literal-fs-filename -- expectedDistDir derived from project config
503
+ if (!existsSync(ref.expectedDistDir)) {
504
+ throw new SkillBuildError(`Skill build for '${ref.name}' reported success but produced no output at ${ref.expectedDistDir}. ` +
505
+ `Check the skill's packaging config (\`vat build\` should create this directory).`);
506
+ }
507
+ const skillMdPath = safePath.join(ref.expectedDistDir, 'SKILL.md');
508
+ // eslint-disable-next-line security/detect-non-literal-fs-filename -- skillMdPath derived from project config
509
+ if (!existsSync(skillMdPath)) {
510
+ throw new SkillBuildError(`Skill build for '${ref.name}' reported success but produced no SKILL.md at ${ref.expectedDistDir}. ` +
511
+ `Check the skill's packaging config (\`vat build\` should create this file).`);
512
+ }
513
+ return { distDir: ref.expectedDistDir, rebuilt: true };
514
+ }
515
+ /**
516
+ * Identity of a `test.build` PRE-STAGE HOOK invocation — the (cwd, command) pair, which
517
+ * is everything that distinguishes one shell invocation from another. Namespaced `hook:`
518
+ * so it can never collide with a {@link buildMemoKey} entry in the shared {@link BuildMemo}.
519
+ */
520
+ function preStageHookMemoKey(configRoot, buildCommand) {
521
+ return `hook:${configRoot}:${buildCommand}`;
522
+ }
523
+ /**
524
+ * Run a skill's `test.build` pre-stage hook, at most ONCE per (configRoot, command)
525
+ * within a run — the "runs that shell command ONCE before staging" contract documented
526
+ * on {@link runPreStageBuild}, preserved now that a run may build several skills.
527
+ *
528
+ * The command ALWAYS runs with the config root of the skill that DECLARED it as cwd
529
+ * (both values come from the same ref), so a subject's hook can never execute against
530
+ * a companion's package root. Memoized only on SUCCESS: a hook that failed and was
531
+ * tolerated (optional companion) is retried rather than treated as done.
532
+ *
533
+ * KNOWN LIMITATION: for `plugin-local` skills, the memo key this call is gated behind
534
+ * ({@link buildMemoKey} in {@link buildDeclaredSkill}) is the shared `plugin:<configRoot>:
535
+ * <marketplace>` key, not a per-skill one — because one marketplace build serves every
536
+ * participant. When two declared skills share a marketplace, only the FIRST participant's
537
+ * `test.build` hook runs; the second skill's own hook is silently skipped, since by the
538
+ * time its build call is reached the memo already reports the marketplace as built and
539
+ * this function is never invoked for it. Fixing that requires gathering the hook set for
540
+ * every marketplace participant BEFORE the one marketplace build — out of scope here.
541
+ */
542
+ function runPreStageBuildOnce(buildCommand, configRoot, memo) {
543
+ if (buildCommand === undefined)
544
+ return;
545
+ const key = preStageHookMemoKey(configRoot, buildCommand);
546
+ if (memo.has(key))
547
+ return;
548
+ runPreStageBuild({ buildCommand, configRoot });
549
+ memo.add(key);
550
+ }
551
+ /** Dispatch the real build for a declared skill, by how it ships. Throws the raw build error. */
552
+ async function runDeclaredSkillBuild(ref) {
553
+ if (ref.distribution.kind === 'pool') {
554
+ await packageSkill(ref.sourcePath, packagingConfigToPackageOptions(ref.packagingConfig, {
555
+ skillPath: ref.sourcePath,
556
+ outputPath: ref.expectedDistDir,
557
+ }));
558
+ return;
559
+ }
560
+ await runClaudePluginBuild(ref.configRoot, { marketplace: ref.distribution.marketplaceName });
561
+ }
452
562
  /**
453
563
  * Build a declared skill (BuildableReference) into its `expectedDistDir`, or reuse
454
564
  * the existing dist under --no-build/--dry-run. Shared by SUBJECT resolution
@@ -457,8 +567,23 @@ function resolveExistingDistOrThrow(ref, flags) {
457
567
  * skill gets the exact same build treatment as the subject (issue #158) — its
458
568
  * `files:` injection runs before staging, instead of a raw, possibly
459
569
  * build-artifact-incomplete, source-tree copy.
570
+ *
571
+ * `buildCommand` is the `test.build` pre-stage hook DECLARED BY THIS REF's skill —
572
+ * never a shared per-run flag. It runs with `ref.configRoot` as cwd, so command and
573
+ * cwd always come from the same skill's config (see {@link runPreStageBuildOnce}).
574
+ * GUARANTEED to run (once, on the first call for this ref) for a `pool`-distributed
575
+ * skill, whose memo key is per-skill. KNOWN LIMITATION for `plugin-local` skills: the
576
+ * memo key is the shared marketplace build, so when two declared skills share a
577
+ * marketplace, only the FIRST participant reaching this function gets its hook run —
578
+ * the second skill's build is served by the memo hit at the check below, and its own
579
+ * `test.build` hook is silently skipped (see {@link runPreStageBuildOnce}).
580
+ *
581
+ * `memo` collapses repeat work within ONE run (see {@link buildMemoKey}). It is
582
+ * consulted only AFTER the no-build/dry-run short-circuit and AFTER the security-ack
583
+ * gate: a cached build result must never be handed to a caller that has not passed
584
+ * the ack, and the no-build branch performs no build to memoize.
460
585
  */
461
- async function buildDeclaredSkill(ref, flags) {
586
+ async function buildDeclaredSkill(ref, flags, memo, buildCommand) {
462
587
  // --no-build and --dry-run never build — delegate to the dedicated branch helper.
463
588
  if (flags.noBuild || flags.dryRun) {
464
589
  return resolveExistingDistOrThrow(ref, flags);
@@ -471,30 +596,36 @@ async function buildDeclaredSkill(ref, flags) {
471
596
  if (!flags.acknowledged) {
472
597
  throw new SecurityAckError();
473
598
  }
599
+ const key = buildMemoKey(ref);
600
+ // Memo HIT: this operation already ran in THIS process — skip the rebuild, but
601
+ // still verify this ref's own dist (the hit may be a marketplace sibling's).
602
+ if (memo.has(key))
603
+ return verifyBuiltDist(ref);
474
604
  // test.build hook (upstream artifacts) BEFORE the skill build -- ordering matters.
475
- if (flags.build !== undefined) {
476
- runPreStageBuild({ buildCommand: flags.build, configRoot: ref.configRoot });
477
- }
605
+ runPreStageBuildOnce(buildCommand, ref.configRoot, memo);
606
+ // ANY error thrown here is wrapped as `SkillBuildError` below, not just a narrowly-
607
+ // scoped build-tool failure — see {@link isSurvivableCompanionFailure} for why that
608
+ // matters to companion degradation. `err.stack` is also captured at construction,
609
+ // so it keeps reflecting THIS un-prefixed message even after a caller mutates
610
+ // `.message` in place (see {@link rethrowNamingCompanion}).
478
611
  try {
479
- if (ref.distribution.kind === 'pool') {
480
- await packageSkill(ref.sourcePath, packagingConfigToPackageOptions(ref.packagingConfig, {
481
- skillPath: ref.sourcePath,
482
- outputPath: ref.expectedDistDir,
483
- }));
484
- }
485
- else {
486
- await runClaudePluginBuild(ref.configRoot, { marketplace: ref.distribution.marketplaceName });
487
- }
612
+ await runDeclaredSkillBuild(ref);
488
613
  }
489
614
  catch (e) {
490
615
  throw new SkillBuildError(`Skill build failed for '${ref.name}': ${e instanceof Error ? e.message : String(e)}`);
491
616
  }
492
- return { distDir: ref.expectedDistDir, rebuilt: true };
617
+ // Record the operation as soon as the build COMMAND succeeded — before verifying
618
+ // this ref's output. The build did run; a marketplace sibling must not re-run it
619
+ // just because this skill's own dist turned out to be missing. Verification is
620
+ // deliberately OUTSIDE the try/catch so its SkillBuildError is not re-wrapped into
621
+ // a doubled "Skill build failed for 'x': Skill build for 'x' reported success…".
622
+ memo.add(key);
623
+ return verifyBuiltDist(ref);
493
624
  }
494
625
  /** Build a declared skill (or stage its existing dist under --no-build/--dry-run), then return the dist to stage. */
495
- async function resolveBuildableSubject(ref, flags) {
626
+ async function resolveBuildableSubject(ref, flags, memo, buildCommand) {
496
627
  const scaffoldDir = dirname(ref.sourcePath);
497
- const build = await buildDeclaredSkill(ref, flags);
628
+ const build = await buildDeclaredSkill(ref, flags, memo, buildCommand);
498
629
  return {
499
630
  subjectSource: { path: build.distDir },
500
631
  subjectScaffoldDir: scaffoldDir,
@@ -505,6 +636,69 @@ async function resolveBuildableSubject(ref, flags) {
505
636
  : { dryRunStagedExistingDist: build.dryRunStagedExistingDist }),
506
637
  };
507
638
  }
639
+ /**
640
+ * May an OPTIONAL companion's failure be DEGRADED to "stage its raw source instead"
641
+ * rather than failing the run? True for a genuine build failure ({@link SkillBuildError})
642
+ * that could not have been DESTRUCTIVE. Both narrowings matter:
643
+ *
644
+ * - **Error class.** Everything else reaching the catch is a user-fixable PREFLIGHT
645
+ * problem, not a degraded companion: a {@link SecurityAckError} (the fix is
646
+ * `--i-understand-this-runs-skill-code`, not "your companion didn't build"), a
647
+ * `ConfigLoadError` (a broken config reported as a build failure), or a
648
+ * `BuildHookError` (a genuinely misconfigured `test.build`). Swallowing those
649
+ * replaces the actionable message with a misleading one. Note that
650
+ * {@link buildDeclaredSkill} wraps ANY error `runDeclaredSkillBuild` throws —
651
+ * including a malformed packaging config or a stray `TypeError` deep inside
652
+ * `packageSkill` — into `SkillBuildError`, so "genuine build failure" here really
653
+ * means "anything the build call raised", not just a narrowly-scoped build error.
654
+ * - **Destructiveness.** A `plugin-local` build is DESTRUCTIVE once it reaches
655
+ * `runClaudePluginBuild`: that function `rm -rf`s the whole marketplace output
656
+ * tree BEFORE building, so a failure THERE may leave the user's
657
+ * `dist/.claude/plugins/marketplaces/<mp>/` already gone. Continuing would stage
658
+ * from an inconsistent dist and finish SUCCESS with the build output deleted — a
659
+ * test command must never destroy build output and report only a "Note:". A
660
+ * `pool` build writes only its own `expectedDistDir` and destroys nothing, so
661
+ * falling back to the raw source tree is always safe there. And under
662
+ * `--no-build`/`--dry-run`, `resolveExistingDistOrThrow` throws BEFORE
663
+ * `buildDeclaredSkill` reaches any build path at all — no build was attempted,
664
+ * plugin-local or not, so nothing was wiped either way and degrading is safe.
665
+ *
666
+ * A real (non `--no-build`/`--dry-run`) `plugin-local` failure stays fail-closed
667
+ * because it MAY have failed mid-wipe; `runClaudePluginBuild` can also throw BEFORE
668
+ * the `rm` (broken config, colliding plugin names), but those are indistinguishable
669
+ * from outside once wrapped in `SkillBuildError`, so fail-closed is deliberate there.
670
+ */
671
+ function isSurvivableCompanionFailure(err, declared, optional, flags) {
672
+ if (!optional || !(err instanceof SkillBuildError))
673
+ return false;
674
+ return declared.distribution.kind === 'pool' || flags.noBuild || flags.dryRun;
675
+ }
676
+ /**
677
+ * Rethrow a companion failure with the `--with`/`--with-optional` ALIAS the user
678
+ * TYPED prefixed onto its message. Build errors name only the DECLARED skill, which
679
+ * with several companions leaves the user unable to tell which flag to fix.
680
+ *
681
+ * The message is prefixed IN PLACE so the error's CLASS (and therefore its
682
+ * `exitCode` / {@link mapErrorToExitCode} mapping) is unchanged — no new error class,
683
+ * no re-wrapping. Prefixing is skipped when the message is ALREADY prefixed (starts
684
+ * with `companion '`) — this makes the function idempotent against repeat rethrows of
685
+ * the SAME error object, structurally, rather than relying on a hand-maintained
686
+ * argument that no caught error class is ever cached/reused across companions.
687
+ * {@link ConfigLoadError} instances ARE cached and re-thrown per config root by
688
+ * `loadConfigCached`, so mutating one in place would otherwise corrupt the cache; the
689
+ * already-prefixed check covers this case too (in practice `ConfigLoadError` is
690
+ * thrown by the lookup ABOVE this try and never reaches here — belt-and-braces).
691
+ *
692
+ * NOTE: `err.stack` was captured at construction time and therefore still reflects
693
+ * the UN-PREFIXED message — mutating `.message` afterward does not update `.stack`.
694
+ * Debug output that prints `.stack` can disagree with the prefixed text on stderr.
695
+ */
696
+ function rethrowNamingCompanion(err, alias, declaredName) {
697
+ if (err instanceof Error && !err.message.startsWith("companion '")) {
698
+ err.message = `companion '${alias}' (declared skill '${declaredName}'): ${err.message}`;
699
+ }
700
+ throw err;
701
+ }
508
702
  /**
509
703
  * Companion analog of {@link resolveBuildableSubject} (issue #158): resolve every
510
704
  * `--with`/`--with-optional` companion whose spec is a `{ path }` pointing at a
@@ -513,37 +707,43 @@ async function resolveBuildableSubject(ref, flags) {
513
707
  * url:/vendored specs, or a path outside this project's config — is "a different
514
708
  * story" (per the issue's own framing): left untouched, staged as today.
515
709
  *
516
- * A REQUIRED companion's build failure propagates (matches the existing "--with
517
- * fails if a source cannot be resolved" contract, extended to "cannot be built").
518
- * An OPTIONAL companion's build failure falls back to the ORIGINAL (unbuilt) path
519
- * spec — this fix must never make an already-degraded optional companion WORSE;
520
- * staging's existing skip-with-warning fallback still applies if that raw copy
521
- * also fails to stage.
710
+ * The `test.build` hook used is the COMPANION's own — read from the config that
711
+ * governs IT ({@link declaredSkillTestConfig}), not the subject's. The subject's hook
712
+ * is a different skill's command in a (possibly) different package, and running it
713
+ * here would execute it with the companion's config root as cwd.
714
+ *
715
+ * FAILURE HANDLING. A REQUIRED companion's failure ALWAYS propagates (the existing
716
+ * "--with fails if a source cannot be resolved" contract, extended to "cannot be
717
+ * built"), re-messaged to name the alias the user typed. An OPTIONAL companion
718
+ * degrades to the ORIGINAL (unbuilt) path spec — with a mandatory stderr note — only
719
+ * for the narrow, non-destructive case {@link isSurvivableCompanionFailure} allows;
720
+ * every other failure propagates for it too. Staging's existing skip-with-warning
721
+ * fallback still applies if the raw copy also fails to stage.
522
722
  */
523
- export async function resolveCompanionSpec(name, spec, repoRoot, flags, optional) {
723
+ export async function resolveCompanionSpec(name, spec, repoRoot, flags, optional, memo) {
524
724
  if (!('path' in spec))
525
725
  return spec;
526
726
  const declared = await findDeclaredSkillForSourceDir(spec.path, repoRoot);
527
727
  if (declared === undefined)
528
728
  return spec;
529
729
  try {
530
- const build = await buildDeclaredSkill(declared, flags);
730
+ const build = await buildDeclaredSkill(declared, flags, memo, declaredSkillTestConfig(declared)?.build);
531
731
  return { path: build.distDir };
532
732
  }
533
733
  catch (e) {
534
- if (!optional)
535
- throw e;
734
+ if (!isSurvivableCompanionFailure(e, declared, optional, flags))
735
+ rethrowNamingCompanion(e, name, declared.name);
536
736
  process.stderr.write(`Note: companion '${name}' (declared skill '${declared.name}') failed to build; staging its raw source instead: ${e instanceof Error ? e.message : String(e)}\n`);
537
737
  return spec;
538
738
  }
539
739
  }
540
740
  /** Resolve every entry of a `--with`/`--with-optional` companion record (see {@link resolveCompanionSpec}). */
541
- export async function resolveCompanionSources(sources, repoRoot, flags, optional) {
741
+ export async function resolveCompanionSources(sources, repoRoot, flags, optional, memo) {
542
742
  if (sources === undefined)
543
743
  return undefined;
544
744
  const resolved = {};
545
745
  for (const [name, spec] of Object.entries(sources)) {
546
- resolved[name] = await resolveCompanionSpec(name, spec, repoRoot, flags, optional);
746
+ resolved[name] = await resolveCompanionSpec(name, spec, repoRoot, flags, optional, memo);
547
747
  }
548
748
  return resolved;
549
749
  }
@@ -595,6 +795,19 @@ async function preflightKnobsAndConfig(subject, options, cwd) {
595
795
  process.exit(SkillTestExitCode.Preflight);
596
796
  }
597
797
  }
798
+ /**
799
+ * Exit code for an error escaping EITHER phase of {@link runSkillTestRun}.
800
+ *
801
+ * A broken governing config ({@link ConfigLoadError}) is a user-fixable PREFLIGHT
802
+ * problem (exit 2), not an internal harness failure — {@link mapErrorToExitCode} has
803
+ * no case for it and falls through to Internal (1). ONE helper shared by BOTH catch
804
+ * blocks so the SUBJECT arm and the COMPANION arm can never drift: a companion's
805
+ * governing config root can differ from the subject's, so a broken config is
806
+ * reachable from either arm and must report the same code from both.
807
+ */
808
+ function exitCodeForRunError(err) {
809
+ return err instanceof ConfigLoadError ? SkillTestExitCode.Preflight : mapErrorToExitCode(err);
810
+ }
598
811
  /**
599
812
  * Copy the resolved-subject fields onto the harness options. Optional fields are
600
813
  * only assigned when present (exactOptionalPropertyTypes). Extracted so
@@ -636,22 +849,23 @@ export async function runSkillTestRun(subject, options) {
636
849
  acknowledgedRunsSkillCode: options.iUnderstandThisRunsSkillCode === true,
637
850
  });
638
851
  // Shared by subject AND companion resolution (issue #158) so a --with/--with-optional
639
- // companion that maps to a declared skill gets the exact same build gating (no-build/
640
- // dry-run/security-ack) as the subject.
641
- const buildFlags = {
642
- noBuild,
643
- dryRun: options.dryRun === true,
644
- acknowledged,
645
- ...(config?.build === undefined ? {} : { build: config.build }),
646
- };
852
+ // companion that maps to a declared skill gets the exact same build GATING (no-build/
853
+ // dry-run/security-ack) as the subject. The `test.build` hook is deliberately NOT in
854
+ // here: it is per-skill (see BuildFlags), so the subject's own command is passed only
855
+ // to subject resolution and each companion resolves its own.
856
+ const buildFlags = { noBuild, dryRun: options.dryRun === true, acknowledged };
857
+ // ONE memo for the whole run, shared by subject AND companion resolution: a skill
858
+ // that is both the subject and a companion builds exactly once, and N companions
859
+ // in one marketplace trigger ONE marketplace build, not N.
860
+ const buildMemo = new Set();
647
861
  let resolvedSubject;
648
862
  try {
649
- resolvedSubject = await resolveSubjectForTest(subject, process.cwd(), buildFlags);
863
+ resolvedSubject = await resolveSubjectForTest(subject, process.cwd(), buildFlags, buildMemo, config?.build);
650
864
  }
651
865
  catch (err) {
652
866
  // A broken governing config surfacing during subject resolution is a preflight
653
867
  // problem the user must fix (exit 2), not an internal harness failure (exit 1).
654
- const exitCode = err instanceof ConfigLoadError ? SkillTestExitCode.Preflight : mapErrorToExitCode(err);
868
+ const exitCode = exitCodeForRunError(err);
655
869
  process.stderr.write(`Error: ${err instanceof Error ? err.message : String(err)}\n`);
656
870
  process.exit(exitCode);
657
871
  return;
@@ -667,10 +881,10 @@ export async function runSkillTestRun(subject, options) {
667
881
  // whose source is a path into a declared skill gets built (its `files:`
668
882
  // injection runs) exactly like the subject, instead of a raw source-tree copy.
669
883
  const repoRoot = resolveRepoRoot();
670
- const withSources = await resolveCompanionSources(harnessOpts.withSources, repoRoot, buildFlags, false);
884
+ const withSources = await resolveCompanionSources(harnessOpts.withSources, repoRoot, buildFlags, false, buildMemo);
671
885
  if (withSources !== undefined)
672
886
  harnessOpts.withSources = withSources;
673
- const withOptional = await resolveCompanionSources(harnessOpts.withOptional, repoRoot, buildFlags, true);
887
+ const withOptional = await resolveCompanionSources(harnessOpts.withOptional, repoRoot, buildFlags, true, buildMemo);
674
888
  if (withOptional !== undefined)
675
889
  harnessOpts.withOptional = withOptional;
676
890
  const result = await runSkillTestHarness(harnessOpts);
@@ -680,7 +894,10 @@ export async function runSkillTestRun(subject, options) {
680
894
  return;
681
895
  }
682
896
  catch (err) {
683
- const exitCode = mapErrorToExitCode(err);
897
+ // Same rule as the subject arm above (see {@link exitCodeForRunError}): companion
898
+ // resolution can surface a ConfigLoadError from a DIFFERENT config root than the
899
+ // subject's, and that must exit 2 (preflight), not 1 (internal).
900
+ const exitCode = exitCodeForRunError(err);
684
901
  // BootstrapNeededError (exit 3) is the happy "wrote a template, fill it in
685
902
  // and re-run" path — surface its message plainly, not as a hard `Error:`.
686
903
  if (err instanceof BootstrapNeededError) {
@@ -701,12 +918,12 @@ export function createSkillTestRunCommand() {
701
918
  command
702
919
  .description('Execute a packaged skill\'s eval suite in a headless, context-isolated Claude session (runs the skill\'s code; not an OS sandbox)')
703
920
  .argument('<skill>', 'The skill to test')
704
- .option('--with <pair...>', 'Stage a REQUIRED companion skill the subject can invoke, as name=<src> (repeatable). <src> is workspace:<pkg> | npm:<spec> | url:<u> | path:<dir> | vendored (e.g. helper=npm:@scope/s@1.2.3). The run fails if a source cannot be resolved.')
705
- .option('--with-optional <pair...>', 'Stage an OPTIONAL companion skill, as name=<src> (same syntax, repeatable). Skipped with a warning if its source cannot be resolved; the run continues.')
921
+ .option('--with <pair...>', 'Stage a REQUIRED companion skill the subject can invoke, as name=<src> (repeatable). <src> is workspace:<pkg> | npm:<spec> | url:<u> | path:<dir> | vendored (e.g. helper=npm:@scope/s@1.2.3). A path:<dir> that maps to a declared skill is BUILT like the subject (files: build artifacts included), not tree-copied as raw source. The run fails if a source cannot be resolved or its build fails.')
922
+ .option('--with-optional <pair...>', 'Stage an OPTIONAL companion skill, as name=<src> (same syntax, repeatable). Staged from its raw (unbuilt) source with a warning if its source cannot be resolved, or if a non-destructive build fails; the run continues.')
706
923
  .option('--env <pair...>', 'Inject an env var into the executor spawn as KEY=VALUE (repeatable). Values support ${fixturesDir}, ${stagedSkillDir}, ${harnessRoot}, ${resultsDir}. CLI overrides config for the same key.')
707
924
  .option('--pass-env <key...>', 'Forward a host env var by NAME to the executor spawn if present (repeatable). Protected names (PATH, auth, model) are ignored.')
708
925
  .option('--refresh', 'Force a full re-stage (ignore existing staged content)')
709
- .option('--no-build', 'Skip building a declared skill; stage its existing dist instead (errors if absent)')
926
+ .option('--no-build', 'Skip building declared skills (subject and any --with/--with-optional companion); stage existing dist instead. Errors if absent for the subject or a REQUIRED companion; an OPTIONAL companion falls back to raw source with a warning.')
710
927
  .option('--workdir <dir>', 'Override the harness working directory')
711
928
  .option('--out <dir>', 'Override the harness output directory')
712
929
  .option('--keep', 'Keep the harness directory after the run')
@@ -761,7 +978,7 @@ Model:
761
978
  Exit Codes:
762
979
  0 - Harness ran to completion and every eval passed (or --allow-eval-failure suppressed a failing verdict)
763
980
  1 - Internal error (grader fragment absent/invalid, summary/expectations skew, executor/grader crash, stall/timeout)
764
- 2 - Preflight failed (missing binary, auth error, eval inputs absent, unsafe workdir, ack missing, skill build failed, or --no-build with no existing dist)
981
+ 2 - Preflight failed (missing binary, auth error, eval inputs absent, unsafe workdir, ack missing, broken project config, a required skill -- subject or --with companion -- failed to build, --no-build with no existing dist for one of them, or an OPTIONAL --with-optional companion hitting a non-survivable failure: a destructive plugin-local build failure, missing security ack, or broken config)
765
982
  3 - Bootstrap needed: evals.json was absent, so VAT wrote a starter template next to the skill source. Fill it in and re-run.
766
983
  4 - An eval FAILED (the harness completed and produced a valid grading.json; expectations did not all pass). This is the fail-closed DEFAULT -- suppress with --allow-eval-failure.
767
984
 
@@ -1 +1 @@
1
- {"version":3,"file":"run.js","sourceRoot":"","sources":["../../../../src/commands/skill/test/run.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEvD,OAAO,EACL,oBAAoB,EACpB,yBAAyB,EACzB,cAAc,EACd,kBAAkB,EAClB,YAAY,EACZ,+BAA+B,EAC/B,gBAAgB,EAChB,mBAAmB,EACnB,gBAAgB,EAChB,uBAAuB,EACvB,eAAe,EACf,iBAAiB,GAElB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AACtF,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,EACL,wBAAwB,EACxB,6BAA6B,EAC7B,qBAAqB,GAGtB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEpE,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAE1E,kFAAkF;AAClF,SAAS,eAAe,CAAC,CAAS;IAChC,OAAO,QAAQ,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;A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;;;;;;CAsDL,CACI,CAAC;IAEJ,OAAO,OAAO,CAAC;AACjB,CAAC"}
package/docs/index.md CHANGED
@@ -180,6 +180,45 @@ vat agent run ./my-agent --debug
180
180
 
181
181
  ---
182
182
 
183
+ ### `skill test`
184
+
185
+ Run a packaged skill's eval suite in a headless, context-isolated Claude session
186
+
187
+ **What it does:**
188
+
189
+ 1. Builds and stages the skill (plus any `--with` companion skills)
190
+ 2. Runs each eval with a blind **executor** — the skill under test
191
+ 3. Grades the captured transcript with a separate **grader** model
192
+ 4. Writes `grading.json`, `friction.json`, and `tool-eval.json` to `results/`
193
+
194
+ **When to use:** Verifying a skill actually works before publishing it
195
+
196
+ **Exit codes:**
197
+
198
+ - `0` - Run completed, all expectations passed
199
+ - `1` - Harness broke (internal error, stall, timeout)
200
+ - `2` - Preflight failure (bad config, unresolvable required companion, auth guard)
201
+ - `3` - Bootstrap failure
202
+ - `4` - Eval failure (run completed, expectations did not all pass)
203
+
204
+ **Creates/modifies:** A harness directory (removed unless `--keep`)
205
+
206
+ **Note:** This command executes skill code. It is context-isolated, not an OS
207
+ sandbox — `--i-understand-this-runs-skill-code` is required.
208
+
209
+ **Examples:**
210
+
211
+ ```bash
212
+ vat skill test run my-skill --i-understand-this-runs-skill-code
213
+ vat skill test run my-skill --keep --model claude-opus-5
214
+ vat skill test configure my-skill --auth subscription
215
+ ```
216
+
217
+ **More details:** `packages/cli/docs/skill-test.md` — full knob table for the
218
+ per-skill `skills.config.<skill>.test` block and the global `test:` node
219
+
220
+ ---
221
+
183
222
  ### `rag index`
184
223
 
185
224
  Create vector embeddings for semantic search over documentation
@@ -0,0 +1,169 @@
1
+ # vat skill test - Eval Harness Commands
2
+
3
+ ## Overview
4
+
5
+ The `vat skill test` commands run a packaged skill's eval suite in a headless,
6
+ context-isolated Claude session. Each eval runs in two roles: a blind **executor**
7
+ (the skill under test) performs the task, then a separate **grader** judges the
8
+ captured transcript and emits a verdict.
9
+
10
+ ```bash
11
+ vat skill test run <skill> # execute the eval suite
12
+ vat skill test configure <skill> # persist knobs into vibe-agent-toolkit.config.yaml
13
+ ```
14
+
15
+ > **This command executes skill code.** It is context-isolated, not an OS sandbox.
16
+ > `--i-understand-this-runs-skill-code` is required to acknowledge that.
17
+
18
+ Note the singular `vat skill` — distinct from the `vat skills` (plural) packaging
19
+ commands documented in [skills.md](./skills.md).
20
+
21
+ ## Two config homes
22
+
23
+ Most knobs exist both as a CLI flag (one-off) and a config key (persisted). **Flags
24
+ override config.** There are two places config lives:
25
+
26
+ | Home | Location | Holds |
27
+ |---|---|---|
28
+ | **Per-skill** | `skills.config.<skill>.test` | Everything about testing *one* skill — model under test, budgets, evals, companions |
29
+ | **Global** | top-level `test:` node | Judge/pipeline knobs shared by every skill — `graderModel`, `concurrency` |
30
+
31
+ ```yaml
32
+ # vibe-agent-toolkit.config.yaml
33
+ test: # GLOBAL — the judge and the pipeline
34
+ graderModel: claude-sonnet-5
35
+ concurrency: 4
36
+
37
+ skills:
38
+ config:
39
+ my-skill:
40
+ test: # PER-SKILL — the thing under test
41
+ model: claude-opus-5
42
+ timeout: 1500
43
+ auth: subscription
44
+ requireAuth: subscription
45
+ evals: evals/suite.json
46
+ ```
47
+
48
+ Both blocks are validated under a **strict** schema — an unknown key is a config
49
+ error, not a silent no-op. (This is the deliberate inverse of `evals.json`, which
50
+ VAT reads liberally as adopter-authored data.)
51
+
52
+ `vat skill test configure <skill>` writes the **per-skill** block using a
53
+ comment-preserving YAML upsert, and validates values before writing. Prefer it over
54
+ hand-editing.
55
+
56
+ ## Per-skill knobs (`skills.config.<skill>.test`)
57
+
58
+ Every field is optional; an omitted knob falls back to its default.
59
+
60
+ | Config key | Type / unit | Default | CLI flag | Purpose |
61
+ |---|---|---|---|---|
62
+ | `model` | string | claude's own default | `--model <id>` | Model for the **executor** (the skill under test). Passed **verbatim** to `claude --model` — VAT does no mapping or validation. Pin it for reproducible runs. |
63
+ | `maxTurns` | integer > 0 | none | `--max-turns <n>` | Per-spawn cap on executor/grader turns. |
64
+ | `maxBudgetUsd` | number > 0 | none | `--max-budget-usd <n>` | Hard USD budget cap passed to the CLI. |
65
+ | `timeout` | integer, **seconds** | scales with eval count: ~`2min + 2min/eval`, floored at 5min, capped at 1h | `--timeout <s>` | Wall-clock timeout. An explicit value always overrides the scaled default. |
66
+ | `stall` | integer, **seconds** | none | `--stall <s>` | Stall watchdog — kill the spawn after this long with no stream output. |
67
+ | `evals` | string (path) | bootstrapped suite | `--evals <path>` | Path to `evals.json`, **relative to the skill source**. |
68
+ | `auth` | `inherit` \| `subscription` \| `api-key` \| `auto` | `inherit` | `--auth <mode>` | Auth mechanism for the spawned session. |
69
+ | `requireAuth` | `subscription` \| `api-key` | none | `--require-auth <mech>` | Fail-fast guard: preflight exits `2` if the effective mechanism isn't this. |
70
+ | `baseline` | boolean | `false` | `--baseline` | Run the opt-in with/without A/B skill-lift comparison. |
71
+ | `skillCreator` | source descriptor | `{ vendored: true }` | — | Source for the vendored skill-creator rubric. |
72
+ | `with` | array of source descriptors | none | `--with name=<src>` | **Required** companion skills staged alongside the subject, invocable by it. |
73
+ | `optional` | array of source descriptors | none | `--with-optional name=<src>` | **Optional** companions — skipped with a warning if unresolvable. |
74
+ | `env` | map string→string | none | `--env KEY=VALUE` | Env vars injected into the **executor** spawn. Values interpolate `${fixturesDir}`, `${stagedSkillDir}`, `${harnessRoot}`, `${resultsDir}`. Protected names (PATH, auth, model, admin) cannot be overridden. |
75
+ | `passEnv` | array of strings | none | `--pass-env KEY` | Names of host env vars to forward to the executor spawn if present. Protected names are ignored with a warning. |
76
+ | `build` | string (shell command) | none | — | Command run **once, before staging**, to generate build artifacts. Runs with `cwd` = config root. A non-zero exit aborts the run (exit `2`). |
77
+
78
+ A **source descriptor** is one of `{ workspace: <pkg> }`, `{ npm: <spec> }`,
79
+ `{ url: <u>, sha256?: <hash> }`, `{ path: <dir> }`, or `{ vendored: true }`. On the
80
+ command line the same sources are written as `name=workspace:<pkg>`,
81
+ `name=npm:<spec>`, `name=url:<u>`, `name=path:<dir>`, or `name=vendored` — the CLI
82
+ form requires an explicit companion `name=`, the config form derives it from the
83
+ resolved skill.
84
+
85
+ ### Companion staging and builds
86
+
87
+ A `path:` companion whose source directory maps to a **declared** skill is **built**
88
+ first, exactly like the subject, so its `files:` build artifacts are injected — a
89
+ companion backed by a bundled executable stages functional rather than inert. A
90
+ required companion's build failure fails the run; an optional one falls back to raw
91
+ unbuilt source only when the failure is non-destructive. Each declared skill builds
92
+ **at most once per run**.
93
+
94
+ Staging the same name twice across the subject, `--with`, and `--with-optional` is a
95
+ duplicate-name error (exit `2`).
96
+
97
+ ## Global knobs (top-level `test:`)
98
+
99
+ | Config key | Type | Default | CLI flag | Purpose |
100
+ |---|---|---|---|---|
101
+ | `graderModel` | string | `claude-sonnet-5` | `--grader-model <id>` | Model for the fixed grader/judge. Passed verbatim to `claude --model`. Independent of `model` — you can run the skill under one model and grade under another. |
102
+ | `concurrency` | integer > 0 | `4` | `--concurrency <n>` | Width of the bounded-parallel executor→grader pipeline. |
103
+
104
+ ## Run-only flags (no config key)
105
+
106
+ | Flag | Purpose |
107
+ |---|---|
108
+ | `--i-understand-this-runs-skill-code` | **Required.** Acknowledges the command executes skill code. |
109
+ | `--no-build` | Stage existing `dist` instead of building. Errors if absent for the subject or a **required** companion; an optional companion falls back to raw source with a warning. |
110
+ | `--refresh` | Force a full re-stage, ignoring existing staged content. |
111
+ | `--keep` | Keep the harness directory after the run (needed to inspect `results/`). |
112
+ | `--dry-run` | Assemble the command without spawning Claude. Note this **skips the build**, so it does not preview `files:` injection. |
113
+ | `--out <dir>` / `--workdir <dir>` | Override the harness output / working directory. |
114
+ | `--allow-eval-failure` | Opt out of fail-closed: exit `0` even when an eval fails. For interactive iteration. |
115
+ | `--allow-unverified-skill-source` | Skip the vendored manifest integrity check. |
116
+ | `--debug` | Enable debug logging. |
117
+
118
+ ## Exit codes
119
+
120
+ The harness deliberately separates "the evals failed" from "the harness broke", so
121
+ CI can tolerate one and gate on the other.
122
+
123
+ - `0` - Run completed, all expectations passed
124
+ - `1` - Harness broke (internal error, stall, timeout, grader nonce failure)
125
+ - `2` - Preflight failure (bad config, unresolvable required companion, auth guard, `build` hook failed)
126
+ - `3` - Bootstrap failure
127
+ - `4` - **Eval failure** — the run completed but expectations did not all pass
128
+
129
+ ```bash
130
+ vat skill test run my-skill --i-understand-this-runs-skill-code
131
+ case $? in
132
+ 0) ;;
133
+ 4) echo "evals failed (tolerated)" ;;
134
+ *) exit 1 ;; # harness broke — fail the build
135
+ esac
136
+ ```
137
+
138
+ ## Results
139
+
140
+ With `--keep`, the harness directory retains a `results/` tree that VAT is the sole
141
+ writer of:
142
+
143
+ - `grading.json` - per-expectation verdicts and the pass/total summary
144
+ - `friction.json` - packaging issues observed during the run (advisory)
145
+ - `tool-eval.json` - tool-expectation verdicts; always written, so check
146
+ `.evals.length` rather than file existence
147
+
148
+ ## Examples
149
+
150
+ ```bash
151
+ # Run a declared skill's suite, honoring its test: config
152
+ vat skill test run my-skill --i-understand-this-runs-skill-code
153
+
154
+ # Pin both models independently, keep the harness for inspection
155
+ vat skill test run my-skill --model claude-opus-5 --grader-model claude-sonnet-5 \
156
+ --keep --i-understand-this-runs-skill-code
157
+
158
+ # Stage a required companion the subject is expected to invoke
159
+ vat skill test run router-skill --with helper=path:./skills/helper \
160
+ --i-understand-this-runs-skill-code
161
+
162
+ # Persist knobs instead of passing them every time
163
+ vat skill test configure my-skill --auth subscription --require-auth subscription
164
+ ```
165
+
166
+ ## See Also
167
+
168
+ - [skills.md](./skills.md) - `vat skills` (plural): packaging, validation, install
169
+ - [index.md](./index.md) - full CLI command index
package/docs/skills.md CHANGED
@@ -729,6 +729,8 @@ name: my-help # Instead of "help"
729
729
 
730
730
  ## Related Commands
731
731
 
732
+ - `vat skill test` - Run a skill's eval suite (note the **singular** `skill`); its
733
+ `test:` config surface is documented separately in [skill-test.md](./skill-test.md)
732
734
  - `vat audit` - Comprehensive validation for plugins, marketplaces, and skills
733
735
  - `vat resources validate` - Validate markdown resources (links, anchors)
734
736
  - `vat doctor` - Check environment and installation health
@@ -738,5 +740,6 @@ name: my-help # Instead of "help"
738
740
  ## See Also
739
741
 
740
742
  - [CLI Reference](./index.md) - Complete CLI documentation
743
+ - [Skill Test Command](./skill-test.md) - `vat skill test` eval harness and its config knobs
741
744
  - [Audit Command](./audit.md) - Comprehensive validation
742
745
  - [Resources Command](./resources.md) - Markdown resource validation
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibe-agent-toolkit/cli",
3
- "version": "0.1.41-rc.4",
3
+ "version": "0.1.41-rc.5",
4
4
  "description": "Command-line interface for vibe-agent-toolkit",
5
5
  "type": "module",
6
6
  "bin": {
@@ -41,17 +41,17 @@
41
41
  "//dependencies-note": "DO NOT add example agent packages or adopter packages here. Adopter packages (like vat-development-agents) depend on the CLI binary at build time — declaring them as deps creates a circular build dependency. They are built in a second turbo pass via package#task overrides in turbo.json.",
42
42
  "dependencies": {
43
43
  "@anthropic-ai/sdk": "^0.71.2",
44
- "@vibe-agent-toolkit/agent-config": "0.1.41-rc.4",
45
- "@vibe-agent-toolkit/agent-schema": "0.1.41-rc.4",
46
- "@vibe-agent-toolkit/agent-skills": "0.1.41-rc.4",
47
- "@vibe-agent-toolkit/claude-marketplace": "0.1.41-rc.4",
48
- "@vibe-agent-toolkit/discovery": "0.1.41-rc.4",
49
- "@vibe-agent-toolkit/gateway-mcp": "0.1.41-rc.4",
50
- "@vibe-agent-toolkit/rag": "0.1.41-rc.4",
51
- "@vibe-agent-toolkit/rag-lancedb": "0.1.41-rc.4",
52
- "@vibe-agent-toolkit/resources": "0.1.41-rc.4",
53
- "@vibe-agent-toolkit/utils": "0.1.41-rc.4",
54
- "adm-zip": "^0.5.16",
44
+ "@vibe-agent-toolkit/agent-config": "0.1.41-rc.5",
45
+ "@vibe-agent-toolkit/agent-schema": "0.1.41-rc.5",
46
+ "@vibe-agent-toolkit/agent-skills": "0.1.41-rc.5",
47
+ "@vibe-agent-toolkit/claude-marketplace": "0.1.41-rc.5",
48
+ "@vibe-agent-toolkit/discovery": "0.1.41-rc.5",
49
+ "@vibe-agent-toolkit/gateway-mcp": "0.1.41-rc.5",
50
+ "@vibe-agent-toolkit/rag": "0.1.41-rc.5",
51
+ "@vibe-agent-toolkit/rag-lancedb": "0.1.41-rc.5",
52
+ "@vibe-agent-toolkit/resources": "0.1.41-rc.5",
53
+ "@vibe-agent-toolkit/utils": "0.1.41-rc.5",
54
+ "adm-zip": "^0.6.0",
55
55
  "commander": "^12.1.0",
56
56
  "picomatch": "^4.0.3",
57
57
  "semver": "^7.7.3",
@@ -65,7 +65,7 @@
65
65
  "@types/picomatch": "^4.0.2",
66
66
  "@types/semver": "^7.7.1",
67
67
  "@types/tar": "^6.1.13",
68
- "@vibe-agent-toolkit/dev-tools": "0.1.41-rc.4",
68
+ "@vibe-agent-toolkit/dev-tools": "0.1.41-rc.5",
69
69
  "rimraf": "^6.0.1",
70
70
  "typescript": "^5.7.3",
71
71
  "vitest": "^3.2.4"