@aigne/doc-smith 0.8.11-beta.6 → 0.8.11

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 (116) hide show
  1. package/.aigne/doc-smith/config.yaml +2 -0
  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 +20 -0
  7. package/README.md +1 -1
  8. package/agents/generate/document-structure-tools/add-document.mjs +35 -10
  9. package/agents/generate/document-structure-tools/delete-document.mjs +35 -12
  10. package/agents/generate/document-structure-tools/move-document.mjs +43 -17
  11. package/agents/generate/document-structure-tools/update-document.mjs +37 -10
  12. package/agents/generate/update-document-structure.yaml +1 -7
  13. package/agents/generate/user-review-document-structure.mjs +5 -4
  14. package/agents/translate/translate-document.yaml +1 -9
  15. package/agents/update/check-update-is-single.mjs +2 -1
  16. package/agents/update/document-tools/update-document-content.mjs +24 -14
  17. package/agents/update/fs-tools/glob.mjs +184 -0
  18. package/agents/update/fs-tools/grep.mjs +317 -0
  19. package/agents/update/fs-tools/read-file.mjs +307 -0
  20. package/agents/update/generate-document.yaml +4 -7
  21. package/agents/update/update-document-detail.yaml +6 -10
  22. package/agents/update/user-review-document.mjs +13 -13
  23. package/assets/screenshots/doc-complete-setup.png +0 -0
  24. package/assets/screenshots/doc-generate-docs.png +0 -0
  25. package/assets/screenshots/doc-generate.png +0 -0
  26. package/assets/screenshots/doc-generated-successfully.png +0 -0
  27. package/assets/screenshots/doc-publish.png +0 -0
  28. package/assets/screenshots/doc-regenerate.png +0 -0
  29. package/assets/screenshots/doc-translate-langs.png +0 -0
  30. package/assets/screenshots/doc-translate.png +0 -0
  31. package/assets/screenshots/doc-update.png +0 -0
  32. package/docs/advanced-how-it-works.ja.md +31 -31
  33. package/docs/advanced-how-it-works.md +9 -9
  34. package/docs/advanced-how-it-works.zh-TW.md +24 -24
  35. package/docs/advanced-how-it-works.zh.md +20 -20
  36. package/docs/advanced-quality-assurance.ja.md +57 -61
  37. package/docs/advanced-quality-assurance.md +57 -61
  38. package/docs/advanced-quality-assurance.zh-TW.md +57 -61
  39. package/docs/advanced-quality-assurance.zh.md +57 -61
  40. package/docs/advanced.ja.md +8 -4
  41. package/docs/advanced.md +7 -3
  42. package/docs/advanced.zh-TW.md +9 -5
  43. package/docs/advanced.zh.md +9 -5
  44. package/docs/changelog.ja.md +206 -29
  45. package/docs/changelog.md +177 -0
  46. package/docs/changelog.zh-TW.md +229 -52
  47. package/docs/changelog.zh.md +204 -27
  48. package/docs/cli-reference.ja.md +82 -52
  49. package/docs/cli-reference.md +56 -26
  50. package/docs/cli-reference.zh-TW.md +82 -52
  51. package/docs/cli-reference.zh.md +70 -40
  52. package/docs/configuration-interactive-setup.ja.md +45 -42
  53. package/docs/configuration-interactive-setup.md +8 -5
  54. package/docs/configuration-interactive-setup.zh-TW.md +26 -23
  55. package/docs/configuration-interactive-setup.zh.md +25 -22
  56. package/docs/configuration-language-support.ja.md +33 -63
  57. package/docs/configuration-language-support.md +32 -62
  58. package/docs/configuration-language-support.zh-TW.md +35 -65
  59. package/docs/configuration-language-support.zh.md +32 -62
  60. package/docs/configuration-llm-setup.ja.md +25 -23
  61. package/docs/configuration-llm-setup.md +20 -18
  62. package/docs/configuration-llm-setup.zh-TW.md +21 -19
  63. package/docs/configuration-llm-setup.zh.md +20 -18
  64. package/docs/configuration-preferences.ja.md +67 -52
  65. package/docs/configuration-preferences.md +56 -41
  66. package/docs/configuration-preferences.zh-TW.md +69 -54
  67. package/docs/configuration-preferences.zh.md +68 -53
  68. package/docs/configuration.ja.md +65 -81
  69. package/docs/configuration.md +19 -35
  70. package/docs/configuration.zh-TW.md +62 -79
  71. package/docs/configuration.zh.md +50 -67
  72. package/docs/features-generate-documentation.ja.md +44 -69
  73. package/docs/features-generate-documentation.md +36 -61
  74. package/docs/features-generate-documentation.zh-TW.md +42 -67
  75. package/docs/features-generate-documentation.zh.md +41 -67
  76. package/docs/features-publish-your-docs.ja.md +36 -36
  77. package/docs/features-publish-your-docs.md +2 -2
  78. package/docs/features-publish-your-docs.zh-TW.md +21 -21
  79. package/docs/features-publish-your-docs.zh.md +23 -23
  80. package/docs/features-translate-documentation.ja.md +40 -31
  81. package/docs/features-translate-documentation.md +15 -6
  82. package/docs/features-translate-documentation.zh-TW.md +37 -28
  83. package/docs/features-translate-documentation.zh.md +23 -14
  84. package/docs/features-update-and-refine.ja.md +68 -118
  85. package/docs/features-update-and-refine.md +58 -108
  86. package/docs/features-update-and-refine.zh-TW.md +67 -116
  87. package/docs/features-update-and-refine.zh.md +64 -114
  88. package/docs/features.ja.md +29 -19
  89. package/docs/features.md +25 -15
  90. package/docs/features.zh-TW.md +28 -18
  91. package/docs/features.zh.md +31 -21
  92. package/docs/getting-started.ja.md +40 -43
  93. package/docs/getting-started.md +36 -39
  94. package/docs/getting-started.zh-TW.md +38 -41
  95. package/docs/getting-started.zh.md +45 -48
  96. package/docs/overview.ja.md +63 -11
  97. package/docs/overview.md +60 -8
  98. package/docs/overview.zh-TW.md +67 -15
  99. package/docs/overview.zh.md +62 -10
  100. package/media.md +9 -9
  101. package/package.json +1 -1
  102. package/prompts/detail/custom/custom-components.md +304 -188
  103. package/prompts/detail/document-rules.md +4 -4
  104. package/prompts/detail/generate-document.md +21 -8
  105. package/prompts/detail/update-document.md +8 -12
  106. package/prompts/structure/update-document-structure.md +12 -8
  107. package/prompts/utils/feedback-refiner.md +3 -3
  108. package/tests/agents/generate/document-structure-tools/move-document.test.mjs +9 -9
  109. package/tests/agents/generate/user-review-document-structure.test.mjs +29 -8
  110. package/tests/agents/update/document-tools/update-document-content.test.mjs +115 -112
  111. package/tests/agents/update/fs-tools/glob.test.mjs +438 -0
  112. package/tests/agents/update/fs-tools/grep.test.mjs +279 -0
  113. package/tests/agents/update/fs-tools/read-file.test.mjs +553 -0
  114. package/tests/agents/update/user-review-document.test.mjs +48 -27
  115. package/types/document-schema.mjs +5 -6
  116. package/types/document-structure-schema.mjs +20 -8
