Loading...
Loading...
Compare original and translation side by side
brew install ataraxy-labs/tap/gh-agentbrew install ataraxy-labs/tap/gh-agentgh-agent pr view --repo OWNER/REPO N --smartgh-agent pr diff --repo OWNER/REPO N --smart-files--repo-wideundefinedgh-agent pr view --repo OWNER/REPO N --smartgh-agent pr diff --repo OWNER/REPO N --smart-filesundefined
Search for:
- **Deleted exports/types** — still imported elsewhere?
- **Removed function parameters** — callers updated?
- **Changed constants/config** — validators, serializers, tests in sync?
- **Removed attributes/flags** — renderers, parsers, importers still reference them?
**4. Context** — when diffs or impact results need more detail:
```bash
重点搜索以下内容:
- **已删除的导出/类型** —— 是否仍在其他地方被导入?
- **已移除的函数参数** —— 调用方是否已更新?
- **已更改的常量/配置** —— 验证器、序列化器和测试是否同步更新?
- **已移除的属性/标志** —— 渲染器、解析器和导入器是否仍在引用它们?
**4. 补充上下文** —— 当差异内容或影响分析结果需要更多细节时:
```bash
`--repo-wide` uses GitHub Code Search + always includes PR files at head ref. PR results win on overlap. `--base` searches the base branch instead.
**5. Review** — you are an expert senior engineer with deep knowledge of software engineering best practices, security, performance, and maintainability. Perform a thorough code review of the collected diffs and impact results:
1. Generate a high-level summary of the changes in the diff.
2. Go file-by-file and review each changed hunk.
3. Comment on what changed in that hunk (including the line range) and how it relates to other changed hunks and code, reading any other relevant files. Also call out bugs, hackiness, unnecessary code, or too much shared mutable state.
4. Flag any `--repo-wide` hits from impact analysis that indicate broken callers, stale references, or missing updates outside the PR.
5. Categorize findings by severity: CRITICAL, HIGH, MEDIUM, LOW.
**6. Post** (only when user asks):
```bash
`--repo-wide`参数会使用GitHub代码搜索,并且始终包含PR分支头部的文件。如果PR文件与仓库其他文件有重叠,优先显示PR结果。`--base`参数则搜索基准分支的内容。
**5. 执行评审** —— 你是一名资深工程师,精通软件工程最佳实践、安全、性能和可维护性。请基于收集到的差异内容和影响分析结果进行全面的代码评审:
1. 生成差异内容的高层级总结。
2. 逐文件评审每个变更块。
3. 评论该变更块的内容(包括行号范围),以及它与其他变更块和代码的关联,同时阅读相关的其他文件。还要指出bug、不规范写法、冗余代码或过多的共享可变状态。
4. 标记影响分析中`--repo-wide`搜索结果里的所有问题,比如PR之外存在损坏的调用方、过时引用或缺失的更新。
5. 按严重程度对发现的问题进行分类:CRITICAL(严重)、HIGH(高)、MEDIUM(中)、LOW(低)。
**6. 发布评审结果**(仅在用户要求时执行):
```bashundefinedundefined| Command | Purpose |
|---|---|
| Smart triage — always start here |
| PR metadata as JSON |
| Diffs for non-mechanical files only |
| Diff for specific file(s) (substring match, repeatable) |
| File stat table |
| Commentable lines map |
| Read file at PR branch |
| Text search PR changed files |
| Text search full codebase |
| Structural search PR changed files |
| Structural search full codebase |
| Post review from JSON |
| Post suggestion comment |
| 命令 | 用途 |
|---|---|
| 智能分类筛选 —— 始终从该命令开始 |
| 以JSON格式输出PR元数据 |
| 仅获取非机械性变更文件的差异 |
| 获取指定文件的差异内容(支持子字符串匹配,可重复使用) |
| 输出文件变更统计表格 |
| 输出可评论行的映射表 |
| 读取PR分支下的指定文件 |
| 在PR已更改文件中执行文本搜索 |
| 在整个代码库中执行文本搜索 |
| 在PR已更改文件中执行结构化搜索 |
| 在整个代码库中执行结构化搜索 |
| 从JSON文件发布评审结果 |
| 发布建议类评论 |
--smart--smart-filespr filepr greppr ast-grep--repo-wide--repo-wide--smart--smart-filespr filepr greppr ast-grep--repo-wide--repo-wide