chore(V5.7): 增加中文提交信息校验门禁

This commit is contained in:
Codex
2026-08-11 03:07:45 +08:00
parent fd6be4f9b9
commit 2de796143f
7 changed files with 353 additions and 0 deletions
+16
View File
@@ -108,6 +108,22 @@ WSL 已验证:EMQX `5.8.9`、MQTTX CLI `1.13.0`、EMQX 服务 `active (running
## 持续开发规则
### 一次性启用 Git 中文提交门禁
每次新克隆仓库后必须执行一次安装脚本;Git hook 不会仅因克隆仓库自动启用。Windows 在仓库内执行:
```powershell
powershell -ExecutionPolicy Bypass -File .\scripts\setup-git-hooks.ps1
```
WSL/Ubuntu 在仓库内执行:
```bash
sh scripts/setup-git-hooks.sh
```
脚本会把当前克隆的 `core.hooksPath` 配置为 `.githooks`。之后每次提交都会校验首行符合 `<type>(<scope>): 中文摘要`;可单独运行 `node scripts/tests/check-commit-message.test.mjs` 验证门禁。
- 唯一模块顺序:`M00 → M01 → M02 → … → M10`,模块内按 `A → B → C → …`
- `docs/module-status.md` 顶部的 `execution_cursor` 是唯一续接游标;Codex 不重新规划、不从 M00 重来。
- 一个 commit 只完成一个子阶段;同一次 Codex 会话可连续完成多个相邻子阶段。