@@ -2,11 +2,11 @@
2
2
 
3
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 the procedures to:
5
+ This guide provides procedures for the following tasks:
6
6
 
7
- - Automatically update documents when source code is modified.
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
 
@@ -15,124 +15,76 @@ The following diagram illustrates the different workflows available for updating
15
15
  ```d2 Document Update Workflows
16
16
  direction: down
17
17
 
18
- developer: {
18
+ Developer: {
19
19
  shape: c4-person
20
- label: "Developer"
21
20
  }
22
21
 
23
- codebase: {
24
- shape: cylinder
22
+ Source-Code: {
25
23
  label: "Source Code"
26
24
  }
27
25
 
28
- updated-documentation: {
29
- shape: cylinder
30
- label: "Updated\nDocumentation"
26
+ Documentation: {
27
+ label: "Documentation"
31
28
  }
32
29
 
33
- workflows: {
34
- label: "Document Update Workflows"
30
+ Action-Choice: {
31
+ label: "Choose Action"
32
+ shape: diamond
33
+ }
34
+
35
+ Generate-Sync: {
36
+ label: "aigne doc generate"
35
37
  shape: rectangle
36
38
 
37
- automatic-updates: {
38
- label: "Automatic Updates (Code-Driven)"
39
- shape: rectangle
39
+ Change-Detection: {
40
+ label: "Detect Changes?"
41
+ shape: diamond
42
+ }
43
+ Regenerate-Affected: "Regenerate Affected"
44
+ Regenerate-All: "Regenerate All"
40
45
 
41
- cmd-generate: {
42
- label: "aigne doc generate"
43
- }
46
+ Change-Detection -> Regenerate-Affected: "Yes (Default)"
47
+ Change-Detection -> Regenerate-All: "No\n(--forceRegenerate)"
48
+ }
44
49
 
45
- decision-force: {
46
- label: "--forceRegenerate?"
47
- shape: diamond
48
- }
50
+ Refine-Content: {
51
+ label: "aigne doc update"
52
+ }
49
53
 
50
- detect-changes: {
51
- label: "Detect Changes"
52
- }
54
+ Refine-Structure: {
55
+ label: "aigne doc generate\n--feedback"
56
+ }
53
57
 
54
- regen-affected: {
55
- label: "Regenerate\nAffected Docs"
56
- }
58
+ Developer -> Action-Choice
57
59
 
58
- regen-all: {
59
- label: "Regenerate\nAll Docs"
60
- }
61
- }
60
+ Action-Choice -> Generate-Sync: "Sync with Code"
61
+ Action-Choice -> Refine-Content: "Refine Doc Content"
62
+ Action-Choice -> Refine-Structure: "Refine Doc Structure"
62
63
 
63
- manual-refinements: {
64
- label: "Manual Refinements (Feedback-Driven)"
65
- shape: rectangle
66
- grid-columns: 2
67
- grid-gap: 100
68
-
69
- refine-individual: {
70
- label: "Refine Individual Docs"
71
- shape: rectangle
72
-
73
- cmd-update: {
74
- label: "aigne doc update\n--feedback"
75
- }
76
-
77
- regen-specific: {
78
- label: "Regenerate\nSpecific Doc"
79
- }
80
- }
81
-
82
- optimize-structure: {
83
- label: "Optimize Overall Structure"
84
- shape: rectangle
85
-
86
- cmd-generate-feedback: {
87
- label: "aigne doc generate\n--feedback"
88
- }
89
-
90
- re-evaluate-plan: {
91
- label: "Re-evaluate\nDocument Plan"
92
- }
93
- }
94
- }
95
- }
64
+ Source-Code -> Generate-Sync
96
65
 
97
- # --- Connections ---
98
-
99
- # Path 1: Automatic Updates
100
- developer -> codebase: "1. Makes changes"
101
- codebase -> workflows.automatic-updates.cmd-generate: "2. Runs command"
102
- workflows.automatic-updates.cmd-generate -> workflows.automatic-updates.decision-force
103
- workflows.automatic-updates.decision-force -> workflows.automatic-updates.detect-changes: "No"
104
- workflows.automatic-updates.detect-changes -> workflows.automatic-updates.regen-affected
105
- workflows.automatic-updates.decision-force -> workflows.automatic-updates.regen-all: "Yes"
106
- workflows.automatic-updates.regen-affected -> updated-documentation
107
- workflows.automatic-updates.regen-all -> updated-documentation
108
-
109
- # Path 2: Individual Refinement
110
- developer -> workflows.manual-refinements.refine-individual.cmd-update: "3. Provides\ncontent feedback"
111
- workflows.manual-refinements.refine-individual.cmd-update -> workflows.manual-refinements.refine-individual.regen-specific
112
- workflows.manual-refinements.refine-individual.regen-specific -> updated-documentation
113
-
114
- # Path 3: Structural Refinement
115
- developer -> workflows.manual-refinements.optimize-structure.cmd-generate-feedback: "4. Provides\nstructural feedback"
116
- workflows.manual-refinements.optimize-structure.cmd-generate-feedback -> workflows.manual-refinements.optimize-structure.re-evaluate-plan
117
- workflows.manual-refinements.optimize-structure.re-evaluate-plan -> updated-documentation: "Regenerate with\nNew Structure"
66
+ Generate-Sync.Regenerate-Affected -> Documentation: "Update"
67
+ Generate-Sync.Regenerate-All -> Documentation: "Update"
68
+ Refine-Content -> Documentation: "Update"
69
+ Refine-Structure -> Documentation: "Update"
118
70
  ```
