上一课里,你让一个小功能依次经过了规划者、开发者和评审者,也看到了为什么评审者必须是另一个独立的智能体。这一课要把评审者变成一门真正的规矩。代码评审指的是一个智能体去读另一个智能体的成果,在它进入产品之前先把不对的地方揪出来,这是一个团队能养成的性价比最高的质量习惯。你会在工作区里跑一个评审者,读它给出的问题,然后决定哪些要动手处理。你不用一行一行地读代码,也不用写任何代码。

评审流程是每一处改动从提出走到被接受要经过的那条路。开发者智能体做完一块工作,把它提出来。在这份工作被认可之前,评审者智能体要先读它,然后把结论报回来。只有评审干净了,这处改动才会被合并,也就是并进真正的产品里,去到客户手上。让这套流程能立住的规矩很短:没评审过的一律不合并。小改动不行,紧急的不行,开发者拍胸脯说没问题的也不行。你一旦开了口子,问题就是从这些口子里溜进来的。 ...

你将学到什么

  • The review process: how a change goes from proposed to reviewed to merged, and why nothing merges unreviewed
  • Why the reviewer must be a different agent from the author, so it reads with fresh eyes
  • Quality checks: whether the work meets the requirement, is clear, and has nothing missing or broken
  • refactoring: improving the structure of working code without changing what it does
  • Security reviews: flagging unsafe patterns such as trusting user input without checking it
  • Acting on findings as the leader, deciding what to fix without reading the code line by line

学习「AI Code Reviews」

免费登录,打开 Vibe 编程:多智能体工程 课程。学完这节课,卡住时就问 AI 导师。