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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/.aigne/doc-smith/config.yaml +2 -0
  2. package/.aigne/doc-smith/output/structure-plan.json +2 -2
  3. package/.aigne/doc-smith/preferences.yml +28 -20
  4. package/.aigne/doc-smith/upload-cache.yaml +702 -0
  5. package/.release-please-manifest.json +1 -1
  6. package/CHANGELOG.md +20 -0
  7. package/README.md +1 -1
  8. package/agents/generate/document-structure-tools/add-document.mjs +35 -10
  9. package/agents/generate/document-structure-tools/delete-document.mjs +35 -12
  10. package/agents/generate/document-structure-tools/move-document.mjs +43 -17
  11. package/agents/generate/document-structure-tools/update-document.mjs +37 -10
  12. package/agents/generate/update-document-structure.yaml +1 -7
  13. package/agents/generate/user-review-document-structure.mjs +5 -4
  14. package/agents/translate/translate-document.yaml +1 -9
  15. package/agents/update/check-update-is-single.mjs +2 -1
  16. package/agents/update/document-tools/update-document-content.mjs +24 -14
  17. package/agents/update/fs-tools/glob.mjs +184 -0
  18. package/agents/update/fs-tools/grep.mjs +317 -0
  19. package/agents/update/fs-tools/read-file.mjs +307 -0
  20. package/agents/update/generate-document.yaml +4 -7
  21. package/agents/update/update-document-detail.yaml +6 -10
  22. package/agents/update/user-review-document.mjs +13 -13
  23. package/assets/screenshots/doc-complete-setup.png +0 -0
  24. package/assets/screenshots/doc-generate-docs.png +0 -0
  25. package/assets/screenshots/doc-generate.png +0 -0
  26. package/assets/screenshots/doc-generated-successfully.png +0 -0
  27. package/assets/screenshots/doc-publish.png +0 -0
  28. package/assets/screenshots/doc-regenerate.png +0 -0
  29. package/assets/screenshots/doc-translate-langs.png +0 -0
  30. package/assets/screenshots/doc-translate.png +0 -0
  31. package/assets/screenshots/doc-update.png +0 -0
  32. package/docs/advanced-how-it-works.ja.md +31 -31
  33. package/docs/advanced-how-it-works.md +9 -9
  34. package/docs/advanced-how-it-works.zh-TW.md +24 -24
  35. package/docs/advanced-how-it-works.zh.md +20 -20
  36. package/docs/advanced-quality-assurance.ja.md +57 -61
  37. package/docs/advanced-quality-assurance.md +57 -61
  38. package/docs/advanced-quality-assurance.zh-TW.md +57 -61
  39. package/docs/advanced-quality-assurance.zh.md +57 -61
  40. package/docs/advanced.ja.md +8 -4
  41. package/docs/advanced.md +7 -3
  42. package/docs/advanced.zh-TW.md +9 -5
  43. package/docs/advanced.zh.md +9 -5
  44. package/docs/changelog.ja.md +206 -29
  45. package/docs/changelog.md +177 -0
  46. package/docs/changelog.zh-TW.md +229 -52
  47. package/docs/changelog.zh.md +204 -27
  48. package/docs/cli-reference.ja.md +82 -52
  49. package/docs/cli-reference.md +56 -26
  50. package/docs/cli-reference.zh-TW.md +82 -52
  51. package/docs/cli-reference.zh.md +70 -40
  52. package/docs/configuration-interactive-setup.ja.md +45 -42
  53. package/docs/configuration-interactive-setup.md +8 -5
  54. package/docs/configuration-interactive-setup.zh-TW.md +26 -23
  55. package/docs/configuration-interactive-setup.zh.md +25 -22
  56. package/docs/configuration-language-support.ja.md +33 -63
  57. package/docs/configuration-language-support.md +32 -62
  58. package/docs/configuration-language-support.zh-TW.md +35 -65
  59. package/docs/configuration-language-support.zh.md +32 -62
  60. package/docs/configuration-llm-setup.ja.md +25 -23
  61. package/docs/configuration-llm-setup.md +20 -18
  62. package/docs/configuration-llm-setup.zh-TW.md +21 -19
  63. package/docs/configuration-llm-setup.zh.md +20 -18
  64. package/docs/configuration-preferences.ja.md +67 -52
  65. package/docs/configuration-preferences.md +56 -41
  66. package/docs/configuration-preferences.zh-TW.md +69 -54
  67. package/docs/configuration-preferences.zh.md +68 -53
  68. package/docs/configuration.ja.md +65 -81
  69. package/docs/configuration.md +19 -35
  70. package/docs/configuration.zh-TW.md +62 -79
  71. package/docs/configuration.zh.md +50 -67
  72. package/docs/features-generate-documentation.ja.md +44 -69
  73. package/docs/features-generate-documentation.md +36 -61
  74. package/docs/features-generate-documentation.zh-TW.md +42 -67
  75. package/docs/features-generate-documentation.zh.md +41 -67
  76. package/docs/features-publish-your-docs.ja.md +36 -36
  77. package/docs/features-publish-your-docs.md +2 -2
  78. package/docs/features-publish-your-docs.zh-TW.md +21 -21
  79. package/docs/features-publish-your-docs.zh.md +23 -23
  80. package/docs/features-translate-documentation.ja.md +40 -31
  81. package/docs/features-translate-documentation.md +15 -6
  82. package/docs/features-translate-documentation.zh-TW.md +37 -28
  83. package/docs/features-translate-documentation.zh.md +23 -14
  84. package/docs/features-update-and-refine.ja.md +68 -118
  85. package/docs/features-update-and-refine.md +58 -108
  86. package/docs/features-update-and-refine.zh-TW.md +67 -116
  87. package/docs/features-update-and-refine.zh.md +64 -114
  88. package/docs/features.ja.md +29 -19
  89. package/docs/features.md +25 -15
  90. package/docs/features.zh-TW.md +28 -18
  91. package/docs/features.zh.md +31 -21
  92. package/docs/getting-started.ja.md +40 -43
  93. package/docs/getting-started.md +36 -39
  94. package/docs/getting-started.zh-TW.md +38 -41
  95. package/docs/getting-started.zh.md +45 -48
  96. package/docs/overview.ja.md +63 -11
  97. package/docs/overview.md +60 -8
  98. package/docs/overview.zh-TW.md +67 -15
  99. package/docs/overview.zh.md +62 -10
  100. package/media.md +9 -9
  101. package/package.json +1 -1
  102. package/prompts/detail/custom/custom-components.md +304 -188
  103. package/prompts/detail/document-rules.md +4 -4
  104. package/prompts/detail/generate-document.md +21 -8
  105. package/prompts/detail/update-document.md +8 -12
  106. package/prompts/structure/update-document-structure.md +12 -8
  107. package/prompts/utils/feedback-refiner.md +3 -3
  108. package/tests/agents/generate/document-structure-tools/move-document.test.mjs +9 -9
  109. package/tests/agents/generate/user-review-document-structure.test.mjs +29 -8
  110. package/tests/agents/update/document-tools/update-document-content.test.mjs +115 -112
  111. package/tests/agents/update/fs-tools/glob.test.mjs +438 -0
  112. package/tests/agents/update/fs-tools/grep.test.mjs +279 -0
  113. package/tests/agents/update/fs-tools/read-file.test.mjs +553 -0
  114. package/tests/agents/update/user-review-document.test.mjs +48 -27
  115. package/types/document-schema.mjs +5 -6
  116. package/types/document-structure-schema.mjs +20 -8
