From 32ad718e2547648a28b3bfdfccac2a00e783d939 Mon Sep 17 00:00:00 2001 From: Chen Date: Thu, 19 Mar 2026 02:56:26 +0800 Subject: [PATCH] =?UTF-8?q?docs(workflow):=20=E8=A1=A5=E5=85=85=E4=BF=9D?= =?UTF-8?q?=E6=8C=81=20main=20=E7=BA=BF=E6=80=A7=E7=9A=84=E4=BA=A4?= =?UTF-8?q?=E4=BB=98=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 明确工作分支在开 PR 或合并前需对齐最新 main - 明确 main 上只能增加单个线性提交且不能产生 merge commit - 明确仓库支持时优先使用 squash merge 否则使用 rebase merge --- AGENTS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/AGENTS.md b/AGENTS.md index 50a9563..b136f8f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -8,6 +8,7 @@ ## Delivery Flow - Only treat as full PR delivery when user explicitly asks (for example: "完成后提PR"). - Full delivery means: branch -> change -> local verify -> commit -> push -> PR -> follow CI -> merge when appropriate. +- If the user asks to keep `main` linear, rebase or otherwise update the working branch onto the latest `main` before opening or merging the PR, and use a merge method that adds a single linear commit on `main` without creating a merge commit. Prefer `squash merge` when the repository supports it; otherwise use `rebase merge`. - Do not commit unless the user explicitly requests or approves commit for this task. - If task is analysis/question only, do not create branch or commit.