Prompt file imported from codescene-oss/codescene-mcp-server (
.github/prompts/analyze_change_set.prompt.md). Copyright stays with the author.
Run a branch-level Code Health analysis using CodeScene MCP Server with analyze_change_set. This is a PR-style safety gate for committed changes on the current branch compared to the given base ref.
After running the tool:
- Summarize the JSON output in clear, actionable language. Use
quality_gatesfor the pass/fail outcome, but also inspect the top-levelmetadataobject so you do not over-interpret an emptyresultsarray. - Highlight any code smells or degradation introduced across the branch.
- Prioritize findings by severity and likelihood of increasing long-term maintenance cost.
- If regressions are reported, identify which files need follow-up
code_health_reviewwork before opening a PR. - Provide practical recommendations for improvements before opening a PR.
- If no regressions are found, state that explicitly and mention any residual risks or testing gaps.
- When
resultsis empty, explain whethermetadata.statusindicates checked files with no degradations (no-issues-found) or no applicable branch changes (no-files-modified).
Treat Code Health 10.0 as the ideal long-term target, but use this prompt to prevent regressions and encourage measurable improvement rather than requiring a perfect score on every branch.
Use concise language suitable for a PR pre-flight review. This prompt is a late safety gate, not a replacement for per-file reviews during editing. Avoid rewriting code unless explicitly asked.