Skip to content

Fix quality scoring with CommonMark structural parsing - #53

Merged
chrisknvidia merged 6 commits into
mainfrom
fix/christopherk/quality-score-commonmark-followup
Aug 21, 2026
Merged

Fix quality scoring with CommonMark structural parsing#53
chrisknvidia merged 6 commits into
mainfrom
fix/christopherk/quality-score-commonmark-followup

Conversation

@chrisknvidia

Copy link
Copy Markdown
Collaborator

Summary

  • Replace the hand-written Markdown scanner with markdown-it-py CommonMark token parsing.
  • Remove deterministic prose-intent inference for MCP usage, temporal language, README guidance, and exclusivity claims.
  • Preserve the Issue quality_score.py keyword checks match bare substrings, so some rules fire on correct content and others cannot fail #30 word-boundary fixes and existing shared XML-tag behavior.
  • Normalize local Markdown targets for README and nested-reference policies, including encoded paths, queries/fragments, Windows separators, raw HTML anchors, code, images, and comments.
  • Declare the parser dependency and update the third-party notice, changelog, and Tier 1 documentation.

Why

This is a follow-up to #45 and its post-merge review. The previous implementation used regexes to infer author intent and reimplemented substantial Markdown syntax. Those approaches were difficult to maintain and could produce false score changes for valid prose or Markdown.

Deterministic Tier 1 scoring now relies on unambiguous lexical boundaries and parsed structural evidence. Semantic documentation quality remains the responsibility of rubric-eval, while observed execution behavior remains a Tier 3 concern.

Validation

  • Review Guru final pass: no Critical, Important, or minor findings.
  • Python 3.12 full suite: 3,773 passed, 12 skipped, 4 deselected.
  • Python 3.13 full suite: 3,773 passed, 12 skipped, 4 deselected.
  • Representative corpus: 527 tracked skills, zero exceptions, zero pass/fail flips, and zero added findings. The only changes were removal of 31 MCP and 2 temporal false-positive deductions.
  • ruff check ., changed-file formatting, uv lock --check, OSS source/archive scans, and git diff --check passed.
  • Wheel and sdist build, strict Twine validation, fresh-wheel installation, and a real JSON quality report passed.
  • Fern validation reported zero errors; redirect checking was skipped because the local environment was not authenticated.

One bridge test was intentionally excluded from both full-suite runs because an unrelated existing process owns port 18080. The untouched origin/main baseline reproduces the same environmental failure; the other three deselections are the repository defaults.

Signed-off-by: Christopher Kevin <christopherk@nvidia.com>

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Focused review of the CommonMark link-normalization changes found one scoring edge case; the parser/quality-score regression suite otherwise passed locally.

Comment thread src/skillevaluator/validators/quality_score.py
rng1995 and others added 2 commits August 20, 2026 14:09

@chrisknvidia chrisknvidia left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Second-pass review found two reproducible correctness issues in the broader parser change. The original URL-edge-whitespace fix is correct and its thread is resolved.

Signed-off-by: Christopher Kevin <christopherk@nvidia.com>
…owup

Signed-off-by: Christopher Kevin <christopherk@nvidia.com>
Signed-off-by: Christopher Kevin <christopherk@nvidia.com>
@chrisknvidia
chrisknvidia marked this pull request as ready for review August 21, 2026 12:01
@chrisknvidia
chrisknvidia merged commit 68013df into main Aug 21, 2026
15 checks passed
@chrisknvidia
chrisknvidia deleted the fix/christopherk/quality-score-commonmark-followup branch August 21, 2026 12:21
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