@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.
- package/.aigne/doc-smith/config.yaml +3 -1
- 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 +22 -2
- package/README.md +2 -2
- package/agents/clear/choose-contents.mjs +2 -2
- package/agents/clear/clear-document-structure.mjs +8 -8
- package/agents/clear/index.yaml +1 -1
- package/agents/evaluate/document-structure.yaml +1 -1
- package/agents/generate/check-document-structure.yaml +3 -3
- package/agents/generate/check-need-generate-structure.mjs +8 -8
- package/agents/generate/document-structure-tools/add-document.mjs +38 -13
- package/agents/generate/document-structure-tools/delete-document.mjs +37 -14
- package/agents/generate/document-structure-tools/move-document.mjs +46 -19
- package/agents/generate/document-structure-tools/update-document.mjs +39 -12
- package/agents/generate/generate-structure.yaml +1 -1
- package/agents/generate/update-document-structure.yaml +3 -9
- package/agents/generate/user-review-document-structure.mjs +15 -14
- package/agents/translate/translate-document.yaml +1 -9
- package/agents/update/batch-generate-document.yaml +1 -1
- package/agents/update/check-document.mjs +2 -2
- 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/agents/utils/check-feedback-refiner.mjs +1 -1
- package/agents/utils/choose-docs.mjs +1 -1
- package/agents/utils/load-document-all-content.mjs +3 -3
- package/agents/utils/load-sources.mjs +1 -1
- package/agents/utils/save-docs.mjs +7 -28
- package/aigne.yaml +2 -2
- 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/_sidebar.md +1 -1
- package/docs/advanced-how-it-works.ja.md +31 -31
- package/docs/advanced-how-it-works.md +10 -10
- 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 +181 -80
- package/docs/cli-reference.md +168 -67
- package/docs/cli-reference.zh-TW.md +177 -76
- package/docs/cli-reference.zh.md +172 -71
- package/docs/configuration-interactive-setup.ja.md +45 -42
- package/docs/configuration-interactive-setup.md +9 -6
- 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 +55 -40
- package/docs/configuration-preferences.zh-TW.md +69 -54
- package/docs/configuration-preferences.zh.md +68 -53
- package/docs/configuration.ja.md +98 -58
- package/docs/configuration.md +42 -2
- package/docs/configuration.zh-TW.md +86 -46
- package/docs/configuration.zh.md +76 -36
- package/docs/features-generate-documentation.ja.md +49 -55
- package/docs/features-generate-documentation.md +49 -55
- package/docs/features-generate-documentation.zh-TW.md +54 -60
- package/docs/features-generate-documentation.zh.md +48 -54
- package/docs/features-publish-your-docs.ja.md +68 -45
- package/docs/features-publish-your-docs.md +65 -42
- package/docs/features-publish-your-docs.zh-TW.md +74 -51
- package/docs/features-publish-your-docs.zh.md +67 -44
- package/docs/features-translate-documentation.ja.md +46 -35
- package/docs/features-translate-documentation.md +39 -28
- package/docs/features-translate-documentation.zh-TW.md +45 -34
- package/docs/features-translate-documentation.zh.md +39 -28
- package/docs/features-update-and-refine.ja.md +75 -71
- package/docs/features-update-and-refine.md +67 -63
- package/docs/features-update-and-refine.zh-TW.md +72 -67
- package/docs/features-update-and-refine.zh.md +71 -67
- 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 +43 -46
- package/docs/getting-started.md +36 -39
- package/docs/getting-started.zh-TW.md +41 -44
- package/docs/getting-started.zh.md +39 -42
- package/docs/overview.ja.md +63 -11
- package/docs/overview.md +62 -10
- package/docs/overview.zh-TW.md +67 -15
- package/docs/overview.zh.md +62 -10
- package/docs-mcp/analyze-docs-relevance.yaml +6 -6
- package/docs-mcp/docs-search.yaml +1 -1
- package/media.md +9 -9
- package/package.json +2 -2
- package/prompts/common/document-structure/conflict-resolution-guidance.md +3 -3
- package/prompts/common/document-structure/document-structure-rules.md +2 -2
- package/prompts/detail/custom/custom-components.md +304 -188
- package/prompts/detail/document-rules.md +5 -5
- package/prompts/detail/generate-document.md +21 -8
- package/prompts/detail/update-document.md +8 -12
- package/prompts/evaluate/document-structure.md +6 -6
- package/prompts/structure/check-document-structure.md +10 -10
- package/prompts/structure/document-rules.md +2 -2
- package/prompts/structure/generate-structure-system.md +3 -3
- package/prompts/structure/structure-example.md +1 -1
- package/prompts/structure/structure-getting-started.md +1 -1
- package/prompts/structure/update-document-structure.md +18 -14
- package/prompts/utils/feedback-refiner.md +3 -3
- package/tests/agents/clear/choose-contents.test.mjs +1 -1
- package/tests/agents/clear/clear-document-structure.test.mjs +36 -30
- package/tests/agents/evaluate/generate-report.test.mjs +1 -1
- package/tests/agents/generate/check-need-generate-structure.test.mjs +1 -1
- package/tests/agents/generate/document-structure-tools/add-document.test.mjs +2 -2
- package/tests/agents/generate/document-structure-tools/delete-document.test.mjs +4 -4
- package/tests/agents/generate/document-structure-tools/move-document.test.mjs +12 -12
- package/tests/agents/generate/document-structure-tools/update-document.test.mjs +3 -3
- package/tests/agents/generate/user-review-document-structure.test.mjs +36 -13
- package/tests/agents/update/check-document.test.mjs +1 -1
- 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/tests/agents/utils/format-document-structure.test.mjs +5 -5
- package/tests/agents/utils/load-sources.test.mjs +4 -4
- package/tests/agents/utils/save-docs.test.mjs +1 -1
- package/tests/utils/conflict-detector.test.mjs +1 -1
- package/tests/utils/docs-finder-utils.test.mjs +8 -8
- package/types/document-schema.mjs +5 -6
- package/types/document-structure-schema.mjs +25 -13
- package/utils/conflict-detector.mjs +1 -1
- package/utils/constants/index.mjs +4 -4
- package/utils/docs-finder-utils.mjs +11 -11
- package/utils/markdown-checker.mjs +1 -1
|
@@ -1,138 +1,142 @@
|
|
|
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
|
-
```d2
|
|
15
|
+
```d2 ドキュメント更新ワークフロー
|
|
16
16
|
direction: down
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
shape:
|
|
20
|
-
label: "開始"
|
|
18
|
+
Developer: {
|
|
19
|
+
shape: c4-person
|
|
21
20
|
}
|
|
22
21
|
|
|
23
|
-
Code
|
|
24
|
-
label: "
|
|
25
|
-
shape: rectangle
|
|
22
|
+
Source-Code: {
|
|
23
|
+
label: "ソースコード"
|
|
26
24
|
}
|
|
27
25
|
|
|
28
|
-
|
|
29
|
-
label: "
|
|
30
|
-
shape: rectangle
|
|
26
|
+
Documentation: {
|
|
27
|
+
label: "ドキュメント"
|
|
31
28
|
}
|
|
32
29
|
|
|
33
|
-
|
|
34
|
-
label: "
|
|
35
|
-
shape:
|
|
30
|
+
Action-Choice: {
|
|
31
|
+
label: "アクションを選択"
|
|
32
|
+
shape: diamond
|
|
36
33
|
}
|
|
37
34
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
35
|
+
Generate-Sync: {
|
|
36
|
+
label: "aigne doc generate"
|
|
37
|
+
shape: rectangle
|
|
41
38
|
|
|
42
|
-
|
|
39
|
+
Change-Detection: {
|
|
40
|
+
label: "変更を検出?"
|
|
41
|
+
shape: diamond
|
|
42
|
+
}
|
|
43
|
+
Regenerate-Affected: "影響を受けるものを再生成"
|
|
44
|
+
Regenerate-All: "すべてを再生成"
|
|
43
45
|
|
|
44
|
-
|
|
45
|
-
|
|
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
|
|
51
|
-
|
|
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
|
-
|
|
57
|
-
|
|
58
|
-
label: "ドキュメント更新済み"
|
|
54
|
+
Refine-Structure: {
|
|
55
|
+
label: "aigne doc generate\n--feedback"
|
|
59
56
|
}
|
|
60
57
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
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
|
|
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
|
-

|
|
78
84
|
|
|
79
|
-
###
|
|
85
|
+
### 完全な再生成の強制
|
|
80
86
|
|
|
81
|
-
|
|
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
|
-
|
|
100
|
+
### 個別ドキュメント内容の改良
|
|
93
101
|
|
|
94
|
-
|
|
102
|
+
特定のドキュメントの内容を改善するには、`aigne doc update` コマンドを使用します。このコマンドを使用すると、改良のための具体的な指示を提供でき、インタラクティブモードと非インタラクティブモードの2つのモードで実行できます。
|
|
95
103
|
|
|
96
|
-
|
|
104
|
+
#### インタラクティブモード
|
|
97
105
|
|
|
98
|
-
|
|
106
|
+
ガイド付きのプロセスについては、引数なしでコマンドを実行します。DocSmith は、更新したいドキュメントを選択するためのメニューを表示します。選択後、フィードバックを入力するよう求められます。
|
|
99
107
|
|
|
100
108
|
```shell icon=lucide:terminal
|
|
101
|
-
#
|
|
109
|
+
# インタラクティブな更新プロセスを開始する
|
|
102
110
|
aigne doc update
|
|
103
111
|
```
|
|
104
112
|
|
|
105
|
-

|
|
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 "
|
|
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
|
-
|
|
131
|
+
### 全体構造の最適化
|
|
128
132
|
|
|
129
|
-
|
|
133
|
+
個々のドキュメントの改良に加えて、ドキュメント全体の構造を調整することもできます。既存の構成が最適でない場合やセクションが欠落している場合は、`generate` コマンドにフィードバックを提供できます。これにより、DocSmith はあなたの入力に基づいてドキュメントプラン全体を再評価するよう指示されます。
|
|
130
134
|
|
|
131
135
|
```shell icon=lucide:terminal
|
|
132
|
-
#
|
|
133
|
-
aigne doc generate --feedback "
|
|
136
|
+
# 特定のフィードバックでドキュメント構造を再生成する
|
|
137
|
+
aigne doc generate --feedback "'概要'セクションを削除し、詳細な'APIリファレンス'を追加してください。"
|
|
134
138
|
```
|
|
135
139
|
|
|
136
|
-
|
|
140
|
+
このアプローチは、単一ファイル内のマイナーなコンテンツ編集ではなく、ドキュメントの目次に対する高レベルの変更を目的としています。
|
|
137
141
|
|
|
138
|
-
|
|
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
|
|
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
|
|
|
13
|
-
The following diagram illustrates the different
|
|
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
|
-
|
|
19
|
-
shape:
|
|
20
|
-
label: "Start"
|
|
18
|
+
Developer: {
|
|
19
|
+
shape: c4-person
|
|
21
20
|
}
|
|
22
21
|
|
|
23
|
-
Code
|
|
24
|
-
label: "Source Code
|
|
25
|
-
shape: rectangle
|
|
22
|
+
Source-Code: {
|
|
23
|
+
label: "Source Code"
|
|
26
24
|
}
|
|
27
25
|
|
|
28
|
-
|
|
29
|
-
label: "
|
|
30
|
-
shape: rectangle
|
|
26
|
+
Documentation: {
|
|
27
|
+
label: "Documentation"
|
|
31
28
|
}
|
|
32
29
|
|
|
33
|
-
|
|
34
|
-
label: "
|
|
35
|
-
shape:
|
|
30
|
+
Action-Choice: {
|
|
31
|
+
label: "Choose Action"
|
|
32
|
+
shape: diamond
|
|
36
33
|
}
|
|
37
34
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
35
|
+
Generate-Sync: {
|
|
36
|
+
label: "aigne doc generate"
|
|
37
|
+
shape: rectangle
|
|
41
38
|
|
|
42
|
-
|
|
39
|
+
Change-Detection: {
|
|
40
|
+
label: "Detect Changes?"
|
|
41
|
+
shape: diamond
|
|
42
|
+
}
|
|
43
|
+
Regenerate-Affected: "Regenerate Affected"
|
|
44
|
+
Regenerate-All: "Regenerate All"
|
|
43
45
|
|
|
44
|
-
|
|
45
|
-
|
|
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
|
|
51
|
-
|
|
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
|
-
|
|
57
|
-
|
|
58
|
-
label: "Docs Updated"
|
|
54
|
+
Refine-Structure: {
|
|
55
|
+
label: "aigne doc generate\n--feedback"
|
|
59
56
|
}
|
|
60
57
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
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
|
|
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
|
|
79
|
+
# DocSmith will detect changes and update only what is necessary
|
|
74
80
|
aigne doc generate
|
|
75
81
|
```
|
|
76
82
|
|
|
77
|
-

|
|
78
84
|
|
|
79
85
|
### Forcing a Full Regeneration
|
|
80
86
|
|
|
81
|
-
|
|
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
|
|
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
|
-
|
|
100
|
+
### Refining Individual Document Content
|
|
93
101
|
|
|
94
|
-
|
|
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
|
-
|
|
104
|
+
#### Interactive Mode
|
|
97
105
|
|
|
98
|
-
For a guided
|
|
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
|
-

|
|
106
114
|
|
|
107
|
-
|
|
115
|
+
#### Non-Interactive Mode
|
|
108
116
|
|
|
109
|
-
For faster workflows
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
131
|
+
### Optimizing the Overall Structure
|
|
128
132
|
|
|
129
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
19
|
-
shape:
|
|
20
|
-
label: "
|
|
18
|
+
Developer: {
|
|
19
|
+
shape: c4-person
|
|
20
|
+
label: "開發者"
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
Code
|
|
24
|
-
label: "
|
|
25
|
-
shape: rectangle
|
|
23
|
+
Source-Code: {
|
|
24
|
+
label: "原始碼"
|
|
26
25
|
}
|
|
27
26
|
|
|
28
|
-
|
|
29
|
-
label: "
|
|
30
|
-
shape: rectangle
|
|
27
|
+
Documentation: {
|
|
28
|
+
label: "文件"
|
|
31
29
|
}
|
|
32
30
|
|
|
33
|
-
|
|
34
|
-
label: "
|
|
35
|
-
shape:
|
|
31
|
+
Action-Choice: {
|
|
32
|
+
label: "選擇操作"
|
|
33
|
+
shape: diamond
|
|
36
34
|
}
|
|
37
35
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
Generate-Sync: {
|
|
37
|
+
label: "aigne doc generate"
|
|
38
|
+
shape: rectangle
|
|
41
39
|
|
|
42
|
-
|
|
40
|
+
Change-Detection: {
|
|
41
|
+
label: "偵測變更?"
|
|
42
|
+
shape: diamond
|
|
43
|
+
}
|
|
44
|
+
Regenerate-Affected: "重新產生受影響部分"
|
|
45
|
+
Regenerate-All: "全部重新產生"
|
|
43
46
|
|
|
44
|
-
|
|
45
|
-
|
|
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
|
|
51
|
-
|
|
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
|
-
|
|
57
|
-
|
|
58
|
-
label: "文件已更新"
|
|
55
|
+
Refine-Structure: {
|
|
56
|
+
label: "aigne doc generate\n--feedback"
|
|
59
57
|
}
|
|
60
58
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
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`
|
|
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
|
-

|
|
78
85
|
|
|
79
|
-
###
|
|
86
|
+
### 強制完整重新產生
|
|
80
87
|
|
|
81
|
-
|
|
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
|
-
|
|
101
|
+
### 完善個別文件內容
|
|
93
102
|
|
|
94
|
-
|
|
103
|
+
若要改善特定文件的內容,請使用 `aigne doc update` 指令。此指令允許您提供針對性的完善指示,並可以互動或非互動兩種模式執行。
|
|
95
104
|
|
|
96
|
-
|
|
105
|
+
#### 互動模式
|
|
97
106
|
|
|
98
|
-
|
|
107
|
+
若要進行引導式流程,請在不帶任何參數的情況下執行該指令。DocSmith 將會顯示一個選單,讓您選擇要更新的文件。選擇後,系統會提示您輸入回饋。
|
|
99
108
|
|
|
100
109
|
```shell icon=lucide:terminal
|
|
101
110
|
# 開始互動式更新流程
|
|
102
111
|
aigne doc update
|
|
103
112
|
```
|
|
104
113
|
|
|
105
|
-

|
|
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
|
-
|
|
132
|
+
### 最佳化整體結構
|
|
128
133
|
|
|
129
|
-
|
|
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
|
-
|
|
143
|
+
內容完善後,下一步是為全球受眾做準備。相關說明,請參閱 [翻譯文件](./features-translate-documentation.md) 指南。
|