wiki-lint

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Personal Wiki — Lint

个人维基 — Lint工具

Health-check the wiki, auto-fix safe issues, and report the rest with actionable fixes.
对维基进行健康检查,自动修复安全问题,并报告其余问题及可行的修复方案。

Audit Steps

审计步骤

Run all checks below, then present a consolidated report.
运行以下所有检查,然后呈现整合后的报告。

1. Broken wikilinks

1. 损坏的维基链接(wikilink)

Scan all wiki pages for
[[wikilink]]
references. For each link, verify the target page exists. Report any broken links.
bash
undefined
扫描所有维基页面,查找
[[wikilink]]
引用。针对每个链接,验证目标页面是否存在。报告所有损坏的链接。
bash
undefined

Find all wikilinks across wiki pages

Find all wikilinks across wiki pages

grep -roh '[[[^]]*]]' wiki/ | sort -u

Cross-reference against actual files in `wiki/`.

**Auto-fix:** If the target page exists under a slightly different name (e.g. case difference, missing hyphen), fix the link automatically.
grep -roh '[[[^]]*]]' wiki/ | sort -u

与`wiki/`目录下的实际文件进行交叉验证。

**自动修复:** 如果目标页面以略有不同的名称存在(例如大小写差异、缺少连字符),则自动修复链接。

2. Orphan pages

2. 孤立页面

Find pages with no inbound links — no other page references them via
[[wikilink]]
.
For each
.md
file in
wiki/sources/
,
wiki/entities/
,
wiki/concepts/
,
wiki/synthesis/
:
  • Extract the page name (filename without extension)
  • Search all other wiki pages for
    [[Page Name]]
  • If no other page links to it, it's an orphan
查找没有入站链接的页面——即没有其他页面通过
[[wikilink]]
引用它们。
针对
wiki/sources/
wiki/entities/
wiki/concepts/
wiki/synthesis/
中的每个
.md
文件:
  • 提取页面名称(不带扩展名的文件名)
  • 在所有其他维基页面中搜索
    [[Page Name]]
  • 如果没有其他页面链接到它,则视为孤立页面

3. Contradictions

3. 矛盾内容

Read pages that share entities or concepts and look for conflicting claims. Flag when:
  • Two source summaries make opposing claims about the same topic
  • An entity page contains information that conflicts with a source summary
  • Dates, figures, or factual claims differ between pages
阅读共享实体或概念的页面,查找相互冲突的声明。当出现以下情况时标记:
  • 两个来源摘要对同一主题提出相反主张
  • 实体页面包含的信息与来源摘要相冲突
  • 页面之间的日期、数据或事实声明存在差异

4. Stale claims

4. 过时声明

Cross-reference source dates with wiki content. Flag when:
  • A concept page cites only old sources and newer sources exist on the same topic
  • Entity information hasn't been updated despite newer sources mentioning that entity
将来源日期与维基内容进行交叉验证。当出现以下情况时标记:
  • 某个概念页面仅引用旧来源,而同一主题存在更新的来源
  • 实体信息未更新,尽管有更新的来源提及该实体

5. Missing pages

5. 缺失页面

Scan for
[[wikilinks]]
that point to pages that don't exist yet. These are topics the wiki mentions but hasn't given their own page. Assess whether they warrant a page.
扫描指向尚未创建的页面的
[[wikilinks]]
。这些是维基提及但尚未创建专属页面的主题。评估是否需要为其创建页面。

6. Missing cross-references

6. 缺失的交叉引用

Find pages that discuss the same topics but don't link to each other. Look for:
  • Entity pages that mention concepts without linking them
  • Concept pages that mention entities without linking them
  • Source summaries that cover the same topic but don't reference each other
查找讨论相同主题但未相互链接的页面。关注:
  • 实体页面提及概念但未链接
  • 概念页面提及实体但未链接
  • 来源摘要涵盖同一主题但未相互引用

7. Index consistency

7. 索引一致性

Verify
wiki/index.md
is complete and accurate:
  • Every page in
    wiki/sources/
    ,
    wiki/entities/
    ,
    wiki/concepts/
    ,
    wiki/synthesis/
    has an index entry
  • No index entries point to deleted pages
  • Entries are under the correct category header
Auto-fix: Add missing index entries. Remove entries pointing to deleted pages.
验证
wiki/index.md
是否完整准确:
  • wiki/sources/
    wiki/entities/
    wiki/concepts/
    wiki/synthesis/
    中的每个页面都有索引条目
  • 没有索引条目指向已删除的页面
  • 条目位于正确的分类标题下
