@aigne/doc-smith 0.8.11-beta.6 → 0.8.11-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.aigne/doc-smith/config.yaml +2 -0
- package/.aigne/doc-smith/output/structure-plan.json +2 -2
- package/.aigne/doc-smith/preferences.yml +28 -20
- package/.aigne/doc-smith/upload-cache.yaml +702 -0
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +13 -0
- package/README.md +1 -1
- package/agents/generate/document-structure-tools/add-document.mjs +35 -10
- package/agents/generate/document-structure-tools/delete-document.mjs +35 -12
- package/agents/generate/document-structure-tools/move-document.mjs +43 -17
- package/agents/generate/document-structure-tools/update-document.mjs +37 -10
- package/agents/generate/update-document-structure.yaml +1 -7
- package/agents/generate/user-review-document-structure.mjs +5 -4
- package/agents/translate/translate-document.yaml +1 -9
- package/agents/update/check-update-is-single.mjs +2 -1
- package/agents/update/document-tools/update-document-content.mjs +24 -14
- package/agents/update/fs-tools/glob.mjs +184 -0
- package/agents/update/fs-tools/grep.mjs +317 -0
- package/agents/update/fs-tools/read-file.mjs +307 -0
- package/agents/update/generate-document.yaml +4 -7
- package/agents/update/update-document-detail.yaml +6 -10
- package/agents/update/user-review-document.mjs +13 -13
- package/assets/screenshots/doc-complete-setup.png +0 -0
- package/assets/screenshots/doc-generate-docs.png +0 -0
- package/assets/screenshots/doc-generate.png +0 -0
- package/assets/screenshots/doc-generated-successfully.png +0 -0
- package/assets/screenshots/doc-publish.png +0 -0
- package/assets/screenshots/doc-regenerate.png +0 -0
- package/assets/screenshots/doc-translate-langs.png +0 -0
- package/assets/screenshots/doc-translate.png +0 -0
- package/assets/screenshots/doc-update.png +0 -0
- package/docs/advanced-how-it-works.ja.md +31 -31
- package/docs/advanced-how-it-works.md +9 -9
- package/docs/advanced-how-it-works.zh-TW.md +24 -24
- package/docs/advanced-how-it-works.zh.md +20 -20
- package/docs/advanced-quality-assurance.ja.md +57 -61
- package/docs/advanced-quality-assurance.md +57 -61
- package/docs/advanced-quality-assurance.zh-TW.md +57 -61
- package/docs/advanced-quality-assurance.zh.md +57 -61
- package/docs/advanced.ja.md +8 -4
- package/docs/advanced.md +7 -3
- package/docs/advanced.zh-TW.md +9 -5
- package/docs/advanced.zh.md +9 -5
- package/docs/changelog.ja.md +206 -29
- package/docs/changelog.md +177 -0
- package/docs/changelog.zh-TW.md +229 -52
- package/docs/changelog.zh.md +204 -27
- package/docs/cli-reference.ja.md +82 -52
- package/docs/cli-reference.md +56 -26
- package/docs/cli-reference.zh-TW.md +82 -52
- package/docs/cli-reference.zh.md +70 -40
- package/docs/configuration-interactive-setup.ja.md +45 -42
- package/docs/configuration-interactive-setup.md +8 -5
- package/docs/configuration-interactive-setup.zh-TW.md +26 -23
- package/docs/configuration-interactive-setup.zh.md +25 -22
- package/docs/configuration-language-support.ja.md +33 -63
- package/docs/configuration-language-support.md +32 -62
- package/docs/configuration-language-support.zh-TW.md +35 -65
- package/docs/configuration-language-support.zh.md +32 -62
- package/docs/configuration-llm-setup.ja.md +25 -23
- package/docs/configuration-llm-setup.md +20 -18
- package/docs/configuration-llm-setup.zh-TW.md +21 -19
- package/docs/configuration-llm-setup.zh.md +20 -18
- package/docs/configuration-preferences.ja.md +67 -52
- package/docs/configuration-preferences.md +56 -41
- package/docs/configuration-preferences.zh-TW.md +69 -54
- package/docs/configuration-preferences.zh.md +68 -53
- package/docs/configuration.ja.md +65 -81
- package/docs/configuration.md +19 -35
- package/docs/configuration.zh-TW.md +62 -79
- package/docs/configuration.zh.md +50 -67
- package/docs/features-generate-documentation.ja.md +44 -69
- package/docs/features-generate-documentation.md +36 -61
- package/docs/features-generate-documentation.zh-TW.md +42 -67
- package/docs/features-generate-documentation.zh.md +41 -67
- package/docs/features-publish-your-docs.ja.md +36 -36
- package/docs/features-publish-your-docs.md +2 -2
- package/docs/features-publish-your-docs.zh-TW.md +21 -21
- package/docs/features-publish-your-docs.zh.md +23 -23
- package/docs/features-translate-documentation.ja.md +40 -31
- package/docs/features-translate-documentation.md +15 -6
- package/docs/features-translate-documentation.zh-TW.md +37 -28
- package/docs/features-translate-documentation.zh.md +23 -14
- package/docs/features-update-and-refine.ja.md +68 -118
- package/docs/features-update-and-refine.md +58 -108
- package/docs/features-update-and-refine.zh-TW.md +67 -116
- package/docs/features-update-and-refine.zh.md +64 -114
- package/docs/features.ja.md +29 -19
- package/docs/features.md +25 -15
- package/docs/features.zh-TW.md +28 -18
- package/docs/features.zh.md +31 -21
- package/docs/getting-started.ja.md +40 -43
- package/docs/getting-started.md +36 -39
- package/docs/getting-started.zh-TW.md +38 -41
- package/docs/getting-started.zh.md +45 -48
- package/docs/overview.ja.md +63 -11
- package/docs/overview.md +60 -8
- package/docs/overview.zh-TW.md +67 -15
- package/docs/overview.zh.md +62 -10
- package/media.md +9 -9
- package/package.json +1 -1
- package/prompts/detail/custom/custom-components.md +304 -188
- package/prompts/detail/document-rules.md +4 -4
- package/prompts/detail/generate-document.md +21 -8
- package/prompts/detail/update-document.md +8 -12
- package/prompts/structure/update-document-structure.md +12 -8
- package/prompts/utils/feedback-refiner.md +3 -3
- package/tests/agents/generate/document-structure-tools/move-document.test.mjs +9 -9
- package/tests/agents/generate/user-review-document-structure.test.mjs +29 -8
- package/tests/agents/update/document-tools/update-document-content.test.mjs +115 -112
- package/tests/agents/update/fs-tools/glob.test.mjs +438 -0
- package/tests/agents/update/fs-tools/grep.test.mjs +279 -0
- package/tests/agents/update/fs-tools/read-file.test.mjs +553 -0
- package/tests/agents/update/user-review-document.test.mjs +48 -27
- package/types/document-schema.mjs +5 -6
- 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
|
|
5
|
+
This guide provides procedures for the following tasks:
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
|
|
18
|
+
Developer: {
|
|
19
19
|
shape: c4-person
|
|
20
|
-
label: "Developer"
|
|
21
20
|
}
|
|
22
21
|
|
|
23
|
-
|
|
24
|
-
shape: cylinder
|
|
22
|
+
Source-Code: {
|
|
25
23
|
label: "Source Code"
|
|
26
24
|
}
|
|
27
25
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
label: "Updated\nDocumentation"
|
|
26
|
+
Documentation: {
|
|
27
|
+
label: "Documentation"
|
|
31
28
|
}
|
|
32
29
|
|
|
33
|
-
|
|
34
|
-
label: "
|
|
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
|
-
|
|
38
|
-
label: "
|
|
39
|
-
shape:
|
|
39
|
+
Change-Detection: {
|
|
40
|
+
label: "Detect Changes?"
|
|
41
|
+
shape: diamond
|
|
42
|
+
}
|
|
43
|
+
Regenerate-Affected: "Regenerate Affected"
|
|
44
|
+
Regenerate-All: "Regenerate All"
|
|
40
45
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
46
|
+
Change-Detection -> Regenerate-Affected: "Yes (Default)"
|
|
47
|
+
Change-Detection -> Regenerate-All: "No\n(--forceRegenerate)"
|
|
48
|
+
}
|
|
44
49
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
50
|
+
Refine-Content: {
|
|
51
|
+
label: "aigne doc update"
|
|
52
|
+
}
|
|
49
53
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
54
|
+
Refine-Structure: {
|
|
55
|
+
label: "aigne doc generate\n--feedback"
|
|
56
|
+
}
|
|
53
57
|
|
|
54
|
-
|
|
55
|
-
label: "Regenerate\nAffected Docs"
|
|
56
|
-
}
|
|
58
|
+
Developer -> Action-Choice
|
|
57
59
|
|
|
58
|
-
|
|
59
|
-
|
|
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
|
-
|
|
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
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
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
|
|
79
|
+
# DocSmith will detect changes and update only what is necessary
|
|
128
80
|
aigne doc generate
|
|
129
81
|
```
|
|
130
82
|
|
|
131
|
-

|
|
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
|
|
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
|
-
|
|
100
|
+
### Refining Individual Document Content
|
|
147
101
|
|
|
148
|
-
This can be
|
|
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
|
-
|
|
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
|
-

|
|
160
114
|
|
|
161
|
-
|
|
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
|
-
|
|
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` |
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
18
|
+
Developer: {
|
|
19
19
|
shape: c4-person
|
|
20
|
-
label: "
|
|
20
|
+
label: "開發者"
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
shape: cylinder
|
|
23
|
+
Source-Code: {
|
|
25
24
|
label: "原始碼"
|
|
26
25
|
}
|
|
27
26
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
label: "已更新的\n文件"
|
|
27
|
+
Documentation: {
|
|
28
|
+
label: "文件"
|
|
31
29
|
}
|
|
32
30
|
|
|
33
|
-
|
|
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
|
-
|
|
38
|
-
label: "
|
|
39
|
-
shape:
|
|
40
|
+
Change-Detection: {
|
|
41
|
+
label: "偵測變更?"
|
|
42
|
+
shape: diamond
|
|
43
|
+
}
|
|
44
|
+
Regenerate-Affected: "重新產生受影響部分"
|
|
45
|
+
Regenerate-All: "全部重新產生"
|
|
40
46
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
47
|
+
Change-Detection -> Regenerate-Affected: "是 (預設)"
|
|
48
|
+
Change-Detection -> Regenerate-All: "否\n(--forceRegenerate)"
|
|
49
|
+
}
|
|
44
50
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
51
|
+
Refine-Content: {
|
|
52
|
+
label: "aigne doc update"
|
|
53
|
+
}
|
|
49
54
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
55
|
+
Refine-Structure: {
|
|
56
|
+
label: "aigne doc generate\n--feedback"
|
|
57
|
+
}
|
|
53
58
|
|
|
54
|
-
|
|
55
|
-
label: "重新生成\n受影響文件"
|
|
56
|
-
}
|
|
59
|
+
Developer -> Action-Choice
|
|
57
60
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
61
|
+
Action-Choice -> Generate-Sync: "與程式碼同步"
|
|
62
|
+
Action-Choice -> Refine-Content: "完善文件內容"
|
|
63
|
+
Action-Choice -> Refine-Structure: "完善文件結構"
|
|
62
64
|
|
|
63
|
-
|
|
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
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
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
|
|
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
|
-

|
|
132
85
|
|
|
133
|
-
###
|
|
86
|
+
### 強制完整重新產生
|
|
134
87
|
|
|
135
|
-
|
|
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
|
-
|
|
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
|
-

|
|
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
|
-
|
|
125
|
+
`update` 指令的主要參數如下:
|
|
171
126
|
|
|
172
127
|
| 參數 | 說明 |
|
|
173
|
-
|
|
|
128
|
+
| :--- | :--- |
|
|
174
129
|
| `--docs` | 要更新的文件的路徑。此旗標可多次使用以進行批次更新。 |
|
|
175
|
-
| `--feedback` |
|
|
176
|
-
|
|
177
|
-
---
|
|
178
|
-
|
|
179
|
-
## 優化整體結構
|
|
130
|
+
| `--feedback` | 一個字串,包含重新產生文件內容時要使用的具體指示。 |
|
|
180
131
|
|
|
181
|
-
|
|
132
|
+
### 最佳化整體結構
|
|
182
133
|
|
|
183
|
-
|
|
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
|
-
|
|
143
|
+
內容完善後,下一步是為全球受眾做準備。相關說明,請參閱 [翻譯文件](./features-translate-documentation.md) 指南。
|