update-doc

Shared product/research entry for 'formal notification after document revision': when an owner edits the document in the DingTalk editor, this skill increments chg-XXX and appends a YAML change record (rev/summary/actor/ts) at the end as the formal notice; access control recognizes only the ending rev. Used with dws (lib/dingtalk_doc.py). Does not change accepted items or maintain the task document list (handled by doc-context).

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "update-doc" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-26499bf5e8f934c76e7332e48606c55543e1ec93b3fc0043ece494cb86fb15bb. Verify the upstream source and version against https://skillhub.cn/skills/user_dca89e71/update-doc before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Shared product/research entry for 'formal notification after document revision': when an owner edits the document in the DingTalk editor, this skill increments chg-XXX and appends a YAML change record (rev/summary/actor/ts) at the end as the formal notice; access control recognizes only the ending rev. Used with dws (lib/dingtalk_doc.py). Does not change accepted items or maintain the task document list (handled by doc-context).

0 Downloads

Introduction source: third_party · user_dca89e71 · 1.0.5 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Audience
Translation pending; see source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: update-doc
description: 产品/研发共用的「改正文后正式通知」唯一入口。owner 在钉钉编辑器改正文后,调本 skill 自增 chg-XXX 并在文末追加一条 ```yaml 变更记录(rev/summary/actor/ts)作为正式通知,门禁只认文末 rev。走 dws(lib/dingtalk_doc.py)。不碰任何人的 accepted、不维护任务文档清单(归 doc-context)。

update-doc(钉钉文档 · 改完正文后的留痕入口)

远端 gated 正文是唯一权威;本地仅保存过程证据。owner 是责任追踪元数据,不是本地 ACL。当前运行只接受用户明确的人工授权;未来机器授权只有在外部权威 provider、GateEnvelope、原子消费与结果事件真实建立后生效。

产品写 PRD、各 owner 写各级设计/契约/用例,正文在钉钉编辑器改(谁都能改,version 会随之涨)。改正文本身不触发门禁;改完后 owner 调本 skill 在文末追加一条文末变更记录(rev: chg-XXX)作为「正式通知」,门禁据此拦截、让下游接受。变更内容由 doc-context 在接受时对「上次快照 vs 当前正文」做 diff 呈现,不在本 skill 里写。

本 skill 不改目标规格文档正文(正文已在钉钉改好),不碰任何人的 accepted(那是各人用 doc-context 自己维护的 doc-context.yaml 做的事),不维护任务文档清单(清单建/补归 doc-context)。它只生产变更说明。

权威契约见 templates/spec/doc-sync-protocol.md;钉钉访问走 dws(封装 lib/dingtalk_doc.py);落文末变更记录的机械动作走 scripts/doc_change.py。

适用文档

钉钉 gated 文档:PRD、前端/后端项目级设计、模块级设计、契约、测试用例。它们的 nodeId 记在任务文档清单(一篇钉钉索引,由 doc-context 建/维护)里,每篇带 owner/maintainer。任务文档清单本身不 gated、不在本 skill 适用范围。

ac-checks、对齐报告、context.jsonl 是本地文档,直接 Write/Edit,不经本入口、不 gated。

入参

  • 文档 nodeId(或钉钉 URL)—— 从任务文档清单抄,或用户直接给。
  • 本次变更 summary:一句话说明改了什么 —— 由作者提供(本 skill 不自动 diff,变更细节由 doc-context 接受时 diff 呈现)。
  • 作者身份:dws contact user get-self。

核心:owner / maintainer 责任确认(谁负责落变更说明)

钉钉正文由远端系统权限控制;本地 owner/maintainer 只用于责任追踪,不宣称本地 ACL。owner 与 maintainer 均可独立调本 skill 发正式变更(提升效率,不必每次 owner 确认);actor 字段记实际操作者,owner 通过文末变更记录的 actor 事后知晓、仍负最终责任。未来机器授权不得由本 skill 文本或本地 schema 推断,必须由外部权威 provider 出具授权合同。

本 skill 落日志前记录责任追踪信息:

  1. dws contact user get-self → 当前 userId,作为 actor 写入文末变更记录。
  2. 读任务文档清单,记录该文档的 owner / maintainer;当前操作者须是 owner 或 maintainer 之一。
  3. 当前操作者既非 owner 也非 maintainer → 暂停外部写入,提示「请由 owner 或 maintainer 执行」。

这是远端变更留痕的责任边界:owner/maintainer 负责确认 summary;本地字段不改变钉钉权限,也不等同于本地 ACL。owner 改正文不触发门禁,只有追加文末变更记录(新 rev)才算正式通知,门禁据此拦下游接受。

正文可自由改,但只有「文末变更记录」算正式通知

  • owner 在钉钉编辑器改正文(谁都能改),version 会随之涨,但改正文不触发门禁——研发不会被每次小修卡住。
  • owner 改完一版要让研发跟进时,调本 skill 在文末追加一条 rev: chg-XXX 变更记录(summary + actor + ts)——这就是正式通知,门禁据此拦下游接受。
  • 变更内容(具体改了哪些段落)不在本 skill 写:下游在 doc-context 接受时,对「上次接受的快照 vs 当前正文」做 diff 自动呈现,AI 据此判相关性。本 skill 只需 owner 给一句话 summary。

钉钉没有 version diff API;本 skill 不自动生成 diff,变更细节由 doc-context 在接受侧用本地快照 diff 呈现。机制保证「有文末变更记录就必被发现」,summary 质量靠 owner 责任。

落变更说明(用 scripts/doc_change.py)

设 DOC="${CLAUDE_PLUGIN_ROOT}/skills/update-doc/scripts/doc_change.py"。

1. 自增 chg-XXX

python "$DOC" next-chg --node "<nodeId>"     # → chg-006

chg-XXX 文档内自增:扫文末变更记录现有 rev: chg-XXX 取 max+1。append-log 不传 --chg 时自动自增。

2. 落文末变更记录块

python "$DOC" append-log --node "<nodeId>" \
  --summary "订单列表加券状态筛选" \
  --actor xiaguorong
# → 走 dws doc update --mode append,文末追加一个 ```yaml 代码块,并打印本次 chg