119
71
 
120
72
  ---
121
73
 
122
74
  ## Automatic Updates with Change Detection
123
75
 
124
- 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.
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.
125
77
 
126
78
  ```shell icon=lucide:terminal
127
- # DocSmith will detect changes and update only what's necessary
79
+ # DocSmith will detect changes and update only what is necessary
128
80
  aigne doc generate
129
81
  ```
130
82
 
131
- ![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)
132
84
 
133
85
  ### Forcing a Full Regeneration
134
86
 
135
- 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.
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.
136
88
 
137
89
  ```shell icon=lucide:terminal
138
90
  # Regenerate all documentation from the ground up
@@ -141,13 +93,15 @@ aigne doc generate --forceRegenerate
141
93
 
142
94
  ---
143
95
 
144
- ## 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.
145
99
 
146
- To improve a specific document's content without corresponding code changes, use the `aigne doc update` command. This command allows you to provide targeted instructions for refinement.
100
+ ### Refining Individual Document Content
147
101
 
148
- This can be done interactively or non-interactively 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.
149
103
 
150
- ### Interactive Mode
104
+ #### Interactive Mode
151
105
 
152
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.
153
107
 
@@ -156,9 +110,9 @@ For a guided process, run the command without arguments. DocSmith will present a
156
110
  aigne doc update
157
111
  ```
