with one click
wittsrc-maintain
维护 Brain 健康状态:检查孤儿页(无入链)、死链接(目标不存在)、 过期页(90天未更新)、引用审计和标签一致性。
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
维护 Brain 健康状态:检查孤儿页(无入链)、死链接(目标不存在)、 过期页(90天未更新)、引用审计和标签一致性。
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
对 Brain Pages 执行分级实体富化。 Tier 3(单次提及)→ Tier 2(3次提及或跨来源)→ Tier 1(8次提及或核心人物/概念)。 从 SEP/IEP 百科、Gutenberg 简介中提取补充信息。
知识图谱遍历:基于抽取的 typed links(cites/evolves_to/contradicts/influenced_by) 执行递归图查询。回答关系型问题,如"Ms-114 和 Ms-152 之间有什么关系"、 "语言游戏概念是如何演变的"。
将 Wittgenstein 语料(WittSrc/Clarino/Gutenberg)导入 Brain Pages。 识别文件类型,按规则路由到 brain/ 目录(works/concepts/people/timelines), 执行 chunking、embedding 和去重。
零 LLM 抽取 Wittgenstein 文本中的实体引用,生成 typed links 构建知识图谱。 通过正则匹配手稿编号、人名、哲学概念,生成 cites/evolves_to/contradicts/influenced_by 关系。
混合搜索:结合向量检索(pgvector)、关键词检索(tsvector)和 Reciprocal Rank Fusion(RRF), 对 Wittgenstein Brain 进行多层检索。支持意图分类、多查询扩展、编译真理提升。
Wittgenstein Brain — 给维特根斯坦 Persona 专用的记忆系统。 将 Wittgenstein 学术语料(WittSrc/Clarino/Gutenberg)转化为可查询、可链接、可追踪的 Brain Pages, 并通过混合搜索 + 知识图谱为蒸馏流水线提供知识检索能力。 使用当用户想要: - 将 Wittgenstein 手稿语料导入 Brain - 查询某个哲学概念在手稿中的演变 - 生成手稿间引用关系图 - 为 Wittgenstein Persona 提供知识检索 - 从语料中提取实体(人名/概念/手稿编号)
| name | wittsrc-maintain |
| version | 1.0.0 |
| description | 维护 Brain 健康状态:检查孤儿页(无入链)、死链接(目标不存在)、 过期页(90天未更新)、引用审计和标签一致性。 |
| triggers | ["维护","maintain","brain health","检查 brain","doctor","健康检查"] |
| tools | ["wittsrc-maintain"] |
| mutating | false |
定期检查 Brain Pages 的健康状态,修复孤儿页、死链接和过期内容。
没有入链(inbound links)的页面:
bun run scripts/wittsrc-maintain.ts check-orphans
指向不存在的目标 slug:
bun run scripts/wittsrc-maintain.ts check-links
[[slug]] 或 [[title|slug]] 格式的 wiki 链接90 天内未更新的页面:
bun run scripts/wittsrc-maintain.ts check-stale --days 90
检查 frontmatter 中的 sources 字段是否有效:
bun run scripts/wittsrc-maintain.ts check-citations
检查标签格式和重复:
bun run scripts/wittsrc-maintain.ts check-tags
period 标签(用 frontmatter period 字段代替)language-game ≈ language_game)bun run scripts/wittsrc-maintain.ts --check --json
输出:
{
"checkedAt": "2026-04-20T12:00:00Z",
"totalPages": 162,
"orphans": {
"count": 3,
"pages": ["sep-rule-following", "iep-wittgenstein", "sep-wittgenstein-main"],
"severity": "warning"
},
"deadLinks": {
"count": 0,
"severity": "ok"
},
"stalePages": {
"count": 1,
"pages": ["work-ms-162a"],
"severity": "info"
},
"brokenCitations": {
"count": 0,
"severity": "ok"
},
"tagIssues": {
"count": 2,
"pages": ["concept-family-resemblance"],
"severity": "warning"
},
"overall": "healthy"
}
# 修复死链接(将悬空引用转为外部 URL)
bun run scripts/wittsrc-maintain.ts --fix dead-links
# 修复标签格式
bun run scripts/wittsrc-maintain.ts --fix tags
# 生成维护报告
bun run scripts/wittsrc-maintain.ts --report --since 2026-04-01
# 每周一次完整检查
cron: "0 2 * * 0" # 每周日凌晨 2:00
# 每日一次死链接检查
cron: "0 3 * * *" # 每天凌晨 3:00
维护报告用于判断 Brain 状态是否适合蒸馏:
| 退出码 | 含义 |
|---|---|
| 0 | 健康,无问题 |
| 1 | 警告(可继续) |
| 2 | 错误(需要修复) |
--fix 模式下不先执行 --check