@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.
Files changed (159) hide show
  1. package/.aigne/doc-smith/config.yaml +3 -1
  2. package/.aigne/doc-smith/output/structure-plan.json +2 -2
  3. package/.aigne/doc-smith/preferences.yml +28 -20
  4. package/.aigne/doc-smith/upload-cache.yaml +702 -0
  5. package/.release-please-manifest.json +1 -1
  6. package/CHANGELOG.md +22 -2
  7. package/README.md +2 -2
  8. package/agents/clear/choose-contents.mjs +2 -2
  9. package/agents/clear/clear-document-structure.mjs +8 -8
  10. package/agents/clear/index.yaml +1 -1
  11. package/agents/evaluate/document-structure.yaml +1 -1
  12. package/agents/generate/check-document-structure.yaml +3 -3
  13. package/agents/generate/check-need-generate-structure.mjs +8 -8
  14. package/agents/generate/document-structure-tools/add-document.mjs +38 -13
  15. package/agents/generate/document-structure-tools/delete-document.mjs +37 -14
  16. package/agents/generate/document-structure-tools/move-document.mjs +46 -19
  17. package/agents/generate/document-structure-tools/update-document.mjs +39 -12
  18. package/agents/generate/generate-structure.yaml +1 -1
  19. package/agents/generate/update-document-structure.yaml +3 -9
  20. package/agents/generate/user-review-document-structure.mjs +15 -14
  21. package/agents/translate/translate-document.yaml +1 -9
  22. package/agents/update/batch-generate-document.yaml +1 -1
  23. package/agents/update/check-document.mjs +2 -2
  24. package/agents/update/check-update-is-single.mjs +2 -1
  25. package/agents/update/document-tools/update-document-content.mjs +24 -14
  26. package/agents/update/fs-tools/glob.mjs +184 -0
  27. package/agents/update/fs-tools/grep.mjs +317 -0
  28. package/agents/update/fs-tools/read-file.mjs +307 -0
  29. package/agents/update/generate-document.yaml +4 -7
  30. package/agents/update/update-document-detail.yaml +6 -10
  31. package/agents/update/user-review-document.mjs +13 -13
  32. package/agents/utils/check-feedback-refiner.mjs +1 -1
  33. package/agents/utils/choose-docs.mjs +1 -1
  34. package/agents/utils/load-document-all-content.mjs +3 -3
  35. package/agents/utils/load-sources.mjs +1 -1
  36. package/agents/utils/save-docs.mjs +7 -28
  37. package/aigne.yaml +2 -2
  38. package/assets/screenshots/doc-complete-setup.png +0 -0
  39. package/assets/screenshots/doc-generate-docs.png +0 -0
  40. package/assets/screenshots/doc-generate.png +0 -0
  41. package/assets/screenshots/doc-generated-successfully.png +0 -0
  42. package/assets/screenshots/doc-publish.png +0 -0
  43. package/assets/screenshots/doc-regenerate.png +0 -0
  44. package/assets/screenshots/doc-translate-langs.png +0 -0
  45. package/assets/screenshots/doc-translate.png +0 -0
  46. package/assets/screenshots/doc-update.png +0 -0
  47. package/docs/_sidebar.md +1 -1
  48. package/docs/advanced-how-it-works.ja.md +31 -31
  49. package/docs/advanced-how-it-works.md +10 -10
  50. package/docs/advanced-how-it-works.zh-TW.md +24 -24
  51. package/docs/advanced-how-it-works.zh.md +20 -20
  52. package/docs/advanced-quality-assurance.ja.md +57 -61
  53. package/docs/advanced-quality-assurance.md +57 -61
  54. package/docs/advanced-quality-assurance.zh-TW.md +57 -61
  55. package/docs/advanced-quality-assurance.zh.md +57 -61
  56. package/docs/advanced.ja.md +8 -4
  57. package/docs/advanced.md +7 -3
  58. package/docs/advanced.zh-TW.md +9 -5
  59. package/docs/advanced.zh.md +9 -5
  60. package/docs/changelog.ja.md +206 -29
  61. package/docs/changelog.md +177 -0
  62. package/docs/changelog.zh-TW.md +229 -52
  63. package/docs/changelog.zh.md +204 -27
  64. package/docs/cli-reference.ja.md +181 -80
  65. package/docs/cli-reference.md +168 -67
  66. package/docs/cli-reference.zh-TW.md +177 -76
  67. package/docs/cli-reference.zh.md +172 -71
  68. package/docs/configuration-interactive-setup.ja.md +45 -42
  69. package/docs/configuration-interactive-setup.md +9 -6
  70. package/docs/configuration-interactive-setup.zh-TW.md +26 -23
  71. package/docs/configuration-interactive-setup.zh.md +25 -22
  72. package/docs/configuration-language-support.ja.md +33 -63
  73. package/docs/configuration-language-support.md +32 -62
  74. package/docs/configuration-language-support.zh-TW.md +35 -65
  75. package/docs/configuration-language-support.zh.md +32 -62
  76. package/docs/configuration-llm-setup.ja.md +25 -23
  77. package/docs/configuration-llm-setup.md +20 -18
  78. package/docs/configuration-llm-setup.zh-TW.md +21 -19
  79. package/docs/configuration-llm-setup.zh.md +20 -18
  80. package/docs/configuration-preferences.ja.md +67 -52
  81. package/docs/configuration-preferences.md +55 -40
  82. package/docs/configuration-preferences.zh-TW.md +69 -54
  83. package/docs/configuration-preferences.zh.md +68 -53
  84. package/docs/configuration.ja.md +98 -58
  85. package/docs/configuration.md +42 -2
  86. package/docs/configuration.zh-TW.md +86 -46
  87. package/docs/configuration.zh.md +76 -36
  88. package/docs/features-generate-documentation.ja.md +49 -55
  89. package/docs/features-generate-documentation.md +49 -55
  90. package/docs/features-generate-documentation.zh-TW.md +54 -60
  91. package/docs/features-generate-documentation.zh.md +48 -54
  92. package/docs/features-publish-your-docs.ja.md +68 -45
  93. package/docs/features-publish-your-docs.md +65 -42
  94. package/docs/features-publish-your-docs.zh-TW.md +74 -51
  95. package/docs/features-publish-your-docs.zh.md +67 -44
  96. package/docs/features-translate-documentation.ja.md +46 -35
  97. package/docs/features-translate-documentation.md +39 -28
  98. package/docs/features-translate-documentation.zh-TW.md +45 -34
  99. package/docs/features-translate-documentation.zh.md +39 -28
  100. package/docs/features-update-and-refine.ja.md +75 -71
  101. package/docs/features-update-and-refine.md +67 -63
  102. package/docs/features-update-and-refine.zh-TW.md +72 -67
  103. package/docs/features-update-and-refine.zh.md +71 -67
  104. package/docs/features.ja.md +29 -19
  105. package/docs/features.md +25 -15
  106. package/docs/features.zh-TW.md +28 -18
  107. package/docs/features.zh.md +31 -21
  108. package/docs/getting-started.ja.md +43 -46
  109. package/docs/getting-started.md +36 -39
  110. package/docs/getting-started.zh-TW.md +41 -44
  111. package/docs/getting-started.zh.md +39 -42
  112. package/docs/overview.ja.md +63 -11
  113. package/docs/overview.md +62 -10
  114. package/docs/overview.zh-TW.md +67 -15
  115. package/docs/overview.zh.md +62 -10
  116. package/docs-mcp/analyze-docs-relevance.yaml +6 -6
  117. package/docs-mcp/docs-search.yaml +1 -1
  118. package/media.md +9 -9
  119. package/package.json +2 -2
  120. package/prompts/common/document-structure/conflict-resolution-guidance.md +3 -3
  121. package/prompts/common/document-structure/document-structure-rules.md +2 -2
  122. package/prompts/detail/custom/custom-components.md +304 -188
  123. package/prompts/detail/document-rules.md +5 -5
  124. package/prompts/detail/generate-document.md +21 -8
  125. package/prompts/detail/update-document.md +8 -12
  126. package/prompts/evaluate/document-structure.md +6 -6
  127. package/prompts/structure/check-document-structure.md +10 -10
  128. package/prompts/structure/document-rules.md +2 -2
  129. package/prompts/structure/generate-structure-system.md +3 -3
  130. package/prompts/structure/structure-example.md +1 -1
  131. package/prompts/structure/structure-getting-started.md +1 -1
  132. package/prompts/structure/update-document-structure.md +18 -14
  133. package/prompts/utils/feedback-refiner.md +3 -3
  134. package/tests/agents/clear/choose-contents.test.mjs +1 -1
  135. package/tests/agents/clear/clear-document-structure.test.mjs +36 -30
  136. package/tests/agents/evaluate/generate-report.test.mjs +1 -1
  137. package/tests/agents/generate/check-need-generate-structure.test.mjs +1 -1
  138. package/tests/agents/generate/document-structure-tools/add-document.test.mjs +2 -2
  139. package/tests/agents/generate/document-structure-tools/delete-document.test.mjs +4 -4
  140. package/tests/agents/generate/document-structure-tools/move-document.test.mjs +12 -12
  141. package/tests/agents/generate/document-structure-tools/update-document.test.mjs +3 -3
  142. package/tests/agents/generate/user-review-document-structure.test.mjs +36 -13
  143. package/tests/agents/update/check-document.test.mjs +1 -1
  144. package/tests/agents/update/document-tools/update-document-content.test.mjs +115 -112
  145. package/tests/agents/update/fs-tools/glob.test.mjs +438 -0
  146. package/tests/agents/update/fs-tools/grep.test.mjs +279 -0
  147. package/tests/agents/update/fs-tools/read-file.test.mjs +553 -0
  148. package/tests/agents/update/user-review-document.test.mjs +48 -27
  149. package/tests/agents/utils/format-document-structure.test.mjs +5 -5
  150. package/tests/agents/utils/load-sources.test.mjs +4 -4
  151. package/tests/agents/utils/save-docs.test.mjs +1 -1
  152. package/tests/utils/conflict-detector.test.mjs +1 -1
  153. package/tests/utils/docs-finder-utils.test.mjs +8 -8
  154. package/types/document-schema.mjs +5 -6
  155. package/types/document-structure-schema.mjs +25 -13
  156. package/utils/conflict-detector.mjs +1 -1
  157. package/utils/constants/index.mjs +4 -4
  158. package/utils/docs-finder-utils.mjs +11 -11
  159. package/utils/markdown-checker.mjs +1 -1
