@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,138 +1,142 @@
1
1
  # 更新と改良
2
2
 
3
- 進化するコードベースとドキュメントを同期させることは、重要なタスクです。AIGNE DocSmithは、コードの変更に基づく自動更新や、フィードバックに基づいた正確な改良を通じて、コンテンツを最新の状態に保つための直接的で柔軟な方法を提供します。
3
+ 進化するコードベースとドキュメントを同期させることは、系統的なプロセスです。AIGNE DocSmith は、コードの変更に基づく自動更新、またはフィードバックに基づいた正確な改良を通じて、コンテンツを最新の状態に保つための直接的で柔軟なコマンドを提供します。
4
4
 
5
- このガイドでは、以下の方法について説明します:
5
+ このガイドでは、以下のタスクの手順を説明します。
6
6
 
7
- - ソースコードが変更されたときにドキュメントを自動的に更新する。
8
- - 特定のフィードバックを使用して特定のドキュメントを再生成する。
9
- - ドキュメント全体の構造を調整する。
7
+ * ソースコードが変更されたときにドキュメントを自動的に更新する。
8
+ * ターゲットを絞ったフィードバックを使用して特定のドキュメントを再生成する。
9
+ * ドキュメント全体の構造を調整する。
10
10
 
11
- ### ドキュメント更新のワークフロー
11
+ ### ドキュメント更新ワークフロー
12
12
 
13
- 以下の図は、ドキュメントを更新するために利用できるさまざまなパスを示しています:
13
+ 以下の図は、ドキュメントを更新するために利用可能なさまざまなワークフローを示しています。
14
14
 
15
- ```d2 更新ワークフロー
15
+ ```d2 ドキュメント更新ワークフロー
16
16
  direction: down
17
17
 
