wiki-update
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseWiki Update
Wiki页面更新
Revise existing wiki pages. Always show diffs before writing. Always log. Always cite the source of new information.
修订现有wiki页面。写入前务必展示差异内容。务必记录日志。务必标注新信息的来源。
Pre-condition
前置条件
Find (search from cwd upward, or ). If not found, tell the user to run first. Read it to get wiki root path and conventions.
SCHEMA.md~/wikis/wiki-init找到(从当前工作目录向上搜索,或在中查找)。如果未找到,请告知用户先运行命令。读取该文件以获取wiki根目录路径及约定规范。
SCHEMA.md~/wikis/wiki-initProcess
操作流程
1. Identify what to update
1. 确定更新内容
The user may provide:
- Specific page names — update those pages
- New information — read to find affected pages, then read those pages
wiki/index.md - A lint report — work through its recommendations item by item
用户可能提供:
- 具体页面名称 —— 更新指定页面
- 新信息 —— 读取以找出受影响的页面,然后查看这些页面
wiki/index.md - 代码检查报告(lint report) —— 逐条按照报告建议进行处理
2. For each page to update
2. 针对每个待更新页面
Read the current content in full. Propose the change:
Current:Proposed:<quote the existing text>Reason:<replacement text>Source:<why this change is warranted><URL, file path, or description of where this information comes from>
Always include Source. An edit without a source citation creates untraceability — future you won't know why the change was made.
Ask for confirmation before writing each page. Do not batch-apply changes without per-page confirmation.
完整读取当前内容,提出修改方案:
当前内容:建议修改:<引用现有文本>修改原因:<替换文本>信息来源:<说明修改的必要性><URL、文件路径,或新信息来源的描述>
务必包含信息来源。未标注来源的编辑会导致溯源困难——未来你将无法知晓修改的原因。
在写入每个页面之前需请求确认。未经逐页确认,不得批量应用修改。
3. Check for downstream effects
3. 检查下游影响
After identifying the primary pages to update, grep for references to those pages across all of . For each page that links to an updated page:
[[slug]]wiki/pages/- Does the update change anything that page asserts?
- If yes: flag it explicitly — "[[other-page]] may also need updating based on this change"
- Offer to update it with the same confirm-before-write flow
确定主要待更新页面后,在目录下所有文件中搜索指向这些页面的引用。对于每个链接到已更新页面的页面:
wiki/pages/[[slug]]- 此次更新是否会改变该页面的表述内容?
- 如果是:明确标记——"[[other-page]]可能也需要根据此次修改进行更新"
- 提供相同的“先确认再写入”流程来更新该页面
4. Contradiction sweep
4. 冲突排查
If the new information contradicts something in the wiki: search all pages for the contradicted claim before updating. It may appear in more than one place. Update all occurrences, not just the most obvious one.
如果新信息与wiki中的内容存在冲突:在更新前搜索所有页面中存在冲突的表述。该表述可能出现在多个位置。需更新所有出现的位置,而非仅最明显的一处。
5. Update wiki/index.md
wiki/index.md5. 更新wiki/index.md
wiki/index.mdIf the one-line summary for any updated page has changed, update it in . Update the date in the page's frontmatter.
index.mdupdated如果任何已更新页面的单行摘要发生变化,需在中更新该摘要。同时更新页面前置元数据中的日期。
index.mdupdated6. Update wiki/overview.md
wiki/overview.md6. 更新wiki/overview.md
wiki/overview.mdRe-read . If the updates shift the overall synthesis (new understanding, resolved open question, changed key claim), propose edits to overview.md using the same confirm-before-write flow.
overview.md重新阅读。如果此次更新改变了整体内容的综合表述(如新认知、已解决的开放问题、关键主张变更),请使用相同的“先确认再写入”流程提出对overview.md的修改建议。
overview.md7. Append to wiki/log.md
wiki/log.md7. 追加至wiki/log.md
wiki/log.mdAlways append — do not ask permission, do not skip if exists:
log.mdundefined务必追加内容——无需请求许可,即使已存在也不可跳过:
log.mdundefined[<today>] update | <list of updated page slugs>
[<today>] update | <已更新页面的slug列表>
Reason: <brief description of what changed and why>
Source: <URL or description>
undefinedReason: <简要描述修改内容及原因>
Source: <URL或来源描述>
undefinedCommon Mistakes
常见错误
- Updating without citing the source — Always include where the new information came from. This makes the wiki auditable.
- Skipping the downstream check — An update that contradicts a page's content while leaving pages that link to it unchanged creates silent inconsistency.
- Skipping the log — Every change must be logged. The log is append-only; if doesn't exist, create it.
log.md - Batch-writing without confirmation — Show each diff individually. The user may accept some changes and reject others.
- Appending instead of updating — Do not add sections to page bodies. Edit the relevant section in-place, bump the
## [date] updatefrontmatter date, and log the change inupdated. If you find existing date-stamped sections, offer to integrate them in-place as part of the update.log.md
- 未标注来源就进行更新 —— 务必注明新信息的来源。这能让wiki具备可审计性。
- 跳过下游检查 —— 若更新内容与某页面内容冲突,但未修改链接到该页面的其他页面,会导致隐性不一致。
- 跳过日志记录 —— 每一项修改都必须记录到日志中。日志为追加写入模式;若不存在,则创建该文件。
log.md - 未经确认就批量写入 —— 需逐个展示差异内容。用户可能接受部分修改而拒绝其他修改。
- 追加内容而非直接更新 —— 不要在页面主体中添加章节。直接编辑相关章节内容,更新前置元数据中的
## [date] update日期,并在updated中记录修改。如果发现已存在带日期戳的章节,可提议将其整合到页面的对应位置作为更新的一部分。log.md