yr.al

编程规范迭代规划与调试提示词精选 — Simon Last @ X

2026-07-20 · 原文 ↗ · 本页为存档备份
人工智能编程软件开发提示词工程代码调试开发规划
Simon Last 分享了几段用于辅助编程的提示词。在迭代需求时,应重新思考如何在实现目标的同时,让方案更加简单直接;在制定计划时,应先充分研究现有代码库,再提出只包含具体操作和端到端验证方式的详细计划,暂不修改代码。调试时应以寻找真相和根因为导向,通过阅读代码及添加临时日志验证逻辑,而不是盲目重复运行并期待问题自行消失。

Sharing a few of my favorite prompt snippets for coding: For iterating on a spec: Please step back and think again. How can we make this SIMPLER and DUMBER while still achieving our goals? For planning: <goal here> Please research the codebase to make sure you fully understand how stuff currently works, and make a detailed plan to achieve the above. Your plan must be fully fleshed out and include only concrete actions such as editing files and running commands (ie. your plan cannot include actions like “read this file”). Your plan must also include how you will verify it is correct yourself, end-to-end. Don’t make any code changes yet. Research now as much as you need and then chat back with your full plan when ready. For debugging: Please think carefully and truth seek. Don't just blindly re-run things and hope they will work. Read the code, and liberally add temporary logging statements anywhere in the codebase to verify logic works as you expect (just remember to not commit them). Dig deep and take the time to really figure out the root causes of problems.