Skip to content

refactor: rename assert: to assertions: in EVAL.yaml schema (#603)#604

Merged
christso merged 2 commits intomainfrom
refactor/603-assert-to-assertions
Mar 15, 2026
Merged

refactor: rename assert: to assertions: in EVAL.yaml schema (#603)#604
christso merged 2 commits intomainfrom
refactor/603-assert-to-assertions

Conversation

@christso
Copy link
Copy Markdown
Collaborator

Summary

  • Renames the YAML key assert:assertions: in EVAL.yaml files, schema, parser, validator, tests, and all docs
  • Preserves assert: as a deprecated backward-compatible alias: the parser still accepts it and emits a console warning when used at the suite level
  • Regenerates eval-schema.json to reflect the updated Zod schema

Files changed

  • Schema (eval-file.schema.ts): adds assertions: as primary field on EvalFileSchema, keeps assert: as @deprecated alias
  • Types (yaml-parser.ts): updates RawTestSuite and RawEvalCase type definitions; reads assertions ?? assert; emits deprecation warning for old key
  • Parser/loader (evaluator-parser.ts): updates warning messages to reference assertions
  • Validator (eval-validator.ts): validates assertions ?? assert; updates error message locations
  • 48 YAML example files: assert:assertions:
  • Test fixtures (eval-validator.test.ts, evaluator-parser.test.ts, criteria-optional.test.ts): primary tests updated to use assertions:, backward-compat test added for assert:
  • Docs (README.md, apps/cli/README.md, apps/web/, plugins SKILL.md files, examples READMEs): all YAML code snippets updated

Risk

Low — pure rename with backward-compatible fallback. No logic changed. All CI checks pass.

Closes #603

Rename the YAML key `assert:` to `assertions:` across the codebase.
The old `assert:` key is preserved as a deprecated backward-compatible
alias with a console warning when used at the suite level.

Changes:
- eval-file.schema.ts: add `assertions:` as primary field on EvalFileSchema
- yaml-parser.ts: read `assertions ?? assert` for suite/test-level fields;
  emit deprecation warning for old `assert` key
- eval-validator.ts: validate `assertions ?? assert`; update error message
  locations to reference `assertions`
- evaluator-parser.ts: update warning messages to reference `assertions`
- All examples/*.yaml: rename `assert:` → `assertions:`
- All test fixtures: update YAML strings and primary object keys
- All docs/README/skills: update YAML code snippets
- Regenerate eval-schema.json to reflect updated Zod schema
@christso christso marked this pull request as ready for review March 15, 2026 03:55
@christso christso merged commit 6435c00 into main Mar 15, 2026
1 check was pending
@christso christso deleted the refactor/603-assert-to-assertions branch March 15, 2026 03:56
christso added a commit that referenced this pull request Mar 15, 2026
christso added a commit that referenced this pull request Mar 15, 2026
…ator (#597)

* feat(providers,evaluators): add claude-cli provider and trigger-judge evaluator (#593)

- Add ClaudeCliProvider that spawns `claude -p` as a subprocess, streams
  output via --output-format stream-json --include-partial-messages, and
  extracts tool calls, token usage, and cost from stream events
- Rename existing SDK provider class to ClaudeSdkProvider (claude-sdk.ts)
  with kind 'claude-sdk' for explicit opt-in to the Agent SDK path
- Register 'claude' and 'claude-cli' as aliases for ClaudeCliProvider;
  'claude-sdk' maps to ClaudeSdkProvider
- Add 'claude-cli' and 'claude-sdk' to ProviderKind, AGENT_PROVIDER_KINDS,
  KNOWN_PROVIDERS, and ResolvedTarget union
- Add TriggerJudgeEvaluator that checks whether the agent invoked a named
  skill by scanning tool calls for Skill invocations (args.skill match) or
  skill file reads (.claude/commands/, .claude/skills/)
- Register trigger-judge in evaluator parser, schema, builtin registry,
  and EvaluatorConfig union
- Regenerate eval-schema.json to include trigger-judge schema
- Add unit tests for trigger-judge evaluator and claude provider aliases

* fix(providers): guard stdio access for null safety in claude-cli provider

* fix(providers): add --verbose flag to claude-cli subprocess invocation

--output-format stream-json requires --verbose when using -p (--print) mode.
Without it the CLI exits with code 1 immediately.

Also adds E2E tests validating output, tokenUsage, durationMs, and log
file emission parity between claude-cli and claude-sdk providers.

* refactor(evaluators): move trigger-judge from built-in to .agentv/judges/ example

Removes TriggerJudgeEvaluator from core built-ins (violates Principles 1 & 2:
Claude-Code-specific, expressible as a code-judge script) and adds:

- packages/core/src/evaluation/registry/judge-discovery.ts: new discoverJudges()
  function, mirroring discoverAssertions() but scans .agentv/judges/
- Wired discoverJudges into orchestrator alongside discoverAssertions
- Exported discoverJudges from core public API and registry/index.ts
- examples/features/agent-skills-evals/.agentv/judges/trigger-judge.ts:
  reference implementation as a code-judge script using defineCodeJudge
- Regenerated eval-schema.json (trigger-judge removed from EvaluatorSchema union)

* style: format eval-schema.json with biome

* docs: use assert instead of evaluators in trigger-judge example comment

* refactor(judges): align trigger-judge detection with skill-creator run_eval.py

* docs(judges): update trigger-judge example comment assert: → assertions:

Align with the global rename from PR #604.
christso added a commit that referenced this pull request Mar 17, 2026
Aligns documentation with the assert: → assertions: YAML key rename
completed in PR #604. Updates prose references, YAML examples, table
entries, SDK code samples, skill docs, and agent prompts across 17 files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
christso added a commit that referenced this pull request Mar 17, 2026
Aligns documentation with the assert: → assertions: YAML key rename
completed in PR #604. Updates prose references, YAML examples, table
entries, SDK code samples, skill docs, and agent prompts across 17 files.

Co-authored-by: Claude Opus 4.6 <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.

refactor: rename assert: to assertions: in EVAL.yaml schema

1 participant