@aigne/doc-smith 0.8.11-beta.5 → 0.8.11-beta.7
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/.aigne/doc-smith/config.yaml +3 -1
- package/.aigne/doc-smith/output/structure-plan.json +2 -2
- package/.aigne/doc-smith/preferences.yml +28 -20
- package/.aigne/doc-smith/upload-cache.yaml +702 -0
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +22 -2
- package/README.md +2 -2
- package/agents/clear/choose-contents.mjs +2 -2
- package/agents/clear/clear-document-structure.mjs +8 -8
- package/agents/clear/index.yaml +1 -1
- package/agents/evaluate/document-structure.yaml +1 -1
- package/agents/generate/check-document-structure.yaml +3 -3
- package/agents/generate/check-need-generate-structure.mjs +8 -8
- package/agents/generate/document-structure-tools/add-document.mjs +38 -13
- package/agents/generate/document-structure-tools/delete-document.mjs +37 -14
- package/agents/generate/document-structure-tools/move-document.mjs +46 -19
- package/agents/generate/document-structure-tools/update-document.mjs +39 -12
- package/agents/generate/generate-structure.yaml +1 -1
- package/agents/generate/update-document-structure.yaml +3 -9
- package/agents/generate/user-review-document-structure.mjs +15 -14
- package/agents/translate/translate-document.yaml +1 -9
- package/agents/update/batch-generate-document.yaml +1 -1
- package/agents/update/check-document.mjs +2 -2
- package/agents/update/check-update-is-single.mjs +2 -1
- package/agents/update/document-tools/update-document-content.mjs +24 -14
- package/agents/update/fs-tools/glob.mjs +184 -0
- package/agents/update/fs-tools/grep.mjs +317 -0
- package/agents/update/fs-tools/read-file.mjs +307 -0
- package/agents/update/generate-document.yaml +4 -7
- package/agents/update/update-document-detail.yaml +6 -10
- package/agents/update/user-review-document.mjs +13 -13
- package/agents/utils/check-feedback-refiner.mjs +1 -1
- package/agents/utils/choose-docs.mjs +1 -1
- package/agents/utils/load-document-all-content.mjs +3 -3
- package/agents/utils/load-sources.mjs +1 -1
- package/agents/utils/save-docs.mjs +7 -28
- package/aigne.yaml +2 -2
- package/assets/screenshots/doc-complete-setup.png +0 -0
- package/assets/screenshots/doc-generate-docs.png +0 -0
- package/assets/screenshots/doc-generate.png +0 -0
- package/assets/screenshots/doc-generated-successfully.png +0 -0
- package/assets/screenshots/doc-publish.png +0 -0
- package/assets/screenshots/doc-regenerate.png +0 -0
- package/assets/screenshots/doc-translate-langs.png +0 -0
- package/assets/screenshots/doc-translate.png +0 -0
- package/assets/screenshots/doc-update.png +0 -0
- package/docs/_sidebar.md +1 -1
- package/docs/advanced-how-it-works.ja.md +31 -31
- package/docs/advanced-how-it-works.md +10 -10
- package/docs/advanced-how-it-works.zh-TW.md +24 -24
- package/docs/advanced-how-it-works.zh.md +20 -20
- package/docs/advanced-quality-assurance.ja.md +57 -61
- package/docs/advanced-quality-assurance.md +57 -61
- package/docs/advanced-quality-assurance.zh-TW.md +57 -61
- package/docs/advanced-quality-assurance.zh.md +57 -61
- package/docs/advanced.ja.md +8 -4
- package/docs/advanced.md +7 -3
- package/docs/advanced.zh-TW.md +9 -5
- package/docs/advanced.zh.md +9 -5
- package/docs/changelog.ja.md +206 -29
- package/docs/changelog.md +177 -0
- package/docs/changelog.zh-TW.md +229 -52
- package/docs/changelog.zh.md +204 -27
- package/docs/cli-reference.ja.md +181 -80
- package/docs/cli-reference.md +168 -67
- package/docs/cli-reference.zh-TW.md +177 -76
- package/docs/cli-reference.zh.md +172 -71
- package/docs/configuration-interactive-setup.ja.md +45 -42
- package/docs/configuration-interactive-setup.md +9 -6
- package/docs/configuration-interactive-setup.zh-TW.md +26 -23
- package/docs/configuration-interactive-setup.zh.md +25 -22
- package/docs/configuration-language-support.ja.md +33 -63
- package/docs/configuration-language-support.md +32 -62
- package/docs/configuration-language-support.zh-TW.md +35 -65
- package/docs/configuration-language-support.zh.md +32 -62
- package/docs/configuration-llm-setup.ja.md +25 -23
- package/docs/configuration-llm-setup.md +20 -18
- package/docs/configuration-llm-setup.zh-TW.md +21 -19
- package/docs/configuration-llm-setup.zh.md +20 -18
- package/docs/configuration-preferences.ja.md +67 -52
- package/docs/configuration-preferences.md +55 -40
- package/docs/configuration-preferences.zh-TW.md +69 -54
- package/docs/configuration-preferences.zh.md +68 -53
- package/docs/configuration.ja.md +98 -58
- package/docs/configuration.md +42 -2
- package/docs/configuration.zh-TW.md +86 -46
- package/docs/configuration.zh.md +76 -36
- package/docs/features-generate-documentation.ja.md +49 -55
- package/docs/features-generate-documentation.md +49 -55
- package/docs/features-generate-documentation.zh-TW.md +54 -60
- package/docs/features-generate-documentation.zh.md +48 -54
- package/docs/features-publish-your-docs.ja.md +68 -45
- package/docs/features-publish-your-docs.md +65 -42
- package/docs/features-publish-your-docs.zh-TW.md +74 -51
- package/docs/features-publish-your-docs.zh.md +67 -44
- package/docs/features-translate-documentation.ja.md +46 -35
- package/docs/features-translate-documentation.md +39 -28
- package/docs/features-translate-documentation.zh-TW.md +45 -34
- package/docs/features-translate-documentation.zh.md +39 -28
- package/docs/features-update-and-refine.ja.md +75 -71
- package/docs/features-update-and-refine.md +67 -63
- package/docs/features-update-and-refine.zh-TW.md +72 -67
- package/docs/features-update-and-refine.zh.md +71 -67
- package/docs/features.ja.md +29 -19
- package/docs/features.md +25 -15
- package/docs/features.zh-TW.md +28 -18
- package/docs/features.zh.md +31 -21
- package/docs/getting-started.ja.md +43 -46
- package/docs/getting-started.md +36 -39
- package/docs/getting-started.zh-TW.md +41 -44
- package/docs/getting-started.zh.md +39 -42
- package/docs/overview.ja.md +63 -11
- package/docs/overview.md +62 -10
- package/docs/overview.zh-TW.md +67 -15
- package/docs/overview.zh.md +62 -10
- package/docs-mcp/analyze-docs-relevance.yaml +6 -6
- package/docs-mcp/docs-search.yaml +1 -1
- package/media.md +9 -9
- package/package.json +2 -2
- package/prompts/common/document-structure/conflict-resolution-guidance.md +3 -3
- package/prompts/common/document-structure/document-structure-rules.md +2 -2
- package/prompts/detail/custom/custom-components.md +304 -188
- package/prompts/detail/document-rules.md +5 -5
- package/prompts/detail/generate-document.md +21 -8
- package/prompts/detail/update-document.md +8 -12
- package/prompts/evaluate/document-structure.md +6 -6
- package/prompts/structure/check-document-structure.md +10 -10
- package/prompts/structure/document-rules.md +2 -2
- package/prompts/structure/generate-structure-system.md +3 -3
- package/prompts/structure/structure-example.md +1 -1
- package/prompts/structure/structure-getting-started.md +1 -1
- package/prompts/structure/update-document-structure.md +18 -14
- package/prompts/utils/feedback-refiner.md +3 -3
- package/tests/agents/clear/choose-contents.test.mjs +1 -1
- package/tests/agents/clear/clear-document-structure.test.mjs +36 -30
- package/tests/agents/evaluate/generate-report.test.mjs +1 -1
- package/tests/agents/generate/check-need-generate-structure.test.mjs +1 -1
- package/tests/agents/generate/document-structure-tools/add-document.test.mjs +2 -2
- package/tests/agents/generate/document-structure-tools/delete-document.test.mjs +4 -4
- package/tests/agents/generate/document-structure-tools/move-document.test.mjs +12 -12
- package/tests/agents/generate/document-structure-tools/update-document.test.mjs +3 -3
- package/tests/agents/generate/user-review-document-structure.test.mjs +36 -13
- package/tests/agents/update/check-document.test.mjs +1 -1
- package/tests/agents/update/document-tools/update-document-content.test.mjs +115 -112
- package/tests/agents/update/fs-tools/glob.test.mjs +438 -0
- package/tests/agents/update/fs-tools/grep.test.mjs +279 -0
- package/tests/agents/update/fs-tools/read-file.test.mjs +553 -0
- package/tests/agents/update/user-review-document.test.mjs +48 -27
- package/tests/agents/utils/format-document-structure.test.mjs +5 -5
- package/tests/agents/utils/load-sources.test.mjs +4 -4
- package/tests/agents/utils/save-docs.test.mjs +1 -1
- package/tests/utils/conflict-detector.test.mjs +1 -1
- package/tests/utils/docs-finder-utils.test.mjs +8 -8
- package/types/document-schema.mjs +5 -6
- package/types/document-structure-schema.mjs +25 -13
- package/utils/conflict-detector.mjs +1 -1
- package/utils/constants/index.mjs +4 -4
- package/utils/docs-finder-utils.mjs +11 -11
- package/utils/markdown-checker.mjs +1 -1
package/docs/cli-reference.zh.md
CHANGED
|
@@ -1,82 +1,144 @@
|
|
|
1
1
|
# CLI 命令参考
|
|
2
2
|
|
|
3
|
-
本指南为所有可用的 `aigne doc`
|
|
3
|
+
本指南为所有可用的 `aigne doc` 子命令及其参数和选项提供了全面的参考。它旨在帮助希望充分利用命令行的用户。
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
通用语法为:
|
|
6
6
|
|
|
7
|
-
```bash
|
|
7
|
+
```bash command icon=lucide:terminal
|
|
8
8
|
aigne doc <command> [options]
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
### 命令工作流
|
|
12
12
|
|
|
13
|
-
下图展示了使用 DocSmith 的 CLI
|
|
13
|
+
下图展示了使用 DocSmith 的 CLI 命令创建和维护文档的典型生命周期,以及它们与之交互的数据。
|
|
14
14
|
|
|
15
15
|
```d2
|
|
16
16
|
direction: down
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
# 工件
|
|
19
|
+
Source-Code: {
|
|
20
|
+
label: "源代码"
|
|
21
|
+
shape: cylinder
|
|
21
22
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
shape: rectangle
|
|
23
|
+
Configuration: {
|
|
24
|
+
label: "配置\n(.aigne/doc-smith/config.yml)"
|
|
25
|
+
shape: cylinder
|
|
26
26
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
Generated-Docs: {
|
|
28
|
+
label: "生成的文档"
|
|
29
|
+
shape: cylinder
|
|
30
|
+
}
|
|
31
|
+
Published-Docs: {
|
|
32
|
+
label: "发布的站点"
|
|
33
|
+
shape: cylinder
|
|
31
34
|
}
|
|
32
35
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
# --- 核心工作流 ---
|
|
37
|
+
Lifecycle: {
|
|
38
|
+
label: "文档生命周期"
|
|
39
|
+
|
|
40
|
+
init: {
|
|
41
|
+
label: "1. 初始化\n`aigne doc init`"
|
|
42
|
+
shape: rectangle
|
|
43
|
+
}
|
|
37
44
|
|
|
38
|
-
|
|
39
|
-
label: "aigne doc
|
|
45
|
+
generate: {
|
|
46
|
+
label: "2. 生成\n`aigne doc generate`"
|
|
47
|
+
shape: rectangle
|
|
40
48
|
}
|
|
41
|
-
|
|
42
|
-
|
|
49
|
+
|
|
50
|
+
Refinement: {
|
|
51
|
+
label: "3. 优化(迭代)"
|
|
52
|
+
grid-columns: 2
|
|
53
|
+
|
|
54
|
+
update: {
|
|
55
|
+
label: "更新\n`aigne doc update`"
|
|
56
|
+
shape: rectangle
|
|
57
|
+
}
|
|
58
|
+
translate: {
|
|
59
|
+
label: "翻译\n`aigne doc translate`"
|
|
60
|
+
shape: rectangle
|
|
61
|
+
}
|
|
43
62
|
}
|
|
44
|
-
}
|
|
45
63
|
|
|
46
|
-
publish: {
|
|
47
|
-
|
|
48
|
-
|
|
64
|
+
publish: {
|
|
65
|
+
label: "4. 发布\n`aigne doc publish`"
|
|
66
|
+
shape: rectangle
|
|
67
|
+
}
|
|
49
68
|
}
|
|
50
69
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
70
|
+
# --- 实用工具命令 ---
|
|
71
|
+
Utilities: {
|
|
72
|
+
label: "实用工具命令"
|
|
73
|
+
grid-columns: 2
|
|
74
|
+
|
|
75
|
+
prefs: {
|
|
76
|
+
label: "管理偏好\n`aigne doc prefs`"
|
|
77
|
+
shape: rectangle
|
|
78
|
+
}
|
|
79
|
+
clear: {
|
|
80
|
+
label: "清除数据\n`aigne doc clear`"
|
|
81
|
+
shape: rectangle
|
|
82
|
+
}
|
|
55
83
|
}
|
|
56
84
|
|
|
57
|
-
|
|
85
|
+
|
|
86
|
+
# --- 连接 ---
|
|
87
|
+
|
|
88
|
+
# 设置与生成
|
|
89
|
+
Lifecycle.init -> Configuration: "创建"
|
|
90
|
+
Source-Code -> Lifecycle.generate: "读取"
|
|
91
|
+
Configuration -> Lifecycle.generate: "读取"
|
|
92
|
+
Lifecycle.generate -> Generated-Docs: "创建 / 覆盖"
|
|
93
|
+
Lifecycle.generate -> Lifecycle.init: {
|
|
94
|
+
label: "若无配置则运行"
|
|
58
95
|
style.stroke-dash: 4
|
|
59
96
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
97
|
+
|
|
98
|
+
# 优化循环
|
|
99
|
+
Generated-Docs <-> Lifecycle.Refinement: "读取和写入"
|
|
100
|
+
|
|
101
|
+
# 发布
|
|
102
|
+
Lifecycle.Refinement -> Lifecycle.publish
|
|
103
|
+
Lifecycle.publish -> Published-Docs: "上传至"
|
|
104
|
+
|
|
105
|
+
# 实用工具连接
|
|
106
|
+
Utilities.prefs -> Configuration: "读取"
|
|
107
|
+
Utilities.clear -> Configuration: "删除"
|
|
108
|
+
Utilities.clear -> Generated-Docs: "删除"
|
|
66
109
|
```
|
|
67
110
|
|
|
68
111
|
---
|
|
69
112
|
|
|
113
|
+
## `aigne doc init`
|
|
114
|
+
|
|
115
|
+
手动启动交互式配置向导。这对于设置新项目或修改现有项目的配置非常有用。该向导会引导您定义源代码路径、设置输出目录、选择语言以及定义文档的风格和目标受众。
|
|
116
|
+
|
|
117
|
+
### 使用示例
|
|
118
|
+
|
|
119
|
+
**启动设置向导:**
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
aigne doc init
|
|
123
|
+
```
|
|
124
|
+

|
|
125
|
+
|
|
126
|
+
有关如何根据您的需求定制 DocSmith 的更多详细信息,请参阅[配置指南](./configuration.md)。
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
70
130
|
## `aigne doc generate`
|
|
71
131
|
|
|
72
|
-
|
|
132
|
+
分析您的源代码并根据您的配置生成一套完整的文档。如果未找到配置,它将自动启动交互式设置向导(`aigne doc init`)。
|
|
133
|
+
|
|
134
|
+

|
|
73
135
|
|
|
74
136
|
### 选项
|
|
75
137
|
|
|
76
|
-
|
|
|
77
|
-
|
|
|
78
|
-
| `--
|
|
79
|
-
| `--
|
|
138
|
+
| Option | Type | Description |
|
|
139
|
+
| :------------------ | :------ | :------------------------------------------------------------------------------------------------------- |
|
|
140
|
+
| `--forceRegenerate` | boolean | 丢弃现有内容并从头开始重新生成所有文档。 |
|
|
141
|
+
| `--feedback` | string | 提供反馈以调整和优化整体文档结构。 |
|
|
80
142
|
| `--model` | string | 指定用于生成的特定大语言模型(例如,`openai:gpt-4o`)。此选项将覆盖默认设置。 |
|
|
81
143
|
|
|
82
144
|
### 使用示例
|
|
@@ -96,27 +158,29 @@ aigne doc generate --forceRegenerate
|
|
|
96
158
|
**通过反馈优化文档结构:**
|
|
97
159
|
|
|
98
160
|
```bash
|
|
99
|
-
aigne doc generate --feedback "
|
|
161
|
+
aigne doc generate --feedback "Add a new section for API examples and remove the 'About' page."
|
|
100
162
|
```
|
|
101
163
|
|
|
102
|
-
|
|
164
|
+
**使用特定模型生成:**
|
|
103
165
|
|
|
104
166
|
```bash
|
|
105
|
-
aigne doc generate --model
|
|
167
|
+
aigne doc generate --model openai:gpt-4o
|
|
106
168
|
```
|
|
107
169
|
|
|
108
170
|
---
|
|
109
171
|
|
|
110
172
|
## `aigne doc update`
|
|
111
173
|
|
|
112
|
-
|
|
174
|
+
优化并重新生成特定文档。您可以以交互方式运行它来选择文档,或直接使用选项指定文档。这对于根据反馈进行有针对性的改进非常有用,而无需重新生成整个项目。
|
|
175
|
+
|
|
176
|
+

|
|
113
177
|
|
|
114
178
|
### 选项
|
|
115
179
|
|
|
116
|
-
|
|
|
117
|
-
|
|
|
118
|
-
| `--docs` | array |
|
|
119
|
-
| `--feedback` | string
|
|
180
|
+
| Option | Type | Description |
|
|
181
|
+
| :--------- | :---- | :-------------------------------------------------------------------------- |
|
|
182
|
+
| `--docs` | array | 要重新生成的文档路径列表。可多次指定。 |
|
|
183
|
+
| `--feedback` | string | 提供具体反馈以改进所选文档的内容。 |
|
|
120
184
|
|
|
121
185
|
### 使用示例
|
|
122
186
|
|
|
@@ -129,23 +193,25 @@ aigne doc update
|
|
|
129
193
|
**使用有针对性的反馈更新特定文档:**
|
|
130
194
|
|
|
131
195
|
```bash
|
|
132
|
-
aigne doc update --docs overview
|
|
196
|
+
aigne doc update --docs /overview --feedback "Add more detailed FAQ entries"
|
|
133
197
|
```
|
|
134
198
|
|
|
135
199
|
---
|
|
136
200
|
|
|
137
201
|
## `aigne doc translate`
|
|
138
202
|
|
|
139
|
-
|
|
203
|
+
将现有文档翻译成一种或多种语言。可以以交互方式运行它来选择文档和语言,也可以通过指定参数以非交互方式运行。
|
|
204
|
+
|
|
205
|
+

|
|
140
206
|
|
|
141
207
|
### 选项
|
|
142
208
|
|
|
143
|
-
|
|
|
144
|
-
|
|
|
145
|
-
| `--docs`
|
|
146
|
-
| `--langs`
|
|
147
|
-
| `--feedback`
|
|
148
|
-
| `--glossary`
|
|
209
|
+
| Option | Type | Description |
|
|
210
|
+
| :--------- | :---- | :----------------------------------------------------------------------------------- |
|
|
211
|
+
| `--docs` | array | 要翻译的文档路径列表。可多次指定。 |
|
|
212
|
+
| `--langs` | array | 目标语言代码列表(例如,`zh-CN`、`ja`)。可多次指定。 |
|
|
213
|
+
| `--feedback` | string | 提供反馈以提高翻译质量。 |
|
|
214
|
+
| `--glossary` | string | 词汇表文件的路径,以确保跨语言的术语一致性。使用 `@path/to/glossary.md`。 |
|
|
149
215
|
|
|
150
216
|
### 使用示例
|
|
151
217
|
|
|
@@ -158,26 +224,28 @@ aigne doc translate
|
|
|
158
224
|
**将特定文档翻译成中文和日文:**
|
|
159
225
|
|
|
160
226
|
```bash
|
|
161
|
-
aigne doc translate --langs zh --langs ja --docs
|
|
227
|
+
aigne doc translate --langs zh-CN --langs ja --docs /features/generate-documentation --docs /overview
|
|
162
228
|
```
|
|
163
229
|
|
|
164
|
-
|
|
230
|
+
**使用词汇表和反馈进行翻译以提高质量:**
|
|
165
231
|
|
|
166
232
|
```bash
|
|
167
|
-
aigne doc translate --glossary @glossary.md --feedback "
|
|
233
|
+
aigne doc translate --glossary @glossary.md --feedback "Use technical terminology consistently"
|
|
168
234
|
```
|
|
169
235
|
|
|
170
236
|
---
|
|
171
237
|
|
|
172
238
|
## `aigne doc publish`
|
|
173
239
|
|
|
174
|
-
|
|
240
|
+
发布您的文档并生成一个可共享的链接。此命令会将您的内容上传到 Discuss Kit 实例。您可以使用官方的 AIGNE DocSmith 平台,也可以运行您自己的 [Discuss Kit](https://www.web3kit.rocks/discuss-kit) 实例。
|
|
241
|
+
|
|
242
|
+

|
|
175
243
|
|
|
176
244
|
### 选项
|
|
177
245
|
|
|
178
|
-
|
|
|
179
|
-
|
|
|
180
|
-
| `--appUrl` | string |
|
|
246
|
+
| Option | Type | Description |
|
|
247
|
+
| :------- | :----- | :------------------------------------------------------------------------------------------------------ |
|
|
248
|
+
| `--appUrl` | string | 您的自托管 Discuss Kit 实例的 URL。如果未提供,该命令将以交互模式运行。 |
|
|
181
249
|
|
|
182
250
|
### 使用示例
|
|
183
251
|
|
|
@@ -195,16 +263,49 @@ aigne doc publish --appUrl https://your-discuss-kit-instance.com
|
|
|
195
263
|
|
|
196
264
|
---
|
|
197
265
|
|
|
198
|
-
## `aigne doc
|
|
266
|
+
## `aigne doc prefs`
|
|
199
267
|
|
|
200
|
-
|
|
268
|
+
管理用户偏好和由反馈驱动的规则。随着时间的推移,DocSmith 会从您的反馈中学习并创建持久的偏好设置。此命令允许您查看、切换或移除这些学习到的规则。
|
|
269
|
+
|
|
270
|
+
### 选项
|
|
271
|
+
|
|
272
|
+
| Option | Type | Description |
|
|
273
|
+
| :------- | :------ | :------------------------------------------------------------------------- |
|
|
274
|
+
| `--list` | boolean | 列出所有已保存的偏好设置。 |
|
|
275
|
+
| `--remove` | boolean | 以交互方式提示选择并移除一个或多个偏好设置。 |
|
|
276
|
+
| `--toggle` | boolean | 以交互方式提示选择并切换偏好设置的激活状态。 |
|
|
277
|
+
| `--id` | array | 指定一个或多个偏好 ID 以直接移除或切换。 |
|
|
201
278
|
|
|
202
279
|
### 使用示例
|
|
203
280
|
|
|
204
|
-
|
|
281
|
+
**列出所有已保存的偏好设置:**
|
|
205
282
|
|
|
206
283
|
```bash
|
|
207
|
-
aigne doc
|
|
284
|
+
aigne doc prefs --list
|
|
208
285
|
```
|
|
209
286
|
|
|
210
|
-
|
|
287
|
+
**启动交互式移除模式:**
|
|
288
|
+
|
|
289
|
+
```bash
|
|
290
|
+
aigne doc prefs --remove
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
**按 ID 切换特定偏好设置:**
|
|
294
|
+
|
|
295
|
+
```bash
|
|
296
|
+
aigne doc prefs --toggle --id "pref_2a1dfe2b09695aab"
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
---
|
|
300
|
+
|
|
301
|
+
## `aigne doc clear`
|
|
302
|
+
|
|
303
|
+
启动一个交互式会话以清除本地存储的数据。此命令可用于移除生成的文档、文档结构配置或缓存的身份验证令牌。
|
|
304
|
+
|
|
305
|
+
### 使用示例
|
|
306
|
+
|
|
307
|
+
**启动交互式清理过程:**
|
|
308
|
+
|
|
309
|
+
```bash
|
|
310
|
+
aigne doc clear
|
|
311
|
+
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# インタラクティブなセットアップ
|
|
2
2
|
|
|
3
|
-
AIGNE DocSmith
|
|
3
|
+
AIGNE DocSmithには、`aigne doc init`コマンドで起動するインタラクティブなセットアップウィザードが含まれており、プロジェクトの設定を効率化します。このガイド付きプロセスでは、ドキュメントの目標に関する一連の質問が行われ、回答に基づいて`config.yaml`ファイルが生成されます。設定エラーを防ぎ、入力に基づいて具体的な推奨事項を提供するため、新しいドキュメントプロジェクトを開始する際に推奨される方法です。
|
|
4
4
|
|
|
5
5
|
## ウィザードの実行
|
|
6
6
|
|
|
@@ -10,22 +10,22 @@ AIGNE DocSmithには、プロジェクト設定を効率化するための対話
|
|
|
10
10
|
npx aigne doc init
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
ウィザードが8つのステップでドキュメントの設定を案内します。
|
|
14
14
|
|
|
15
15
|
## ガイド付きプロセス
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
ウィザードでは、以下の主要な設定項目についてプロンプトが表示されます。
|
|
18
18
|
|
|
19
|
-
1.
|
|
20
|
-
2.
|
|
21
|
-
3. **読者の知識レベル**:
|
|
19
|
+
1. **プライマリゴール**: 読者の主な目的を定義します(例:利用開始、回答の検索)。
|
|
20
|
+
2. **ターゲットオーディエンス**: ドキュメントの主な読者を指定します(例:非技術系のエンドユーザー、開発者)。
|
|
21
|
+
3. **読者の知識レベル**: 読者の一般的な初期知識を評価します。
|
|
22
22
|
4. **ドキュメントの深さ**: コンテンツの詳細レベルと範囲を決定します。
|
|
23
|
-
5.
|
|
24
|
-
6. **翻訳言語**:
|
|
23
|
+
5. **プライマリ言語**: ドキュメントの主要言語を設定します。
|
|
24
|
+
6. **翻訳言語**: 翻訳用の追加言語を選択します。
|
|
25
25
|
7. **出力ディレクトリ**: 生成されたドキュメントファイルの場所を指定します。
|
|
26
|
-
8.
|
|
26
|
+
8. **ソースコードパス**: globパターンをサポートし、分析するファイルとディレクトリを定義します。
|
|
27
27
|
|
|
28
|
-
##
|
|
28
|
+
## アシスト付き設定
|
|
29
29
|
|
|
30
30
|
ウィザードは、一貫性のある効果的な設定を作成するために、事前定義された一連のルールを使用します。
|
|
31
31
|
|
|
@@ -33,87 +33,86 @@ npx aigne doc init
|
|
|
33
33
|
direction: down
|
|
34
34
|
|
|
35
35
|
User-Selections: {
|
|
36
|
-
label: "1.
|
|
36
|
+
label: "1. ユーザーが入力\n(目的、オーディエンスなど)"
|
|
37
37
|
shape: rectangle
|
|
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: "
|
|
46
|
+
label: "オプションフィルタリング\n(互換性のない選択を防止)"
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
Conflict-Detection: {
|
|
50
|
-
label: "
|
|
50
|
+
label: "競合検出\n(複雑なニーズを特定)"
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
Guided-Experience: {
|
|
55
|
-
label: "3.
|
|
55
|
+
label: "3. ガイド付きエクスペリエンス"
|
|
56
56
|
shape: rectangle
|
|
57
|
-
content: "
|
|
57
|
+
content: "ユーザーには簡素化された関連オプションが表示される"
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
Final-Config: {
|
|
61
|
-
label: "4.
|
|
62
|
-
content: "config.yaml
|
|
61
|
+
label: "4. 最終設定"
|
|
62
|
+
content: "config.yamlが競合解決戦略とともに生成される"
|
|
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
|
+
たとえば、ターゲットオーディエンスとして「エンドユーザー(非技術者)」を選択した場合、ウィザードは知識レベルの選択肢である「専門家である」を非表示にします。このルールの理由は、「非技術系のユーザーは通常、経験豊富な技術ユーザーではない」ということであり、非論理的な選択を防ぎます。
|
|
77
76
|
|
|
78
77
|
### 競合の検出と解決
|
|
79
78
|
|
|
80
|
-
|
|
79
|
+
場合によっては、非技術系の**エンドユーザー**と専門家の**開発者**の両方向けにドキュメントを作成するなど、効果的なドキュメント構造を必要とする複数の目標やオーディエンスが存在することがあります。ウィザードはこれらを「解決可能な競合」として識別します。
|
|
81
80
|
|
|
82
|
-
|
|
81
|
+
そして、これらのニーズにドキュメント構造内で対応するための戦略を策定します。エンドユーザー対開発者の例では、解決戦略として別々のユーザーパスを作成します。
|
|
83
82
|
|
|
84
|
-
- **ユーザーガイドパス**: 平易な言葉を使用し、UI
|
|
83
|
+
- **ユーザーガイドパス**: 平易な言葉を使用し、UIの操作に焦点を当て、ビジネス成果を志向します。
|
|
85
84
|
- **開発者ガイドパス**: コード中心で技術的に正確であり、SDKの例や設定スニペットを含みます。
|
|
86
85
|
|
|
87
|
-
|
|
86
|
+
このアプローチにより、最終的なドキュメントは、単一の混乱したコンテンツの混合物を作成するのではなく、複数のオーディエンスに効果的に対応できるように構成されます。
|
|
88
87
|
|
|
89
88
|
## 生成される出力
|
|
90
89
|
|
|
91
|
-
ウィザードを完了すると、プロジェクトに`config.yaml
|
|
90
|
+
ウィザードを完了すると、プロジェクトに`config.yaml`ファイルが保存されます。このファイルは完全にコメント化されており、各オプションの説明と利用可能なすべての選択肢がリストされているため、後で手動で確認したり変更したりするのが簡単です。
|
|
92
91
|
|
|
93
92
|
以下は生成されたファイルのスニペットです。
|
|
94
93
|
|
|
95
94
|
```yaml config.yaml icon=logos:yaml
|
|
96
|
-
#
|
|
95
|
+
# ドキュメント公開用のプロジェクト情報
|
|
97
96
|
projectName: your-project-name
|
|
98
97
|
projectDesc: Your project description.
|
|
99
98
|
projectLogo: ""
|
|
100
99
|
|
|
101
100
|
# =============================================================================
|
|
102
|
-
#
|
|
101
|
+
# Documentation Configuration
|
|
103
102
|
# =============================================================================
|
|
104
103
|
|
|
105
|
-
#
|
|
106
|
-
#
|
|
107
|
-
# getStarted -
|
|
108
|
-
# completeTasks -
|
|
104
|
+
# Purpose: What's the main outcome you want readers to achieve?
|
|
105
|
+
# Available options (uncomment and modify as needed):
|
|
106
|
+
# getStarted - すぐに始める: 新規ユーザーが30分未満でゼロから作業を開始できるように支援
|
|
107
|
+
# completeTasks - 特定のタスクを完了する: 一般的なワークフローやユースケースをユーザーに案内
|
|
109
108
|
documentPurpose:
|
|
110
109
|
- completeTasks
|
|
111
110
|
- findAnswers
|
|
112
111
|
|
|
113
|
-
#
|
|
114
|
-
#
|
|
115
|
-
# endUsers -
|
|
116
|
-
# developers -
|
|
112
|
+
# Target Audience: Who will be reading this most often?
|
|
113
|
+
# Available options (uncomment and modify as needed):
|
|
114
|
+
# endUsers - エンドユーザー (非技術者): 製品を使用するがコーディングはしない人々
|
|
115
|
+
# developers - 開発者 (製品/APIを統合): これを自分のプロジェクトに追加するエンジニア
|
|
117
116
|
targetAudienceTypes:
|
|
118
117
|
- endUsers
|
|
119
118
|
- developers
|
|
@@ -121,15 +120,19 @@ targetAudienceTypes:
|
|
|
121
120
|
# ... その他の設定
|
|
122
121
|
```
|
|
123
122
|
|
|
123
|
+
完了すると、ターミナルに確認メッセージが表示されます。
|
|
124
|
+
|
|
125
|
+

