From 42400940a742af6c889b823af9d20941cae1813e Mon Sep 17 00:00:00 2001 From: protosphinx <133899485+protosphinx@users.noreply.github.com> Date: Sun, 10 May 2026 16:08:16 +0000 Subject: [PATCH] docs(checks): add tools-overloaded to README rule table; extend sarif tests The tools-overloaded rule has been implemented and tested in checks.test.ts but was missing from the README What-it-checks table and from the sarif test suite. This commit closes both gaps: - Adds the tools-overloaded row to the What it checks table in README.md so the docs match the implementation. - Extends test/sarif.test.ts: asserts tools-overloaded appears in the full SARIF rule catalog (empty-diagnostics path), and adds a round-trip test that verifies a tools-overloaded diagnostic emits at warning level with a correct ruleIndex. - Updates the test count badge from 70 to 77 (reflects tests added in earlier bot runs plus the two new ones here). --- README.md | 3 ++- test/sarif.test.ts | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5121c57..b766d01 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ **Lint the manifest. Verify the refs. Catch the collisions before runtime.** [![ci](https://github.com/erphq/skillcheck/actions/workflows/ci.yml/badge.svg)](https://github.com/erphq/skillcheck/actions/workflows/ci.yml) -![tests](https://img.shields.io/badge/tests-70%20passing-yellowgreen) +![tests](https://img.shields.io/badge/tests-77%20passing-yellowgreen) [![license](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE) [![status](https://img.shields.io/badge/status-pre--v0-orange.svg)](#roadmap) @@ -97,6 +97,7 @@ Exit codes: | `description-length` | warn | Description longer than 500 chars dilutes the trigger signal | | `name-drift` | warn | Frontmatter `name:` doesn't match the filename or directory | | `description-collision` | warn | Two skills' descriptions have Jaccard ≥ 0.6 | +| `tools-overloaded` | warn | `tools:` lists 10 or more entries; narrow the list to what this skill actually needs | | `parse` | error | The file doesn't have valid frontmatter / YAML | The MCP and built-in tool checks read `~/.claude/settings.json` and diff --git a/test/sarif.test.ts b/test/sarif.test.ts index d46917a..0fc7b82 100644 --- a/test/sarif.test.ts +++ b/test/sarif.test.ts @@ -20,9 +20,25 @@ describe("reportSarif", () => { expect(ruleIds).toContain("frontmatter-schema"); expect(ruleIds).toContain("tool-unknown"); expect(ruleIds).toContain("description-collision"); + expect(ruleIds).toContain("tools-overloaded"); expect(out.runs[0].results).toEqual([]); }); + it("emits tools-overloaded at warning level with correct ruleIndex", () => { + const diagnostics: Diagnostic[] = [ + { + severity: "warn", + rule: "tools-overloaded", + message: "tools: lists 11 tools; narrow the list to the tools this skill actually needs", + file: "/test/a.md", + }, + ]; + const out = JSON.parse(reportSarif(diagnostics, "/test", opts)); + expect(out.runs[0].results[0].level).toBe("warning"); + const idx = out.runs[0].results[0].ruleIndex; + expect(out.runs[0].tool.driver.rules[idx].id).toBe("tools-overloaded"); + }); + it("converts severities to SARIF levels", () => { const diagnostics: Diagnostic[] = [ { severity: "error", rule: "frontmatter-schema", message: "boom", file: "/test/a.md" },