@aigne/doc-smith 0.8.12-beta.7 → 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.
Files changed (47) hide show
  1. package/.aigne/doc-smith/config.yaml +1 -1
  2. package/.aigne/doc-smith/media-description.yaml +91 -0
  3. package/.aigne/doc-smith/upload-cache.yaml +6 -69
  4. package/.release-please-manifest.json +1 -1
  5. package/CHANGELOG.md +12 -0
  6. package/agents/clear/choose-contents.mjs +14 -1
  7. package/agents/clear/clear-media-description.mjs +129 -0
  8. package/agents/clear/index.yaml +3 -1
  9. package/agents/evaluate/code-snippet.mjs +28 -24
  10. package/agents/evaluate/document-structure.yaml +0 -4
  11. package/agents/evaluate/document.yaml +1 -5
  12. package/agents/generate/index.yaml +1 -0
  13. package/agents/init/index.mjs +10 -0
  14. package/agents/media/batch-generate-media-description.yaml +44 -0
  15. package/agents/media/generate-media-description.yaml +47 -0
  16. package/agents/media/load-media-description.mjs +238 -0
  17. package/agents/update/index.yaml +1 -0
  18. package/agents/utils/load-sources.mjs +103 -53
  19. package/aigne.yaml +6 -0
  20. package/assets/report-template/report.html +34 -34
  21. package/docs/configuration-initial-setup.md +74 -55
  22. package/docs/configuration.ja.md +59 -86
  23. package/docs/configuration.md +59 -86
  24. package/docs/configuration.zh-TW.md +59 -86
  25. package/docs/configuration.zh.md +59 -86
  26. package/docs/getting-started.ja.md +43 -24
  27. package/docs/getting-started.md +29 -10
  28. package/docs/getting-started.zh-TW.md +42 -23
  29. package/docs/getting-started.zh.md +39 -20
  30. package/docs/guides-cleaning-up.md +19 -18
  31. package/docs/guides-evaluating-documents.md +70 -29
  32. package/docs/guides-generating-documentation.md +59 -121
  33. package/docs/guides-interactive-chat.md +34 -26
  34. package/docs/guides-managing-history.md +18 -13
  35. package/docs/guides-publishing-your-docs.md +40 -35
  36. package/docs/guides-translating-documentation.md +39 -34
  37. package/docs/guides-updating-documentation.md +11 -9
  38. package/docs/overview.md +2 -2
  39. package/docs/release-notes.md +60 -27
  40. package/package.json +2 -1
  41. package/prompts/evaluate/document-structure.md +6 -7
  42. package/prompts/evaluate/document.md +16 -25
  43. package/prompts/media/media-description/system-prompt.md +35 -0
  44. package/prompts/media/media-description/user-prompt.md +8 -0
  45. package/utils/constants/index.mjs +0 -107
  46. package/utils/file-utils.mjs +41 -0
  47. package/media.md +0 -19
@@ -1,45 +1,45 @@
1
1
  # Initial Setup
2
2
 
3
- This guide provides a step-by-step walkthrough of the interactive setup process for AIGNE DocSmith. This process is initiated the first time you run the `generate` command, or it can be started manually. Its purpose is to create a `config.yaml` file that stores your preferences for generating documentation.
3
+ This document provides a step-by-step guide to the interactive setup process for AIGNE DocSmith. This procedure is initiated automatically the first time you run the `aigne doc generate` command, or it can be started manually. The objective is to create a `config.yaml` file that stores your preferences for generating documentation.
4
4
 
5
- ## Starting the Process
5
+ ## How to Start the Setup Process
6
6
 
7
- To manually begin the configuration, navigate to your project's root directory in your terminal and execute the following command:
7
+ To begin the configuration manually, navigate to your project's root directory in a terminal and execute the following command:
8
8
 
9
9
  ```bash
10
10
  aigne doc init
11
11
  ```
12
12
 
13
- This command launches an interactive questionnaire that will guide you through configuring your documentation settings.
13
+ This command launches an interactive questionnaire to configure your documentation settings. The process consists of 10 steps designed to tailor the generated documentation to your specific requirements.
14
14
 
15
15
  ## Configuration Steps
16
16
 
17
- The setup process consists of nine questions designed to tailor the documentation to your specific needs.
17
+ The setup process will prompt you with a series of questions. The following sections detail each step.
18
18
 
19
19
  ### Step 1: Define Documentation Purpose
20
20
 
21
- You will first be asked to define the primary goals of your documentation. This selection influences the tone, structure, and focus of the generated content.
21
+ The first step is to define the primary goals of your documentation. This selection influences the tone, structure, and focus of the generated content.
22
22
 
23
- **Prompt:** `📝 [1/9]: What should your documentation help readers achieve?`
23
+ **Prompt:** `📝 [1/10]: What should your documentation help readers achieve?`
24
24
 
25
- You can select multiple options from the list below:
25
+ You can select one or more options from the following list:
26
26
 
