@aigne/doc-smith 0.8.12-beta.6 → 0.8.12-beta.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/.aigne/doc-smith/history.yaml +37 -0
  2. package/.aigne/doc-smith/preferences.yml +12 -0
  3. package/.aigne/doc-smith/upload-cache.yaml +30 -0
  4. package/.release-please-manifest.json +1 -1
  5. package/CHANGELOG.md +12 -0
  6. package/agents/generate/update-document-structure.yaml +9 -3
  7. package/agents/history/view.mjs +5 -2
  8. package/agents/update/generate-document.yaml +10 -4
  9. package/agents/update/update-document-detail.yaml +9 -3
  10. package/agents/update/user-review-document.mjs +2 -1
  11. package/docs/guides-cleaning-up.ja.md +16 -15
  12. package/docs/guides-cleaning-up.md +5 -4
  13. package/docs/guides-cleaning-up.zh-TW.md +16 -15
  14. package/docs/guides-cleaning-up.zh.md +12 -11
  15. package/docs/guides-generating-documentation.ja.md +34 -32
  16. package/docs/guides-generating-documentation.md +15 -13
  17. package/docs/guides-generating-documentation.zh-TW.md +34 -32
  18. package/docs/guides-generating-documentation.zh.md +30 -28
  19. package/docs/guides-managing-history.ja.md +17 -20
  20. package/docs/guides-managing-history.md +5 -8
  21. package/docs/guides-managing-history.zh-TW.md +18 -21
  22. package/docs/guides-managing-history.zh.md +13 -16
  23. package/docs/guides-translating-documentation.ja.md +17 -17
  24. package/docs/guides-translating-documentation.md +1 -1
  25. package/docs/guides-translating-documentation.zh-TW.md +21 -21
  26. package/docs/guides-translating-documentation.zh.md +18 -18
  27. package/docs/guides-updating-documentation.ja.md +35 -35
  28. package/docs/guides-updating-documentation.md +4 -4
  29. package/docs/guides-updating-documentation.zh-TW.md +27 -27
  30. package/docs/guides-updating-documentation.zh.md +26 -26
  31. package/docs/overview.ja.md +13 -13
  32. package/docs/overview.md +1 -1
  33. package/docs/overview.zh-TW.md +19 -19
  34. package/docs/overview.zh.md +16 -16
  35. package/package.json +1 -1
  36. package/prompts/common/afs/afs-tools-usage.md +5 -0
  37. package/prompts/common/afs/use-afs-instruction.md +1 -0
  38. package/prompts/detail/generate/system-prompt.md +0 -13
  39. package/prompts/detail/generate/user-prompt.md +7 -0
  40. package/prompts/detail/update/system-prompt.md +1 -2
  41. package/prompts/detail/update/user-prompt.md +7 -0
  42. package/prompts/structure/generate/system-prompt.md +0 -19
  43. package/prompts/structure/generate/user-prompt.md +22 -1
  44. package/prompts/structure/update/system-prompt.md +0 -17
  45. package/prompts/structure/update/user-prompt.md +24 -0
  46. package/tests/agents/history/view.test.mjs +97 -0
  47. package/tests/utils/history-utils.test.mjs +125 -97
  48. package/utils/file-utils.mjs +1 -1
  49. package/utils/history-utils.mjs +3 -3
  50. package/agents/update/fs-tools/glob.mjs +0 -184
  51. package/agents/update/fs-tools/grep.mjs +0 -317
  52. package/agents/update/fs-tools/read-file.mjs +0 -309
  53. package/tests/agents/update/fs-tools/glob.test.mjs +0 -438
  54. package/tests/agents/update/fs-tools/grep.test.mjs +0 -279
  55. package/tests/agents/update/fs-tools/read-file.test.mjs +0 -549
@@ -0,0 +1,37 @@
1
+ entries:
2
+ - timestamp: 2025-10-11T13:21:51.992Z
3
+ operation: translation_update
4
+ feedback: Do not translate the Target column in the Cleanup Targets table.
5
+ documentPath: /guides/cleaning-up
6
+ - timestamp: 2025-10-11T13:20:30.314Z
7
+ operation: document_update
8
+ feedback: The targets in Cleanup Targets are incomplete and need to be supplemented. The corresponding descriptions also require updating. Additionally, the target values should use the original enumeration values, such as 'generatedDocs'.
9
+ documentPath: /guides/cleaning-up
10
+ - timestamp: 2025-10-11T13:03:20.327Z
11
+ operation: document_update
12
+ feedback: The two aliases for the 'history' command in Viewing Update History can be combined into a single code block. The Short Hash in Understanding the History Output now consists of 8 characters. Additionally, operation types are separated by underscores, such as 'document_update'.
13
+ documentPath: /guides/managing-history
14
+ - timestamp: 2025-10-11T12:56:23.107Z
15
+ operation: document_update
16
+ feedback: In interactive mode, translated files are saved with a suffix appended to their original filenames within the same directory, rather than in dedicated language directories.
17
+ documentPath: /guides/translating-documentation
18
+ - timestamp: 2025-10-11T12:50:25.563Z
19
+ operation: document_update
20
+ feedback: The value of the 'docs' parameter in the demo should be a path separated by '-' rather than '/', and '.md' should be preserved.
21
+ documentPath: /guides/updating-documentation
22
+ - timestamp: 2025-10-11T12:46:37.507Z
23
+ operation: document_update
24
+ feedback: The value of the 'docs' parameter in the demo should be a path separated by '-' rather than '/'.
25
+ documentPath: /guides/updating-documentation
26
+ - timestamp: 2025-10-11T12:39:53.222Z
27
+ operation: document_update
28
+ feedback: The prompts in Review the Documentation Structure are outdated and need updating. Command Parameters also require updating.
29
+ documentPath: /guides/generating-documentation
30
+ - timestamp: 2025-10-11T12:26:24.598Z
31
+ operation: translation_update
32
+ feedback: AIGNE Framework is a proper noun and has its own link; no translation is required.
33
+ documentPath: /overview
34
+ - timestamp: 2025-10-11T12:24:05.477Z
35
+ operation: document_update
36
+ feedback: Add a link to the AIGNE Framework 'https://www.aigne.io/framework'.
37
+ documentPath: /overview
@@ -1,4 +1,16 @@
1
1
  rules:
