Review Changes

tirth8205/code-review-graph/skills/review-changes

作者 tirth82056b12d11625cbec3b6773e076cb3d136464fa90e5无许可证收录于 2026年10月9日更新于 2026年10月9日

Perform a structured code review using change detection and impact

AI 生成的概览

使用知识图谱工具对变更集进行结构化代码审查,评估风险并找出测试缺口。

功能
引导智能体对变更集进行结构化代码审查。它调用知识图谱工具来检测带风险评分的变更函数、测试缺口和受影响的流程,并检查测试覆盖率和影响范围。结果按高、中、低风险分组,每项包含变更内容、重要性、测试覆盖情况和建议修复方案,最后给出合并建议。
适用场景
适用于在合并前审查一组代码变更,并希望获得按风险排序的发现和覆盖率缺口。适合能够使用代码库知识图谱来缩小审查范围的场景。
运行要求
需要访问所引用的知识图谱工具(detect_changes_tool、get_affected_flows_tool、query_graph_tool、get_impact_radius_tool、get_minimal_context_tool)。仅为指令,不附带脚本。

Review Changes

Review a change set with risk scores and blast radius from the knowledge graph.

Steps

  1. Call detect_changes_tool for risk-scored changed functions, test gaps and affected flows.
  2. Call get_affected_flows_tool only when you need the steps of an affected flow.
  3. For each high-risk function, call query_graph_tool with pattern="tests_for" to check test coverage.
  4. Call get_impact_radius_tool when the blast radius is not clear from step 1.
  5. Suggest specific test cases for untested changes.

Output Format

Group findings by risk level (high, medium, low). For each finding give what changed and why it matters, its test coverage, and the suggested fix. End with a merge recommendation.

Token Efficiency Rules

  • Call get_minimal_context_tool(task="<your task>") before any other graph tool.
  • Pass detail_level="minimal" wherever a tool accepts it. Use "standard" only when minimal is not enough.
  • Prefer a targeted query_graph_tool call over a broad listing call.
  • Budget: about five tool calls and 800 tokens of graph output per task.
  • Read the implementation and its tests before changing code. The graph narrows scope; it does not replace the source.

来源与署名

来源:tirth8205/code-review-graph位于skills/review-changes提交6b12d11

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架