From a7421b31474f4be64bb854c0b91e21cc842e80ef Mon Sep 17 00:00:00 2001 From: "2569718930@qq.com" <2569718930@qq.com> Date: Thu, 7 May 2026 00:42:44 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20CLAUDE.md=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E8=B4=A8=E9=87=8F=E9=97=A8=E7=A6=81=E4=B8=8E=E7=BC=96=E7=A0=81?= =?UTF-8?q?=E8=A7=84=E8=8C=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 四道强制自检:tsc/ruff、禁止 Unicode 转义、双主题 CSS 同步、diff 展示。 补上中文 commit 规范、禁止 \uXXXX 转义、UI 双主题同步三条编码规则。 Directive: 每次标记任务完成前必须通过全部质量门禁 --- CLAUDE.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index 6c7f39f6..bbf66721 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -109,3 +109,21 @@ curl http://127.0.0.1:8000/metrics ## Commit Convention This repo uses the **Lore Commit Protocol** — structured decision records with git trailers (`Constraint:`, `Rejected:`, `Confidence:`, `Scope-risk:`, `Directive:`, `Tested:`, `Not-tested:`). Intent line first (why, not what). + +- Always write git commit messages in **Chinese (简体中文)**. + +## Code Style + +- Never use Unicode escape sequences (`\uXXXX`) in source code; write characters directly in UTF-8 encoding. +- When modifying UI components, update both **dark-mode and light-mode CSS files** in the same edit batch. + +## Quality Gates (MANDATORY) + +Before marking any task as complete, you MUST: + +1. **Type check** — Run `npx tsc --noEmit` (frontend) or `python -m ruff check .` (backend) on modified files +2. **No Unicode escapes** — Verify that NO `\uXXXX` sequences were introduced; if found, revert and fix +3. **Dual-theme CSS** — For any UI change, confirm BOTH the dark CSS module AND `ScanTerminalLightTheme.module.css` were updated +4. **Show the diff** — Output `git diff --stat` and test results before declaring success + +If any gate fails, fix it BEFORE reporting success.