@@ -1,31 +1,71 @@
1
1
  # 配置指南
2
2
 
3
- AIGNE DocSmith 的行为由一个中央文件 `config.yaml` 控制,该文件位于 `.aigne/doc-smith/config.yaml`。此文件规定了文档的风格、目标受众、语言和结构。
3
+ AIGNE DocSmith 的行为由一个中央配置文件 `.aigne/doc-smith/config.yaml` 控制。该文件允许您自定义文档的风格、目标受众、语言和结构,以满足您的特定需求。
4
4
 
5
- 您可以通过运行 `aigne doc init` 使用交互式设置向导来创建和管理此文件。有关分步演练,请参阅[交互式设置](./configuration-interactive-setup.md)指南。
5
+ 您可以通过运行 `aigne doc init` 使用交互式设置向导来创建和管理此文件。有关分步演练,请参阅 [交互式设置](./configuration-interactive-setup.md) 指南。此外,您也可以直接编辑该文件以进行更精细的控制。
6
6
 
7
- ## 核心配置领域
7
+ 下图说明了配置工作流程:
8
8
 
9
- 您的文档由几个关键的配置领域来塑造。浏览这些指南,了解如何微调生成过程的每个方面。
9
+ ```d2 配置工作流程
10
+ direction: down
11
+
12
+ User: {
13
+ shape: person
14
+ }
15
+
16
+ CLI: {
17
+ label: "运行命令\n'aigne doc init'"
18
+ shape: rectangle
19
+ }
20
+
21
+ Setup-Wizard: {
22
+ label: "交互式设置向导"
23
+ shape: rectangle
24
+ }
25
+
26
+ Config-File: {
27
+ label: ".aigne/doc-smith/config.yaml"
28
+ shape: rectangle
29
+ }
30
+
31
+ AIGNE-DocSmith-Engine: {
32
+ label: "AIGNE DocSmith 引擎"
33
+ }
34
+
35
+ # 路径 1:交互式设置(推荐)
36
+ User -> CLI: "推荐路径"
37
+ CLI -> Setup-Wizard: "启动"
38
+ Setup-Wizard -> Config-File: "创建/修改"
39
+
40
+ # 路径 2:手动编辑
41
+ User -> Config-File: "备用路径:\n直接编辑"
42
+
43
+ # 最后一步
44
+ Config-File -> AIGNE-DocSmith-Engine: "配置"
45
+ ```
46
+
47
+ ## 核心配置区域
48
+
49
+ 您的文档由几个关键的配置区域决定。请浏览这些指南,了解如何微调生成过程的各个方面。
10
50
 
