根据代码库变更更新现有 FORME.md 文档,先做差异分析再改写相关章节。
填写变量
填写后,下方提示词与复制内容会同步替换。
你正在更新现有的 FORME.md 文档文件,以反映自上次编写以来代码库中的变更。
## 输入
- **当前的 FORGME.md:** {{current_doc}}
- **更新后的代码库:** {{codebase}}
- **已知变更(如有):** [例如,“我们添加了 Stripe 集成,并从 REST 切换到 tRPC” — 或 “我不知道有哪些变更,你自己去分析”]
## 你的任务
1. **差异分析:** 将文档与当前代码进行对比。
识别出新增内容、变更内容以及已被移除的内容。
2. **影响评估:** 针对每一项变更,判断:
- 哪些 FORME.md 章节受到影响
- 变更是表面性的(如文件重命名)还是结构性的(如新的数据流)
- 现有的类比是否仍然成立,或是否需要更新
3. **生成更新:** 针对每个受影响的章节:
- 编写替换文本(不需要提供整个文档,只需变更部分)
- 明确标记:${section_name} → [REPLACE FROM "..." TO "..."]
- 保持与原文相同的语气、类比体系和风格
4. **新增内容:** 如果存在全新的系统/功能:
- 按照相同的结构和语调编写新的子章节
- 将其插入文档中合适的位置
- 如果整体系统描述发生变化,更新“Big Picture”章节
5. **变更日志条目:** 在文档顶部添加一条带日期的记录:
“### Updated ${date} — [一句话概括变更内容]”
## 规则
- 不要重写未发生变化的章节
- 除非底层系统发生变化,否则不要破坏现有的类比
- 如果某项技术被替换,更新“crew”类比(或等效类比)
- 保持相同的语气 — 如果原文是随意风格,则保持随意
- 标记你不确定的内容:“我注意到 [X],但无法确定是否影响 [Y]”You are updating an existing FORME.md documentation file to reflect
changes in the codebase since it was last written.
## Inputs
- **Current FORGME.md:** {{current_doc}}
- **Updated codebase:** {{codebase}}
- **Known changes (if any):** [e.g., "We added Stripe integration and switched from REST to tRPC" — or "I don't know what changed, figure it out"]
## Your Tasks
1. **Diff Analysis:** Compare the documentation against the current code.
Identify what's new, what changed, and what's been removed.
2. **Impact Assessment:** For each change, determine:
- Which FORME.md sections are affected
- Whether the change is cosmetic (file renamed) or structural (new data flow)
- Whether existing analogies still hold or need updating
3. **Produce Updates:** For each affected section:
- Write the REPLACEMENT text (not the whole document, just the changed parts)
- Mark clearly: ${section_name} → [REPLACE FROM "..." TO "..."]
- Maintain the same tone, analogy system, and style as the original
4. **New Additions:** If there are entirely new systems/features:
- Write new subsections following the same structure and voice
- Integrate them into the right location in the document
- Update the Big Picture section if the overall system description changed
5. **Changelog Entry:** Add a dated entry at the top of the document:
"### Updated ${date} — [one-line summary of what changed]"
## Rules
- Do NOT rewrite sections that haven't changed
- Do NOT break existing analogies unless the underlying system changed
- If a technology was replaced, update the "crew" analogy (or equivalent)
- Keep the same voice — if the original is casual, stay casual
- Flag anything you're uncertain about: "I noticed [X] but couldn't determine if [Y]"