Skip to content

Rename rule types from semi-objective/subjective to check/judge#49

Merged
oshorefueled merged 1 commit intomainfrom
feat/rule_type
Jan 2, 2026
Merged

Rename rule types from semi-objective/subjective to check/judge#49
oshorefueled merged 1 commit intomainfrom
feat/rule_type

Conversation

@oshorefueled
Copy link
Contributor

@oshorefueled oshorefueled commented Jan 2, 2026

BREAKING CHANGE: Rule type terminology has changed

  • 'semi-objective' → 'check'
  • 'subjective' → 'judge'

Backward compatibility is maintained via Zod schema transform. Existing configs using old type names will continue to work.

Changes:

  • Update EvaluationType enum with new JUDGE/CHECK values
  • Add Zod transform to map deprecated values to new canonical values
  • Rename internal methods to runJudgeEvaluation/runCheckEvaluation
  • Update all VectorLint preset rules to use type: check
  • Update CREATING_RULES.md, CONFIGURATION.md, README.md documentation
  • Fix missing 'pack' property in test fixtures
  • Apply npm audit fixes for glob and js-yaml vulnerabilities
  • Bump version to 2.2.0

Summary by CodeRabbit

Release Notes - v2.2.0

  • Documentation

    • Updated terminology across configuration documentation, rule creation guides, and README for enhanced clarity and consistency.
    • Refined descriptions of scoring methodologies and evaluation approaches.
  • Chores

    • Version bump to 2.2.0.
    • Updated preset definitions and metadata with new terminology.

✏️ Tip: You can customize this high-level summary in your review settings.

…k/judge

BREAKING CHANGE: Rule type terminology has changed
- 'semi-objective' → 'check'
- 'subjective' → 'judge'

Backward compatibility is maintained via Zod schema transform.
Existing configs using old type names will continue to work.

Changes:
- Update EvaluationType enum with new JUDGE/CHECK values
- Add Zod transform to map deprecated values to new canonical values
- Rename internal methods to runJudgeEvaluation/runCheckEvaluation
- Update all VectorLint preset rules to use type: check
- Update CREATING_RULES.md, CONFIGURATION.md, README.md documentation
- Fix missing 'pack' property in test fixtures
- Apply npm audit fixes for glob and js-yaml vulnerabilities
- Bump version to 2.2.0
@coderabbitai
Copy link

coderabbitai bot commented Jan 2, 2026

📝 Walkthrough

Walkthrough

This PR renames evaluation type semantics across the codebase from "Semi-Objective/Subjective" to "Check/Judge," updating documentation, preset rules, source code (evaluators, schemas, scoring), and tests. Version bumped to 2.2.0. Backward compatibility is preserved in schema validation via a transform mapping deprecated values.

Changes

Cohort / File(s) Summary
Documentation & Release
CONFIGURATION.md, CREATING_RULES.md, README.md, package.json
Terminology replaced: "Semi-Objective Rules" → "Check Rules", "Subjective Rules" → "Judge Rules"; scoring descriptions and examples updated to reflect new semantics; version bumped from 2.1.1 to 2.2.0.
Preset Rule Definitions
presets/VectorLint/ai-pattern.md, presets/VectorLint/directness.md, presets/VectorLint/pseudo-advice.md, presets/VectorLint/repetition.md
Type field changed from semi-objective to check in rule frontmatter metadata.
Evaluation Type Definitions
src/evaluators/types.ts
EvaluationType enum members replaced: SUBJECTIVEJUDGE, SEMI_OBJECTIVECHECK.
Evaluator Routing & Methods
src/evaluators/base-evaluator.ts
Method renames: runSubjectiveEvaluationrunJudgeEvaluation, runSemiObjectiveEvaluationrunCheckEvaluation; getEvaluationType() now returns JUDGE or CHECK; routing logic in evaluate() updated accordingly.
Schema & Type Guards
src/prompts/schema.ts
Schema builder names and result type discriminators updated: buildSubjectiveLLMSchema returns vectorlint_judge_result, buildSemiObjectiveLLMSchema returns vectorlint_check_result; SubjectiveResult.type now uses JUDGE, SemiObjectiveResult.type now uses CHECK; type guards updated.
Prompt Schema Validation
src/schemas/prompt-schemas.ts
Type field enum expanded to include both new (judge, check) and deprecated (subjective, semi-objective) values; inline transform maps deprecated values to canonical forms for backward compatibility.
Scoring Result Labels
src/scoring/scorer.ts
Result type labels updated in multiple scoring functions: SEMI_OBJECTIVECHECK, SUBJECTIVEJUDGE in returned object type fields; documentation comments updated.
Test Suites & Fixtures
tests/scoring-types.test.ts
Test suite names renamed ("Subjective" → "Judge", "Semi-Objective" → "Check"); prompt fixtures updated with new type values and pack metadata; result type assertions updated to expect JUDGE/CHECK.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

