发帖者建议在 Codex 中明确要求使用 Occam’s Razor,以减少 Sol 的过度工程;这套规则同样可作为 Luna 处理代码任务时的边界提示。评论区补充了重要限制:简单不等于取消模块边界,仍要保持清晰职责;如果已有大量 skills、plugins 或互相冲突的规则,单独增加这段提示未必能解决 harness 问题。
Apply Occam's Razor
- Prefer the simplest design and implementation that fully satisfies the
current, demonstrated requirements.
- Do not add abstractions, layers, configuration, extension points, dependencies,
or infrastructure for hypothetical future needs. Introduce them only when
concrete requirements or repeated patterns justify their cost.
- Before adding code, consider whether the goal can be met by deleting,
consolidating, or reusing existing code.
- When multiple approaches are correct, choose the one with fewer concepts,
moving parts, and maintenance obligations, unless evidence shows that a more
complex approach is necessary.
- Treat patterns and principles as tools, not goals. Do not apply SOLID, design
patterns, or architectural boundaries in ways that make a small solution more
complicated than the problem requires.The goal should be the simplest design that still preserves clear responsibilities and boundaries.
A lot of these prompts work fine in isolation because it’s good advice, doesn’t mean the agent won’t wander or get conte… 以上为必要节选,完整内容请查看原文。
You have to tell it specifically to use Occam's razor. Otherwise, it may still over-engineer even if the instructions ar… 以上为必要节选,完整内容请查看原文。
这段提示词只约束复杂度,不替代项目规范、测试和安全检查。使用时应追加任务级完成标准,例如“先检查现有实现、列出受影响文件、完成测试后停止”,防止模型把“最简单”误解为删除必要的职责边界。
GPT-5.6 Luna