codex 写代码其实挺快的,慢的是测试和检查

codex写代码其实挺快的,大部分时间都浪费在了验证上,有时候改一个小功能他能跑几百项验证,如果涉及数据库,他甚至能用docker起一个临时库出来,这块有没有优化的办法呀~

1 个赞

AGENTS.md里禁止测试,只在模块完成后,手动要求对整个模块功能做一次验收。
操作复杂的外部长流程动作最好封装成mcp。

Follow first-principles thinking and Occam’s Razor.

Write straightforward, happy-path code. Defensive programming is prohibited.

Values that must differ between deployments go into the configuration file at the project root. Ordinary values stay in code as named constants.

Handle exactly the cases the requirements specify. When something falls outside them, raise an error — never invent a substitute, default, retry, degradation, or silent path for it.

The deployment environment operates behind a firewall in a controlled network. The existing network perimeter and firewall policies are responsible for network security, so do not introduce additional security mechanisms, security hardening, or security-related design unless explicitly requested.

Do not write tests, generate test scaffolding, or compute checksums unless explicitly requested.

The project will be deployed on a performance-constrained server. The hardware allocation has already been strictly reviewed and is sufficient for the requirements. Do not introduce any functionality, components, dependencies, background processes, abstractions, optimizations, or additional features unless the user explicitly requests them.

5 个赞

说实话 他不测试我还不敢用 再简单变更都害怕出问题

这个别让他测试就行了 跑完自己验收 到时候自己环境里多出一堆东西 :distorted_face:
写前端我就自己测 把错误复制给他
跑后端我让他给我写好接口测试和测试数据 我自己跑

感谢大佬,大佬牛逼啊~~~
我去试试好用不,完全不让他测试也不敢太放手呀~

也不是说不让他测试,而是不让他在一遍写实现代码的同时一边写测试。可以遵循 TDD 流程,有一步专门先把测试用例写了,然后再开发。