Skip to content

[BUG]: Rubric input adds YAML separators and omits root-linked Markdown #233

Closed

Description

@Tomauskasz

What happened?

rubric-eval changes the source presented to its judge in two ways:

  • It wraps SKILL.md in --- even when the file already starts with YAML frontmatter. A real evaluation incorrectly reported malformed frontmatter; the deterministic defect is the added separators, not a guaranteed YAML-parser failure.
  • Supplement collection scans scripts/ and references/, omitting root-linked guides such as PRINCIPLES.md and DEEPENING.md.

Expected: judge the original file and its required local guidance.

Reproduction steps

No model call needed:

from pathlib import Path
from tempfile import TemporaryDirectory
from skillevaluator.validators.rubric_eval import RubricJudge, _collect_supplementary_content

text = "---\nname: example\ndescription: Example\n---\n[Guide](GUIDE.md)\n"
prompt = RubricJudge().create_user_prompt(skill_name="example", skill_content=text)
assert "SKILL.md Content:\n---\n---\n" in prompt  # extra separator
with TemporaryDirectory() as directory:
    root = Path(directory)
    (root / "SKILL.md").write_text(text)
    (root / "GUIDE.md").write_text("Required guidance")
    assert _collect_supplementary_content(root) == {"scripts": {}, "references": {}}

Suggested fix

Remove only formatter-owned separators. Collect reachable local Markdown with cycle detection, secure root containment and a finite aggregate budget. Missing or incomplete required references should stop judgment.

This local repair passed source-framing/reference tests and a fresh live rubric evaluation. Criteria, weights and thresholds stayed unchanged.

SkillEvaluator version or commit

Observed on v0.6.0; reproduced against current source c9d170e77bdef0b32a4811fb9b14484578559b2e, validators/rubric_eval.py.

Environment

macOS arm64, Python 3.13; source-level reproduction is provider-independent.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions