@aigne/doc-smith 0.8.12-beta.3 → 0.8.12-beta.4

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 (169) hide show
  1. package/.aigne/doc-smith/config.yaml +9 -6
  2. package/.aigne/doc-smith/output/structure-plan.json +123 -109
  3. package/.aigne/doc-smith/upload-cache.yaml +48 -0
  4. package/.github/workflows/publish-docs.yml +4 -7
  5. package/.release-please-manifest.json +1 -1
  6. package/CHANGELOG.md +13 -0
  7. package/agents/clear/choose-contents.mjs +22 -5
  8. package/agents/clear/clear-auth-tokens.mjs +2 -4
  9. package/agents/clear/clear-deployment-config.mjs +49 -0
  10. package/agents/clear/clear-document-config.mjs +2 -5
  11. package/agents/clear/clear-document-structure.mjs +2 -6
  12. package/agents/clear/clear-generated-docs.mjs +0 -1
  13. package/agents/generate/check-need-generate-structure.mjs +15 -60
  14. package/agents/generate/document-structure-tools/generate-sub-structure.mjs +131 -0
  15. package/agents/generate/generate-structure-without-tools.yaml +65 -0
  16. package/agents/generate/generate-structure.yaml +7 -1
  17. package/agents/generate/index.yaml +0 -3
  18. package/agents/generate/update-document-structure.yaml +3 -0
  19. package/agents/generate/user-review-document-structure.mjs +7 -5
  20. package/agents/init/index.mjs +15 -15
  21. package/agents/publish/publish-docs.mjs +130 -111
  22. package/agents/translate/index.yaml +1 -1
  23. package/agents/update/batch-generate-document.yaml +1 -1
  24. package/agents/update/batch-update-document.yaml +1 -1
  25. package/agents/update/check-document.mjs +3 -19
  26. package/agents/update/user-review-document.mjs +4 -3
  27. package/agents/utils/load-sources.mjs +54 -151
  28. package/agents/utils/transform-detail-datasources.mjs +14 -18
  29. package/aigne.yaml +2 -0
  30. package/biome.json +1 -1
  31. package/docs/_sidebar.md +13 -15
  32. package/docs/configuration-initial-setup.ja.md +179 -0
  33. package/docs/configuration-initial-setup.md +179 -0
  34. package/docs/configuration-initial-setup.zh-TW.md +179 -0
  35. package/docs/configuration-initial-setup.zh.md +179 -0
  36. package/docs/configuration-managing-preferences.ja.md +100 -0
  37. package/docs/configuration-managing-preferences.md +100 -0
  38. package/docs/configuration-managing-preferences.zh-TW.md +100 -0
  39. package/docs/configuration-managing-preferences.zh.md +100 -0
  40. package/docs/configuration.ja.md +68 -184
  41. package/docs/configuration.md +62 -178
  42. package/docs/configuration.zh-TW.md +70 -186
  43. package/docs/configuration.zh.md +67 -183
  44. package/docs/getting-started.ja.md +46 -78
  45. package/docs/getting-started.md +46 -78
  46. package/docs/getting-started.zh-TW.md +47 -79
  47. package/docs/getting-started.zh.md +47 -79
  48. package/docs/guides-cleaning-up.ja.md +50 -0
  49. package/docs/guides-cleaning-up.md +50 -0
  50. package/docs/guides-cleaning-up.zh-TW.md +50 -0
  51. package/docs/guides-cleaning-up.zh.md +50 -0
  52. package/docs/guides-evaluating-documents.ja.md +66 -0
  53. package/docs/guides-evaluating-documents.md +66 -0
  54. package/docs/guides-evaluating-documents.zh-TW.md +66 -0
  55. package/docs/guides-evaluating-documents.zh.md +66 -0
  56. package/docs/guides-generating-documentation.ja.md +149 -0
  57. package/docs/guides-generating-documentation.md +149 -0
  58. package/docs/guides-generating-documentation.zh-TW.md +149 -0
  59. package/docs/guides-generating-documentation.zh.md +149 -0
  60. package/docs/guides-interactive-chat.ja.md +85 -0
  61. package/docs/guides-interactive-chat.md +85 -0
  62. package/docs/guides-interactive-chat.zh-TW.md +85 -0
  63. package/docs/guides-interactive-chat.zh.md +85 -0
  64. package/docs/guides-managing-history.ja.md +51 -0
  65. package/docs/guides-managing-history.md +51 -0
  66. package/docs/guides-managing-history.zh-TW.md +51 -0
  67. package/docs/guides-managing-history.zh.md +51 -0
  68. package/docs/guides-publishing-your-docs.ja.md +78 -0
  69. package/docs/guides-publishing-your-docs.md +78 -0
  70. package/docs/guides-publishing-your-docs.zh-TW.md +78 -0
  71. package/docs/guides-publishing-your-docs.zh.md +78 -0
  72. package/docs/guides-translating-documentation.ja.md +95 -0
  73. package/docs/guides-translating-documentation.md +95 -0
  74. package/docs/guides-translating-documentation.zh-TW.md +95 -0
  75. package/docs/guides-translating-documentation.zh.md +95 -0
  76. package/docs/guides-updating-documentation.ja.md +77 -0
  77. package/docs/guides-updating-documentation.md +77 -0
  78. package/docs/guides-updating-documentation.zh-TW.md +77 -0
  79. package/docs/guides-updating-documentation.zh.md +77 -0
  80. package/docs/guides.ja.md +32 -0
  81. package/docs/guides.md +32 -0
  82. package/docs/guides.zh-TW.md +32 -0
  83. package/docs/guides.zh.md +32 -0
  84. package/docs/overview.ja.md +39 -60
  85. package/docs/overview.md +39 -60
  86. package/docs/overview.zh-TW.md +39 -60
  87. package/docs/overview.zh.md +39 -60
  88. package/docs/release-notes.ja.md +255 -0
  89. package/docs/release-notes.md +255 -0
  90. package/docs/release-notes.zh-TW.md +255 -0
  91. package/docs/release-notes.zh.md +255 -0
  92. package/package.json +4 -2
  93. package/prompts/common/document/content-rules-core.md +1 -0
  94. package/prompts/common/document-structure/document-structure-rules.md +8 -9
  95. package/prompts/common/document-structure/output-constraints.md +1 -1
  96. package/prompts/structure/document-rules.md +8 -2
  97. package/prompts/structure/generate/system-prompt.md +27 -2
  98. package/prompts/structure/generate/user-prompt.md +18 -0
  99. package/prompts/structure/update/system-prompt.md +12 -0
  100. package/prompts/structure/update/user-prompt.md +3 -0
  101. package/tests/agents/clear/choose-contents.test.mjs +8 -4
  102. package/tests/agents/generate/check-need-generate-structure.test.mjs +53 -63
  103. package/tests/agents/generate/document-structure-tools/generate-sub-structure.test.mjs +277 -0
  104. package/tests/agents/init/init.test.mjs +18 -18
  105. package/tests/agents/publish/publish-docs.test.mjs +79 -0
  106. package/tests/agents/update/check-document.test.mjs +7 -67
  107. package/tests/agents/utils/load-sources.test.mjs +90 -90
  108. package/tests/agents/utils/transform-detail-datasources.test.mjs +153 -196
  109. package/tests/utils/file-utils.test.mjs +309 -1
  110. package/utils/auth-utils.mjs +9 -3
  111. package/utils/constants/index.mjs +3 -1
  112. package/utils/file-utils.mjs +315 -0
  113. package/utils/utils.mjs +89 -50
  114. package/docs/advanced-how-it-works.ja.md +0 -101
  115. package/docs/advanced-how-it-works.md +0 -101
  116. package/docs/advanced-how-it-works.zh-TW.md +0 -101
  117. package/docs/advanced-how-it-works.zh.md +0 -101
  118. package/docs/advanced-quality-assurance.ja.md +0 -92
  119. package/docs/advanced-quality-assurance.md +0 -92
  120. package/docs/advanced-quality-assurance.zh-TW.md +0 -92
  121. package/docs/advanced-quality-assurance.zh.md +0 -92
  122. package/docs/advanced.ja.md +0 -20
  123. package/docs/advanced.md +0 -20
  124. package/docs/advanced.zh-TW.md +0 -20
  125. package/docs/advanced.zh.md +0 -20
  126. package/docs/changelog.ja.md +0 -486
  127. package/docs/changelog.md +0 -486
  128. package/docs/changelog.zh-TW.md +0 -486
  129. package/docs/changelog.zh.md +0 -486
  130. package/docs/cli-reference.ja.md +0 -311
  131. package/docs/cli-reference.md +0 -311
  132. package/docs/cli-reference.zh-TW.md +0 -311
  133. package/docs/cli-reference.zh.md +0 -311
  134. package/docs/configuration-interactive-setup.ja.md +0 -138
  135. package/docs/configuration-interactive-setup.md +0 -138
  136. package/docs/configuration-interactive-setup.zh-TW.md +0 -138
  137. package/docs/configuration-interactive-setup.zh.md +0 -138
  138. package/docs/configuration-language-support.ja.md +0 -64
  139. package/docs/configuration-language-support.md +0 -64
  140. package/docs/configuration-language-support.zh-TW.md +0 -64
  141. package/docs/configuration-language-support.zh.md +0 -64
  142. package/docs/configuration-llm-setup.ja.md +0 -56
  143. package/docs/configuration-llm-setup.md +0 -56
  144. package/docs/configuration-llm-setup.zh-TW.md +0 -56
  145. package/docs/configuration-llm-setup.zh.md +0 -56
  146. package/docs/configuration-preferences.ja.md +0 -144
  147. package/docs/configuration-preferences.md +0 -144
  148. package/docs/configuration-preferences.zh-TW.md +0 -144
  149. package/docs/configuration-preferences.zh.md +0 -144
  150. package/docs/features-generate-documentation.ja.md +0 -95
  151. package/docs/features-generate-documentation.md +0 -95
  152. package/docs/features-generate-documentation.zh-TW.md +0 -95
  153. package/docs/features-generate-documentation.zh.md +0 -95
  154. package/docs/features-publish-your-docs.ja.md +0 -130
  155. package/docs/features-publish-your-docs.md +0 -130
  156. package/docs/features-publish-your-docs.zh-TW.md +0 -130
  157. package/docs/features-publish-your-docs.zh.md +0 -130
  158. package/docs/features-translate-documentation.ja.md +0 -90
  159. package/docs/features-translate-documentation.md +0 -90
  160. package/docs/features-translate-documentation.zh-TW.md +0 -90
  161. package/docs/features-translate-documentation.zh.md +0 -90
  162. package/docs/features-update-and-refine.ja.md +0 -142
  163. package/docs/features-update-and-refine.md +0 -142
  164. package/docs/features-update-and-refine.zh-TW.md +0 -143
  165. package/docs/features-update-and-refine.zh.md +0 -142
  166. package/docs/features.ja.md +0 -62
  167. package/docs/features.md +0 -62
  168. package/docs/features.zh-TW.md +0 -62
  169. package/docs/features.zh.md +0 -62
