dsh-plugin-dev-kb 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +56 -0
- package/cordis.patch.yml +12 -0
- package/kb/INDEX.md +210 -0
- package/kb/README.md +69 -0
- package/kb/extra/AGENTS.md +75 -0
- package/kb/extra/api-gateway.md +164 -0
- package/kb/extra/api-gateway.zh.md +164 -0
- package/kb/extra/cookbook/adding-a-vendored-package.md +59 -0
- package/kb/extra/cookbook/adding-a-vendored-package.zh.md +59 -0
- package/kb/extra/cookbook/maintaining-dsh-code-review.md +64 -0
- package/kb/extra/cookbook/maintaining-dsh-code-review.zh.md +64 -0
- package/kb/extra/cookbook/responding-to-pr-review-on-a-stack.md +32 -0
- package/kb/extra/cookbook/responding-to-pr-review-on-a-stack.zh.md +32 -0
- package/kb/extra/defensive-patterns.md +33 -0
- package/kb/extra/defensive-patterns.zh.md +33 -0
- package/kb/extra/development.md +171 -0
- package/kb/extra/development.zh.md +171 -0
- package/kb/extra/event-producer-consumer.md +76 -0
- package/kb/extra/event-producer-consumer.zh.md +78 -0
- package/kb/extra/glossary.md +45 -0
- package/kb/extra/glossary.zh.md +45 -0
- package/kb/extra/graph-atlas.md +24 -0
- package/kb/extra/graph-atlas.zh.md +26 -0
- package/kb/extra/i18n/README.md +60 -0
- package/kb/extra/i18n/README.zh.md +60 -0
- package/kb/extra/i18n/style-samples.md +87 -0
- package/kb/extra/i18n/terminology.md +214 -0
- package/kb/extra/i18n/translation-prompt.md +263 -0
- package/kb/extra/i18n/translation-rules.md +69 -0
- package/kb/extra/i18n/translation-rules.zh.md +69 -0
- package/kb/extra/module-graph.md +1641 -0
- package/kb/extra/module-graph.zh.md +1643 -0
- package/kb/extra/postmortem/0001-acp-default-export-drops-inject.md +113 -0
- package/kb/extra/postmortem/0001-acp-default-export-drops-inject.zh.md +113 -0
- package/kb/extra/postmortem/0002-js-expression-disabled-filesystem-tools.md +47 -0
- package/kb/extra/postmortem/0002-js-expression-disabled-filesystem-tools.zh.md +47 -0
- package/kb/extra/postmortem/0003-web-agent-gui-feedback-loop.md +53 -0
- package/kb/extra/postmortem/0003-web-agent-gui-feedback-loop.zh.md +53 -0
- package/kb/extra/postmortem/0004-landlock-partial-notice-misclassified-child-failures.md +55 -0
- package/kb/extra/postmortem/0004-landlock-partial-notice-misclassified-child-failures.zh.md +55 -0
- package/kb/extra/postmortem/README.md +18 -0
- package/kb/extra/postmortem/README.zh.md +18 -0
- package/kb/extra/rescope.md +53 -0
- package/kb/extra/rescope.zh.md +53 -0
- package/kb/extra/subsystems/attachment.md +125 -0
- package/kb/extra/subsystems/attachment.zh.md +125 -0
- package/kb/extra/subsystems/extensions.md +364 -0
- package/kb/extra/subsystems/extensions.zh.md +364 -0
- package/kb/extra/subsystems/feedback.md +266 -0
- package/kb/extra/subsystems/feedback.zh.md +266 -0
- package/kb/extra/testing.md +49 -0
- package/kb/extra/testing.zh.md +49 -0
- package/kb/extra/web-styling.md +25 -0
- package/kb/extra/web-styling.zh.md +25 -0
- package/kb/meta/search-index.json +1328 -0
- package/kb/meta/site-pages.txt +168 -0
- package/kb/meta/source.json +13 -0
- package/kb/meta/topics.md +75 -0
- package/kb/site/develop/basic/config.md +108 -0
- package/kb/site/develop/basic/index.md +146 -0
- package/kb/site/develop/basic/publish.md +185 -0
- package/kb/site/develop/basic/tool.md +54 -0
- package/kb/site/develop/cordis-tutorial/01-first-plugin.md +95 -0
- package/kb/site/develop/cordis-tutorial/02-lifecycle-and-effects.md +98 -0
- package/kb/site/develop/cordis-tutorial/03-services.md +98 -0
- package/kb/site/develop/cordis-tutorial/04-events.md +144 -0
- package/kb/site/develop/cordis-tutorial/05-config.md +84 -0
- package/kb/site/develop/cordis-tutorial/06-composition-and-hmr.md +113 -0
- package/kb/site/develop/cordis-tutorial/07-into-the-harness.md +107 -0
- package/kb/site/develop/cordis-tutorial/index.md +62 -0
- package/kb/site/develop/framework/events.md +145 -0
- package/kb/site/develop/framework/index.md +139 -0
- package/kb/site/develop/framework/service.md +152 -0
- package/kb/site/develop/practice/index.md +157 -0
- package/kb/site/develop/practice/llm-adapter.md +190 -0
- package/kb/site/en/develop/basic/config.md +108 -0
- package/kb/site/en/develop/basic/index.md +146 -0
- package/kb/site/en/develop/basic/publish.md +185 -0
- package/kb/site/en/develop/basic/tool.md +54 -0
- package/kb/site/en/develop/cordis-tutorial/01-first-plugin.md +95 -0
- package/kb/site/en/develop/cordis-tutorial/02-lifecycle-and-effects.md +98 -0
- package/kb/site/en/develop/cordis-tutorial/03-services.md +98 -0
- package/kb/site/en/develop/cordis-tutorial/04-events.md +144 -0
- package/kb/site/en/develop/cordis-tutorial/05-config.md +84 -0
- package/kb/site/en/develop/cordis-tutorial/06-composition-and-hmr.md +113 -0
- package/kb/site/en/develop/cordis-tutorial/07-into-the-harness.md +107 -0
- package/kb/site/en/develop/cordis-tutorial/index.md +60 -0
- package/kb/site/en/develop/framework/events.md +145 -0
- package/kb/site/en/develop/framework/index.md +139 -0
- package/kb/site/en/develop/framework/service.md +150 -0
- package/kb/site/en/develop/practice/index.md +157 -0
- package/kb/site/en/develop/practice/llm-adapter.md +190 -0
- package/kb/site/en/guide/providers-custom-form.png +0 -0
- package/kb/site/en/guide/providers-models-page.png +0 -0
- package/kb/site/en/guide/providers.md +100 -0
- package/kb/site/en/guide/python-sdk.md +106 -0
- package/kb/site/en/guide/quickstart.md +32 -0
- package/kb/site/en/index.md +8 -0
- package/kb/site/en/reference/agent-lifecycle.md +86 -0
- package/kb/site/en/reference/capability-seams.md +475 -0
- package/kb/site/en/reference/config-catalog.md +3155 -0
- package/kb/site/en/reference/cookbook/adding-a-conversation-node.md +235 -0
- package/kb/site/en/reference/cookbook/adding-a-package.md +120 -0
- package/kb/site/en/reference/cookbook/adding-a-settings-card.md +102 -0
- package/kb/site/en/reference/cookbook/adding-a-tool.md +96 -0
- package/kb/site/en/reference/cookbook/adding-an-llm-adapter.md +45 -0
- package/kb/site/en/reference/cookbook/extension-cookbook.md +131 -0
- package/kb/site/en/reference/cordis-api/context.md +368 -0
- package/kb/site/en/reference/cordis-api/events.md +211 -0
- package/kb/site/en/reference/cordis-api/fiber.md +379 -0
- package/kb/site/en/reference/cordis-api/inherited.md +43 -0
- package/kb/site/en/reference/cordis-api/registry.md +156 -0
- package/kb/site/en/reference/cordis-api/service.md +106 -0
- package/kb/site/en/reference/cordis-primer.md +46 -0
- package/kb/site/en/reference/index.md +131 -0
- package/kb/site/en/reference/persistence-catalog.md +949 -0
- package/kb/site/en/reference/subsystems/approval.md +173 -0
- package/kb/site/en/reference/subsystems/client-modules.md +121 -0
- package/kb/site/en/reference/subsystems/code-runtime.md +194 -0
- package/kb/site/en/reference/subsystems/commands.md +190 -0
- package/kb/site/en/reference/subsystems/compaction.md +241 -0
- package/kb/site/en/reference/subsystems/core.md +1073 -0
- package/kb/site/en/reference/subsystems/credentials.md +136 -0
- package/kb/site/en/reference/subsystems/filesystem.md +498 -0
- package/kb/site/en/reference/subsystems/goal.md +280 -0
- package/kb/site/en/reference/subsystems/index.md +58 -0
- package/kb/site/en/reference/subsystems/invariants.md +91 -0
- package/kb/site/en/reference/subsystems/jobs.md +293 -0
- package/kb/site/en/reference/subsystems/llm-streaming.md +920 -0
- package/kb/site/en/reference/subsystems/lsp.md +205 -0
- package/kb/site/en/reference/subsystems/permission-presets.md +134 -0
- package/kb/site/en/reference/subsystems/persistence.md +388 -0
- package/kb/site/en/reference/subsystems/plan.md +90 -0
- package/kb/site/en/reference/subsystems/sandbox.md +221 -0
- package/kb/site/en/reference/subsystems/schedule.md +189 -0
- package/kb/site/en/reference/subsystems/scope.md +62 -0
- package/kb/site/en/reference/subsystems/session-projection.md +265 -0
- package/kb/site/en/reference/subsystems/session-query.md +498 -0
- package/kb/site/en/reference/subsystems/session-reference.md +111 -0
- package/kb/site/en/reference/subsystems/session-telemetry.md +197 -0
- package/kb/site/en/reference/subsystems/session-title.md +207 -0
- package/kb/site/en/reference/subsystems/session.md +852 -0
- package/kb/site/en/reference/subsystems/settings.md +313 -0
- package/kb/site/en/reference/subsystems/shell.md +306 -0
- package/kb/site/en/reference/subsystems/skills.md +334 -0
- package/kb/site/en/reference/subsystems/spill.md +120 -0
- package/kb/site/en/reference/subsystems/storage.md +232 -0
- package/kb/site/en/reference/subsystems/subagent.md +737 -0
- package/kb/site/en/reference/subsystems/subprocess.md +327 -0
- package/kb/site/en/reference/subsystems/system-prompt.md +210 -0
- package/kb/site/en/reference/subsystems/terminal.md +187 -0
- package/kb/site/en/reference/subsystems/token-meter.md +93 -0
- package/kb/site/en/reference/subsystems/tools.md +723 -0
- package/kb/site/en/reference/subsystems/typert.md +339 -0
- package/kb/site/en/reference/subsystems/user-questions.md +181 -0
- package/kb/site/en/reference/subsystems/web-server.md +111 -0
- package/kb/site/en/reference/subsystems/web.md +202 -0
- package/kb/site/en/reference/subsystems/workflow.md +281 -0
- package/kb/site/en/reference/subsystems/workspace.md +231 -0
- package/kb/site/en/reference/tool-catalog.md +1877 -0
- package/kb/site/en/reference/tool-execution-pipeline.md +66 -0
- package/kb/site/guide/providers-custom-form.zh.png +0 -0
- package/kb/site/guide/providers-models-page.zh.png +0 -0
- package/kb/site/guide/providers.md +100 -0
- package/kb/site/guide/python-sdk.md +106 -0
- package/kb/site/guide/quickstart.md +32 -0
- package/kb/site/index.md +8 -0
- package/kb/site/reference/agent-lifecycle.md +86 -0
- package/kb/site/reference/capability-seams.md +475 -0
- package/kb/site/reference/config-catalog.md +3154 -0
- package/kb/site/reference/cookbook/adding-a-conversation-node.md +235 -0
- package/kb/site/reference/cookbook/adding-a-package.md +120 -0
- package/kb/site/reference/cookbook/adding-a-settings-card.md +102 -0
- package/kb/site/reference/cookbook/adding-a-tool.md +98 -0
- package/kb/site/reference/cookbook/adding-an-llm-adapter.md +45 -0
- package/kb/site/reference/cookbook/extension-cookbook.md +133 -0
- package/kb/site/reference/cordis-api/context.md +368 -0
- package/kb/site/reference/cordis-api/events.md +211 -0
- package/kb/site/reference/cordis-api/fiber.md +379 -0
- package/kb/site/reference/cordis-api/inherited.md +43 -0
- package/kb/site/reference/cordis-api/registry.md +156 -0
- package/kb/site/reference/cordis-api/service.md +106 -0
- package/kb/site/reference/cordis-primer.md +52 -0
- package/kb/site/reference/index.md +135 -0
- package/kb/site/reference/persistence-catalog.md +949 -0
- package/kb/site/reference/subsystems/approval.md +173 -0
- package/kb/site/reference/subsystems/client-modules.md +121 -0
- package/kb/site/reference/subsystems/code-runtime.md +194 -0
- package/kb/site/reference/subsystems/commands.md +190 -0
- package/kb/site/reference/subsystems/compaction.md +241 -0
- package/kb/site/reference/subsystems/core.md +1081 -0
- package/kb/site/reference/subsystems/credentials.md +136 -0
- package/kb/site/reference/subsystems/filesystem.md +498 -0
- package/kb/site/reference/subsystems/goal.md +280 -0
- package/kb/site/reference/subsystems/index.md +58 -0
- package/kb/site/reference/subsystems/invariants.md +91 -0
- package/kb/site/reference/subsystems/jobs.md +293 -0
- package/kb/site/reference/subsystems/llm-streaming.md +926 -0
- package/kb/site/reference/subsystems/lsp.md +205 -0
- package/kb/site/reference/subsystems/permission-presets.md +134 -0
- package/kb/site/reference/subsystems/persistence.md +388 -0
- package/kb/site/reference/subsystems/plan.md +90 -0
- package/kb/site/reference/subsystems/sandbox.md +221 -0
- package/kb/site/reference/subsystems/schedule.md +189 -0
- package/kb/site/reference/subsystems/scope.md +62 -0
- package/kb/site/reference/subsystems/session-projection.md +265 -0
- package/kb/site/reference/subsystems/session-query.md +498 -0
- package/kb/site/reference/subsystems/session-reference.md +111 -0
- package/kb/site/reference/subsystems/session-telemetry.md +197 -0
- package/kb/site/reference/subsystems/session-title.md +207 -0
- package/kb/site/reference/subsystems/session.md +854 -0
- package/kb/site/reference/subsystems/settings.md +313 -0
- package/kb/site/reference/subsystems/shell.md +306 -0
- package/kb/site/reference/subsystems/skills.md +334 -0
- package/kb/site/reference/subsystems/spill.md +120 -0
- package/kb/site/reference/subsystems/storage.md +232 -0
- package/kb/site/reference/subsystems/subagent.md +739 -0
- package/kb/site/reference/subsystems/subprocess.md +327 -0
- package/kb/site/reference/subsystems/system-prompt.md +210 -0
- package/kb/site/reference/subsystems/terminal.md +187 -0
- package/kb/site/reference/subsystems/token-meter.md +93 -0
- package/kb/site/reference/subsystems/tools.md +723 -0
- package/kb/site/reference/subsystems/typert.md +339 -0
- package/kb/site/reference/subsystems/user-questions.md +181 -0
- package/kb/site/reference/subsystems/web-server.md +111 -0
- package/kb/site/reference/subsystems/web.md +202 -0
- package/kb/site/reference/subsystems/workflow.md +281 -0
- package/kb/site/reference/subsystems/workspace.md +231 -0
- package/kb/site/reference/tool-catalog.md +1880 -0
- package/kb/site/reference/tool-execution-pipeline.md +66 -0
- package/package.json +40 -0
- package/scripts/rebuild-index.mjs +88 -0
- package/skills/dsh-plugin-dev-kb.md +66 -0
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
# Terminology
|
|
2
|
+
|
|
3
|
+
本表约定本仓库的中英术语统一译法。
|
|
4
|
+
|
|
5
|
+
**通用规则:**
|
|
6
|
+
- "中文"列为中文译文的正文默认用词。若该列为英文,则中文译文的正文中保留英文不翻译。
|
|
7
|
+
- 首次出现按"首次出现"列书写(带括号注释);后续出现只写括号前的部分(可能为中文,也可能为英文),不出现括号内的注释。
|
|
8
|
+
- "不要译作"列为严格禁止的译法。
|
|
9
|
+
- 如果某术语已经作为另一个术语的组成部分被括注过(如 `agent loop(智能体循环)` 中已包含 `agent` 的括注),则该术语后续单独出现时无需再次括注。
|
|
10
|
+
|
|
11
|
+
## 缩写类(中英文文本中均使用缩写)
|
|
12
|
+
|
|
13
|
+
| English | 中文 | 首次出现 | 不要译作 | 备注 |
|
|
14
|
+
|---|---|---|---|---|
|
|
15
|
+
| ACP | ACP | ACP(Agent Client Protocol) | | |
|
|
16
|
+
| AI | AI | AI(人工智能) | | |
|
|
17
|
+
| API | API | | | |
|
|
18
|
+
| CI | CI | | | |
|
|
19
|
+
| CLI | CLI | CLI(命令行界面) | | |
|
|
20
|
+
| e2e | e2e | | | |
|
|
21
|
+
| HMR | HMR | HMR(热模块替换) | | |
|
|
22
|
+
| JSON Schema | JSON Schema | | | |
|
|
23
|
+
| JSONL | JSONL | | | |
|
|
24
|
+
| LLM | LLM | LLM(大语言模型) | | |
|
|
25
|
+
| MCP | MCP | | | |
|
|
26
|
+
| PR | PR | PR(Pull Request) | | |
|
|
27
|
+
| RAG | RAG | RAG(检索增强生成) | | |
|
|
28
|
+
| SDK | SDK | | | 只指受支持的 Python 与 TypeScript SDK 所使用的 JSON-RPC 客户端/服务器协议;DeepSeek Harness 项目本身不是 SDK |
|
|
29
|
+
| SSE | SSE | SSE(Server-Sent Events) | | |
|
|
30
|
+
|
|
31
|
+
## 英文类(中英文文本中均使用英文)
|
|
32
|
+
|
|
33
|
+
| English | 中文 | 首次出现 | 不要译作 | 备注 |
|
|
34
|
+
|---|---|---|---|---|
|
|
35
|
+
| agent | agent | agent(智能体) | | |
|
|
36
|
+
| Agent Note | Agent Note | | 智能体注记、智能体笔记 | 仓库定义的文档类型,涵盖提案、已实现决策和被否决提案;中文对侧 H1 保持固定前缀 `# Agent Note: `,标题中不加术语括注 |
|
|
37
|
+
| agent harness | agent harness | agent harness(智能体框架) | | agent 组合词(agent harness/workflow/loop/skill 等)整体保留英文;未括注过 agent 时首现按对应组合词或 agent 行处理 |
|
|
38
|
+
| agent loop | agent loop | agent loop(智能体循环) | | |
|
|
39
|
+
| blob hash | blob hash | | | `git hash-object` 的结果 |
|
|
40
|
+
| coding agent | coding agent | coding agent(编程智能体) | | agent 组合词,正文保留英文 |
|
|
41
|
+
| Cordis | Cordis | | | |
|
|
42
|
+
| dispose | dispose | dispose(资源释放) | | |
|
|
43
|
+
| doc-sync | doc-sync | doc-sync(文档同步门禁) | | |
|
|
44
|
+
| fiber | fiber | | | |
|
|
45
|
+
| fixture | fixture | fixture(测试前置数据) | | |
|
|
46
|
+
| fork | fork | | | |
|
|
47
|
+
| Function Calling | Function Calling | Function Calling(函数调用) | | |
|
|
48
|
+
| harness | harness | | | |
|
|
49
|
+
| harness engineering | harness engineering | | | |
|
|
50
|
+
| KV Cache | KV Cache | | | 专有技术名称,保持大小写与空格 |
|
|
51
|
+
| lint | lint | | | |
|
|
52
|
+
| mock | mock | | | 保留英文;指测试替身 |
|
|
53
|
+
| loader | loader | | | |
|
|
54
|
+
| manifest | manifest | manifest(元数据清单) | | |
|
|
55
|
+
| monorepo | monorepo | | | |
|
|
56
|
+
| Round | Round | | 回合、目标回合、Ralph 回合 | 外层策略使用 Round 时,领域层级为 Session > Round > Turn(轮次) > Step(步骤);Round 是可选的外层策略迭代,并非每个会话轮次都具有的通用层级。Goal Round 与 Ralph Round 均保留英文。一个 Round 承载一个轮次,步骤隶属于该轮次;明确的零步骤轮次仍保持原义。 |
|
|
57
|
+
| schema | schema | | | |
|
|
58
|
+
| schema DSL | schema DSL | | | |
|
|
59
|
+
| seam | seam | | 接缝 | 一个可替换能力的整体,包含 Service Definition / Service Provider / Consumer 三种角色;角色需要独立演化时才拆包,也可由同一包承担多个角色。以 `packages/shell` 为范例;Service Definition 是 Cordis `Service`(抽象类或具体 registry 服务),不是 TypeScript interface。任何单一角色、普通边界或扩展点都不能称为 seam。本仓库正文保留英文;与 `extension point` 是不同概念 |
|
|
60
|
+
| Service Provider | Service Provider | | Service provider | 能力 seam 的命名角色;单数固定写作 Service Provider,复数写作 Service Providers。泛指提供服务的 provider 不适用本词条 |
|
|
61
|
+
| skill | skill | skill(技能) | | |
|
|
62
|
+
| slot | slot | | 坑位、孔位 | 客户端架构中的具名可注册位置,保留英文 |
|
|
63
|
+
| spill | spill | | | 工具输出超限落盘机制;组合词写 `spill 文件`、`spill 路径` |
|
|
64
|
+
| spawn | spawn | | | |
|
|
65
|
+
| steering | steering | steering(中途引导) | | |
|
|
66
|
+
| job id | job id | | 任务 id | 保留英文 |
|
|
67
|
+
| subagent | subagent | | | |
|
|
68
|
+
| transcript | transcript | transcript(文本记录) | | 指会话渲染给用户或编辑器的完整文本,区别于事件日志 |
|
|
69
|
+
| Typert | Typert | | TypeRT、typeRT、Type RT | DeepSeek Harness 类型图、生成器、loader 与运行时 registry 的产品拼写 |
|
|
70
|
+
| waterfall | waterfall | waterfall(瀑布式事件) | | |
|
|
71
|
+
| wheel | wheel 包 | | | Python 打包格式 |
|
|
72
|
+
| worktree | worktree | | | git 工作区概念 |
|
|
73
|
+
| Zstandard | Zstandard | | | RFC 8878 compression format; `zstd` remains a code value. |
|
|
74
|
+
|
|
75
|
+
## 双语类(中英文文本各自使用中英文)
|
|
76
|
+
|
|
77
|
+
| English | 中文 | 首次出现 | 不要译作 | 备注 |
|
|
78
|
+
|---|---|---|---|---|
|
|
79
|
+
| adapter | 适配器 | | | |
|
|
80
|
+
| adapter contract | 适配器约定 | 适配器约定(adapter contract) | | |
|
|
81
|
+
| append-only | 仅追加 | | | |
|
|
82
|
+
| artifact | 产物 | | 制品 | |
|
|
83
|
+
| backend | 后端 | | | |
|
|
84
|
+
| binder | 绑定器 | | | 命名角色:把已声明接口绑定到调用方 context 或生命周期 |
|
|
85
|
+
| config | 配置 | | | 命名角色:一个已解析配置值或边界严格的配置记录 |
|
|
86
|
+
| controller | 控制器 | | | 命名角色:接受意图并改变一项既有领域或展示状态 |
|
|
87
|
+
| directory | 目录 | | | 命名角色:暴露供发现或选择的条目及元数据 |
|
|
88
|
+
| engine | 引擎 | | | 命名角色:实现领域算法或有状态执行模型 |
|
|
89
|
+
| gateway | 网关 | | | 命名角色:适配进程、网络、RPC 或 API 边界 |
|
|
90
|
+
| handle | 句柄 | | | 命名角色:引用并控制或观察一个实时资源 |
|
|
91
|
+
| policy | 策略 | | | 命名角色:决定允许、选择、限制或观察什么 |
|
|
92
|
+
| presenter | 展示转换器 | | | 命名角色:把领域值纯转换为渲染意图 |
|
|
93
|
+
| resolver | 解析器 | | | 命名角色:根据输入计算或定位一个答案 |
|
|
94
|
+
| store | 存储 | | | 命名角色:拥有一组数据并主要提供数据操作 |
|
|
95
|
+
| background job | 后台任务 | | | |
|
|
96
|
+
| block | 块 | | | |
|
|
97
|
+
| build target | 构建目标 | | | |
|
|
98
|
+
| cancel | 取消 | | | |
|
|
99
|
+
| canary test | canary 测试 | | 金丝雀测试 | 本仓库保留 `canary` |
|
|
100
|
+
| capability | 能力 | | | 必须与 `feature` → `功能` 区分 |
|
|
101
|
+
| capability seam | 能力 seam | | 功能 seam、能力接缝 | 本仓库 Service Definition、Service Provider 与 Consumer 三种角色组成完整可替换能力的命名架构概念;普通 `seam` 仍按其词条处理 |
|
|
102
|
+
| feature | 功能 | | 能力 | SDK 产品与工程模型中的可管理产品单元 |
|
|
103
|
+
| feature option | 功能选项 | | variant | 一项 SDK 功能内有限、可选择的实现或配置 |
|
|
104
|
+
| checkpoint | 检查点 | | | |
|
|
105
|
+
| chunk | 分片 | | | |
|
|
106
|
+
| compaction | 压缩 | 压缩(compaction) | | |
|
|
107
|
+
| companion tool | 配套工具 | | | |
|
|
108
|
+
| composition bundle | 组合包 | | | 只约束应用或插件的组合语境,不约束所有 `bundle` |
|
|
109
|
+
| Cordis plugin config | Cordis 插件配置 | | | Cordis 插件公开的 `Config` 对象或配置结构 |
|
|
110
|
+
| config key | 配置键 | | | Cordis 插件配置中的单个字段 |
|
|
111
|
+
| consumer | 消费方 | | 消费者 | |
|
|
112
|
+
| content block | 内容块 | | | |
|
|
113
|
+
| Cookbook | 实操手册 | | | 文档标题用语 |
|
|
114
|
+
| context | 上下文 | | | |
|
|
115
|
+
| counterpart | 对侧文件 | | 对应物、配对物 | 双语配对语境;泛指"另一侧"时可写「另一侧」 |
|
|
116
|
+
| configurable-provider directory | 可配置提供方目录 | | | llm seam 中 `registerConfigurableProviders()` 维护的目录;沿用 Service Catalog →「服务目录」先例 |
|
|
117
|
+
| context compaction | 上下文压缩 | 上下文压缩(context compaction) | | |
|
|
118
|
+
| contract | 约定 | | | 如:`pairing contract` →`配对约定` |
|
|
119
|
+
| Cordis config entry | Cordis 配置项 | | | 指 `cordis.yml` 插件列表中的一项;插件实现本身写`Cordis 插件` |
|
|
120
|
+
| Cordis plugin | Cordis 插件 | | | Cordis 加载的插件实现,不指 `cordis.yml` 中的一项配置 |
|
|
121
|
+
| crash recovery | 崩溃恢复 | | | |
|
|
122
|
+
| deploy root | 部署根目录 | | | |
|
|
123
|
+
| dormant | 休眠 | | 睡眠、蛰伏 | 指已声明可配置但当前未注册路由的提供方 |
|
|
124
|
+
| durability | 持久性 | | | |
|
|
125
|
+
| feature requirement | 功能依赖 | | | 功能或功能选项通过 `requires` 声明的关系 |
|
|
126
|
+
| event | 事件 | | | |
|
|
127
|
+
| event log | 事件日志 | | | |
|
|
128
|
+
| event stream | 事件流 | | | |
|
|
129
|
+
| event-sourced | 事件溯源 | | | 沿用 DDD 社区通行译法 |
|
|
130
|
+
| Executive summary | 摘要 | | | 事故复盘标题用语 |
|
|
131
|
+
| executor | 执行器 | | | |
|
|
132
|
+
| expected output | 预期输出 | | 金标 | 指 snapshot 比较产物;翻译语料的人工校准样例不在此列 |
|
|
133
|
+
| extension | 扩展 | | | |
|
|
134
|
+
| extension point | 扩展点 | | | 注意与 `seam` 区分 |
|
|
135
|
+
| fail-fast | 快速失败 | | | |
|
|
136
|
+
| fenced code block | 围栏代码块 | | | 沿用 MDN 中文翻译 |
|
|
137
|
+
| fingerprint | 指纹 | | | 通用内容指纹;双语配对机制使用 sidecar record 记录两侧 blob hash |
|
|
138
|
+
| finish reason | 结束原因 | | | |
|
|
139
|
+
| fold | 折叠区 | | | 配置界面语境:默认收起的字段分区(collapsed →「收起」)|
|
|
140
|
+
| foreground run | 前台运行 | | | |
|
|
141
|
+
| freshness | 新鲜度 | | | 沿用 MDN 中文翻译;在本项目中指译文相对源文的同步状态 |
|
|
142
|
+
| hook | 钩子 | | | |
|
|
143
|
+
| implementation | 实现 | | | |
|
|
144
|
+
| inference | 推理 | 推理(inference) | | 需要和 `reasoning` 区分时保留英文括注 |
|
|
145
|
+
| info string | 信息字符串 | | | 沿用 CommonMark 中文翻译;指代码围栏 ``` 之后的语言标注 |
|
|
146
|
+
| injection | 注入 | | | |
|
|
147
|
+
| integration | 集成 | | | |
|
|
148
|
+
| interface | 接口 | | | |
|
|
149
|
+
| language switcher | 语言切换行 | | | i18n 配对机制用语:双语配对文件顶部的互链行 |
|
|
150
|
+
| merge | 合并 | | | |
|
|
151
|
+
| message | 消息 | | | |
|
|
152
|
+
| mod | 模组 | | | |
|
|
153
|
+
| model provider | 模型提供方 | | | |
|
|
154
|
+
| model selection | 模型选择 | | 模型目标 | 面向 Agent 的提供方、模型和可选推理强度选择。 |
|
|
155
|
+
| module | 模块 | | | |
|
|
156
|
+
| non-escalation | 非升权 | | 非升级、不可升级 | 仅用于安全与权限语境,指主体不得获得超出既有授权的权限;普通升级不适用此行 |
|
|
157
|
+
| npm dependency | NPM 依赖 | | | `package.json` 中的包关系;`dependencies`、`devDependencies` 等字段保持原样 |
|
|
158
|
+
| opt-out ratio | opt-out 比例 | | 退出检查比例 | |
|
|
159
|
+
| orphan | 遗留 | | 孤儿、孤立 | 指英文源已不存在的 `.zh.md`(如「遗留译文」);进程语境按 OS 惯用语译「孤儿进程」 |
|
|
160
|
+
| orphan branch | 孤立分支 | | 孤儿分支 | 沿用 git 官方中文翻译 |
|
|
161
|
+
| package | 包 | | | 指 npm 包(`@deepseek-ai/dsh-*`);`package.json` 等代码标识保持原样 |
|
|
162
|
+
| pairing | 配对 | | | |
|
|
163
|
+
| parent-subset grants | 父级子集授权 | | 父集合授权 | 指授权范围仅限于父级所持授权的子集 |
|
|
164
|
+
| peer dependency | 对等依赖 | 对等依赖(peer dependency) | | |
|
|
165
|
+
| permission | 权限 | | | |
|
|
166
|
+
| persistence | 持久化 | | | |
|
|
167
|
+
| pipeline | 流水线 | | | |
|
|
168
|
+
| plugin | 插件 | | | |
|
|
169
|
+
| postmortem | 事故复盘 | 事故复盘(postmortem) | 事后分析、事故记录 | 事故记录与分析文档;目录或路径中的 `postmortem` 保持代码形式 |
|
|
170
|
+
| prompt | 提示词 | | | |
|
|
171
|
+
| provider | 提供方 | | | |
|
|
172
|
+
| provider-neutral | 提供方无关 | | 提供方中立 | |
|
|
173
|
+
| quality gate | 质量门禁 | | | |
|
|
174
|
+
| quiescence | 完全停稳 | | 静默、静止状态 | 指生命周期工作全部结算后的状态 |
|
|
175
|
+
| reasoning | 推理 | 推理(reasoning) | | 需要和 `inference` 区分时保留英文括注 |
|
|
176
|
+
| reasoning_content | 思考内容 | | | |
|
|
177
|
+
| registry | 注册表 | | | |
|
|
178
|
+
| replay | 回放 | | | |
|
|
179
|
+
| resume | 恢复 | | | |
|
|
180
|
+
| runtime | 运行时 | | | |
|
|
181
|
+
| same-world subprocess | 与宿主共享文件系统和内核的子进程 | | 同世界子进程 | |
|
|
182
|
+
| sandbox | 沙箱 | | | |
|
|
183
|
+
| service | 服务 | | | |
|
|
184
|
+
| serving interface | 对外服务接口 | | | |
|
|
185
|
+
| session | 会话 | | | |
|
|
186
|
+
| session event | 会话事件 | | | |
|
|
187
|
+
| setup card | 设置卡片 | | | 首次运行时代替行卡直接展开的配置卡 |
|
|
188
|
+
| sidecar file | 伴随文件 | | | 指与文档同目录的普通伴随文件 |
|
|
189
|
+
| sidecar record | 伴随记录 | | 旁挂记录 | 指与文档同目录的伴随记录文件 |
|
|
190
|
+
| smoke test | 冒烟测试 | | | |
|
|
191
|
+
| snapshot | 快照 | | | |
|
|
192
|
+
| source of truth | 真源 | | 事实来源、唯一来源 | |
|
|
193
|
+
| spine | 主干 | | | |
|
|
194
|
+
| stale | 陈旧 | | 过期 | 与 `fresh`(`新鲜`)成对;门禁输出中保留英文 `stale` 不翻译;`expired` 才译为`过期` |
|
|
195
|
+
| step | 步骤 | | | |
|
|
196
|
+
| stream | 流 | | | |
|
|
197
|
+
| structural signature | 结构签名 | | | i18n 配对机制用语:门禁比对两侧文件时提取的有序结构序列(标题层级、代码块、列表等) |
|
|
198
|
+
| Summary | 概述 | | | 事故复盘标题用语 |
|
|
199
|
+
| system prompt | 系统提示词 | | | |
|
|
200
|
+
| taxonomy | 分类体系 | | | |
|
|
201
|
+
| token usage | token 用量 | | | |
|
|
202
|
+
| tool | 工具 | | | |
|
|
203
|
+
| tool call | 工具调用 | | | |
|
|
204
|
+
| tool result | 工具结果 | | | |
|
|
205
|
+
| tool schema | 工具 schema | | | |
|
|
206
|
+
| toolkit | 工具包 | | | |
|
|
207
|
+
| turn | 轮次 | | | |
|
|
208
|
+
| VFS | VFS | 虚拟文件系统(VFS) | | |
|
|
209
|
+
| typecheck | 类型检查 | | | |
|
|
210
|
+
| vocabulary | 词汇 | | | |
|
|
211
|
+
| wire format | 协议格式 | 协议格式(wire format) | | |
|
|
212
|
+
| workflow | 工作流 | | | |
|
|
213
|
+
| wrapper | 包装层 | | | 软件层或 SDK 包装层 |
|
|
214
|
+
| wrapper script | 包装脚本 | | | 可执行脚本包装层 |
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
# Translation prompt (pipeline asset)
|
|
2
|
+
|
|
3
|
+
本文件是自动翻译流水线的 prompt 模板;从 `# Translation Prompt` 开始的正文会逐字进入模型请求,因此本文件不参与双语配对(见 [README.md](README.md) 排除清单)。模板正文与内嵌 few-shot 正误例由 jingtingxiang 基于对存量译文的质量评审撰写,是流水线行为的拍板基线。渲染时把 [terminology.md](terminology.md) 整表填入 `{{terminology}}`;除此之外不注入任何其他仓库文件(translation-rules.md 约束人和 agent 的翻译工作,不注入本模板)。[style-samples.md](style-samples.md) 定义文体,模板中的 Examples 只用于说明典型问题,两者冲突时以文体样例为准。本模板遵循 [提示词 v4 约定 Agent Note](../../.agents/notes/implemented/process/2026-07-23-translation-prompt-v4-contract.md) 记录的兼容协议。修改本文件会改变翻译行为,需正常经过 PR 评审。
|
|
4
|
+
|
|
5
|
+
## 占位符约定
|
|
6
|
+
|
|
7
|
+
流水线渲染模板时替换以下占位符,除此之外不改写系统消息:
|
|
8
|
+
|
|
9
|
+
| 占位符 | 填入内容 | 来源 |
|
|
10
|
+
|---|---|---|
|
|
11
|
+
| `{{source_lang}}` | 源语言名(`English` / `Chinese`) | 由改动侧文件推断:`.zh.md` 被改则为 `Chinese` |
|
|
12
|
+
| `{{target_lang}}` | 目标语言名(`Chinese` / `English`) | 与 `{{source_lang}}` 相对 |
|
|
13
|
+
| `{{terminology}}` | [terminology.md](terminology.md) 的完整表格(Markdown 原文) | 渲染时读取仓库当前版本,不缓存 |
|
|
14
|
+
|
|
15
|
+
流水线只识别上表中的占位符,并且一次翻译整篇文档。它不支持 `{{to}}`、`{{title_prompt}}`、`{{summary_prompt}}`、`{{terms_prompt}}`、`{{imt_style_guide}}`、`{{translation_rules}}` 或 `%%` 分段协议;输出采用模板正文规定的三段 XML,流水线解析取 `<final>` 段。
|
|
16
|
+
|
|
17
|
+
语言切换行:已有配对的源文件自带切换行,模型按模板规则翻转即可。全新配对的源文件没有切换行,模型也无从得知文件名——此时由流水线在解析 `<final>` 后按目标文件名插入或校正切换行(机械后处理,配对门禁兜底校验)。
|
|
18
|
+
|
|
19
|
+
## Few-shot 金标
|
|
20
|
+
|
|
21
|
+
流水线使用**整篇文档**的中英对照作为 few-shot,不是模板内嵌的句子级正误例。以下 5 组配对文档均经过人工评审,以仓库当前版本为准、随仓库更新:
|
|
22
|
+
|
|
23
|
+
- `README.md` ↔ `README.zh.md`
|
|
24
|
+
- `docs/development.md` ↔ `docs/development.zh.md`
|
|
25
|
+
- `docs/i18n/README.md` ↔ `docs/i18n/README.zh.md`
|
|
26
|
+
- `docs/i18n/translation-rules.md` ↔ `docs/i18n/translation-rules.zh.md`
|
|
27
|
+
- `.agents/notes/implemented/process/2026-07-02-bilingual-docs-and-pairing-gate.md` ↔ 对应 `.zh.md`
|
|
28
|
+
|
|
29
|
+
注入方式:在系统消息(本模板)之后、待译文档之前,每组作为一轮示例对话——user 消息为源文档全文,assistant 消息为定稿译文全文(裸文本,不带三段 XML 包装;只有真实请求要求三段输出)。上下文不足时按上列顺序从后往前删减组数。这 5 组也是评审校准锚点(见 [style-samples.md](style-samples.md)),改动任何一组即改变流水线行为。
|
|
30
|
+
|
|
31
|
+
## 模板正文
|
|
32
|
+
|
|
33
|
+
````text
|
|
34
|
+
# Translation Prompt
|
|
35
|
+
|
|
36
|
+
You are a senior technical translator specializing in LLM and agent development documentation. Your task is to translate the complete source document from {{source_lang}} to {{target_lang}}, producing natural, professional technical prose.
|
|
37
|
+
|
|
38
|
+
Read each complete semantic unit, understand it, and restate it as a native technical author would write it in the target language. Do not mechanically preserve source-language syntax. Then verify the translation against the source clause by clause: preserve every proposition and add none. Fluency never justifies losing or altering meaning, and completeness never justifies unnatural word-for-word prose.
|
|
39
|
+
|
|
40
|
+
## Priority
|
|
41
|
+
|
|
42
|
+
Apply these authorities in order:
|
|
43
|
+
|
|
44
|
+
1. Preserve the source meaning and the required document structure, protected content, and formatting.
|
|
45
|
+
2. Follow the injected terminology table exactly.
|
|
46
|
+
3. Use the injected whole-document gold pairs to calibrate target-language voice and phrasing.
|
|
47
|
+
4. Apply the general writing guidance and illustrative examples in this prompt.
|
|
48
|
+
|
|
49
|
+
A lower-priority rule may refine but never override a higher-priority requirement. Gold pairs calibrate voice; they are not a translation memory. No style preference, gold-pair phrasing, or embedded example may override source meaning, required structure, protected content, or the terminology table.
|
|
50
|
+
|
|
51
|
+
## Quality Requirements
|
|
52
|
+
|
|
53
|
+
### Structure and Format Preservation
|
|
54
|
+
- Output a complete translated document that maintains the same document frame as the source: heading hierarchy and order, list kinds and item counts, ordered-list starts, table rows and columns, link targets, and code blocks.
|
|
55
|
+
- Paragraph boundaries may change within the same structural unit when the target language needs different semantic grouping. Do not merge or move content across headings, list items, table cells, or other independent structural units.
|
|
56
|
+
- Keep each prose paragraph on one physical line. Use paragraph breaks, not hard-wrapped lines inside a paragraph.
|
|
57
|
+
- Fenced code blocks must be byte-identical to the source, including info strings, whitespace, and ALL comments inside them. Do NOT translate or reformat any content inside code blocks. This is a hard rule with no exceptions.
|
|
58
|
+
- Inline code spans must be kept verbatim. This includes commands, flags, paths, identifiers, API and event names, config keys, protocol values, version numbers, and other machine-readable tokens. Never translate or reformat them.
|
|
59
|
+
- Every relative link must point to the same target as in the source. Translate link text; do not change link targets.
|
|
60
|
+
- Language switcher line: when an English source contains `English | [中文](source-filename.zh.md)`, write `[English](source-filename.md) | 中文`. When a Chinese source contains `[English](source-filename.md) | 中文`, write `English | [中文](source-filename.zh.md)`. Do NOT copy the source switcher unchanged. If the source has no switcher, do not invent a filename or switcher; the pipeline inserts the canonical target switcher after parsing `<final>`.
|
|
61
|
+
- Preserve emphasis marker types and the semantic spans they cover. Do not add, remove, move, or change bold and italic markers.
|
|
62
|
+
|
|
63
|
+
### Faithfulness
|
|
64
|
+
- Preserve every proposition in the source and add none. Every sentence, list item, note, FIXME, warning, example, caveat, prerequisite, and guarantee must have an equivalent in the translation. Count list items on both sides.
|
|
65
|
+
- Preserve actors, objects, conditions, exceptions, negation, modality, causal relationships, and distinctions between concepts.
|
|
66
|
+
- Preserve the exact strength and orientation of contracts. Completion and lifecycle conditions, failure behavior, directions and data flow, normal and exceptional result channels, ownership changes, and quantitative bounds must not be weakened, strengthened, reversed, or merged.
|
|
67
|
+
- Translate ideas rather than source-language idioms, but never use fluency as a reason to omit or alter meaning.
|
|
68
|
+
|
|
69
|
+
### Tone and Style
|
|
70
|
+
- The translation must read as if originally written in the target language by a native technical author. If an expression sounds like a word-for-word rendering from the source language, rephrase it.
|
|
71
|
+
- Write in a professional, formal tone appropriate for developer documentation. Never use colloquial or casual expressions.
|
|
72
|
+
- Name an actor when the target language would otherwise obscure an actor that the source states or unambiguously implies. Never invent responsibility merely to avoid a passive construction.
|
|
73
|
+
- Prefer established target-language engineering terms over literal renderings. Replace metaphors with direct descriptions that preserve the source meaning.
|
|
74
|
+
- Use polite imperative forms where the text instructs the reader to do something. In Chinese, address the reader as `你`, not `您`.
|
|
75
|
+
- Keep the author's register: concise stays concise, detailed stays detailed.
|
|
76
|
+
|
|
77
|
+
### Sentence Structure
|
|
78
|
+
- Break long sentences where the target language needs a pause. Avoid run-on sentences.
|
|
79
|
+
- Use active voice when it improves clarity without changing or inventing the actor. Retain passive voice when the actor is unknown, irrelevant, or intentionally omitted.
|
|
80
|
+
- Restructure source-language syntax into clear target-language syntax. Preserve the logical scope of conditions, concessions, negation, coordination, and modifiers.
|
|
81
|
+
- Split or combine clauses when needed for readability, provided every source relationship remains explicit.
|
|
82
|
+
- Translate meaning, not words. Do not invent words or expressions that a native technical author would not use.
|
|
83
|
+
|
|
84
|
+
### Word Choice
|
|
85
|
+
- Prefer precise, formal vocabulary over casual or colloquial alternatives.
|
|
86
|
+
- When multiple synonyms exist, choose the one most commonly used in professional technical documentation of the target language.
|
|
87
|
+
- Translate ordinary prose when an established target-language expression is clear. Preserve proper nouns, canonical product names, code identifiers, APIs, paths, package names, and terms that the terminology table requires to remain in the source language.
|
|
88
|
+
- Use context to resolve polysemous words. A familiar word does not have one fixed rendering in every technical domain.
|
|
89
|
+
- Avoid slang, internal jargon, or overly literal translations that would not be recognized by the general developer audience.
|
|
90
|
+
- Do not use the same word to translate distinct source-language concepts when their distinction matters.
|
|
91
|
+
- Avoid repeating the same ordinary verb in close proximity when a natural equivalent preserves the exact meaning. Never vary a terminology-table form, defined concept, or contract verb merely for stylistic variety.
|
|
92
|
+
|
|
93
|
+
#### When translating into Chinese
|
|
94
|
+
- When a number modifies a noun, include a natural Chinese classifier or measure word when Chinese grammar requires one. For example: "three-role capability seam" → "包含三种角色的能力 seam", not "三角色 seam". Do not add classifiers to code, identifiers, versions, units, or fixed names.
|
|
95
|
+
|
|
96
|
+
### Punctuation
|
|
97
|
+
|
|
98
|
+
#### When translating into Chinese
|
|
99
|
+
- Use full-width Chinese punctuation in Chinese prose: `,。:;?!()「」`. Keep half-width punctuation inside code spans, numbers, and complete verbatim English text.
|
|
100
|
+
- Prefer colons, periods, commas, or parentheses over em dashes when they make the sentence clearer or more natural. Keep an em dash when it is the clearest natural punctuation.
|
|
101
|
+
- Use enumeration commas (、) between parallel Chinese items, not regular commas.
|
|
102
|
+
- Keep list-item endings consistent with their grammar. Complete sentences may end with periods or other grammatically required punctuation; do not end list items with commas.
|
|
103
|
+
- Put one half-width space between Chinese text and Latin words or numerals. Do not add a space next to full-width punctuation, and do not leave a meaningless half-width space between two Chinese characters.
|
|
104
|
+
- Markdown emphasis markers do not create a word boundary. Determine spacing from the rendered adjacent characters: Chinese next to Chinese takes no space, while Chinese next to a Latin word or numeral takes one half-width space.
|
|
105
|
+
- Use half-width digits and Latin letters, never full-width forms.
|
|
106
|
+
- For RFC 2119 keywords (MUST, MUST NOT, SHOULD, MAY), translate to the corresponding Chinese term (必须、禁止、应当、可以), preserve the SOURCE emphasis span exactly, and do not weaken its normative strength: plain source stays plain (必须), italic source stays italic (*必须*), and bold source stays bold (**必须**).
|
|
107
|
+
|
|
108
|
+
#### When translating into English
|
|
109
|
+
- Use half-width English punctuation and standard English spacing. Preserve full-width punctuation only in verbatim Chinese text.
|
|
110
|
+
- Convert enumeration commas (、) to English commas and Chinese prose quotation marks to English double quotes.
|
|
111
|
+
- Convert Chinese topic-comment sentences and omitted-subject constructions into clear English subjects when the actor is stated or unambiguously implied. Do not invent an actor.
|
|
112
|
+
- Use concise professional developer prose and established English technical terms. Do not transliterate Chinese engineering idioms literally.
|
|
113
|
+
- Use the terminology table's English column exactly and do not carry Chinese first-occurrence glosses into English prose.
|
|
114
|
+
|
|
115
|
+
## Terminology
|
|
116
|
+
|
|
117
|
+
A terminology table is provided below. Follow it strictly:
|
|
118
|
+
- Render every listed term exactly as specified.
|
|
119
|
+
- When the target language is Chinese, use the "中文" column. On the document's first prose occurrence, write the "首次出现" value when one is specified; on later occurrences, write only the part before the parenthetical gloss.
|
|
120
|
+
- When the target language is English, use the "English" column without a Chinese gloss; do not copy the "中文" or "首次出现" value into English prose.
|
|
121
|
+
- If a term has already been glossed as part of a compound term, do not gloss it again when it appears alone later.
|
|
122
|
+
- NEVER use translations listed in the "不要译作" column.
|
|
123
|
+
- Code spans and other protected tokens remain verbatim even when their text resembles a listed term.
|
|
124
|
+
- For an unlisted technical term, use an established target-language technical term when its meaning is unambiguous in context. For a Chinese target, use an established Chinese rendering from a major Chinese-language OSS or vendor source; if you cannot reliably determine such a rendering, preserve the source term and record `[Terminology: pending]` in `<review>` with a tentative rendering for human review. For an English target, use the established English technical term; if the source term has no unambiguous established equivalent, preserve it with the shortest English gloss needed to make it intelligible and record `[Terminology: pending]` in `<review>`. A tentative rendering may appear in `<review>` but must not be silently adopted in `<translation>` or `<final>`, and you must not invent or claim a specific external precedent. This rule applies to terminology only; for general prose, freely restructure and paraphrase for natural expression.
|
|
125
|
+
|
|
126
|
+
{{terminology}}
|
|
127
|
+
|
|
128
|
+
## Output Format
|
|
129
|
+
|
|
130
|
+
Return exactly three raw XML sections in the order shown below. Do not wrap the response in a Markdown code fence and do not add analysis or text before, between, or after the sections. The fence below only displays the required format; do not reproduce the fence.
|
|
131
|
+
|
|
132
|
+
The outer section tags are framing. If Markdown inside any section body contains a line consisting only of `<translation>`, `</translation>`, `<review>`, `</review>`, `<final>`, or `</final>`, prefix that line with `\`. If the original line already has one or more backslashes immediately before the tag, add one more. The parser removes exactly one framing escape; tags mentioned inline need no escaping.
|
|
133
|
+
|
|
134
|
+
```xml
|
|
135
|
+
<translation>
|
|
136
|
+
(First pass: the complete translation, written as natural target-language technical prose)
|
|
137
|
+
</translation>
|
|
138
|
+
|
|
139
|
+
<review>
|
|
140
|
+
(Second pass: actual corrections only, one correction per line with a category tag, e.g.)
|
|
141
|
+
- [Tone] "旁挂记录" → "伴随记录"(生造词)
|
|
142
|
+
- [Sentence] 第 3 段补充逗号断句
|
|
143
|
+
- [Punctuation] 两处破折号替换为冒号
|
|
144
|
+
- [Terminology: pending] source term → tentative rendering
|
|
145
|
+
- 无修正
|
|
146
|
+
</review>
|
|
147
|
+
|
|
148
|
+
<final>
|
|
149
|
+
(Complete final translation after corrections)
|
|
150
|
+
</final>
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## Self-Review Instructions
|
|
154
|
+
|
|
155
|
+
After writing `<translation>`, verify it in two directions. First re-read it in the target language only without comparing it with the source; this makes awkward phrasing easier to notice. Then compare it against the source clause by clause for completeness and exact meaning. Resolve doubts before writing `<review>`; do not include reasoning transcripts, checks that passed, tentative suggestions, retractions, or no-op corrections.
|
|
156
|
+
|
|
157
|
+
**Structure**
|
|
158
|
+
- Are the heading hierarchy and order, list kind and item count, ordered-list start, table dimensions, and code block content identical to the source?
|
|
159
|
+
- Are ALL comments and info strings inside code blocks left untranslated and byte-identical to the source?
|
|
160
|
+
- Are inline code spans and machine-readable tokens verbatim?
|
|
161
|
+
- Is an existing language switcher correctly flipped, and is no switcher or filename invented when the source lacks one?
|
|
162
|
+
- Are link targets and emphasis spans preserved?
|
|
163
|
+
- Does spacing across emphasis boundaries follow the same Chinese/Latin/numeral rule as ordinary prose?
|
|
164
|
+
- Are wrapper-tag lines inside section bodies escaped with one additional backslash?
|
|
165
|
+
|
|
166
|
+
**Faithfulness**
|
|
167
|
+
- Clause by clause, is anything added, dropped, weakened, strengthened, reversed, merged, or re-bounded? Are list item counts identical on both sides?
|
|
168
|
+
- Do actors, objects, conditions, exceptions, negation, modality, causal relationships, guarantees, contract directions, result channels, ownership changes, and quantities survive exactly?
|
|
169
|
+
|
|
170
|
+
**Tone & Style**
|
|
171
|
+
- Does every sentence read as if originally written by a native technical author?
|
|
172
|
+
- Is there any colloquial, casual, overly informal, promotional, or metaphorical phrasing?
|
|
173
|
+
- Are actors explicit where the target language needs them, without inventing responsibility?
|
|
174
|
+
|
|
175
|
+
**Sentence Structure**
|
|
176
|
+
- Are there run-on sentences that need breaking?
|
|
177
|
+
- Are there stiff passive constructions that can safely become active, or active constructions that invent an actor?
|
|
178
|
+
- Are conditions, concessions, negation, coordination, and modifiers scoped clearly?
|
|
179
|
+
|
|
180
|
+
**Word Choice**
|
|
181
|
+
- Are there overly literal translations that sound unnatural?
|
|
182
|
+
- Are ordinary prose words left untranslated despite an established target-language expression?
|
|
183
|
+
- Does each polysemous word fit its local context?
|
|
184
|
+
- Is the same target-language word used for distinct source concepts, or is a defined term varied merely to avoid repetition?
|
|
185
|
+
- Is any slang or internal jargon present?
|
|
186
|
+
|
|
187
|
+
**Terminology**
|
|
188
|
+
- For a Chinese target, are first-occurrence glosses correctly applied to the true first prose occurrence, neither missing nor repeated? For an English target, are Chinese glosses absent?
|
|
189
|
+
- Are any "不要译作" forbidden translations present?
|
|
190
|
+
- Do protected tokens remain untouched even when they resemble terminology entries?
|
|
191
|
+
- For an unlisted term, does a Chinese target use an established Chinese rendering or preserve the source term as pending when no reliable rendering is known, and does an English target use the established English technical term or preserve only an ambiguous source term with the shortest necessary gloss and a pending notice?
|
|
192
|
+
|
|
193
|
+
**Punctuation** (when target is Chinese)
|
|
194
|
+
- Are punctuation, mixed-script spacing, quotation marks, Latin letters, and digits in their required forms?
|
|
195
|
+
- Are there em dashes that make the sentence less clear and should be replaced, while natural em dashes remain intact?
|
|
196
|
+
- Are list-item endings grammatically consistent, with none ending in commas?
|
|
197
|
+
- Do RFC 2119 keywords preserve the source emphasis span and normative strength exactly?
|
|
198
|
+
|
|
199
|
+
Record actual corrections in `<review>`, then output the corrected complete document in `<final>`. If no correction or pending terminology notice is needed, write exactly `- 无修正` in `<review>` and copy `<translation>` unchanged into `<final>`. If `<review>` contains only pending terminology notices, copy `<translation>` unchanged into `<final>`.
|
|
200
|
+
|
|
201
|
+
## Examples
|
|
202
|
+
|
|
203
|
+
Below are representative examples of common problems and their corrections. Follow the "Good" versions within the rule each example illustrates; examples do not override source context or higher-priority requirements.
|
|
204
|
+
|
|
205
|
+
### Colloquial verb → Professional verb
|
|
206
|
+
- Source: `The repo pins pnpm@11.7.0 in package.json`
|
|
207
|
+
- Bad: `仓库在 package.json 中钉住 pnpm@11.7.0`
|
|
208
|
+
- Good: `该仓库在 package.json 中固定使用 pnpm@11.7.0`
|
|
209
|
+
|
|
210
|
+
### Run-on sentence → Natural phrasing with pause
|
|
211
|
+
- Source: `Read docs/architecture.md before changing anything under packages/.`
|
|
212
|
+
- Bad: `改动 packages/ 下的任何东西之前先读 docs/architecture.md。`
|
|
213
|
+
- Good: `在修改 packages/ 目录下的任何内容之前,请先阅读 docs/architecture.md。`
|
|
214
|
+
|
|
215
|
+
### Stiff passive voice → Active and natural
|
|
216
|
+
- Source: `a green gate means the pair was confirmed consistent at these exact contents, not that the confirmation was sound.`
|
|
217
|
+
- Bad: `门禁绿意味着这对文档曾在当前内容上被确认一致,不意味着这次确认本身是对的。`
|
|
218
|
+
- Good: `门禁通过意味着这组文档在当前内容上的一致性得到了确认,不代表确认本身正确可靠。`
|
|
219
|
+
|
|
220
|
+
### Invented word → Natural expression
|
|
221
|
+
- Source: `A sidecar record of both blob hashes makes consistency checkable`
|
|
222
|
+
- Bad: `旁挂记录两侧 blob hash,使一致性可检查`
|
|
223
|
+
- Good: `伴随记录保存两侧 blob hash,使一致性可检查`
|
|
224
|
+
|
|
225
|
+
### Em-dash → Colon/period
|
|
226
|
+
- Source: `FIXME — an issue that should block a new release. A release should not ship with an open FIXME unless reviewers explicitly agree the change can be merged anyway.`
|
|
227
|
+
- Bad: `FIXME——应当阻塞新版本发布的问题。除非评审者明确同意可以照常合入,发布不应带着未解决的 FIXME 出门。`
|
|
228
|
+
- Good: `FIXME:应当阻塞新版本发布的问题。除非评审者明确同意该更改可以合并,否则发布版本不应包含未解决的 FIXME。`
|
|
229
|
+
|
|
230
|
+
### Overly literal → Meaningful rendering
|
|
231
|
+
- Source: `awkward phrasing is easier to notice when you read the translation without comparing it with the source`
|
|
232
|
+
- Bad: `不把译文和原文比较时,尴尬的措辞更容易被注意`
|
|
233
|
+
- Good: `不对照原文阅读译文时,更容易察觉别扭的表达`
|
|
234
|
+
|
|
235
|
+
### Terminology — do not translate what should be kept in English
|
|
236
|
+
- Source: `typed service seams, and explicit extension points`
|
|
237
|
+
- Bad: `类型化的服务 seam(扩展点)与显式扩展点`
|
|
238
|
+
- Good: `类型化的服务 seam 与显式扩展点`
|
|
239
|
+
|
|
240
|
+
### Slang/jargon → Professional phrasing
|
|
241
|
+
- Source: `The committed agent workflow lives in .agents/skills/dsh-translate-docs`
|
|
242
|
+
- Bad: `进仓的 agent 工作流见 .agents/skills/dsh-translate-docs`
|
|
243
|
+
- Good: `仓库内置的 agent 工作流见 .agents/skills/dsh-translate-docs`
|
|
244
|
+
|
|
245
|
+
### "For humans" — translate the intent, not the word
|
|
246
|
+
- Source: `For humans, start with the development guide`
|
|
247
|
+
- Bad: `对于人工读者,请先从开发指南开始`("人工读者"生硬)
|
|
248
|
+
- Good: `面向开发者:请先阅读开发指南`("开发者"自然,且中文里冒号在此处更自然)
|
|
249
|
+
|
|
250
|
+
### Code block comments — NEVER translate
|
|
251
|
+
- Source code block contains: `# full-screen TUI coding agent (needs DEEPSEEK_API_KEY)`
|
|
252
|
+
- Bad: `# 全屏 TUI coding agent(需要 DEEPSEEK_API_KEY)`
|
|
253
|
+
- Good: `# full-screen TUI coding agent (needs DEEPSEEK_API_KEY)` (keep exactly as-is, byte-for-byte)
|
|
254
|
+
|
|
255
|
+
### Language switcher — flip direction
|
|
256
|
+
- Source file (English) has: `English | [中文](README.zh.md)`
|
|
257
|
+
- Bad (copying source unchanged): `English | [中文](README.zh.md)`
|
|
258
|
+
- Good (flipped for Chinese file): `[English](README.md) | 中文`
|
|
259
|
+
|
|
260
|
+
---
|
|
261
|
+
|
|
262
|
+
Now translate the following document:
|
|
263
|
+
````
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Translation rules
|
|
2
|
+
|
|
3
|
+
English | [中文](translation-rules.zh.md)
|
|
4
|
+
|
|
5
|
+
How to translate between the two sides of a documentation pair in this repo. Both languages carry equal authority ([README.md](README.md)): a change is authored in either language, and that side is the source for that update — these rules govern producing or updating the counterpart. They bind humans and agents equally. Routine agent work translates the changed content directly in one terminology-guided pass; the extended [.agents/skills/dsh-translate-docs](../../.agents/skills/dsh-translate-docs/SKILL.md) workflow runs only when the user explicitly invokes it. Rule levels follow RFC 2119 usage: **MUST** / **MUST NOT** are gate- or review-blocking; **SHOULD** needs a stated reason to deviate; **MAY** is discretionary.
|
|
6
|
+
|
|
7
|
+
## Faithfulness
|
|
8
|
+
|
|
9
|
+
- The counterpart *MUST* say what the authored side says — no added behavior, prerequisites, warnings, version claims, or examples, and no dropped ones. If the pair disagrees on substance, neither language wins by default: fix the side that is wrong, then bring the other along in the same change.
|
|
10
|
+
- The counterpart *SHOULD* read as natural technical writing in its own language, not word-by-word gloss. Translate meaning, restructure sentences where the target grammar wants it, and keep the author's register — terse stays terse.
|
|
11
|
+
- Do not translate the untranslatable: if a sentence resists natural rendering because it leans on an idiom of the source language, translate the idea, not the idiom.
|
|
12
|
+
|
|
13
|
+
## Voice
|
|
14
|
+
|
|
15
|
+
- The register is calibrated by [style-samples.md](style-samples.md) — human-approved gold pairs, one per document genre. The counterpart MUST match the target-language side of the nearest sample; where its voice and a prose voice rule disagree, the sample wins. Chinese targets use institutional technical Chinese; English targets use concise professional developer prose.
|
|
16
|
+
- Write as a native technical author restating the content, not as a translator transposing sentences, while preserving every source clause: nothing added, nothing dropped — fluency never justifies losing a clause.
|
|
17
|
+
- Give sentences an explicit actor when the target language would otherwise obscure it; for Chinese, replace vague passives or abstract subjects with the actual actor (系统、门禁、评审人).
|
|
18
|
+
- Prefer established target-language engineering idiom over calques (误报/漏检 for false positive/negative, 执行红线 for enforcement frontier); localize metaphors instead of transplanting them, and unpack noun chains where the target language requires it.
|
|
19
|
+
- Split long paragraphs by semantic unit — one idea per paragraph. Paragraph boundaries MAY differ from the source; the structural signature does not count paragraphs.
|
|
20
|
+
- When translating into Chinese, category nouns use Chinese with a first-mention English annotation (实操手册(cookbook)); when translating into English, use the conventional English category name. Literal directory or file references stay code-formatted English.
|
|
21
|
+
|
|
22
|
+
## Structure preservation
|
|
23
|
+
|
|
24
|
+
The pairing gate checks heading depths, fenced code blocks, table row and column counts, list kinds, ordered-list starts, list item counts, and link targets. Preserve the rest of the frame manually; the paired files MUST match one to one in:
|
|
25
|
+
|
|
26
|
+
- heading hierarchy (same levels, same order — heading TEXT is translated),
|
|
27
|
+
- list shape and numbering,
|
|
28
|
+
- tables (same columns, same row order; header cells translated per terminology),
|
|
29
|
+
- fenced code blocks — **byte-identical, including comments**; the pairing signature compares their info strings and contents, and ` ```ts ` blocks compile under `doc-typecheck`,
|
|
30
|
+
- inline code spans (commands, flags, config keys, file paths, event names, API names, version numbers) — verbatim, never translated or reformatted,
|
|
31
|
+
- links and anchors: every relative link MUST point at the same target in both files — by convention the `.md` path, not the `.zh.md` sibling — so links never dangle when one pair lands before its neighbors. The ONLY zh-specific link is the language switcher. A README rendered outside GitHub MAY use the canonical public repository URL to its exact counterpart as documented in [README.md](README.md). Link TEXT is translated; the target is not.
|
|
32
|
+
|
|
33
|
+
The repo's Markdown conventions apply to `.zh.md` files unchanged: one physical line per paragraph (`verify-md-wrap`), resolving relative links (`verify-md-links`), exactly one trailing newline.
|
|
34
|
+
|
|
35
|
+
## Terminology
|
|
36
|
+
|
|
37
|
+
- [terminology.md](terminology.md) is the source of truth in both directions. Before translating, load it; every listed term MUST follow its row and its "不要译作" prohibitions. A Chinese target uses the "中文" column and its "首次出现" annotation; an English target uses the "English" column without adding a Chinese gloss.
|
|
38
|
+
- For a Chinese target, an unlisted technical term MAY use an established rendering from a major Chinese-language OSS or vendor source (K8s/Vue/MDN Chinese docs, 微软简中风格指南, big-tech project docs), cited in the PR. Without such precedent it MUST stay in English and be listed under 「待定术语」(pending terms) with a suggested rendering.
|
|
39
|
+
- For an English target, use the established English technical term. If the source term has no unambiguous established equivalent, preserve it with a short explanatory gloss and list it under pending terms. Neither direction may invent a rendering inline; a decided term enters [terminology.md](terminology.md) in the same PR or a follow-up.
|
|
40
|
+
|
|
41
|
+
## Typography
|
|
42
|
+
|
|
43
|
+
These rules govern the Chinese side; the English side follows the repo's normal Markdown conventions (root `AGENTS.md`). The mixed-script rules below follow the cross-project consensus of the [MDN Simplified Chinese translation guide](https://github.com/mdn/translated-content/blob/main/docs/zh-cn/translation-guide.md), the [Kubernetes zh-cn localization guide](https://kubernetes.io/zh-cn/docs/contribute/localization_zh/), the [Vue.js Chinese translation conventions](https://github.com/vuejs-translations/docs-zh-cn/wiki/%E7%BF%BB%E8%AF%91%E9%A1%BB%E7%9F%A5), and [中文文案排版指北](https://github.com/sparanoid/chinese-copywriting-guidelines), which in turn ground in [W3C clreq](https://www.w3.org/TR/clreq/) and GB/T 15834—2011:
|
|
44
|
+
|
|
45
|
+
- MUST put one half-width space between Chinese text and Latin words, and between Chinese text and numerals: `每个 plugin 注册 3 个 tool`。No space between a full-width punctuation mark and anything.
|
|
46
|
+
- MUST use full-width (Chinese) punctuation in Chinese prose: `,。:;?!()「」`. Half-width punctuation stays inside code spans, inside complete English sentences quoted as-is, and in numbers (`3.5`, `1,024`).
|
|
47
|
+
- Chinese prose *SHOULD* prefer colons, periods, commas, or parentheses over em dashes. Keep an em dash only when no other punctuation preserves the sentence naturally.
|
|
48
|
+
- Enumeration commas: a Chinese list of parallel items uses 顿号(、), not commas.
|
|
49
|
+
- MUST NOT use full-width digits or full-width Latin letters — `123` never, `123` always.
|
|
50
|
+
- Proper nouns keep their canonical casing: GitHub, TypeScript, DeepSeek — never `github`/`Github` unless quoting code.
|
|
51
|
+
- Second person is 你, not 您 (matches the Vue and Kubernetes Chinese conventions and this repo's direct voice).
|
|
52
|
+
- Emphasis markers (`**bold**`, `*italic*`) stay on the same spans as the source; Chinese has no italics, so the rendered emphasis may look identical — do not substitute quotation marks or other decoration.
|
|
53
|
+
|
|
54
|
+
## Quality bar
|
|
55
|
+
|
|
56
|
+
- A pair is done when a bilingual engineer reading either file alone gets everything a reader of the other gets — same facts, same caveats, same tone — and nothing extra.
|
|
57
|
+
- Run `pnpm run verify-translation-pairing` and the rest of `doc-sync` for records, switchers, heading depths, code blocks, table row and column counts, list kinds, ordered-list starts, list item counts, links, and repository Markdown rules. Human review owns list and table order, noncanonical list numbering, inline code, emphasis, meaning, terminology, and tone.
|
|
58
|
+
|
|
59
|
+
## References
|
|
60
|
+
|
|
61
|
+
Authorities cited by these rules, for humans and agents who want the underlying reasoning:
|
|
62
|
+
|
|
63
|
+
- [中文文案排版指北](https://github.com/sparanoid/chinese-copywriting-guidelines) — the de-facto community standard for mixed CJK/Latin spacing and punctuation.
|
|
64
|
+
- [MDN zh-CN translation guide](https://github.com/mdn/translated-content/blob/main/docs/zh-cn/translation-guide.md) — an in-repo translation-rules file of the same shape as this one; spacing, punctuation, and glossary practice.
|
|
65
|
+
- [Kubernetes zh-cn localization guide](https://kubernetes.io/zh-cn/docs/contribute/localization_zh/) — terminology-first-occurrence and punctuation practice from the largest zh localization team.
|
|
66
|
+
- [Vue.js docs-zh-cn 翻译须知](https://github.com/vuejs-translations/docs-zh-cn/wiki/%E7%BF%BB%E8%AF%91%E9%A1%BB%E7%9F%A5) — per-term translate/keep decisions and tone.
|
|
67
|
+
- [zh-style-guide](https://zh-style-guide.readthedocs.io) — a community Chinese technical-writing style guide whose rule-level taxonomy (and RFC 2119 keyword levels) this file borrows; aggregates GB/T 15834/15835, clreq, and vendor guides.
|
|
68
|
+
- [W3C clreq](https://www.w3.org/TR/clreq/) and the [Microsoft Simplified Chinese style guide](https://learn.microsoft.com/en-us/globalization/reference/microsoft-style-guides) — the formal typographic and vendor-localization baselines.
|
|
69
|
+
- GB/T 19682-2005《翻译服务译文质量要求》 — the national standard whose three base requirements (忠实原文、术语统一、行文通顺) this file's Faithfulness and Terminology sections operationalize.
|