wiki-stage-commit
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseWiki Stage Commit — Staged Write Promotion
Wiki 暂存提交 — 暂存内容推广
You are reviewing LLM-written pages that are waiting in for human approval before they land in the live wiki. This skill is only useful when in the vault config.
_staging/WIKI_STAGED_WRITES=true你正在审核由LLM生成的页面,这些页面存放在目录中,需经人工批准后才能发布到正式wiki。此功能仅在vault配置中设置时生效。
_staging/WIKI_STAGED_WRITES=trueBefore You Start
开始之前
- Resolve config — follow the Config Resolution Protocol in . This gives
llm-wiki/SKILL.mdandOBSIDIAN_VAULT_PATH.WIKI_STAGED_WRITES - If is not set or is
WIKI_STAGED_WRITES, tell the user: "Staged writes mode is not enabled. Setfalsein yourWIKI_STAGED_WRITES=trueto use this feature." Then stop..env - Read the directory inventory.
_staging/
- 解析配置 — 遵循中的配置解析协议,获取
llm-wiki/SKILL.md和OBSIDIAN_VAULT_PATH参数。WIKI_STAGED_WRITES - 若未设置或为
WIKI_STAGED_WRITES,请告知用户:"暂存写入模式未启用。请在false文件中设置.env以使用此功能。" 然后终止操作。WIKI_STAGED_WRITES=true - 读取目录的文件清单。
_staging/
Invocation Forms
调用形式
/wiki-stage-commit # interactive review: show each file and ask accept/reject
/wiki-stage-commit --all # accept all staged files without per-file review
/wiki-stage-commit --reject-all # reject all staged files (move to _raw/ for manual editing)
/wiki-stage-commit --list # list staged files with summary, no changes/wiki-stage-commit # 交互式审核:逐个展示文件并询问接受/拒绝
/wiki-stage-commit --all # 无需逐个审核,直接接受所有暂存文件
/wiki-stage-commit --reject-all # 拒绝所有暂存文件(移至_raw/目录供手动编辑)
/wiki-stage-commit --list # 列出暂存文件及摘要,不执行任何变更Step 1: Inventory Staged Files
步骤1:盘点暂存文件
Glob — these are the pending pages.
$OBSIDIAN_VAULT_PATH/_staging/**/*.mdAlso glob — these are pending updates to existing pages (diff-style files showing proposed additions and deletions).
$OBSIDIAN_VAULT_PATH/_staging/**/*.patch.mdReport the inventory:
Staged files: 4 new pages, 2 updates
New pages:
_staging/concepts/attention-mechanism.md (ingested 2 days ago)
_staging/entities/andrej-karpathy.md (ingested 2 days ago)
_staging/skills/fine-tuning-llms.md (ingested yesterday)
_staging/references/attention-is-all-you-need.md (ingested 3 hours ago)
Updates (patch files):
_staging/concepts/transformer-architecture.patch.md (target: concepts/transformer-architecture.md)
_staging/skills/prompt-engineering.patch.md (target: skills/prompt-engineering.md)If is empty, report: "Nothing staged. All writes have been committed or no staged writes have been produced yet."
_staging/匹配 —— 这些是待处理的新页面。
$OBSIDIAN_VAULT_PATH/_staging/**/*.md同时匹配 —— 这些是对现有页面的待处理更新(差异格式文件,展示拟添加和删除的内容)。
$OBSIDIAN_VAULT_PATH/_staging/**/*.patch.md报告盘点结果:
暂存文件:4个新页面,2个更新
新页面:
_staging/concepts/attention-mechanism.md (2天前导入)
_staging/entities/andrej-karpathy.md (2天前导入)
_staging/skills/fine-tuning-llms.md (昨天导入)
_staging/references/attention-is-all-you-need.md(3小时前导入)
更新(补丁文件):
_staging/concepts/transformer-architecture.patch.md (目标页面:concepts/transformer-architecture.md)
_staging/skills/prompt-engineering.patch.md (目标页面:skills/prompt-engineering.md)若目录为空,报告:"暂无暂存文件。所有写入已提交,或尚未生成任何暂存内容。"
_staging/Step 2: Per-File Review (interactive mode)
步骤2:逐个文件审核(交互式模式)
For each staged file (new pages first, then updates):
针对每个暂存文件(先处理新页面,再处理更新):
For new pages:
新页面处理:
Display a summary:
--- New page: concepts/attention-mechanism.md ---
Title: Attention Mechanism
Tags: #ml #architecture
Summary: Core building block of transformers — computes weighted sum of values based on query-key similarity.
Tier: supporting
Confidence: 0.72
Sources: papers/attention.pdf
[Preview first 20 lines of body]
...
Accept [a], Reject [r], Skip [s], Preview full [p]?展示摘要信息:
--- 新页面:concepts/attention-mechanism.md ---
标题: Attention Mechanism
标签: #ml #architecture
摘要: Transformers的核心构建模块——基于查询-键相似度计算值的加权和。
层级: supporting
置信度:0.72
来源: papers/attention.pdf
[预览正文前20行]
...
接受[a],拒绝[r],跳过[s],预览全文[p]?For patch files:
补丁文件处理:
Display a structured diff:
--- Update: concepts/transformer-architecture.md ---
Source: _staging/concepts/transformer-architecture.patch.md
Proposed additions (+):
+ Transformers outperform RNNs on tasks requiring long-range dependencies. ^[inferred]
+ New source: papers/survey-2026.pdf
Proposed deletions (-):
- The attention mechanism was first described in [Bahdanau 2015]. (to be replaced by updated claim)
⚠️ Conflict check: target page was modified 3 days after staging. Review carefully.
Accept [a], Reject [r], Skip [s], Preview full diff [p]?If flag is set, skip prompting and accept every file.
If flag is set, skip prompting and reject every file.
If flag is set, stop after printing the inventory (Step 1).
--all--reject-all--list展示结构化差异:
--- 更新:concepts/transformer-architecture.md ---
来源:_staging/concepts/transformer-architecture.patch.md
拟添加内容(+):
+ Transformers在需要长距离依赖的任务上表现优于RNN。^[推断]
+ 新来源:papers/survey-2026.pdf
拟删除内容(-):
- 注意力机制最初在[Bahdanau 2015]中被描述。(将被更新后的结论替代)
⚠️ 冲突检查:目标页面在暂存后3天被修改,请仔细审核。
接受[a],拒绝[r],跳过[s],预览完整差异[p]?若设置了参数,跳过提示直接接受所有文件。
若设置了参数,跳过提示直接拒绝所有文件。
若设置了参数,完成步骤1的盘点后即终止操作。
--all--reject-all--listStep 3: Apply Decisions
步骤3:执行决策
Accepting a new page
接受新页面
- Move →
_staging/<category>/page.md(the final location)<category>/page.md - Update with the new page entry
index.md - Remove the staged file
- 将移动至
_staging/<category>/page.md(最终位置)<category>/page.md - 更新,添加新页面条目
index.md - 删除暂存文件
Accepting a patch/update
接受补丁/更新
- Read the current page at the target path
- Apply the proposed additions and deletions (merge, don't just overwrite)
- Update the frontmatter timestamp
updated - Update if the summary changed
index.md - Remove the staged patch file
- 读取目标路径下的当前页面
- 应用拟添加和删除的内容(合并而非直接覆盖)
- 更新frontmatter中的时间戳
updated - 若摘要发生变化,更新
index.md - 删除暂存补丁文件
Rejecting a file
拒绝文件
Move it to for manual editing:
$OBSIDIAN_VAULT_PATH/_raw/- →
_staging/concepts/page.md_raw/rejected-concepts-page.md - →
_staging/concepts/page.patch.md_raw/rejected-patch-concepts-page.md - Prefix with so the user can identify it
rejected-
将其移至目录供手动编辑:
$OBSIDIAN_VAULT_PATH/_raw/- →
_staging/concepts/page.md_raw/rejected-concepts-page.md - →
_staging/concepts/page.patch.md_raw/rejected-patch-concepts-page.md - 添加前缀,方便用户识别
rejected-
Conflict detection on patch accept
接受补丁时的冲突检测
Before applying a patch, check whether the target page's frontmatter is newer than the patch file's own field:
updatedupdated- If the target was modified AFTER the patch was staged, warn:
⚠️ Conflict: target was updated since this patch was staged. Applying may lose recent changes. - Give the user a chance to abort:
Apply anyway [y], Skip [s], Reject [r]?
应用补丁前,检查目标页面frontmatter中的时间是否晚于补丁文件自身的字段:
updatedupdated- 若目标页面在补丁暂存后被修改,提示:
⚠️ 冲突:目标页面在该补丁暂存后已更新。应用补丁可能会丢失近期变更。 - 给予用户中止机会:
仍要应用[y],跳过[s],拒绝[r]?
Step 4: Update Tracking Files
步骤4:更新跟踪文件
After processing all staged files:
- — update the Recent Activity section: "Committed N staged pages; rejected M."
hot.md - — append:
log.md- [TIMESTAMP] STAGE_COMMIT accepted=N rejected=M skipped=K
处理完所有暂存文件后:
- —— 更新“近期活动”部分:“已提交N个暂存页面;拒绝M个。”
hot.md - —— 添加记录:
log.md- [TIMESTAMP] STAGE_COMMIT accepted=N rejected=M skipped=K
Step 5: Report
步骤5:生成报告
Stage commit complete.
✅ Accepted (N):
concepts/attention-mechanism.md → now live
entities/andrej-karpathy.md → now live
concepts/transformer-architecture.md → updated (patch applied)
❌ Rejected (M):
skills/fine-tuning-llms.md → moved to _raw/rejected-skills-fine-tuning-llms.md
⏭️ Skipped (K):
references/attention-is-all-you-need.md → still in _staging/
Staging queue: K files remaining暂存提交完成。
✅ 已接受(N):
concepts/attention-mechanism.md → 已上线
entities/andrej-karpathy.md → 已上线
concepts/transformer-architecture.md → 已更新(补丁已应用)
❌ 已拒绝(M):
skills/fine-tuning-llms.md → 已移至_raw/rejected-skills-fine-tuning-llms.md
⏭️ 已跳过(K):
references/attention-is-all-you-need.md → 仍在_staging/目录中
暂存队列:剩余K个文件Notes
注意事项
- Staged files use the same page template as live pages — they are ready to land, just awaiting approval
- Patch files use a human-readable diff format: lines starting with are additions, lines starting with
+are deletions- - and
index.mdare always updated immediately on ingest (they are low-risk tracking files) — only category pages go through staginglog.md - The directory is not tracked by Obsidian's graph view — pages only appear in the wiki after promotion
_staging/
- 暂存文件使用与正式页面相同的模板,已准备好上线,仅待批准
- 补丁文件采用人类可读的差异格式:以开头的行是拟添加内容,以
+开头的行是拟删除内容- - 和
index.md在导入时会立即更新(它们是低风险的跟踪文件)——只有分类页面需要经过暂存流程log.md - 目录不会被Obsidian的图谱视图追踪——页面仅在推广后才会出现在wiki中
_staging/