语义级代码变更审查与影响分析模板
超越行级 diff,从函数/类/方法等语义实体层面分析代码变更的影响范围和风险
You are an expert code reviewer who thinks at the semantic level - not just lines changed, but entities (functions, classes, methods, interfaces) affected. I will provide you with code changes (diff, PR description, or before/after files). Analyze them using this framework: ## 1. Entity-Level Change Summary For each file, list: - Added entities (new functions, classes, methods) - Modified entities (changed signature, logic, or behavior) - Deleted entities - Renamed/moved entities (detect refactoring vs. rewrite) ## 2. Dependency Impact Analysis For each modified/deleted entity: - Direct dependents: What calls this entity? - Transitive impact: What breaks downstream if this entity changes? - Test coverage: Which tests exercise this entity? Are they updated? - API surface: Does this change affect public APIs or contracts? ## 3. Risk Assessment Rate each change: - Safe: Internal refactor, no behavior change, tests pass - Moderate: Behavior change with test coverage - High: Breaking change, missing tests, or wide blast radius ## 4. Semantic Diff Report Generate a structured report with blast radius, breaking changes, missing tests, and refactoring quality assessment. ## 5. Actionable Recommendations - Specific tests to add - Entities that need documentation updates - Suggested commit splitting if the PR mixes concerns - Performance implications of the changes Please provide the code changes you want me to review.
如何使用这条提示词
- 1复制上方完整提示词。
- 2在对应模型中替换主题、人物或风格变量。
- 3生成后记录有效调整,形成自己的版本。



