Skip to content

Add forbidden skills to skill invocation grader#291

Merged
github-actions[bot] merged 1 commit into
mainfrom
spboyer/forbidden-skills-grader
May 23, 2026
Merged

Add forbidden skills to skill invocation grader#291
github-actions[bot] merged 1 commit into
mainfrom
spboyer/forbidden-skills-grader

Conversation

@spboyer

@spboyer spboyer commented May 23, 2026

Copy link
Copy Markdown
Member

Negative trigger evals need to assert that one specific skill was not invoked without rejecting unrelated skill use. This adds first-class forbidden_skills support to the skill_invocation grader so those checks can stay deterministic and scoped to the skill under test.

Summary

  • Add forbidden_skills to SkillInvocationGraderParameters and relax validation so either required_skills or forbidden_skills can define the grader.
  • Preserve existing required-skill F1 scoring while failing with score 0.0 when a forbidden skill appears.
  • Update eval/task JSON schemas, docs, and generator guidance for forbidden-only and mixed required+forbidden configs.
  • Add regression coverage for forbidden-only pass/fail, mixed behavior, validation, details, and feedback.

Review notes

This is a medium feature with schema and docs impact, so please have a squad member review before merging. mode remains required when required_skills is set, but forbidden-only configs can omit it because ordering is irrelevant.

Validation

  • go test ./...
  • make build
  • make lint (skipped by Makefile because golangci-lint is not installed)
  • cd site && npm ci --no-audit --no-fund && npm run build
  • jq empty schemas/eval.schema.json schemas/task.schema.json

Fixes: #286

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 23, 2026 19:39
@github-actions github-actions Bot enabled auto-merge (squash) May 23, 2026 19:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds first-class forbidden_skills support to the skill_invocation grader so negative-trigger evals can assert that a specific skill was not invoked without rejecting unrelated skill use. Validation is relaxed so either required_skills or forbidden_skills (or both) define the grader, and schemas, docs, and generator guidance are updated accordingly.

Changes:

  • Add ForbiddenSkills field to SkillInvocationGraderParameters and relax validation in both spec and testcase models.
  • Extend grader logic to compute forbidden-skill violations (failing with score 0.0) while preserving existing required-skill F1 scoring; default mode to any_order for forbidden-only configs.
  • Update eval/task JSON schemas (anyOf + conditional mode requirement), docs, generator prompt, and regression tests.
Show a summary per file
File Description
internal/graders/skill_invocation_grader.go Implement forbidden-skill detection, scoring, feedback, and details
internal/graders/skill_invocation_grader_test.go Add tests for forbidden-only, mixed, validation, and details coverage
internal/models/grader_params.go Add ForbiddenSkills field to grader parameters
internal/models/spec.go Relax validation to accept forbidden-only configs
internal/models/testcase.go Relax validator-side validation similarly
internal/models/grader_validation_test.go Add validation tests for forbidden-only configs
schemas/eval.schema.json Schema: anyOf required/forbidden + conditional mode requirement
schemas/task.schema.json Mirror schema change in task schema
docs/graders/skill_invocation.md Document forbidden_skills semantics and examples
site/src/content/docs/guides/graders.mdx Update site guide with forbidden_skills options and example
internal/suggest/prompt.go Update generator prompt to mention forbidden/required/mixed usage

Copilot's findings

  • Files reviewed: 11/11 changed files
  • Comments generated: 0

@github-actions github-actions Bot merged commit f3468f4 into main May 23, 2026
9 checks passed
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.

Feature request: forbidden_skills for skill_invocation grader

3 participants