27
27
  | Option | Name | Description |
28
28
  | :--- | :--- | :--- |
29
29
  | `getStarted` | Get started quickly | Help new users go from zero to working in <30 minutes. |
30
30
  | `completeTasks` | Complete specific tasks | Guide users through common workflows and use cases. |
31
- | `findAnswers` | Find answers fast | Provide searchable reference for all features and APIs. |
31
+ | `findAnswers` | Find answers fast | Provide a searchable reference for all features and APIs. |
32
32
  | `understandSystem` | Understand the system | Explain how it works and the reasoning behind design decisions. |
33
33
  | `solveProblems` | Solve problems | Help users troubleshoot and fix issues. |
34
- | `mixedPurpose` | Mix of above | Cover multiple needs comprehensively. |
34
+ | `mixedPurpose` | Mix of above | Cover multiple needs. |
35
35
 
36
36
  ### Step 2: Identify Target Audience
37
37
 
38
- Next, specify who will be the primary readers of your documentation. This helps tailor the language and technical depth appropriately.
38
+ Next, specify the primary readers of your documentation. This helps to adjust the language and technical depth appropriately.
39
39
 
40
- **Prompt:** `👥 [2/9]: Who will be reading your documentation?`
40
+ **Prompt:** `👥 [2/10]: Who will be reading your documentation?`
41
41
 
42
- You can select one or more of the following audiences:
42
+ You may select multiple audiences from this list:
43
43
 
44
44
  | Option | Name | Description |
45
45
  | :--- | :--- | :--- |
@@ -50,37 +50,29 @@ You can select one or more of the following audiences:
50
50
  | `supportTeams` | Support teams | People helping others use the product. |
51
51
  | `mixedTechnical` | Mixed technical audience | A combination of developers, DevOps, and other technical users. |
52
52
 
53
- ### Step 3: Provide Custom Rules
53
+ ### Step 3: Specify Reader Knowledge Level
54
54
 
55
- This optional step allows you to provide specific instructions or constraints for the AI to follow during content generation.
56
-
57
- **Prompt:** `📋 [3/9]: Any custom rules or requirements for your documentation? (Optional, press Enter to skip)`
58
-
59
- You can input any specific requirements, such as tone, style, or content to exclude. For example: "Avoid using marketing language and focus on technical accuracy."
60
-
61
- ### Step 4: Specify Reader Knowledge Level
62
-
63
- Indicate the assumed knowledge level of your audience. This ensures the content is pitched at the right level, without being too basic or too complex.
55
+ Indicate the assumed knowledge level of your audience. This ensures the content is presented at an appropriate level, avoiding information that is either too basic or too complex.
64
56
 
65
- **Prompt:** `🧠 [4/9]: How much do readers already know about your project?`
57
+ **Prompt:** `🧠 [3/10]: How much do readers already know about your project?`
66
58
 
67
59
  Select the option that best describes your readers:
68
60
 
69
61
  | Option | Name | Description |
70
62
  | :--- | :--- | :--- |
71
63
  | `completeBeginners` | Complete beginners | New to the domain or technology entirely. |
72
- | `domainFamiliar` | Domain-familiar, tool-new | Know the problem space but are new to this solution. |
73
- | `experiencedUsers` | Experienced users | Regular users who need reference or advanced topics. |
64
+ | `domainFamiliar` | Domain-familiar, tool-new | Know the problem space but are new to this specific solution. |
65
+ | `experiencedUsers` | Experienced users | Regular users who need reference material or advanced topics. |
74
66
  | `emergencyTroubleshooting` | Emergency/troubleshooting | Users who need to fix a problem quickly. |
75
67
  | `exploringEvaluating` | Exploring/evaluating | Users trying to determine if the tool fits their needs. |
76
68
 
77
- ### Step 5: Set Documentation Depth
69
+ ### Step 4: Set Documentation Depth
78
70
 
79
- Choose how detailed the documentation should be. This determines the scope and level of detail in the generated content.
71
+ Choose how detailed the documentation should be. This parameter determines the scope and level of detail in the generated content.
80
72
 
81
- **Prompt:** `📊 [5/9]: How detailed should your documentation be?`
73
+ **Prompt:** `📊 [4/10]: How detailed should your documentation be?`
82
74
 
83
- Select one of the following levels of detail:
75
+ Select one of the following levels:
84
76
 
85
77
  | Option | Name | Description |
86
78
  | :--- | :--- | :--- |
@@ -89,49 +81,65 @@ Select one of the following levels of detail:
89
81
  | `comprehensive` | Comprehensive | Covers all features, edge cases, and advanced scenarios. |
90
82
  | `aiDecide` | Let AI decide | The tool analyzes code complexity to suggest an appropriate depth. |
91
83
 
92
- ### Step 6: Select Primary Language
84
+ ### Step 5: Select Primary Language
93
85
 