158
112
 
159
- ![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)
160
114
 
161
- ### Direct Command-Line Updates
115
+ #### Non-Interactive Mode
162
116
 
163
117
  For scripted or faster workflows, you can specify the document and feedback directly using flags. This enables precise, non-interactive updates.
164
118
 
@@ -167,26 +121,22 @@ For scripted or faster workflows, you can specify the document and feedback dire
167
121
  aigne doc update --docs overview.md --feedback "Add a more detailed FAQ section at the end."
168
122
  ```
169
123
 
170
- Key parameters for the `update` command are as follows:
124
+ The primary parameters for the `update` command are as follows:
171
125
 
172
126
  | Parameter | Description |
173
- | --- | --- |
127
+ | :--- | :--- |
174
128
  | `--docs` | The path to the document to be updated. This flag can be used multiple times for batch updates. |
175
- | `--feedback` | The specific instructions to be used when regenerating the content. |
176
-
177
- ---
178
-
179
- ## Optimizing the Overall Structure
129
+ | `--feedback` | A string containing the specific instructions to be used when regenerating the document's content. |
180
130
 
181
- In addition to refining individual document content, 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.
131
+ ### Optimizing the Overall Structure
182
132
 
183
- This instructs DocSmith to re-evaluate the entire document plan based on your 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.
184
134
 
185
135
  ```shell icon=lucide:terminal
186
136
  # Regenerate the documentation structure with specific feedback
