@unifan/pi-unifan-zh 1.0.16 → 1.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -14
- package/README_zh.md +27 -14
- package/extensions/review/index.ts +1250 -235
- package/extensions/review/package.json +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -85,20 +85,33 @@ pi install npm:@unifan/pi-commit-zh
|
|
|
85
85
|
|
|
86
86
|
---
|
|
87
87
|
|
|
88
|
-
### 2. 🔍 `review` (AI Code Review Suite)
|
|
89
|
-
- **
|
|
90
|
-
-
|
|
91
|
-
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
- **
|
|
95
|
-
- **`/review
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
88
|
+
### 2. 🔍 `review` (Interactive AI Code Review Suite)
|
|
89
|
+
- **Architecture Highlights**:
|
|
90
|
+
- Re-architected following the battle-tested **Codex & pi-agent-extensions** design (by Armin Ronacher @mitsuhiko).
|
|
91
|
+
- **Dual Execution Engine**:
|
|
92
|
+
- ① **Single-Model Native Review (Default & Recommended)**: 0 subagent dependencies, 0 network dropouts, ultra-fast & 100% reliable.
|
|
93
|
+
- ② **Multi-Subagent Concurrent Review**: Freely configure **2, 3, 4, 5, or 6** concurrent expert subagents (Bugbot, Security, Perf, Compliance, Comments, History).
|
|
94
|
+
- **Commands**:
|
|
95
|
+
- **`/review`** 🔍: Launches interactive Chinese TUI menu with 6 review modes + settings:
|
|
96
|
+
- ① `Review uncommitted changes` (staged + unstaged working tree, smart default)
|
|
97
|
+
- ② `Review against base branch` (auto merge-base calculation against main/master/dev)
|
|
98
|
+
- ③ `Review specific commit` (search and pick from recent commits)
|
|
99
|
+
- ④ `Review GitHub Pull Request` (auto local checkout via gh CLI)
|
|
100
|
+
- ⑤ `Review folder/files snapshot` (full snapshot audit, non-diff)
|
|
101
|
+
- ⑥ `Custom review focus` (concurrency, GC, security, API contracts)
|
|
102
|
+
- ⑦ `⚙️ Review Configuration` (configure Single Model vs Multi-Subagent 2~6 experts)
|
|
103
|
+
- **`/review-config`** ⚙️: Standalone interactive settings command (persisted to `~/.pi/agent/pi-review.json`).
|
|
104
|
+
- **`/review-lite`** ⭐: Directly audits current uncommitted changes without menu prompts.
|
|
105
|
+
- **`/end-review`** 🏁:
|
|
106
|
+
- Automatically structures review findings into P0~P3 action items.
|
|
107
|
+
- Seamlessly jumps back to the original working branch and pre-fills the editor with fix instructions!
|
|
108
|
+
- **CLI Flags**:
|
|
109
|
+
- `/review --subagents -c 2`: Temporarily launch review with 2 concurrent subagents.
|
|
110
|
+
- `/review --single`: Force single-model native review.
|
|
111
|
+
- **Standards & Guidelines**:
|
|
112
|
+
- **P0~P3 Strict Severity Tags**: Blocker, Urgent, Normal, Low.
|
|
113
|
+
- **Zero Speculation & Grounded in Diff**: Every finding is backed by source evidence.
|
|
114
|
+
- **Custom Guidelines**: Automatically respects repo-level `REVIEW_GUIDELINES.md`, `AGENTS.md`, or `CLAUDE.md`.
|
|
102
115
|
|
|
103
116
|
---
|
|
104
117
|
|
package/README_zh.md
CHANGED
|
@@ -84,20 +84,33 @@ pi install npm:@unifan/pi-commit-zh
|
|
|
84
84
|
|
|
85
85
|
---
|
|
86
86
|
|
|
87
|
-
### 2. 🔍 `review`(AI
|
|
88
|
-
-
|
|
89
|
-
-
|
|
90
|
-
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
-
|
|
94
|
-
- **`/review
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
87
|
+
### 2. 🔍 `review`(AI 交互式代码审查套件·中文版)
|
|
88
|
+
- **架构亮点**:
|
|
89
|
+
- 参考并融合了 **Codex 与 pi-agent-extensions**(Armin Ronacher @mitsuhiko)的经典架构。
|
|
90
|
+
- **双执行引擎自由切换**:
|
|
91
|
+
- ① **单模型深度审查(默认推荐)**:0 子代理依赖,0 网络断流,极速且 100% 稳定。
|
|
92
|
+
- ② **多 Subagent 并发审查**:支持自由配置并发启动 **2、3、4、5、6** 个专家子代理协同会诊(Bug猎手、安全专家、性能探针、规范合规、注释质量、历史脉络)。
|
|
93
|
+
- **核心审查命令**:
|
|
94
|
+
- **`/review`** 🔍 **(交互式全功能审查)**:唤起全中文 TUI 选择弹窗,支持 6 种审查模式与配置中心:
|
|
95
|
+
- ① `审查未提交改动` (工作区已暂存 + 未暂存代码,智能默认推荐)
|
|
96
|
+
- ② `与基准分支对比审查` (如与 main / master / dev 自动计算 merge-base 对比)
|
|
97
|
+
- ③ `审查指定提交` (从最近提交历史中搜索挑选)
|
|
98
|
+
- ④ `审查 Pull Request` (输入 PR 编号或 GitHub URL 本地自动检出审查)
|
|
99
|
+
- ⑤ `审查指定目录/文件` (全量静态快照审查,非 diff)
|
|
100
|
+
- ⑥ `自定义审查要求` (针对并发安全、GC/性能、指定接口等重点排查)
|
|
101
|
+
- ⑦ `⚙️ 审查配置中心` (弹窗设置:单模型 / 多Subagent并发数 2~6 个)
|
|
102
|
+
- **`/review-config`** ⚙️ **(审查配置中心)**:独立配置命令,随时切换审查引擎模式与并发数(配置自动保存在 `~/.pi/agent/pi-review.json`)。
|
|
103
|
+
- **`/review-lite`** ⭐ **(极速单兵审查)**:无需弹窗,直接对当前工作区未提交改动做审查。
|
|
104
|
+
- **`/end-review`** 🏁 **(结束审查并返回)**:
|
|
105
|
+
- 自动将审查分支中发现的 `[P0~P3]` 缺陷与待办事项生成结构化中文报告。
|
|
106
|
+
- 一键平滑跳回主开发会话分支,并自动在输入框回填 `根据上述代码审查发现进行修改修复`!
|
|
107
|
+
- **命令行参数支持**:
|
|
108
|
+
- `/review --subagents -c 2`:临时以 2 个专家并发启动审查
|
|
109
|
+
- `/review --single`:强制单模型直接审查
|
|
110
|
+
- **审查准则与标准**:
|
|
111
|
+
- **P0~P3 严格分级**:致命阻塞、紧急待修、普通建议、细节优化。
|
|
112
|
+
- **严格过滤误报**:基于代码事实与真实 diff,杜绝主观臆测,重点排查并发竞态、内存开销、外部未受信输入与边界异常。
|
|
113
|
+
- **支持项目定制规范**:自动识别并加载项目根目录的 `REVIEW_GUIDELINES.md`、`AGENTS.md` 或 `CLAUDE.md`。
|
|
101
114
|
|
|
102
115
|
---
|
|
103
116
|
|