Suggested reviewers

  • ayo6706

Poem

🐰 From Subjective dreams to Judging days,
Semi-Objective rules now Check their ways,
Hopping through code with nomenclature cheer,
A lexicon refresh, crystal clear!

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 37.50% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: renaming rule types from semi-objective/subjective to check/judge, which is the primary breaking change throughout the codebase and documentation.
✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/evaluators/base-evaluator.ts (1)

32-42: Consider updating the class-level documentation to reflect new terminology.

The class documentation still references "Subjective and Semi-Objective" terminology while the code now uses "judge" and "check". Consider updating for consistency with the rest of the PR.

🔎 Suggested documentation update
 /*
- * Core LLM-based evaluator that handles Subjective and Semi-Objective evaluation modes.
+ * Core LLM-based evaluator that handles Judge and Check evaluation modes.
  * Mode is determined by prompt frontmatter 'type' field:
- * - 'subjective': Weighted average of 1-4 scores per criterion, normalized to 1-10.
- * - 'semi-objective': Density-based scoring (errors per 100 words).
+ * - 'judge': Weighted average of 1-4 scores per criterion, normalized to 1-10.
+ * - 'check': Density-based scoring (errors per 100 words).
  *
  * Content is automatically chunked for documents >600 words to improve accuracy.
  *
  * Subclasses can override protected methods to customize evaluation behavior
  * while reusing the core evaluation logic.
  */
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 245156a and ebdc0ed.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (14)
  • CONFIGURATION.md
  • CREATING_RULES.md
  • README.md
  • package.json
  • presets/VectorLint/ai-pattern.md
  • presets/VectorLint/directness.md
  • presets/VectorLint/pseudo-advice.md
  • presets/VectorLint/repetition.md
  • src/evaluators/base-evaluator.ts
  • src/evaluators/types.ts
  • src/prompts/schema.ts
  • src/schemas/prompt-schemas.ts
  • src/scoring/scorer.ts
  • tests/scoring-types.test.ts
🧰 Additional context used
📓 Path-based instructions (2)
src/**/*.ts

📄 CodeRabbit inference engine (AGENTS.md)

src/**/*.ts: Use TypeScript ESM with explicit imports and narrow types
Use 2-space indentation; avoid trailing whitespace
Maintain strict TypeScript with no any; use unknown + schema validation for external data
Use custom error types with proper inheritance; catch blocks use unknown type

Files:

  • src/schemas/prompt-schemas.ts
  • src/evaluators/types.ts
  • src/scoring/scorer.ts
  • src/evaluators/base-evaluator.ts
  • src/prompts/schema.ts
tests/**/*.test.ts

📄 CodeRabbit inference engine (AGENTS.md)

tests/**/*.test.ts: Write tests using Vitest framework with focus on config parsing, file discovery, schema/structured output, and locator
Use dependency injection in tests: mock providers; do not hit network in unit tests

Files:

  • tests/scoring-types.test.ts
🧠 Learnings (8)
📓 Common learnings
Learnt from: CR
Repo: TRocket-Labs/vectorlint PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-28T19:43:51.189Z
Learning: Applies to evals/**/*.md : Eval YAML should use `name` (human), `id` (PascalCase), and criteria `id` (PascalCase)
📚 Learning: 2025-12-28T19:43:51.189Z
Learnt from: CR
Repo: TRocket-Labs/vectorlint PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-28T19:43:51.189Z
Learning: Applies to src/output/**/*.ts : IDs should be shown as `PromptId.CriterionId` in output

Applied to files:

  • src/schemas/prompt-schemas.ts
  • src/prompts/schema.ts
  • tests/scoring-types.test.ts
📚 Learning: 2025-12-28T19:43:51.189Z
Learnt from: CR
Repo: TRocket-Labs/vectorlint PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-28T19:43:51.189Z
Learning: Applies to evals/**/*.md : Eval YAML should use `name` (human), `id` (PascalCase), and criteria `id` (PascalCase)