11
51
  <x-cards data-columns="2">
12
52
  <x-card data-title="交互式设置" data-icon="lucide:wand-2" data-href="/configuration/interactive-setup">
13
53
  了解引导式向导如何帮助您配置文档项目,包括设置建议和冲突检测。
14
54
  </x-card>
15
55
  <x-card data-title="LLM 设置" data-icon="lucide:brain-circuit" data-href="/configuration/llm-setup">
16
- 了解如何连接不同的 AI 模型,包括使用无需 API 密钥的内置 AIGNE Hub。
56
+ 了解如何连接不同的 AI 模型,包括使用内置的、无需 API 密钥的 AIGNE Hub。
17
57
  </x-card>
18
58
  <x-card data-title="语言支持" data-icon="lucide:languages" data-href="/configuration/language-support">
19
59
  查看支持的语言完整列表,并了解如何设置主语言和启用自动翻译。
20
60
  </x-card>
21
- <x-card data-title="管理偏好" data-icon="lucide:sliders-horizontal" data-href="/configuration/preferences">
61
+ <x-card data-title="管理偏好设置" data-icon="lucide:sliders-horizontal" data-href="/configuration/preferences">
22
62
  了解 DocSmith 如何利用您的反馈创建持久性规则,以及如何通过 CLI 管理这些规则。
23
63
  </x-card>
24
64
  </x-cards>
25
65
 
26
66
  ## 参数参考
27
67
 
28
- `config.yaml` 文件包含几个控制文档输出的键值对。以下是每个参数的详细参考。
68
+ `config.yaml` 文件包含多个控制文档输出的键值对。以下是每个参数的详细参考。
29
69
 
30
70
  ### 项目信息
31
71
 
@@ -33,20 +73,20 @@ AIGNE DocSmith 的行为由一个中央文件 `config.yaml` 控制,该文件
33
73
 
34
74
  | 参数 | 描述 |
35
75
  |---|---|
36
- | `projectName` | 您的项目名称。如果可用,则从 `package.json` 中检测。 |
37
- | `projectDesc` | 您的项目的简短描述。从 `package.json` 中检测。 |
38
- | `projectLogo` | 您的项目徽标图像的路径或 URL。 |
76
+ | `projectName` | 您的项目名称。如果 `package.json` 文件存在,则从中检测。 |
77
+ | `projectDesc` | 您的项目简短描述。从 `package.json` 文件中检测。 |
78
+ | `projectLogo` | 您的项目徽标图片的路径或 URL。 |
39
79
 
40
80
  ### 文档策略
41
81
 
42
82
  这些参数定义了生成内容的基调、风格和深度。
43
83
 
44
84
  #### `documentPurpose`
45
- 定义您希望读者实现的主要成果。此设置会影响文档的整体结构和重点。
85
+ 定义您希望读者实现的主要成果。此设置影响文档的整体结构和重点。
46
86
 
47
87
  | 选项 | 名称 | 描述 |
48
88
  |---|---|---|
49
- | `getStarted` | 快速入门 | 帮助新用户在30分钟内从零开始上手。 |
89
+ | `getStarted` | 快速入门 | 帮助新用户在 30 分钟内从零开始上手。 |
50
90
  | `completeTasks` | 完成特定任务 | 引导用户完成常见的工作流程和用例。 |
51
91
  | `findAnswers` | 快速查找答案 | 为所有功能和 API 提供可搜索的参考。 |
52
92
  | `understandSystem`| 理解系统 | 解释其工作原理以及做出设计决策的原因。 |
@@ -54,30 +94,30 @@ AIGNE DocSmith 的行为由一个中央文件 `config.yaml` 控制,该文件
54
94
  | `mixedPurpose` | 服务于多种目的 | 涵盖多种需求的文档。 |
55
95
 
56
96
  #### `targetAudienceTypes`
57
- 定义最常阅读此文档的读者。此选择会影响写作风格和示例。
97
+ 定义最常阅读此文档的受众。此选择会影响写作风格和示例。
58
98
 
59
99
  | 选项 | 名称 | 描述 |
60
100
  |---|---|---|
61
101
  | `endUsers` | 最终用户(非技术人员) | 使用产品但不编码的人员。 |
62
- | `developers` | 集成您的产品/API 的开发人员 | 将此添加到其项目中的工程师。 |
102
+ | `developers` | 集成您的产品/API 的开发者 | 将此添加到其项目中的工程师。 |
63
103
  | `devops` | DevOps / SRE / 基础设施团队 | 部署、监控和维护系统的团队。 |
64
- | `decisionMakers`| 技术决策者 | 评估或计划实施的架构师或负责人。 |
104
+ | `decisionMakers`| 技术决策者 | 评估或规划实施的架构师或负责人。 |
65
105
  | `supportTeams` | 支持团队 | 帮助他人使用产品的人员。 |
66
- | `mixedTechnical`| 混合技术受众 | 开发人员、DevOps 和其他技术用户。 |
106
+ | `mixedTechnical`| 混合技术受众 | 开发者、DevOps 和其他技术用户。 |
67
107
 
68
108
  #### `readerKnowledgeLevel`
69
- 定义读者通常在阅读前已具备的知识。这会调整对基础知识的假设程度。
109
+ 定义读者通常具备的知识水平。这会调整对基础知识的假设程度。
70
110
 
71
111
  | 选项 | 名称 | 描述 |
72
112
  |---|---|---|
73
- | `completeBeginners` | 完全是初学者,从零开始 | 完全不熟悉该领域/技术。 |
113
+ | `completeBeginners` | 完全是初学者,从零开始 | 完全不熟悉此领域/技术。 |
74
114
  | `domainFamiliar` | 之前使用过类似的工具 | 了解问题领域,但对这个具体解决方案不熟悉。 |
75
115
  | `experiencedUsers` | 是试图做某件特定事情的专家 | 需要参考或高级主题的常规用户。 |
76
- | `emergencyTroubleshooting`| 紧急/故障排查 | 某些东西坏了,需要快速修复。 |
77
- | `exploringEvaluating` | 正在将此工具与其他工具进行评估 | 试图了解这是否符合他们的需求。 |
116
+ | `emergencyTroubleshooting`| 紧急情况/故障排查 | 某些东西坏了,需要快速修复。 |
117
+ | `exploringEvaluating` | 正在评估此工具并与其他工具进行比较 | 试图了解这是否符合他们的需求。 |
78
118
 
79
119
  #### `documentationDepth`
80
- 定义文档应达到的全面程度。
120
+ 定义文档的全面程度。
81
121
 
82
122
  | 选项 | 名称 | 描述 |
83
123
  |---|---|---|
@@ -88,12 +128,12 @@ AIGNE DocSmith 的行为由一个中央文件 `config.yaml` 控制,该文件
88
128
 
89
129
  ### 自定义指令
90
130
 
91
- 为了更精细的控制,您可以提供自由文本指令。
131
+ 为了进行更精细的控制,您可以提供自由文本指令。
92
132
 
93
133
  | 参数 | 描述 |
94
134
  |---|---|
95
135
  | `rules` | 一个多行字符串,您可以在其中定义特定的文档生成规则(例如,“始终包含性能基准测试”)。 |
96
- | `targetAudience`| 一个多行字符串,用于比预设更详细地描述您的特定目标受众。 |
136
+ | `targetAudience`| 一个多行字符串,用于比预设选项更详细地描述您的特定目标受众。 |
97
137
 
98
138
  ### 语言和路径配置
99
139
 
@@ -101,20 +141,20 @@ AIGNE DocSmith 的行为由一个中央文件 `config.yaml` 控制,该文件
101
141
 
102
142
  | 参数 | 描述 |
103
143
  |---|---|
104
- | `locale` | 文档的主要语言(例如 `en`、`zh`)。 |
105
- | `translateLanguages` | 要将文档翻译成的语言代码列表(例如 `[ja, fr, es]`)。 |
106
- | `docsDir` | 保存生成的文档文件的目录。 |
107
- | `sourcesPath` | 供 DocSmith 分析的源代码路径或 glob 模式列表(例如 `['./src', './lib/**/*.js']`)。 |
108
- | `glossary` | 包含项目特定术语的 markdown 文件(`@glossary.md`)的路径,以确保翻译的一致性。 |
144
+ | `locale` | 文档的主要语言(例如,`en`、`zh`)。 |
145
+ | `translateLanguages` | 要将文档翻译成的语言代码列表(例如,`[ja, fr, es]`)。 |
146
+ | `docsDir` | 生成的文档文件将保存到的目录。 |
147
+ | `sourcesPath` | 供 DocSmith 分析的源代码路径或 glob 模式列表(例如,`['./src', './lib/**/*.js']`)。 |
148
+ | `glossary` | 包含项目特定术语的 Markdown 文件(`@glossary.md`)路径,以确保翻译的一致性。 |
109
149
 
