跳到正文
Hacker News· ktwu01·· 7 天前AI 评分28

Show HN:用四个问题阻止 AI 生成的 PR 压垮你的 GitHub 仓库

Show HN: Four Questions to stop AI-gen PRs from DDoSing your GitHub repository

AI 导读

针对 benchmark-radar 上一个账号 10 天内提交 58 个 PR、仅 5 个被合并的情况,有人提出在 CONTRIBUTING.md 中加入四个问题,要求 AI 智能体在写 PR 前先停下来向人类确认目标。该方案无需 bot 和依赖,并附带单独的待处理项数量限制,但它并非强制的 PR 拦截机制,只有在智能体读取并遵循指令时才有效。

正文 · 原文

DDoS us with PRs? Your own agent has questions to DDoS you first.

One account. 58 PRs in 10 days. Five merged. That's what landed in benchmark-radar's review queue.

So we put four questions in CONTRIBUTING.md. Before an AI agent writes a PR, it has to stop and ask its human what they're actually trying to achieve. The agent can't answer for them. It has to wait.

The person generating the work gets the questions first. Give your agent the prompt below.

简体中文

30-second install

Paste this into your Agent:

help me copy and paste https://github.com/ktwu01/agent-pr-gate/blob/main/CONTRIBUTING.md into our CONTRIBUTING.md

No bot. No dependencies. We use it here too.

The copied guide includes the four-question gate and which PRs we don't accept, drawing on benchmark-radar's contributing guide.

Why this exists

One account opened 58 PRs in 10 days on benchmark-radar. Five were merged. The maintainer's account documents the flood, including eight PRs in 27 seconds.

benchmark-radar now asks these four questions and tells agents to wait for the human. It also added a separate open-item limit. Results after adopting the gate have not been measured here yet.

The idea is simple: ask contributors to think about who benefits before generating work for maintainers. “Customer” can mean a user or a maintainer.

This works only when an agent reads and follows the instructions. It is not an enforced PR blocker.

Who uses it?

Keep <!-- https://github.com/ktwu01/agent-pr-gate --> in your snippet so others can find it. Search GitHub for adopters. Verify actual use and count unique repos before reporting adoption numbers. Search results can include copies and examples, and miss unindexed repos.

Pass it on

Share this repo with a maintainer whose review queue needs a break.

Inspired by @ycaophysics. CC0 1.0. Copy and adapt freely. No attribution required.

来源:Hacker News · github.com