自动修复: 添加缺失的索引条目。删除指向已删除页面的条目。

8. Data gaps

8. 数据缺口

Based on the wiki's current coverage, suggest:
  • Topics mentioned frequently but lacking depth
  • Questions the wiki can't answer well
  • Concepts that could be explored further with additional sources
根据维基当前的覆盖范围,建议:
  • 频繁提及但缺乏深度的主题
  • 维基无法很好回答的问题
  • 可通过补充来源进一步探索的概念

Auto-Fix Behavior

自动修复行为

Fix automatically without asking:
  • Missing index entries (add them)
  • Index entries pointing to deleted pages (remove them)
  • Broken wikilinks where the target page exists under a slightly different name (fix the link)
Ask the user before fixing:
  • Contradictions between pages
  • Orphan pages (user may want to keep or delete them)
  • Merging pages that cover overlapping topics
无需询问即可自动修复:
  • 缺失的索引条目(添加它们)
  • 指向已删除页面的索引条目(删除它们)
  • 目标页面以略有不同名称存在的损坏维基链接(修复链接)
修复前需询问用户:
  • 页面之间的矛盾内容
  • 孤立页面(用户可能希望保留或删除)
  • 合并涵盖重叠主题的页面

Report Format

报告格式

Present findings grouped by severity:
按严重程度分组呈现发现的问题:

Errors (must fix)

错误(必须修复)

  • Broken wikilinks
  • Contradictions between pages
  • Index entries pointing to missing pages
  • 损坏的维基链接
  • 页面之间的矛盾内容
  • 指向缺失页面的索引条目

Warnings (should fix)

警告(应该修复)

  • Orphan pages with no inbound links
  • Stale claims from outdated sources
  • Missing pages for frequently referenced topics
  • 没有入站链接的孤立页面
  • 来自过时来源的过时声明
  • 频繁引用主题的缺失页面

Info (nice to fix)

信息(建议修复)

  • Potential cross-references to add
  • Data gaps that could be filled
  • Index entries that could be more descriptive
For each finding, include:
  • What: description of the issue
  • Where: the specific file(s) and line(s)
  • Fix: what to do about it
  • 可添加的潜在交叉引用
  • 可填补的数据缺口
  • 可更具描述性的索引条目
针对每个发现的问题,包含:
  • 问题: 问题描述
  • 位置: 具体文件及行号
  • 修复方案: 解决方法

After the Report

报告之后

Report what was auto-fixed, then ask:
"Auto-fixed N issues (index entries, broken links). Found N warnings and N info items remaining. Want me to fix any of these?"
If the user agrees, fix the specified issues and report what changed.
报告已自动修复的内容,然后询问:
"已自动修复N个问题(索引条目、损坏链接)。发现N个警告和N个信息项待处理。需要我修复其中的部分问题吗?"
如果用户同意,修复指定问题并报告更改内容。

Log the lint pass

记录Lint检查过程

Append to
wiki/log.md
:
## [YYYY-MM-DD] lint | Health check
Found N errors, N warnings, N info items. Auto-fixed: [list]. Remaining: [list].
将内容追加到
wiki/log.md
## [YYYY-MM-DD] lint | Health check
Found N errors, N warnings, N info items. Auto-fixed: [list]. Remaining: [list].

When to Lint

何时进行Lint检查

  • After every 10 ingests — catches cross-reference gaps while they're fresh
  • Monthly at minimum — catches stale claims and orphan pages over time
  • Before major queries — ensures the wiki is healthy before you rely on it for analysis
  • 每导入10条内容后 —— 在交叉引用缺口刚出现时及时发现
  • 每月至少一次 —— 及时发现过时声明和孤立页面
  • 大型查询前 —— 在依赖维基进行分析前确保其状态良好

Related Skills

相关技能

  • /wiki-ingest
    — process new sources into wiki pages
  • /wiki-query
    — ask questions against the wiki
  • /wiki-explore
    — discover cross-domain connections
  • /wiki-spark
    — generate creative prompts from wiki content
  • /wiki-ingest
    —— 将新来源处理为维基页面
  • /wiki-query
    —— 针对维基提出问题
  • /wiki-explore
    —— 发现跨领域关联
  • /wiki-spark
    —— 从维基内容生成创意提示