2
+ - id: pref_cbc8005011c08ca0
3
+ active: true
4
+ scope: translation
5
+ rule: In the table titled 'Cleanup Targets', the 'Target' column must retain the original text and should not be translated.
6
+ feedback: Do not translate the Target column in the Cleanup Targets table.
7
+ createdAt: 2025-10-11T13:22:06.529Z
8
+ - id: pref_545cabc521ecd4a5
9
+ active: true
10
+ scope: translation
11
+ rule: The proprietary term 'AIGNE Framework' must not be translated and must be retained in its original form.
12
+ feedback: AIGNE Framework is a proper noun and has its own link; no translation is required.
13
+ createdAt: 2025-10-11T12:26:37.517Z
2
14
  - id: pref_6e612d7ca8b7f3b6
3
15
  active: true
4
16
  scope: document
@@ -1861,3 +1861,33 @@ e87fcba2227e472141f99b92eb0247965db132079459ce8c83454dde7fc9a6ae:
1861
1861
  https://docsmith.aigne.io:
1862
1862
  url: https://docsmith.aigne.io/image-bin/uploads/3b189fa893cc2120.svg
1863
1863
  upload_time: 2025-10-10T07:40:22.634Z
1864
+ 7b946c226f73c4c222b37ea23b94b3152932e1712f9d99b78f64c0b93e12bdd9:
1865
+ local_path: .aigne/doc-smith/.tmp/assets/d2/97b496a8d3d5b12b9c8d4d0729110db999a2be33359a1cb70b3f858997ba91a3.svg
1866
+ sites:
1867
+ https://docsmith.aigne.io:
1868
+ url: https://docsmith.aigne.io/image-bin/uploads/7b946c226f73c4c2.svg
1869
+ upload_time: 2025-10-11T16:43:05.278Z
1870
+ c2a826d21a6eeb8664b88a864e1d5ae3ff68bd9e7dad3c46742f855898441747:
1871
+ local_path: .aigne/doc-smith/.tmp/assets/d2/44d2c5dc7e7fcf4ada941e8c4e444b19d5870dd02d44046dea585bbd77b03e0d.svg
1872
+ sites:
1873
+ https://docsmith.aigne.io:
1874
+ url: https://docsmith.aigne.io/image-bin/uploads/c2a826d21a6eeb86.svg
1875
+ upload_time: 2025-10-11T16:43:06.895Z
1876
+ 605705e827c243bb5402f14ed3b7750f2e6564214a81880df12b857c41935917:
1877
+ local_path: .aigne/doc-smith/.tmp/assets/d2/8ff7639517a76840aaf851b1345b8dae330d4df6f5788b70d2c41febf86e63ab.svg
1878
+ sites:
1879
+ https://docsmith.aigne.io:
1880
+ url: https://docsmith.aigne.io/image-bin/uploads/605705e827c243bb.svg
1881
+ upload_time: 2025-10-11T16:43:06.968Z
1882
+ 71ec3af141d2bcda728a2f7e7a47ca2e2e76a86f54d648832d11f4193d9975f4:
1883
+ local_path: .aigne/doc-smith/.tmp/assets/d2/db5b4787a2dc7655434d00ecf3eb9a25fbf73f93cda2b3f10d4022fd9c2bd16b.svg
1884
+ sites:
1885
+ https://docsmith.aigne.io:
1886
+ url: https://docsmith.aigne.io/image-bin/uploads/71ec3af141d2bcda.svg
1887
+ upload_time: 2025-10-11T16:43:08.753Z
1888
+ c61907da62788c6ad5b8d89b0fde7f235046b9a6aed309c43be9b0d5b3abb670:
1889
+ local_path: .aigne/doc-smith/.tmp/assets/d2/8f38985e99e81e8edf973a328862e8ec33cc6de1e1382ebbe55c56f64edbd2ad.svg
1890
+ sites:
1891
+ https://docsmith.aigne.io:
1892
+ url: https://docsmith.aigne.io/image-bin/uploads/c61907da62788c6a.svg
1893
+ upload_time: 2025-10-11T16:43:10.182Z
@@ -1,3 +1,3 @@
1
1
  {
2
- ".": "0.8.12-beta.6"
2
+ ".": "0.8.12-beta.7"
3
3
  }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.8.12-beta.7](https://github.com/AIGNE-io/aigne-doc-smith/compare/v0.8.12-beta.6...v0.8.12-beta.7) (2025-10-12)
4
+
5
+
6
+ ### Features
7
+
8
+ * support retrieve context from repo by AFS ([#175](https://github.com/AIGNE-io/aigne-doc-smith/issues/175)) ([352ce75](https://github.com/AIGNE-io/aigne-doc-smith/commit/352ce751ae9b51a71581793ead7952fb49cda7c4))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * disable git based update history within git repo ([#180](https://github.com/AIGNE-io/aigne-doc-smith/issues/180)) ([826b4bd](https://github.com/AIGNE-io/aigne-doc-smith/commit/826b4bdeb5042b2dcd14ce1da975965ad7805347))
14
+
3
15
  ## [0.8.12-beta.6](https://github.com/AIGNE-io/aigne-doc-smith/compare/v0.8.12-beta.5...v0.8.12-beta.6) (2025-10-11)
4
16
 
5
17
 
@@ -32,11 +32,17 @@ input_schema:
32
32
  - documentStructure
33
33
  - feedback
34
34
  output_key: message
35
+ afs:
36
+ modules:
37
+ - module: system-fs
38
+ options:
39
+ mount: /sources
40
+ path: .
41
+ description: |
42
+ Codebase of the project to be documented used as context for document generation,
43
+ should search and read as needed while generating document content
35
44
  skills:
36
45
  - ./document-structure-tools/add-document.mjs
37
46
  - ./document-structure-tools/delete-document.mjs
38
47
  - ./document-structure-tools/update-document.mjs
39
48
  - ./document-structure-tools/move-document.mjs
40
- - ../update/fs-tools/glob.mjs
41
- - ../update/fs-tools/grep.mjs
42
- - ../update/fs-tools/read-file.mjs
@@ -1,4 +1,5 @@
1
1
  import chalk from "chalk";
2
+ import { createHash } from "node:crypto";
2
3
  import { getHistory } from "../../utils/history-utils.mjs";
3
4
 
4
5
  export default function viewHistory() {
@@ -35,8 +36,10 @@ export default function viewHistory() {
35
36
  * Generate a short hash from timestamp (git-style)
36
37
  */
37
38
  function generateShortHash(timestamp) {
38
- const hash = timestamp.replace(/[-:.TZ]/g, "");
39
- return hash.substring(hash.length - 7); // Last 7 chars
39
+ // Create a deterministic hash from timestamp only
40
+ // This ensures the same timestamp always produces the same hash
41
+ const hash = createHash("sha1").update(timestamp).digest("hex");
42
+ return hash.substring(0, 8); // First 8 chars of SHA1 hash
40
43
  }
41
44
 
42
45
  /**
@@ -45,10 +45,16 @@ input_schema:
45
45
  - datasources
46
46
  - originalDocumentStructure
47
47
  output_key: content
48
- skills:
49
- - fs-tools/glob.mjs
50
- - fs-tools/grep.mjs
51
- - fs-tools/read-file.mjs
48
+ afs:
49
+ modules:
50
+ - module: system-fs
51
+ options:
52
+ mount: /sources
53
+ path: .
54
+ description: |
55
+ Codebase of the project to be documented used as context for document generation,
56
+ should search and read as needed while generating document content
57
+ # skills:
52
58
  # FIXME: @zhanghan temporary disable diagram tool
53
59
  # - type: team
54
60
  # task_render_mode: collapse
@@ -44,9 +44,15 @@ input_schema:
44
44
  - originalContent
45
45
  - feedback
46
46
  output_key: message
47
+ afs:
48
+ modules:
49
+ - module: system-fs
50
+ options:
51
+ mount: /sources
52
+ path: .
53
+ description: |
54
+ Codebase of the project to be documented used as context for document generation,
55
+ should search and read as needed while generating document content
47
56
  skills:
48
57
  - ./document-tools/update-document-content.mjs
49
- - ./fs-tools/glob.mjs
50
- - ./fs-tools/grep.mjs
51
- - ./fs-tools/read-file.mjs
52
58
  task_render_mode: collapse
@@ -242,7 +242,8 @@ export default async function userReviewDocument(
242
242
  console.error(`Stack: ${error.stack}`);
243
243
  }
244
244
  console.log("\nPlease try rephrasing your feedback or continue with the current content.");
245
- break;
245
+
246
+ process.exit(0);
246
247
  }
247
248
  }
248
249
 
@@ -1,49 +1,50 @@
1
1
  # クリーンアップ
2
2
 
3
- `aigne doc clear` コマンドは、生成されたファイル、キャッシュされたデータ、および設定を削除するための簡単な方法を提供します。これは、ドキュメントプロジェクトをリセットしたり、クリーンな状態から始めたり、古いまたは破損したファイルに関連する問題をトラブルシューティングしたりする場合に役立ちます。
3
+ `aigne doc clear` コマンドは、生成されたファイル、キャッシュデータ、設定を削除するための簡単な方法を提供します。これは、ドキュメントプロジェクトをリセットしたり、クリーンな状態から開始したり、古くなったファイルや破損したファイルに関連する問題をトラブルシューティングしたりする場合に役立ちます。
4
4
 
5
5
  ## 対話的なクリーンアップ
6
6
 
7
- このコマンドを使用する最も簡単な方法は、引数なしで実行することです。
7
+ このコマンドを使用する最も簡単な方法は、引数なしで実行することです:
8
8
 
9
9
  ```bash
10
10
  aigne doc clear
11
11
  ```
12
12
 
13
- このコマンドを実行すると対話型プロンプトが起動し、削除したい項目を正確に選択できます。各オプションについて明確な説明が提供され、偶発的なデータ損失を防ぐため、ほとんどのユースケースでこのアプローチが推奨されます。
13
+ このコマンドを実行すると対話型のプロンプトが起動し、削除したい項目を正確に選択できます。各オプションについて明確な説明が提供され、偶発的なデータ損失を防ぐことができるため、ほとんどのユースケースでこのアプローチが推奨されます。
14
14
 
15
15
  ## クリーンアップ対象
16
16
 
17
- `clear` コマンドは、いくつかの異なる種類のデータを削除できます。次の表は、利用可能な各対象、その機能、および影響を受ける特定のファイルまたはディレクトリについて詳しく説明しています。
17
+ `clear` コマンドは、いくつかの異なる種類のデータを削除できます。次の表は、利用可能な各ターゲット、その機能、および影響を受ける特定のファイルやディレクトリについて詳しく説明しています。
18
18
 
19
- | 対象 | 説明 | 影響を受けるファイルとディレクトリ |
19
+ | Target | 説明 | 影響を受けるファイルとディレクトリ |
20
20
  | :--- | :--- | :--- |
21
- | **生成されたドキュメント** | ドキュメント出力ディレクトリに生成されたすべての Markdown ファイルを削除します。 | 設定で `docsDir` によって指定されたディレクトリ。 |
22
- | **ドキュメント構造** | 構造計画ファイルとすべての生成されたドキュメントを削除します。これにより、ドキュメントの内容が効果的にリセットされます。 | `.aigne/doc-smith/output/structure-plan.json` ファイルと `docsDir` ディレクトリ。 |
23
- | **ドキュメント設定** | プロジェクトの設定ファイルを削除します。これを実行した後、プロジェクトを再初期化する必要があります。 | `.aigne/doc-smith/config.yaml` ファイル。 |
24
- | **認証情報** | ドキュメントを公開するために使用される保存済みの認証トークンを削除します。クリアする特定のサイトを選択するように求められます。 | ホームディレクトリにある `~/.aigne/doc-smith-connected.yaml` ファイル。 |
21
+ | `generatedDocs` | 出力ディレクトリ内の生成されたすべてのドキュメントを削除しますが、ドキュメント構造計画は保持します。 | 設定で指定された `docsDir` ディレクトリ。 |
22
+ | `documentStructure` | 生成されたすべてのドキュメントとドキュメント構造計画を削除し、ドキュメントコンテンツを効果的にリセットします。 | `.aigne/doc-smith/output/structure-plan.json` ファイルと `docsDir` ディレクトリ。 |
23
+ | `documentConfig` | プロジェクトの設定ファイルを削除します。この操作の後、再度 `aigne doc init` を実行する必要があります。 | `.aigne/doc-smith/config.yaml` ファイル。 |
24
+ | `authTokens` | 公開サイト用に保存された認証トークンを削除します。どのサイトをクリアするか選択するよう求められます。 | ホームディレクトリにある `~/.aigne/doc-smith-connected.yaml` ファイル。 |
25
+ | `deploymentConfig` | 設定ファイルから `appUrl` を削除します。 | `.aigne/doc-smith/config.yaml` ファイル。 |
25
26
 
26
27
  ## 非対話的なクリーンアップ
27
28
 
28
- 自動化スクリプトやコマンドラインを好むユーザー向けに、`--targets` フラグを使用してクリアする対象を1つ以上直接指定できます。これにより、対話型プロンプトがバイパスされます。
29
+ 自動化スクリプトやコマンドラインを好むユーザーのために、`--targets` フラグを使用してクリアする1つ以上のターゲットを直接指定できます。これにより、対話型のプロンプトがバイパスされます。
29
30
 
30
- ### 単一の対象をクリア
31
+ ### 単一ターゲットのクリア
31
32
 
32
- 生成されたドキュメントのみをクリアするには、次のコマンドを使用します。
33
+ 生成されたドキュメントのみをクリアするには、次のコマンドを使用します:
33
34
 
34
35
  ```bash
35
36
  aigne doc clear --targets generatedDocs
36
37
  ```
37
38
 
38
- ### 複数の対象をクリア
39
+ ### 複数ターゲットのクリア
39
40
 
40
- 複数の対象名を指定して、一度にいくつかの項目をクリアできます。例えば、ドキュメント設定とドキュメント構造の両方を削除するには、次のように実行します。
41
+ 複数のターゲット名を指定して、一度に複数の項目をクリアできます。例えば、ドキュメント設定とドキュメント構造の両方を削除するには、次のように実行します:
41
42
 
42
43
  ```bash
43
44
  aigne doc clear --targets documentConfig documentStructure
44
45
  ```
45
46
 
46
- 設定をクリアした後、セットアッププロセスを再度実行して、新たに始めることができます。
47
+ 設定をクリアした後、再度セットアッププロセスを実行して新たに開始できます。
47
48
 
48
49
  ---
49
50
 
@@ -18,10 +18,11 @@ The `clear` command can remove several distinct types of data. The following tab
18
18
 
19
19
  | Target | Description | Files and Directories Affected |
20
20
  | :--- | :--- | :--- |
21
- | **Generated Documents** | Deletes all Markdown files that were generated in your documentation output directory. | The directory specified by `docsDir` in your configuration. |
22
- | **Documentation Structure** | Deletes the structure plan file and all generated documents. This effectively resets your documentation content. | The `.aigne/doc-smith/output/structure-plan.json` file and the `docsDir` directory. |
23
- | **Document Configuration** | Deletes the project's configuration file. After running this, you will need to re-initialize the project. | The `.aigne/doc-smith/config.yaml` file. |
24
- | **Authorizations** | Removes saved authorization tokens used for publishing your documentation. You will be prompted to select specific sites to clear. | The `~/.aigne/doc-smith-connected.yaml` file in your home directory. |
21
+ | `generatedDocs` | Deletes all generated documents in your output directory, but keeps the documentation structure plan. | The directory specified by `docsDir` in your configuration. |
22
+ | `documentStructure` | Deletes all generated documents and the documentation structure plan, effectively resetting your documentation content. | The `.aigne/doc-smith/output/structure-plan.json` file and the `docsDir` directory. |
23
+ | `documentConfig` | Deletes the project's configuration file. You will need to run `aigne doc init` again after this. | The `.aigne/doc-smith/config.yaml` file. |
24
+ | `authTokens` | Removes saved authorization tokens for publishing sites. You will be prompted to select which sites to clear. | The `~/.aigne/doc-smith-connected.yaml` file in your home directory. |
25
+ | `deploymentConfig` | Deletes the `appUrl` from your configuration file. | The `.aigne/doc-smith/config.yaml` file. |
25
26
 
26
27
  ## Non-Interactive Cleaning
27
28
 
@@ -1,49 +1,50 @@
1
1
  # 清理
2
2
 
3
- `aigne doc clear` 指令提供了一種直接的方法,用於移除生成的檔案、快取資料和配置設定。當您想重設文件專案、從乾淨的狀態開始,或解決與過時或損壞檔案相關的問題時,此功能非常有用。
3
+ `aigne doc clear` 指令提供了一個直接的方法來移除生成的檔案、快取資料和配置設定。當您想要重設您的文件專案、從乾淨的狀態開始,或解決與過時或損壞檔案相關的問題時,這個指令非常有用。
4
4
 
5
5
  ## 互動式清理
6
6
 
7
- 使用此指令最簡單的方法就是不帶任何參數直接執行:
7
+ 使用此指令最簡單的方法是不帶任何參數直接執行:
8
8
 
9
9
  ```bash
10
10
  aigne doc clear
11
11
  ```
12
12
 
13
- 執行此指令將會啟動一個互動式提示,讓您能精確選擇要移除的項目。對於大多數使用情境而言,這是建議的方法,因為它為每個選項提供了清晰的說明,並能防止意外的資料遺失。
13
+ 執行此指令將啟動一個互動式提示,讓您精確選擇要移除的項目。這是大多數使用情境下的建議方法,因為它為每個選項提供了清晰的說明,並能防止意外的資料遺失。
14
14
 
15
15
  ## 清理目標
16
16
 
17
- `clear` 指令可以移除幾種不同類型的資料。下表詳細說明了每個可用的目標、其功能,以及它所影響的特定檔案或目錄。
17
+ `clear` 指令可以移除幾種不同類型的資料。下表詳細說明了每個可用的目標、其功能以及它所影響的特定檔案或目錄。
18
18
 
19
- | 目標 | 說明 | 受影響的檔案和目錄 |
19
+ | Target | 說明 | 受影響的檔案與目錄 |
20
20
  | :--- | :--- | :--- |
21
- | **生成的檔案** | 刪除在您的文件輸出目錄中生成的所有 Markdown 檔案。 | 您的配置中由 `docsDir` 指定的目錄。 |
22
- | **文件結構** | 刪除結構計畫檔案和所有生成的檔案。這能有效地重設您的文件內容。 | `.aigne/doc-smith/output/structure-plan.json` 檔案和 `docsDir` 目錄。 |
23
- | **文件配置** | 刪除專案的設定檔。執行此操作後,您將需要重新初始化專案。 | `.aigne/doc-smith/config.yaml` 檔案。 |
24
- | **授權** | 移除用於發布文件的已儲存授權權杖。系統將提示您選擇要清除授權的特定網站。 | 您家目錄中的 `~/.aigne/doc-smith-connected.yaml` 檔案。 |
21
+ | `generatedDocs` | 刪除您輸出目錄中所有已生成的檔案,但保留文件結構計畫。 | 您設定中 `docsDir` 所指定的目錄。 |
22
+ | `documentStructure` | 刪除所有已生成的檔案和文件結構計畫,有效地重設您的文件內容。 | `.aigne/doc-smith/output/structure-plan.json` 檔案和 `docsDir` 目錄。 |
23
+ | `documentConfig` | 刪除專案的設定檔。此操作後,您將需要重新執行 `aigne doc init`。 | `.aigne/doc-smith/config.yaml` 檔案。 |
24
+ | `authTokens` | 移除已儲存的發布網站授權權杖。系統將提示您選擇要清除哪些網站。 | 您家目錄中的 `~/.aigne/doc-smith-connected.yaml` 檔案。 |
25
+ | `deploymentConfig` | 從您的設定檔中刪除 `appUrl`。 | `.aigne/doc-smith/config.yaml` 檔案。 |
25
26
 
26
27
  ## 非互動式清理
27
28
 
28
- 對於自動化腳本或偏好使用命令列的使用者,您可以使用 `--targets` 旗標直接指定一個或多個要清理的目標。這將會繞過互動式提示。
29
+ 對於自動化腳本或偏好使用命令列的使用者,您可以使用 `--targets` 旗標直接指定一個或多個要清除的目標。這將繞過互動式提示。
29
30
 
30
- ### 清理單一目標
31
+ ### 清除單一目標
31
32
 
32
- 若要僅清理生成的檔案,請使用以下指令:
33
+ 若要僅清除已生成的檔案,請使用以下指令:
33
34
 
34
35
  ```bash
35
36
  aigne doc clear --targets generatedDocs
36
37
  ```
37
38
 
38
- ### 清理多個目標
39
+ ### 清除多個目標
39
40
 
40
- 您可以提供多個目標名稱來一次性清理多個項目。例如,若要同時移除文件配置和文件結構,請執行:
41
+ 您可以提供多個目標名稱來一次清除多個項目。例如,若要同時移除文件設定和文件結構,請執行:
41
42
 
42
43
  ```bash
43
44
  aigne doc clear --targets documentConfig documentStructure
44
45
  ```
45
46
 
46
- 清理完配置後,您可以再次執行設定流程以重新開始。
47
+ 清除您的設定後,您可以再次執行設定流程以重新開始。
47
48
 
48
49
  ---
49
50
 
@@ -1,6 +1,6 @@
1
1
  # 清理
2
2
 
3
- `aigne doc clear` 命令提供了一种直接的方法,用于移除生成的文件、缓存数据和配置设置。当您想要重置文档项目、从一个干净的状态开始,或者排查与过时或损坏文件相关的问题时,这个命令非常有用。
3
+ `aigne doc clear` 命令提供了一种简单直接的方法来移除生成的文件、缓存数据和配置设置。当您想要重置文档项目、从干净的状态开始或排查与过时或损坏文件相关的问题时,这个命令非常有用。
4
4
 
5
5
  ## 交互式清理
6
6
 
@@ -10,22 +10,23 @@
10
10
  aigne doc clear
11
11
  ```
12
12
 
13
- 执行此命令将启动一个交互式提示,让您精确选择要移除的项目。这是大多数用例的推荐方法,因为它为每个选项提供了清晰的描述,并能防止意外的数据丢失。
13
+ 执行此命令将启动一个交互式提示,让您能够精确选择要移除的项目。这是大多数用例的推荐方法,因为它为每个选项提供了清晰的描述,并能防止意外的数据丢失。
14
14
 
15
15
  ## 清理目标
16
16
 
17
- `clear` 命令可以移除几种不同类型的数据。下表详细介绍了每个可用目标、其功能以及它影响的具体文件或目录。
17
+ `clear` 命令可以移除几种不同类型的数据。下表详细说明了每个可用的目标、其功能以及所影响的具体文件或目录。
18
18
 
19
- | 目标 | 描述 | 受影响的文件和目录 |
19
+ | Target | Description | Files and Directories Affected |
20
20
  | :--- | :--- | :--- |
21
- | **生成的文档** | 删除在您的文档输出目录中生成的所有 Markdown 文件。 | 您的配置中由 `docsDir` 指定的目录。 |
22
- | **文档结构** | 删除结构计划文件和所有生成的文档。这将有效地重置您的文档内容。 | `.aigne/doc-smith/output/structure-plan.json` 文件和 `docsDir` 目录。 |
23
- | **文档配置** | 删除项目的配置文件。运行此操作后,您需要重新初始化项目。 | `.aigne/doc-smith/config.yaml` 文件。 |
24
- | **授权** | 移除用于发布文档的已保存授权令牌。系统将提示您选择要清除授权的特定站点。 | 您主目录下的 `~/.aigne/doc-smith-connected.yaml` 文件。 |
21
+ | `generatedDocs` | 删除输出目录中所有生成的文档,但保留文档结构计划。 | 您配置中由 `docsDir` 指定的目录。 |
22
+ | `documentStructure` | 删除所有生成的文档和文档结构计划,从而有效重置您的文档内容。 | `.aigne/doc-smith/output/structure-plan.json` 文件和 `docsDir` 目录。 |
23
+ | `documentConfig` | 删除项目的配置文件。执行此操作后,您需要重新运行 `aigne doc init`。 | `.aigne/doc-smith/config.yaml` 文件。 |
24
+ | `authTokens` | 移除已保存的用于发布站点的授权令牌。系统将提示您选择要清除哪些站点。 | 您主目录下的 `~/.aigne/doc-smith-connected.yaml` 文件。 |
25
+ | `deploymentConfig` | 从您的配置文件中删除 `appUrl`。 | `.aigne/doc-smith/config.yaml` 文件。 |
25
26
 
26
27
  ## 非交互式清理
27
28
 
28
- 对于自动化脚本或偏好命令行的用户,您可以使用 `--targets` 标志直接指定一个或多个要清理的目标。这将绕过交互式提示。
29
+ 对于自动化脚本或偏好使用命令行的用户,您可以使用 `--targets` 标志直接指定一个或多个要清理的目标。这将绕过交互式提示。
29
30
 
30
31
  ### 清理单个目标
31
32
 
@@ -43,8 +44,8 @@ aigne doc clear --targets generatedDocs
43
44
  aigne doc clear --targets documentConfig documentStructure
44
45
  ```
45
46
 
46
- 清理配置后,您可以再次运行设置过程以重新开始。
47
+ 清理配置后,您可以通过再次运行设置过程来重新开始。
47
48
 
48
49
  ---
49
50
 
50
- 有关初始设置的更多信息,请参阅[初始设置](./configuration-initial-setup.md)指南。
51
+ 有关初始设置的更多信息,请参阅 [初始设置](./configuration-initial-setup.md) 指南。
@@ -1,12 +1,12 @@
1
1
  # ドキュメントの生成
2
2
 
3
- このガイドでは、プロジェクトのソースファイルからドキュメント一式を作成するための体系的な手順を説明します。このプロセスは `aigne doc generate` コマンドを使用して開始されます。このコマンドはコードベースを分析し、論理的な構造を提案し、各ドキュメントのコンテンツを作成します。
3
+ このガイドでは、プロジェクトのソースファイルから完全なドキュメント一式を作成するための体系的な手順を説明します。このプロセスは `aigne doc generate` コマンドを使用して開始します。このコマンドはコードベースを分析し、論理的な構造を提案し、各ドキュメントのコンテンツを書き込みます。
4
4
 
5
- このコマンドは、ドキュメントを最初に作成するための主要なツールです。作成後のドキュメントの修正については、[ドキュメントの更新](./guides-updating-documentation.md)ガイドを参照してください。
5
+ このコマンドは、ドキュメントを最初に作成するための主要なツールです。作成済みのドキュメントを修正する場合は、[ドキュメントの更新](./guides-updating-documentation.md)ガイドを参照してください。
6
6
 
7
- ### 生成のワークフロー
7
+ ### 生成ワークフロー
8
8
 
9
- `generate` コマンドは、ドキュメントを構築するための一連の自動化されたステップを実行します。このプロセスは対話形式で設計されており、コンテンツが書き込まれる前に提案された構造を確認し、承認することができます。
9
+ `generate` コマンドは、ドキュメントを構築するための一連の自動化されたステップを実行します。このプロセスは対話形式で設計されており、コンテンツが書き込まれる前に、提案された構造を確認・承認できます。
10
10
 
11
11
  ```d2
12
12
  direction: down
@@ -22,12 +22,12 @@ run_command: {
22
22
  }
23
23
 
24
24
  check_config: {
25
- label: "設定ファイルが存在するか?"
25
+ label: "設定ファイルは存在するか?"
26
26
  shape: diamond
27
27
  }
28
28
 
29
29
  interactive_setup: {
30
- label: "対話型セットアップのガイド"
30
+ label: "対話型セットアップをガイド"
31
31
  shape: rectangle
32
32
  tooltip: ".aigne/doc-smith/config.yaml が見つからない場合、対話型セットアップがトリガーされます。"
33
33
  }
@@ -43,14 +43,14 @@ review_structure: {
43
43
  }
44
44
 
45
45
  user_approve: {
46
- label: "構造を承認しますか?"
46
+ label: "構造を承認するか?"
47
47
  shape: diamond
48
48
  }
49
49
 
50
50
  provide_feedback: {
51
- label: "構造を改善するためのフィードバックを提供"
51
+ label: "構造を洗練させるためのフィードバックを提供"
52
52
  shape: rectangle
53
- tooltip: "ユーザーは、セクションの名前の変更、追加、削除などの変更を要求できます。"
53
+ tooltip: "ユーザーはセクションの名前変更、追加、削除などの変更を要求できます。"
54
54
  }
55
55
 
56
56
  generate_content: {
@@ -88,61 +88,63 @@ generate_content -> end
88
88
 
89
89
  ドキュメントを生成するには、ターミナルでプロジェクトのルートディレクトリに移動し、以下の手順に従ってください。
90
90
 
91
- ### 1. Generate コマンドの実行
91
+ ### 1. 生成コマンドの実行
92
92
 
93
- `generate` コマンドを実行してプロセスを開始します。ツールはプロジェクトのファイルと構造の分析から開始します。
93
+ `generate` コマンドを実行してプロセスを開始します。ツールはプロジェクトのファイルと構造の分析から始めます。
94
94
 
95
95
  ```bash 基本的な生成コマンド
96
96
  aigne doc generate
97
97
  ```
98
98
 
99
- 簡潔にするために、エイリアス `gen` または `g` を使用することもできます。
99
+ 簡潔にするために、エイリアスの `gen` `g` を使用することもできます。
100
100
 
101
101
  ### 2. ドキュメント構造の確認
102
102
 
103
- 分析が完了すると、ツールは提案されたドキュメント構造を提示します。この構造は、作成されるドキュメントの階層的な計画です。
104
-
105
- この計画を確認するよう求められます。
103
+ 分析が完了すると、ツールは提案されたドキュメント構造を表示し、確認を求めます。
106
104
 
107
105
  ```
108
- ドキュメントの構造を最適化しますか?
109
- タイトルを編集したり、セクションを再編成したりできます。
110
- ❯ 問題ありません - 現在の構造で続行します
111
- はい、構造を最適化します
106
+ ドキュメント構造を最適化しますか?
107
+ ❯ いいえ、問題ありません
108
+ はい、構造を最適化します(例:「はじめに」を「クイックスタート」に名称変更、「APIリファレンス」を「設定」の前に移動するなど)
112
109
  ```
113
110
 
114
- - **問題ありません - 現在の構造で続行します**: このオプションを選択すると、提案された構造を承認し、直接コンテンツ生成に進みます。
115
- - **はい、構造を最適化します**: このオプションは、計画を修正したい場合に選択します。プレーンテキストで、「'API' を 'API リファレンス' に変更」や「'デプロイ' のための新しいセクションを追加」などのフィードバックを提供できます。AI はあなたのフィードバックに基づいて構造を修正し、再度確認することができます。このサイクルは、構造があなたの要件を満たすまで繰り返すことができます。
111
+ - **いいえ、問題ありません**: このオプションを選択すると、提案された構造を承認し、直接コンテンツ生成に進みます。
112
+ - **はい、構造を最適化します**: このオプションを選択すると、プランを修正できます。ツールは対話ループでフィードバックを求めます。次のようなプレーンテキストで指示を与えることができます。
113
+ - `「トラブルシューティング」という新しいドキュメントを追加`
114
+ - `「レガシー機能」ドキュメントを削除`
115
+ - `「インストール」を構造の最上部に移動`
116
+
117
+ フィードバックのたびに、AIが構造を修正し、再度確認できます。フィードバックを入力せずにEnterキーを押すと、ループを終了して最終的な構造を承認します。
116
118
 
117
119
  ### 3. コンテンツの生成
118
120
 
119
- ドキュメント構造が承認されると、DocSmith は計画内の各ドキュメントの詳細なコンテンツの生成を開始します。このプロセスは自動的に実行され、その所要時間はプロジェクトの規模と複雑さによって異なります。
121
+ ドキュメント構造が承認されると、DocSmithはプラン内の各ドキュメントの詳細なコンテンツの生成を開始します。このプロセスは自動的に実行され、所要時間はプロジェクトの規模と複雑さによって異なります。
120
122
 
121
123
  完了すると、生成されたファイルは設定で指定された出力ディレクトリ(例:`./docs`)に保存されます。
122
124
 
123
- ## コマンドのパラメータ
125
+ ## コマンドパラメータ
124
126
 
125
127
  `generate` コマンドは、その動作を制御するためのいくつかのオプションパラメータを受け入れます。
126
128
 
127
- | パラメータ | 説明 | 例 |
128
- | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
129
- | `--forceRegenerate` | 既存の構造やコンテンツをすべて無視して、すべてのドキュメントをゼロから再構築します。これは、白紙の状態からやり直す場合に便利です。 | `aigne doc generate --forceRegenerate` |
130
- | `--feedback` | 構造生成フェーズで AI をガイドするための初期指示を提供します。 | `aigne doc generate --feedback "API の例を増やし、トラブルシューティングのセクションを追加してください"` |
131
- | `--glossary` | ドキュメント全体で一貫した用語の使用を保証するために、用語集ファイル(`.md`)を指定します。 | `aigne doc generate --glossary @/path/to/glossary.md` |
129
+ | パラメータ | 説明 | 例 |
130
+ |---|---|---|
131
+ | `--forceRegenerate` | 既存の構造やコンテンツをすべて無視して、すべてのドキュメントを最初から再構築します。完全にリセットしたい場合に便利です。 | `aigne doc generate --forceRegenerate` |
132
+ | `--feedback` | 対話型の確認が始まる前に、構造生成フェーズでAIをガイドするための初期のテキストベースの指示を提供します。 | `aigne doc generate --feedback "Add more API examples"` |
133
+ | `--glossary` | 用語集ファイル(例:`glossary.md`)を指定して、ドキュメント全体で一貫した用語の使用を保証します。 | `aigne doc generate --glossary @/path/to/glossary.md` |
132
134
 
133
- ### 例:完全な再構築を強制する
135
+ ### 例:完全な再構築の強制
134
136
 
135
137
  以前に生成されたすべてのドキュメントを破棄し、コードの現在の状態に基づいて新しいセットを作成したい場合は、`--forceRegenerate` フラグを使用します。
136
138
 
137
- ```bash 再生成の強制
139
+ ```bash 再構築の強制
138
140
  aigne doc generate --forceRegenerate
139
141
  ```
140
142
 
141
143
  ## まとめ
142
144
 
143
- `generate` コマンドは、初期プロジェクトドキュメントを作成するプロセス全体を統括します。自動化されたコード分析と対話的なレビュープロセスを組み合わせることで、構造化された関連性の高いドキュメント一式を生成します。
145
+ `generate` コマンドは、初期プロジェクトドキュメントを作成するプロセス全体を統括します。自動化されたコード分析と対話型の確認プロセスを組み合わせることで、構造化された関連性の高いドキュメント一式を生成します。
144
146
 
145
- ドキュメントが生成された後、次のことを行うことができます。
147
+ ドキュメントが生成されたら、次のような操作ができます。
146
148
 
147
149
  - [ドキュメントの更新](./guides-updating-documentation.md): 特定のドキュメントに変更を加える。
148
150
  - [ドキュメントの翻訳](./guides-translating-documentation.md): コンテンツを他の言語に翻訳する。
@@ -100,19 +100,21 @@ You can also use the aliases `gen` or `g` for brevity.
100
100
 
101
101
  ### 2. Review the Documentation Structure
102
102
 
103
- After the analysis is complete, the tool will present a proposed documentation structure. This structure is a hierarchical plan of the documents that will be created.
104
-
105
- You will be prompted to review this plan:
103
+ After the analysis is complete, the tool will display the proposed documentation structure and prompt you for review:
106
104
 
107
105
  ```
108
106
  Would you like to optimize the documentation structure?
109
- You can edit titles, reorganize sections.
110
- Looks good - proceed with current structure
111
- Yes, optimize the structure
107
+ No, looks good
108
+ Yes, optimize the structure (e.g. rename 'Getting Started' to 'Quick Start', move 'API Reference' before 'Configuration')
112
109
  ```
113
110
 
114
- - **Looks good - proceed with current structure**: Select this option to approve the proposed structure and proceed directly to content generation.
115
- - **Yes, optimize the structure**: Select this option if you wish to modify the plan. You will be able to provide feedback in plain text, such as "Rename 'API' to 'API Reference'" or "Add a new section for 'Deployment'." The AI will revise the structure based on your feedback, and you can review it again. This cycle can be repeated until the structure meets your requirements.
111
+ - **No, looks good**: Select this option to approve the proposed structure and proceed directly to content generation.
112
+ - **Yes, optimize the structure**: Select this option to modify the plan. The tool will then ask for your feedback in an interactive loop. You can provide instructions in plain text, such as:
113
+ - `Add a new document 'Troubleshooting'`
114
+ - `Remove the 'Legacy Features' document`
115
+ - `Move 'Installation' to the top of the structure`
116
+
117
+ After each piece of feedback, the AI will revise the structure, and you can review it again. Press Enter without typing any feedback to exit the loop and approve the final structure.
116
118
 
117
119
  ### 3. Content Generation
118
120
 
@@ -124,11 +126,11 @@ Upon completion, the generated files will be saved to the output directory speci
124
126
 
125
127
  The `generate` command accepts several optional parameters to control its behavior.
126
128
 
127
- | Parameter | Description | Example |
128
- | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
129
- | `--forceRegenerate` | Rebuilds all documentation from scratch, ignoring any existing structure or content. This is useful for starting over with a clean slate. | `aigne doc generate --forceRegenerate` |
130
- | `--feedback` | Provides initial instructions to guide the AI during the structure generation phase. | `aigne doc generate --feedback "Add more API examples and a troubleshooting section"` |
131
- | `--glossary` | Specifies a glossary file (`.md`) to ensure consistent use of terminology throughout the documentation. | `aigne doc generate --glossary @/path/to/glossary.md` |
129
+ | Parameter | Description | Example |
130
+ |---|---|---|
131
+ | `--forceRegenerate` | Rebuilds all documentation from scratch, ignoring any existing structure or content. This is useful when you want a complete reset. | `aigne doc generate --forceRegenerate` |
132
+ | `--feedback` | Provides initial text-based instructions to guide the AI during the structure generation phase, before the interactive review starts. | `aigne doc generate --feedback "Add more API examples"` |
133
+ | `--glossary` | Specifies a glossary file (e.g., `glossary.md`) to ensure consistent use of terminology throughout the documentation. | `aigne doc generate --glossary @/path/to/glossary.md` |
132
134
 
133
135
  ### Example: Forcing a Complete Rebuild
134
136