Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .agents/plugins/marketplace.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "spring-tools-local",
"interface": {
"displayName": "Spring Tools"
},
"plugins": [
{
"name": "spring-tools",
"source": {
"source": "local",
"path": "./claude-plugins/spring-tools"
},
"policy": {
"installation": "AVAILABLE",
"authentication": "ON_INSTALL"
},
"category": "Developer tools"
}
]
}
153 changes: 153 additions & 0 deletions .github/workflows/claude-plugin-check.yml
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 and cross-host adapters
run: node claude-plugins/tools/check-plugin-config.mjs --cross-host
- 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
12 changes: 8 additions & 4 deletions .github/workflows/snapshot-standalone-ls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
echo "S3 path: ${s3_path}"
aws s3 cp ./standalone-ls-dist/$jar_file s3://$AWS_S3_BUCKET/$s3_path/$jar_file --no-progress --checksum-algorithm CRC32
aws s3 cp ./standalone-ls-dist/$sha_file s3://$AWS_S3_BUCKET/$s3_path/$sha_file --no-progress --checksum-algorithm CRC32
- name: Update plugin.json for Snapshot
- name: Update plugin manifest versions for Snapshot
id: update-plugin
run: |
git config --global user.name "@spring-projects/spring-ide-admin"
Expand All @@ -52,12 +52,16 @@ jobs:
# Create or reset a local branch to the current commit (which is what triggered the action)
git checkout -B claude-snapshot

# Update the version in plugin.json
# Keep both the Claude Code manifest and the portable Agent Plugins manifest in sync.
tmp=$(mktemp)
jq --arg v "$version" '.version = $v' claude-plugins/spring-tools/.claude-plugin/plugin.json > "$tmp" && mv "$tmp" claude-plugins/spring-tools/.claude-plugin/plugin.json
tmp=$(mktemp)
jq --arg v "$version" '.version = $v' claude-plugins/spring-tools/plugin.json > "$tmp" && mv "$tmp" claude-plugins/spring-tools/plugin.json

git add claude-plugins/spring-tools/.claude-plugin/plugin.json
git commit -m "Update Claude plugin version to $version"
git add claude-plugins/spring-tools/.claude-plugin/plugin.json claude-plugins/spring-tools/plugin.json
if ! git diff --cached --quiet; then
git commit -m "Update agent plugin versions to $version"
fi

# Push to the remote claude-snapshot branch forcefully.
# If it doesn't exist, this creates it. If it does exist, it completely overwrites it
Expand Down
7 changes: 4 additions & 3 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ sts4/
│ └── boot-dev-pack/ # Extension pack bundling Spring Boot extensions
├── nodejs-packages/ # Shared Node.js utilities
└── claude-plugins/ # Claude Code plugin (standalone LS + MCP server)
├── spring-tools/ # Plugin source (skills, hooks, explanations/<CODE>.md playbooks)
├── tools/ # Node.js checker + tests keeping the playbooks in sync with the LS
├── spring-tools/ # Plugin source (skills, agents, hooks, explanations/<CODE>.md playbooks)
├── tools/ # Node.js checkers, tests and behavioral evals
├── research-notes/ # TODO_quickfixes.md: problem code → quick fix → playbook coverage table
└── update-local-jars.sh # Rebuilds the standalone LS JAR for the plugin
```
Expand Down Expand Up @@ -94,10 +94,11 @@ cd claude-plugins
./update-local-jars.sh # Rebuild and copy the standalone LS JAR into the plugin
```

Every diagnostic code needs a playbook `claude-plugins/spring-tools/explanations/<CODE>.md` and a row in `claude-plugins/research-notes/TODO_quickfixes.md`. When adding or renaming a problem type, run from the repository root (details in `claude-plugins/spring-tools/README.md`):
Every diagnostic code needs a playbook `claude-plugins/spring-tools/explanations/<CODE>.md` and a row in `claude-plugins/research-notes/TODO_quickfixes.md`. Every MCP tool (`boot/mcp/*Tools.java`) must be reachable through a skill or hook and have a behavioral eval with a mock. When adding or renaming a problem type or an MCP tool, run from the repository root (details in `claude-plugins/spring-tools/README.md`):