Applied to files:

  • src/schemas/prompt-schemas.ts
  • CREATING_RULES.md
  • tests/scoring-types.test.ts
📚 Learning: 2025-12-28T19:43:51.189Z
Learnt from: CR
Repo: TRocket-Labs/vectorlint PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-28T19:43:51.189Z
Learning: Organize rules into subdirectories (packs) within RulesPath; use company names (e.g., Acme, TechCorp, Stripe) to indicate which style guide the rules implement

Applied to files:

  • CREATING_RULES.md
📚 Learning: 2025-12-28T19:43:51.189Z
Learnt from: CR
Repo: TRocket-Labs/vectorlint PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-28T19:43:51.189Z
Learning: Recursively load all `.md` files from within each rule pack; multiple packs can be used simultaneously

Applied to files:

  • CREATING_RULES.md
📚 Learning: 2025-12-28T19:43:51.189Z
Learnt from: CR
Repo: TRocket-Labs/vectorlint PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-28T19:43:51.189Z
Learning: Applies to evals/**/*.md : Evals must include YAML frontmatter; the tool appends evidence instructions automatically

Applied to files:

  • CREATING_RULES.md
  • tests/scoring-types.test.ts
📚 Learning: 2025-12-28T19:43:51.189Z
Learnt from: CR
Repo: TRocket-Labs/vectorlint PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-28T19:43:51.189Z
Learning: Applies to src/**/*.ts : Maintain strict TypeScript with no `any`; use `unknown` + schema validation for external data

Applied to files:

  • src/prompts/schema.ts
📚 Learning: 2025-12-28T19:43:51.189Z
Learnt from: CR
Repo: TRocket-Labs/vectorlint PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-28T19:43:51.189Z
Learning: Applies to tests/**/*.test.ts : Write tests using Vitest framework with focus on config parsing, file discovery, schema/structured output, and locator

Applied to files:

  • tests/scoring-types.test.ts
🧬 Code graph analysis (1)
src/scoring/scorer.ts (2)
src/scoring/index.ts (2)
  • SubjectiveScoringOptions (3-3)
  • averageSubjectiveScores (6-6)
src/prompts/schema.ts (1)
  • SubjectiveResult (123-143)
🔇 Additional comments (26)
package.json (1)

3-3: Version bump aligns with breaking changes.

The 2.2.0 bump correctly reflects the breaking change in rule type terminology (semi-objective → check, subjective → judge) while preserving backward compatibility via schema transforms.

presets/VectorLint/pseudo-advice.md (1)

1-17: Frontmatter structure and terminology update are correct.

The type field correctly transitions from semi-objective to check, and the frontmatter adheres to naming conventions (PascalCase IDs, human-readable names). The preset rule structure is properly formatted.

CONFIGURATION.md (1)

155-155: Terminology update maintains documentation clarity.

The change from "semi-objective" to "check" rules aligns with the new taxonomy and accurately describes rules evaluated by objective criteria. The context (strictness mechanism) remains clear and consistent.

presets/VectorLint/ai-pattern.md (1)

3-3: Type rename correctly applied.

The change from "semi-objective" to "check" aligns with the PR objectives and terminology updates. The frontmatter structure and naming conventions (name in human form, id in PascalCase) follow expected patterns.

presets/VectorLint/directness.md (1)

3-3: Type rename correctly applied.

The change from "semi-objective" to "check" is consistent with the PR objectives. Frontmatter and naming conventions align with the expected structure (name in human form, id in PascalCase).

README.md (1)

49-49: Scoring description updated appropriately.

The revised text clarifies that rubric-based scoring applies to nuanced evaluations (now termed "judges"), aligning with the broader terminology shift from subjective → judge. This supports users understanding the distinction between density-based (checks) and rubric-based (judges) scoring systems.

presets/VectorLint/repetition.md (1)

3-3: LGTM!

The type: check update aligns correctly with the terminology rename from semi-objective to check.

src/evaluators/types.ts (1)

14-17: LGTM!

The EvaluationType enum is correctly updated with the new JUDGE and CHECK members. The naming convention (uppercase enum keys, lowercase string values) is consistent with the existing Type and Severity enums.

src/schemas/prompt-schemas.ts (1)

44-52: LGTM! Good backward compatibility approach.