18
- Start: {
19
- shape: circle
20
- label: "開始"
18
+ Developer: {
19
+ shape: c4-person
21
20
  }
22
21
 
23
- Code-Change: {
24
- label: "ソースコードまたは\n設定の変更"
25
- shape: rectangle
22
+ Source-Code: {
23
+ label: "ソースコード"
26
24
  }
27
25
 
28
- Content-Tweak: {
29
- label: "コンテンツの\n改善が必要か?"
30
- shape: rectangle
26
+ Documentation: {
27
+ label: "ドキュメント"
31
28
  }
32
29
 
33
- Structure-Tweak: {
34
- label: "構造の\n改善が必要か?"
35
- shape: rectangle
30
+ Action-Choice: {
31
+ label: "アクションを選択"
32
+ shape: diamond
36
33
  }
37
34
 
38
- Start -> Code-Change
39
- Start -> Content-Tweak
40
- Start -> Structure-Tweak
35
+ Generate-Sync: {
36
+ label: "aigne doc generate"
37
+ shape: rectangle
41
38
 
42
- Code-Change -> Generate-Command: "aigne doc generate"
39
+ Change-Detection: {
40
+ label: "変更を検出?"
41
+ shape: diamond
42
+ }
43
+ Regenerate-Affected: "影響を受けるものを再生成"
44
+ Regenerate-All: "すべてを再生成"
43
45
 
44
- Generate-Command -> Change-Detection: {
45
- label: "変更検出"
46
- shape: diamond
46
+ Change-Detection -> Regenerate-Affected: "はい (デフォルト)"
47
+ Change-Detection -> Regenerate-All: "いいえ\n(--forceRegenerate)"
47
48
  }
48
- Change-Detection -> Auto-Regen: "影響を受ける\nドキュメントを再生成"
49
49
 
50
- Content-Tweak -> Update-Command: "aigne doc update\n--feedback"
51
- Update-Command -> Manual-Regen: "特定の\nドキュメントを再生成"
52
-
53
- Structure-Tweak -> Generate-Feedback-Command: "aigne doc generate\n--feedback"
54
- Generate-Feedback-Command -> Replan: "ドキュメント構造を\n再計画"
50
+ Refine-Content: {
51
+ label: "aigne doc update"
52
+ }
55
53
 
56
- End: {
57
- shape: circle
58
- label: "ドキュメント更新済み"
54
+ Refine-Structure: {
55
+ label: "aigne doc generate\n--feedback"
59
56
  }
60
57
 
61
- Auto-Regen -> End
62
- Manual-Regen -> End
63
- Replan -> End
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: "更新"
64
70
  ```
65
71
 
66
72
  ---
67
73
 
68
74
  ## 変更検出による自動更新
69
75
 
70
- `aigne doc generate` コマンドを実行すると、DocSmithはコードベースを分析し、前回の実行からの変更を検出し、影響を受けるドキュメントのみを再生成します。このプロセスにより、時間を節約し、不要なAPI呼び出しを削減できます。
76
+ `aigne doc generate` コマンドを実行すると、DocSmith はまずコードベースを分析して、最後の生成以降の変更を検出します。次に、これらの変更によって影響を受けるドキュメントのみを再生成します。このデフォルトの動作により、冗長な操作を回避することで、時間を節約し、API の使用量を削減します。
71
77
 
72
78
  ```shell icon=lucide:terminal
73
- # DocSmithが変更を検出し、必要なものだけを更新します
79
+ # DocSmith が変更を検出し、必要なものだけを更新します
74
80
  aigne doc generate
75
81
  ```
76
82
 
77
- ![DocSmithが変更を検出し、必要なドキュメントのみを再生成します。](https://docsmith.aigne.io/image-bin/uploads/21a76b2f65d14d16a49c13d800f1e2c1.png)
83
+ ![DocSmith は変更を検出し、必要なドキュメントのみを再生成します。](../assets/screenshots/doc-regenerate.png)
78
84
 
79
- ### 完全な再生成を強制する
85
+ ### 完全な再生成の強制
80
86
 
81
- キャッシュや以前の状態を無視して、すべてのドキュメントを最初から再生成する必要がある場合は、`--forceRegenerate` フラグを使用します。これは、大幅な設定変更後や、完全に新しいビルドを確実にしたい場合に便利です。
87
+ キャッシュと変更検出をバイパスして、すべてのドキュメントを最初から再生成するには、`--forceRegenerate` フラグを使用します。これは、大幅な設定変更を行った場合や、すべてのファイルで一貫性を確保するために完全な再構築が必要な場合に必要です。
82
88
 
83
89
  ```shell icon=lucide:terminal
84
- # すべてのドキュメントをゼロから再生成します
90
+ # すべてのドキュメントをゼロから再生成する
85
91
  aigne doc generate --forceRegenerate
86
92
  ```
87
93
 
88
94
  ---
89
95
 
90
- ## 個々のドキュメントの改良
96
+ ## フィードバックによるドキュメントの改良
97
+
98
+ 対応するコードの変更なしに、CLI コマンドに直接フィードバックを提供することでドキュメントを改良できます。これは、明確さを向上させたり、例を追加したり、構造を調整したりするのに役立ちます。
91
99
 
92
- 対応するコードの変更なしに特定のドキュメントを改善するために、`aigne doc update` コマンドを使用すると、コンテンツの改良に関する的を絞った指示を提供できます。
100
+ ### 個別ドキュメント内容の改良
93
101
 
94
- このコマンドは、対話形式またはコマンドライン引数を介して直接、2つの方法で使用できます。
102
+ 特定のドキュメントの内容を改善するには、`aigne doc update` コマンドを使用します。このコマンドを使用すると、改良のための具体的な指示を提供でき、インタラクティブモードと非インタラクティブモードの2つのモードで実行できます。
95
103
 
96
- ### 対話モード
104
+ #### インタラクティブモード
97
105
 
98
- ガイド付きの体験をしたい場合は、引数なしでコマンドを実行します。DocSmithは、更新したいドキュメントを選択するためのメニューを表示します。選択後、フィードバックを入力するよう求められます。
106
+ ガイド付きのプロセスについては、引数なしでコマンドを実行します。DocSmith は、更新したいドキュメントを選択するためのメニューを表示します。選択後、フィードバックを入力するよう求められます。
99
107
 
100
108
  ```shell icon=lucide:terminal
101
- # 対話式の更新プロセスを開始します
109
+ # インタラクティブな更新プロセスを開始する
102
110
  aigne doc update
103
111
  ```
104
112
 
105
- ![更新したいドキュメントを対話形式で選択します。](https://docsmith.aigne.io/image-bin/uploads/75e9cf9823bb369c3d2b5a2e2da4ac06.png)
113
+ ![更新したいドキュメントをインタラクティブに選択します。](../assets/screenshots/doc-update.png)
106
114
 
107
- ### 直接的なコマンドライン更新
115
+ #### 非インタラクティブモード
108
116
 
109
- より高速なワークフローやスクリプト作成のために、フラグを使用してドキュメントとフィードバックを直接指定できます。これにより、正確で非対話的な更新が可能になります。
117
+ スクリプト化された、またはより高速なワークフローの場合、フラグを使用してドキュメントとフィードバックを直接指定できます。これにより、正確な非インタラクティブな更新が可能になります。
110
118
 
111
119
  ```shell icon=lucide:terminal
112
- # 特定のドキュメントにフィードバックを付けて更新します
113
- aigne doc update --docs overview.md --feedback "Add a more detailed FAQ section at the end."
120
+ # 特定のドキュメントをフィードバックで更新する
121
+ aigne doc update --docs overview.md --feedback "最後に、より詳細な FAQ セクションを追加してください。"
114
122
  ```
115
123
 
116
- `update` コマンドの主要なパラメータ:
117
-
118
- | パラメータ | 説明 |
119
- | ---------- | ------------------------------------------------------------------------------------------------ |
120
- | `--docs` | 更新したいドキュメントへのパス。バッチ更新のためにこのフラグを複数回使用できます。 |
121
- | `--feedback` | コンテンツを再生成する際に使用する具体的な指示。 |
122
-
123
- ---
124
+ `update` コマンドの主要なパラメータは次のとおりです。
124
125
 
125
- ## 全体構造の最適化
126
+ | パラメータ | 説明 |
127
+ | :--- | :--- |
128
+ | `--docs` | 更新するドキュメントへのパス。このフラグはバッチ更新のために複数回使用できます。 |
129
+ | `--feedback` | ドキュメントのコンテンツを再生成する際に使用される具体的な指示を含む文字列。 |
126
130
 
127
- 個々のドキュメントのコンテンツを改良するだけでなく、ドキュメント全体の構造も調整できます。セクションが欠けている場合や、既存の構成を改善できる場合は、`generate` コマンドにフィードバックを提供できます。
131
+ ### 全体構造の最適化
128
132
 
129
- このコマンドは、DocSmithに新しい入力に基づいてドキュメントプラン全体を再評価するよう指示します。
133
+ 個々のドキュメントの改良に加えて、ドキュメント全体の構造を調整することもできます。既存の構成が最適でない場合やセクションが欠落している場合は、`generate` コマンドにフィードバックを提供できます。これにより、DocSmith はあなたの入力に基づいてドキュメントプラン全体を再評価するよう指示されます。
130
134
 
131
135
  ```shell icon=lucide:terminal
132
- # 特定のフィードバックを付けてドキュメント構造を再生成します
133
- aigne doc generate --feedback "Remove the 'About' section and add a detailed 'API Reference'."
136
+ # 特定のフィードバックでドキュメント構造を再生成する
137
+ aigne doc generate --feedback "'概要'セクションを削除し、詳細な'APIリファレンス'を追加してください。"
134
138
  ```
135
139
 
136
- このアプローチは、行単位のコンテンツ編集ではなく、ドキュメントの目次に対する高レベルの変更に最適です。
140
+ このアプローチは、単一ファイル内のマイナーなコンテンツ編集ではなく、ドキュメントの目次に対する高レベルの変更を目的としています。
137
141
 
138
- これらのツールを使用すると、プロジェクトと共に進化する正確なドキュメントを維持できます。コンテンツが改良されたら、世界中のオーディエンスに公開できます。その方法については、[ドキュメントの翻訳](./features-translate-documentation.md)ガイドで学んでください。
142
+ コンテンツが改良されたら、次のステップはそれを世界中の読者に向けて準備することです。手順については、[ドキュメントの翻訳](./features-translate-documentation.md)ガイドを参照してください。
@@ -1,84 +1,90 @@
1
1
  # Update and Refine
2
2
 
3
- Keeping documentation synchronized with an evolving codebase is a critical task. AIGNE DocSmith provides direct and flexible methods to keep your content current, whether through automatic updates based on code changes or precise, feedback-driven refinements.
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
4
 
5
- This guide covers how to:
5
+ This guide provides procedures for the following tasks:
6
6
 
7
- - Automatically update documents when your source code changes.
8
- - Regenerate specific documents using targeted feedback.
9
- - Adjust the overall documentation structure.
7
+ * Automatically updating documents when source code is modified.
8
+ * Regenerating specific documents using targeted feedback.
9
+ * Adjusting the overall documentation structure.
10
10
 
11
11
  ### Document Update Workflows
12
12
 
13
- The following diagram illustrates the different paths you can take to update your documentation:
13
+ The following diagram illustrates the different workflows available for updating your documentation:
14
14
 
15
- ```d2 Update Workflows
15
+ ```d2 Document Update Workflows
16
16
  direction: down
17
17
 
18
- Start: {
19
- shape: circle
20
- label: "Start"
18
+ Developer: {
19
+ shape: c4-person
21
20
  }
22
21
 
23
- Code-Change: {
24
- label: "Source Code or\nConfig Changes"
25
- shape: rectangle
22
+ Source-Code: {
23
+ label: "Source Code"
26
24
  }
27
25
 
28
- Content-Tweak: {
29
- label: "Need Content\nImprovement?"
30
- shape: rectangle
26
+ Documentation: {
27
+ label: "Documentation"
31
28
  }
32
29
 
33
- Structure-Tweak: {
34
- label: "Need Structure\nImprovement?"
35
- shape: rectangle
30
+ Action-Choice: {
31
+ label: "Choose Action"
32
+ shape: diamond
36
33
  }
37
34
 
38
- Start -> Code-Change
39
- Start -> Content-Tweak
40
- Start -> Structure-Tweak
35
+ Generate-Sync: {
36
+ label: "aigne doc generate"
37
+ shape: rectangle
41
38
 
42
- Code-Change -> Generate-Command: "aigne doc generate"
39
+ Change-Detection: {
40
+ label: "Detect Changes?"
41
+ shape: diamond
42
+ }
43
+ Regenerate-Affected: "Regenerate Affected"
44
+ Regenerate-All: "Regenerate All"
43
45
 
44
- Generate-Command -> Change-Detection: {
45
- label: "Change Detection"
46
- shape: diamond
46
+ Change-Detection -> Regenerate-Affected: "Yes (Default)"
47
+ Change-Detection -> Regenerate-All: "No\n(--forceRegenerate)"
47
48
  }
48
- Change-Detection -> Auto-Regen: "Regenerates\nAffected Docs"
49
49
 
50
- Content-Tweak -> Update-Command: "aigne doc update\n--feedback"
51
- Update-Command -> Manual-Regen: "Regenerates\nSpecific Doc"
52
-
53
- Structure-Tweak -> Generate-Feedback-Command: "aigne doc generate\n--feedback"
54
- Generate-Feedback-Command -> Replan: "Re-plans Document\nStructure"
50
+ Refine-Content: {
51
+ label: "aigne doc update"
52
+ }
55
53
 
56
- End: {
57
- shape: circle
58
- label: "Docs Updated"
54
+ Refine-Structure: {
55
+ label: "aigne doc generate\n--feedback"
59
56
  }
60
57
 
61
- Auto-Regen -> End
62
- Manual-Regen -> End
63
- Replan -> End
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"
64
70
  ```
65
71
 
66
72
  ---
67
73
 
68
74
  ## Automatic Updates with Change Detection
69
75
 
70
- When you run the `aigne doc generate` command, DocSmith analyzes your codebase, detects any changes since the last run, and regenerates only the documents that are affected. This process saves time and reduces unnecessary API calls.
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.
71
77
 
72
78
  ```shell icon=lucide:terminal
73
- # DocSmith will detect changes and update only what's necessary
79
+ # DocSmith will detect changes and update only what is necessary
74
80
  aigne doc generate
75
81
  ```
76
82
 
77
- ![DocSmith detects changes and regenerates only the required documents.](https://docsmith.aigne.io/image-bin/uploads/21a76b2f65d14d16a49c13d800f1e2c1.png)
83
+ ![DocSmith detects changes and regenerates only the required documents.](../assets/screenshots/doc-regenerate.png)
78
84
 
79
85
  ### Forcing a Full Regeneration
80
86
 
81
- If you need to regenerate all documentation from scratch, ignoring any cached or previous state, use the `--forceRegenerate` flag. This is useful after significant configuration changes or when you want to ensure a completely fresh build.
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.
82
88
 
83
89
  ```shell icon=lucide:terminal
84
90
  # Regenerate all documentation from the ground up
@@ -87,52 +93,50 @@ aigne doc generate --forceRegenerate
87
93
 
88
94
  ---
89
95
 
90
- ## Refining Individual Documents
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.
91
99
 
92
- To improve a specific document without any corresponding code changes, the `aigne doc update` command allows you to provide targeted instructions for content refinement.
100
+ ### Refining Individual Document Content
93
101
 
94
- You can use this command in two ways: interactively or directly via command-line arguments.
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.
95
103
 
96
- ### Interactive Mode
104
+ #### Interactive Mode
97
105
 
98
- For a guided experience, run the command without any arguments. DocSmith will present a menu to select which document you want to update. After you choose, you'll be prompted to enter your feedback.
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.
99
107
 
100
108
  ```shell icon=lucide:terminal
101
109
  # Start the interactive update process
102
110
  aigne doc update
103
111
  ```
104
112
 
105
- ![Interactively select the documents you wish to update.](https://docsmith.aigne.io/image-bin/uploads/75e9cf9823bb369c3d2b5a2e2da4ac06.png)
113
+ ![Interactively select the documents you wish to update.](../assets/screenshots/doc-update.png)
106
114
 
107
- ### Direct Command-Line Updates
115
+ #### Non-Interactive Mode
108
116
 
109
- For faster workflows or scripting, you can specify the document and feedback directly using flags. This allows for precise, non-interactive updates.
117
+ For scripted or faster workflows, you can specify the document and feedback directly using flags. This enables precise, non-interactive updates.
110
118
 
111
119
  ```shell icon=lucide:terminal
112
120
  # Update a specific document with feedback
113
121
  aigne doc update --docs overview.md --feedback "Add a more detailed FAQ section at the end."
114
122
  ```
115
123
 
116
- Key parameters for the `update` command:
117
-
118
- | Parameter | Description |
119
- | ---------- | ------------------------------------------------------------------------------------------------ |
120
- | `--docs` | The path to the document you want to update. You can use this flag multiple times for batch updates. |
121
- | `--feedback` | The specific instructions to use when regenerating the content. |
122
-
123
- ---
124
+ The primary parameters for the `update` command are as follows:
124
125
 
125
- ## Optimizing the Overall Structure
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. |
126
130
 
127
- Beyond refining the content of individual documents, you can also adjust the overall documentation structure. If a section is missing or the existing organization could be improved, you can provide feedback to the `generate` command.
131
+ ### Optimizing the Overall Structure
128
132
 
129
- This command instructs DocSmith to re-evaluate the entire document plan based on your new input.
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.
130
134
 
131
135
  ```shell icon=lucide:terminal
132
136
  # Regenerate the documentation structure with specific feedback
133
137
  aigne doc generate --feedback "Remove the 'About' section and add a detailed 'API Reference'."
134
138
  ```
135
139
 
136
- This approach is best for high-level changes to the document's table of contents, rather than line-by-line content edits.
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.
137
141
 
138
- With these tools, you can maintain accurate documentation that evolves alongside your project. Once your content is refined, you can make it available to a global audience. Learn how in the [Translate Documentation](./features-translate-documentation.md) guide.
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,138 +1,143 @@
1
- # 更新與優化
1
+ # 更新與完善
2
2
 
3
- 讓文件與不斷演進的程式碼庫保持同步是一項關鍵任務。AIGNE DocSmith 提供了直接且靈活的方法來讓您的內容保持最新,無論是透過基於程式碼變更的自動更新,還是透過精確、由回饋意見驅動的優化。
3
+ 讓文件與不斷演進的程式碼庫保持同步是一項有條不紊的過程。AIGNE DocSmith 提供直接而靈活的指令,讓您能透過程式碼變更自動更新,或透過精確、由回饋驅動的完善方式,來保持內容的最新狀態。
4
4
 
5
- 本指南涵蓋如何:
5
+ 本指南提供執行以下任務的程序:
6
6
 
7
- - 在您的原始碼變更時自動更新文件。
8
- - 使用針對性的回饋意見重新生成特定文件。
9
- - 調整整體文件結構。
7
+ * 在原始碼修改時自動更新文件。
8
+ * 使用針對性的回饋重新產生特定文件。
9
+ * 調整整體文件結構。
10
10
 
11
11
  ### 文件更新工作流程
12
12
 
13
- 下圖說明了更新文件的不同路徑:
13
+ 下圖說明了更新文件可用的不同工作流程:
14
14
 
15
- ```d2 更新工作流程
15
+ ```d2 文件更新工作流程
16
16
  direction: down
17
17
 
18
- Start: {
19
- shape: circle
20
- label: "開始"
18
+ Developer: {
19
+ shape: c4-person
20
+ label: "開發者"
21
21
  }
22
22
 
23
- Code-Change: {
24
- label: "原始碼或\n設定檔變更"
25
- shape: rectangle
23
+ Source-Code: {
24
+ label: "原始碼"
26
25
  }
27
26
 
28
- Content-Tweak: {
29
- label: "需要內容\n改善?"
30
- shape: rectangle
27
+ Documentation: {
28
+ label: "文件"
31
29
  }
32
30
 
33
- Structure-Tweak: {
34
- label: "需要結構\n改善?"
35
- shape: rectangle
31
+ Action-Choice: {
32
+ label: "選擇操作"
33
+ shape: diamond
36
34
  }
37
35
 
38
- Start -> Code-Change
39
- Start -> Content-Tweak
40
- Start -> Structure-Tweak
36
+ Generate-Sync: {
37
+ label: "aigne doc generate"
38
+ shape: rectangle
41
39
 
42
- Code-Change -> Generate-Command: "aigne doc generate"
40
+ Change-Detection: {
41
+ label: "偵測變更?"
42
+ shape: diamond
43
+ }
44
+ Regenerate-Affected: "重新產生受影響部分"
45
+ Regenerate-All: "全部重新產生"
43
46
 
44
- Generate-Command -> Change-Detection: {
45
- label: "變更偵測"
46
- shape: diamond
47
+ Change-Detection -> Regenerate-Affected: "是 (預設)"
48
+ Change-Detection -> Regenerate-All: "否\n(--forceRegenerate)"
47
49
  }
48
- Change-Detection -> Auto-Regen: "重新生成\n受影響文件"
49
50
 
50
- Content-Tweak -> Update-Command: "aigne doc update\n--feedback"
51
- Update-Command -> Manual-Regen: "重新生成\n特定文件"
52
-
53
- Structure-Tweak -> Generate-Feedback-Command: "aigne doc generate\n--feedback"
54
- Generate-Feedback-Command -> Replan: "重新規劃文件\n結構"
51
+ Refine-Content: {
52
+ label: "aigne doc update"
53
+ }
55
54
 
56
- End: {
57
- shape: circle
58
- label: "文件已更新"
55
+ Refine-Structure: {
56
+ label: "aigne doc generate\n--feedback"
59
57
  }
60
58
 
61
- Auto-Regen -> End
62
- Manual-Regen -> End
63
- Replan -> End
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: "更新"
64
71
  ```
65
72
 
66
73
  ---
67
74
 
68
75
  ## 透過變更偵測自動更新
69
76
 
70
- 當您執行 `aigne doc generate` 命令時,DocSmith 會分析您的程式碼庫,偵測自上次執行以來的任何變更,並僅重新生成受影響的文件。此過程可節省時間並減少不必要的 API 呼叫。
77
+ 當您執行 `aigne doc generate` 指令時,DocSmith 會先分析您的程式碼庫,以偵測自上次產生以來的變更。然後,它只會重新產生受這些變更影響的文件。這種預設行為可以節省時間並減少 API 使用量,避免了多餘的操作。
71
78
 
72
79
  ```shell icon=lucide:terminal
73
- # DocSmith 將偵測變更並僅更新必要部分
80
+ # DocSmith 將偵測變更並僅更新必要的部分
74
81
  aigne doc generate
75
82
  ```
76
83
 
77
- ![DocSmith 偵測變更並僅重新生成所需文件。](https://docsmith.aigne.io/image-bin/uploads/21a76b2f65d14d16a49c13d800f1e2c1.png)
84
+ ![DocSmith 偵測變更並僅重新產生所需的文件。](../assets/screenshots/doc-regenerate.png)
78
85
 
79
- ### 強制完整重新生成
86
+ ### 強制完整重新產生
80
87
 
81
- 如果您需要從頭開始重新生成所有文件,忽略任何快取或先前的狀態,請使用 `--forceRegenerate` 標記。這在進行重大的設定變更後,或當您想確保一個完全全新的建置時非常有用。
88
+ 若要從頭開始重新產生所有文件,繞過快取和變更偵測,請使用 `--forceRegenerate` 旗標。當您進行了重大的設定變更或需要完全重建以確保所有檔案的一致性時,這項操作是必要的。
82
89
 
83
90
  ```shell icon=lucide:terminal
84
- # 從頭開始重新生成所有文件
91
+ # 從頭開始重新產生所有文件
85
92
  aigne doc generate --forceRegenerate
86
93
  ```
87
94
 
88
95
  ---
89
96
 
90
- ## 優化單一文件
97
+ ## 透過回饋完善文件
98
+
99
+ 您可以透過向 CLI 指令提供直接回饋,在沒有相應程式碼變更的情況下完善文件。這對於提高清晰度、新增範例或調整結構很有用。
91
100
 
92
- 若要在沒有相應程式碼變更的情況下改善特定文件,`aigne doc update` 命令允許您提供針對內容優化的具體指示。
101
+ ### 完善個別文件內容
93
102
 
94
- 您可以用兩種方式使用此命令:互動式或直接透過命令列參數。
103
+ 若要改善特定文件的內容,請使用 `aigne doc update` 指令。此指令允許您提供針對性的完善指示,並可以互動或非互動兩種模式執行。
95
104
 
96
- ### 互動模式
105
+ #### 互動模式
97
106
 
98
- 若要獲得引導式體驗,請在不帶任何參數的情況下執行此命令。DocSmith 將會顯示一個選單,讓您選擇要更新的文件。選擇後,系統會提示您輸入回饋意見。
107
+ 若要進行引導式流程,請在不帶任何參數的情況下執行該指令。DocSmith 將會顯示一個選單,讓您選擇要更新的文件。選擇後,系統會提示您輸入回饋。
99
108
 
100
109
  ```shell icon=lucide:terminal
101
110
  # 開始互動式更新流程
102
111
  aigne doc update
103
112
  ```
104
113
 
105
- ![以互動方式選擇您想更新的文件。](https://docsmith.aigne.io/image-bin/uploads/75e9cf9823bb369c3d2b5a2e2da4ac06.png)
114
+ ![以互動方式選擇您希望更新的文件。](../assets/screenshots/doc-update.png)
106
115
 
107
- ### 直接透過命令列更新
116
+ #### 非互動模式
108
117
 
109
- 為了更快速的工作流程或撰寫腳本,您可以使用標記直接指定文件和回饋意見。這允許進行精確、非互動式的更新。
118
+ 對於腳本化或更快速的工作流程,您可以使用旗標直接指定文件和回饋。這可以實現精確的非互動式更新。
110
119
 
111
120
  ```shell icon=lucide:terminal
112
- # 帶有回饋意見以更新特定文件
121
+ # 透過回饋更新特定文件
113
122
  aigne doc update --docs overview.md --feedback "Add a more detailed FAQ section at the end."
114
123
  ```
115
124
 
116
- `update` 命令的主要參數:
125
+ `update` 指令的主要參數如下:
117
126
 
118
127
  | 參數 | 說明 |
119
- | ---------- | ------------------------------------------------------------------------------------------------ |
120
- | `--docs` | 您想更新的文件的路徑。您可以多次使用此標記進行批次更新。 |
121
- | `--feedback` | 重新生成內容時要使用的具體指示。 |
122
-
123
- ---
124
-
125
- ## 優化整體結構
128
+ | :--- | :--- |
129
+ | `--docs` | 要更新的文件的路徑。此旗標可多次使用以進行批次更新。 |
130
+ | `--feedback` | 一個字串,包含重新產生文件內容時要使用的具體指示。 |
126
131
 
127
- 除了優化單一文件的內容,您還可以調整整體的文件結構。如果某個部分缺失或現有組織可以改進,您可以向 `generate` 命令提供回饋意見。
132
+ ### 最佳化整體結構
128
133
 
129
- 此命令指示 DocSmith 根據您的新輸入重新評估整個文件計畫。
134
+ 除了完善個別文件外,您還可以調整整體文件結構。如果現有組織結構不佳或缺少某個部分,您可以向 `generate` 指令提供回饋。這會指示 DocSmith 根據您的輸入重新評估整個文件計畫。
130
135
 
131
136
  ```shell icon=lucide:terminal
132
- # 帶有特定回饋意見以重新生成文件結構
137
+ # 透過特定回饋重新產生文件結構
133
138
  aigne doc generate --feedback "Remove the 'About' section and add a detailed 'API Reference'."
134
139
  ```
135
140
 
136
- 這種方法最適合對文件的目錄進行高層次的變更,而非逐行的內容編輯。
141
+ 此方法適用於對文件目錄進行高層次的變更,而非針對單一檔案內的微小內容編輯。
137
142
 
138
- 有了這些工具,您可以維護與您的專案一同演進的準確文件。一旦您的內容被優化,您就可以將其提供給全球的受眾。請在[翻譯文件](./features-translate-documentation.md)指南中了解如何操作。
143
+ 內容完善後,下一步是為全球受眾做準備。相關說明,請參閱 [翻譯文件](./features-translate-documentation.md) 指南。