Skip to content

xinetzone/SpecWeave / .trae/skills/private-wiki-increment

private-wiki-increment

Verified

把新增的私域课程/会议纪要增量并入已建好的 OKF 风格 Wiki 知识包(编号台账+教程页+REVIEW+PDF 快照)。用于"新增 DayN 纪要""纪要并入 wiki""知识包增量更新""重新出片"。不用于从零建知识包(用 knowledge-pack-builder)或纯复盘(用 seven-concepts-cmd)。

私域 Wiki 增量并入

对一个已存在的 OKF 风格知识包做单次纪要增量:新事实续号登记 → 教程页并入 → 全库口径清扫 → 机械验证 → PDF 三段链重导出。方法论仍走七概念 R→I→E→V→C,本技能只固化增量场景的最短闭环与本仓踩坑。

0. 适用与边界

  • 私域内容(课程纪要、带 token 链接、内部会议):产物只落 playground/ 对应用户目录,禁止入公共 docs/ 或 .trae/specs/。
  • 知识包约定结构(V2.3 起主题模块化、V2.21 起核心层 bundle 化):wiki/ 为 group(index.md),核心层 bundle 在 wiki/core/(index.md + log.md + concepts/fact-ledger.md 全局台账 F 编号跨主题唯一连续 + concepts/insights-patterns.md + concepts/antipatterns-boundaries.md),根级治理文件 README.md / CHANGELOG.md / REVIEW.md;教程页在 themes/<slug>/(先例 themes/zhenxuqiu-410/),新主题接入 SOP 见 wiki/themes/README.md;logs/<slug>/ 放对应主题的源纪要(子目录名 = 主题 slug);导出 PDF 统一放包根 export/(V2.4 起,不放包根散文件)。增量教程页写入所属主题目录,事实进核心层台账。
  • 新主题首建骨架用脚手架脚本:python .trae/skills/private-wiki-increment/scripts/new_theme.py --slug <slug> --title <主题名> [--tag <标签>]——自动计算全局续号(F起/I/AP/P)、从 themes/_template/ 复制骨架并替换元数据占位符、创建 logs/<slug>/;之后的事实登记与增量仍走本技能流程。
  • 不做 git commit:playground/ 与 .temp/ 在本仓 .gitignore 内,且用户约定明确说「原子提交」才提交。
  • 若发现源纪要本身需要先复盘,先走 seven-concepts-cmd,不要把复盘和增量混在一轮。

1. R:增量事实登记(先读台账再动笔)

  1. 通读新纪要,按时间戳/段落登记事实,编号续接台账当前最大编号 +1。先 Grep 台账确认最大编号——注意可能有同学卡片等插队增量(如 F-118~F-121 被卡片占用),禁止凭上一版记忆起号。
  2. frontmatter 的 source 列表、信源表、标题计数(「N 份纪要」)三处同步加新源。
  3. 证据层照台账约定标注(原话转述/归纳/主张/数字/待核),数字必须带【数字】,信念框架不得写成已验证结论。
  4. 转写稿三层可信度(元宝「学霸同学」类 AI 转写):口语原话层 > 转写归纳层 > 模型点评层。归纳与原话方向冲突时,原话优先,冲突归纳句登记为【待核】(先例 F-103、F-138),教程结论不随之改动;未定义角色/术语保持未定义,禁止补全。
  5. 更新台账 G1 自检表的总数算式(初版 + 各次增量)。

2. I/E:并入教程页(不是另起一篇)

  1. 每条新事实至少被一个教程页引用一次——在台账登记但教程零引用的事实会被验证脚本判为不合格;纯佐证类放进既有页的「侧证/增量」小节。
  2. 新洞察追加到 09 页,保持四元组(陈述/证据/反常识/行动);反模式追加到 10 页表格(编号续接),并在 09 页对应模式的步骤/反模式清单里同步。
  3. 若新内容收窄或改变了旧结论(如「零期待」从全表通用变成只适用前两格),必须在正文显式写「边界澄清而非翻案」,并在 10 页「内在张力/证据边界」处同步,不得让新旧两版口径并存。
  4. 若精简练习材料(如 practice 一页纸)此前跟随过增量,本次同步其操作卡与版本标注。
  5. REVIEW.md 追加一节「本次增量更新记录」:增量来源、条数、新增洞察/反模式、4 视角对抗意见表(编号续接),P1 必修并回归;伦理风险词(跪求/不要脸类)与可识别个人案例必须过一轮。

