These are prompts I use myself, and they fit my actual needs pretty well:
Here's the AI-written version:
The most painful part of building projects with AI Agents isn't that it can't write code — it's that it drifts off as the conversation goes on. Once the context gets long, it forgets plans you already confirmed; close the conversation and yesterday's progress is gone. After stepping in countless pits, I distilled a minimalist prompt workflow. The core goal is just one thing: make the Agent work across conversations, do only one thing per round, and keep progress always resumable.
The whole workflow has two phases. Straight to the good stuff below.
1. Prep phase: align first, then start
A lot of people start by dumping “help me build an XXX” and the AI immediately starts writing code. Then the direction is wrong and rework costs are huge. My approach is to force it to only look, not write, in this round.
First, describe the requirement as a whole, then list features point by point:
<整体叙述一下需求,如我要做一个 xxx>,以下是具体功能:
<分点列举各个功能,如支持多账号,分 1. 2. 3. ...>
这轮对话先检查环境和获取基础信息,不开始实现
That last line is key: “check the environment and gather basic info first; don't start implementing.” It forces the AI to first get a clear picture of the current state — directory structure, dependency versions, existing code — and then propose a plan, instead of hallucinating from thin air.
At this point the AI gives a first draft plan. Not happy? No problem — keep chatting and adjusting; a few rounds should get it right. Once the plan is settled, send:
讨论符合预期,现在编写 AGENTS.md 和 TODO.md
Have the AI turn the discussion results into files. AGENTS.md records project conventions and background; TODO.md breaks down the task list. These two files are the “memory anchors” across conversations — next time you start a new conversation, the AI reads the files and picks up right where it left off. You don't need to recap at all.
2. Implementation phase: one conversation advances only one phase
Once prep is done, start a new conversation, then send only this line:
推进一个项目阶段,并实时保存进度
Then let the AI work on its own; you don't have to babysit. If something's off within the phase, just keep chatting and adjusting — because the plan and conventions are in the files, it won't go off track.
When the phase is done, start another new conversation, same line:
推进一个项目阶段,并实时保存进度
And so on.
3. Why this workflow works
It looks simple, but it hits a few key points:
1. Separate preparation from execution. No code writing during prep, so it doesn't start before the plan is settled; no more plan discussion during implementation, so it doesn't rewrite while coding. One conversation does only one kind of work, so the AI's attention doesn't get diluted.
2. Fight amnesia with files. Conversations have context, but it gets lost; files persist. AGENTS.md and TODO.md solidify the “discussion output” into facts on disk. A new conversation just reads the files and continues seamlessly. That's the underlying mechanism of “working across conversations.”
3. Use phase splitting to control context length. One new conversation per phase keeps the context clean. The shorter the phase, the more stable the AI performs, and the easier it is for you to pinpoint problems when they happen.
4. “Save progress in real time” is the fuse. This prompt makes the AI write back to the file after every step, so even if the conversation is interrupted, progress doesn't reset to zero.
4. A few tips from use
- Don't be afraid to chat a few extra rounds during prep. Sharpening the axe doesn't delay the woodcutting; the clearer the plan, the smoother things go later.
- Keep TODO.md granularity moderate. A “phase” roughly corresponds to a subsection in TODO. Too big and the AI gets confused; too small and you're opening conversations too often.
- AGENTS.md is written for the AI to read. How to run commands, code style, taboos — put it all in there. It's more reliable than your memory.
This prompt set has no deep tricks. In essence, it's just applying the way you'd onboard a new person to AI: align on requirements first, deliver in phases, and use docs to accumulate shared understanding. If you've also been tortured by long conversations, give it a try.
自用提示词,比较适合我的实际需求:
以下是 AI 文:
用 AI Agent 写项目,最痛苦的不是它写不出来,而是聊着聊着就跑偏了。上下文一长,前面确认过的方案它忘了;对话一关,昨天的进度全丢。我踩了无数坑之后,总结出一套极简的提示词流程,核心就一个目标:让 Agent 跨对话工作,每轮只做一件事,进度永远可续。
整套流程分两个阶段,下面直接上干货。
一、准备阶段:先对齐,再动手
很多人一上来就丢一句「帮我做个 XXX」,AI 立马开始写代码,结果方向错了,返工成本极高。我的做法是强制它这一轮只看不写。
第一步,把需求整体叙述清楚,再分点列举功能:
<整体叙述一下需求,如我要做一个 xxx>,以下是具体功能:
<分点列举各个功能,如支持多账号,分 1. 2. 3. ...>
这轮对话先检查环境和获取基础信息,不开始实现
最后那句是关键:「先检查环境和获取基础信息,不开始实现」。它逼着 AI 先把现状摸清楚——目录结构、依赖版本、已有代码——再给方案,而不是凭空脑补。
这时 AI 会给出初版方案。不满意?没关系,继续对话调整,几轮下来总能磨到合适。方案定了之后,发送一句:
讨论符合预期,现在编写 AGENTS.md 和 TODO.md
让 AI 把讨论结果落成文件。AGENTS.md 记录项目约定和背景,TODO.md 拆分任务清单。这两个文件就是跨对话的「记忆锚点」——下次新开对话,AI 读一遍文件就能接上,根本不需要你复述。
二、实现阶段:一个对话只推进一个阶段
准备阶段结束,新开一个对话,然后只发这一句:
推进一个项目阶段,并实时保存进度
接下来就让 AI 自己干活,你不必盯着。阶段内如果哪里不对,继续对话调整就行,因为方案和约定都在文件里,它不会跑偏。
做完这个阶段,再新开一个对话,还是那句:
推进一个项目阶段,并实时保存进度
以此类推。
三、为什么这套流程有效
看起来简单,背后其实踩中了几个关键点:
1. 准备与执行分离。 准备阶段禁止写代码,避免方案没定就动手;实现阶段不再讨论方案,避免边写边改。一轮对话只干一类事,AI 的注意力就不会被稀释。
2. 用文件对抗失忆。 对话是有上下文的,但会丢;文件是持久的。AGENTS.md 和 TODO.md 把「讨论成果」固化成磁盘上的事实,新对话读文件即可无缝续接。这就是「跨对话工作」的底层机制。
3. 用阶段切分控制上下文长度。 每个阶段一个新对话,上下文始终清爽。阶段越短,AI 表现越稳定,你也越容易在出问题时定位。
4. 「实时保存进度」是保险丝。 这句提示让 AI 每完成一步就写回文件,万一对话中断,进度也不会归零。
四、一点使用心得
- 准备阶段别怕多聊几轮。磨刀不误砍柴工,方案越清晰,后面越顺。
- TODO.md 的粒度要适中。一个「阶段」大致对应 TODO 里的一个小节,太大 AI 容易糊涂,太小又频繁开对话。
- AGENTS.md 是写给 AI 看的,命令怎么跑、代码风格如何、有哪些禁忌,都往里写。它比你的记忆可靠。
这套提示词没有什么高深技巧,本质就是把「人怎么带新人」的思路搬给了 AI:先对齐需求,再分阶段交付,用文档沉淀共识。如果你也被长对话折磨过,不妨试试。
Translated by AI from 简体中文Original (简体中文)
5 replies
Sort order