正在打开每日关注
正在打开每日关注
将仓库中的 AGENTS.md 规则转化为可追溯的 PR 自动审查标准。
codex code review now reads 𝗰𝘂𝘀𝘁𝗼𝗺 𝗿𝘂𝗹𝗲𝘀 straight from AGENTS.md. when a rule fires, the review comment cites the one you wrote. so if your file is a mess, that's a problem now. also a decent excuse to clean it up. reminded me of the CLAUDE.md file that topped github trending (karpathy's four coding principles, 𝟭𝟵𝟱𝗸 𝘀𝘁𝗮𝗿𝘀 now). it teaches your agent how to write code. flip it around and the same four rules review every PR: → 𝘁𝗵𝗶𝗻𝗸 𝗯𝗲𝗳𝗼𝗿𝗲 𝗰𝗼𝗱𝗶𝗻𝗴: the ticket reads more than one way and the diff silently picks one, flag it → 𝘀𝗶𝗺𝗽𝗹𝗶𝗰𝗶𝘁𝘆 𝗳𝗶𝗿𝘀𝘁: single-use abstractions, speculative features, error handling for cases that can't happen, flag it → 𝘀𝘂𝗿𝗴𝗶𝗰𝗮𝗹 𝗲𝗱𝗶𝘁𝘀: changed lines that don't serve the PR's goal, drive-by refactors next door, flag it → 𝗴𝗼𝗮𝗹-𝗱𝗿𝗶𝘃𝗲𝗻: a bugfix with no test that reproduces the bug, flag it paste the whole block into root AGENTS.md: ## Code Review Rules ### Think before coding if the linked issue allows multiple readings, the PR states which one it picked and why. flag silent picks. ### Simplicity first flag abstractions with a single call site, features nobody asked for, and error handling for scenarios that cannot happen. ### Surgical edits every changed line traces to the PR's stated goal. flag drive-by refactors and formatting churn in untouched logic. ### Goal-driven a bugfix ships with a test that reproduces the bug. flag fixes that ship without one, unless the PR says why a test is impractical. repo below 👇
Codex Code Review can now use custom repository rules in AGENTS.md. Start with a check your reviewers keep repeating. Keep it concise and scoped so Codex can catch repository-specific issues even when the relevant context is siloed. https://t.co/dMF1APvYYR
是什么 这条内容介绍 Codex Code Review 读取仓库根目录 AGENTS.md 自定义规则的能力:规则触发时,审查评论会引用对应原文。它把原本用于指导 Agent 写代码的约束,反向复用为 PR 质量门槛。核心设计 观点给出四条可迁移的规则:先澄清需求歧义,优先简单实现,只保留服务当前目标的“手术式”改动,并要求 Bug 修复带可复现测试。价值不在规则数量,而在规则与仓库上下文同址、可被自动审查且能追溯到作者表述。关键洞察 AGENTS.md 不应是泛化的长篇规范,而应沉淀团队反复提醒、可观察、可判定的检查项;评论引用规则也让反馈更容易形成闭环。边界与风险 规则若写得含糊、过度绝对或脱离项目技术约束,可能制造误报,压制必要重构,或把“没有测试”变成机械门禁。单一规则集不能替代人工判断,尤其在安全、性能和架构权衡上;落地前应明确例外条件、适用范围和测试不可行性。