人工智能的懒惰倾向与个人责任
AI Lazyslop and Personal Responsibility

原始链接: https://danielsada.tech/blog/ai-lazyslop-and-personal-responsibility/

这个故事讲述了与同事“迈克”的一次令人沮丧的经历:他提交了一个大型、未经测试的AI生成代码的合并请求,并催促立即批准。作者认为问题不在于迈克使用了AI,而在于导致不负责任实施的系统性压力。 文章的核心是呼吁对AI生成代码的*负责*。作者希望能够询问迈克他的流程——使用的提示词、代码审查情况以及决策依据。他们提倡在AI使用方面保持透明,在合并请求中披露提示词和审查摘要。 作者将“AI懒散堆积”(AI Lazyslop)定义为未经创建者阅读的AI生成代码,将审查负担转嫁给他人。他们提出了一份个人宣言:对所有代码负责,披露AI的使用,证明已进行审查和测试,并能够独立解释逻辑。 最终,迈克转向了一种“半懒散堆积”的方法,将审查者的评论*反馈*给AI。作者得出结论,这种情况可能很普遍,强调了一种文化转变,需要制定与AI在软件开发中互动的新的行为准则。

## AI、懒惰和代码审查 – Hacker News 讨论 最近 Hacker News 上的一场讨论,由 [danielsada.tech](https://danielsada.tech) 引起,围绕着人工智能如何加剧软件开发中现有的问题,特别是关于代码质量和审查流程。核心问题并非人工智能带来的*新*问题;一位开发者(“Mike”)反复提交大型、测试不足的 PR,试图通过将更改偷偷纳入已批准的请求来绕过彻底审查。 然而,像 LLM 这样的人工智能工具会放大这种行为,使开发者能够生成更多的代码,增加有问题 PR 的频率和数量。审查者现在面临更繁重的工作量,需要区分合法的贡献和“懒散地堆砌”的人工智能生成代码。 评论者指出,根本原因并非人工智能本身,而是系统性问题:缺乏对细致工作的奖励、快速交付的压力以及不充分的流程。一些人建议直接拒绝过大的 PR,而另一些人则指出需要明确的人工智能使用政策(例如 LLVM 的)。一个反复出现的主题是理解人工智能生成代码背后的*推理*——促进透明度——以及管理层可能将速度置于质量之上,最终在出现问题时责怪审查者。
相关文章

原文

Once upon a time, I got a PR from a coworker, I’ll call him Mike.

Mike sent me a 1600 line pull-request with no tests, entirely written by AI, and expected me to approve it immediately as to not to block him on his deployment schedule.

When asking for tests, I’d get pushback on “why do I need tests? It works already”. Then, I’d get a ping from his manager asking on why am I blocking the review.

After I “Requested changes” he’d get frustrated that I’d do that, and put all his changes in an already approved PR and sneak merge it in another PR.

I don’t blame Mike, I blame the system that forced him to do this.

But this is the love letter I’d wish I could have written to him.

AI and personal responsibility.

Dear Mike,

I know you wrote your PR entirely using AI but you didn’t review it at all. I’m not opposed to you using AI, but what I want to know is:

  • What was your thought process using AI?
    • Share your prompts! Share your process! It helps me understand your rationale.
  • Did you personally review the code?
    • One tip I personally do is to add comments to my own PR to show the team my process.
  • Did you use any AI reviewing tools? What things did you decide to fix and ignore?
    • I care more about what you think.
  • How do you have confidence that this works?
    • The cost of tests is cheaper with AI, can you write a test for it?
    • But also don’t lazy-slop-tests that only test language fundamentals. (Classic test testing dictionaries getters and setters.)

Others in the industry

As we find ourselves in this new world, there is still some shame in using AI. But we shouldn’t! Ghostty is asking people to disclose the use of AI upfront and I think changes like this are positive.

Linus Torvalds recently mentioned playing and vibe-coding with AI for a language he didn’t master. We are experiencing a cultural shift in how this tool integrates in our daily lives. Even if you, personally, don’t use AI; There is a high probability that a coworker or collaborator will, and then, you have to decide the rules of engagement.

Given that, I want to define AI Lazyslop.

AI Lazyslop: AI generation that was not read by the creator, which generates a burden on the reader to review.

The anti-AI Lazyslop manifesto.

I will own my code, and the outputs of the parts of the LLM I decide to accept. I will disclose use of AI for my code.

I attest that:

  • I have read and tested all my code.
  • I have included relevant plans/prompts in my PR.
  • I have reviewed my code with some AI assistance, and this is the summary of what I decided to fix:
  • I can explain the logic and design decisions in this code without referring back to AI.

What happened to Mike?

Well, I’d like to say there was a happy story, but Mike evolved to the semi-lazy-slop mode, in which he relayed all of the comments reviewers had to his PR to the LLM. Is that better? Is that worse? I’m not sure, but I’m guessing this is happening in a lot of places.

AI Disclosure

I used claude to help me “Help me review my blog post for style and grammar”. It caught the following:

Line 18: Missing space after "immediately"
Current: immediately not to block him
Better: immediately so as not to block him or immediately to avoid blocking him
Line 18: Question punctuation
Current: "why do I need tests, it works already"
Should be: "why do I need tests? It works already" (separate sentences or use semicolon)
Line 20: Unnecessary quotes around "Requesting changes"
Current: After me "Requesting changes"
Better: After I requested changes or After my "Requesting changes" review
Line 46: Typo
Current: rules of engeagement
Should be: rules of engagement
Line 46: Comma splice
Current: Even if you, personally, don't use AI; There is a high probability
Should be: Even if you, personally, don't use AI, there is a high probability (lowercase "there" after semicolon, or use period)
Line 51: The sentence is a bit long. Consider: I will own my code and the LLM outputs I decide to accept. I will disclose my use of AI.
联系我们 contact @ memedata.com