Repository navigation
GH-2032: Cover MCP tools with skills and plugin evaluations #2068
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,153 @@ | ||
| name: Claude Plugin Check | ||
|
|
||
| # Keeps the Claude Code plugin under claude-plugins/spring-tools consistent with the | ||
| # language server: every diagnostic code has an explanation playbook, playbooks are | ||
| # well-formed, hooks, skills and agents only reference MCP tools that exist (and every | ||
| # tool is reachable through one of them), the plugin manifest validates, and the | ||
| # launcher/language server (including its file watcher) work end to end over MCP stdio. | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - 'claude-plugins/**' | ||
| - 'headless-services/spring-boot-language-server/src/main/java/org/springframework/ide/vscode/boot/**/*ProblemType.java' | ||
| - 'headless-services/spring-boot-language-server/src/main/java/org/springframework/ide/vscode/boot/validation/generations/AbstractDiagnosticValidator.java' | ||
| - 'headless-services/spring-boot-language-server/src/main/java/org/springframework/ide/vscode/boot/yaml/reconcile/ApplicationYamlASTReconciler.java' | ||
| - 'headless-services/commons/commons-yaml/src/main/java/org/springframework/ide/vscode/commons/yaml/reconcile/YamlSchemaProblems.java' | ||
| - 'headless-services/spring-boot-language-server/src/main/java/org/springframework/ide/vscode/boot/mcp/**' | ||
| - 'headless-services/spring-boot-language-server-standalone/src/main/java/**' | ||
| - '.github/workflows/claude-plugin-check.yml' | ||
| pull_request: | ||
| paths: | ||
| - 'claude-plugins/**' | ||
| - 'headless-services/spring-boot-language-server/src/main/java/org/springframework/ide/vscode/boot/**/*ProblemType.java' | ||
| - 'headless-services/spring-boot-language-server/src/main/java/org/springframework/ide/vscode/boot/validation/generations/AbstractDiagnosticValidator.java' | ||
| - 'headless-services/spring-boot-language-server/src/main/java/org/springframework/ide/vscode/boot/yaml/reconcile/ApplicationYamlASTReconciler.java' | ||
| - 'headless-services/commons/commons-yaml/src/main/java/org/springframework/ide/vscode/commons/yaml/reconcile/YamlSchemaProblems.java' | ||
| - 'headless-services/spring-boot-language-server/src/main/java/org/springframework/ide/vscode/boot/mcp/**' | ||
| - 'headless-services/spring-boot-language-server-standalone/src/main/java/**' | ||
| - '.github/workflows/claude-plugin-check.yml' | ||
| workflow_dispatch: | ||
| inputs: | ||
| run-evals: | ||
| description: 'Also run the behavioral eval suite (claude plugin eval; needs the ANTHROPIC_API_KEY secret and costs model calls)' | ||
| type: boolean | ||
| default: false | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: claude-plugin-check-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| explanations-and-config: | ||
| name: Explanation playbooks and plugin configuration | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # 7.0.1 | ||
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # 7.0.0 | ||
| with: | ||
| node-version: 22 | ||
| - name: Check explanation playbooks (coverage, structure, cross-references, coverage table) | ||
| run: node claude-plugins/tools/check-explanations.mjs --require-all --todo | ||
| - name: Check plugin configuration (hooks, skills, agents against the MCP tool inventory) | ||
| run: node claude-plugins/tools/check-plugin-config.mjs | ||
| - name: Run plugin tooling tests | ||
| run: node --test --test-reporter=spec 'claude-plugins/tools/test/*.test.mjs' | ||
|
|
||
| documentation-links: | ||
| name: Documentation links resolve | ||
| runs-on: ubuntu-latest | ||
| # Only on the main branch: external link checks depend on docs.spring.io availability. | ||
| if: github.event_name != 'pull_request' | ||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # 7.0.1 | ||
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # 7.0.0 | ||
| with: | ||
| node-version: 22 | ||
| - name: Check that every documentation link in the playbooks returns HTTP 200 | ||
| run: node claude-plugins/tools/check-explanations.mjs --require-all --links | ||
|
|
||
| plugin-manifest: | ||
| name: Plugin manifest validates with the Claude Code CLI | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # 7.0.1 | ||
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # 7.0.0 | ||
| with: | ||
| node-version: 22 | ||
| - name: Install the Claude Code CLI into a temporary prefix | ||
| run: npm install --no-audit --no-fund --prefix "$RUNNER_TEMP/claude-code" @anthropic-ai/claude-code@latest | ||
| - name: Validate the plugin manifest (no login required) | ||
| run: | | ||
| "$RUNNER_TEMP/claude-code/node_modules/.bin/claude" --version | ||
| "$RUNNER_TEMP/claude-code/node_modules/.bin/claude" plugin validate ./claude-plugins/spring-tools --strict | ||
|
|
||
| mcp-smoke: | ||
| name: End-to-end MCP smoke test against a freshly built language server | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 45 | ||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # 7.0.1 | ||
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # 7.0.0 | ||
| with: | ||
| node-version: 22 | ||
| - uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # 5.6.0 | ||
| with: | ||
| java-version: '25' | ||
| distribution: 'temurin' | ||
| cache: maven | ||
| cache-dependency-path: 'headless-services/**/pom.xml' | ||
| - name: Build the standalone language server and copy the JAR into the plugin | ||
| run: ./claude-plugins/update-local-jars.sh | ||
| - name: Start launcher.js over MCP stdio, index a sample project and exercise the tools the hooks and skills rely on | ||
| run: node claude-plugins/tools/smoke/mcp-smoke.mjs --keep | ||
| - name: Upload the language server log on failure | ||
| if: failure() | ||
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # 7.0.1 | ||
| with: | ||
| name: boot-ls-log | ||
| path: /tmp/spring-tools-smoke-*/data/boot-ls.log | ||
| if-no-files-found: ignore | ||
|
|
||
| plugin-evals: | ||
| name: Behavioral evals (claude plugin eval, on demand) | ||
| runs-on: ubuntu-latest | ||
| if: github.event_name == 'workflow_dispatch' && inputs.run-evals | ||
| timeout-minutes: 60 | ||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # 7.0.1 | ||
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # 7.0.0 | ||
| with: | ||
| node-version: 22 | ||
| - name: Install the Claude Code CLI into a temporary prefix | ||
| run: npm install --no-audit --no-fund --prefix "$RUNNER_TEMP/claude-code" @anthropic-ai/claude-code@latest | ||
| - name: Run the eval suite against the recorded MCP mocks (the language server is not started) | ||
| env: | ||
| ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | ||
| CLAUDE_CLI: ${{ runner.temp }}/claude-code/node_modules/.bin/claude | ||
| run: | | ||
| if [ -z "$ANTHROPIC_API_KEY" ]; then | ||
| echo '::error::the ANTHROPIC_API_KEY secret is not set; the eval suite needs model access' | ||
| exit 1 | ||
| fi | ||
| node claude-plugins/tools/evals/run-claude-evals.mjs \ | ||
| --trust-plugin \ | ||
| --json "$RUNNER_TEMP/eval-results.json" \ | ||
| --threshold 0.8 \ | ||
| --judge-model claude-haiku-4-5 \ | ||
| --no-publish \ | ||
| --max-cost-usd 15 | ||
| - name: Upload the eval results and report | ||
| if: always() | ||
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # 7.0.1 | ||
| with: | ||
| name: plugin-eval-results | ||
| path: | | ||
| ${{ runner.temp }}/eval-results.json | ||
| claude-plugins/tools/evals/results/report.html | ||
| if-no-files-found: ignore |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
| language-server/ | ||
| node_modules/ | ||
| boot-ls.log | ||
| evals/results/ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| --- | ||
| name: spring-reviewer | ||
| description: Reviews Spring Boot code changes with the Spring Tools language server - diagnostics, bean wiring, endpoints and logical structure. Use after editing a Spring Boot project or when asked for a Spring-aware review; read-only, never edits files. | ||
| tools: Read, Grep, Glob, mcp__plugin_spring-tools_spring-tools-mcp__* | ||
| model: inherit | ||
| --- | ||
| You are a Spring Boot reviewer. You review the current state of the Spring Boot projects in the workspace with the `spring-tools` MCP server and report findings; you never modify files. | ||
|
|
||
| Work through these steps and keep tool output out of the report - summarize. | ||
|
|
||
| Steps 3-6 complement diagnostics with structural and support information that diagnostics may not report. Confirm suspected problems against the project before reporting them. | ||
|
|
||
| 1. `getProjectList` - note every project (`projectName`, `location`, `isSpringBootProject`, `javaVersion`). Retry a few times if the list is empty right after startup. Skip projects that are not Spring Boot projects unless the user asked about them. | ||
| 2. `getProjectDiagnostics` per project. For each Spring diagnostic code read the fix playbook for that code - the `<CODE>.md` files in the plugin's `explanations` directory, at `${CLAUDE_PLUGIN_ROOT}/explanations/<CODE>.md` in Claude Code and at the absolute path named in the spring-tools MCP server instructions otherwise - and describe the fix precisely (file, range, what to change) instead of pasting the playbook. | ||
| 3. Bean wiring: `getBeanDetails` for an overview, then `findBeansByType` for every interface with several implementations (missing `@Primary`/`@Qualifier`) and `getBeanUsageInfo` for beans that are defined but never injected (dead configuration) or injected but not defined. | ||
| 4. Endpoints: `getRequestMappings` - flag duplicate paths, handler methods without an HTTP method, controllers that mix API versions inconsistently, and endpoints without a matching stereotype (`@RestController`/`@Controller`). | ||
| 5. Structure: `getLogicalStructureChanges` (a git-backed project has a baseline automatically) to see what the change under review added, removed or moved; `findComponentsByStereotype` to check layering rules the project follows (e.g. controllers calling repositories directly). | ||
| 6. Versions: `getSpringBootVersion` plus `getLatestReleaseInformation` with slug `spring-boot` - mention when the project runs on a generation whose OSS support has ended. | ||
|
|
||
| Report format: | ||
|
|
||
| These categories reflect review impact, not diagnostic severity. Preserve each diagnostic's reported severity (`error`, `warning`, `info`, `hint`, or `unspecified`) alongside the finding. | ||
|
|
||
| - **Blocking**: problems that break the application context, the build or security (each with file:line and the fix). | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are those the severity ERROR, WARNING, INFO, HINT coming from the diagnsotics?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The diagnostic tool reports error, warning, info, hint, or unspecified. The report headings are separate review-impact categories, not a severity mapping. I clarified that and asked the reviewer to retain the reported severity alongside each diagnostic. |
||
| - **Should fix**: other Spring diagnostics with a playbook, wiring ambiguities, structural regressions. | ||
| - **Notes**: version/support status, observations, things you could not verify (e.g. the language server was still indexing). | ||
|
|
||
| Use file:line references from the tool output. Read source files only to confirm a finding. When the language server reports nothing for a project, say so explicitly rather than inventing findings. | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aren't 3-6 covered by 2?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! There is overlap, but diagnostics do not provide all of the bean, endpoint, structure, and support information used in steps 3–6. I clarified that these steps complement diagnostics and that suspected findings need confirmation.