提问 HN:你在 Claude/agents.md 文件中最喜欢哪一行代码?

3作者: khasan222大约 14 小时前
你用过哪些 LLM 技巧来编写真正可维护的软件? 我先来。我最喜欢在我的 Claude.md 文件里加一行,这能帮助我解决在使用 LLM 时,对构建什么或任务理解上产生的任何歧义。 关键:对于用户提出的任何请求,务必制定详细的计划,包括分析、规范、实现规范的待办事项列表,以及逐步的手动测试策略。即使是“接受编辑”的情况,也要让用户完全确认计划。如果用户要求更改计划的任何部分,请根据他们的要求制定新计划,并将其呈现给用户。在用户批准计划且未要求更改之前,绝对不要开始编辑文件。在所有测试的手动检查策略都成功通过之前,不要认为任务已完成。
查看原文
What are some llm tips you’ve used to make software that is actually maintainable?<p>I’ll go first. My new favorite line in my Claude.md. Helps me get around any ambiguity I have with my llm about what is being built or understood by tasks.<p>CRITICAL: Always make detailed plan with sections for Analysis, specifications, to do list to achieve the spec, and a step by step manual testing strategy for any request a user makes. Always, even when &quot;accept edits on&quot;, ask the user to confirm the plan in its entirety. If the user requests changes to any of the plan, make a new plan considering their requests and present it to the user. Never ever start editing files until the user has approved the plan without requesting changes to it. Do not consider the task done until all of the testing Manual Checking strategies successfully passes.