wiki-update

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Wiki Update

Wiki页面更新

Revise existing wiki pages. Always show diffs before writing. Always log. Always cite the source of new information.
修订现有wiki页面。写入前务必展示差异内容。务必记录日志。务必标注新信息的来源。

Pre-condition

前置条件

Find
SCHEMA.md
(search from cwd upward, or
~/wikis/
). If not found, tell the user to run
wiki-init
first. Read it to get wiki root path and conventions.
找到
SCHEMA.md
(从当前工作目录向上搜索,或在
~/wikis/
中查找)。如果未找到,请告知用户先运行
wiki-init
命令。读取该文件以获取wiki根目录路径及约定规范。

Process

操作流程

1. Identify what to update

1. 确定更新内容

The user may provide:
  • Specific page names — update those pages
  • New information — read
    wiki/index.md
    to find affected pages, then read those pages
  • 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:
<quote the existing text>
Proposed:
<replacement text>
Reason:
<why this change is warranted>
Source:
<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
[[slug]]
references to those pages across all of
wiki/pages/
. For each page that links to an updated page:
  • 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

5. 更新
wiki/index.md

If the one-line summary for any updated page has changed, update it in
index.md
. Update the
updated
date in the page's frontmatter.
如果任何已更新页面的单行摘要发生变化,需在
index.md
中更新该摘要。同时更新页面前置元数据中的
updated
日期。

6. Update
wiki/overview.md

6. 更新
wiki/overview.md

Re-read
overview.md
. 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的修改建议。

7. Append to
wiki/log.md

7. 追加至
wiki/log.md

Always append — do not ask permission, do not skip if
log.md
exists:
undefined
务必追加内容——无需请求许可,即使
log.md
已存在也不可跳过:
undefined

[<today>] update | <list of updated page slugs>

[<today>] update | <已更新页面的slug列表>

Reason: <brief description of what changed and why> Source: <URL or description>
undefined
Reason: <简要描述修改内容及原因> Source: <URL或来源描述>
undefined

Common 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
    log.md
    doesn't exist, create it.
  • Batch-writing without confirmation — Show each diff individually. The user may accept some changes and reject others.
  • Appending instead of updating — Do not add
    ## [date] update
    sections to page bodies. Edit the relevant section in-place, bump the
    updated
    frontmatter date, and log the change in
    log.md
    . If you find existing date-stamped sections, offer to integrate them in-place as part of the update.
  • 未标注来源就进行更新 —— 务必注明新信息的来源。这能让wiki具备可审计性。
  • 跳过下游检查 —— 若更新内容与某页面内容冲突,但未修改链接到该页面的其他页面,会导致隐性不一致。
  • 跳过日志记录 —— 每一项修改都必须记录到日志中。日志为追加写入模式;若
    log.md
    不存在,则创建该文件。
  • 未经确认就批量写入 —— 需逐个展示差异内容。用户可能接受部分修改而拒绝其他修改。
  • 追加内容而非直接更新 —— 不要在页面主体中添加
    ## [date] update
    章节。直接编辑相关章节内容,更新前置元数据中的
    updated
    日期,并在
    log.md
    中记录修改。如果发现已存在带日期戳的章节,可提议将其整合到页面的对应位置作为更新的一部分。