Skip to content

feat(tier1): move the skill-name length rule into the quality config - #944

Open
westonplatter wants to merge 5 commits into
NVIDIA:mainfrom
westonplatter:quality-config-name-too-short
Open

westonplatter wants to merge 5 commits into
NVIDIA:mainfrom
westonplatter:quality-config-name-too-short

Conversation

@westonplatter

Copy link
Copy Markdown
Contributor

Summary

This PR continues the Tier 1 refactoring described in #329. It moves the skill-name length rule out of quality_score.py and into quality-default.yaml / --quality-config, as the next Discoverability rule after #885.

Dimension Section and rule Setting Default deduction
Discoverability discoverability.name_too_short min_chars: 5 −10 (WARNING)

The rule sets points, message and suggestion, plus its one setting. Severity and the matching logic stay in code.

# custom quality config: only the keys you set change
discoverability:
  name_too_short:
    min_chars: 3    # accept short names such as "git"

Behavior:

  • Scores are unchanged by default. The packaged values match the old hard-coded ones: a folder name shorter than 5 characters loses 10 points.
  • The same overlay as the other rules. A custom file can set any subset of keys. Anything it leaves out keeps the packaged value. points: 0 turns the rule off and emits no finding.
  • The folder name is measured, not the frontmatter name. This is how the code behaved before and it is kept as is.
  • Strict validation. Bad content exits with code 2 and a message naming the field, in the same way as the other rules. min_chars must be a whole number from 1 to 1,000,000,000; booleans, floats and strings are rejected, as is an unknown key such as min_char.
  • Digest. A custom file's digest still covers only the keys that file sets.
  • Not in this PR. The neighbouring "Name not following convention" (kebab-case) check stays in code.

Commits

  1. feat(quality): Discoverability name_too_short.
  2. Docs and CHANGELOG update.

Changes in behavior compared to main

Area main This PR
Scores, no custom file — Unchanged. Same points, severity and order.
Existing custom file — Unchanged scores and digest. The new rule falls back to the packaged values.
Packaged quality_config digest — Changes once, because quality-default.yaml gained a rule.
finding_id of the finding — Unchanged. The message (Skill name very short: 'ab') and the suggestion are byte-for-byte the same, so the ID is the same. The tests pin the IDs for a 2-character and a 4-character name, recorded from main before the change. A custom message or suggestion changes the ID, as for the other rules.

The other Discoverability, Correctness and Efficiency rules stay in code for now.

Docs: docs/tier1-reference.mdx documents the setting under Discoverability and notes that the kebab-case check is not configurable yet.

Verification

  • I am familiar with the Contributing Guidelines
  • Added or updated focused tests: tests/test_quality_config.py covers the packaged values, the sparse overlay, and invalid content (not a mapping, unknown key, 0, a float, a boolean, negative points). tests/validators/test_quality_score.py covers the 4-versus-5-character boundary, a custom minimum in both directions, the folder name versus the frontmatter name, custom message and suggestion, points: 0, and the pinned finding_ids.
  • Updated documentation for user-visible changes
  • Ran ruff check: clean. ruff format --diff flags none of the lines this PR changes. ruff format --check already fails on other files on main.
  • Ran the quality config, quality score and related tests: 625 passed in the five directly affected files. A wider run over quality, golden, docs and report tests: 9,234 passed, 6 skipped, 0 failed. I did not run the full make test or make build.
  • Ran fern check: 0 errors
  • Did not add credentials, private datasets, or proprietary benchmark content

Release Impact

  • No user-visible release note needed
  • Updated CHANGELOG.md

🤖 Generated with Claude Code

Copilot AI balanced review requested due to automatic review settings November 30, 2026 17:00

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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@chrisknvidia chrisknvidia 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.

Thanks, this is a clean next step after #885 and it does exactly what the title says. I checked the default against main by scoring every SKILL.md in the repo and its fixtures, plus a set of skills with one- to six-character folder names, on both trees: scores, dimension scores, severities, messages and finding ids are identical, including the two ids the tests pin. The loader change is a single table row, so min_chars gets the same validation and sparse-overlay path as the neighbouring rules, and an existing custom file without the new block keeps the packaged values.

Tests: the two touched suites plus test_quality_score_languages pass at head (662) with the same empty failure set as main (648). Running the new tests against main's source, the twelve that depend on the new key fail and the three behaviour-preservation tests pass, which is the right shape. ruff check is clean on the changed files.

The only thing to do before merge is a rebase: CHANGELOG.md conflicts with main because both sides added a bullet at the top of Unreleased / Added, so it is a one-line mechanical fix. The CI runs for this head are waiting for maintainer approval and have not executed yet.

A second pass over the config edge cases: null, string, negative, float, boolean and over-limit values for min_chars are rejected, points: 0 disables the rule, and a custom file that omits the key falls back to the packaged default. Reverting the YAML or the loader alone fails all fifteen new tests; reverting the validator alone fails exactly the three custom-config ones, with the pinned finding ids passing on both trees as they should.

Copilot AI balanced review requested due to automatic review settings November 30, 2026 20:10

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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@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.