94
86
  Choose the main language for your documentation. The system will detect your operating system's language and suggest it as the default.
95
87
 
96
- **Prompt:** `🌐 [6/9]: What's your main documentation language?`
88
+ **Prompt:** `🌐 [5/10]: What's your main documentation language?`
97
89
 
98
- You will be presented with a list of 12 supported languages, including English, Chinese (Simplified), and Spanish.
90
+ You can select from a list of 12 supported languages, including English, Chinese (Simplified), and Spanish.
99
91
 
100
- ### Step 7: Choose Translation Languages
92
+ ### Step 6: Choose Translation Languages
101
93
 
102
- Select any additional languages you want the documentation to be translated into.
94
+ Select any additional languages into which you want the documentation to be translated.
103
95
 
104
- **Prompt:** `🔄 [7/9]: Which languages should we translate to?`
96
+ **Prompt:** `🔄 [6/10]: Which languages should we translate to?`
105
97
 
106
- You can choose multiple languages from the list of supported options, excluding the primary language you selected in the previous step.
98
+ You can choose multiple languages from the supported options, excluding the primary language selected in the previous step.
107
99
 
108
- ### Step 8: Define Output Directory
100
+ ### Step 7: Define Documentation Directory
109
101
 
110
- Specify the folder where the generated documentation files should be saved.
102
+ Specify the folder where the generated documentation files will be saved.
111
103
 
112
- **Prompt:** `📁 [8/9]: Where should we save your documentation?`
104
+ **Prompt:** `📁 [7/10]: Where should we save your documentation?`
113
105
 
114
- The default path is `.aigne/doc-smith/docs`. You can accept this or provide a different path.
106
+ The default path is `.aigne/doc-smith/docs`. You can accept this default or provide a different path.
115
107
 
116
- ### Step 9: Specify Content Sources
108
+ ### Step 8: Specify Content Sources
117
109
 
118
- Indicate which files and folders the tool should analyze to generate documentation. You can add multiple paths and use glob patterns for advanced filtering.
110
+ Indicate which files and folders the tool should analyze to generate documentation. You can add multiple paths and use glob patterns for more specific file matching.
111
+
112
+ **Prompt:** `🔍 [8/10]: Content Sources`
113
+
114
+ You will be prompted to enter file paths, folder paths, or glob patterns (e.g., `src/**/*.js`). If no paths are provided, the tool will analyze the entire project directory by default.
115
+
116
+ ### Step 9: Provide Custom Rules
117
+
118
+ This optional step allows you to provide specific instructions or constraints for the AI to follow during content generation.
119
119
 
120
- **Prompt:** `🔍 [9/9]: Content Sources`
120
+ **Prompt:** `📋 [9/10]: Any custom rules or requirements for your documentation? (Optional, press Enter to skip)`
121
121
 
122
- You will be prompted to enter file paths, folder paths, or glob patterns (e.g., `src/**/*.js`). If you do not provide any paths, the tool will analyze the entire project directory by default.
122
+ You can input any requirements, such as tone, style, or content to exclude. For example: "Focus on technical accuracy and avoid marketing terminology."
123
123
 
124
- ## Generated Configuration File
124
+ ### Step 10: Configure Media Settings
125
125
 
126
- After completing the questionnaire, DocSmith saves your responses to a configuration file named `config.yaml` in the `.aigne/doc-smith/` directory. This file serves as the blueprint for all future documentation generation and can be manually edited at any time.
126
+ Set a minimum width for images to be included in the documentation. This helps filter out low-resolution images or icons.
127
127
 
128
- Here is an example of a generated `config.yaml` file:
128
+ **Prompt:** `🖼️ [10/10]: Minimum image width (in pixels) to include in documentation:`
129
129
 
130
- ```yaml config.yaml title="config.yaml"
130
+ The default value is `800`. You can enter a different positive number to adjust the filter.
131
+
132
+ ## The `config.yaml` File
133
+
134
+ After you answer all the questions, DocSmith saves your responses to a configuration file named `config.yaml`, located in the `.aigne/doc-smith/` directory of your project. This file acts as the blueprint for all future documentation generation and can be manually edited at any time.
135
+
136
+ Below is an example of a generated `config.yaml` file:
137
+
138
+ ```yaml config.yaml icon=logos:yaml
131
139
  # Project information for documentation publishing
132
140
  projectName: AIGNE DocSmith
133
141
  projectDesc: AIGNE DocSmith is a powerful, AI-driven documentation generation tool...
134
- projectLogo: https://docsmith.aigne.io/image-bin/uploads/9645caf64b4232699982c4d940b03b90.svg
142
+ projectLogo: ../assets/screenshots/9645caf64b4232699982c4d940b03b90.svg
135
143
 
136
144
  # =============================================================================
137
145
  # Documentation Configuration
@@ -154,7 +162,7 @@ documentationDepth: comprehensive
154
162
 
155
163
  # Custom Rules: Define specific documentation generation rules and requirements
