@aigne/doc-smith 0.8.12-beta.6 → 0.8.12-beta.8
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 +1 -1
- package/.aigne/doc-smith/history.yaml +37 -0
- package/.aigne/doc-smith/media-description.yaml +91 -0
- package/.aigne/doc-smith/preferences.yml +12 -0
- package/.aigne/doc-smith/upload-cache.yaml +36 -69
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +24 -0
- package/agents/clear/choose-contents.mjs +14 -1
- package/agents/clear/clear-media-description.mjs +129 -0
- package/agents/clear/index.yaml +3 -1
- package/agents/evaluate/code-snippet.mjs +28 -24
- package/agents/evaluate/document-structure.yaml +0 -4
- package/agents/evaluate/document.yaml +1 -5
- package/agents/generate/index.yaml +1 -0
- package/agents/generate/update-document-structure.yaml +9 -3
- package/agents/history/view.mjs +5 -2
- package/agents/init/index.mjs +10 -0
- package/agents/media/batch-generate-media-description.yaml +44 -0
- package/agents/media/generate-media-description.yaml +47 -0
- package/agents/media/load-media-description.mjs +238 -0
- package/agents/update/generate-document.yaml +10 -4
- package/agents/update/index.yaml +1 -0
- package/agents/update/update-document-detail.yaml +9 -3
- package/agents/update/user-review-document.mjs +2 -1
- package/agents/utils/load-sources.mjs +103 -53
- package/aigne.yaml +6 -0
- package/assets/report-template/report.html +34 -34
- package/docs/configuration-initial-setup.md +74 -55
- package/docs/configuration.ja.md +59 -86
- package/docs/configuration.md +59 -86
- package/docs/configuration.zh-TW.md +59 -86
- package/docs/configuration.zh.md +59 -86
- package/docs/getting-started.ja.md +43 -24
- package/docs/getting-started.md +29 -10
- package/docs/getting-started.zh-TW.md +42 -23
- package/docs/getting-started.zh.md +39 -20
- package/docs/guides-cleaning-up.ja.md +16 -15
- package/docs/guides-cleaning-up.md +19 -17
- package/docs/guides-cleaning-up.zh-TW.md +16 -15
- package/docs/guides-cleaning-up.zh.md +12 -11
- package/docs/guides-evaluating-documents.md +70 -29
- package/docs/guides-generating-documentation.ja.md +34 -32
- package/docs/guides-generating-documentation.md +59 -119
- package/docs/guides-generating-documentation.zh-TW.md +34 -32
- package/docs/guides-generating-documentation.zh.md +30 -28
- package/docs/guides-interactive-chat.md +34 -26
- package/docs/guides-managing-history.ja.md +17 -20
- package/docs/guides-managing-history.md +19 -17
- package/docs/guides-managing-history.zh-TW.md +18 -21
- package/docs/guides-managing-history.zh.md +13 -16
- package/docs/guides-publishing-your-docs.md +40 -35
- package/docs/guides-translating-documentation.ja.md +17 -17
- package/docs/guides-translating-documentation.md +39 -34
- package/docs/guides-translating-documentation.zh-TW.md +21 -21
- package/docs/guides-translating-documentation.zh.md +18 -18
- package/docs/guides-updating-documentation.ja.md +35 -35
- package/docs/guides-updating-documentation.md +11 -9
- package/docs/guides-updating-documentation.zh-TW.md +27 -27
- package/docs/guides-updating-documentation.zh.md +26 -26
- package/docs/overview.ja.md +13 -13
- package/docs/overview.md +2 -2
- package/docs/overview.zh-TW.md +19 -19
- package/docs/overview.zh.md +16 -16
- package/docs/release-notes.md +60 -27
- package/package.json +2 -1
- package/prompts/common/afs/afs-tools-usage.md +5 -0
- package/prompts/common/afs/use-afs-instruction.md +1 -0
- package/prompts/detail/generate/system-prompt.md +0 -13
- package/prompts/detail/generate/user-prompt.md +7 -0
- package/prompts/detail/update/system-prompt.md +1 -2
- package/prompts/detail/update/user-prompt.md +7 -0
- package/prompts/evaluate/document-structure.md +6 -7
- package/prompts/evaluate/document.md +16 -25
- package/prompts/media/media-description/system-prompt.md +35 -0
- package/prompts/media/media-description/user-prompt.md +8 -0
- package/prompts/structure/generate/system-prompt.md +0 -19
- package/prompts/structure/generate/user-prompt.md +22 -1
- package/prompts/structure/update/system-prompt.md +0 -17
- package/prompts/structure/update/user-prompt.md +24 -0
- package/tests/agents/history/view.test.mjs +97 -0
- package/tests/utils/history-utils.test.mjs +125 -97
- package/utils/constants/index.mjs +0 -107
- package/utils/file-utils.mjs +42 -1
- package/utils/history-utils.mjs +3 -3
- package/agents/update/fs-tools/glob.mjs +0 -184
- package/agents/update/fs-tools/grep.mjs +0 -317
- package/agents/update/fs-tools/read-file.mjs +0 -309
- package/media.md +0 -19
- package/tests/agents/update/fs-tools/glob.test.mjs +0 -438
- package/tests/agents/update/fs-tools/grep.test.mjs +0 -279
- package/tests/agents/update/fs-tools/read-file.test.mjs +0 -549
|
@@ -1,77 +1,77 @@
|
|
|
1
1
|
# ドキュメントの更新
|
|
2
2
|
|
|
3
|
-
ドキュメントの正確性と関連性を維持することは、継続的なプロセスです。コードベースが進化したり、新しいフィードバックを受け取ったりするにつれて、既存のドキュメントを修正する必要があります。`update`
|
|
3
|
+
ドキュメントの正確性と関連性を維持することは、継続的なプロセスです。コードベースが進化したり、新しいフィードバックを受け取ったりするにつれて、既存のドキュメントを修正する必要があります。`update` コマンドは、新しい指示で特定のドキュメントを再生成するための構造化された方法を提供し、ドキュメントを最新の状態に保ちます。
|
|
4
4
|
|
|
5
|
-
このガイドでは、ドキュメントを更新するための2つの主要な方法について説明します。1
|
|
5
|
+
このガイドでは、ドキュメントを更新するための2つの主要な方法について説明します。1つは、単一ドキュメントの詳細な改良を行うための対話モード、もう1つは、複数のドキュメントに一度に変更を適用するためのバッチモードです。
|
|
6
6
|
|
|
7
|
-
## 2
|
|
7
|
+
## 2つの動作モード
|
|
8
8
|
|
|
9
9
|
`update` コマンドは、選択したドキュメントの数と指定したオプションに応じて、2つのモードのいずれかで動作します。
|
|
10
10
|
|
|
11
|
-
1.
|
|
12
|
-
2.
|
|
11
|
+
1. **対話モード**: `--reset` フラグなしで単一のドキュメントを更新する際にトリガーされます。このモードは反復的な改良のために設計されており、フィードバックを提供し、変更を確認し、ドキュメントが基準を満たすまでプロセスを繰り返すことができます。
|
|
12
|
+
2. **バッチモード**: 複数のドキュメントを同時に更新する場合、または `--reset` フラグを使用する場合に使用されます。このモードは、1回の操作で選択したすべてのドキュメントにフィードバックを適用するため、広範な変更に効率的です。
|
|
13
13
|
|
|
14
|
-
##
|
|
14
|
+
## 対話モード: 単一ドキュメントの改良
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
対話モードは、単一のドキュメントに正確な変更を加えるための制御された環境を提供します。特定のフィードバックに基づいてコンテンツを慎重に確認し、調整する必要がある場合に最適な選択肢です。
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
対話セッションを開始するには、`aigne doc update` コマンドを実行し、リストから単一のドキュメントを選択します。
|
|
19
19
|
|
|
20
20
|
```bash
|
|
21
21
|
aigne doc update
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
ツールは次の手順であなたをガイドします:
|
|
25
25
|
|
|
26
|
-
1.
|
|
27
|
-
2.
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
3.
|
|
32
|
-
4.
|
|
26
|
+
1. **ドキュメント分析**: システムはまず、選択されたドキュメントの構造的なアウトラインを表示し、その主要な見出しを示します。
|
|
27
|
+
2. **ユーザーアクション**: 次に、3つのアクションのうち1つを選択するよう求められます:
|
|
28
|
+
* **ドキュメントの表示**: ドキュメントの現行バージョンの全内容をターミナルにレンダリングして表示し、読みやすくします。
|
|
29
|
+
* **フィードバックの提供**: 修正リクエストを入力するよう求められます。これは、「エラー処理に関するセクションを追加してください」から「`config` オブジェクトの目的を明確にしてください」まで、何でもかまいません。
|
|
30
|
+
* **完了**: 対話セッションを終了し、最後に生成されたバージョンのドキュメントを保存します。
|
|
31
|
+
3. **コンテンツの再生成**: フィードバックを送信すると、AIがあなたの指示に基づいてドキュメントのコンテンツを再生成します。その後、新しい見出し構造が表示されます。
|
|
32
|
+
4. **反復または終了**: 結果に満足するまで、表示、フィードバックの提供、再生成のループを続けることができます。「完了」を選択すると、プロセスは終了です。
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
この反復的なサイクルにより、最終的な出力を微調整でき、更新されたドキュメントが正確かつ完全であることが保証されます。
|
|
35
35
|
|
|
36
|
-
##
|
|
36
|
+
## バッチモード: 複数ドキュメントの更新
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
バッチモードは、複数のドキュメントに同じ一般的なフィードバックを適用したり、それらを完全に再生成したりする必要がある場合に、効率性を考慮して設計されています。このモードは、複数のドキュメントを選択した場合、または `--docs` や `--reset` のようなコマンドラインフラグを使用した場合に自動的に有効になります。
|
|
39
39
|
|
|
40
40
|
### 特定のフィードバックによる更新
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
対話セッションに入ることなく、コマンドラインから直接フィードバックを提供して、1つまたは複数のドキュメントを更新できます。
|
|
43
43
|
|
|
44
|
-
```bash title="
|
|
45
|
-
aigne doc update --docs
|
|
44
|
+
```bash title="フィードバック付きで単一ドキュメントを更新"
|
|
45
|
+
aigne doc update --docs overview.md --feedback "Add a section explaining the authentication flow"
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
-
```bash title="
|
|
49
|
-
aigne doc update --docs
|
|
48
|
+
```bash title="複数のドキュメントを同じフィードバックで更新"
|
|
49
|
+
aigne doc update --docs overview.md --docs guides-getting-started.md --feedback "Improve the clarity of all code examples"
|
|
50
50
|
```
|
|
51
51
|
|
|
52
52
|
### リセットと再生成
|
|
53
53
|
|
|
54
|
-
`--reset`
|
|
54
|
+
`--reset` フラグは、ツールにドキュメントの以前のバージョンを無視し、ソースコードに基づいてゼロから再生成するよう指示します。これは、コードの大幅な変更によって既存のドキュメントが時代遅れになった場合に便利です。
|
|
55
55
|
|
|
56
|
-
```bash title="
|
|
57
|
-
aigne doc update --docs
|
|
56
|
+
```bash title="特定のドキュメントをゼロから再生成"
|
|
57
|
+
aigne doc update --docs overview.md --reset
|
|
58
58
|
```
|
|
59
59
|
|
|
60
60
|
## コマンドリファレンス
|
|
61
61
|
|
|
62
|
-
`update`
|
|
62
|
+
`update` コマンドは、その動作を制御するためのいくつかのフラグを受け入れます。
|
|
63
63
|
|
|
64
64
|
| パラメータ | 説明 | 例 |
|
|
65
65
|
| :--- | :--- | :--- |
|
|
66
|
-
| `--docs <path>` | 更新する1
|
|
67
|
-
| `--feedback <text>` |
|
|
68
|
-
| `--glossary <file>` |
|
|
69
|
-
| `--reset` |
|
|
66
|
+
| `--docs <path>` | 更新する1つまたは複数のドキュメントパスを指定します。複数回使用できます。 | `--docs overview.md --docs guides-generating-documentation.md` |
|
|
67
|
+
| `--feedback <text>` | コンテンツで何を変更するかについての指示を提供します。 | `--feedback "インストール手順に詳細を追加してください"` |
|
|
68
|
+
| `--glossary <file>` | 再生成時に一貫した用語を保証するために、用語集ファイルを指定します。 | `--glossary @/path/to/glossary.md` |
|
|
69
|
+
| `--reset` | 選択したドキュメントの以前のバージョンを無視して、完全な再生成を強制するブール型フラグです。 | `--reset` |
|
|
70
70
|
|
|
71
|
-
##
|
|
71
|
+
## 概要
|
|
72
72
|
|
|
73
|
-
`update`
|
|
73
|
+
`update` コマンドは、ドキュメントをプロジェクトと整合性を保つための柔軟なワークフローを提供します。単一ドキュメントの詳細で反復的な変更には対話モードを、複数のファイルにわたる広範な更新を効率的に適用するにはバッチモードを使用してください。
|
|
74
74
|
|
|
75
|
-
|
|
75
|
+
関連タスクについては、以下のガイドを参照してください:
|
|
76
76
|
- [ドキュメントの生成](./guides-generating-documentation.md)
|
|
77
77
|
- [ドキュメントの翻訳](./guides-translating-documentation.md)
|
|
@@ -4,9 +4,11 @@ Maintaining the accuracy and relevance of documentation is a continuous process.
|
|
|
4
4
|
|
|
5
5
|
This guide explains the two primary methods for updating your documentation: an interactive mode for detailed, single-document refinement and a batch mode for applying changes to multiple documents at once.
|
|
6
6
|
|
|
7
|
+
For information on creating documents from scratch, please see the [Generating Documentation](./guides-generating-documentation.md) guide.
|
|
8
|
+
|
|
7
9
|
## Two Modes of Operation
|
|
8
10
|
|
|
9
|
-
The `update` command operates in one of two modes depending on the number of documents you select and the options you provide.
|
|
11
|
+
The `update` command operates in one of two modes depending on the number of documents you select and the options you provide. The system automatically chooses the appropriate mode based on your command.
|
|
10
12
|
|
|
11
13
|
1. **Interactive Mode**: Triggered when you update a single document without the `--reset` flag. This mode is designed for iterative refinement, allowing you to provide feedback, review the changes, and repeat the process until the document meets your standards.
|
|
12
14
|
2. **Batch Mode**: Used when you update multiple documents simultaneously or when you use the `--reset` flag. This mode applies your feedback to all selected documents in a single operation, which is efficient for broad changes.
|
|
@@ -41,20 +43,20 @@ Batch mode is designed for efficiency when you need to apply the same general fe
|
|
|
41
43
|
|
|
42
44
|
You can provide feedback directly from the command line to update one or more documents without entering an interactive session.
|
|
43
45
|
|
|
44
|
-
```bash
|
|
45
|
-
aigne doc update --docs /
|
|
46
|
+
```bash Update a single document with feedback
|
|
47
|
+
aigne doc update --docs /overview --feedback "Add a section explaining the authentication flow"
|
|
46
48
|
```
|
|
47
49
|
|
|
48
|
-
```bash
|
|
49
|
-
aigne doc update --docs /
|
|
50
|
+
```bash Update multiple documents with the same feedback
|
|
51
|
+
aigne doc update --docs /overview --docs /getting-started --feedback "Improve the clarity of all code examples"
|
|
50
52
|
```
|
|
51
53
|
|
|
52
54
|
### Resetting and Regenerating
|
|
53
55
|
|
|
54
56
|
The `--reset` flag instructs the tool to ignore the previous versions of the documents and regenerate them from scratch based on the source code. This is useful when significant changes in the code have made the existing documentation obsolete.
|
|
55
57
|
|
|
56
|
-
```bash
|
|
57
|
-
aigne doc update --docs /
|
|
58
|
+
```bash Regenerate a specific document from scratch
|
|
59
|
+
aigne doc update --docs /overview --reset
|
|
58
60
|
```
|
|
59
61
|
|
|
60
62
|
## Command Reference
|
|
@@ -63,7 +65,7 @@ The `update` command accepts several flags to control its behavior.
|
|
|
63
65
|
|
|
64
66
|
| Parameter | Description | Example |
|
|
65
67
|
| :--- | :--- | :--- |
|
|
66
|
-
| `--docs <path>` | Specifies one or more document paths to update.
|
|
68
|
+
| `--docs <path>` | Specifies one or more document paths to update. This flag can be used multiple times. | `--docs /overview --docs /guides/generating-documentation` |
|
|
67
69
|
| `--feedback <text>` | Provides instructions for what to change in the content. | `--feedback "Add more detail to the installation steps"` |
|
|
68
70
|
| `--glossary <file>` | Specifies a glossary file to ensure consistent terminology during regeneration. | `--glossary @/path/to/glossary.md` |
|
|
69
71
|
| `--reset` | A boolean flag that forces a complete regeneration of the selected documents, ignoring their previous versions. | `--reset` |
|
|
@@ -74,4 +76,4 @@ The `update` command offers a flexible workflow for keeping your documentation a
|
|
|
74
76
|
|
|
75
77
|
For related tasks, refer to the following guides:
|
|
76
78
|
- [Generating Documentation](./guides-generating-documentation.md)
|
|
77
|
-
- [Translating Documentation](./guides-translating-documentation.md)
|
|
79
|
+
- [Translating Documentation](./guides-translating-documentation.md)
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
# 更新文件
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
維護文件的準確性和相關性是一個持續的過程。隨著您的程式碼庫不斷演進或收到新的回饋,您將需要修改現有文件。`update` 指令提供了一種結構化的方法,可根據新的指示重新生成特定文件,確保它們保持最新。
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
本指南將說明更新文件的兩種主要方法:用於詳細、單一文件精修的互動模式,以及一次性將變更應用於多個文件的批次模式。
|
|
6
6
|
|
|
7
7
|
## 兩種操作模式
|
|
8
8
|
|
|
9
|
-
`update`
|
|
9
|
+
`update` 指令根據您選擇的文件數量和提供的選項,以兩種模式之一運行。
|
|
10
10
|
|
|
11
|
-
1. **互動模式**:當您更新單一文件且未使用 `--reset`
|
|
12
|
-
2. **批次模式**:當您同時更新多個文件或使用 `--reset`
|
|
11
|
+
1. **互動模式**:當您更新單一文件且未使用 `--reset` 旗標時觸發。此模式專為迭代式精修而設計,讓您可以提供回饋、檢視變更,並重複此過程,直到文件符合您的標準。
|
|
12
|
+
2. **批次模式**:當您同時更新多個文件或使用 `--reset` 旗標時使用。此模式將您的回饋一次性應用於所有選定的文件,對於進行廣泛變更而言非常有效率。
|
|
13
13
|
|
|
14
|
-
##
|
|
14
|
+
## 互動模式:精修單一文件
|
|
15
15
|
|
|
16
16
|
互動模式提供了一個受控的環境,可對單一文件進行精確的變更。當您需要根據特定回饋仔細檢視和調整內容時,這是理想的選擇。
|
|
17
17
|
|
|
18
|
-
若要啟動互動式會話,請執行 `aigne doc update`
|
|
18
|
+
若要啟動互動式會話,請執行 `aigne doc update` 指令,並從列表中選擇一個文件。
|
|
19
19
|
|
|
20
20
|
```bash
|
|
21
21
|
aigne doc update
|
|
@@ -24,37 +24,37 @@ aigne doc update
|
|
|
24
24
|
該工具將引導您完成以下步驟:
|
|
25
25
|
|
|
26
26
|
1. **文件分析**:系統首先會顯示所選文件的結構大綱,展示其主要標題。
|
|
27
|
-
2.
|
|
28
|
-
*
|
|
27
|
+
2. **使用者操作**:接著會提示您選擇以下三種操作之一:
|
|
28
|
+
* **檢視文件**:顯示文件當前版本的完整內容,並在您的終端機中呈現以便閱讀。
|
|
29
29
|
* **提供回饋**:提示您輸入修改請求。這可以是任何內容,從「新增一個關於錯誤處理的章節」到「闡明 `config` 物件的用途」。
|
|
30
|
-
*
|
|
31
|
-
3.
|
|
32
|
-
4.
|
|
30
|
+
* **完成**:退出互動式會話並儲存最後生成的文件版本。
|
|
31
|
+
3. **內容重新生成**:在您提交回饋後,AI 會根據您的指示重新生成文件內容。接著會顯示新的標題結構。
|
|
32
|
+
4. **迭代或完成**:您可以持續這個檢視、提供回饋和重新生成的循環,直到您對結果滿意為止。一旦您選擇「完成」,流程即告結束。
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
這種迭代循環可以對最終產出進行精細的控制,確保更新後的文件準確且完整。
|
|
35
35
|
|
|
36
36
|
## 批次模式:更新多個文件
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
當您需要將相同的通用回饋應用於多個文件或完全重新生成它們時,批次模式是為效率而設計的。如果您選擇了多個文件,或使用了像 `--docs` 或 `--reset` 這樣的命令列旗標,此模式將會自動啟動。
|
|
39
39
|
|
|
40
40
|
### 使用特定回饋進行更新
|
|
41
41
|
|
|
42
42
|
您可以直接從命令列提供回饋來更新一個或多個文件,而無需進入互動式會話。
|
|
43
43
|
|
|
44
44
|
```bash title="使用回饋更新單一文件"
|
|
45
|
-
aigne doc update --docs
|
|
45
|
+
aigne doc update --docs overview.md --feedback "Add a section explaining the authentication flow"
|
|
46
46
|
```
|
|
47
47
|
|
|
48
48
|
```bash title="使用相同的回饋更新多個文件"
|
|
49
|
-
aigne doc update --docs
|
|
49
|
+
aigne doc update --docs overview.md --docs guides-getting-started.md --feedback "Improve the clarity of all code examples"
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
-
###
|
|
52
|
+
### 重設與重新生成
|
|
53
53
|
|
|
54
|
-
`--reset`
|
|
54
|
+
`--reset` 旗標指示工具忽略文件先前的版本,並根據原始碼從頭開始重新生成它們。當程式碼發生重大變更,導致現有文件過時時,這個功能非常有用。
|
|
55
55
|
|
|
56
|
-
```bash title="
|
|
57
|
-
aigne doc update --docs
|
|
56
|
+
```bash title="從頭開始重新生成特定文件"
|
|
57
|
+
aigne doc update --docs overview.md --reset
|
|
58
58
|
```
|
|
59
59
|
|
|
60
60
|
## 指令參考
|
|
@@ -63,15 +63,15 @@ aigne doc update --docs /guides/overview.md --reset
|
|
|
63
63
|
|
|
64
64
|
| 參數 | 說明 | 範例 |
|
|
65
65
|
| :--- | :--- | :--- |
|
|
66
|
-
| `--docs <path>` | 指定要更新的一個或多個文件路徑。可多次使用。 | `--docs
|
|
67
|
-
| `--feedback <text>` |
|
|
68
|
-
| `--glossary <file>` |
|
|
69
|
-
| `--reset` |
|
|
66
|
+
| `--docs <path>` | 指定要更新的一個或多個文件路徑。可多次使用。 | `--docs overview.md --docs guides-generating-documentation.md` |
|
|
67
|
+
| `--feedback <text>` | 提供內容修改的指示。 | `--feedback "Add more detail to the installation steps"` |
|
|
68
|
+
| `--glossary <file>` | 指定一個詞彙表檔案,以確保重新生成時術語的一致性。 | `--glossary @/path/to/glossary.md` |
|
|
69
|
+
| `--reset` | 一個布林旗標,強制完全重新生成所選文件,忽略其先前的版本。 | `--reset` |
|
|
70
70
|
|
|
71
71
|
## 總結
|
|
72
72
|
|
|
73
|
-
`update`
|
|
73
|
+
`update` 指令提供了一個靈活的工作流程,讓您的文件與您的專案保持一致。對於單一文件,使用互動模式進行詳細、迭代的變更;對於多個檔案,使用批次模式有效率地應用廣泛的更新。
|
|
74
74
|
|
|
75
|
-
|
|
76
|
-
- [
|
|
75
|
+
有關相關任務,請參閱以下指南:
|
|
76
|
+
- [生成文件](./guides-generating-documentation.md)
|
|
77
77
|
- [翻譯文件](./guides-translating-documentation.md)
|
|
@@ -1,76 +1,76 @@
|
|
|
1
1
|
# 更新文档
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
维护文档的准确性和相关性是一个持续的过程。随着代码库的演进或收到新的反馈,您将需要修改现有文档。`update` 命令提供了一种结构化的方式,可以用新的指令重新生成特定文档,确保其保持最新。
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
本指南将解释更新文档的两种主要方法:用于对单个文档进行详细优化的交互模式,以及用于一次性将变更应用于多个文档的批处理模式。
|
|
6
6
|
|
|
7
7
|
## 两种操作模式
|
|
8
8
|
|
|
9
|
-
`update`
|
|
9
|
+
`update` 命令根据您选择的文档数量和提供的选项,在两种模式之一中运行。
|
|
10
10
|
|
|
11
|
-
1.
|
|
12
|
-
2.
|
|
11
|
+
1. **交互模式**:当您更新单个文档且未使用 `--reset` 标志时触发。此模式专为迭代优化而设计,允许您提供反馈、审查变更并重复此过程,直到文档符合您的标准。
|
|
12
|
+
2. **批处理模式**:当您同时更新多个文档或使用 `--reset` 标志时使用。此模式会在单次操作中将您的反馈应用于所有选定的文档,对于大范围的变更非常高效。
|
|
13
13
|
|
|
14
14
|
## 交互模式:优化单个文档
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
交互模式提供了一个受控的环境,可以对单个文档进行精确的更改。当您需要根据特定反馈仔细审查和调整内容时,这是理想的选择。
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
要启动交互会话,请运行 `aigne doc update` 命令并从列表中选择单个文档。
|
|
19
19
|
|
|
20
20
|
```bash
|
|
21
21
|
aigne doc update
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
该工具将引导您完成以下步骤:
|
|
25
25
|
|
|
26
26
|
1. **文档分析**:系统首先会显示所选文档的结构大纲,展示其主要标题。
|
|
27
|
-
2.
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
3.
|
|
32
|
-
4.
|
|
27
|
+
2. **用户操作**:然后系统会提示您选择以下三种操作之一:
|
|
28
|
+
* **查看文档**:显示当前版本文档的全部内容,并在您的终端中渲染以便于阅读。
|
|
29
|
+
* **提供反馈**:提示您输入修改请求。这可以是任何内容,从“添加一个关于错误处理的部分”到“阐明 `config` 对象的用途”。
|
|
30
|
+
* **完成**:退出交互会话并保存最后生成的文档版本。
|
|
31
|
+
3. **内容重新生成**:在您提交反馈后,AI 会根据您的指令重新生成文档内容。然后会显示新的标题结构。
|
|
32
|
+
4. **迭代或完成**:您可以继续这个查看、提供反馈和重新生成的循环,直到您对结果满意为止。一旦选择“完成”,该过程即告结束。
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
这种迭代循环可以对最终输出进行微调控制,确保更新后的文档准确而完整。
|
|
35
35
|
|
|
36
|
-
##
|
|
36
|
+
## 批处理模式:更新多个文档
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
批处理模式专为提高效率而设计,适用于需要将相同的通用反馈应用于多个文档或完全重新生成它们的情况。如果您选择多个文档或使用 `--docs` 或 `--reset` 等命令行标志,此模式将自动激活。
|
|
39
39
|
|
|
40
40
|
### 使用特定反馈进行更新
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
您可以直接从命令行提供反馈来更新一个或多个文档,而无需进入交互会话。
|
|
43
43
|
|
|
44
44
|
```bash title="使用反馈更新单个文档"
|
|
45
|
-
aigne doc update --docs
|
|
45
|
+
aigne doc update --docs overview.md --feedback "Add a section explaining the authentication flow"
|
|
46
46
|
```
|
|
47
47
|
|
|
48
48
|
```bash title="使用相同的反馈更新多个文档"
|
|
49
|
-
aigne doc update --docs
|
|
49
|
+
aigne doc update --docs overview.md --docs guides-getting-started.md --feedback "Improve the clarity of all code examples"
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
-
###
|
|
52
|
+
### 重置和重新生成
|
|
53
53
|
|
|
54
54
|
`--reset` 标志指示工具忽略文档的先前版本,并根据源代码从头开始重新生成它们。当代码中的重大变更使现有文档过时时,这非常有用。
|
|
55
55
|
|
|
56
56
|
```bash title="从头开始重新生成特定文档"
|
|
57
|
-
aigne doc update --docs
|
|
57
|
+
aigne doc update --docs overview.md --reset
|
|
58
58
|
```
|
|
59
59
|
|
|
60
60
|
## 命令参考
|
|
61
61
|
|
|
62
|
-
`update`
|
|
62
|
+
`update` 命令接受几个标志来控制其行为。
|
|
63
63
|
|
|
64
64
|
| Parameter | Description | Example |
|
|
65
65
|
| :--- | :--- | :--- |
|
|
66
|
-
| `--docs <path>` | 指定要更新的一个或多个文档路径。可多次使用。 | `--docs
|
|
67
|
-
| `--feedback <text>` | 提供有关内容变更的指令。 | `--feedback "
|
|
66
|
+
| `--docs <path>` | 指定要更新的一个或多个文档路径。可多次使用。 | `--docs overview.md --docs guides-generating-documentation.md` |
|
|
67
|
+
| `--feedback <text>` | 提供有关内容变更的指令。 | `--feedback "Add more detail to the installation steps"` |
|
|
68
68
|
| `--glossary <file>` | 指定一个术语表文件,以确保在重新生成期间术语的一致性。 | `--glossary @/path/to/glossary.md` |
|
|
69
69
|
| `--reset` | 一个布尔标志,强制完全重新生成所选文档,忽略其先前版本。 | `--reset` |
|
|
70
70
|
|
|
71
71
|
## 总结
|
|
72
72
|
|
|
73
|
-
`update`
|
|
73
|
+
`update` 命令提供了一个灵活的工作流,可让您的文档与项目保持一致。使用交互模式对单个文档进行详细的迭代更改,使用批处理模式高效地将广泛的更新应用于多个文件。
|
|
74
74
|
|
|
75
75
|
有关相关任务,请参阅以下指南:
|
|
76
76
|
- [生成文档](./guides-generating-documentation.md)
|
package/docs/overview.ja.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# 概要
|
|
2
2
|
|
|
3
|
-
AIGNE DocSmith
|
|
3
|
+
AIGNE DocSmithは、人工知能を利用してプロジェクトのソースコードからドキュメントを自動的に作成するツールです。これは[AIGNE Framework](https://www.aigne.io/framework)上に構築されており、コードベースを正確に反映した構造化された多言語ドキュメントを生成するように設計されています。
|
|
4
4
|
|
|
5
|
-
DocSmith
|
|
5
|
+
DocSmithの主な目的は、手動でのドキュメント作成に伴う一般的な課題、例えば作成に時間がかかる、コードの変更に伴い内容が古くなる、一貫性に欠けるといった問題に対処することです。このプロセスを自動化することで、DocSmithはドキュメントを常に最新かつ正確に保つ手助けをします。
|
|
6
6
|
|
|
7
7
|
## 仕組み
|
|
8
8
|
|
|
@@ -32,13 +32,13 @@ DocSmith -> Docs: "生成"
|
|
|
32
32
|
|
|
33
33
|
## 主な機能
|
|
34
34
|
|
|
35
|
-
DocSmith
|
|
35
|
+
DocSmithは、作成から公開までのドキュメントライフサイクルを管理するための一連の機能を提供します。
|
|
36
36
|
|
|
37
|
-
* **AI
|
|
38
|
-
* **多言語サポート**:ドキュメントを英語、中国語(簡体字)、日本語を含む12
|
|
39
|
-
* **LLMとの統合**:さまざまな大規模言語モデル(LLM
|
|
40
|
-
*
|
|
41
|
-
*
|
|
37
|
+
* **AIによる生成**:コードベースを分析し、論理的なドキュメント構造を提案し、コードの機能を説明するコンテンツを生成します。
|
|
38
|
+
* **多言語サポート**:ドキュメントを英語、中国語(簡体字)、日本語を含む12言語に翻訳します。翻訳プロセスは、技術的な正確性を維持するために文脈を認識します。
|
|
39
|
+
* **LLMとの統合**:さまざまな大規模言語モデル(LLM)と連携します。デフォルトでは、[AIGNE Hub](https://www.aigne.io/en/hub)を使用します。これは、個別のAPIキーを必要とせずにGoogle GeminiやOpenAI GPTのようなモデルを切り替えることができるサービスです。プロバイダーに直接アクセスするために、独自のAPIキーを設定することもできます。
|
|
40
|
+
* **スマートアップデート**:ソースコードの変更を検出し、ドキュメントの対応するセクションを更新します。また、生成されたコンテンツを洗練させるために、具体的なフィードバックを提供することもできます。
|
|
41
|
+
* **公開オプション**:単一のコマンドで生成されたドキュメントを公開します。公式のDocSmithプラットフォーム、または独自の[Discuss Kit](https://www.web3kit.rocks/discuss-kit)インスタンスにデプロイできます。Discuss Kitは、ドキュメントをホスティングおよび表示するためのサービスです。
|
|
42
42
|
|
|
43
43
|
## 利用可能なコマンド
|
|
44
44
|
|
|
@@ -47,15 +47,15 @@ DocSmithは一連のコマンドを通じて操作されます。以下の表は
|
|
|
47
47
|
| コマンド | 説明 |
|
|
48
48
|
| :--- | :--- |
|
|
49
49
|
| `generate` | ソースファイルから新しいドキュメントセットを作成します。 |
|
|
50
|
-
| `update` |
|
|
51
|
-
| `translate` | ドキュメントをサポートされている12
|
|
50
|
+
| `update` | コードの変更や新しいフィードバックに基づいて既存のドキュメントを修正します。 |
|
|
51
|
+
| `translate` | ドキュメントをサポートされている12言語のいずれかまたは複数に翻訳します。 |
|
|
52
52
|
| `publish` | ドキュメントをライブでアクセス可能なURLにデプロイします。 |
|
|
53
53
|
| `evaluate` | 生成されたドキュメントの品質と完全性を評価します。 |
|
|
54
|
-
| `history` |
|
|
54
|
+
| `history` | ドキュメントに加えられた更新履歴を表示します。 |
|
|
55
55
|
| `chat` | ドキュメント作成タスクを支援するための対話型チャットセッションを開始します。 |
|
|
56
|
-
| `clear` |
|
|
56
|
+
| `clear` | 生成されたファイル、設定、キャッシュデータを削除します。 |
|
|
57
57
|
| `prefs` | ドキュメント生成のために保存された設定や構成を管理します。 |
|
|
58
58
|
|
|
59
59
|
---
|
|
60
60
|
|
|
61
|
-
この概要では、AIGNE DocSmith
|
|
61
|
+
この概要では、AIGNE DocSmithの目的と機能の全体像を説明しました。ツールの使用を開始するには、インストールとセットアップの手順が記載されている[スタートガイド](./getting-started.md)に進んでください。
|
package/docs/overview.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Overview
|
|
2
2
|
|
|
3
|
-
AIGNE DocSmith is a tool that uses Artificial Intelligence to automatically create documentation from your project's source code. It is built on the AIGNE Framework and is designed to produce structured, multi-language documents that accurately reflect your codebase.
|
|
3
|
+
AIGNE DocSmith is a tool that uses Artificial Intelligence to automatically create documentation from your project's source code. It is built on the [AIGNE Framework](https://www.aigne.io/en/framework) and is designed to produce structured, multi-language documents that accurately reflect your codebase.
|
|
4
4
|
|
|
5
5
|
The primary goal of DocSmith is to address the common challenges of manual documentation, such as being time-consuming to write, becoming outdated as code changes, and lacking consistency. By automating this process, DocSmith helps ensure your documentation remains current and accurate.
|
|
6
6
|
|
|
@@ -38,7 +38,7 @@ DocSmith provides a set of features to handle the documentation lifecycle from c
|
|
|
38
38
|
* **Multi-Language Support**: Translates documentation into 12 languages, including English, Chinese (Simplified), and Japanese. The translation process is context-aware to maintain technical accuracy.
|
|
39
39
|
* **Integration with LLMs**: Connects with various Large Language Models (LLMs). By default, it uses [AIGNE Hub](https://www.aigne.io/en/hub), a service that allows you to switch between models like Google Gemini and OpenAI GPT without needing separate API keys. You can also configure your own API keys for direct provider access.
|
|
40
40
|
* **Smart Updates**: Detects changes in your source code and updates the corresponding sections of your documentation. You can also provide specific feedback to refine generated content.
|
|
41
|
-
* **Publishing Options**: Publish your generated documentation with a single command. You can deploy to the official DocSmith platform or
|
|
41
|
+
* **Publishing Options**: Publish your generated documentation with a single command. You can deploy to the official DocSmith platform or run your own instance of [Discuss Kit](https://www.web3kit.rocks/discuss-kit). Discuss Kit is a service for hosting and displaying documentation.
|
|
42
42
|
|
|
43
43
|
## Available Commands
|
|
44
44
|
|
package/docs/overview.zh-TW.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# 總覽
|
|
2
2
|
|
|
3
|
-
AIGNE DocSmith
|
|
3
|
+
AIGNE DocSmith 是一款利用人工智慧從您專案的原始碼自動建立文件的工具。它建構於 [AIGNE Framework](https://www.aigne.io/framework) 之上,旨在產出能準確反映您程式碼庫的結構化、多語言文件。
|
|
4
4
|
|
|
5
|
-
DocSmith
|
|
5
|
+
DocSmith 的主要目標是解決手動編寫文件的常見挑戰,例如編寫耗時、隨著程式碼變更而過時,以及缺乏一致性。透過自動化此流程,DocSmith 有助於確保您的文件保持最新和準確。
|
|
6
6
|
|
|
7
7
|
## 運作方式
|
|
8
8
|
|
|
9
|
-
DocSmith
|
|
9
|
+
DocSmith 透過分析您專案的原始碼來運作,以理解其結構、元件和功能。根據此分析,它會產生一套完整的文件,從高階指南到詳細的 API 參考資料。
|
|
10
10
|
|
|
11
11
|
```d2
|
|
12
12
|
direction: down
|
|
@@ -22,40 +22,40 @@ DocSmith: {
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
Docs: {
|
|
25
|
-
label: "
|
|
25
|
+
label: "產生的文件"
|
|
26
26
|
shape: rectangle
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
Source-Code -> DocSmith: "分析"
|
|
30
|
-
DocSmith -> Docs: "
|
|
30
|
+
DocSmith -> Docs: "產生"
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
## 核心功能
|
|
34
34
|
|
|
35
|
-
DocSmith
|
|
35
|
+
DocSmith 提供了一系列功能來處理從建立到發布的整個文件生命週期。
|
|
36
36
|
|
|
37
|
-
* **AI
|
|
38
|
-
* **多語言支援**:將文件翻譯成 12
|
|
39
|
-
* **與大型語言模型 (LLM)
|
|
40
|
-
*
|
|
41
|
-
*
|
|
37
|
+
* **AI 驅動的生成**:分析您的程式碼庫以提出合乎邏輯的文件結構,並產生解釋您程式碼功能的內容。
|
|
38
|
+
* **多語言支援**:將文件翻譯成 12 種語言,包括英語、簡體中文和日語。翻譯過程能感知上下文,以保持技術準確性。
|
|
39
|
+
* **與大型語言模型 (LLM) 整合**:連接各種大型語言模型 (LLM)。預設情況下,它使用 [AIGNE Hub](https://www.aigne.io/en/hub),這是一項服務,讓您可以在 Google Gemini 和 OpenAI GPT 等模型之間切換,而無需單獨的 API 金鑰。您也可以設定自己的 API 金鑰以直接存取供應商。
|
|
40
|
+
* **智慧更新**:偵測您原始碼中的變更,並更新文件的相應部分。您還可以提供具體的回饋來完善產生的內容。
|
|
41
|
+
* **發布選項**:使用單一指令發布您產生的文件。您可以部署到官方 DocSmith 平台或您自己的 [Discuss Kit](https://www.web3kit.rocks/discuss-kit) 實例。Discuss Kit 是一項用於託管和顯示文件的服務。
|
|
42
42
|
|
|
43
43
|
## 可用指令
|
|
44
44
|
|
|
45
|
-
DocSmith
|
|
45
|
+
DocSmith 透過一組指令進行操作。下表總結了主要指令及其功能。
|
|
46
46
|
|
|
47
47
|
| Command | Description |
|
|
48
48
|
| :--- | :--- |
|
|
49
|
-
| `generate` |
|
|
49
|
+
| `generate` | 從您的來源檔案建立一套新文件。 |
|
|
50
50
|
| `update` | 根據程式碼變更或新的回饋修改現有文件。 |
|
|
51
51
|
| `translate` | 將文件翻譯成 12 種支援語言中的一種或多種。 |
|
|
52
|
-
| `publish` |
|
|
53
|
-
| `evaluate` |
|
|
54
|
-
| `history` |
|
|
52
|
+
| `publish` | 將您的文件部署到一個可即時存取的 URL。 |
|
|
53
|
+
| `evaluate` | 評估您所產生文件的品質和完整性。 |
|
|
54
|
+
| `history` | 檢視您文件的更新歷史記錄。 |
|
|
55
55
|
| `chat` | 啟動一個互動式聊天會話,以協助處理文件任務。 |
|
|
56
|
-
| `clear` |
|
|
57
|
-
| `prefs` |
|
|
56
|
+
| `clear` | 移除產生的檔案、設定和快取資料。 |
|
|
57
|
+
| `prefs` | 管理用於文件生成的已儲存偏好設定和組態。 |
|
|
58
58
|
|
|
59
59
|
---
|
|
60
60
|
|
|
61
|
-
本總覽提供了 AIGNE DocSmith
|
|
61
|
+
本總覽提供了 AIGNE DocSmith 的用途和功能的高階摘要。若要開始使用此工具,請前往 [快速入門](./getting-started.md) 指南以取得安裝和設定說明。
|