From d2a5c45214144b189ff5ec61e3cbd90bcd9a8a18 Mon Sep 17 00:00:00 2001 From: UltimeLam <35449771+UltimeLam@users.noreply.github.com> Date: Tue, 10 Nov 2026 18:39:22 +0800 Subject: [PATCH 1/3] =?UTF-8?q?docs:=20=E8=A1=A5=E8=B4=A1=E7=8C=AE?= =?UTF-8?q?=E8=80=85=20review=20=E6=B8=85=E5=8D=95=E4=B8=8E=20PR=20?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/pull_request_template.md | 17 +++++++++++++++++ CONTRIBUTING.md | 12 ++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 .github/pull_request_template.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..46a3118 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,17 @@ +## 变更 + + + +## 自查 + +- [ ] README / 用法 / 示例与代码一致;链接、版本、CHANGELOG 已同步 +- [ ] 注释只写为什么、约束、反直觉处,没有复述代码 +- [ ] 没有新增第二份正文、重复入口或第二套默认值 +- [ ] 新增命令 / 参数 / 退出码有示例与测试 +- [ ] 没有引入调用方包的源码依赖 +- [ ] 已跑 `pnpm check`、`pnpm test`、`pnpm typecheck`、`npm pack --dry-run` + +## 审核重点 + +- 架构 / 边界 / 取舍: +- 风险 / 未覆盖: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 03ef287..5beff37 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -15,6 +15,18 @@ - 不自维护具体项目的字段清单;`schema` 之类由调用方投影。 - 新增命令或退出码:同步 README、`skills.md`、测试与版本戳。 +## Review + +提交 PR 前自查五件事: + +- **文档**:README / 用法 / 示例是否仍准确;链接、版本、CHANGELOG 是否同步。 +- **注释**:只写为什么、约束、反直觉处;不复述代码。 +- **冗余**:同一事实只有一份正文;新增说明先改真源,其他位置只留指针。 +- **缺漏**:新增能力是否有入口、示例与验证命令。 +- **漂移**:`package.json` / README / `CHANGELOG` / VERSION(及适用的 AI 文档)版本是否一致。 + +机械检查交给 CI;人审看架构、边界、语义与取舍。 + ## 验证 ```bash From 54bfea4b8fad84afee4846c6767a1d1d5a0a7e8d Mon Sep 17 00:00:00 2001 From: UltimeLam <35449771+UltimeLam@users.noreply.github.com> Date: Tue, 10 Nov 2026 19:05:39 +0800 Subject: [PATCH 2/3] =?UTF-8?q?docs:=20=E8=A1=A5=E5=AE=8C=E6=95=B4=20Git?= =?UTF-8?q?=20PR=20=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CONTRIBUTING.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5beff37..1d8641a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,11 +2,14 @@ > 给贡献者与 AI 的最短协作规则。命令见 [README](./README.md)。 -## 工作流 - -1. 从 `main` 切 `feat/<主题>` / `fix/<主题>`。 -2. 完成后 `git rebase main` 再合并;主分支不保留中间提交。 -3. 一次提交一件事,提交信息用 `type(scope): subject`。 +## Git 流程 + +1. 从 `main` 切 `feat/<主题>` / `fix/<主题>` / `docs/<主题>`。 +2. 开发完成后 `git rebase main`;一次提交一件事,提交信息用 `type(scope): subject`。 +3. push 分支并开 PR;CI 必须通过,评论必须解决。 +4. 用 rebase / squash 合并,删除分支;`main` 不保留中间提交。 +5. 不直接 push `main`,不 force push、不删除 `main`;`main` 受保护,管理员也一样。 +6. 发布按包版本打 tag,由 CI 执行;tag 规则见仓库保护设置。 ## 改动规则 From 1b62a3775ff32d34f92887aafcdf1c70c020f686 Mon Sep 17 00:00:00 2001 From: UltimeLam <35449771+UltimeLam@users.noreply.github.com> Date: Tue, 10 Nov 2026 19:06:51 +0800 Subject: [PATCH 3/3] =?UTF-8?q?docs:=20=E8=B0=83=E6=95=B4=E5=88=86?= =?UTF-8?q?=E6=94=AF=E5=91=BD=E5=90=8D=E9=81=BF=E5=85=8D=E8=BE=B9=E7=95=8C?= =?UTF-8?q?=E8=AF=AF=E5=88=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1d8641a..88ebf3f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,7 +4,7 @@ ## Git 流程 -1. 从 `main` 切 `feat/<主题>` / `fix/<主题>` / `docs/<主题>`。 +1. 从 `main` 切 `feat/<主题>` / `fix/<主题>` / `docs-<主题>`。 2. 开发完成后 `git rebase main`;一次提交一件事,提交信息用 `type(scope): subject`。 3. push 分支并开 PR;CI 必须通过,评论必须解决。 4. 用 rebase / squash 合并,删除分支;`main` 不保留中间提交。