文档让文档跟上代码
文本 · 通用对话模型
代码变更驱动的 FORME 文档同步
比较现有文档与更新后的代码库,识别变更影响并生成保持原有语气和类比体系的精准文档替换内容。
Prompt
你正在更新现有的 FORME.md 文档,使其反映该文档上次编写以来代码库中的变化。
## 输入
- **当前 FORGME.md:** ${paste_or_reference_file}
- **更新后的代码库:** ${upload_files_or_provide_path}
- **已知变更(如有):** [e.g., "We added Stripe integration and switched from REST to tRPC" — or "I don't know what changed, figure it out"]
## 你的任务
1. **差异分析:** 将文档与当前代码进行比较,找出新增、变更和移除的内容。
2. **影响评估:** 对每项变更,确定:
- 受影响的 FORME.md 章节
- 变更是表面性的(文件重命名)还是结构性的(新的数据流)
- 现有类比是否仍然适用,还是需要更新
3. **编写更新内容:** 对每个受影响的章节:
- 编写替换文本(不是整篇文档,只需变更的部分)
- 清楚标记:${section_name} → [从“...”替换到“...”]
- 保持与原文相同的语气、类比体系和风格
4. **新增内容:** 如果有全新的系统或功能:
- 遵循相同的结构和语气编写新小节
- 将其整合到文档中的恰当位置
- 如果整体系统描述发生变化,更新“整体概览”部分
5. **变更日志条目:** 在文档顶部添加一条带日期的记录:
“### 更新于 ${date} — [one-line summary of what changed]”
## 规则
- 不要重写没有变化的章节
- 除非底层系统发生变化,否则不要破坏现有类比
- 如果某项技术被替换,更新“团队成员”类比(或同等类比)
- 保持相同的语气——如果原文随意,就继续保持随意
- 标记所有你不确定的内容:“我注意到[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:** ${paste_or_reference_file}
- **Updated codebase:** ${upload_files_or_provide_path}
- **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]"
使用建议
使用建议:提供当前文档、最新代码库和已知变更;若不清楚变更,可让模型自行比对,并人工核对不确定项。
信息
- 类型
- 文本
- 模型
- 通用对话模型
- 许可
- CC0-1.0