该提示词为Claude设定项目文档与记忆的创建更新原则,包括分类记录、优先更新、任务文档规范、任务回顾与沟通原则等。适合作为代码项目的Agent配置,帮助AI沉淀架构与决策、规范协作流程。
中文版提示词
请遵守以下项目文档与记忆的创建更新原则。 创建与更新原则:1. 不创建工作汇报或任务总结性质的文档(无使用场景);2. 任何新增文档都必须在 .agentdocs/index.md 中分类并记录;3. 已有相关文档或记忆时,优先更新现有内容而非新建;4. 更新文档或记忆时按原格式重新组织文件,而非简单追加在末尾。 缺少文档的情况:推进任务时,若发现任务依赖或后续可能用到的跨模块约束、设计约定、使用规范或历史决策(如样式基准、接口契约、复用组件规则等)而现有文档缺失、且难以单次阅读局部代码掌握,应把整理补齐这些信息视为任务一部分,及时写入对应文档;补充后更新 .agentdocs/index.md 并继续执行,后续按需迭代细化。 文档:沉淀项目架构、领域边界与跨文件共性信息,可按产品文档、前端文档、后端文档等划分子目录。任务文档记录复杂任务的现状分析、方案设计、背后思考、任务阶段及TODO,存放于 .agentdocs/workflow/ 目录,文件名格式 YYMMDD-任务简述.md(任务简述用短横线连接的英文单词,如 251007-fix-audio-player.md)。 记忆:沉淀项目中长期适用的重要共识、约束、原则或事实,确保不同任务遵循一致准则(如「滚动容器优先使用 CustomScrollArea」「大模型请求统一走 LLMManager」)。 任务处理指南:启动新任务先读 .agentdocs/index.md;执行时自主决定是否查阅相关文档;需求不明确时先向用户提问澄清;简单问题两次修改未解决则视为复杂任务深入分析规划;对用户设想全面客观分析而非一味遵循;复杂任务先抽象厘清再具体执行,必须制定分阶段计划并创建任务文档。 任务回顾:完成任务后呈现最终消息前,判断是否需要形成或更新文档/记忆;复杂任务每完成一个阶段更新TODO状态,全部完成后提醒用户验收,确认后将任务文档移入 .agentdocs/workflow/done/ 并从索引移除。 沟通原则:与用户的所有回复、文档与代码注释均使用中文,必要时保留英文专业名词并在首次出现时附中文注释。
英文版提示词
Follow these principles for creating and updating project docs and memory. Creation and update principles: 1. Do not create work-report or task-summary documents (no use case); 2. Any new document must be categorized and recorded in .agentdocs/index.md; 3. Prefer updating existing content over creating new docs; 4. When updating, reorganize the file in its original format rather than simply appending. Missing docs: while working, if you find cross-module constraints, design conventions, usage rules or historical decisions (style baselines, interface contracts, reusable component rules, etc.) that the task depends on or will need, that are missing and hard to grasp by reading local code once, treat completing them as part of the task and write them to the appropriate doc; then update .agentdocs/index.md and continue. Docs: capture project architecture, domain boundaries and cross-file common info; organize subdirectories like product docs, frontend docs, backend docs. Task docs record status analysis, design, reasoning, stages and TODOs for complex tasks, stored in .agentdocs/workflow/ with filenames like YYMMDD-task-summary.md (hyphenated English words, e.g., 251007-fix-audio-player.md). Memory: capture long-term consensus, constraints, principles or facts (e.g., "prefer CustomScrollArea for scroll containers", "route all LLM requests through LLMManager"). Task handling: read .agentdocs/index.md first; decide whether to consult docs; ask the user to clarify vague requirements; treat a simple issue as complex if two fixes fail; analyze user ideas objectively rather than blindly following; for complex tasks, clarify at a high level first, then plan in stages and create a task doc. Review: before presenting the final message, judge whether docs/memory need updating; for complex tasks, update TODOs after each stage, ask for acceptance when done, then move the task doc to .agentdocs/workflow/done/ and remove it from the index. Communication: use Chinese for all replies, docs and code comments; keep English technical terms when needed with a brief Chinese note on first appearance. 🛠️ **适用 AI 工具**:Claude、ChatGPT、Cursor、Copilot、Gemini、DeepSeek

◯ 评论 0