@@ -1,142 +0,0 @@
1
- # Update and Refine
2
-
3
- Keeping documentation synchronized with an evolving codebase is a methodical process. AIGNE DocSmith provides direct and flexible commands to keep your content current, either through automatic updates based on code changes or through precise, feedback-driven refinements.
4
-
5
- This guide provides procedures for the following tasks:
6
-
7
- * Automatically updating documents when source code is modified.
8
- * Regenerating specific documents using targeted feedback.
9
- * Adjusting the overall documentation structure.
10
-
11
- ### Document Update Workflows
12
-
13
- The following diagram illustrates the different workflows available for updating your documentation:
14
-
15
- ```d2 Document Update Workflows
16
- direction: down
17
-
18
- Developer: {
19
- shape: c4-person
20
- }
21
-
22
- Source-Code: {
23
- label: "Source Code"
24
- }
25
-
26
- Documentation: {
27
- label: "Documentation"
28
- }
29
-
30
- Action-Choice: {
31
- label: "Choose Action"
32
- shape: diamond
33
- }
34
-
35
- Generate-Sync: {
36
- label: "aigne doc generate"
37
- shape: rectangle
38
-
39
- Change-Detection: {
40
- label: "Detect Changes?"
41
- shape: diamond
42
- }
43
- Regenerate-Affected: "Regenerate Affected"
44
- Regenerate-All: "Regenerate All"
45
-
46
- Change-Detection -> Regenerate-Affected: "Yes (Default)"
47
- Change-Detection -> Regenerate-All: "No\n(--forceRegenerate)"
48
- }
49
-
50
- Refine-Content: {
51
- label: "aigne doc update"
52
- }
53
-
54
- Refine-Structure: {
55
- label: "aigne doc generate\n--feedback"
56
- }
57
-
58
- Developer -> Action-Choice
59
-
60
- Action-Choice -> Generate-Sync: "Sync with Code"
61
- Action-Choice -> Refine-Content: "Refine Doc Content"
62
- Action-Choice -> Refine-Structure: "Refine Doc Structure"
63
-
64
- Source-Code -> Generate-Sync
65
-
66
- Generate-Sync.Regenerate-Affected -> Documentation: "Update"
67
- Generate-Sync.Regenerate-All -> Documentation: "Update"
68
- Refine-Content -> Documentation: "Update"
69
- Refine-Structure -> Documentation: "Update"
70
- ```
71
-
72
- ---
73
-
74
- ## Automatic Updates with Change Detection
75
-
76
- When you execute the `aigne doc generate` command, DocSmith first analyzes your codebase to detect changes since the last generation. It then regenerates only the documents affected by these changes. This default behavior conserves time and reduces API usage by avoiding redundant operations.
77
-
78
- ```shell icon=lucide:terminal
79
- # DocSmith will detect changes and update only what is necessary
80
- aigne doc generate
81
- ```
82
-
83
- ![DocSmith detects changes and regenerates only the required documents.](../assets/screenshots/doc-regenerate.png)
84
-
85
- ### Forcing a Full Regeneration
86
-
87
- To regenerate all documentation from scratch, bypassing the cache and change detection, use the `--forceRegenerate` flag. This is necessary when you have made significant configuration changes or require a complete rebuild to ensure consistency across all files.
88
-
89
- ```shell icon=lucide:terminal
90
- # Regenerate all documentation from the ground up
91
- aigne doc generate --forceRegenerate
92
- ```
93
-
94
- ---
95
-
96
- ## Refining Documents with Feedback
97
-
98
- You can refine documentation without corresponding code changes by providing direct feedback to the CLI commands. This is useful for improving clarity, adding examples, or adjusting the structure.
99
-
100
- ### Refining Individual Document Content
101
-
102
- To improve a specific document's content, use the `aigne doc update` command. This command allows you to provide targeted instructions for refinement and can be run in two modes: interactive or non-interactive.
103
-
104
- #### Interactive Mode
105
-
106
- For a guided process, run the command without arguments. DocSmith will present a menu to select the document you wish to update. After selection, you will be prompted to enter your feedback.
107
-
108
- ```shell icon=lucide:terminal
109
- # Start the interactive update process
110
- aigne doc update
111
- ```
112
-
113
- ![Interactively select the documents you wish to update.](../assets/screenshots/doc-update.png)
114
-
115
- #### Non-Interactive Mode
116
-
117
- For scripted or faster workflows, you can specify the document and feedback directly using flags. This enables precise, non-interactive updates.
118
-
119
- ```shell icon=lucide:terminal
120
- # Update a specific document with feedback
121
- aigne doc update --docs overview.md --feedback "Add a more detailed FAQ section at the end."
122
- ```
123
-
124
- The primary parameters for the `update` command are as follows:
125
-
126
- | Parameter | Description |
127
- | :--- | :--- |
128
- | `--docs` | The path to the document to be updated. This flag can be used multiple times for batch updates. |
129
- | `--feedback` | A string containing the specific instructions to be used when regenerating the document's content. |
130
-
131
- ### Optimizing the Overall Structure
132
-
133
- In addition to refining individual documents, you can adjust the overall documentation structure. If the existing organization is suboptimal or a section is missing, you can provide feedback to the `generate` command. This instructs DocSmith to re-evaluate the entire document plan based on your input.
134
-
135
- ```shell icon=lucide:terminal
136
- # Regenerate the documentation structure with specific feedback
137
- aigne doc generate --feedback "Remove the 'About' section and add a detailed 'API Reference'."
138
- ```
139
-
140
- This approach is intended for high-level changes to the document's table of contents, not for minor content edits within a single file.
141
-
142
- Once your content is refined, the next step is to prepare it for a global audience. For instructions, see the [Translate Documentation](./features-translate-documentation.md) guide.
@@ -1,143 +0,0 @@
1
- # 更新與完善
2
-
3
- 讓文件與不斷演進的程式碼庫保持同步是一項有條不紊的過程。AIGNE DocSmith 提供直接而靈活的指令,讓您能透過程式碼變更自動更新,或透過精確、由回饋驅動的完善方式,來保持內容的最新狀態。
4
-
5
- 本指南提供執行以下任務的程序:
6
-
7
- * 在原始碼修改時自動更新文件。
8
- * 使用針對性的回饋重新產生特定文件。
9
- * 調整整體文件結構。
10
-
11
- ### 文件更新工作流程
12
-
13
- 下圖說明了更新文件可用的不同工作流程:
14
-
15
- ```d2 文件更新工作流程
16
- direction: down
17
-
18
- Developer: {
19
- shape: c4-person
20
- label: "開發者"
21
- }
22
-
23
- Source-Code: {
24
- label: "原始碼"
25
- }
26
-
27
- Documentation: {
28
- label: "文件"
29
- }
30
-
31
- Action-Choice: {
32
- label: "選擇操作"
33
- shape: diamond
34
- }
35
-
36
- Generate-Sync: {
37
- label: "aigne doc generate"
38
- shape: rectangle
39
-
40
- Change-Detection: {
41
- label: "偵測變更?"
42
- shape: diamond
43
- }
44
- Regenerate-Affected: "重新產生受影響部分"
45
- Regenerate-All: "全部重新產生"
46
-
47
- Change-Detection -> Regenerate-Affected: "是 (預設)"
48
- Change-Detection -> Regenerate-All: "否\n(--forceRegenerate)"
49
- }
50
-
51
- Refine-Content: {
52
- label: "aigne doc update"
53
- }
54
-
55
- Refine-Structure: {
56
- label: "aigne doc generate\n--feedback"
57
- }
58
-
59
- Developer -> Action-Choice
60
-
61
- Action-Choice -> Generate-Sync: "與程式碼同步"
62
- Action-Choice -> Refine-Content: "完善文件內容"
63
- Action-Choice -> Refine-Structure: "完善文件結構"
64
-
65
- Source-Code -> Generate-Sync
66
-
67
- Generate-Sync.Regenerate-Affected -> Documentation: "更新"
68
- Generate-Sync.Regenerate-All -> Documentation: "更新"
69
- Refine-Content -> Documentation: "更新"
70
- Refine-Structure -> Documentation: "更新"
71
- ```
72
-
73
- ---
74
-
75
- ## 透過變更偵測自動更新
76
-
77
- 當您執行 `aigne doc generate` 指令時,DocSmith 會先分析您的程式碼庫,以偵測自上次產生以來的變更。然後,它只會重新產生受這些變更影響的文件。這種預設行為可以節省時間並減少 API 使用量,避免了多餘的操作。
78
-
79
- ```shell icon=lucide:terminal
80
- # DocSmith 將偵測變更並僅更新必要的部分
81
- aigne doc generate
82
- ```
83
-
84
- ![DocSmith 偵測變更並僅重新產生所需的文件。](../assets/screenshots/doc-regenerate.png)
85
-
86
- ### 強制完整重新產生
87
-
88
- 若要從頭開始重新產生所有文件,繞過快取和變更偵測,請使用 `--forceRegenerate` 旗標。當您進行了重大的設定變更或需要完全重建以確保所有檔案的一致性時,這項操作是必要的。
89
-
90
- ```shell icon=lucide:terminal
91
- # 從頭開始重新產生所有文件
92
- aigne doc generate --forceRegenerate
93
- ```
94
-
95
- ---
96
-
97
- ## 透過回饋完善文件
98
-
99
- 您可以透過向 CLI 指令提供直接回饋,在沒有相應程式碼變更的情況下完善文件。這對於提高清晰度、新增範例或調整結構很有用。
100
-
101
- ### 完善個別文件內容
102
-
103
- 若要改善特定文件的內容,請使用 `aigne doc update` 指令。此指令允許您提供針對性的完善指示,並可以互動或非互動兩種模式執行。
104
-
105
- #### 互動模式
106
-
107
- 若要進行引導式流程,請在不帶任何參數的情況下執行該指令。DocSmith 將會顯示一個選單,讓您選擇要更新的文件。選擇後,系統會提示您輸入回饋。
108
-
109
- ```shell icon=lucide:terminal
110
- # 開始互動式更新流程
111
- aigne doc update
112
- ```
113
-
114
- ![以互動方式選擇您希望更新的文件。](../assets/screenshots/doc-update.png)
115
-
116
- #### 非互動模式
117
-
118
- 對於腳本化或更快速的工作流程,您可以使用旗標直接指定文件和回饋。這可以實現精確的非互動式更新。
119
-
120
- ```shell icon=lucide:terminal
121
- # 透過回饋更新特定文件
122
- aigne doc update --docs overview.md --feedback "Add a more detailed FAQ section at the end."
123
- ```
124
-
125
- `update` 指令的主要參數如下:
126
-
127
- | 參數 | 說明 |
128
- | :--- | :--- |
129
- | `--docs` | 要更新的文件的路徑。此旗標可多次使用以進行批次更新。 |
130
- | `--feedback` | 一個字串,包含重新產生文件內容時要使用的具體指示。 |
131
-
132
- ### 最佳化整體結構
133
-
134
- 除了完善個別文件外,您還可以調整整體文件結構。如果現有組織結構不佳或缺少某個部分,您可以向 `generate` 指令提供回饋。這會指示 DocSmith 根據您的輸入重新評估整個文件計畫。
135
-
136
- ```shell icon=lucide:terminal
137
- # 透過特定回饋重新產生文件結構
138
- aigne doc generate --feedback "Remove the 'About' section and add a detailed 'API Reference'."
139
- ```
140
-
141
- 此方法適用於對文件目錄進行高層次的變更,而非針對單一檔案內的微小內容編輯。
142
-
143
- 內容完善後,下一步是為全球受眾做準備。相關說明,請參閱 [翻譯文件](./features-translate-documentation.md) 指南。
@@ -1,142 +0,0 @@
1
- # 更新和优化
2
-
3
- 让文档与不断演进的代码库保持同步是一个系统性的过程。AIGNE DocSmith 提供了直接且灵活的命令,可以通过基于代码变更的自动更新或通过精确、由反馈驱动的优化来保持您的内容为最新状态。
4
-
5
- 本指南提供了执行以下任务的步骤:
6
-
7
- * 在源代码修改时自动更新文档。
8
- * 使用有针对性的反馈重新生成特定文档。
9
- * 调整整体文档结构。
10
-
11
- ### 文档更新工作流
12
-
13
- 下图说明了可用于更新文档的不同工作流:
14
-
15
- ```d2 文档更新工作流
16
- direction: down
17
-
18
- Developer: {
19
- shape: c4-person
20
- }
21
-
22
- Source-Code: {
23
- label: "源代码"
24
- }
25
-
26
- Documentation: {
27
- label: "文档"
28
- }
29
-
30
- Action-Choice: {
31
- label: "选择操作"
32
- shape: diamond
33
- }
34
-
35
- Generate-Sync: {
36
- label: "aigne doc generate"
37
- shape: rectangle
38
-
39
- Change-Detection: {
40
- label: "检测变更?"
41
- shape: diamond
42
- }
43
- Regenerate-Affected: "重新生成受影响部分"
44
- Regenerate-All: "重新生成全部"
45
-
46
- Change-Detection -> Regenerate-Affected: "是 (默认)"
47
- Change-Detection -> Regenerate-All: "否\n(--forceRegenerate)"
48
- }
49
-
50
- Refine-Content: {
51
- label: "aigne doc update"
52
- }
53
-
54
- Refine-Structure: {
55
- label: "aigne doc generate\n--feedback"
56
- }
57
-
58
- Developer -> Action-Choice
59
-
60
- Action-Choice -> Generate-Sync: "与代码同步"
61
- Action-Choice -> Refine-Content: "优化文档内容"
62
- Action-Choice -> Refine-Structure: "优化文档结构"
63
-
64
- Source-Code -> Generate-Sync
65
-
66
- Generate-Sync.Regenerate-Affected -> Documentation: "更新"
67
- Generate-Sync.Regenerate-All -> Documentation: "更新"
68
- Refine-Content -> Documentation: "更新"
69
- Refine-Structure -> Documentation: "更新"
70
- ```
71
-
72
- ---
73
-
74
- ## 通过变更检测自动更新
75
-
76
- 当您执行 `aigne doc generate` 命令时,DocSmith 会首先分析您的代码库,以检测自上次生成以来的变更。然后,它仅重新生成受这些变更影响的文档。这种默认行为通过避免冗余操作来节省时间并减少 API 使用。
77
-
78
- ```shell icon=lucide:terminal
79
- # DocSmith 将检测变更并仅更新必要部分
80
- aigne doc generate
81
- ```
82
-
83
- ![DocSmith 检测变更并仅重新生成所需文档。](../assets/screenshots/doc-regenerate.png)
84
-
85
- ### 强制完全重新生成
86
-
87
- 要从头开始重新生成所有文档,绕过缓存和变更检测,请使用 `--forceRegenerate` 标志。当您进行了重大的配置更改或需要完全重建以确保所有文件的一致性时,这是必要的。
88
-
89
- ```shell icon=lucide:terminal
90
- # 从头开始重新生成所有文档
91
- aigne doc generate --forceRegenerate
92
- ```
93
-
94
- ---
95
-
96
- ## 通过反馈优化文档
97
-
98
- 您可以通过向 CLI 命令提供直接反馈来优化文档,而无需进行相应的代码更改。这对于提高清晰度、添加示例或调整结构非常有用。
99
-
100
- ### 优化单个文档内容
101
-
102
- 要改进特定文档的内容,请使用 `aigne doc update` 命令。该命令允许您提供有针对性的优化指令,并可以在两种模式下运行:交互式或非交互式。
103
-
104
- #### 交互模式
105
-
106
- 要进行引导式流程,请在不带参数的情况下运行该命令。DocSmith 将会显示一个菜单,供您选择要更新的文档。选择后,系统将提示您输入反馈。
107
-
108
- ```shell icon=lucide:terminal
109
- # 启动交互式更新流程
110
- aigne doc update
111
- ```
112
-
113
- ![以交互方式选择您希望更新的文档。](../assets/screenshots/doc-update.png)
114
-
115
- #### 非交互模式
116
-
117
- 对于脚本化或更快速的工作流,您可以使用标志直接指定文档和反馈。这样可以实现精确的非交互式更新。
118
-
119
- ```shell icon=lucide:terminal
120
- # 使用反馈更新特定文档
121
- aigne doc update --docs overview.md --feedback "Add a more detailed FAQ section at the end."
122
- ```
123
-
124
- `update` 命令的主要参数如下:
125
-
126
- | 参数 | 描述 |
127
- | :--- | :--- |
128
- | `--docs` | 要更新的文档的路径。此标志可以多次使用以进行批量更新。 |
129
- | `--feedback` | 一个包含在重新生成文档内容时要使用的具体指令的字符串。 |
130
-
131
- ### 优化整体结构
132
-
133
- 除了优化单个文档外,您还可以调整整体文档结构。如果现有组织结构不理想或缺少某个部分,您可以向 `generate` 命令提供反馈。这会指示 DocSmith 根据您的输入重新评估整个文档计划。
134
-
135
- ```shell icon=lucide:terminal
136
- # 使用特定反馈重新生成文档结构
137
- aigne doc generate --feedback "Remove the 'About' section and add a detailed 'API Reference'."
138
- ```
139
-
140
- 此方法旨在对文档的目录进行高层级更改,而非对单个文件内的细微内容进行编辑。
141
-
142
- 内容优化后,下一步是为全球受众做准备。有关说明,请参阅[翻译文档](./features-translate-documentation.md)指南。
@@ -1,62 +0,0 @@
1
- # コア機能
2
-
3
- AIGNE DocSmithは、初期作成からグローバルな配布まで、ドキュメントのライフサイクルを管理するための一連のコマンドを提供します。プロセスは、ドキュメントの生成、改良、翻訳、公開という標準的なワークフローに整理されています。
4
-
5
- ```d2
6
- direction: down
7
-
8
- source-code: {
9
- label: "ソースコード"
10
- shape: rectangle
11
- }
12
-
13
- generate-documentation: {
14
- label: "ドキュメントの生成"
15
- shape: rectangle
16
- }
17
-
18
- update-and-refine: {
19
- label: "更新と改良"
20
- shape: rectangle
21
- }
22
-
23
- translate-documentation: {
24
- label: "ドキュメントの翻訳"
25
- shape: rectangle
26
- }
27
-
28
- publish-docs: {
29
- label: "ドキュメントの公開"
30
- shape: rectangle
31
- }
32
-
33
- platform: {
34
- label: "DocSmith プラットフォーム\n(またはセルフホスト)"
35
- shape: cylinder
36
- }
37
-
38
- source-code -> generate-documentation
39
- generate-documentation -> update-and-refine
40
- update-and-refine -> translate-documentation
41
- translate-documentation -> publish-docs
42
- publish-docs -> platform
43
- ```
44
-
45
- 以下のセクションで、DocSmithの主な機能をご覧ください。
46
-
47
- <x-cards data-columns="2">
48
- <x-card data-title="ドキュメントの生成" data-icon="lucide:file-plus-2" data-href="/features/generate-documentation">
49
- 単一のコマンドを使用して、ソースコードから完全なドキュメントセットを作成します。
50
- </x-card>
51
- <x-card data-title="更新と改良" data-icon="lucide:edit" data-href="/features/update-and-refine">
52
- ドキュメントをコードの変更と同期させたり、特定のフィードバックを基に特定のドキュメントを再生成したりします。
53
- </x-card>
54
- <x-card data-title="ドキュメントの翻訳" data-icon="lucide:languages" data-href="/features/translate-documentation">
55
- コンテンツを複数の対応言語に翻訳し、プロジェクトを世界中のオーディエンスにアクセス可能にします。
56
- </x-card>
57
- <x-card data-title="ドキュメントの公開" data-icon="lucide:send" data-href="/features/publish-your-docs">
58
- 生成したドキュメントを公式のDocSmithプラットフォームまたは独自のセルフホストインスタンスに公開します。
59
- </x-card>
60
- </x-cards>
61
-
62
- これらの機能は、ドキュメントを作成および保守するための構造化されたワークフローを提供します。利用可能なすべてのコマンドとそのオプションの詳細なリストについては、[CLIコマンドリファレンス](./cli-reference.md)を参照してください。
package/docs/features.md DELETED
@@ -1,62 +0,0 @@
1
- # Core Features
2
-
3
- AIGNE DocSmith provides a set of commands to manage the documentation lifecycle, from initial creation to global distribution. The process is organized into a standard workflow: generating, refining,translating, and publishing your documentation.
4
-
5
- ```d2
6
- direction: down
7
-
8
- source-code: {
9
- label: "Source Code"
10
- shape: rectangle
11
- }
12
-
13
- generate-documentation: {
14
- label: "Generate Documentation"
15
- shape: rectangle
16
- }
17
-
18
- update-and-refine: {
19
- label: "Update and Refine"
20
- shape: rectangle
21
- }
22
-
23
- translate-documentation: {
24
- label: "Translate Documentation"
25
- shape: rectangle
26
- }
27
-
28
- publish-docs: {
29
- label: "Publish Your Docs"
30
- shape: rectangle
31
- }
32
-
33
- platform: {
34
- label: "DocSmith Platform\n(or self-hosted)"
35
- shape: cylinder
36
- }
37
-
38
- source-code -> generate-documentation
39
- generate-documentation -> update-and-refine
40
- update-and-refine -> translate-documentation
41
- translate-documentation -> publish-docs
42
- publish-docs -> platform
43
- ```
44
-
45
- Explore the main capabilities of DocSmith in the following sections:
46
-
47
- <x-cards data-columns="2">
48
- <x-card data-title="Generate Documentation" data-icon="lucide:file-plus-2" data-href="/features/generate-documentation">
49
- Create a complete set of documentation from your source code using a single command.
50
- </x-card>
51
- <x-card data-title="Update and Refine" data-icon="lucide:edit" data-href="/features/update-and-refine">
52
- Keep your documentation synchronized with code changes or regenerate specific documents with targeted feedback.
53
- </x-card>
54
- <x-card data-title="Translate Documentation" data-icon="lucide:languages" data-href="/features/translate-documentation">
55
- Translate your content into multiple supported languages to make your project accessible to a global audience.
56
- </x-card>
57
- <x-card data-title="Publish Your Docs" data-icon="lucide:send" data-href="/features/publish-your-docs">
58
- Publish your generated documentation to the official DocSmith platform or your own self-hosted instance.
59
- </x-card>
60
- </x-cards>
61
-
62
- These features provide a structured workflow for creating and maintaining documentation. For a detailed list of all available commands and their options, refer to the [CLI Command Reference](./cli-reference.md).
@@ -1,62 +0,0 @@
1
- # 核心功能
2
-
3
- AIGNE DocSmith 提供了一組指令來管理文件的生命週期,從初始建立到全球分發。整個過程被組織成一個標準的工作流程:產生、優化、翻譯和發布您的文件。
4
-
5
- ```d2
6
- direction: down
7
-
8
- source-code: {
9
- label: "原始碼"
10
- shape: rectangle
11
- }
12
-
13
- generate-documentation: {
14
- label: "產生文件"
15
- shape: rectangle
16
- }
17
-
18
- update-and-refine: {
19
- label: "更新與優化"
20
- shape: rectangle
21
- }
22
-
23
- translate-documentation: {
24
- label: "翻譯文件"
25
- shape: rectangle
26
- }
27
-
28
- publish-docs: {
29
- label: "發布您的文件"
30
- shape: rectangle
31
- }
32
-
33
- platform: {
34
- label: "DocSmith 平台\n(或自行託管)"
35
- shape: cylinder
36
- }
37
-
38
- source-code -> generate-documentation
39
- generate-documentation -> update-and-refine
40
- update-and-refine -> translate-documentation
41
- translate-documentation -> publish-docs
42
- publish-docs -> platform
43
- ```
44
-
45
- 在以下章節中探索 DocSmith 的主要功能:
46
-
47
- <x-cards data-columns="2">
48
- <x-card data-title="產生文件" data-icon="lucide:file-plus-2" data-href="/features/generate-documentation">
49
- 使用單一指令從您的原始碼建立一套完整的文件。
50
- </x-card>
51
- <x-card data-title="更新與優化" data-icon="lucide:edit" data-href="/features/update-and-refine">
52
- 讓您的文件與程式碼變更保持同步,或根據具體回饋重新產生特定文件。
53
- </x-card>
54
- <x-card data-title="翻譯文件" data-icon="lucide:languages" data-href="/features/translate-documentation">
55
- 將您的內容翻譯成多種支援的語言,讓您的專案能夠觸及全球使用者。
56
- </x-card>
57
- <x-card data-title="發布您的文件" data-icon="lucide:send" data-href="/features/publish-your-docs">
58
- 將您產生的文件發布到官方 DocSmith 平台或您自行託管的實例。
59
- </x-card>
60
- </x-cards>
61
-
62
- 這些功能提供了一個結構化的工作流程,用於建立和維護文件。有關所有可用指令及其選項的詳細列表,請參閱 [CLI 指令參考](./cli-reference.md)。
@@ -1,62 +0,0 @@
1
- # 核心功能
2
-
3
- AIGNE DocSmith 提供了一套命令来管理文档的整个生命周期,从初始创建到全球分发。该过程被组织成一个标准工作流程:生成、优化、翻译和发布您的文档。
4
-
5
- ```d2
6
- direction: down
7
-
8
- source-code: {
9
- label: "源代码"
10
- shape: rectangle
11
- }
12
-
13
- generate-documentation: {
14
- label: "生成文档"
15
- shape: rectangle
16
- }
17
-
18
- update-and-refine: {
19
- label: "更新与优化"
20
- shape: rectangle
21
- }
22
-
23
- translate-documentation: {
24
- label: "翻译文档"
25
- shape: rectangle
26
- }
27
-
28
- publish-docs: {
29
- label: "发布文档"
30
- shape: rectangle
31
- }
32
-
33
- platform: {
34
- label: "DocSmith 平台\n(或自托管)"
35
- shape: cylinder
36
- }
37
-
38
- source-code -> generate-documentation
39
- generate-documentation -> update-and-refine
40
- update-and-refine -> translate-documentation
41
- translate-documentation -> publish-docs
42
- publish-docs -> platform
43
- ```
44
-
45
- 在以下部分中,探索 DocSmith 的主要功能:
46
-
47
- <x-cards data-columns="2">
48
- <x-card data-title="生成文档" data-icon="lucide:file-plus-2" data-href="/features/generate-documentation">
49
- 使用单个命令从您的源代码创建一整套文档。
50
- </x-card>
51
- <x-card data-title="更新与优化" data-icon="lucide:edit" data-href="/features/update-and-refine">
52
- 让您的文档与代码更改保持同步,或根据特定反馈重新生成特定文档。
53
- </x-card>
54
- <x-card data-title="翻译文档" data-icon="lucide:languages" data-href="/features/translate-documentation">
55
- 将您的内容翻译成多种支持的语言,使您的项目能够面向全球受众。
56
- </x-card>
57
- <x-card data-title="发布文档" data-icon="lucide:send" data-href="/features/publish-your-docs">
58
- 将您生成的文档发布到官方 DocSmith 平台或您自己的自托管实例。
59
- </x-card>
60
- </x-cards>
61
-
62
- 这些功能为创建和维护文档提供了一个结构化的工作流程。有关所有可用命令及其选项的详细列表,请参阅 [CLI 命令参考](./cli-reference.md)。