110
150
  ## `config.yaml` 示例
111
151
 
112
- 这是一个完整的配置文件示例。您可以随时直接编辑此文件以更改设置。
152
+ 这是一个完整的配置文件示例。您可以随时直接编辑此文件来更改设置。
113
153
 
114
- ```yaml Example config.yaml icon=logos:yaml
154
+ ```yaml config.yaml 示例 icon=logos:yaml
115
155
  # 用于文档发布的项目信息
116
156
  projectName: AIGNE DocSmith
117
- projectDesc: 一个 AI 驱动的文档生成工具。
157
+ projectDesc: An AI-driven documentation generation tool.
118
158
  projectLogo: https://docsmith.aigne.io/image-bin/uploads/def424c20bbdb3c77483894fe0e22819.png
119
159
 
120
160
  # =============================================================================
@@ -132,11 +172,11 @@ documentPurpose:
132
172
  targetAudienceTypes:
133
173
  - developers
134
174
 
135
- # 读者知识水平:读者在阅读前通常具备哪些知识?
175
+ # 读者知识水平:读者通常具备哪些知识?
136
176
  # 选项:completeBeginners, domainFamiliar, experiencedUsers, emergencyTroubleshooting, exploringEvaluating
137
177
  readerKnowledgeLevel: domainFamiliar
138
178
 
139
- # 文档深度:文档应达到多大的全面程度?
179
+ # 文档深度:文档应有多全面?
140
180
  # 选项:essentialOnly, balancedCoverage, comprehensive, aiDecide
141
181
  documentationDepth: balancedCoverage
142
182
 
@@ -148,7 +188,7 @@ rules: |+
148
188
  targetAudience: |+
149
189
 
150
190
 
151
- # 术语表:包含项目特定术语和定义的 markdown 文件的路径
191
+ # 词汇表:包含项目特定术语和定义的 Markdown 文件路径
152
192
  # glossary: "@glossary.md"
153
193
 
154
194
  # 文档的主要语言
@@ -159,7 +199,7 @@ locale: en
159
199
  # - zh
160
200
  # - fr
161
201
 
162
- # 保存生成的文档的目录
202
+ # 保存生成文档的目录
163
203
  docsDir: .aigne/doc-smith/docs
164
204
 
165
205
  # 要分析的源代码路径
@@ -167,6 +207,6 @@ sourcesPath:
167
207
  - ./
168
208
  ```
169
209
 
170
- 配置设置完成后,您就可以创建符合项目需求的文档了。下一步是运行生成命令。
210
+ 配置完成后,您就可以创建符合项目需求的文档了。下一步是运行生成命令。
171
211
 
172
212
  ➡️ **下一步:** [生成文档](./features-generate-documentation.md)
@@ -1,101 +1,95 @@
1
1
  # ドキュメントの生成
2
2
 
3
- `aigne doc generate`コマンドは、ソースコードから完全なドキュメントセットを作成するための中核機能です。このプロセスでは、コードベースを分析し、論理的なドキュメント構造を計画し、各セクションのコンテンツを生成します。これは、ドキュメントをゼロから作成するための主要な方法です。
3
+ `aigne doc generate` コマンドは、ソースコードから完全なドキュメントセットを作成するための主要な機能です。このコマンドは、コードベースを分析し、論理的なドキュメント構造を計画し、各セクションのコンテンツを生成するプロセスを開始します。これは、初期状態からドキュメントを作成するための標準的な方法です。
4
4
 
5
5
  ## 最初の生成
6
6
 
7
7
  まず、プロジェクトのルートディレクトリに移動し、次のコマンドを実行します。
8
8
 
9
- ```bash
9
+ ```bash aigne doc generate icon=lucide:play-circle
10
10
  aigne doc generate
11
11
  ```
12
12
 
13
13
  ### 自動設定
14
14
 
15
- このコマンドをプロジェクトで初めて実行すると、DocSmithは設定が存在しないことを検出し、対話型のセットアップウィザードを起動して初期設定を案内します。これにより、生成を開始する前に環境が適切に設定されていることを確認できます。
15
+ プロジェクトでこのコマンドを初めて実行する場合、DocSmith は設定が存在しないことを検出します。その後、対話式のセットアップウィザードが自動的に起動し、必要な設定手順を案内します。このプロセスにより、生成が開始される前に有効な設定が確実に配置されます。
16
16
 
