Skip to content

fix(quality): report the 5,000-token skill budget as advisory - #272

Merged
rng1995 merged 1 commit into
mainfrom
naren/port-large-skill-advisory
Nov 2, 2026
Merged

rng1995 merged 1 commit into
mainfrom
naren/port-large-skill-advisory

Conversation

@rng1995

@rng1995 rng1995 commented Oct 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • The deterministic quality check now reports a SKILL.md over the recommended 5,000-token budget as a MEDIUM quality_efficiency finding instead of a HIGH one. The message, suggestion, and 15-point Efficiency deduction are unchanged.
  • docs/tier1-validation.mdx now says the 5,000-token budget is a recommendation: going over it gives a MEDIUM finding and a 15-point deduction, and the lower score can still fail --min-score.
  • CHANGELOG entry under Unreleased / Fixed.

Why

The 5,000-token value is a recommendation (QUALITY_RECOMMENDED_MAX_TOKENS, and the finding text itself says "recommended max"), but the check deducted with severity error, which maps to HIGH. A HIGH quality finding fails the result, so a skill just over the budget failed quality-check, validate, and tier1 even when its quality score was well above --min-score.

Reproduced on main with a well-formed skill whose SKILL.md is about 5,500 tokens and has a score above 70:

Command Before After
skillevaluator quality-check <skill> exit 1, QUALITY — Large skill ... listed as failed exit 0, finding kept as MEDIUM
skillevaluator validate <skill> --tiers 1 --checks quality --no-llm exit 1, QUALITY FAIL (1 error) exit 0, QUALITY PASS; JSON report still has the medium quality_efficiency finding

Users who want to block on large skills can still do so through --min-score, because the deduction still applies.

Kept from public

  • The finding text, suggestion, single >5000 recommendation (no separate 6,000-token tier), and the 15-point deduction are unchanged.
  • The independent --min-score gate and its policy-override hardening (tests/test_quality_policy_gate.py) are untouched: a large skill whose score falls below the minimum still fails, and policy overrides still cannot waive it.
  • PII home-path detection stays identity-based and organization-neutral, as pii_patterns.yaml already documents. This PR does not add an organization-name allowlist for author labels.

Tests

  • tests/validators/test_quality_score.py: test_large_skill_is_high_severity is now test_large_skill_is_advisory. It asserts MEDIUM severity and that the result passes with no gate failures at min_score=0. test_above_6000_tokens_uses_same_5000_recommendation asserts MEDIUM and keeps the deduction == 15 check. Both tests fail on unmodified main.
  • pytest tests/validators tests/reporting tests/cli tests/ci tests/test_cli.py tests/test_quality_policy_gate.py tests/test_quality_config.py tests/test_oss_packaging.py tests/test_ci_change_classifier.py: 4518 passed, 3 skipped. This includes the Tier 1 CI runner tests (tests/ci/test_run_tier1.py) and tests/reporting/test_quality_gate_reports.py.
  • pytest tests/golden tests/models tests/test_commands.py tests/test_checks_routing.py tests/test_plugin_inventory.py tests/test_plugin_context_cost.py tests/test_oss_boundary.py tests/test_oss_source_hygiene.py tests/test_ci_workflows.py: 584 passed.
  • ruff check passes on the changed Python files. ruff format --check reports a formatting difference in tests/validators/test_quality_score.py, but it is in lines this PR does not touch, and main has the same difference.
  • scripts/check_oss_boundary.py: passed.

🤖 Generated with Claude Code

The quality check treats 5,000 tokens as the recommended SKILL.md
budget, but it deducted for exceeding it with severity "error", which
maps to a HIGH finding. A HIGH quality finding fails the result, so a
skill just over the budget failed quality-check, validate and tier1
even when its quality score was above --min-score.

Report the over-budget finding as MEDIUM instead. The message,
suggestion and 15-point Efficiency deduction are unchanged, so a large
skill still fails when its score falls below the minimum. Document the
behavior in the Tier 1 quality section and add a changelog entry.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>

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

Review summary: no findings (no P1/P2/P3).

Checked: the 'warning' deduction maps to MEDIUM and the 15-point Efficiency deduction is unchanged, so a large SKILL.md can still fail --min-score. No other source, test or doc still describes the large-skill finding as HIGH. The tier1-validation.mdx text and the CHANGELOG entry (Unreleased / Fixed) are accurate.

Local verification (head 500da0b): ruff check clean; pytest tests/validators/test_quality_score.py tests/test_quality_policy_gate.py tests/ci: 760 passed, 2 skipped.

Reviewed with Claude Code.

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