3. A:全库计数与口径清扫(机械执行)

一次 Grep 清扫所有会过期的数字与措辞,至少包括:事实总数、反模式条数、洞察条数、源材料份数、Day 范围、版本号、PDF 页数/MD5、「当前版本」字样。版本按 CHANGELOG 既有序列递增(注意卡片等小版本可能已占号),CHANGELOG 写清新版差异。

4. V:机械验证(非沙箱执行)

所有对 playground 的脚本执行必须 dangerouslyDisableSandbox: true(沙箱覆盖层写不穿真实磁盘)。

# 链接门禁(仓库既有)
python .agents/scripts/check-links.py --path <wiki目录>
# 增量专用验证(编号连续性/悬空引用/新事实零引用/PDF QA)
python .trae/skills/private-wiki-increment/scripts/verify_increment.py --wiki <wiki目录> --from <新事实首号> --to <新事实末号> --pdf <导出pdf路径> --keywords 关键词1 关键词2

验证项:F 编号在台账内无断号;其它页引用无悬空编号;新区间每条事实在台账外至少出现一次;PDF(可选)输出页数、书签清单与目的页、关键词归一化命中、MD5/字节数。

5. C:PDF 三段链重导出

源脚本通常在仓库 .temp/(每个知识包自带构建链)。顺序不可变:

  1. 改源再出片:先更新构建脚本里的封面(Day 范围、日期、版本、源材料份数)与手绘图节点,再生成单一打印 HTML。
  2. 打印干净件到临时路径(不直接覆盖成品):用本技能的 Playwright 脚本,不要用 Edge——本机安全层拦截 Edge 启动时写系统账户缓存:
    python .trae/skills/private-wiki-increment/scripts/print_html_pdf.py <input.html> .temp\<pkg>-fresh.pdf
    
    打印后立即验证干净件 outline=0(在已注入书签的成品上重跑注入会翻倍,这是历史事故)。
  3. 替换 + 注入:干净件 Move-Item 覆盖成品 PDF,再跑该包的书签注入脚本(必须含幂等预检:源已有书签则拒绝退出);注入脚本通过眉题文本定位章节页,页码随内容漂移也不错位。
  4. QA:书签 14 条(封面+目录+章节数)逐条目的页正确、PageMode=/UseOutlines、目录页内部 /Link 数(/A 与 /Dest 两种结构都要数)、新内容关键词命中、注入脚本在成品上重跑被拦截(exit 1 为预期)。
  5. 把页数/字节/MD5/Producer/校验结论写回 CHANGELOG 导出表;渲染引擎更换导致的页数差异必须注明「分页差异非内容缺失」。

6. 双通道终验与交付

  • 用非沙箱 Get-ChildItem/Get-Item 确认真实磁盘上的 PDF 与改动文件(写通道回显不算数,本仓已有三次通道不一致事故)。
  • 交付用 computer:// 链接给 PDF 与报告;汇报增量条数、待核项、质量门结果、未提交 git 的事实。
canvas-designanthropics/skillsCreate beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.Stars: 196kUpdated Claude CodeCodexVerifiedInstall
docxanthropics/skillsUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.Stars: 196kUpdated Claude CodeCodexVerifiedInstall
pdfanthropics/skillsUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.Stars: 196kUpdated Claude CodeCodexVerifiedInstall
pptxanthropics/skillsUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions "deck," "slides," "presentation," or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill.Stars: 196kUpdated Claude CodeCodexVerifiedInstall