发现了旁边的真 bug,却谁也没告诉
Noticed the real bug next door and told no one
智能体在任务附近看到了一个真问题,既没修,也没报告。只有范围规则、却没有上报渠道时,这种情况会更严重。
适用于: Claude Code · Cursor · Codex · Copilot agent
症状
几周后你在某个文件里踩到 bug,翻记录才发现,智能体之前做别的任务时读过这个文件,也注意到了这个问题。
为什么会这样
守住范围是对的,但沉默会让信息丢失。agent-failure-modes 列出了 AFM-3 被吞掉的发现(可复现)。dev.to 那位作者也遇到了同样的副作用:被拦下的观察“就这么消失了”,后来用“停车场”文件解决。
示例
摘自 dev.to diff budget 文章(停车场条目)。
markdown## Parking lot: task-0412
- src/search/cursor.py has the same off-by-one pattern as the pagination helper.
Likely the same bug. Suggested task: bug fix, tight budget.
复制即用的修复
按你用的智能体挑选文件。规则片段用英文写,放进任何仓库都能用。
规则
Claude Code:加入 CLAUDE.md
CLAUDE.md## Report what you notice, don't silently fix or ignore it
- If you notice a bug, security issue or risky code outside your task, don't fix it in this change,
and don't stay silent: add it to FOLLOWUPS.md and mention it in your final summary under "Noticed, not fixed".
- Include file, line, what's wrong, how sure you are, and a suggested task.
规则
Codex、Copilot 编码智能体等:加入 AGENTS.md
AGENTS.md## Report what you notice, don't silently fix or ignore it
- If you notice a bug, security issue or risky code outside your task, don't fix it in this change,
and don't stay silent: add it to FOLLOWUPS.md and mention it in your final summary under "Noticed, not fixed".
- Include file, line, what's wrong, how sure you are, and a suggested task.
Cursor 规则
Cursor:项目规则
.cursor/rules/swallowed-finding.mdc---
description: "AgentFails: Noticed the real bug next door and told no one"
alwaysApply: true
---
## Report what you notice, don't silently fix or ignore it
- If you notice a bug, security issue or risky code outside your task, don't fix it in this change,
and don't stay silent: add it to FOLLOWUPS.md and mention it in your final summary under "Noticed, not fixed".
- Include file, line, what's wrong, how sure you are, and a suggested task.
模板
FOLLOWUPS.md“停车场”
FOLLOWUPS.md## Noticed, not fixed
- <file:line>: <what is wrong>. Confidence: <high|medium|low>. Suggested task: <type, priority>.
技能
团队共享的 /verify 技能(Claude Code)
把它提交进仓库,让整个团队(以及每个智能体会话)跑同一套检查。把命令换成你项目里真实的命令。
.claude/skills/verify/SKILL.md---
name: verify
description: Verify the current change before calling it done. Use before every commit, PR, or "done" message.
---
# Verify
Run every step and paste the real output. Never summarize a step you did not run.
1. **Scope**: run `git diff --stat` and `git status --short`. For every changed file, say which part
of the request needs it. Any file you cannot justify gets reverted, or listed under
"Unrequested changes" for the user to decide.
2. **Build and types**: `npm run build` (or the project's build command).
3. **Tests**: `npm test`. Report pass/fail counts. If a test was edited, skipped or deleted,
say so explicitly with the reason.
4. **Behavior**: exercise the changed behavior once for real (a curl, a CLI run, a screenshot)
and show what happened.
5. **Report** in this format:
- Requested: <one line>
- Changed files: <list, each with its reason>
- Checks run: <command -> result>
- Not done / unsure: <list, or "none">