|
|
126
|
+
|
|
124
127
|
## 次のステップ
|
|
125
128
|
|
|
126
|
-
|
|
129
|
+
設定ファイルが準備できたので、ドキュメントを生成、翻訳、または公開する準備が整いました。
|
|
127
130
|
|
|
128
131
|
<x-cards>
|
|
129
132
|
<x-card data-title="ドキュメントの生成" data-icon="lucide:play-circle" data-href="/features/generate-documentation">
|
|
130
|
-
|
|
133
|
+
単一のコマンドを使用してソースコードから完全なドキュメントセットを自動的に作成する方法を学びます。
|
|
131
134
|
</x-card>
|
|
132
135
|
<x-card data-title="設定ガイド" data-icon="lucide:settings" data-href="/configuration">
|
|
133
|
-
|
|
136
|
+
利用可能なすべての設定を深く掘り下げ、config.yamlファイルを手動で微調整する方法を学びます。
|
|
134
137
|
</x-card>
|
|
135
138
|
</x-cards>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Interactive Setup
|
|
2
2
|
|
|
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
|
|
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 based on 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
|
|
|
@@ -68,18 +68,17 @@ Wizard-Engine.Conflict-Detection -> Final-Config
|
|
|
68
68
|
Guided-Experience -> User-Selections: "Refines"
|
|
69
69
|
```
|
|
70
70
|
|
|
71
|
-
###
|
|
71
|
+
### Option Filtering
|
|
72
72
|
|
|
73
|
-
As you make selections, the wizard
|
|
73
|
+
As you make selections, the wizard filters subsequent options to guide you toward a logical configuration. This is based on a set of cross-question conflict rules that prevent incompatible choices.
|
|
74
74
|
|
|
75
|
-
|
|
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.
|
|
75
|
+
For example, if you select "End users (non-technical)" as your target audience, the wizard will hide the "Is an expert" knowledge level option. The rule's reasoning is that "Non-technical users are typically not experienced technical users," thus preventing an illogical selection.
|
|
77
76
|
|
|
78
77
|
### Conflict Detection and Resolution
|
|
79
78
|
|
|
80
79
|
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
80
|
|
|
82
|
-
It then formulates a strategy to address these needs within the
|
|
81
|
+
It then formulates a strategy to address these needs within the documentation structure. For the End User vs. Developer example, the resolution strategy is to create separate user paths:
|
|
83
82
|
|
|
84
83
|
- **User Guide Path**: Uses plain language, focuses on UI interactions, and is oriented toward business outcomes.
|
|
85
84
|
- **Developer Guide Path**: Is code-first, technically precise, and includes SDK examples and configuration snippets.
|
|
@@ -121,6 +120,10 @@ targetAudienceTypes:
|
|
|
121
120
|
# ... other settings
|
|
122
121
|
```
|
|
123
122
|
|
|
123
|
+
Upon completion, you will see a confirmation message in your terminal.
|
|
124
|
+
|
|
125
|
+

|
|
126
|
+
|
|
124
127
|
## Next Steps
|
|
125
128
|
|
|
126
129
|
With your configuration file in place, you are ready to generate, translate, or publish your documentation.
|