@@ -2,9 +2,9 @@
2
2
 
3
3
  `aigne doc generate` コマンドは、ソースコードから完全なドキュメントセットを作成するための主要な機能です。このコマンドは、コードベースを分析し、論理的なドキュメント構造を計画し、各セクションのコンテンツを生成するプロセスを開始します。これは、初期状態からドキュメントを作成するための標準的な方法です。
4
4
 
5
- ## 初めての生成
5
+ ## 最初の生成
6
6
 
7
- 開始するには、プロジェクトのルートディレクトリに移動して、次のコマンドを実行します。
7
+ まず、プロジェクトのルートディレクトリに移動し、次のコマンドを実行します。
8
8
 
9
9
  ```bash aigne doc generate icon=lucide:play-circle
10
10
  aigne doc generate
@@ -12,30 +12,30 @@ aigne doc generate
12
12
 
13
13
  ### 自動設定
14
14
 
15
- プロジェクトでこのコマンドを初めて実行する場合、DocSmith は設定が存在しないことを検出します。その後、対話型のセットアップウィザードが自動的に起動し、必要なセットアップ手順を案内します。このプロセスにより、生成が開始される前に有効な設定が確実に配置されます。
15
+ プロジェクトでこのコマンドを初めて実行する場合、DocSmith は設定が存在しないことを検出します。その後、対話式のセットアップウィザードが自動的に起動し、必要な設定手順を案内します。このプロセスにより、生成が開始される前に有効な設定が確実に配置されます。
16
16
 
17
- ![初めて generate コマンドを実行するとセットアップウィザードが起動します](https://docsmith.aigne.io/image-bin/uploads/0c45a32667c5250e54194a61d9495965.png)
17
+ ![generate コマンドの実行、初期化のスマートな実行](../assets/screenshots/doc-generate.png)
18
18
 
19
- 以下を含む、ドキュメントの主要な側面を定義するための一連の質問に答えるよう求められます。
19
+ ドキュメントの主要な側面を定義するための一連の質問に答えるよう求められます。これには以下が含まれます。
20
20
 
21
- - ドキュメントの生成ルールとスタイル
22
- - 対象読者
23
- - 主要言語と追加の翻訳言語
24
- - ソースコードの入力パスとドキュメントの出力パス
21
+ * ドキュメント生成ルールとスタイル
22
+ * 対象読者
23
+ * 主要言語と追加の翻訳言語
24
+ * ソースコードの入力パスとドキュメントの出力パス
25
25
 
26
- ![質問に答えて、ドキュメントのスタイル、言語、ソースパスを設定します](https://docsmith.aigne.io/image-bin/uploads/fbedbfa256036ad6375a6c18047a75ad.png)
26
+ ![質問に答えてプロジェクトのセットアップを完了](../assets/screenshots/doc-complete-setup.png)
27
27
 
28
28
  設定が完了すると、DocSmith はドキュメントの生成に進みます。
29
29
 
30
- ![DocSmith がコードを分析し、構造を計画し、各ドキュメントを生成します](https://docsmith.aigne.io/image-bin/uploads/d0766c19380a02eb8a6f8ce86a838849.png)
30
+ ![構造計画の実行とドキュメントの生成](../assets/screenshots/doc-generate-docs.png)
31
31
 
32
- 正常に完了すると、新しく作成されたドキュメントは、セットアップ時に指定された出力ディレクトリで利用可能になります。
32
+ 正常に完了すると、新しく作成されたドキュメントは、セットアップ中に指定された出力ディレクトリで利用可能になります。
33
33
 
34
- ![完了すると、指定した出力ディレクトリに新しいドキュメントが生成されます](https://docsmith.aigne.io/image-bin/uploads/0967443611408ad9d0042793d590b8fd.png)
34
+ ![ドキュメントが正常に生成されました](../assets/screenshots/doc-generated-successfully.png)
35
35
 
36
36
  ## 生成プロセス
37
37
 
38
- `generate` コマンドは、自動化された複数ステップのワークフローを実行します。プロセスを以下に示します。
38
+ `generate` コマンドは、自動化されたマルチステップのワークフローを実行します。プロセスは以下の通りです。
39
39
 
40
40
  ```d2
