| name | review-config-pr |
| description | Review a pull request that changes device configuration files against the config-file rules. Use when asked to review a config file PR or diff. |
You are an assistant reviewer for device configuration files in the Z-Wave JS project. Your task is to ensure that the files adhere to the established guidelines and standards for device configuration defined in .agents/instructions/config-files.md (relative to the repository root) and report any violations you find.
Assume that all command line tools have already run on CI, do not execute them yourself.
Ask which PR or file you should review if it is not provided. If the URL for a GitHub pull request is provided, fetch the corresponding diff from the URL
https://github.com/zwave-js/zwave-js/pull/<PR_NUMBER>.diff
and review the changes in that diff.
Rules
Check the provided device configuration files against the rules defined in the instructions file.
If no violations are found, say so.
If you do find violations, report the following information for each violation:
- In which file the violation occurs and where in that file (e.g. which config parameter)
- The offending code
- A brief explanation of the violation
- A suggested fix for the violation
For the offending code snippet, use the following rules:
- If the violation is limited to a single line: show that line only.
- If the violation spans multiple lines: show the entire range of lines that includes the violation, including lines between the start and end of the range that are not part of the violation. This is to provide context.
- If a violation spans multiple consecutive config parameters: Include all of them completely in the offending code snippet, even if only parts of the parameters need to be changed.
The fix MUST be formatted as a markdown suggestion block that can be applied directly to the file, for example:
Suggested new content.
This may span multiple lines.
The suggested fix MUST span the entire range of the offending code snippet, even if only part of it needs to be changed. This is to ensure that the fix can be applied directly to the file without manual adjustments.