17
- ![初めてgenerateコマンドを実行するとセットアップウィザードがトリガーされます](https://docsmith.aigne.io/image-bin/uploads/0c45a32667c5250e54194a61d9495965.png)
17
+ ![generate コマンドの実行、初期化のスマートな実行](../assets/screenshots/doc-generate.png)
18
18
 
19
- 以下を定義するための一連の質問が表示されます。
19
+ ドキュメントの主要な側面を定義するための一連の質問に答えるよう求められます。これには以下が含まれます。
20
20
 
21
- - ドキュメントの生成ルールとスタイル
22
- - 対象読者
23
- - プライマリ言語と翻訳言語
24
- - ソースコードと出力パス
21
+ * ドキュメント生成ルールとスタイル
22
+ * 対象読者
23
+ * 主要言語と追加の翻訳言語
24
+ * ソースコードの入力パスとドキュメントの出力パス
25
25
 
26
- ![質問に答えて、ドキュメントのスタイル、言語、ソースパスを設定します](https://docsmith.aigne.io/image-bin/uploads/fbedbfa256036ad6375a6c18047a75ad.png)
26
+ ![質問に答えてプロジェクトのセットアップを完了](../assets/screenshots/doc-complete-setup.png)
27
27
 
28
- 設定が完了すると、DocSmithはドキュメントの生成に進みます。
28
+ 設定が完了すると、DocSmith はドキュメントの生成に進みます。
29
29
 
30
- ![DocSmithがコードを分析し、構造を計画し、各ドキュメントを生成します](https://docsmith.aigne.io/image-bin/uploads/d0766c19380a02eb8a6f8ce86a838849.png)
30
+ ![構造計画の実行とドキュメントの生成](../assets/screenshots/doc-generate-docs.png)
31
31
 
32
- 正常に完了すると、新しく作成されたドキュメントが指定した出力ディレクトリで利用可能になります。
32
+ 正常に完了すると、新しく作成されたドキュメントは、セットアップ中に指定された出力ディレクトリで利用可能になります。
33
33
 
34
- ![完了すると、指定した出力ディレクトリに新しいドキュメントが見つかります](https://docsmith.aigne.io/image-bin/uploads/0967443611408ad9d0042793d590b8fd.png)
34
+ ![ドキュメントが正常に生成されました](../assets/screenshots/doc-generated-successfully.png)
35
35
 
36
36
  ## 生成プロセス
37
37
 
38
- `generate`コマンドは、自動化されたワークフローに従います。プロセスは次のように視覚化できます。
38
+ `generate` コマンドは、自動化されたマルチステップのワークフローを実行します。プロセスは以下の通りです。
39
39
 
40
40
  ```d2
41
41
  direction: down
42
42
 
43
- start: "開始" {
44
- shape: oval
43
+ User: {
44
+ shape: c4-person
45
45
  }
46
46
 
47
- run_cmd: "`aigne doc generate` を実行" {
48
- shape: rectangle
49
- }
47
+ AIGNE-CLI: {
48
+ label: "AIGNE CLI"
50
49
 
51
- check_config: "設定は存在するか?" {
52
- shape: diamond
53
- }
50
+ config-check: {
51
+ label: "設定ファイルは存在しますか?"
52
+ shape: diamond
53
+ }
54
54
 
55
- interactive_setup: "対話型セットアップウィザードを起動" {
56
- shape: rectangle
57
- }
55
+ interactive-setup: {
56
+ label: "対話式セットアップウィザード"
57
+ }
58
58
 
59
- plan_structure: "1. コードを分析し、構造を計画" {
60
- shape: rectangle
61
- }
59
+ generation-process: {
60
+ label: "3. 生成プロセス"
62
61
 
63
- gen_content: "2. ドキュメントコンテンツを生成" {
64
- shape: rectangle
65
- }
62
+ analyze-code: "コードの分析"
63
+ plan-structure: "構造の計画"
64
+ generate-content: "コンテンツの生成"
66
65
 
67
- save_docs: "3. ドキュメントを保存" {
68
- shape: rectangle
69
- }
66
+ analyze-code -> plan-structure -> generate-content
67
+ }
70
68
 
71
- end: "終了" {
72
- shape: oval
69
+ output: {
70
+ label: "出力ディレクトリ"
71
+ }
73
72
  }
74
73
 
75
- start -> run_cmd
76
- run_cmd -> check_config
77
- check_config -> interactive_setup: "いいえ"
78
- interactive_setup -> plan_structure
79
- check_config -> plan_structure: "はい"
80
- plan_structure -> gen_content
81
- gen_content -> save_docs
82
- save_docs -> end
74
+ User -> AIGNE-CLI.config-check: "'aigne doc generate'"
75
+ AIGNE-CLI.config-check -> AIGNE-CLI.interactive-setup: "[いいえ] 2. セットアップの開始"
76
+ AIGNE-CLI.interactive-setup -> AIGNE-CLI.generation-process: "設定ファイルの作成"
77
+ AIGNE-CLI.config-check -> AIGNE-CLI.generation-process: "[はい]"
78
+ AIGNE-CLI.generation-process -> AIGNE-CLI.output: "4. ドキュメントの書き込み"
83
79
  ```
84
80
 
85
81
  ## コマンドオプション
86
82
 
87
- デフォルトの`generate`コマンドはほとんどのユースケースで十分ですが、生成プロセスを制御するためにいくつかのオプションを使用できます。これらは、コンテンツの再生成やドキュメント構造の改良に役立ちます。
83
+ デフォルトの `generate` コマンドは、ほとんどのユースケースで十分です。しかし、その動作を変更するためのいくつかのオプションが利用可能で、完全な再生成を強制したり、ドキュメント構造を洗練させたりするのに役立ちます。
88
84
 
89
- | オプション | 説明 | 例 |
90
- |---------------------|------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------|
91
- | `--forceRegenerate` | 既存のすべてのドキュメントを削除し、ゼロから再生成します。ソースコードや設定に大幅な変更を加えた後に使用します。 | `aigne doc generate --forceRegenerate` |
92
- | `--feedback` | セクションの追加、削除、再編成など、ドキュメント全体の構造を改良するための高レベルなフィードバックを提供します。 | `aigne doc generate --feedback "APIリファレンスセクションを追加"` |
93
- | `--model` | AIGNE Hubから特定の 大規模言語モデルを指定してコンテンツ生成に使用し、モデル間の切り替えを可能にします。 | `aigne doc generate --model claude:claude-3-5-sonnet` |
85
+ | オプション | 説明 | 例 |
86
+ | :------------------ | :--------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------- |
87
+ | `--forceRegenerate` | 既存のドキュメントをすべて削除し、最初から再生成します。ソースコードや設定に大幅な変更を加えた後に使用してください。 | `aigne doc generate --forceRegenerate` |
88
+ | `--feedback` | セクションの追加、削除、再編成など、ドキュメント全体の構造を洗練させるための大まかなフィードバックを提供します。 | `aigne doc generate --feedback "APIリファレンスを追加"` |
89
+ | `--model` | コンテンツ生成に使用するAIGNE Hubの特定の大規模言語モデルを指定し、異なるモデルを切り替えることができます。 | `aigne doc generate --model openai:gpt-4o` |
94
90
 
95
91
  ## 次のステップ
96
92
 
97
- 初期のドキュメントを生成した後も、プロジェクトは進化し続けます。ドキュメントをコードと同期させるためには、更新が必要です。次のセクションに進み、対象を絞った変更を行い、特定のファイルを再生成する方法を学びましょう。
93
+ 最初のドキュメントを生成した後も、プロジェクトは進化し続けます。ドキュメントをコードと同期させるためには、更新を行う必要があります。次のセクションでは、新しい要件やコードの変更に基づいて、対象を絞った変更を行い、特定のファイルを再生成する方法について説明します。
98
94
 
99
- <x-card data-title="更新と改良" data-icon="lucide:file-edit" data-href="/features/update-and-refine">
100
- コードが変更された際のドキュメントの更新方法や、フィードバックを使用して特定の改善を行う方法を学びます。
101
- </x-card>
95
+ <x-card data-title="更新と改良" data-icon="lucide:file-edit" data-href="/features/update-and-refine">コードが変更された際のドキュメントの更新方法や、フィードバックを用いた特定の改善方法について学びます。</x-card>
@@ -1,101 +1,95 @@
1
1
  # Generate Documentation
2
2
 
3
- The `aigne doc generate` command is the core function for creating a complete documentation set from your source code. This process analyzes your codebase, plans a logical document structure, and then generates content for each section. It's the primary way to create your documentation from scratch.
3
+ The `aigne doc generate` command is the primary function for creating a complete documentation set from your source code. This command initiates a process that analyzes your codebase, plans a logical documentation structure, and then generates content for each section. It is the standard method for creating your documentation from an initial state.
4
4
 
5
5
  ## Your First Generation
6
6
 
7
7
  To begin, navigate to your project's root directory and run the following command:
8
8
 
9
- ```bash
9
+ ```bash aigne doc generate icon=lucide:play-circle
10
10
  aigne doc generate
11
11
  ```
12
12
 
13
13
  ### Automatic Configuration
14
14
 
15
- If you run this command for the first time in a project, DocSmith detects that no configuration exists. It will then launch an interactive setup wizard to guide you through the initial setup. This ensures you have a properly configured environment before generation begins.
15
+ If you are running this command for the first time in a project, DocSmith will detect that no configuration exists. It will then automatically launch an interactive setup wizard to guide you through the required setup steps. This process ensures a valid configuration is in place before generation begins.
16
16
 
17
- ![Running the generate command for the first time triggers the setup wizard](https://docsmith.aigne.io/image-bin/uploads/0c45a32667c5250e54194a61d9495965.png)
17
+ ![Running generate command, smart execution of initialization](../assets/screenshots/doc-generate.png)
18
18
 
19
- You will be asked a series of questions to define:
19
+ You will be prompted to answer a series of questions to define key aspects of your documentation, including:
20
20
 
21
- - Document generation rules and style
22
- - The target audience
23
- - Primary and translation languages
24
- - Source code and output paths
21
+ * Document generation rules and style
22
+ * The target audience
23
+ * Primary language and any additional translation languages
24
+ * Source code input and documentation output paths
25
25
 
26
- ![Answer the questions to configure your documentation style, languages, and source paths](https://docsmith.aigne.io/image-bin/uploads/fbedbfa256036ad6375a6c18047a75ad.png)
26
+ ![Answer questions to complete project setup](../assets/screenshots/doc-complete-setup.png)
27
27
 
28
- Once the configuration is complete, DocSmith proceeds with the documentation generation.
28
+ After the configuration is complete, DocSmith proceeds with the documentation generation.
29
29
 
30
- ![DocSmith analyzes your code, plans the structure, and generates each document](https://docsmith.aigne.io/image-bin/uploads/d0766c19380a02eb8a6f8ce86a838849.png)
30
+ ![Executing structure planning and generating documents](../assets/screenshots/doc-generate-docs.png)
31
31
 
32
- Upon successful completion, your newly created documentation will be available in the output directory you specified.
32
+ Upon successful completion, the newly created documentation will be available in the output directory specified during setup.
33
33
 
34
- ![Once complete, you'll find your new documentation in the specified output directory](https://docsmith.aigne.io/image-bin/uploads/0967443611408ad9d0042793d590b8fd.png)
34
+ ![Documentation generated successfully](../assets/screenshots/doc-generated-successfully.png)
35
35
 
36
36
  ## The Generation Process
37
37
 
38
- The `generate` command follows an automated workflow. The process can be visualized as follows:
38
+ The `generate` command executes an automated, multi-step workflow. The process is outlined below:
39
39
 
40
40
  ```d2
41
41
  direction: down
42
42
 
43
- start: "Start" {
44
- shape: oval
43
+ User: {
44
+ shape: c4-person
45
45
  }
46
46
 
47
- run_cmd: "Run `aigne doc generate`" {
48
- shape: rectangle
49
- }
47
+ AIGNE-CLI: {
48
+ label: "AIGNE CLI"
50
49
 
51
- check_config: "Configuration Found?" {
52
- shape: diamond
53
- }
50
+ config-check: {
51
+ label: "Config file exists?"
52
+ shape: diamond
53
+ }
54
54
 
55
- interactive_setup: "Launch Interactive Setup Wizard" {
56
- shape: rectangle
57
- }
55
+ interactive-setup: {
56
+ label: "Interactive Setup Wizard"
57
+ }
58
58
 
59
- plan_structure: "1. Analyze Code & Plan Structure" {
60
- shape: rectangle
61
- }
59
+ generation-process: {
60
+ label: "3. Generation Process"
62
61
 
63
- gen_content: "2. Generate Document Content" {
64
- shape: rectangle
65
- }
62
+ analyze-code: "Analyze Code"
63
+ plan-structure: "Plan Structure"
64
+ generate-content: "Generate Content"
66
65
 
67
- save_docs: "3. Save Documents" {
68
- shape: rectangle
69
- }
66
+ analyze-code -> plan-structure -> generate-content
67
+ }
70
68
 
71
- end: "End" {
72
- shape: oval
69
+ output: {
70
+ label: "Output Directory"
71
+ }
73
72
  }
74
73
 
75
- start -> run_cmd
76
- run_cmd -> check_config
77
- check_config -> interactive_setup: "No"
78
- interactive_setup -> plan_structure
79
- check_config -> plan_structure: "Yes"
80
- plan_structure -> gen_content
81
- gen_content -> save_docs
82
- save_docs -> end
74
+ User -> AIGNE-CLI.config-check: "'aigne doc generate'"
75
+ AIGNE-CLI.config-check -> AIGNE-CLI.interactive-setup: "[No] 2. Launch setup"
76
+ AIGNE-CLI.interactive-setup -> AIGNE-CLI.generation-process: "Create config file"
77
+ AIGNE-CLI.config-check -> AIGNE-CLI.generation-process: "[Yes]"
78
+ AIGNE-CLI.generation-process -> AIGNE-CLI.output: "4. Write documentation"
83
79
  ```
84
80
 
85
81
  ## Command Options
86
82
 
87
- While the default `generate` command is sufficient for most use cases, you can use several options to control the generation process. These are useful for regenerating content or refining the document structure.
83
+ The default `generate` command is sufficient for most use cases. However, several options are available to modify its behavior, which can be useful for forcing a full regeneration or refining the documentation structure.
88
84
 
89
- | Option | Description | Example |
90
- |---------------------|------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------|
91
- | `--forceRegenerate` | Deletes all existing documents and regenerates them from scratch. Use this after making significant changes to your source code or configuration. | `aigne doc generate --forceRegenerate` |
92
- | `--feedback` | Provides high-level feedback to refine the overall documentation structure, such as adding, removing, or reorganizing sections. | `aigne doc generate --feedback "Add an API Reference section"` |
93
- | `--model` | Specifies a particular Large Language Model from AIGNE Hub to use for content generation, allowing you to switch between models. | `aigne doc generate --model claude:claude-3-5-sonnet` |
85
+ | Option | Description | Example |
86
+ | :------------------ | :--------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------- |
87
+ | `--forceRegenerate` | Deletes all existing documents and regenerates them from scratch. Use this after making significant changes to your source code or configuration. | `aigne doc generate --forceRegenerate` |
88
+ | `--feedback` | Provides high-level feedback to refine the overall documentation structure, such as adding, removing, or reorganizing sections. | `aigne doc generate --feedback "Add an API Reference"` |
89
+ | `--model` | Specifies a particular Large Language Model from AIGNE Hub to use for content generation, allowing you to switch between different models. | `aigne doc generate --model openai:gpt-4o` |
94
90
 
95
91
  ## What's Next?
96
92
 
97
- Now that you have generated your initial documentation, your project will continue to evolve. To keep your documents synchronized with your code, you will need to update them. Proceed to the next section to learn how to make targeted changes and regenerate specific files.
93
+ After generating the initial documentation, your project will continue to evolve. To keep your documents synchronized with your code, you will need to perform updates. The next section explains how to make targeted changes and regenerate specific files based on new requirements or code modifications.
98
94
 
99
- <x-card data-title="Update and Refine" data-icon="lucide:file-edit" data-href="/features/update-and-refine">
100
- Learn how to update documents when your code changes or make specific improvements using feedback.
101
- </x-card>
95
+ <x-card data-title="Update and Refine" data-icon="lucide:file-edit" data-href="/features/update-and-refine">Learn how to update documents when your code changes or make specific improvements using feedback.</x-card>