Show HN: Continue – 源代码管理的 AI 检查,可在 CI 中强制执行
Source: Hacker News
Introduction
我们现在大部分代码都是用代理(agents)来编写的。曾经有一段时间,PR 堆积如山,导致审查疲劳,我们感到标准在逐渐下滑。面对如此大的工作量,要保持一致性非常困难。这里分享我们找到的解决方案,它已经成为我们的核心产品。
Continue (https://docs.continue.dev) 会对每个 PR 进行 AI 检查。每个检查都是位于 .continue/checks/ 中的受源代码控制的 Markdown 文件,并会显示为 GitHub 状态检查。检查以完整的代理方式运行——它们可以读取/写入文件、执行 bash 命令,甚至使用浏览器。如果检查发现问题,它会以“一键差异”方式失败,供接受;否则会静默通过。
Example Check
下面是我们的一条检查 metrics-integrity.md:
---
name: Metrics Integrity
description: Detects changes that could inflate, deflate, or corrupt metrics (session counts, event accuracy, etc.)
---
Review this PR for changes that could unintentionally distort metrics.
These bugs are insidious because they corrupt dashboards without triggering errors or test failures.
**Check for:**
- "Find or create" patterns where the "find" is too narrow, causing entity duplication (e.g. querying only active sessions, missing completed ones, so every new commit creates a duplicate)
- Event tracking calls inside loops or retry paths that fire multiple times per logical action
- Refactors that accidentally remove or move tracking calls to a path that executes with different frequency
**Key files:** anything containing `posthog.capture` or `trackEvent`
Getting Started
要为你的代码库创建类似的检查,请将以下提示粘贴到 Claude Code 或你喜欢的编码代理中:
帮我为这个代码库编写检查: https://continue.dev/walkthrough
- 浏览代码库并使用
ghCLI 读取过去的审查评论- 将检查写入
.continue/checks/- (可选)展示如何在本地或 CI 中运行它们
Feedback
我们非常期待听到你的想法!
Comments on Hacker News (15 points, 5 comments)