187
137
  aigne doc generate --feedback "Remove the 'About' section and add a detailed 'API Reference'."
188
138
  ```
189
139
 
190
- This approach is intended for high-level changes to the document's table of contents, not for minor 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.
191
141
 
192
- 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.
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,164 +1,119 @@
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
15
  ```d2 文件更新工作流程
16
16
  direction: down
17
17
 
18
- developer: {
18
+ Developer: {
19
19
  shape: c4-person
20
- label: "開發人員"
20
+ label: "開發者"
21
21
  }
22
22
 
23
- codebase: {
24
- shape: cylinder
23
+ Source-Code: {
25
24
  label: "原始碼"
26
25
  }
27
26
 
28
- updated-documentation: {
29
- shape: cylinder
30
- label: "已更新的\n文件"
27
+ Documentation: {
28
+ label: "文件"
31
29
  }
32
30
 
33
- workflows: {
34
- label: "文件更新工作流程"
31
+ Action-Choice: {
32
+ label: "選擇操作"
33
+ shape: diamond
34
+ }
35
+
36
+ Generate-Sync: {
37
+ label: "aigne doc generate"
35
38
  shape: rectangle
36
39
 
37
- automatic-updates: {
38
- label: "自動更新(程式碼驅動)"
39
- shape: rectangle
40
+ Change-Detection: {
41
+ label: "偵測變更?"
42
+ shape: diamond
43
+ }
44
+ Regenerate-Affected: "重新產生受影響部分"
45
+ Regenerate-All: "全部重新產生"
40
46
 
41
- cmd-generate: {
42
- label: "aigne doc generate"
43
- }
47
+ Change-Detection -> Regenerate-Affected: "是 (預設)"
48
+ Change-Detection -> Regenerate-All: "否\n(--forceRegenerate)"
49
+ }
44
50
 
45
- decision-force: {
46
- label: "--forceRegenerate?"
47
- shape: diamond
48
- }
51
+ Refine-Content: {
52
+ label: "aigne doc update"
53
+ }
49
54
 
50
- detect-changes: {
51
- label: "偵測變更"
52
- }
55
+ Refine-Structure: {
56
+ label: "aigne doc generate\n--feedback"
57
+ }
53
58
 
54
- regen-affected: {
55
- label: "重新生成\n受影響文件"
56
- }
59
+ Developer -> Action-Choice
57
60
 
58
- regen-all: {
59
- label: "重新生成\n所有文件"
60
- }
61
- }
61
+ Action-Choice -> Generate-Sync: "與程式碼同步"
62
+ Action-Choice -> Refine-Content: "完善文件內容"
63
+ Action-Choice -> Refine-Structure: "完善文件結構"
62
64
 
63
- manual-refinements: {
64
- label: "手動完善(回饋驅動)"
65
- shape: rectangle
66
- grid-columns: 2
67
- grid-gap: 100
68
-
69
- refine-individual: {
70
- label: "完善個別文件"
71
- shape: rectangle
72
-
73
- cmd-update: {
74
- label: "aigne doc update\n--feedback"
75
- }
76
-
77
- regen-specific: {
78
- label: "重新生成\n特定文件"
79
- }
80
- }
81
-
82
- optimize-structure: {
83
- label: "優化整體結構"
84
- shape: rectangle
85
-
86
- cmd-generate-feedback: {
87
- label: "aigne doc generate\n--feedback"
88
- }
89
-
90
- re-evaluate-plan: {
91
- label: "重新評估\n文件計畫"
92
- }
93
- }
94
- }
95
- }
65
+ Source-Code -> Generate-Sync
96
66
 
97
- # --- Connections ---
98
-
99
- # Path 1: Automatic Updates
100
- developer -> codebase: "1. 進行變更"
101
- codebase -> workflows.automatic-updates.cmd-generate: "2. 執行指令"
102
- workflows.automatic-updates.cmd-generate -> workflows.automatic-updates.decision-force
103
- workflows.automatic-updates.decision-force -> workflows.automatic-updates.detect-changes: "否"
104
- workflows.automatic-updates.detect-changes -> workflows.automatic-updates.regen-affected
105
- workflows.automatic-updates.decision-force -> workflows.automatic-updates.regen-all: "是"
106
- workflows.automatic-updates.regen-affected -> updated-documentation
107
- workflows.automatic-updates.regen-all -> updated-documentation
108
-
109
- # Path 2: Individual Refinement
110
- developer -> workflows.manual-refinements.refine-individual.cmd-update: "3. 提供\n內容回饋"
111
- workflows.manual-refinements.refine-individual.cmd-update -> workflows.manual-refinements.refine-individual.regen-specific
112
- workflows.manual-refinements.refine-individual.regen-specific -> updated-documentation
113
-
114
- # Path 3: Structural Refinement
115
- developer -> workflows.manual-refinements.optimize-structure.cmd-generate-feedback: "4. 提供\n結構性回饋"
116
- workflows.manual-refinements.optimize-structure.cmd-generate-feedback -> workflows.manual-refinements.optimize-structure.re-evaluate-plan
117
- workflows.manual-refinements.optimize-structure.re-evaluate-plan -> updated-documentation: "以\n新結構重新生成"
67
+ Generate-Sync.Regenerate-Affected -> Documentation: "更新"
68
+ Generate-Sync.Regenerate-All -> Documentation: "更新"
69
+ Refine-Content -> Documentation: "更新"
70
+ Refine-Structure -> Documentation: "更新"
118
71
  ```
119
72
 
120
73
  ---
121
74
 
122
- ## 具備變更偵測的自動更新
75
+ ## 透過變更偵測自動更新
123
76
 
124
- 當您執行 `aigne doc generate` 指令時,DocSmith 會先分析您的程式碼庫以偵測自上次生成以來的變更。接著,它只會重新生成受這些變更影響的文件。這種預設行為可以節省時間並減少 API 的使用。
77
+ 當您執行 `aigne doc generate` 指令時,DocSmith 會先分析您的程式碼庫,以偵測自上次產生以來的變更。然後,它只會重新產生受這些變更影響的文件。這種預設行為可以節省時間並減少 API 使用量,避免了多餘的操作。
125
78
 
126
79
  ```shell icon=lucide:terminal
127
- # DocSmith 將偵測變更並僅更新必要部分
80
+ # DocSmith 將偵測變更並僅更新必要的部分
128
81
  aigne doc generate
129
82
  ```
130
83
 
131
- ![DocSmith 偵測變更並僅重新生成所需文件。](https://docsmith.aigne.io/image-bin/uploads/21a76b2f65d14d16a49c13d800f1e2c1.png)
84
+ ![DocSmith 偵測變更並僅重新產生所需的文件。](../assets/screenshots/doc-regenerate.png)
132
85
 
133
- ### 強制完整重新生成
86
+ ### 強制完整重新產生
134
87
 
135
- 若要從頭開始重新生成所有文件,繞過快取和變更偵測,請使用 `--forceRegenerate` 旗標。當您進行了重大的設定變更或需要完全重建以確保一致性時,這項操作是必要的。
88
+ 若要從頭開始重新產生所有文件,繞過快取和變更偵測,請使用 `--forceRegenerate` 旗標。當您進行了重大的設定變更或需要完全重建以確保所有檔案的一致性時,這項操作是必要的。
136
89
 
137
90
  ```shell icon=lucide:terminal
138
- # 從頭開始重新生成所有文件
91
+ # 從頭開始重新產生所有文件
139
92
  aigne doc generate --forceRegenerate
140
93
  ```
141
94
 
142
95
  ---
143
96
 
144
- ## 完善個別文件
97
+ ## 透過回饋完善文件
98
+
99
+ 您可以透過向 CLI 指令提供直接回饋,在沒有相應程式碼變更的情況下完善文件。這對於提高清晰度、新增範例或調整結構很有用。
145
100
 
146
- 若要在沒有相應程式碼變更的情況下改善特定文件的內容,請使用 `aigne doc update` 指令。此指令允許您提供針對性的指示以進行完善。
101
+ ### 完善個別文件內容
147
102
 
148
- 這可以透過互動模式或透過命令列參數以非互動方式完成。
103
+ 若要改善特定文件的內容,請使用 `aigne doc update` 指令。此指令允許您提供針對性的完善指示,並可以互動或非互動兩種模式執行。
149
104
 
150
- ### 互動模式
105
+ #### 互動模式
151
106
 
152
- 若要進行引導式流程,請在不帶任何參數的情況下執行該指令。DocSmith 將會顯示一個選單,讓您選擇想要更新的文件。選擇後,系統將提示您輸入回饋。
107
+ 若要進行引導式流程,請在不帶任何參數的情況下執行該指令。DocSmith 將會顯示一個選單,讓您選擇要更新的文件。選擇後,系統會提示您輸入回饋。
153
108
 
154
109
  ```shell icon=lucide:terminal
155
- # 啟動互動式更新流程
110
+ # 開始互動式更新流程
156
111
  aigne doc update
157
112
  ```
158
113
 
159
- ![以互動方式選擇您希望更新的文件。](https://docsmith.aigne.io/image-bin/uploads/75e9cf9823bb369c3d2b5a2e2da4ac06.png)
114
+ ![以互動方式選擇您希望更新的文件。](../assets/screenshots/doc-update.png)
160
115
 
161
- ### 直接透過命令列更新
116
+ #### 非互動模式
162
117
 
163
118
  對於腳本化或更快速的工作流程,您可以使用旗標直接指定文件和回饋。這可以實現精確的非互動式更新。
164
119
 
@@ -167,26 +122,22 @@ aigne doc update
167
122
  aigne doc update --docs overview.md --feedback "Add a more detailed FAQ section at the end."
168
123
  ```
169
124
 
170
- 以下是 `update` 指令的關鍵參數:
125
+ `update` 指令的主要參數如下:
171
126
 
172
127
  | 參數 | 說明 |
173
- | --- | --- |
128
+ | :--- | :--- |
174
129
  | `--docs` | 要更新的文件的路徑。此旗標可多次使用以進行批次更新。 |
175
- | `--feedback` | 重新生成內容時要使用的具體指示。 |
176
-
177
- ---
178
-
179
- ## 優化整體結構
130
+ | `--feedback` | 一個字串,包含重新產生文件內容時要使用的具體指示。 |
180
131
 
181
- 除了完善個別文件內容外,您還可以調整整體的文件結構。如果現有組織不理想或缺少某個部分,您可以向 `generate` 指令提供回饋。
132
+ ### 最佳化整體結構
182
133
 
183
- 這會指示 DocSmith 根據您的輸入重新評估整個文件計畫。
134
+ 除了完善個別文件外,您還可以調整整體文件結構。如果現有組織結構不佳或缺少某個部分,您可以向 `generate` 指令提供回饋。這會指示 DocSmith 根據您的輸入重新評估整個文件計畫。
184
135
 
185
136
  ```shell icon=lucide:terminal
186
- # 根據特定回饋重新生成文件結構
137
+ # 透過特定回饋重新產生文件結構
187
138
  aigne doc generate --feedback "Remove the 'About' section and add a detailed 'API Reference'."
188
139
  ```
189
140
 
190
- 此方法適用於對文件目錄進行高層次的變更,而非用於微小的內容編輯。
141
+ 此方法適用於對文件目錄進行高層次的變更,而非針對單一檔案內的微小內容編輯。
191
142
 
192
- 一旦您的內容完善後,下一步就是為全球受眾準備。有關說明,請參閱 [翻譯文件](./features-translate-documentation.md) 指南。
143
+ 內容完善後,下一步是為全球受眾做準備。相關說明,請參閱 [翻譯文件](./features-translate-documentation.md) 指南。