feat: INV-16 弱模型安全任务描述 — Arc 危险词检测 + 否定约束强制
问题:Do Worker 可能是廉价模型,字面理解任务。"清理旧产品实现"+src/ = 全删。 根因:Arc 用强模型规划,没考虑 Do Worker 推理能力弱。 修复: - SKILL.md: 新增 INV-16 — 禁止歧义词、否定约束显式化、文件范围精确化、完成标准可验证 - commands/arc.md: 新增"弱模型安全"章节,4 条硬规则 - arc_mode.py: _audit_task_safety() 代码级扫描危险词和目录级文件范围 - 危险词: 清理/清除/删除所有/重构整个/重写全部 等 - 目录级范围(src/)+无否定约束 → 警告 - 警告写入 execution-plan.json 的 safetyWarnings 字段 - parallel_review_mode 在写 plan 前自动执行 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -56,6 +56,15 @@ ArcPhaseGate 控制 execution-plan.json 写入权限。phase 默认 `discussing`
|
||||
|
||||
**推进方式**:用户说"确认"/"可以"/"同意"后,`ArcPhaseGate.confirm_architecture()` 自动推进。不丢失(已修复)。
|
||||
|
||||
## 弱模型安全(INV-16)
|
||||
|
||||
Do Worker 可能是廉价模型/本地小模型,字面理解任务无推断能力。产出每个任务时必须:
|
||||
|
||||
1. **禁止歧义词** — 不用"清理"、"重构"、"优化"等宽泛动词,指明具体改什么
|
||||
2. **否定约束显式化** — 写明**不做什么**(如"不删除 src/ 下现有模块")
|
||||
3. **文件范围精确化** — `files_dirs` 精确到文件级,不写 `src/` 目录级
|
||||
4. **完成标准可验证** — `done_when` 能用 `grep`/`diff`/`cmake --build` 客观验证
|
||||
|
||||
## Logging Standard
|
||||
|
||||
When planning C++ projects, the first task MUST be "integrate spdlog" if not already present. All generated code must use spdlog, not std::cout/qDebug/printf.
|
||||
Reference in New Issue
Block a user