Loading...
Loading...
Compare original and translation side by side
principles/04-file-references-over-snippets.mdCLAUDE.mddocs/README.mdCONTRIBUTING.md*.mdprinciples/04-file-references-over-snippets.mdCLAUDE.mddocs/README.mdCONTRIBUTING.md*.mdgit diff origin/main...HEAD --name-only > /tmp/changed-files.txt
git diff origin/main...HEAD --statgit diff origin/main...HEAD --name-only > /tmp/changed-files.txt
git diff origin/main...HEAD --stat
Note:
- New files added.
- Removed files.
- Renamed symbols or moved files (these break every doc that referenced the old path).
- Changed function signatures or behavior.
- New or removed config options.
注意:
- 新增的文件。
- 删除的文件。
- 重命名的符号或移动的文件(这些会破坏所有引用旧路径的文档)。
- 变更的函数签名或行为。
- 新增或移除的配置选项。undefinedundefined
For each hit, open the file and assess:
| Situation | Action |
|---|---|
| The doc's claim is still accurate | Skip — no update needed. |
| The doc names a file/symbol that was renamed | Update the reference. |
| The doc embeds a snippet that no longer matches the source | Replace the snippet with a file reference (principle 04). |
| The doc describes old behavior | Rewrite to match the new behavior, OR flag and ask the user. |
| The doc is now irrelevant | Delete or merge into another doc. |
对于每个匹配结果,打开文件并评估:
| 场景 | 操作 |
|---|---|
| 文档描述仍然准确 | 跳过 — 无需更新。 |
| 文档中提及的文件/符号已被重命名 | 更新引用内容。 |
| 文档中嵌入的代码片段与源码不再匹配 | 用文件引用替换代码片段(参考原则04)。 |
| 文档描述的是旧行为 | 重写内容以匹配新行为,或标记出来询问用户。 |
| 文档已不再相关 | 删除或合并到其他文档中。 |EditundefinedEditundefinedundefinedundefinedundefinedundefined| File | Line | Issue | Proposed action |
|---|---|---|---|
| 42 | Describes old OAuth flow removed in this PR | Rewrite or delete |
| 18 | Mentions | Remove the paragraph |
| 55 | References behavior of | Update references |
| 文件 | 行号 | 问题 | 建议操作 |
|---|---|---|---|
| 42 | 描述了此PR中已移除的旧OAuth流程 | 重写或删除 |
| 18 | 提及了此PR已删除的 | 删除该段落 |
| 55 | 引用了已重命名为 | 更新引用内容 |
| File | Reason |
|---|---|
| The "legacy-setup" path this documents is gone |
The user picks actions; apply them next pass.| 文件 | 原因 |
|---|---|
| 文档描述的"legacy-setup"路径已不存在 |
用户选择操作后,在下一轮处理中应用。CLAUDE.mdCLAUDE.mdCLAUDE.mdundefinedCLAUDE.mdundefinedundefinedundefined[a-zA-Z_./-]+/[a-zA-Z_.-]+undefined[a-zA-Z_./-]+/[a-zA-Z_.-]+undefined| Mistake | Correction |
|---|---|
| Auto-updating a behavior description because the path stayed the same but the behavior changed | Behavior changes go in the "human review" bucket, not the "safe" bucket. Be conservative. |
| Embedding an updated snippet instead of referencing the file | Principle 04: replace snippets with file references. The snippet will rot again. |
| Deleting a doc because the current PR makes it look stale, when it describes behavior that's still shipping | Verify the current state of the code matches the doc's claim before declaring the doc stale. |
Skipping subdirectory | Every scope can have its own |
| 错误 | 修正方式 |
|---|---|
| 因为路径未变但行为已变更,就自动更新行为描述 | 行为变更属于“人工审核”类别,而非“安全更新”类别。请保持谨慎。 |
| 嵌入更新后的代码片段而非使用文件引用 | 参考原则04:用文件引用替换代码片段。否则代码片段会再次过时。 |
| 因为当前PR使文档看起来过时就删除文档,但该文档描述的是仍在交付的行为 | 在判定文档过时之前,先验证代码的当前状态是否与文档描述一致。 |
忽略子目录下的 | 每个范围都可以有自己的 |