The Zod transform elegantly maps deprecated values (subjectivejudge, semi-objectivecheck) while accepting new canonical values directly. This ensures existing configurations continue to work without modification.

src/scoring/scorer.ts (3)

91-91: LGTM!

The result type discriminator correctly uses EvaluationType.CHECK, aligning with the new terminology.


140-140: LGTM!

The result type discriminator correctly uses EvaluationType.JUDGE.


146-157: LGTM!

The averageSubjectiveScores function correctly returns EvaluationType.JUDGE for both the empty result case (line 153) and the aggregated result (line 277).

tests/scoring-types.test.ts (3)

17-33: LGTM!

The test fixture is correctly updated with the new type: "judge" and includes the required pack: "test" property that was missing before.


80-92: LGTM!

The checkPrompt fixture correctly uses type: "check" and includes the pack property.


185-186: LGTM!

The Technical Accuracy Evaluator test correctly adds the pack property and uses type: "check".

src/evaluators/base-evaluator.ts (4)

53-57: LGTM!

The dispatch logic correctly routes to runJudgeEvaluation or runCheckEvaluation based on the new EvaluationType values.


64-71: LGTM!

The getEvaluationType method correctly:

  1. Returns the narrowed union type JUDGE | CHECK
  2. Checks for the canonical "judge" string value (post-Zod transform)
  3. Defaults to CHECK for backward compatibility when type is undefined or "check"

117-176: LGTM!

The runJudgeEvaluation method is correctly renamed and the implementation remains sound for weighted criterion-based scoring.


186-231: LGTM!

The runCheckEvaluation method is correctly renamed and maintains the density-based violation scoring logic.

src/prompts/schema.ts (5)

4-6: LGTM!

The schema name is correctly updated to vectorlint_judge_result.


58-60: LGTM!

The schema name is correctly updated to vectorlint_check_result.


123-124: LGTM!

The SubjectiveResult type discriminator correctly uses EvaluationType.JUDGE.


154-155: LGTM!

The SemiObjectiveResult type discriminator correctly uses EvaluationType.CHECK.


175-185: LGTM!

Both type guard functions (isSubjectiveResult and isSemiObjectiveResult) are correctly updated to check for the new EvaluationType.JUDGE and EvaluationType.CHECK values respectively.

CREATING_RULES.md (2)

130-140: Default value and scoring formula are correctly implemented.

Verification confirms:

  • Default type is check (src/evaluators/base-evaluator.ts)
  • Strictness presets match documentation: Lenient (5), Standard (10), Strict (20) (src/scoring/scorer.ts:33-39)
  • Density-based scoring formula is correctly implemented: Score = (100 - (violations/wordCount * 100 * strictness)) / 10 (src/scoring/scorer.ts:46, 66-70)

No action required.


10-11: Terminology update is thorough and consistent throughout the documentation.

The renaming from semi-objective/subjective to check/judge is applied uniformly across table of contents, section headers, examples, and configuration reference. Verification confirms:

  • Enum values match: EvaluationType.JUDGE = 'judge' and EvaluationType.CHECK = 'check'
  • Default value 'check' is correctly documented
  • Judge scoring documented as 1-4 scale normalized to 1-10 (confirmed in calculateSubjectiveScore)
  • Check scoring documented as density-based formula (confirmed in implementation)
  • All five examples in CREATING_RULES.md use valid type values
  • Deprecated aliases ('subjective' → 'judge', 'semi-objective' → 'check') are documented

@oshorefueled oshorefueled merged commit 0fddb2c into main Jan 2, 2026
3 checks passed
oshorefueled added a commit that referenced this pull request Mar 2, 2026
…k/judge (#49)

BREAKING CHANGE: Rule type terminology has changed
- 'semi-objective' → 'check'
- 'subjective' → 'judge'

Backward compatibility is maintained via Zod schema transform.
Existing configs using old type names will continue to work.

Changes:
- Update EvaluationType enum with new JUDGE/CHECK values
- Add Zod transform to map deprecated values to new canonical values
- Rename internal methods to runJudgeEvaluation/runCheckEvaluation
- Update all VectorLint preset rules to use type: check
- Update CREATING_RULES.md, CONFIGURATION.md, README.md documentation
- Fix missing 'pack' property in test fixtures
- Apply npm audit fixes for glob and js-yaml vulnerabilities
- Bump version to 2.2.0
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.

1 participant