omd-docs-drift

Solid

文档漂移追踪:确定性死路径/死锚闸(bun test 常驻)之外的语义半——按 docs/docs-map.md 声明表裁出「文档 ↔ 变更源」对, 经 run (旧名 dag_run) 派 Sonnet 座逐对判"文档原句是否还站得住", 出口恒为 suggested 票, 人 confirm。Trigger:/omd-docs-drift、查文档漂移、文档跟没跟上代码、docs drift。

AI & Automation 39 stars 1 forks Updated today MIT

Install

View on GitHub

Quality Score: 82/100

Stars 20%
53
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# /omd-docs-drift — 语义文档漂移审计 结晶自 `docs/plan/2026-08-11-docs-drift.md`(docs-drift SDD)。**确定性那半**(锚存在 / 死路径 / 工具面反向)已经是 `src/harness/docs/drift-gates.test.ts` 里 `bun test` 常驻的闸,本 skill 不重做那半 ——它跑不进闸的**语义半**:文档那句话此刻是不是还对。 ## 何时跑 - 收尾时人拉(当天 diff),或按 D-5 的 cron 档(未开,见 SDD 未决 O-3); - 不是每次改代码都跑——只在**改了 docs-map.md 覆盖源里的文件**之后跑才有意义(下面 plan 步会自己判空)。 ## 三步 ### 1. plan —— 裁出待审对 ``` bun run scripts/docs-drift.ts plan ``` 读 `.dev/docs-drift-stamp`(上次审计 commit,盘上记)到 `HEAD` 的 `git diff --name-only`, 乘 `docs/docs-map.md`(`parseDocsMap`)算出「文档 ↔ 命中的变更文件」对(`buildDriftAuditPlan`)。 覆盖源没变的文档不产生任务——省 Sonnet 调用,也是判据能跑得动的原因(上下文裁到 KB 级)。 首次跑没有 stamp 文件 → 先 `bun run scripts/docs-drift.ts init` 打一个基线(见下),这一轮零任务 (不是漏审,是"没有可比较的过去" —— NULL≠0)。 零任务 → 打印「无待审对」, 到此为止, 不必往下走。 ### 2. run —— 每对一个便宜叶 对 plan 打印的每一条 task(`{doc, sourceGlobs, anchors, changedFiles}`)派**一个平铺 run 节点**(`run` 工具, 旧名 `dag_run` 仍是别名) (Sonnet 座, 便宜档), task 按下面模板填: ``` 读文档 <doc> 里与以下锚点相关的段落: <anchors>。 读它声明覆盖的变更文件: <changedFiles>(diff, 不是全量——只看这次变了什么)。 判据(窄, 不许放松): - 若文档原句与代码矛盾, 必须给出: docQuote(逐字引用文档原句, 不许转述)+ file:line(矛盾代码锚)+ claim (为什么矛盾)。 - 若看不出矛盾, 明确回 driftFound=false, findings=[] —— 「未见漂移」是一个合法结论, 不许为了 有产出硬凑一条泛泛建议。 - 转述文档原句 = 凭印象, 不算数; docQuote 必须是文档里真实存在的一句。 按 DriftAuditLeafResult 形状回:{ task: <原样带回>, driftFound: boolean, findings: DriftAuditFinding[] } (结构见 `src/harness/docs/drift-audit.ts`)。 ``` `dag_status` 轮询取全部叶结果, 拼成 `DriftAuditLeafResult[]` 数组, 写一份临时 JSON(如 `/tmp/docs-drift-results.json`)。 ### 3. apply —— 过反幻觉...

Details

Author
AbyssCN
Repository
AbyssCN/oh-my-dag
Created
3 months ago
Last Updated
today
Language
TypeScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Listed

doc-drift

Use for the whole-estate doc audit, "run the doc-drift loop", "audit the docs against the code", "are the docs still true", "doc drift sweep", "check every doc claim", or a scheduled doc-audit cadence run. Enumerates every LIVING doc (README, MANUAL, AGENTS, WORKFLOW, architecture, patterns), verdicts each against the live repo with evidence, fixes drift on a branch, gates through a PR. An audit-loop instance (docs/patterns/audit-loop.md). NOT for diff-scoped doc sync inside a build cycle (that is /kit:docs), NOT for dated records like specs, research, retros (they describe their moment and never drift), NOT for one known-wrong doc (just fix it).

11 Updated today
dwarvesf
AI & Automation Listed

doc-drift-scan

Find docs that lie about live code, on three axes — DEAD (names something deleted), WRONG (describes an existing symbol, default, flag or signature incorrectly) and UNDOCUMENTED (public thing with no entry). Covers file paths, task names, env vars, schema, ADR links, CLI flags, signatures and examples. Run before merging a PR that touched documented code, after a refactor or rename, and weekly in CI. `quickstart-verify` executes the setup procedure; `diagram-sync` catches the same drift in diagrams.

1 Updated today
adnanmokhtar
AI & Automation Listed

doc-sync

代码改动后找出可能过期的文档候选清单,辅助 Claude 判断是否需要同步更新。当用户说"检查文档同步 / 代码改了文档要更新吗 / 找过期文档 / doc-sync"时触发。

1 Updated 3 weeks ago
YuAICode