```bash
node claude-plugins/tools/check-explanations.mjs --require-all --todo --links
node claude-plugins/tools/check-plugin-config.mjs
npm --prefix claude-plugins/tools test
```

Expand Down
4 changes: 4 additions & 0 deletions claude-plugins/research-notes/TODO_quickfixes.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ Raised on `application*.properties` / `bootstrap*.properties` files by `SpringPr
| Problem Type Code | Description | Quick Fix Implementation | Playbook |
| :--- | :--- | :--- | :---: |
| `PROP_SYNTAX_ERROR` | Line cannot be parsed as a `key=value` / `key: value` assignment | *None* | ✅ |
| `PROP_PLACEHOLDER_SYNTAX` | Malformed property placeholder in a value | *None* | ✅ |
| `PROP_UNRESOLVED_PLACEHOLDER` | Placeholder without a default is not found in the project's configuration | *None* | ✅ |
| `PROP_UNKNOWN_PROPERTY` | Key matches no property in the configuration metadata | Create metadata for `<key>` (`CommonQuickfixes.MISSING_PROPERTY`, id `MISSING_PROPERTY_APP`) | ✅ |
| `PROP_DEPRECATED` | Property is deprecated in the configuration metadata (any level) | Replace with `<replacement>` (`AppPropertiesQuickFixes.DEPRECATED_PROPERTY`) | ✅ |
| `PROP_DUPLICATE_KEY` | Same key assigned more than once in one document | *None* | ✅ |
Expand All @@ -125,6 +127,8 @@ Raised on `application*.yml`/`.yaml` and `bootstrap*.yml`/`.yaml` files by `Appl
| Problem Type Code | Description | Quick Fix Implementation | Playbook |
| :--- | :--- | :--- | :---: |
| `YAML_SYNTAX_ERROR` | SnakeYAML parse error | *None* | ✅ |
| `YAML_PLACEHOLDER_SYNTAX` | Malformed property placeholder in a value | *None* | ✅ |
| `YAML_UNRESOLVED_PLACEHOLDER` | Placeholder without a default is not found in the project's configuration | *None* | ✅ |
| `YAML_UNKNOWN_PROPERTY` | Key path matches no property in the configuration metadata | Create metadata for `<key>` (`CommonQuickfixes.MISSING_PROPERTY`, id `MISSING_PROPERTY_APP`) | ✅ |
| `YAML_DEPRECATED_WARNING` | Property deprecated at `warning` level | Replace with `<replacement>` (`AppYamlQuickfixes.DEPRECATED_PROPERTY`, id `DEPRECATED_YAML_PROPERTY`) | ✅ |
| `YAML_DEPRECATED_ERROR` | Property deprecated at `error` level (no longer bound) | Replace with `<replacement>` (`AppYamlQuickfixes.DEPRECATED_PROPERTY`, id `DEPRECATED_YAML_PROPERTY`) | ✅ |
Expand Down
1 change: 0 additions & 1 deletion claude-plugins/spring-tools/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
language-server/
node_modules/
boot-ls.log
evals/results/
11 changes: 6 additions & 5 deletions claude-plugins/spring-tools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -319,14 +319,16 @@ When a new MCP tool is added to the language server, give it a home: mention it

### Behavioral evals

