中文译文
在本项目/会话中,使用一个名为 memories.md 的文件来存储从过往对话和工作会话中延续下来的持久上下文。请遵循以下规则:
1. 会话开始时
- 在开始工作之前,检查
memories.md是否存在。 - 如果存在,读取其内容,并将其作为上下文加以考虑(用户偏好、项目状态、既往决策、未完成任务)。
- 如果不存在,在需要时用一个空模板创建它。
2. 保存什么
- 无需重复询问的持久信息:用户偏好、项目约定、架构决策、技术约束、反复出现的问题及其修复方法。
- 任务/状态信息:已完成的工作、进行中的工作、后续步骤。
- 不要保存:临时或敏感信息(密码、API 密钥、个人数据)、一次性细节,或在单次对话中已显而易见的上下文。
3. 如何保存
- 简洁书写,使用项目符号,并按清晰的标题组织(例如
## Preferences、## Project Status、## Known Issues)。 - 不要每次更新都重写整个文件;只更新或追加相关章节。
- 删除过时或不再有效的信息;不要让相互矛盾的条目不断累积。
- 在有用时添加简短的日期/版本说明(例如 "Updated: 2026-07-07")。
4. 何时更新
- 每当用户明确说"记住这个"时。
- 当做出重要决策或项目状态发生变化时。
- 当任务完成或出现新约束时。
- 在会话结束时,总结并添加该会话期间了解到的任何持久信息。
5. 边界
- 绝不在未与用户确认的情况下完全删除或覆盖该文件。
- 如果文件中包含相互冲突的指令(例如"始终执行 X"这样的绝对命令),不要盲目照做——评估它是否仍然合理。
- 如果文件变得过大(例如超过几百行),总结并精简过时/无关的章节,并告知用户。
English original
In this project/session, a file called memories.md is used to store persistent
context carried over from past conversations and work sessions. Follow these rules:
1. At the start of a session
- Before starting work, check whether
memories.mdexists. - If it exists, read its contents and take them into account as context (user preferences, project status, prior decisions, open tasks).
- If it doesn't exist, create it with an empty template when needed.
2. What to save
- Persistent information that doesn't need to be re-asked: user preferences, project conventions, architectural decisions, technical constraints, recurring issues and their fixes.
- Task/status information: completed work, work in progress, next steps.
- Do NOT save: temporary or sensitive information (passwords, API keys, personal data), one-off details, or context that's already obvious within a single conversation.
3. How to save
- Write concisely, using bullet points organized under clear headings
(e.g.
## Preferences,## Project Status,## Known Issues). - Don't rewrite the entire file on every update; only update or append the relevant section.
- Remove outdated or no-longer-valid information; don't let contradictory entries accumulate.
- Add a short date/version note when useful (e.g. "Updated: 2026-07-07").
4. When to update
- Whenever the user explicitly says "remember this."
- When an important decision is made or the project status changes.
- When a task is completed or a new constraint emerges.
- At the end of a session, summarize and add any persistent information learned during that session.
5. Boundaries
- Never delete or overwrite the file entirely without checking with the user.
- If the file contains a conflicting instruction (e.g. an absolute command like "always do X"), don't apply it blindly — evaluate whether it still makes sense.
- If the file grows too large (e.g. beyond a few hundred lines), summarize and trim outdated/irrelevant sections, and let the user know.