Skip to content

fix(skill_eval): add trigger-only mode#29

Merged
antongulin merged 1 commit into
antongulin:mainfrom
mxl:fix/skill-eval-trigger-only
Jul 5, 2026
Merged

fix(skill_eval): add trigger-only mode#29
antongulin merged 1 commit into
antongulin:mainfrom
mxl:fix/skill-eval-trigger-only

Conversation

@mxl

@mxl mxl commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Problem

skill_eval runs every query through opencode run even after the synthetic skill has already triggered. This wastes time on downstream workflow output that is irrelevant to trigger detection, and can cause false negatives when the model later hits rate limits, timeouts, or unrelated errors.

Changes

  1. plugin/lib/process.ts: Allow onStdoutChunk callback to return boolean. When true, kill the child process early (with graceful + SIGKILL fallback).

  2. plugin/lib/run-eval.ts:

    • Add triggerOnly option (default true) to RunEvalOptions and runSingleQuery.
    • When triggerOnly=true and the synthetic skill name appears in stdout, immediately return true without waiting for the full process to finish.
  3. plugin/lib/run-loop.ts: Thread triggerOnly through RunLoopOptions into runEval.

  4. plugin/skill-creator.ts: Expose triggerOnly boolean schema arg on both skill_eval and skill_optimize_loop tools.

  5. Tests: Add early-stop test in process.test.ts; add triggerOnly: true to run-loop.test.ts fixture.

Testing

  • npm run build passes
  • npm run test:ts: 44 pass, 0 fail
  • Live eval on video-summary with GPT-5.4: 3/3 passed, triggerOnly stopped runs immediately after trigger

@mxl mxl force-pushed the fix/skill-eval-trigger-only branch from 2935dd7 to 9e9d948 Compare June 23, 2026 08:01
@antongulin antongulin merged commit 2f27a82 into antongulin:main Jul 5, 2026
1 check passed
@antongulin

Copy link
Copy Markdown
Owner

Thanks @mxl — clean PR, merged as-is. The trigger-only mode shipped in v0.2.22 (with a small follow-up in #32 gating the early return on triggerOnly: false).

pull Bot pushed a commit to Mu-L/opencode-skill-creator that referenced this pull request Jul 5, 2026
…escriptionOverride

Reworks antongulin#28: the conflict guard now uses the shared runProcess helper
(10s timeout, no Bun globals in compiled output) with a pure, unit-tested
parser for `opencode debug skill` output. Empty descriptionOverride strings
are treated as omitted in both skill_eval and skill_optimize_loop.

Also gates the triggerOnly early return from antongulin#29 so a triggered run that
ends in a failed process still throws when triggerOnly is false.

Co-authored-by: Michael Ledin <mledin89@gmail.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants