@aigne/doc-smith 0.8.10-beta → 0.8.10-beta.1

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.
Files changed (45) hide show
  1. package/.aigne/doc-smith/config.yaml +3 -1
  2. package/.aigne/doc-smith/preferences.yml +4 -4
  3. package/.aigne/doc-smith/upload-cache.yaml +180 -0
  4. package/.release-please-manifest.json +1 -1
  5. package/CHANGELOG.md +13 -0
  6. package/README.md +2 -2
  7. package/RELEASE.md +3 -3
  8. package/agents/generate/check-need-generate-structure.mjs +40 -18
  9. package/agents/generate/index.yaml +1 -0
  10. package/agents/generate/user-review-document-structure.mjs +168 -0
  11. package/agents/update/generate-and-translate-document.yaml +3 -3
  12. package/agents/utils/check-feedback-refiner.mjs +2 -0
  13. package/agents/utils/save-docs.mjs +16 -22
  14. package/aigne.yaml +1 -0
  15. package/docs/advanced-how-it-works.md +26 -24
  16. package/docs/advanced-how-it-works.zh.md +32 -30
  17. package/docs/advanced-quality-assurance.md +6 -9
  18. package/docs/advanced-quality-assurance.zh.md +19 -22
  19. package/docs/cli-reference.md +35 -76
  20. package/docs/cli-reference.zh.md +48 -89
  21. package/docs/configuration-interactive-setup.md +18 -18
  22. package/docs/configuration-interactive-setup.zh.md +33 -33
  23. package/docs/configuration-language-support.md +12 -12
  24. package/docs/configuration-language-support.zh.md +20 -20
  25. package/docs/configuration-llm-setup.md +14 -13
  26. package/docs/configuration-llm-setup.zh.md +16 -15
  27. package/docs/configuration-preferences.md +22 -27
  28. package/docs/configuration-preferences.zh.md +35 -40
  29. package/docs/configuration.md +31 -45
  30. package/docs/configuration.zh.md +48 -62
  31. package/docs/features-generate-documentation.md +6 -7
  32. package/docs/features-generate-documentation.zh.md +21 -22
  33. package/docs/features-publish-your-docs.md +38 -30
  34. package/docs/features-publish-your-docs.zh.md +45 -37
  35. package/docs/features-translate-documentation.md +14 -74
  36. package/docs/features-translate-documentation.zh.md +19 -79
  37. package/docs/features-update-and-refine.md +19 -18
  38. package/docs/features-update-and-refine.zh.md +33 -32
  39. package/docs-mcp/get-docs-structure.mjs +1 -1
  40. package/package.json +2 -2
  41. package/prompts/detail/document-rules.md +1 -1
  42. package/prompts/structure/check-document-structure.md +11 -15
  43. package/tests/agents/generate/check-need-generate-structure.test.mjs +21 -24
  44. package/tests/agents/generate/user-review-document-structure.test.mjs +294 -0
  45. package/utils/auth-utils.mjs +2 -2
@@ -1,8 +1,8 @@
1
1
  # CLI 命令参考
2
2
 
3
- 本指南为所有可用的 `aigne doc` 子命令及其参数和选项提供了参考。旨在帮助用户充分利用命令行界面。
3
+ 本指南为所有可用的 `aigne doc` 子命令及其参数和选项提供了参考。它旨在帮助希望充分利用命令行的用户。
4
4
 
5
- 通用语法如下:
5
+ 通用语法为:
6
6
 
7
7
  ```bash
8
8
  aigne doc <command> [options]
@@ -10,7 +10,7 @@ aigne doc <command> [options]
10
10
 
11
11
  ### 命令工作流
12
12
 
13
- 下图展示了使用 DocSmith CLI 命令创建和维护文档的典型生命周期:
13
+ 下图展示了使用 DocSmith CLI 命令创建和维护文档的典型生命周期:
14
14
 
15
15
  ```d2
16
16
  direction: down
@@ -54,11 +54,6 @@ End: {
54
54
  style.fill: "#a2eeaf"
55
55
  }
56
56
 
57
- prefs: {
58
- label: "aigne doc prefs\n(管理学习到的规则)"
59
- shape: cylinder
60
- }
61
-
62
57
  Start -> init: "可选" {
63
58
  style.stroke-dash: 4
64
59
  }
@@ -68,50 +63,44 @@ generate -> refinement-cycle: "优化"
68
63
  refinement-cycle -> publish: "就绪"
69
64
  generate -> publish: "直接部署"
70
65
  publish -> End
71
-
72
- prefs <-> generate: "影响" {
73
- style.stroke-dash: 2
74
- }
75
- prefs <-> refinement-cycle: "影响" {
76
- style.stroke-dash: 2
77
- }
78
66
  ```
79
67
 
80
68
  ---
81
69
 
82
70
  ## `aigne doc generate`
83
71
 
84
- **别名:** `gen`, `g`
85
-
86
72
  分析您的源代码,并根据您的配置生成一套完整的文档。如果未找到配置,它将自动启动交互式设置向导。
87
73
 
88
74
  ### 选项
89
75
 
90
- | Option | Type | Description |
91
- |---|---|---|
92
- | `--feedback` | string | 提供反馈以调整和优化整体文档结构规划。 |
93
- | `--forceRegenerate` | boolean | 丢弃现有内容,从头开始重新生成所有文档。 |
94
- | `--model` | string | 指定用于生成的特定 LLM(例如,`openai:gpt-4o`)。此选项将覆盖默认模型。 |
95
- | `--glossary` | string | 用于保持术语一致性的术语表文件路径。使用 `@path/to/glossary.md` 格式。 |
76
+ | Option | Type | Description |
77
+ | ------------------- | ------- | ------------------------------------------------------------------------------------------------------------- |
78
+ | `--feedback` | string | 提供反馈以调整和优化整体文档结构。 |
79
+ | `--forceRegenerate` | boolean | 丢弃现有内容并从头开始重新生成所有文档。 |
80
+ | `--model` | string | 指定用于生成的特定大语言模型(例如,`openai:gpt-4o`)。此选项将覆盖默认设置。 |
96
81
 
97
82
  ### 使用示例
98
83
 
99
- **首次生成或更新文档:**
84
+ **生成或更新文档:**
85
+
100
86
  ```bash
101
87
  aigne doc generate
102
88
  ```
103
89
 
104
90
  **强制完全重新生成所有文档:**
91
+
105
92
  ```bash
106
93
  aigne doc generate --forceRegenerate
107
94
  ```
108
95
 
109
96
  **通过反馈优化文档结构:**
97
+
110
98
  ```bash
111
- aigne doc generate --feedback " API 示例添加一个新部分,并删除‘关于’页面。"
99
+ aigne doc generate --feedback "Add a new section for API examples and remove the 'About' page."
112
100
  ```
113
101
 
114
- **使用 AIGNE Hub 中的特定模型进行生成:**
102
+ **使用 AIGNE Hub 中的特定模型生成:**
103
+
115
104
  ```bash
116
105
  aigne doc generate --model google:gemini-1.5-flash
117
106
  ```
@@ -120,132 +109,102 @@ aigne doc generate --model google:gemini-1.5-flash
120
109
 
121
110
  ## `aigne doc update`
122
111
 
123
- **别名:** `up`
124
-
125
- 优化并重新生成特定文档。您可以以交互方式运行以选择文档,或直接使用选项指定文档。此命令对于根据反馈进行有针对性的改进非常有用,无需重新生成整个项目。
112
+ 优化并重新生成特定文档。您可以以交互方式运行它来选择文档,或直接使用选项指定文档。这对于根据反馈进行有针对性的改进非常有用,而无需重新生成整个项目。
126
113
 
127
114
  ### 选项
128
115
 
129
- | Option | Type | Description |
130
- |---|---|---|
131
- | `--docs` | array | 要重新生成的文档路径列表(例如,`--docs overview.md`)。可多次使用。 |
132
- | `--feedback` | string | 提供具体反馈以改进所选文档的内容。 |
133
- | `--glossary` | string | 用于保持术语一致性的术语表文件路径。使用 `@path/to/glossary.md` 格式。 |
134
- | `--reset` | boolean | 忽略之前的结果,为所选文档从头开始重新生成内容。 |
116
+ | Option | Type | Description |
117
+ | ---------- | ----- | ------------------------------------------------------------------------------------------- |
118
+ | `--docs` | array | 要重新生成的文档路径列表。可多次使用。 |
119
+ | `--feedback` | string | 提供具体反馈以改进所选文档的内容。 |
135
120
 
136
121
  ### 使用示例
137
122
 
138
123
  **启动交互式会话以选择要更新的文档:**
124
+
139
125
  ```bash
140
126
  aigne doc update
141
127
  ```
142
128
 
143
- **使用针对性反馈更新特定文档:**
129
+ **使用有针对性的反馈更新特定文档:**
130
+
144
131
  ```bash
145
- aigne doc update --docs /cli-reference --feedback "阐明 --docs --langs 选项之间的区别。"
132
+ aigne doc update --docs overview.md --feedback "Add more detailed FAQ entries"
146
133
  ```
147
134
 
148
135
  ---
149
136
 
150
137
  ## `aigne doc translate`
151
138
 
152
- 将现有文档翻译成一种或多种语言。可以以交互方式运行以选择文档和语言,也可以通过参数指定以非交互方式运行。
139
+ 将现有文档翻译成一种或多种语言。可以以交互方式运行它来选择文档和语言,也可以通过将它们指定为参数以非交互方式运行。
153
140
 
154
141
  ### 选项
155
142
 
156
- | Option | Type | Description |
157
- |---|---|---|
158
- | `--docs` | array | 要翻译的文档路径列表。可多次使用。 |
159
- | `--langs` | array | 目标语言代码列表(例如,`zh`、`ja`、`es`)。可多次使用。 |
160
- | `--feedback` | string | 提供反馈以提高翻译质量。 |
161
- | `--glossary` | string | 用于确保跨语言术语一致性的术语表文件路径。使用 `@path/to/glossary.md`。 |
143
+ | Option | Type | Description |
144
+ | ------------ | ----- | ---------------------------------------------------------------------------------------------------------- |
145
+ | `--docs` | array | 要翻译的文档路径列表。可多次使用。 |
146
+ | `--langs` | array | 目标语言代码列表(例如,`zh`、`ja`)。可多次使用。 |
147
+ | `--feedback` | string | 提供反馈以提高翻译质量。 |
148
+ | `--glossary` | string | 词汇表文件的路径,以确保跨语言术语的一致性。使用 `@path/to/glossary.md`。 |
162
149
 
163
150
  ### 使用示例
164
151
 
165
152
  **启动交互式翻译会话:**
153
+
166
154
  ```bash
167
155
  aigne doc translate
168
156
  ```
169
157
 
170
158
  **将特定文档翻译成中文和日文:**
159
+
171
160
  ```bash
172
- aigne doc translate --docs overview.md --docs getting-started.md --langs zh --langs ja
161
+ aigne doc translate --langs zh --langs ja --docs examples.md --docs overview.md
173
162
  ```
174
163
 
175
- **结合使用术语表和反馈以获得更高质量的翻译:**
164
+ **使用词汇表和反馈进行翻译以获得更好的质量:**
165
+
176
166
  ```bash
177
- aigne doc translate --glossary @glossary.md --feedback "日语翻译请使用正式语言。"
167
+ aigne doc translate --glossary @glossary.md --feedback "Use technical terminology consistently"
178
168
  ```
179
169
 
180
170
  ---
181
171
 
182
172
  ## `aigne doc publish`
183
173
 
184
- **别名:** `pub`, `p`
185
-
186
- 将您生成的文档发布到 Discuss Kit 平台。您可以发布到官方的 AIGNE DocSmith 平台,也可以发布到您自己托管的实例。
174
+ 将您生成的文档发布到 Discuss Kit 平台。您可以发布到官方的 AIGNE DocSmith 平台或您自己托管的实例。
187
175
 
188
176
  ### 选项
189
177
 
190
- | Option | Type | Description |
191
- |---|---|---|
192
- | `--appUrl` | string | 您自托管的 Discuss Kit 实例的 URL。如果未提供,该命令将以交互方式运行。 |
178
+ | Option | Type | Description |
179
+ | ---------- | ------ | ---------------------------------------------------------------------------------------------------- |
180
+ | `--appUrl` | string | 您自行托管的 Discuss Kit 实例的 URL。如果未提供,该命令将以交互方式运行。 |
193
181
 
194
182
  ### 使用示例
195
183
 
196
184
  **启动交互式发布会话:**
185
+
197
186
  ```bash
198
187
  aigne doc publish
199
188
  ```
200
189
 
201
- **直接发布到自托管实例:**
190
+ **直接发布到自行托管的实例:**
191
+
202
192
  ```bash
203
- aigne doc publish --appUrl https://docs.my-company.com
193
+ aigne doc publish --appUrl https://your-discuss-kit-instance.com
204
194
  ```
205
195
 
206
196
  ---
207
197
 
208
198
  ## `aigne doc init`
209
199
 
210
- 手动启动交互式配置向导。这对于设置新项目或修改现有项目的配置非常有用。该向导将引导您定义源代码路径、设置输出目录、选择语言以及定义文档的风格和目标受众。
200
+ 手动启动交互式配置向导。这对于设置新项目或修改现有项目的配置非常有用。该向导会引导您定义源代码路径、设置输出目录、选择语言以及定义文档的风格和目标受众。
211
201
 
212
202
  ### 使用示例
213
203
 
214
204
  **启动设置向导:**
215
- ```bash
216
- aigne doc init
217
- ```
218
-
219
- ---
220
-
221
- ## `aigne doc prefs`
222
-
223
- 管理 DocSmith 随时间从您的反馈中学习到的用户偏好。这些偏好将在未来的生成和更新任务中作为规则应用,以保持与您的风格一致。
224
-
225
- ### 选项
226
-
227
- | Option | Type | Description |
228
- |---|---|---|
229
- | `--list` | boolean | 列出所有已保存的偏好,显示其状态(激活/未激活)、范围和内容。 |
230
- | `--remove` | boolean | 移除一个或多个偏好。如果未提供 `--id`,则以交互方式运行。 |
231
- | `--toggle` | boolean | 切换一个或多个偏好的激活状态。如果未提供 `--id`,则以交互方式运行。 |
232
- | `--id` | array | 为 `--remove` 或 `--toggle` 指定要操作的偏好 ID。可多次使用。 |
233
205
 
234
- ### 使用示例
235
-
236
- **列出所有已保存的偏好:**
237
- ```bash
238
- aigne doc prefs --list
239
- ```
240
-
241
- **以交互方式选择要移除的偏好:**
242
206
  ```bash
243
- aigne doc prefs --remove
244
- ```
245
-
246
- **通过 ID 切换特定偏好的状态:**
247
- ```bash
248
- aigne doc prefs --toggle --id <preference-id>
207
+ aigne doc init
249
208
  ```
250
209
 
251
- 有关如何根据您的需求定制 DocSmith 的更多详细信息,请参阅[配置指南](./configuration.md)。
210
+ 有关如何根据您的需求定制 DocSmith 的更多详细信息,请参阅[配置指南](./configuration.md)。
@@ -1,33 +1,33 @@
1
1
  # Interactive Setup
2
2
 
3
- To simplify project configuration, AIGNE DocSmith provides an interactive setup wizard launched with the `aigne doc init` command. This guided process asks a series of questions about your documentation goals and generates a `config.yaml` file based on your answers. It is the recommended way to start a new documentation project, as it helps prevent configuration errors and provides specific recommendations.
3
+ AIGNE DocSmith includes an interactive setup wizard, launched with the `aigne doc init` command, to streamline project configuration. This guided process asks a series of questions about your documentation goals and generates a `config.yaml` file from your answers. It is the recommended method for starting a new documentation project, as it helps prevent configuration errors and provides specific recommendations based on your inputs.
4
4
 
5
5
  ## Running the Wizard
6
6
 
7
- To begin, run the following command in your project's root directory:
7
+ To start the process, run the following command in the root directory of your project:
8
8
 
9
9
  ```bash aigne doc init icon=lucide:sparkles
10
10
  npx aigne doc init
11
11
  ```
12
12
 
13
- The wizard will then guide you through an 8-step process to configure your documentation.
13
+ The wizard will then walk you through an 8-step process to configure your documentation.
14
14
 
15
15
  ## The Guided Process
16
16
 
17
- The wizard covers the following key areas:
17
+ The wizard prompts for the following key configuration details:
18
18
 
19
- 1. **Primary Goal**: Defines the main outcome for your readers (e.g., getting started quickly, finding answers fast).
20
- 2. **Target Audience**: Specifies who will be reading the documentation (e.g., non-technical end-users, developers).
19
+ 1. **Primary Goal**: Defines the main purpose for your readers (e.g., getting started, finding answers).
20
+ 2. **Target Audience**: Specifies the primary readers of the documentation (e.g., non-technical end-users, developers).
21
21
  3. **Reader Knowledge Level**: Assesses the typical starting knowledge of your audience.
22
- 4. **Documentation Depth**: Determines how comprehensive the content should be.
22
+ 4. **Documentation Depth**: Determines the level of detail and scope of the content.
23
23
  5. **Primary Language**: Sets the main language for the documentation.
24
24
  6. **Translation Languages**: Selects additional languages for translation.
25
- 7. **Output Directory**: Specifies where to save the generated documentation files.
25
+ 7. **Output Directory**: Specifies the location for the generated documentation files.
26
26
  8. **Source Code Paths**: Defines which files and directories to analyze, with support for glob patterns.
27
27
 
28
28
  ## Assisted Configuration
29
29
 
30
- The wizard includes built-in logic to help you create a more effective and coherent configuration.
30
+ The wizard uses a set of predefined rules to help you create a coherent and effective configuration.
31
31
 
32
32
  ```d2
33
33
  direction: down
@@ -38,12 +38,12 @@ User-Selections: {
38
38
  }
39
39
 
