From d836ec80274a022844e3c4abf45ca5ae3e78967b Mon Sep 17 00:00:00 2001 From: GeWuYou <95328647+GeWuYou@users.noreply.github.com> Date: Tue, 21 Apr 2026 16:46:25 +0800 Subject: [PATCH] =?UTF-8?q?docs(agents):=20=E4=BF=AE=E5=A4=8D=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E6=AD=A3=E6=96=87=E6=8D=A2=E8=A1=8C=E7=BA=A6=E6=9D=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 补充 Git 提交规则,禁止使用 Bash $"..." 传递多行 commit body - 规定多行正文应改用多个 -m 或 ANSI-C $... 引号,避免字面量 \n 被写入提交信息 - 验证 docs 站点构建通过 --- AGENTS.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 21170139..cafd8cb7 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -32,6 +32,9 @@ All AI agents and contributors must follow these rules when writing, reviewing, `更新`、`补充`、`重构`. - Each commit body bullet MUST describe one independent change point; avoid repeated or redundant descriptions. - Keep technical terms in English when they are established project terms, such as `API`、`Model`、`System`. +- When composing a multi-line commit body from shell commands, contributors MUST NOT rely on Bash `$"..."` quoting for + newline escapes, because it passes literal `\n` sequences to Git. Use multiple `-m` flags or ANSI-C `$'...'` + quoting so the commit body contains real line breaks. - If a new task starts while the current branch is `main`, contributors MUST first try to update local `main` from the remote, then create and switch to a dedicated branch before making substantive changes. - The branch naming rule for a new task branch is `/`, where `` should match the intended