快速判断代码变更对文档的影响级别,决定是否需要同步更新文档
复制安装指令,让 AI 自动完成配置 · 推荐新手
请帮我安装 askskill 上的 "docs-impact-classifier" 技能: 1. 下载 https://raw.githubusercontent.com/microsoft/apm/main/.apm/skills/docs-impact-classifier/SKILL.md 2. 保存为 ~/.claude/skills/docs-impact-classifier/SKILL.md 3. 装好后重载技能,告诉我可以用了
请根据这个 pull request diff 判断文档影响级别,只返回 no-change、in-place edit 或 structural change,并简要说明原因。不要读取完整文档语料,只参考 .apm/docs-index.yml 作为文档映射。
返回文档影响结论及简短理由,用于决定是否继续执行文档同步流程。
你是 docs-impact-classifier。先分析这份 diff 对文档的影响,再输出 verdict 和 reason。如果是 no-change,明确说明无需启动后续文档面板或同步任务。
给出可供编排器直接使用的分流结果,帮助在无需改文档时节省模型调用成本。
查看以下代码改动是否会引发结构性文档调整,例如新增模块、重命名主要接口或改变信息架构。请在 no-change、in-place edit、structural change 中选择,并说明依据。
输出是否属于结构性文档变更的判断,帮助团队安排对应范围的文档更新工作。
Single responsibility: given a PR diff and the .apm/docs-index.yml
corpus map, emit ONE classification verdict.
This skill is the cost gate for the entire docs-sync system. ~70% of
PRs should exit at verdict no_change with zero panel spawn.
This is a 3-layer funnel inside a single skill invocation:
The skill returns the verdict from the earliest layer that can decide.
Read .apm/docs-index.yml to load no_impact_paths[] and
user_surface_paths[]. Get the changed file list from the PR diff
(gh pr diff --name-only).
if every changed file matches no_impact_paths AND none match user_surface_paths:
return {verdict: "no_change", confidence: "high", source: "L0", scope_pages: []}
This handles:
tests/**).github/workflows/**)docs/**) -- out of scope, docs-sync doesn't review docs PRs.apm/**)Expected hit rate: ~70% of PRs short-circuit here.
If L0 did not exit, extract user-observable symbols from the diff:
^@click.command, ^@cli.command, or any apm <verb> mention in added/removed lines.^@click.option, --[a-z-]+ patterns.def <name> in src/apm_cli/__init__.py or src/apm_cli/api/**.apm.yml, apm.lock.yaml, apm-policy.yml parsers._rich_error, click.echo, raise ... Error().For each extracted symbol, consult .apm/docs-index.yml#symbol_index
to find the documented pages. Collect all hits into candidate_pages[].
Also grep -rn <symbol> docs/src/content/docs/ for symbols NOT in
the index (catches drift between index and corpus).
If L1 found zero candidate pages AND zero schema/CLI/flag changes:
return {verdict: "no_change", confidence: "medium", source: "L1", scope_pages: []}.
Otherwise, invoke the doc-analyser persona with EXACTLY this context envelope (must fit in ~8 KB tokens):
gh pr diff --stat output).apm/docs-index.yml (the whole file; it's ~8 KB seeded, may grow)pr_doc_diff_paths[]: the list of paths under docs/src/content/docs/**
that the PR itself already modifies (drives the in_place_resolved
downgrade rule in "In-place-resolved detection" below).Ask doc-analyser to return JSON matching this schema:
{
"verdict": "no_change" | "in_place_resolved" | "in_place" | "structural",
"confidence": "low" | "medium" | "high",
"scope_pages": ["docs/src/content/docs/..."],
"structural_proposal": {
"new_pages": [{"slug": "...", "rationale": "..."}],
"moved_pages": [{"from": "...", "to": "..."}],
"toc_changes": "<one-paragraph>"
},
"reasoning": "<one-paragraph: what surface changed, what docs are affected, why this verdict>"
}
structural_proposal is populated only when verdict is structural.
scope_pages is populated for in_place and structural verdicts.
| Verdict | Meaning | Panel size | Cost |
|---|---|---|---|
no_change | No user-observable surface changed | 0 panel spawns | ~0-1 LLM call |
…
批量梳理并分诊 APM 仓库问题,将明确事项推进到可合并 PR。
对涉及 OpenAPM 规范的 PR 进行多专家对抗式审查并给出发布建议。
优化 APM 代码库中的 CLI 输出、日志提示与诊断信息体验
对整个文档语料逐页对照源码审计,定位过时表述并给出精确修复建议。
在每次 PR 变更时评估文档影响并生成可执行的更新建议
为复杂拉取请求发起多专家并行评审,汇总架构、测试、安全与文档建议。
快速判断 PR 变更对文档的影响级别,决定是否需要更新或重构文档。
在每次 PR 变更时评估文档影响,并给出可落地的更新建议。
在文档结构需随 PR 调整时,规划目录变更并生成新页面大纲草案。
在文档结构需随 PR 调整时,规划目录变更并生成新页面大纲草案。
将文档影响判定结果细化为逐页逐段的同步执行任务简报。
将文档影响判定细化为逐页逐段的同步执行任务清单