40
40
  Wizard-Engine: {
41
- label: "2. Wizard's Logic Engine"
41
+ label: "2. Wizard's Rule Engine"
42
42
  shape: rectangle
43
43
  grid-columns: 2
44
44
 
45
45
  Filtering: {
46
- label: "Option Filtering\n(Prevents invalid combos)"
46
+ label: "Option Filtering\n(Prevents incompatible selections)"
47
47
  }
48
48
 
49
49
  Conflict-Detection: {
@@ -70,27 +70,27 @@ Guided-Experience -> User-Selections: "Refines"
70
70
 
71
71
  ### Default Suggestions and Option Filtering
72
72
 
73
- As you answer questions, the wizard provides defaults and filters subsequent options to guide you toward a logical configuration. For instance:
73
+ As you make selections, the wizard provides defaults and filters subsequent options to guide you toward a logical configuration. This is based on a set of cross-question conflict rules.
74
74
 
75
75
  - **Default Suggestions**: If you select "Get started quickly" as your primary goal, the wizard will recommend "Is a total beginner" as the reader's knowledge level.
76
- - **Real-time Filtering**: If your target audience is "End users (non-technical)," the wizard will hide technically advanced knowledge levels like "Is an expert trying to do something specific" to prevent incompatible selections.
76
+ - **Real-time Filtering**: If your target audience is "End users (non-technical)," the wizard will hide the "Is an expert" knowledge level. The rule's reasoning is that non-technical users are typically not experienced technical users, thus preventing an incompatible selection.
77
77
 
78
78
  ### Conflict Detection and Resolution
79
79
 
80
- Sometimes, you may have multiple goals or audiences that seem to conflict, such as creating documentation for both non-technical **End Users** and expert **Developers**. The wizard identifies these as "resolvable conflicts."
80
+ In some cases, you may have multiple goals or audiences that require a specific documentation structure to be effective, such as creating documentation for both non-technical **End Users** and expert **Developers**. The wizard identifies these as "resolvable conflicts."
81
81
 
82
- It then formulates a strategy to address these diverse needs within the documentation's structure. For the End User vs. Developer example, the resolution strategy is to create separate user paths:
82
+ It then formulates a strategy to address these needs within the document structure. For the End User vs. Developer example, the resolution strategy is to create separate user paths:
83
83
 
84
84
  - **User Guide Path**: Uses plain language, focuses on UI interactions, and is oriented toward business outcomes.
85
85
  - **Developer Guide Path**: Is code-first, technically precise, and includes SDK examples and configuration snippets.
86
86
 
87
- This approach ensures that the final documentation is structured to serve multiple audiences effectively, rather than creating a confusing mix of content.
87
+ This approach ensures the final documentation is structured to serve multiple audiences effectively, rather than creating a single, confusing mix of content.
88
88
 
89
89
  ## Generated Output
90
90
 
91
- Upon completion, the wizard saves a `config.yaml` file in your project. This file is fully commented, explaining each option and listing all available choices, making it easy to review and modify manually later.
91
+ After you complete the wizard, it saves a `config.yaml` file in your project. This file is fully commented, explaining each option and listing all available choices, which makes it easy to review and modify manually later.
92
92
 
93
- Here is a snippet of what the generated file looks like:
93
+ Here is a snippet of a generated file:
94
94
 
95
95
  ```yaml config.yaml icon=logos:yaml
96
96
  # Project information for documentation publishing
@@ -1,33 +1,33 @@
1
1
  # 交互式设置
2
2
 
3
- 为简化项目配置,AIGNE DocSmith 提供了一个交互式设置向导,可通过 `aigne doc init` 命令启动。该引导式流程会询问一系列关于文档目标的问题,并根据您的回答生成一个 `config.yaml` 文件。这是开始新文档项目的推荐方式,因为它有助于防止配置错误并提供具体建议。
3
+ AIGNE DocSmith 包含一个交互式设置向导,通过 `aigne doc init` 命令启动,以简化项目配置。该引导过程会询问一系列关于你的文档目标的问题,并根据你的回答生成一个 `config.yaml` 文件。这是启动新文档项目的推荐方法,因为它有助于防止配置错误,并根据你的输入提供具体建议。
4
4
 
5
5
  ## 运行向导
6
6
 
7
- 首先,在您项目的根目录中运行以下命令:
7
+ 要开始此过程,请在项目的根目录中运行以下命令:
8
8
 
9
9
  ```bash aigne doc init icon=lucide:sparkles
10
10
  npx aigne doc init
11
11
  ```
12
12
 
13
- 然后,向导将引导您完成一个 8 步流程来配置您的文档。
13
+ 然后,向导将引导你完成一个 8 步流程来配置文档。
14
14
 
15
- ## 引导式流程
15
+ ## 引导流程
16
16
 
17
- 向导涵盖以下关键领域:
17
+ 向导会提示输入以下关键配置细节:
18
18
 
19
- 1. **主要目标**:定义读者的主要预期成果(例如,快速入门、快速找到答案)。
20
- 2. **目标受众**:明确文档的阅读对象(例如,非技术最终用户、开发者)。
19
+ 1. **主要目标**:定义读者的主要目的(例如,入门、寻找答案)。
20
+ 2. **目标受众**:指明文档的主要读者(例如,非技术最终用户、开发者)。
21
21
  3. **读者知识水平**:评估受众的典型初始知识水平。
22
- 4. **文档深度**:决定内容的详尽程度。
22
+ 4. **文档深度**:确定内容的详细程度和范围。
23
23
  5. **主要语言**:设置文档的主要语言。
24
- 6. **翻译语言**:选择用于翻译的其他语言。
25
- 7. **输出目录**:指定保存生成的文档文件的位置。
24
+ 6. **翻译语言**:选择其他需要翻译的语言。
25
+ 7. **输出目录**:指定生成文档文件的位置。
26
26
  8. **源代码路径**:定义要分析的文件和目录,支持 glob 模式。
27
27
 
28
28
  ## 辅助配置
29
29
 
30
- 该向导包含内置逻辑,可帮助您创建更有效、更一致的配置。
30
+ 向导使用一套预定义规则来帮助你创建一致且有效的配置。
31
31
 
32
32
  ```d2
33
33
  direction: down
@@ -38,12 +38,12 @@ User-Selections: {
38
38
  }
39
39
 
40
40
  Wizard-Engine: {
41
- label: "2. 向导的逻辑引擎"
41
+ label: "2. 向导的规则引擎"
42
42
  shape: rectangle
43
43
  grid-columns: 2
44
44
 
45
45
  Filtering: {
46
- label: "选项过滤\n(防止无效组合)"
46
+ label: "选项筛选\n(防止不兼容的选择)"
47
47
  }
48
48
 
49
49
  Conflict-Detection: {
@@ -59,61 +59,61 @@ Guided-Experience: {
59
59
 
60
60
  Final-Config: {
61
61
  label: "4. 最终配置"
62
- content: "config.yaml 根据\n冲突解决策略生成"
62
+ content: "config.yaml 生成时\n包含冲突解决策略"
63
63
  }
64
64
 
65
65
  User-Selections -> Wizard-Engine
66
66
  Wizard-Engine.Filtering -> Guided-Experience
67
67
  Wizard-Engine.Conflict-Detection -> Final-Config
68
- Guided-Experience -> User-Selections: "优化"
68
+ Guided-Experience -> User-Selections: "完善"
69
69
  ```
70
70
 
71
- ### 默认建议和选项过滤
71
+ ### 默认建议和选项筛选
72
72
 
73
- 在您回答问题时,向导会提供默认值并筛选后续选项,以引导您进行逻辑配置。例如:
73
+ 在你进行选择时,向导会提供默认值并筛选后续选项,以引导你进行逻辑配置。这是基于一套跨问题冲突规则。
74
74
 
75
- - **默认建议**:如果您选择“快速入门”作为主要目标,向导将推荐“完全是初学者”作为读者的知识水平。
76
- - **实时过滤**:如果您的目标受众是“最终用户(非技术人员)”,向导将隐藏“试图做特定事情的专家”等技术高级知识水平,以防止不兼容的选择。
75
+ - **默认建议**:如果你选择“快速入门”作为主要目标,向导将推荐“完全是初学者”作为读者的知识水平。
76
+ - **实时筛选**:如果你的目标受众是“最终用户(非技术人员)”,向导将隐藏“是专家”这一知识水平选项。该规则的理由是,非技术用户通常不是经验丰富的技术用户,从而防止不兼容的选择。
77
77
 
78
78
  ### 冲突检测与解决
79
79
 
80
- 有时,您可能有多个似乎相互冲突的目标或受众,例如同时为非技术的**最终用户**和专业的**开发者**创建文档。向导会将这些识别为“可解决的冲突”。
80
+ 在某些情况下,你可能有多个目标或受众,需要特定的文档结构才能有效,例如为非技术的 **最终用户** 和专业的 **开发者** 创建文档。向导将这些识别为“可解决的冲突”。
81
81
 
82
- 然后,它会制定一个策略,在文档结构中解决这些多样化的需求。对于最终用户与开发者的例子,解决方法是创建独立的用户路径:
82
+ 然后,它会制定一个策略来解决文档结构中的这些需求。对于最终用户与开发者的例子,解决策略是创建独立的用户路径:
83
83
 
84
- - **用户指南路径**:使用通俗易懂的语言,侧重于 UI 交互,并面向业务成果。
84
+ - **用户指南路径**:使用通俗易懂的语言,侧重于 UI 交互,并以业务成果为导向。
85
85
  - **开发者指南路径**:代码优先,技术上精确,并包含 SDK 示例和配置片段。
86
86
 
87
- 这种方法可确保最终的文档结构能够有效地服务于多个受众,而不是产生令人困惑的内容混合。
87
+ 这种方法确保最终的文档结构能够有效地服务于多个受众,而不是创建一个单一、混乱的内容混合体。
88
88
 
89
- ## 生成的输出
89
+ ## 生成输出
90
90
 
91
- 完成后,向导会在您的项目中保存一个 `config.yaml` 文件。该文件带有完整的注释,解释了每个选项并列出了所有可用选择,方便日后手动审查和修改。
91
+ 完成向导后,它会在你的项目中保存一个 `config.yaml` 文件。该文件带有完整的注释,解释了每个选项并列出了所有可用选择,这使得以后手动审查和修改变得容易。
92
92
 
93
- 以下是生成文件的片段示例:
93
+ 以下是生成文件的片段:
94
94
 
95
95
  ```yaml config.yaml icon=logos:yaml
96
96
  # 用于文档发布的项目信息
97
97
  projectName: your-project-name
98
- projectDesc: 您的项目描述。
98
+ projectDesc: 你的项目描述。
99
99
  projectLogo: ""
100
100
 
101
101
  # =============================================================================
102
102
  # 文档配置
103
103
  # =============================================================================
104
104
 
105
- # 目的:您希望读者达到的主要成果是什么?
105
+ # 目的:你希望读者实现的主要成果是什么?
106
106
  # 可用选项(根据需要取消注释并修改):
107
107
  # getStarted - 快速入门:帮助新用户在 30 分钟内从零开始上手
108
- # completeTasks - 完成特定任务:引导用户完成常见的工作流程和用例
108
+ # completeTasks - 完成特定任务:引导用户了解常见工作流程和用例
109
109
  documentPurpose:
110
110
  - completeTasks
111
111
  - findAnswers
112
112
 
113
- # 目标受众:谁会最常阅读这份文档?
113
+ # 目标受众:谁会最常阅读本文档?
114
114
  # 可用选项(根据需要取消注释并修改):
115
115
  # endUsers - 最终用户(非技术人员):使用产品但不编写代码的人
116
- # developers - 开发者(集成您的产品/API):将此添加到其项目中的工程师
116
+ # developers - 集成你的产品/API 的开发者:将此产品添加到其项目中的工程师
117
117
  targetAudienceTypes:
118
118
  - endUsers
119
119
  - developers
@@ -123,11 +123,11 @@ targetAudienceTypes:
123
123
 
124
124
  ## 后续步骤
125
125
 
126
- 配置文件就绪后,您就可以生成、翻译或发布您的文档了。
126
+ 配置文件就绪后,你就可以生成、翻译或发布文档了。
127
127
 
128
128
  <x-cards>
129
129
  <x-card data-title="生成文档" data-icon="lucide:play-circle" data-href="/features/generate-documentation">
130
- 了解如何使用单个命令从您的源代码自动创建一套完整的文档。
130
+ 了解如何使用单个命令从源代码自动创建一套完整的文档。
131
131
  </x-card>
132
132
  <x-card data-title="配置指南" data-icon="lucide:settings" data-href="/configuration">
133
133
  深入了解所有可用设置,并学习如何手动微调 config.yaml 文件。
@@ -1,8 +1,8 @@
1
1
  # Language Support
2
2
 
3
- AIGNE DocSmith provides automated translation for 12 languages, allowing you to generate and maintain documentation for a global audience. The entire process is handled by the `aigne doc translate` command, which uses an AI engine to process your source documents and create localized versions.
3
+ AIGNE DocSmith uses AI to provide automated documentation translation into 12 languages. This allows you to generate and maintain documentation for a global audience using the `aigne doc translate` command.
4
4
 
5
- The translation workflow processes your source documents through the AIGNE AI engine to generate localized versions in your selected target languages.
5
+ The translation workflow processes your source documents through an AI engine to generate localized versions in your selected target languages.
6
6
 
7
7
  ```d2
8
8
  direction: down
@@ -55,25 +55,25 @@ DocSmith offers AI-powered translations for the following languages. You can def
55
55
 
56
56
  ## How to Configure and Use Translation
57
57
 
58
- Translation languages are set when you initialize your project with `aigne doc init`. You can add new languages or translate documents at any time using the `aigne doc translate` command, which offers two modes of operation.
58
+ Translation languages are set when you initialize your project with `aigne doc init`. You can add new languages or translate documents at any time using the `aigne doc translate` command, which has two modes of operation.
59
59
 
60
- ### Interactive Mode
60
+ ### Interactive Mode for Guided Translation
61
61
 
62
- For a guided experience, run the command without any arguments. This is the recommended approach for most users.
62
+ For a step-by-step guided experience, run the command without any arguments. This is the recommended approach for most users.
63
63
 
64
64
  ```bash Interactive Translation icon=lucide:wand
65
65
  aigne doc translate
66
66
  ```
67
67
 
68
- The interactive mode will then prompt you to:
68
+ The interactive mode will then present a series of prompts that allow you to:
69
69
 
70
- - Select which of your existing documents to translate.
71
- - Choose one or more target languages from the supported list.
72
- - Add new translation languages to your project's configuration if they are not already included.
70
+ 1. Select which of your existing documents to translate from a list.
71
+ 2. Choose one or more target languages from the supported list.
72
+ 3. Add new translation languages to your project's configuration if they are not already included.
73
73
 
74
- ### Command-Line Arguments
74
+ ### Command-Line Arguments for Automation
75
75
 
76
- For direct control or for use in automated scripts (like CI/CD pipelines), you can specify documents and languages directly as command-line arguments.
76
+ For direct control or for use in automated scripts, you can specify documents and languages directly as command-line arguments. This is ideal for developers and CI/CD pipelines.
77
77
 
78
78
  ```bash Command Example icon=lucide:terminal
79
79
  # Translate overview.md and examples.md into Chinese and Japanese
@@ -91,4 +91,4 @@ Key parameters for the command include:
91
91
 
92
92
  ---
93
93
 
94
- This section covers the available languages and how to enable them. For a complete guide on the translation workflow, including advanced options and best practices, see the [Translate Documentation](./features-translate-documentation.md) guide.
94
+ This section covers the available languages and how to enable them. For a complete guide on the translation workflow, see the [Translate Documentation](./features-translate-documentation.md) guide.
@@ -1,8 +1,8 @@
1
1
  # 语言支持
2
2
 
3
- AIGNE DocSmith 提供 12 种语言的自动翻译功能,让你能够为全球用户生成和维护文档。整个过程由 `aigne doc translate` 命令处理,该命令使用 AI 引擎处理你的源文档并创建本地化版本。
3
+ AIGNE DocSmith 使用 AI 提供 12 种语言的自动化文档翻译。这使您可以使用 `aigne doc translate` 命令为全球用户生成和维护文档。
4
4
 
5
- 翻译工作流通过 AIGNE AI 引擎处理你的源文档,以在你选择的目标语言中生成本地化版本。
5
+ 翻译工作流通过 AI 引擎处理您的源文档,以生成您所选目标语言的本地化版本。
6
6
 
7
7
  ```d2
8
8
  direction: down
@@ -18,7 +18,7 @@ AI-Engine: {
18
18
  }
19
19
 
20
20
  Translated-Docs: {
21
- label: "翻译后文档"
21
+ label: "翻译后的文档"
22
22
  shape: rectangle
23
23
  grid-columns: 3
24
24
 
@@ -36,11 +36,11 @@ AI-Engine -> Translated-Docs: "生成"
36
36
 
37
37
  ## 支持的语言
38
38
 
39
- DocSmith 为以下语言提供 AI 翻译功能。你可以在初始设置期间定义项目的主要语言,并选择任意数量的目标语言进行翻译。
39
+ DocSmith 为以下语言提供 AI 翻译。您可以在初始设置期间定义项目的主要语言,并选择任意数量的目标语言进行翻译。
40
40
 
41
41
  | 语言 | 语言代码 | 示例文本 |
42
42
  |---|---|---|
43
- | 英语 | `en` | Hello |
43
+ | English | `en` | Hello |
44
44
  | 简体中文 | `zh` | 你好 |
45
45
  | 繁體中文 | `zh-TW` | 你好 |
46
46
  | 日本語 | `ja` | こんにちは |
@@ -53,27 +53,27 @@ DocSmith 为以下语言提供 AI 翻译功能。你可以在初始设置期间
53
53
  | Italiano | `it` | Ciao |
54
54
  | العربية | `ar` | مرحبا |
55
55
 
56
- ## 如何配置和使用翻译功能
56
+ ## 如何配置和使用翻译
57
57
 
58
- 翻译语言在你使用 `aigne doc init` 初始化项目时设置。你可以随时使用 `aigne doc translate` 命令添加新语言或翻译文档,该命令提供两种操作模式。
58
+ 翻译语言在您使用 `aigne doc init` 初始化项目时设置。您可以随时使用 `aigne doc translate` 命令添加新语言或翻译文档,该命令有两种操作模式。
59
59
 
60
- ### 交互模式
60
+ ### 用于引导式翻译的交互模式
61
61
 
62
- 如需引导式体验,请在不带任何参数的情况下运行该命令。这是为大多数用户推荐的方法。
62
+ 要获得分步指导体验,请在不带任何参数的情况下运行该命令。这是推荐给大多数用户的方法。
63
63
 
64
64
  ```bash Interactive Translation icon=lucide:wand
65
65
  aigne doc translate
66
66
  ```
67
67
 
68
- 交互模式将提示你:
68
+ 然后,交互模式将显示一系列提示,允许您:
69
69
 
70
- - 选择要翻译的现有文档。
71
- - 从支持的语言列表中选择一个或多个目标语言。
72
- - 如果项目中尚未包含新的翻译语言,则将其添加到项目配置中。
70
+ 1. 从列表中选择要翻译的现有文档。
71
+ 2. 从支持的列表中选择一个或多个目标语言。
72
+ 3. 如果项目中尚未包含新的翻译语言,则将其添加到项目配置中。
73
73
 
74
- ### 命令行参数
74
+ ### 用于自动化的命令行参数
75
75
 
76
- 为了直接控制或在自动化脚本(如 CI/CD 流水线)中使用,你可以直接将文档和语言指定为命令行参数。
76
+ 为了直接控制或在自动化脚本中使用,您可以直接将文档和语言指定为命令行参数。这对于开发人员和 CI/CD 流水线非常理想。
77
77
 
78
78
  ```bash Command Example icon=lucide:terminal
79
79
  # 将 overview.md 和 examples.md 翻译成中文和日文
@@ -84,11 +84,11 @@ aigne doc translate --langs zh --langs ja --docs overview.md --docs examples.md
84
84
 
85
85
  | 参数 | 描述 |
86
86
  |---|---|
87
- | `--langs` | 指定目标语言代码。该标志可以多次使用以选择多种语言。 |
88
- | `--docs` | 指定要翻译的文档路径(例如 `overview.md`)。该标志也可以多次使用。 |
89
- | `--feedback` | 提供具体指令以指导翻译模型(例如,`"Use a formal tone"`)。 |
90
- | `--glossary` | 使用自定义术语表文件(例如 `@path/to/glossary.md`)以确保项目特定术语的翻译一致性。 |
87
+ | `--langs` | 指定目标语言代码。此标志可多次使用以选择多种语言。 |
88
+ | `--docs` | 指定要翻译的文档路径(例如 `overview.md`)。此标志也可以多次使用。 |
89
+ | `--feedback` | 提供具体说明以指导翻译模型(例如 `"Use a formal tone"`)。 |
90
+ | `--glossary` | 使用自定义术语表文件(例如 `@path/to/glossary.md`)以确保项目特定术语的翻译一致。 |
91
91
 
92
92
  ---
93
93
 
94
- 本节介绍了可用语言以及如何启用它们。有关翻译工作流的完整指南,包括高级选项和最佳实践,请参阅[翻译文档](./features-translate-documentation.md)指南。
94
+ 本节介绍了可用的语言以及如何启用它们。有关翻译工作流的完整指南,请参阅[翻译文档](./features-translate-documentation.md)指南。