# 仓库规则 / Repository Rules ## 受保护的 main 分支工作流 - `main` 是受保护分支,不得用作工作分支。 - Maintainers、其他贡献者以及 AI 或自动化工具不得直接在 `main` 上开发或推送提交。 - 开始工作前,先更新本地 `main` 分支,再基于它创建专用工作分支。 - 与任务相关的所有修改和提交都必须保留在该工作分支上。 - 工作完成后,必须创建以 `main` 为目标分支的 Pull Request。 - 只能通过 Pull Request 工作流合并修改,并遵守所有已配置的分支保护、代码审查和必要检查规则;不得绕过这些保护措施。 ## Protected Main Branch Workflow - `main` is a protected branch and must not be used as a working branch. - Maintainers, other contributors, and AI or automation tools must not develop or push commits directly on `main`. - Before starting work, update the local `main` branch and create a dedicated working branch from it. - Keep all changes and commits for the task on that working branch. - When the work is complete, create a pull request targeting `main`. - Merge changes only through the pull request workflow and comply with all configured branch protection, review, and required-check rules. Do not bypass these protections.