🐛 fix(commit-message): reject unsafe drafting shortcuts
This commit is contained in:
@@ -147,6 +147,20 @@ policy 的 `emoji.requirement_env` 未设置时使用 `required_by_default`;
|
||||
在用户明确选择不拆分前,不要给出合并后的 `Proposed`。任何组未校验通过时,不得
|
||||
把整份拆分建议标为已验证。
|
||||
|
||||
## 危险信号(Red Flags)
|
||||
|
||||
出现以下任一情况时停止并纠正,不能继续生成最终建议或执行动作:
|
||||
|
||||
- **混淆 staged 与 unstaged**:用工作树 diff 代替 cached diff,或在无 staged diff
|
||||
时把未暂存草稿标为最终 `Proposed`。
|
||||
- **用摘要代替边界审查**:只看文件名或 diff stat,不读取完整 cached diff 和相关
|
||||
hunk;同一文件中的无关意图因此被错误合并。
|
||||
- **伪造校验完成**:仅手工检查格式,或运行无参数的 HEAD/CI 模式,却声称候选主题
|
||||
已通过 validator。
|
||||
- **忽略状态漂移**:cached diff 指纹或状态已变化,仍沿用旧意图判断和旧候选。
|
||||
- **越权执行**:为了实现拆分而自行改 index,或把提交授权、暂存授权和 index 重组
|
||||
授权视为同一个许可。
|
||||
|
||||
## 成功标准
|
||||
|
||||
- 建议准确描述当前已暂存差异,而不是猜测用户意图。
|
||||
|
||||
Reference in New Issue
Block a user