w-docs
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseDocument the current code or feature. Follow the consuming repo's docs and README rules. Do not commit unless asked. Durable information architecture belongs in existing MDX; do not invent a second sitemap.
Write to the layer that owns the change:
| Layer | Role | Update when |
|---|---|---|
Technical docs (path in | Architecture, ADRs, how-to | Behavior, architecture, commands, conventions, or workflow changed |
| Agent rules | Short constraints | A convention the agent must not violate changed |
| Nearest README | How to run this app/package; links only | Scripts, setup, or package purpose changed |
Inline comments only when the code is otherwise misleading. Do not copy MDX into rules or READMEs. Do not -attach MDX.
@- Identify the matching docs section, then an existing topic page (create a page only if none fits).
- Write or patch MDX if the canonical explanation changed.
- Patch README only for run/setup/scripts; link the MDX.
- Patch the glob-matched rule only if a constraint changed.
- For mechanical file or doc moves: propose the smallest from/to list grouped by related files; drop folder-name prefixes inside groups. Save only if the user gave a path. Do not move files unless they also asked to implement.
为当前代码或功能编写文档。遵循目标仓库的文档和 README 规则。除非用户明确要求,否则不要提交。持久性信息架构应放在现有 MDX 中;不要另建第二套站点地图。
将文档写入负责该变更的层:
| 层 | 职责 | 更新条件 |
|---|---|---|
技术文档(路径记录在 | 架构、ADR、操作指南 | 行为、架构、命令、约定或工作流发生变化 |
| Agent 规则 | 简短约束 | Agent 不得违反的约定发生变化 |
| 最近一级 README | 如何运行此应用或软件包;仅提供链接 | 脚本、安装配置或软件包用途发生变化 |
仅当代码本身容易造成误导时,才添加内联注释。不要将 MDX 复制到规则或 README 中。不要使用 附加 MDX。
@- 确定匹配的文档章节,然后查找现有的主题页面(仅当没有合适页面时才新建页面)。
- 如果权威解释发生变化,则编写或修改 MDX。
- 仅针对运行、安装配置或脚本修改 README,并链接到 MDX。
- 仅当约束发生变化时,才修改 glob 匹配到的规则。
- 对于机械性的文件或文档移动:按相关文件分组,提出最小化的源路径/目标路径列表;组内去掉文件夹名称前缀。只有当用户提供了路径时才保存。除非用户同时要求实施,否则不要移动文件。