追加的块(## 变更记录 下):

rev: chg-006
summary: 订单列表加券状态筛选
actor: xiaguorong
ts: 2026-07-22T10:00:00+08:00

3. 不维护任务文档清单(归 doc-context)

本 skill 不维护任务文档清单。owner 写完新文档(清单里还没这条)后,转 doc-context 由 owner 跑 team_list.py add-entry 补行(read 清单 → 表格内插行 → overwrite,带事后版本核对 + 冲突重试,并发安全;见 doc-context/SKILL.md「各 owner:建设计文档 + 补清单条目」)。

写操作确认纪律

每次对外钉钉写入(append-log)前,向用户说明:写哪个 nodeId、summary、影响与回滚,等用户确认。dws 不可用(DingtalkUnavailable)→ 报错给用户,不静默写半截。

边界

  • 只追加文末变更记录,不改目标规格正文(正文由 owner 在钉钉编辑器改)、不碰 accepted、不替别人维护台账、不维护任务文档清单(归 doc-context)。
  • summary 由 owner 给一句话;本 skill 不自动 diff,变更细节由 doc-context 接受时用本地快照 diff 呈现。
  • chg-XXX 文档内自增;并发两人同时 update-doc 可能撞号——append 前重扫 max(rev),撞号时重读重生成。

Current listing version

1.0.5

Verify the source revision ↗

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value92/100

Highlights

  • 解决钉钉 gated 文档变更留痕与门禁触发的实际协作痛点
  • 具有明确的高频刚需价值,直接提升产品/研发协作效率
Trigger Precision95/100

Highlights

  • 触发场景描述清晰:钉钉编辑器改正文后调用
  • 核心功能与边界定义明确,不易误触或漏触
Structure and Standards93/100

Highlights

  • 文档结构完整,涵盖适用文档、入参、核心逻辑、操作步骤、边界说明
  • frontmatter 完整,章节划分清晰,易于理解执行
Execution Reliability91/100

Highlights

  • 工具来源明确,参数正确,覆盖主要异常场景
  • 不可逆操作有用户确认机制,dws 异常时主动报错不静默失败
Evidence Verifiability (mean of the first four)93/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.