156
164
  rules: |
157
- Avoid using vague or empty words...
165
+ Avoid using vague or empty words that don't provide measurable or specific details...
158
166
 
159
167
  # Target Audience: Describe your specific target audience and their characteristics
160
168
  targetAudience: |
@@ -163,17 +171,28 @@ targetAudience: |
163
171
  locale: en
164
172
  translateLanguages:
165
173
  - zh
174
+ - zh-TW
166
175
  - ja
167
176
 
168
- # Directory and source path configurations
177
+ # Paths
169
178
  docsDir: ./docs # Directory to save generated documentation
170
179
  sourcesPath: # Source code paths to analyze
171
180
  - ./README.md
172
181
  - ./agents
182
+
183
+ # =============================================================================
184
+ # Media Settings
185
+ # =============================================================================
186
+ media:
187
+ minImageWidth: 800
173
188
  ```
174
189
 
175
- ## Next Steps
190
+ ## Summary and Next Steps
191
+
192
+ Once the setup is complete, you will see a confirmation message.
193
+
194
+ ![Setup Complete](../assets/screenshots/doc-complete-setup.png)
176
195
 
177
- With your initial configuration complete, you are now ready to create your documentation.
196
+ With your initial configuration saved, you are now prepared to create your documentation.
178
197
 
179
- * Proceed to the [Generating Documentation](./guides-generating-documentation.md) guide to learn how to run the generation process.
198
+ * To proceed, consult the [Generating Documentation](./guides-generating-documentation.md) guide for instructions on running the generation process.
@@ -1,96 +1,69 @@
1
1
  # 設定
2
2
 
3
- 適切な設定は、プロジェクト固有のニーズに合わせてドキュメント生成プロセスを調整するために不可欠です。AIGNE DocSmithは、主要な設定ファイルとコマンドラインインターフェースを使用して設定を管理します。このセットアップにより、生成されるドキュメントがプロジェクトの目標、対象読者、構造的要件を正確に反映することが保証されます。
3
+ 適切な設定は、AIGNE DocSmith ツールがプロジェクト固有のニーズに合ったドキュメントを生成するための基本です。このプロセスでは、中央の設定ファイルでプロジェクトレベルの設定を定義し、個人の設定を管理して生成プロセスを微調整します。
4
4
 
5
- このセクションでは、ツールの設定方法の概要を説明します。ステップバイステップの手順については、以下の詳細なガイドを参照してください。
5
+ このセクションでは、ツールの設定方法の概要を説明します。詳細な手順については、以下の各ガイドを参照してください。
6
6
 
7
- <x-cards>
8
- <x-card data-title="初期設定" data-icon="lucide:settings-2" data-href="/configuration/initial-setup">対話式セットアップを実行して `config.yaml` ファイルを作成する方法を学びます。これは、新しいプロジェクトで推奨される最初のステップです。</x-card>
9
- <x-card data-title="設定の管理" data-icon="lucide:list-checks" data-href="/configuration/managing-preferences">保存された設定を表示、有効化、無効化、または削除する方法を理解し、時間とともにドキュメント生成プロセスを洗練させます。</x-card>
7
+ <x-cards data-columns="2">
8
+ <x-card data-title="初期設定" data-icon="lucide:settings-2" data-href="/configuration/initial-setup">
9
+ 対話式のセットアップガイドに従って、主要な `config.yaml` ファイルを作成します。これは、新しいドキュメントプロジェクトに不可欠な最初のステップです。
10
+ </x-card>
11
+ <x-card data-title="設定の管理" data-icon="lucide:user-cog" data-href="/configuration/managing-preferences">
12
+ 個人の設定を表示、有効化、無効化、または削除する方法を学びます。これにより、主要なプロジェクト設定を補完する特定のルールを適用できます。
13
+ </x-card>
10
14
  </x-cards>
11
15
 
12
- ## `config.yaml` ファイル
13
-
14
- すべてのプロジェクトレベルの設定は、プロジェクト内の `.aigne/doc-smith/` ディレクトリにある `config.yaml` という名前のファイルに保存されます。`aigne doc init` コマンドは、対話的なプロセスを通じてこのファイルを作成します。また、いつでもテキストエディタでこのファイルを手動で変更して設定を調整することもできます。
15
-
16
- 以下は `config.yaml` ファイルの例で、各セクションを説明するコメントが付いています。
17
-
18
- ```yaml Example config.yaml icon=logos:yaml
19
- # ドキュメント公開のためのプロジェクト情報
20
- projectName: AIGNE DocSmith
21
- projectDesc: AIGNE DocSmithは、AIGNEフレームワーク上に構築された強力なAI駆動のドキュメント生成ツールです。ソースコードから直接、詳細で構造化された多言語のドキュメント作成を自動化します。
22
- projectLogo: https://docsmith.aigne.io/image-bin/uploads/9645caf64b4232699982c4d940b03b90.svg
23
-
24
- # =============================================================================
25
- # ドキュメント設定
26
- # =============================================================================
27
-
28
- # 目的: 読者に達成してもらいたい主な成果は何ですか?
29
- # 利用可能なオプション(必要に応じてコメントを解除し、変更してください):
30
- # getStarted - 迅速な開始:新規ユーザーが30分未満でゼロから作業を開始できるように支援します
31
- # completeTasks - 特定のタスクの完了:一般的なワークフローとユースケースを通じてユーザーをガイドします
32
- # findAnswers - 迅速な回答の検索:すべての機能とAPIに対して検索可能なリファレンスを提供します
33
- # understandSystem - システムの理解:システムの仕組み、設計上の決定理由を説明します
34
- # solveProblems - 問題の解決:ユーザーのトラブルシューティングと問題修正を支援します
35
- # mixedPurpose - 上記の混合:複数のニーズをカバーする包括的なドキュメント
36
- documentPurpose:
37
- - getStarted
38
- - completeTasks
39
-
40
- # 対象読者: 主に誰がこれを読みますか?
41
- # 利用可能なオプション(必要に応じてコメントを解除し、変更してください):
42
- # endUsers - エンドユーザー(非技術者):製品を使用するがコーディングはしない人々
43
- # developers - 統合開発者:これを自分のプロジェクトに追加するエンジニア
44
- # devops - DevOps/インフラストラクチャ:システムをデプロイ、監視、維持するチーム
45
- # decisionMakers - 技術的な意思決定者:実装を評価または計画するアーキテクト、リーダー
46
- # supportTeams - サポートチーム:他者が製品を使用するのを助ける人々
47
- # mixedTechnical - 混合技術者層:開発者、DevOps、および技術ユーザー
48
- targetAudienceTypes:
49
- - endUsers
50
-
51
- # 読者の知識レベル: 読者が訪れたときに通常何を知っていますか?
52
- # 利用可能なオプション(必要に応じてコメントを解除し、変更してください):
53
- # completeBeginners - 完全な初心者:この分野/技術に全く新しい人々
54
- # domainFamiliar - 分野に精通、ツールは初めて:問題領域は知っているが、この特定のソリューションは初めて
55
- # experiencedUsers - 経験豊富なユーザー:リファレンス/高度なトピックを必要とする通常のユーザー
56
- # emergencyTroubleshooting - 緊急/トラブルシューティング:何かが壊れており、迅速に修正する必要がある
57
- # exploringEvaluating - 探索/評価:これが自分のニーズに合うかどうかを理解しようとしている
58
- readerKnowledgeLevel: completeBeginners
59
-
60
- # ドキュメントの深さ: ドキュメントはどの程度包括的であるべきですか?
61
- # 利用可能なオプション(必要に応じてコメントを解除し、変更してください):
62
- # essentialOnly - 必須事項のみ:80%のユースケースをカバーし、簡潔に保つ
63
- # balancedCoverage - バランスの取れたカバレッジ:実践的な例を伴う適切な深さ [推奨]
64
- # comprehensive - 包括的:すべての機能、エッジケース、および高度なシナリオをカバーする
65
- # aiDecide - AIに決定させる:コードの複雑さを分析し、適切な深さを提案する
66
- documentationDepth: comprehensive
67
-
68
- # カスタムルール: 特定のドキュメント生成ルールと要件を定義します
69
- rules: |
70
- Avoid using vague or empty words that don't provide measurable or specific details, such as 'intelligently', 'seamlessly', 'comprehensive', or 'high-quality'. Focus on concrete, verifiable facts and information.
71
- Focus on concrete, verifiable facts and information.
72
- Must cover all subcommands of DocSmith
73
-
74
- # 対象読者: 特定の対象読者とその特徴を記述します
75
- targetAudience: |
76
-
77
- locale: en
78
- translateLanguages:
79
- - zh
80
- - zh-TW
81
- - ja
82
- docsDir: ./docs # 生成されたドキュメントを保存するディレクトリ
83
- sourcesPath: # 分析するソースコードのパス
84
- - ./README.md
85
- - ./CHANGELOG.md
86
- - ./aigne.yaml
87
- - ./agents
88
- - ./media.md
89
- - ./.aigne/doc-smith/config.yaml
90
- ```
16
+ ## `config.yaml` ファイルについて
17
+
18
+ `config.yaml` ファイルは、ドキュメントプロジェクトにおける信頼できる唯一の情報源(source of truth)として機能します。このファイルは初期設定プロセスで生成され、AI がソースコードを分析してコンテンツを生成するために使用するすべてのコアディレクティブを含んでいます。正しく設定されたファイルにより、意図した読者、目的、スタイルに合わせた出力が保証されます。
19
+
20
+ 以下に、`config.yaml` ファイルに含まれる主要なパラメータの内訳を示します。
21
+
22
+ ### コア設定パラメータ
23
+
24
+ <x-field-group>
25
+ <x-field data-name="projectName" data-type="string" data-required="true">
26
+ <x-field-desc markdown>プロジェクトの正式名称。ドキュメント全体のタイトルやその他のメタデータで使用されます。</x-field-desc>
27
+ </x-field>
28
+ <x-field data-name="projectDesc" data-type="string" data-required="true">
29
+ <x-field-desc markdown>プロジェクトの目的と機能を簡潔に一句で説明します。</x-field-desc>
30
+ </x-field>
31
+ <x-field data-name="projectLogo" data-type="string" data-required="false">
32
+ <x-field-desc markdown>プロジェクトのロゴ画像を指す URL。公開されるドキュメントサイトのブランディングに使用されます。</x-field-desc>
33
+ </x-field>
34
+ <x-field data-name="documentPurpose" data-type="array" data-required="true">
35
+ <x-field-desc markdown>ドキュメントの主要な目標を定義します。例として、オンボーディングガイドのための `getStarted` や、手順を説明するための `completeTasks` があります。</x-field-desc>
36
+ </x-field>
37
+ <x-field data-name="targetAudienceTypes" data-type="array" data-required="true">
38
+ <x-field-desc markdown>対象読者を指定します。例として、技術者ではない一般ユーザー向けの `endUsers` や、エンジニア向けの `developers` があります。</x-field-desc>
39
+ </x-field>
40
+ <x-field data-name="readerKnowledgeLevel" data-type="string" data-required="true">
41
+ <x-field-desc markdown>対象読者に想定される技術知識と背景を記述します。例:`completeBeginners`。</x-field-desc>
42
+ </x-field>
43
+ <x-field data-name="documentationDepth" data-type="string" data-required="true">
44
+ <x-field-desc markdown>生成されるコンテンツの詳細度を制御します。オプションは `essentialOnly` から `comprehensive` まであります。</x-field-desc>
45
+ </x-field>
46
+ <x-field data-name="rules" data-type="string" data-required="false">
47
+ <x-field-desc markdown>コンテンツ生成プロセス中に AI が従うべきカスタム指示、ガイドライン、または制約のセットです。</x-field-desc>
48
+ </x-field>
49
+ <x-field data-name="locale" data-type="string" data-required="true">
50
+ <x-field-desc markdown>ドキュメントの主要な言語コード。例:英語の場合は `en`。</x-field-desc>
51
+ </x-field>
52
+ <x-field data-name="translateLanguages" data-type="array" data-required="false">
53
+ <x-field-desc markdown>主要なドキュメントを翻訳する先の言語コードのリスト。例:`zh`(中国語)や `ja`(日本語)。</x-field-desc>
54
+ </x-field>
55
+ <x-field data-name="docsDir" data-type="string" data-required="true">
56
+ <x-field-desc markdown>生成されたドキュメントファイルが保存されるローカルディレクトリのパス。</x-field-desc>
57
+ </x-field>
58
+ <x-field data-name="sourcesPath" data-type="array" data-required="true">
59
+ <x-field-desc markdown>ツールがドキュメントを生成するために分析するソースファイル、ディレクトリ、または glob パターンのリスト。</x-field-desc>
60
+ </x-field>
61
+ </x-field-group>
91
62
 
92
63
  ## まとめ
93
64
 
94
- 設定が完了すると、ツールはプロジェクト、対象読者、ドキュメントの目標を明確に理解し、より正確で関連性の高いコンテンツが生成されます。
65
+ 明確に定義された設定は、正確で、関連性が高く、効果的なドキュメントを作成するために不可欠です。初期設定を完了し、`config.yaml` ファイルを理解することで、すべてのドキュメント作成タスクの強固な基盤を築くことができます。
95
66
 
96
- プロジェクトの設定を開始するには、[初期設定](./configuration-initial-setup.md) ガイドに進んでください。
67
+ プロジェクトの設定を進めるには、以下のガイドを参照してください:
68
+ * **[初期設定](./configuration-initial-setup.md)**:プロジェクトの `config.yaml` ファイルを作成します。
69
+ * **[設定の管理](./configuration-managing-preferences.md)**:個人のルールでツールの動作をカスタマイズします。
@@ -1,96 +1,69 @@
1
1
  # Configuration
2
2
 
3
- Proper configuration is essential for tailoring the documentation generation process to your project's specific needs. AIGNE DocSmith uses a primary configuration file and a command-line interface to manage your settings. This setup ensures that the generated documentation accurately reflects your project's goals, target audience, and structural requirements.
3
+ Proper configuration is fundamental to guiding the AIGNE DocSmith tool in generating documentation that aligns with your project's specific needs. This process involves defining project-level settings through a central configuration file and managing personal preferences for fine-tuning the generation process.
4
4
 
5
- This section provides an overview of how to configure the tool. For step-by-step instructions, please refer to the following detailed guides:
5
+ This section provides an overview of how to configure the tool. For detailed, step-by-step instructions, please refer to the specific guides linked below.
6
6
 
7
- <x-cards>
8
- <x-card data-title="Initial Setup" data-icon="lucide:settings-2" data-href="/configuration/initial-setup">Learn how to run the interactive setup to create your config.yaml file. This is the recommended first step for any new project.</x-card>
9
- <x-card data-title="Managing Preferences" data-icon="lucide:list-checks" data-href="/configuration/managing-preferences">Understand how to view, enable, disable, or delete saved preferences to refine the documentation generation process over time.</x-card>
7
+ <x-cards data-columns="2">
8
+ <x-card data-title="Initial Setup" data-icon="lucide:settings-2" data-href="/configuration/initial-setup">
9
+ Follow the interactive setup guide to create the main `config.yaml` file. This is the essential first step for any new documentation project.
10
+ </x-card>
11
+ <x-card data-title="Managing Preferences" data-icon="lucide:user-cog" data-href="/configuration/managing-preferences">
12
+ Learn how to view, enable, disable, or delete personal preferences. These allow you to apply specific rules that can supplement the main project configuration.
13
+ </x-card>
10
14
  </x-cards>
11
15
 
12
- ## The `config.yaml` File
13
-
14
- All project-level settings are stored in a file named `config.yaml`, located in the `.aigne/doc-smith/` directory within your project. The `aigne doc init` command creates this file for you through an interactive process. You can also modify this file manually with a text editor to adjust settings at any time.
15
-
16
- Below is an example of a `config.yaml` file, with comments explaining each section.
17
-
18
- ```yaml Example config.yaml icon=logos:yaml
19
- # Project information for documentation publishing
20
- projectName: AIGNE DocSmith
21
- projectDesc: AIGNE DocSmith is a powerful, AI-driven documentation generation tool built on the AIGNE Framework. It automates the creation of detailed, structured, and multi-language documentation directly from your source code.
22
- projectLogo: https://docsmith.aigne.io/image-bin/uploads/9645caf64b4232699982c4d940b03b90.svg
23
-
24
- # =============================================================================
25
- # Documentation Configuration
26
- # =============================================================================
27
-
28
- # Purpose: What's the main outcome you want readers to achieve?
29
- # Available options (uncomment and modify as needed):
30
- # getStarted - Get started quickly: Help new users go from zero to working in <30 minutes
31
- # completeTasks - Complete specific tasks: Guide users through common workflows and use cases
32
- # findAnswers - Find answers fast: Provide searchable reference for all features and APIs
33
- # understandSystem - Understand the system: Explain how it works, why design decisions were made
34
- # solveProblems - Solve problems: Help users troubleshoot and fix issues
35
- # mixedPurpose - Mix of above: Comprehensive documentation covering multiple needs
36
- documentPurpose:
37
- - getStarted
38
- - completeTasks
39
-
40
- # Target Audience: Who will be reading this most often?
41
- # Available options (uncomment and modify as needed):
42
- # endUsers - End users (non-technical): People who use the product but don't code
43
- # developers - Developers integrating: Engineers adding this to their projects
44
- # devops - DevOps/Infrastructure: Teams deploying, monitoring, maintaining systems
45
- # decisionMakers - Technical decision makers: Architects, leads evaluating or planning implementation
46
- # supportTeams - Support teams: People helping others use the product
47
- # mixedTechnical - Mixed technical audience: Developers, DevOps, and technical users
48
- targetAudienceTypes:
49
- - endUsers
50
-
51
- # Reader Knowledge Level: What do readers typically know when they arrive?
52
- # Available options (uncomment and modify as needed):
53
- # completeBeginners - Complete beginners: New to this domain/technology entirely
54
- # domainFamiliar - Domain-familiar, tool-new: Know the problem space, new to this specific solution
55
- # experiencedUsers - Experienced users: Regular users needing reference/advanced topics
56
- # emergencyTroubleshooting - Emergency/troubleshooting: Something's broken, need to fix it quickly
57
- # exploringEvaluating - Exploring/evaluating: Trying to understand if this fits their needs
58
- readerKnowledgeLevel: completeBeginners
59
-
60
- # Documentation Depth: How comprehensive should the documentation be?
61
- # Available options (uncomment and modify as needed):
62
- # essentialOnly - Essential only: Cover the 80% use cases, keep it concise
63
- # balancedCoverage - Balanced coverage: Good depth with practical examples [RECOMMENDED]
64
- # comprehensive - Comprehensive: Cover all features, edge cases, and advanced scenarios
65
- # aiDecide - Let AI decide: Analyze code complexity and suggest appropriate depth
66
- documentationDepth: comprehensive
67
-
68
- # Custom Rules: Define specific documentation generation rules and requirements
69
- rules: |
70
- Avoid using vague or empty words that don't provide measurable or specific details, such as 'intelligently', 'seamlessly', 'comprehensive', or 'high-quality'. Focus on concrete, verifiable facts and information.
71
- Focus on concrete, verifiable facts and information.
72
- Must cover all subcommands of DocSmith
73
-
74
- # Target Audience: Describe your specific target audience and their characteristics
75
- targetAudience: |
76
-
77
- locale: en
78
- translateLanguages:
79
- - zh
80
- - zh-TW
81
- - ja
82
- docsDir: ./docs # Directory to save generated documentation
83
- sourcesPath: # Source code paths to analyze
84
- - ./README.md
85
- - ./CHANGELOG.md
86
- - ./aigne.yaml
87
- - ./agents
88
- - ./media.md
89
- - ./.aigne/doc-smith/config.yaml
90
- ```
16
+ ## Understanding the `config.yaml` File
17
+
18
+ The `config.yaml` file serves as the primary source of truth for your documentation project. It is generated during the initial setup process and contains all the core directives that the AI uses to analyze your source code and generate content. A correctly configured file ensures that the output is tailored to your intended audience, purpose, and style.
19
+
20
+ Below is a breakdown of the key parameters you will find in the `config.yaml` file.
21
+
22
+ ### Core Configuration Parameters
23
+
24
+ <x-field-group>
25
+ <x-field data-name="projectName" data-type="string" data-required="true">
26
+ <x-field-desc markdown>The official name of your project. This will be used in titles and other metadata throughout the documentation.</x-field-desc>
27
+ </x-field>
28
+ <x-field data-name="projectDesc" data-type="string" data-required="true">
29
+ <x-field-desc markdown>A concise, one-sentence description of your project's purpose and functionality.</x-field-desc>
30
+ </x-field>
31
+ <x-field data-name="projectLogo" data-type="string" data-required="false">
32
+ <x-field-desc markdown>A URL pointing to your project's logo image. This will be used for branding the published documentation site.</x-field-desc>
33
+ </x-field>
34
+ <x-field data-name="documentPurpose" data-type="array" data-required="true">
35
+ <x-field-desc markdown>Defines the primary goals of the documentation. Examples include `getStarted` for onboarding guides or `completeTasks` for procedural instructions.</x-field-desc>
36
+ </x-field>
37
+ <x-field data-name="targetAudienceTypes" data-type="array" data-required="true">
38
+ <x-field-desc markdown>Specifies the intended readers. Examples include `endUsers` for non-technical individuals or `developers` for engineers.</x-field-desc>
39
+ </x-field>
40
+ <x-field data-name="readerKnowledgeLevel" data-type="string" data-required="true">
41
+ <x-field-desc markdown>Describes the assumed technical knowledge and background of the target audience, such as `completeBeginners`.</x-field-desc>
42
+ </x-field>
43
+ <x-field data-name="documentationDepth" data-type="string" data-required="true">
44
+ <x-field-desc markdown>Controls the level of detail in the generated content. Options range from `essentialOnly` to `comprehensive`.</x-field-desc>
45
+ </x-field>
46
+ <x-field data-name="rules" data-type="string" data-required="false">
47
+ <x-field-desc markdown>A set of custom instructions, guidelines, or constraints for the AI to follow during the content generation process.</x-field-desc>
48
+ </x-field>
49
+ <x-field data-name="locale" data-type="string" data-required="true">
50
+ <x-field-desc markdown>The primary language code for the documentation, such as `en` for English.</x-field-desc>
51
+ </x-field>
52
+ <x-field data-name="translateLanguages" data-type="array" data-required="false">
53
+ <x-field-desc markdown>A list of language codes into which the primary documentation should be translated, for example, `zh` (Chinese) or `ja` (Japanese).</x-field-desc>
54
+ </x-field>
55
+ <x-field data-name="docsDir" data-type="string" data-required="true">
56
+ <x-field-desc markdown>The local directory path where the generated documentation files will be saved.</x-field-desc>
57
+ </x-field>
58
+ <x-field data-name="sourcesPath" data-type="array" data-required="true">
59
+ <x-field-desc markdown>A list of source files, directories, or glob patterns that the tool should analyze to generate documentation.</x-field-desc>
60
+ </x-field>
61
+ </x-field-group>
91
62
 
92
63
  ## Summary
93
64
 
94
- With your configuration in place, the tool will have a clear understanding of your project, audience, and documentation goals, resulting in more accurate and relevant content.
65
+ A well-defined configuration is essential for producing accurate, relevant, and effective documentation. By completing the initial setup and understanding the `config.yaml` file, you establish a solid foundation for all documentation tasks.
95
66
 
96
- To begin setting up your project, proceed to the [Initial Setup](./configuration-initial-setup.md) guide.
67
+ To proceed with configuring your project, please refer to the following guides:
68
+ * **[Initial Setup](./configuration-initial-setup.md)**: Create your project's `config.yaml` file.
69
+ * **[Managing Preferences](./configuration-managing-preferences.md)**: Customize the tool's behavior with personal rules.