`evals/` holds a [`claude plugin eval`](https://code.claude.com/docs/en/plugin-evals) suite: one case per skill and for the `spring-reviewer` agent, plus a negative control (an unrelated question must not trigger any skill). Each case is a prompt phrased the way a user would type it, with graders for the result (a regex or a judged rubric) and for the path (`tool_used` on the skill and on the MCP tool it should call). The language server is not started during a run: `evals/mocks/spring-tools-mcp/` answers every MCP tool from recordings taken against the real server on the `sf7-validation` test project (`_tools.json` carries the real tool descriptions and schemas), and the `validate` and reviewer cases override `getProjectDiagnostics` with a recording that contains a `JAVA_AUTOWIRED_CONSTRUCTOR` finding.
`claude-plugins/tools/evals/` holds a [`claude plugin eval`](https://code.claude.com/docs/en/plugin-evals) suite outside the published plugin: one case per skill and for the `spring-reviewer` agent, plus a negative control (an unrelated question must not trigger any skill). Each case is a prompt phrased the way a user would type it, with graders for the result (a regex or a judged rubric) and for the path (`tool_used` on the skill and on the MCP tool it should call). The language server is not started during a run: `mocks/spring-tools-mcp/` answers every MCP tool from recordings taken against the real server on the `sf7-validation` test project (`_tools.json` carries the real tool descriptions and schemas), and the `validate` and reviewer cases override `getProjectDiagnostics` with a recording that contains a `JAVA_AUTOWIRED_CONSTRUCTOR` finding.

Run the following from the repository root. The runner stages the plugin and evals together in a temporary directory because Claude requires evals inside the plugin root; results are saved under `claude-plugins/tools/evals/results/`.

```bash
# runs every case three times with the plugin and three times without it, judged with your Claude Code credentials
cd claude-plugins/spring-tools && claude plugin eval . --no-publish
node claude-plugins/tools/evals/run-claude-evals.mjs --no-publish

# one case, one arm, one run - cheap while iterating on a skill description
claude plugin eval . --case validate-finds-spring-problems --runs 1 --ablation none
node claude-plugins/tools/evals/run-claude-evals.mjs --case validate-finds-spring-problems --runs 1 --ablation none --no-publish

# re-record the mocks after the language server's tools or the fixture project changed (needs the JAR + Java 21+)
node claude-plugins/tools/evals/record-mocks.mjs
Expand Down Expand Up @@ -372,13 +374,12 @@ spring-tools/
│ └── spring-review/ # Canonical review procedure for Codex and other skill hosts
├── opencode/ # OpenCode MCP config fragment and reviewer agent adapter
├── explanations/ # One Markdown playbook per diagnostic code (explanation + fixes)
├── evals/ # Behavioral eval suite: one case per skill/agent + recorded MCP mocks (results/ is gitignored)
└── README.md
```

The manifests describe one plugin for different hosts. `install.js` stores the checksum-verified JAR in the persistent data directory, isolated under the plugin version; it does not write into the installed plugin tree. `check-plugin-config.mjs` fails if shared metadata drifts, if a reviewer adapter differs from `skills/spring-review/SKILL.md`, or if `mcp.json` stops launching `launcher.js`. Run `node claude-plugins/tools/sync-agent-adapters.mjs --write` after changing the shared review procedure to refresh Claude, Copilot and OpenCode adapters. Hooks cannot be one shared file: Claude supports MCP-tool hooks, Copilot supports command hooks, and Codex/OpenCode rely on the language-server watcher. Codex and Copilot consume the portable root `plugin.json`, `mcp.json`, and `skills/`, so those capabilities are defined once.

The sibling directory `claude-plugins/tools/` (not part of the published plugin) holds `check-explanations.mjs`, `check-plugin-config.mjs`, `lib/plugin-config.mjs`, the `test/` suite, the `smoke/mcp-smoke.mjs` end-to-end test, the `evals/record-mocks.mjs` recorder and the `evals/run-with-copilot.mjs` runner described above.
The sibling directory `claude-plugins/tools/` (not part of the published plugin) holds `check-explanations.mjs`, `check-plugin-config.mjs`, `lib/plugin-config.mjs`, the `test/` suite, the `smoke/mcp-smoke.mjs` end-to-end test, and the `evals/` suite, recorder and runner.

## How it works

Expand Down
Loading