[SkillEvaluator Review]

Thanks @westonplatter for this contribution.

Value and readiness: This is a focused step on #329. Users can tune or disable the skill folder-name deduction, and the packaged rule preserves its default behavior. One documentation correction remains before final review by the maintainers and PIC.

Material findings: 1 P3 in docs/tier1-reference.mdx:696.

PIC tradeoffs: None.

Verification and gaps: Ran the quality config, quality score, and language suites on the current tree (662 passed). Against current main, 11 of 14 selected new cases fail as expected and the three compatibility cases pass. Compared scores and finding IDs across seven folder names with both packaged and existing sparse config. Confirmed the existing config digest stays stable, the packaged digest changes, and an invalid minimum exits 2 with the field name. Repository lint and the OSS boundary scan passed. Fern reported zero errors and one warning. The two contributor commits are signed off. The new head's CI is pending. Local verification was on macOS with Python 3.14.

Reviewed head: 10d1dd85ba0c0ea06dd88ac9aa73a84d55fe8937

Comment thread docs/tier1-reference.mdx Resolved
westonplatter and others added 2 commits November 30, 2026 21:56
…nfig

Move the discoverability name_too_short rule (10 pts, warning) into
quality-default.yaml with points, message, suggestion and min_chars.
points 0 turns it off. The packaged text equals the former literals and the
folder name is still appended in single quotes, so scores, severities and
finding_ids are unchanged; tests pin two ids recorded before the change.
Only the packaged quality_config digest changes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Weston Platter <westonplatter@gmail.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Weston Platter <westonplatter@gmail.com>
@westonplatter
westonplatter force-pushed the quality-config-name-too-short branch from 10d1dd8 to f2d9f8f Compare December 1, 2026 04:56
Copilot AI balanced review requested due to automatic review settings December 1, 2026 04:56

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.

🟢 Approval recommended

No active review issues remain for the skill-name length configuration change.

No open issues 🎉

Review effort: Balanced

@westonplatter

Copy link
Copy Markdown
Contributor Author

Thanks @rng1995 and @chrisknvidia. I addressed the P3 review finding and rebased to resolve the merge conflict.

westonplatter added a commit to westonplatter/SkillEvaluator that referenced this pull request Dec 1, 2026
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Weston Platter <westonplatter@gmail.com>
Copilot AI balanced review requested due to automatic review settings December 1, 2026 16:10

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.

🟢 Approval recommended

No active review issues are reported for the configurable skill-folder name-length rule.

No open issues 🎉

Review effort: Balanced

@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.

[SkillEvaluator Review]

Thanks @westonplatter for this contribution.

Value and readiness: Real value, a focused step on #329: users can tune or turn off the skill folder-name length deduction through discoverability.name_too_short, and the packaged rule keeps today's behavior. Verified at this head: scores, severities, messages and finding_ids match main across seven folder names with the packaged config and with an existing sparse custom config; the packaged quality_config digest changes once and a custom file keeps its digest; lowering min_chars or points: 0 drops the finding end to end through quality-check; min_chars of 0 or above 1,000,000,000, a blank message and a NaN points all exit 2 and name the field. The 15 new tests: 12 fail against main's source and the 3 behavior-preservation cases pass. Not ready yet: two P3s below, and CI has not run on this head (see below).
Prior findings: 1 of 1 fixed. docs/tier1-reference.mdx now describes the separate folder-name convention check accurately (lowercase first letter, then lowercase letters, digits, hyphens or underscores), which matches quality_score.py:826. That thread is already resolved. No other thread is open.
Material findings: 2 new, both P3 (inline): CHANGELOG.md:19 the bullet sits in the released ## 1.3.0 section, and the Quality config overview in docs/tier1-reference.mdx does not mention the new rule.
PIC tradeoffs: none.
Verification and gaps: Read the full diff. Ran the PR's three test files plus neighbours on this head (662 and 1,236 passed), and on a local merge of the current main (916 passed); ruff check . and scripts/check_oss_boundary.py are clean on both; fern check reported 0 errors. The merge with current main is clean except that the CHANGELOG bullet lands in the wrong section. The diff touches nothing under .github/, scripts, conftest.py, pyproject or the Makefile, so I approved the fork workflow runs for this head; they have no result yet, and I cannot approve until they are green. Not verified: Gitleaks (not run locally), Python 3.12 and 3.13, Windows, and the full suite.

Reviewed head: 871f7a932f780d4132884c5c74e3dda507f641fd

Comment thread CHANGELOG.md Resolved
Comment thread docs/tier1-reference.mdx Resolved
westonplatter and others added 2 commits December 1, 2026 14:35
…le in the overview

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Weston Platter <westonplatter@gmail.com>
Copilot AI balanced review requested due to automatic review settings December 1, 2026 21:35

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.

🟢 Approval recommended

No active review issues were identified for the folder-name length configuration change.

No open issues 🎉

Review effort: Balanced

@westonplatter
westonplatter requested a review from rng1995 December 1, 2026 21:39

This branch has not been deployed

No deployments
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.

4 participants