41
41
  direction: down
@@ -46,75 +46,50 @@ User: {
46
46
 
47
47
  AIGNE-CLI: {
48
48
  label: "AIGNE CLI"
49
- }
50
49
 
51
- Config-Check: {
52
- label: "設定は\n存在しますか?"
53
- shape: diamond
54
- }
50
+ config-check: {
51
+ label: "設定ファイルは存在しますか?"
52
+ shape: diamond
53
+ }
55
54
 
56
- Setup-Wizard: {
57
- label: "対話型\nセットアップウィザード"
58
- }
55
+ interactive-setup: {
56
+ label: "対話式セットアップウィザード"
57
+ }
59
58
 
60
- Generation-Process: {
61
- label: "生成プロセス"
62
- grid-columns: 1
59
+ generation-process: {
60
+ label: "3. 生成プロセス"
63
61
 
64
- Analyze: { label: "コードベースの分析" }
65
- Plan: { label: "構造の計画" }
66
- Generate: { label: "コンテンツの生成" }
67
- }
62
+ analyze-code: "コードの分析"
63
+ plan-structure: "構造の計画"
64
+ generate-content: "コンテンツの生成"
68
65
 
69
- Source-Code: {
70
- label: "ソースコード"
71
- shape: cylinder
72
- }
66
+ analyze-code -> plan-structure -> generate-content
67
+ }
73
68
 
74
- Config-File: {
75
- label: "config.yaml"
76
- shape: cylinder
69
+ output: {
70
+ label: "出力ディレクトリ"
71
+ }
77
72
  }
78
73
 
79
- Output-Directory: {
80
- label: "出力ディレクトリ"
81
- shape: cylinder
82
- }
83
-
84
- User -> AIGNE-CLI: "1. aigne doc generate"
85
- AIGNE-CLI -> Config-Check: "2. 設定の確認"
86
-
87
- Config-Check -> Setup-Wizard: "3a. いいえ"
88
- Setup-Wizard -> User: "入力を要求"
89
- User -> Setup-Wizard: "回答を提供"
90
- Setup-Wizard -> Config-File: "作成"
91
- Config-File -> Generation-Process: "使用"
92
- Setup-Wizard -> Generation-Process: "4. 続行"
93
-
94
- Config-Check -> Generation-Process: "3b. はい"
95
-
96
- Source-Code -> Generation-Process.Analyze: "入力"
97
- Generation-Process.Analyze -> Generation-Process.Plan
98
- Generation-Process.Plan -> Generation-Process.Generate
99
- Generation-Process.Generate -> Output-Directory: "5. ドキュメントの書き込み"
100
-
101
- Output-Directory -> User: "6. ドキュメントのレビュー"
74
+ User -> AIGNE-CLI.config-check: "'aigne doc generate'"
75
+ AIGNE-CLI.config-check -> AIGNE-CLI.interactive-setup: "[いいえ] 2. セットアップの開始"
76
+ AIGNE-CLI.interactive-setup -> AIGNE-CLI.generation-process: "設定ファイルの作成"
77
+ AIGNE-CLI.config-check -> AIGNE-CLI.generation-process: "[はい]"
78
+ AIGNE-CLI.generation-process -> AIGNE-CLI.output: "4. ドキュメントの書き込み"
102
79
  ```
103
80
 
104
81
  ## コマンドオプション
105
82
 
106
- デフォルトの `generate` コマンドはほとんどのユースケースで十分です。ただし、その動作を変更するためのいくつかのオプションが利用可能であり、これらは完全な再生成を強制したり、ドキュメント構造を洗練させたりするのに役立ちます。
83
+ デフォルトの `generate` コマンドは、ほとんどのユースケースで十分です。しかし、その動作を変更するためのいくつかのオプションが利用可能で、完全な再生成を強制したり、ドキュメント構造を洗練させたりするのに役立ちます。
107
84
 
108
- | オプション | 説明 | 例 |
109
- |---------------------|------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------|
110
- | `--forceRegenerate` | 既存のすべてのドキュメントを削除し、ゼロから再生成します。ソースコードや設定に大幅な変更を加えた後に使用します。 | `aigne doc generate --forceRegenerate` |
111
- | `--feedback` | セクションの追加、削除、再編成など、ドキュメント全体の構造を洗練させるための高レベルのフィードバックを提供します。 | `aigne doc generate --feedback "APIリファレンスセクションを追加"` |
112
- | `--model` | コンテンツ生成に使用する AIGNE Hub の特定のラージ言語モデルを指定します。これにより、異なるモデルを切り替えることができます。 | `aigne doc generate --model anthropic:claude-3-5-sonnet` |
85
+ | オプション | 説明 | 例 |
86
+ | :------------------ | :--------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------- |
87
+ | `--forceRegenerate` | 既存のドキュメントをすべて削除し、最初から再生成します。ソースコードや設定に大幅な変更を加えた後に使用してください。 | `aigne doc generate --forceRegenerate` |
88
+ | `--feedback` | セクションの追加、削除、再編成など、ドキュメント全体の構造を洗練させるための大まかなフィードバックを提供します。 | `aigne doc generate --feedback "APIリファレンスを追加"` |
89
+ | `--model` | コンテンツ生成に使用するAIGNE Hubの特定の大規模言語モデルを指定し、異なるモデルを切り替えることができます。 | `aigne doc generate --model openai:gpt-4o` |
113
90
 
114
91
  ## 次のステップ
115
92
 
116
- 最初のドキュメントを生成した後も、プロジェクトは進化し続けます。ドキュメントをコードと同期させるには、更新を実行する必要があります。次のセクションでは、新しい要件やコードの変更に基づいて、対象を絞った変更を行い、特定のファイルを再生成する方法について説明します。
93
+ 最初のドキュメントを生成した後も、プロジェクトは進化し続けます。ドキュメントをコードと同期させるためには、更新を行う必要があります。次のセクションでは、新しい要件やコードの変更に基づいて、対象を絞った変更を行い、特定のファイルを再生成する方法について説明します。
117
94
 
118
- <x-card data-title="更新と改良" data-icon="lucide:file-edit" data-href="/features/update-and-refine">
119
- コードが変更されたときにドキュメントを更新する方法や、フィードバックを使用して特定の改善を行う方法を学びます。
120
- </x-card>
95
+ <x-card data-title="更新と改良" data-icon="lucide:file-edit" data-href="/features/update-and-refine">コードが変更された際のドキュメントの更新方法や、フィードバックを用いた特定の改善方法について学びます。</x-card>
@@ -14,24 +14,24 @@ aigne doc generate
14
14
 
15
15
  If you are running this command for the first time in a project, DocSmith will detect that no configuration exists. It will then automatically launch an interactive setup wizard to guide you through the required setup steps. This process ensures a valid configuration is in place before generation begins.
16
16
 
17
- ![Running the generate command for the first time triggers the setup wizard](https://docsmith.aigne.io/image-bin/uploads/0c45a32667c5250e54194a61d9495965.png)
17
+ ![Running generate command, smart execution of initialization](../assets/screenshots/doc-generate.png)
18
18
 
19
19
  You will be prompted to answer a series of questions to define key aspects of your documentation, including:
20
20
 
21
- - Document generation rules and style
22
- - The target audience
23
- - Primary language and any additional translation languages
24
- - Source code input and documentation output paths
21
+ * Document generation rules and style
22
+ * The target audience
23
+ * Primary language and any additional translation languages
24
+ * Source code input and documentation output paths
25
25
 
26
- ![Answer the questions to configure your documentation style, languages, and source paths](https://docsmith.aigne.io/image-bin/uploads/fbedbfa256036ad6375a6c18047a75ad.png)
26
+ ![Answer questions to complete project setup](../assets/screenshots/doc-complete-setup.png)
27
27
 
28
28
  After the configuration is complete, DocSmith proceeds with the documentation generation.
29
29
 
30
- ![DocSmith analyzes your code, plans the structure, and generates each document](https://docsmith.aigne.io/image-bin/uploads/d0766c19380a02eb8a6f8ce86a838849.png)
30
+ ![Executing structure planning and generating documents](../assets/screenshots/doc-generate-docs.png)
31
31
 
32
32
  Upon successful completion, the newly created documentation will be available in the output directory specified during setup.
33
33
 
34
- ![Once complete, you'll find your new documentation in the specified output directory](https://docsmith.aigne.io/image-bin/uploads/0967443611408ad9d0042793d590b8fd.png)
34
+ ![Documentation generated successfully](../assets/screenshots/doc-generated-successfully.png)
35
35
 
36
36
  ## The Generation Process
37
37
 
@@ -46,75 +46,50 @@ User: {
46
46
 
47
47
  AIGNE-CLI: {
48
48
  label: "AIGNE CLI"
49
- }
50
49
 
51
- Config-Check: {
52
- label: "Configuration\nExists?"
53
- shape: diamond
54
- }
50
+ config-check: {
51
+ label: "Config file exists?"
52
+ shape: diamond
53
+ }
55
54
 
56
- Setup-Wizard: {
57
- label: "Interactive\nSetup Wizard"
58
- }
55
+ interactive-setup: {
56
+ label: "Interactive Setup Wizard"
57
+ }
59
58
 
60
- Generation-Process: {
61
- label: "Generation Process"
62
- grid-columns: 1
59
+ generation-process: {
60
+ label: "3. Generation Process"
63
61
 
64
- Analyze: { label: "Analyze Codebase" }
65
- Plan: { label: "Plan Structure" }
66
- Generate: { label: "Generate Content" }
67
- }
62
+ analyze-code: "Analyze Code"
63
+ plan-structure: "Plan Structure"
64
+ generate-content: "Generate Content"
68
65
 
69
- Source-Code: {
70
- label: "Source Code"
71
- shape: cylinder
72
- }
66
+ analyze-code -> plan-structure -> generate-content
67
+ }
73
68
 
74
- Config-File: {
75
- label: "config.yaml"
76
- shape: cylinder
69
+ output: {
70
+ label: "Output Directory"
71
+ }
77
72
  }
78
73
 
79
- Output-Directory: {
80
- label: "Output Directory"
81
- shape: cylinder
82
- }
83
-
84
- User -> AIGNE-CLI: "1. aigne doc generate"
85
- AIGNE-CLI -> Config-Check: "2. Check for config"
86
-
87
- Config-Check -> Setup-Wizard: "3a. No"
88
- Setup-Wizard -> User: "Prompt for input"
89
- User -> Setup-Wizard: "Provide answers"
90
- Setup-Wizard -> Config-File: "Creates"
91
- Config-File -> Generation-Process: "Uses"
92
- Setup-Wizard -> Generation-Process: "4. Proceed"
93
-
94
- Config-Check -> Generation-Process: "3b. Yes"
95
-
96
- Source-Code -> Generation-Process.Analyze: "Input"
97
- Generation-Process.Analyze -> Generation-Process.Plan
98
- Generation-Process.Plan -> Generation-Process.Generate
99
- Generation-Process.Generate -> Output-Directory: "5. Write documentation"
100
-
101
- Output-Directory -> User: "6. Review documentation"
74
+ User -> AIGNE-CLI.config-check: "'aigne doc generate'"
75
+ AIGNE-CLI.config-check -> AIGNE-CLI.interactive-setup: "[No] 2. Launch setup"
76
+ AIGNE-CLI.interactive-setup -> AIGNE-CLI.generation-process: "Create config file"
77
+ AIGNE-CLI.config-check -> AIGNE-CLI.generation-process: "[Yes]"
78
+ AIGNE-CLI.generation-process -> AIGNE-CLI.output: "4. Write documentation"
102
79
  ```
103
80
 
104
81
  ## Command Options
105
82
 
106
83
  The default `generate` command is sufficient for most use cases. However, several options are available to modify its behavior, which can be useful for forcing a full regeneration or refining the documentation structure.
107
84
 
108
- | Option | Description | Example |
109
- |---------------------|------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------|
110
- | `--forceRegenerate` | Deletes all existing documents and regenerates them from scratch. Use this after making significant changes to your source code or configuration. | `aigne doc generate --forceRegenerate` |
111
- | `--feedback` | Provides high-level feedback to refine the overall documentation structure, such as adding, removing, or reorganizing sections. | `aigne doc generate --feedback "Add an API Reference section"` |
112
- | `--model` | Specifies a particular Large Language Model from AIGNE Hub to use for content generation. This allows you to switch between different models. | `aigne doc generate --model anthropic:claude-3-5-sonnet` |
85
+ | Option | Description | Example |
86
+ | :------------------ | :--------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------- |
87
+ | `--forceRegenerate` | Deletes all existing documents and regenerates them from scratch. Use this after making significant changes to your source code or configuration. | `aigne doc generate --forceRegenerate` |
88
+ | `--feedback` | Provides high-level feedback to refine the overall documentation structure, such as adding, removing, or reorganizing sections. | `aigne doc generate --feedback "Add an API Reference"` |
89
+ | `--model` | Specifies a particular Large Language Model from AIGNE Hub to use for content generation, allowing you to switch between different models. | `aigne doc generate --model openai:gpt-4o` |
113
90
 
114
91
  ## What's Next?
115
92
 
116
93
  After generating the initial documentation, your project will continue to evolve. To keep your documents synchronized with your code, you will need to perform updates. The next section explains how to make targeted changes and regenerate specific files based on new requirements or code modifications.
117
94
 
118
- <x-card data-title="Update and Refine" data-icon="lucide:file-edit" data-href="/features/update-and-refine">
119
- Learn how to update documents when your code changes or make specific improvements using feedback.
120
- </x-card>
95
+ <x-card data-title="Update and Refine" data-icon="lucide:file-edit" data-href="/features/update-and-refine">Learn how to update documents when your code changes or make specific improvements using feedback.</x-card>
@@ -1,6 +1,6 @@
1
1
  # 產生文件
2
2
 
3
- `aigne doc generate` 指令是從您的原始碼建立一套完整文件的主要功能。此指令會啟動一個流程,分析您的程式碼庫、規劃一個合乎邏輯的文件結構,然後為每個部分產生內容。這是從初始狀態建立文件的標準方法。
3
+ `aigne doc generate` 指令是從原始程式碼建立完整文件集的主要功能。此指令會啟動一個流程,分析您的程式碼庫、規劃邏輯性的文件結構,然後為每個部分產生內容。這是從初始狀態建立文件的標準方法。
4
4
 
5
5
  ## 首次產生
6
6
 
@@ -12,26 +12,26 @@ aigne doc generate
12
12
 
13
13
  ### 自動設定
14
14
 
15
- 如果您是首次在專案中執行此指令,DocSmith 會偵測到沒有任何設定存在。接著,它會自動啟動一個互動式設定精靈,引導您完成所需的設定步驟。此流程確保在產生開始前,已有一份有效的設定。
15
+ 如果您是首次在專案中執行此指令,DocSmith 將偵測到沒有任何設定存在。然後,它會自動啟動一個互動式設定精靈,引導您完成所需的設定步驟。此過程可確保在開始產生文件之前,有一個有效的設定。
16
16
 
17
- ![首次執行 generate 指令會觸發設定精靈](https://docsmith.aigne.io/image-bin/uploads/0c45a32667c5250e54194a61d9495965.png)
17
+ ![執行 generate 指令,智慧執行初始化](../assets/screenshots/doc-generate.png)
18
18
 
19
- 系統將提示您回答一系列問題,以定義您文件的關鍵面向,包括:
19
+ 系統會提示您回答一系列問題,以定義文件的關鍵面向,包括:
20
20
 
21
- - 文件產生規則與風格
22
- - 目標受眾
23
- - 主要語言及任何額外的翻譯語言
24
- - 原始碼輸入與文件輸出路徑
21
+ * 文件產生規則與風格
22
+ * 目標受眾
23
+ * 主要語言及任何其他翻譯語言
24
+ * 原始程式碼輸入與文件輸出路徑
25
25
 
26
- ![回答問題以設定您的文件風格、語言及原始碼路徑](https://docsmith.aigne.io/image-bin/uploads/fbedbfa256036ad6375a6c18047a75ad.png)
26
+ ![回答問題以完成專案設定](../assets/screenshots/doc-complete-setup.png)
27
27
 
28
28
  設定完成後,DocSmith 會繼續進行文件產生。
29
29
 
30
- ![DocSmith 會分析您的程式碼、規劃結構並產生每個文件](https://docsmith.aigne.io/image-bin/uploads/d0766c19380a02eb8a6f8ce86a838849.png)
30
+ ![執行結構規劃並產生文件](../assets/screenshots/doc-generate-docs.png)
31
31
 
32
- 成功完成後,新建立的文件將可在設定期間指定的輸出目錄中找到。
32
+ 成功完成後,新建立的文件將可在設定時指定的輸出目錄中找到。
33
33
 
34
- ![完成後,您將在指定的輸出目錄中找到新文件](https://docsmith.aigne.io/image-bin/uploads/0967443611408ad9d0042793d590b8fd.png)
34
+ ![文件成功產生](../assets/screenshots/doc-generated-successfully.png)
35
35
 
36
36
  ## 產生流程
37
37
 
@@ -46,75 +46,50 @@ User: {
46
46
 
47
47
  AIGNE-CLI: {
48
48
  label: "AIGNE CLI"
49
- }
50
49
 
51
- Config-Check: {
52
- label: "設定檔\n是否存在?"
53
- shape: diamond
54
- }
50
+ config-check: {
51
+ label: "設定檔是否存在?"
52
+ shape: diamond
53
+ }
55
54
 
56
- Setup-Wizard: {
57
- label: "互動式\n設定精靈"
58
- }
55
+ interactive-setup: {
56
+ label: "互動式設定精靈"
57
+ }
59
58
 
60
- Generation-Process: {
61
- label: "產生流程"
62
- grid-columns: 1
59
+ generation-process: {
60
+ label: "3. 產生流程"
63
61
 
64
- Analyze: { label: "分析程式碼庫" }
65
- Plan: { label: "規劃結構" }
66
- Generate: { label: "產生內容" }
67
- }
62
+ analyze-code: "分析程式碼"
63
+ plan-structure: "規劃結構"
64
+ generate-content: "產生內容"
68
65
 
69
- Source-Code: {
70
- label: "原始碼"
71
- shape: cylinder
72
- }
66
+ analyze-code -> plan-structure -> generate-content
67
+ }
73
68
 
74
- Config-File: {
75
- label: "config.yaml"
76
- shape: cylinder
69
+ output: {
70
+ label: "輸出目錄"
71
+ }
77
72
  }
78
73
 
79
- Output-Directory: {
80
- label: "輸出目錄"
81
- shape: cylinder
82
- }
83
-
84
- User -> AIGNE-CLI: "1. aigne doc generate"
85
- AIGNE-CLI -> Config-Check: "2. 檢查設定檔"
86
-
87
- Config-Check -> Setup-Wizard: "3a. 否"
88
- Setup-Wizard -> User: "提示輸入"
89
- User -> Setup-Wizard: "提供答案"
90
- Setup-Wizard -> Config-File: "建立"
91
- Config-File -> Generation-Process: "使用"
92
- Setup-Wizard -> Generation-Process: "4. 繼續"
93
-
94
- Config-Check -> Generation-Process: "3b. 是"
95
-
96
- Source-Code -> Generation-Process.Analyze: "輸入"
97
- Generation-Process.Analyze -> Generation-Process.Plan
98
- Generation-Process.Plan -> Generation-Process.Generate
99
- Generation-Process.Generate -> Output-Directory: "5. 寫入文件"
100
-
101
- Output-Directory -> User: "6. 檢閱文件"
74
+ User -> AIGNE-CLI.config-check: "'aigne doc generate'"
75
+ AIGNE-CLI.config-check -> AIGNE-CLI.interactive-setup: "[否] 2. 啟動設定"
76
+ AIGNE-CLI.interactive-setup -> AIGNE-CLI.generation-process: "建立設定檔"
77
+ AIGNE-CLI.config-check -> AIGNE-CLI.generation-process: "[是]"
78
+ AIGNE-CLI.generation-process -> AIGNE-CLI.output: "4. 寫入文件"
102
79
  ```
103
80
 
104
81
  ## 指令選項
105
82
 
106
- 預設的 `generate` 指令足以應對大多數使用情境。然而,有幾個選項可用於修改其行為,這在強制進行完整重新產生或改善文件結構時非常有用。
83
+ 預設的 `generate` 指令足以應付大多數使用情境。然而,有幾個選項可用於修改其行為,這對於強制完整重新產生或完善文件結構非常有用。
107
84
 
108
- | 選項 | 說明 | 範例 |
109
- |---------------------|------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------|
110
- | `--forceRegenerate` | 刪除所有現有文件並從頭開始重新產生。在對原始碼或設定進行重大變更後使用此選項。 | `aigne doc generate --forceRegenerate` |
111
- | `--feedback` | 提供高階回饋以改善整體文件結構,例如新增、移除或重組章節。 | `aigne doc generate --feedback "Add an API Reference section"` |
112
- | `--model` | 指定使用 AIGNE Hub 中的特定大型語言模型來產生內容。這讓您可以在不同模型之間切換。 | `aigne doc generate --model anthropic:claude-3-5-sonnet` |
85
+ | 選項 | 描述 | 範例 |
86
+ | :------------------ | :----------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------- |
87
+ | `--forceRegenerate` | 刪除所有現有文件並從頭開始重新產生。在對原始程式碼或設定進行重大變更後使用此選項。 | `aigne doc generate --forceRegenerate` |
88
+ | `--feedback` | 提供高層次的回饋以完善整體文件結構,例如新增、移除或重組章節。 | `aigne doc generate --feedback "Add an API Reference"` |
89
+ | `--model` | 指定從 AIGNE Hub 使用特定的大型語言模型來產生內容,讓您可以在不同模型之間切換。 | `aigne doc generate --model openai:gpt-4o` |
113
90
 
114
91
  ## 下一步是什麼?
115
92
 
116
- 產生初始文件後,您的專案將繼續發展。為了讓您的文件與程式碼保持同步,您需要執行更新。下一節將說明如何根據新需求或程式碼修改進行針對性變更並重新產生特定檔案。
93
+ 產生初始文件後,您的專案將會持續演進。為了讓您的文件與程式碼保持同步,您需要執行更新。下一節將說明如何根據新的需求或程式碼修改進行針對性變更並重新產生特定檔案。
117
94
 
118
- <x-card data-title="更新與改善" data-icon="lucide:file-edit" data-href="/features/update-and-refine">
119
- 了解當您的程式碼變更時如何更新文件,或使用回饋進行特定改進。
120
- </x-card>
95
+ <x-card data-title="更新與完善" data-icon="lucide:file-edit" data-href="/features/update-and-refine">學習如何在程式碼變更時更新文件,或使用回饋進行特定改進。</x-card>
@@ -12,110 +12,84 @@ aigne doc generate
12
12
 
13
13
  ### 自动配置
14
14
 
15
- 如果您是首次在项目中运行此命令,DocSmith 会检测到尚无配置。然后,它会自动启动一个交互式设置向导,引导您完成所需的设置步骤。此过程可确保在生成开始前已存在有效的配置。
15
+ 如果您是首次在项目中运行此命令,DocSmith 将检测到尚不存在任何配置。随后,它将自动启动一个交互式设置向导,引导您完成所需的设置步骤。此过程可确保在生成开始前已准备好有效的配置。
16
16
 
17
- ![首次运行 generate 命令会触发设置向导](https://docsmith.aigne.io/image-bin/uploads/0c45a32667c5250e54194a61d9495965.png)
17
+ ![运行 generate 命令,智能执行初始化](../assets/screenshots/doc-generate.png)
18
18
 
19
19
  系统将提示您回答一系列问题,以定义文档的关键方面,包括:
20
20
 
21
- - 文档生成规则和风格
22
- - 目标受众
23
- - 主要语言和任何其他翻译语言
24
- - 源代码输入和文档输出路径
21
+ * 文档生成规则和风格
22
+ * 目标受众
23
+ * 主要语言及任何其他翻译语言
24
+ * 源代码输入和文档输出路径
25
25
 
26
- ![回答问题以配置文档风格、语言和源路径](https://docsmith.aigne.io/image-bin/uploads/fbedbfa256036ad6375a6c18047a75ad.png)
26
+ ![回答问题以完成项目设置](../assets/screenshots/doc-complete-setup.png)
27
27
 
28
- 配置完成后,DocSmith 会继续进行文档生成。
28
+ 配置完成后,DocSmith 将继续进行文档生成。
29
29
 
30
- ![DocSmith 分析您的代码、规划结构并生成每个文档](https://docsmith.aigne.io/image-bin/uploads/d0766c19380a02eb8a6f8ce86a838849.png)
30
+ ![执行结构规划并生成文档](../assets/screenshots/doc-generate-docs.png)
31
31
 
32
32
  成功完成后,新创建的文档将位于设置期间指定的输出目录中。
33
33
 
34
- ![完成后,您将在指定的输出目录中找到新文档](https://docsmith.aigne.io/image-bin/uploads/0967443611408ad9d0042793d590b8fd.png)
34
+ ![文档生成成功](../assets/screenshots/doc-generated-successfully.png)
35
35
 
36
36
  ## 生成过程
37
37
 
38
- `generate` 命令执行一个自动化的多步骤工作流。流程概述如下:
38
+ `generate` 命令执行一个自动化的多步骤工作流。该过程概述如下:
39
39
 
40
40
  ```d2
41
41
  direction: down
42
42
 
43
43
  User: {
44
44
  shape: c4-person
45
- label: "用户"
46
45
  }
47
46
 
48
47
  AIGNE-CLI: {
49
48
  label: "AIGNE CLI"
50
- }
51
49
 
52
- Config-Check: {
53
- label: "配置\n存在?"
54
- shape: diamond
55
- }
50
+ config-check: {
51
+ label: "配置文件是否存在?"
52
+ shape: diamond
53
+ }
56
54
 
57
- Setup-Wizard: {
58
- label: "交互式\n设置向导"
59
- }
55
+ interactive-setup: {
56
+ label: "交互式设置向导"
57
+ }
60
58
 
61
- Generation-Process: {
62
- label: "生成过程"
63
- grid-columns: 1
59
+ generation-process: {
60
+ label: "3. 生成过程"
64
61
 
65
- Analyze: { label: "分析代码库" }
66
- Plan: { label: "规划结构" }
67
- Generate: { label: "生成内容" }
68
- }
62
+ analyze-code: "分析代码"
63
+ plan-structure: "规划结构"
64
+ generate-content: "生成内容"
69
65
 
70
- Source-Code: {
71
- label: "源代码"
72
- shape: cylinder
73
- }
66
+ analyze-code -> plan-structure -> generate-content
67
+ }
74
68
 
75
- Config-File: {
76
- label: "config.yaml"
77
- shape: cylinder
69
+ output: {
70
+ label: "输出目录"
71
+ }
78
72
  }
79
73
 
80
- Output-Directory: {
81
- label: "输出目录"
82
- shape: cylinder
83
- }
84
-
85
- User -> AIGNE-CLI: "1. aigne doc generate"
86
- AIGNE-CLI -> Config-Check: "2. 检查配置"
87
-
88
- Config-Check -> Setup-Wizard: "3a. 否"
89
- Setup-Wizard -> User: "提示输入"
90
- User -> Setup-Wizard: "提供回答"
91
- Setup-Wizard -> Config-File: "创建"
92
- Config-File -> Generation-Process: "使用"
93
- Setup-Wizard -> Generation-Process: "4. 继续"
94
-
95
- Config-Check -> Generation-Process: "3b. 是"
96
-
97
- Source-Code -> Generation-Process.Analyze: "输入"
98
- Generation-Process.Analyze -> Generation-Process.Plan
99
- Generation-Process.Plan -> Generation-Process.Generate
100
- Generation-Process.Generate -> Output-Directory: "5. 写入文档"
101
-
102
- Output-Directory -> User: "6. 审阅文档"
74
+ User -> AIGNE-CLI.config-check: "'aigne doc generate'"
75
+ AIGNE-CLI.config-check -> AIGNE-CLI.interactive-setup: "[否] 2. 启动设置"
76
+ AIGNE-CLI.interactive-setup -> AIGNE-CLI.generation-process: "创建配置文件"
77
+ AIGNE-CLI.config-check -> AIGNE-CLI.generation-process: "[是]"
78
+ AIGNE-CLI.generation-process -> AIGNE-CLI.output: "4. 编写文档"
103
79
  ```
104
80
 
105
81
  ## 命令选项
106
82
 
107
- 默认的 `generate` 命令足以满足大多数使用场景。然而,有几个选项可用于修改其行为,这对于强制完全重新生成或优化文档结构非常有用。
83
+ 默认的 `generate` 命令足以满足大多数使用场景。但是,有几个选项可用于修改其行为,这对于强制完全重新生成或优化文档结构非常有用。
108
84
 
109
- | 选项 | 说明 | 示例 |
110
- |---------------------|------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------|
111
- | `--forceRegenerate` | 删除所有现有文档并从头开始重新生成。在对源代码或配置进行重大更改后使用此选项。 | `aigne doc generate --forceRegenerate` |
112
- | `--feedback` | 提供高层反馈以优化整体文档结构,例如添加、删除或重组部分。 | `aigne doc generate --feedback "Add an API Reference section"` |
113
- | `--model` | 指定 AIGNE Hub 中的特定大型语言模型用于内容生成。这允许您在不同模型之间切换。 | `aigne doc generate --model anthropic:claude-3-5-sonnet` |
85
+ | 选项 | 描述 | 示例 |
86
+ | :------------------ | :--------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------- |
87
+ | `--forceRegenerate` | 删除所有现有文档并从头开始重新生成。在对源代码或配置进行重大更改后使用此选项。 | `aigne doc generate --forceRegenerate` |
88
+ | `--feedback` | 提供高层反馈以优化整体文档结构,例如添加、删除或重组部分。 | `aigne doc generate --feedback "添加 API 参考"` |
89
+ | `--model` | 指定 AIGNE Hub 中的特定大型语言模型用于内容生成,允许您在不同模型之间切换。 | `aigne doc generate --model openai:gpt-4o` |
114
90
 
115
91
  ## 接下来做什么?
116
92
 
117
- 生成初始文档后,您的项目将继续演进。为了使文档与代码保持同步,您需要执行更新。下一节将解释如何根据新需求或代码修改进行有针对性的更改并重新生成特定文件。
93
+ 生成初始文档后,您的项目将继续发展。为了使您的文档与代码保持同步,您需要执行更新。下一节将解释如何根据新需求或代码修改进行有针对性的更改并重新生成特定文件。
118
94
 
119
- <x-card data-title="更新和优化" data-icon="lucide:file-edit" data-href="/features/update-and-refine">
120
- 了解当代码更改时如何更新文档,或使用反馈进行特定改进。
121
- </x-card>
95
+ <x-card data-title="更新和优化" data-icon="lucide:file-edit" data-href="/features/update-and-refine">了解如何在代码更改时更新文档,或使用反馈进行特定改进。</x-card>