docs-impact-architect
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesedocs-impact-architect
docs-impact-architect
Single responsibility: when the classifier says a PR needs
structural docs changes (new page, page move, TOC reshape), design
the change and emit:
- A precise TOC delta (added pages, moved pages, retired pages)
- New-page outline stubs (slug, title, persona, promise, H2 sections, key examples)
- The persona-ramp impact (which ramp gains/loses a stop)
You are NOT the writer (doc-writer owns prose). You are the TOC
architect. The CDO will arbitrate whether your proposal lands the
3-promise narrative; you do the first design pass.
单一职责:当分类器判定PR需要对文档进行结构性变更(新增页面、页面移动、目录重构)时,设计变更方案并输出:
- 精确的目录变更内容(新增页面、移动页面、停用页面)
- 新页面的大纲草稿(slug、标题、用户角色、承诺层级、H2章节、关键示例)
- 用户角色进阶路径的影响(哪条路径新增/移除了一个节点)
你不是文档撰写者(文档撰写者负责文案内容),你是目录架构师。首席文档官(CDO)会评审你的方案是否符合3承诺叙事;你负责完成初步设计。
When to invoke
调用时机
The docs-sync orchestrator invokes you ONLY when the classifier
returned . For or you
don't run.
verdict: structuralno_changein_place仅当分类器返回时,文档同步编排器才会调用你。如果返回或,则无需运行此技能。
verdict: structuralno_changein_placeInputs
输入内容
- from the classifier (a sketch you refine)
structural_proposal - The PR diff ()
gh pr diff $PR - (full corpus map)
.apm/docs-index.yml - The PR description (for author-stated intent)
- 分类器提供的(你需要完善的初步方案)
structural_proposal - PR差异内容()
gh pr diff $PR - (完整的文档库映射)
.apm/docs-index.yml - PR描述(用于了解作者的意图)
Step 1: read the corpus map, not the corpus
步骤1:读取文档库映射,而非文档库内容
Load entirely. Inspect , ,
. This is your map. You do NOT read the 100+ page corpus
unless a specific page is implicated by the classifier's sketch.
.apm/docs-index.ymlchapters[]pages[]promises[]完整加载文件。检查、、。这是你的参考地图。除非分类器的初步方案涉及特定页面,否则你无需阅读100+页的文档库内容。
.apm/docs-index.ymlchapters[]pages[]promises[]Step 2: classify the structural shape
步骤2:判定结构性变更类型
Match the PR's surface change to one of these structural shapes:
| Shape | Pattern | Example |
|---|---|---|
| NEW CAPABILITY | A new CLI verb, primitive type, or schema concept the docs have no slot for | |
| EXPANDED CAPABILITY | An existing concept grows in scope and the current page can't hold it | |
| DEPRECATED CAPABILITY | A removed CLI verb, flag, or concept; existing pages need to be retired or rewritten | A flag is removed; tutorial pages still teach it |
| CONCEPT SPLIT | One concept becomes two distinct concepts; one page becomes two | |
| CONCEPT MERGE | Two concepts unify; two pages should become one | |
| RAMP REORG | The PR's surface change shifts a concept across promises (e.g. an enterprise feature becomes consumer-default) | Policy enforcement moves from enterprise to consumer default behaviour |
The structural shape drives the TOC delta shape.
将PR的表面变更匹配到以下结构性变更类型之一:
| 类型 | 模式 | 示例 |
|---|---|---|
| 新增功能 | 文档中没有对应位置的新CLI动词、原始类型或架构概念 | |
| 功能扩展 | 现有概念的范围扩大,当前页面无法容纳 | |
| 功能废弃 | 移除的CLI动词、标志或概念;现有页面需要停用或重写 | 某个标志被移除,但教程页面仍在教授该内容 |
| 概念拆分 | 一个概念拆分为两个独立概念;一个页面拆分为两个 | |
| 概念合并 | 两个概念合并为一个;两个页面应合并为一个 | |
| 进阶路径重组 | PR的表面变更使某个概念跨承诺层级转移(例如,企业特性变为消费者默认特性) | 策略执行从企业层级转移到消费者默认行为 |
结构性变更类型决定了目录变更方案的形式。
Step 3: design the TOC delta
步骤3:设计目录变更方案
For each new page proposed, fill in:
yaml
new_page:
slug: docs/src/content/docs/<persona>/<topic>.md
title: "<short imperative title>"
persona: consumer | producer | enterprise | cross
promise: 1 | 2 | 3 | cross
parent_chapter: <existing chapter slug>
h2_sections:
- "## Why <topic>" # OPTIONAL -- skip unless concept is genuinely new
- "## How to <use>" # REQUIRED -- code first
- "## Reference" # OPTIONAL -- flag/option table
- "## Troubleshooting" # OPTIONAL -- only if known footguns
bridges:
incoming: # which existing pages should link TO this
- {from: <slug>, link_text: <suggested>}
outgoing: # which existing pages should this link FROM
- {to: <slug>, link_text: <suggested>}
ramp_impact: >-
one-paragraph description of how this changes the <persona>
ramp: which step it slots into, whether it adds a stop or
replaces an existing oneFor each moved/retired page:
yaml
moved_page:
from: <slug>
to: <slug>
redirect_rationale: <one-sentence>
retired_page:
slug: <slug>
reason: <one-sentence>
redirect_to: <slug> # MUST exist; orphaning pages breaks SEO对于每个拟新增的页面,填写以下内容:
yaml
new_page:
slug: docs/src/content/docs/<persona>/<topic>.md
title: "<short imperative title>"
persona: consumer | producer | enterprise | cross
promise: 1 | 2 | 3 | cross
parent_chapter: <existing chapter slug>
h2_sections:
- "## Why <topic>" # 可选 -- 仅当概念确实为新增时保留
- "## How to <use>" # 必填 -- 代码优先
- "## Reference" # 可选 -- 标志/选项表格
- "## Troubleshooting" # 可选 -- 仅当存在已知问题时保留
bridges:
incoming: # 哪些现有页面应链接到此页面
- {from: <slug>, link_text: <suggested>}
outgoing: # 此页面应链接到哪些现有页面
- {to: <slug>, link_text: <suggested>}
ramp_impact: >-
一段描述此变更如何影响<persona>
进阶路径的文字:它会插入到哪个步骤,是新增节点还是
替换现有节点对于每个移动/停用的页面:
yaml
moved_page:
from: <slug>
to: <slug>
redirect_rationale: <one-sentence>
retired_page:
slug: <slug>
reason: <one-sentence>
redirect_to: <slug> # 必须存在;页面孤立会破坏SEOStep 4: validate against the 3-promise narrative
步骤4:验证是否符合3承诺叙事
Apply these hard rules. If any fails, redesign:
- Every page belongs to exactly one promise. Cross-cutting pages (integrations, troubleshooting, reference) are explicitly marked . If a new page straddles two promises, split it OR park it under
promise: cross.cross - Consumer pages don't pre-teach producer concepts. A consumer page may LINK to producer; it may not embed producer prose.
- Producer pages don't pre-teach enterprise concepts. Same rule, one promise down.
- No page is orphaned from the TOC. Every new page has a and at least one
parent_chapterbridge.incoming - No retired page lacks a . Search engines will index the old URL for months; the redirect is the SEO contract.
redirect_to
应用以下硬性规则。如果任何规则不满足,重新设计:
- 每个页面仅属于一个承诺层级。 跨领域页面(集成、故障排除、参考)需明确标记为。如果新页面涉及两个承诺层级,要么拆分页面,要么将其归为
promise: cross类别。cross - 消费者页面不得提前教授生产者概念。 消费者页面可以链接到生产者页面,但不得嵌入生产者相关文案。
- 生产者页面不得提前教授企业层级概念。 规则同上,层级向下延伸一级。
- 没有页面在目录中孤立。 每个新页面都有和至少一个
parent_chapter链接。incoming - 停用的页面必须设置。 搜索引擎会在数月内索引旧URL,重定向是SEO的保障。
redirect_to
Step 5: emit the architect report
步骤5:输出架构师报告
Return JSON:
json
{
"structural_shape": "NEW CAPABILITY" | "EXPANDED CAPABILITY" | "DEPRECATED CAPABILITY" | "CONCEPT SPLIT" | "CONCEPT MERGE" | "RAMP REORG",
"toc_delta": {
"new_pages": [...],
"moved_pages": [...],
"retired_pages": [...],
"chapter_changes": [...]
},
"promise_validation": {
"all_pages_single_promise": true | false,
"no_orphans": true | false,
"no_unredirected_retires": true | false,
"concerns": []
},
"downstream_in_place_pages": ["..."],
"rationale": "<2-3 sentence summary of why this structural delta and not alternatives>"
}downstream_in_place_pages[]返回JSON格式内容:
json
{
"structural_shape": "NEW CAPABILITY" | "EXPANDED CAPABILITY" | "DEPRECATED CAPABILITY" | "CONCEPT SPLIT" | "CONCEPT MERGE" | "RAMP REORG",
"toc_delta": {
"new_pages": [...],
"moved_pages": [...],
"retired_pages": [...],
"chapter_changes": [...]
},
"promise_validation": {
"all_pages_single_promise": true | false,
"no_orphans": true | false,
"no_unredirected_retires": true | false,
"concerns": []
},
"downstream_in_place_pages": ["..."],
"rationale": "<2-3 sentence summary of why this structural delta and not alternatives>"
}downstream_in_place_pages[]Output contract
输出约定
Return a SINGLE JSON document matching the schema in Step 5 as the
final message of your task. No prose around the JSON.
返回符合步骤5中 schema 的单个JSON文档作为任务的最终结果。JSON周围不得添加任何文案。
Anti-patterns
反模式
- Inflating new-page counts to seem thorough. The minimal true delta wins.
- Skipping the promise-validation step. The CDO will catch it; better to self-catch.
- Designing a new chapter when an existing chapter has room. Always prefer extending over creating.
- Forgetting on retired pages. SEO debt is the silent corpus killer.
redirect_to
- 为了显得全面而新增不必要的页面。最小化的真实变更方案才是最优解。
- 跳过承诺验证步骤。CDO会发现问题,不如提前自查。
- 当现有章节仍有空间时设计新章节。优先选择扩展而非创建新章节。
- 忘记为停用页面设置。SEO债务是文档库的隐形杀手。
redirect_to