@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.
- package/.aigne/doc-smith/config.yaml +1 -1
- package/.aigne/doc-smith/media-description.yaml +91 -0
- package/.aigne/doc-smith/upload-cache.yaml +6 -69
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +12 -0
- package/agents/clear/choose-contents.mjs +14 -1
- package/agents/clear/clear-media-description.mjs +129 -0
- package/agents/clear/index.yaml +3 -1
- package/agents/evaluate/code-snippet.mjs +28 -24
- package/agents/evaluate/document-structure.yaml +0 -4
- package/agents/evaluate/document.yaml +1 -5
- package/agents/generate/index.yaml +1 -0
- package/agents/init/index.mjs +10 -0
- package/agents/media/batch-generate-media-description.yaml +44 -0
- package/agents/media/generate-media-description.yaml +47 -0
- package/agents/media/load-media-description.mjs +238 -0
- package/agents/update/index.yaml +1 -0
- package/agents/utils/load-sources.mjs +103 -53
- package/aigne.yaml +6 -0
- package/assets/report-template/report.html +34 -34
- package/docs/configuration-initial-setup.md +74 -55
- package/docs/configuration.ja.md +59 -86
- package/docs/configuration.md +59 -86
- package/docs/configuration.zh-TW.md +59 -86
- package/docs/configuration.zh.md +59 -86
- package/docs/getting-started.ja.md +43 -24
- package/docs/getting-started.md +29 -10
- package/docs/getting-started.zh-TW.md +42 -23
- package/docs/getting-started.zh.md +39 -20
- package/docs/guides-cleaning-up.md +19 -18
- package/docs/guides-evaluating-documents.md +70 -29
- package/docs/guides-generating-documentation.md +59 -121
- package/docs/guides-interactive-chat.md +34 -26
- package/docs/guides-managing-history.md +18 -13
- package/docs/guides-publishing-your-docs.md +40 -35
- package/docs/guides-translating-documentation.md +39 -34
- package/docs/guides-updating-documentation.md +11 -9
- package/docs/overview.md +2 -2
- package/docs/release-notes.md +60 -27
- package/package.json +2 -1
- package/prompts/evaluate/document-structure.md +6 -7
- package/prompts/evaluate/document.md +16 -25
- package/prompts/media/media-description/system-prompt.md +35 -0
- package/prompts/media/media-description/user-prompt.md +8 -0
- package/utils/constants/index.mjs +0 -107
- package/utils/file-utils.mjs +41 -0
- package/media.md +0 -19
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
# Initial Setup
|
|
2
2
|
|
|
3
|
-
This
|
|
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
|
-
##
|
|
5
|
+
## How to Start the Setup Process
|
|
6
6
|
|
|
7
|
-
To
|
|
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
|
|
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
|
|
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
|
-
|
|
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/
|
|
23
|
+
**Prompt:** `📝 [1/10]: What should your documentation help readers achieve?`
|
|
24
24
|
|
|
25
|
-
You can select
|
|
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
|
|
34
|
+
| `mixedPurpose` | Mix of above | Cover multiple needs. |
|
|
35
35
|
|
|
36
36
|
### Step 2: Identify Target Audience
|
|
37
37
|
|
|
38
|
-
Next, specify
|
|
38
|
+
Next, specify the primary readers of your documentation. This helps to adjust the language and technical depth appropriately.
|
|
39
39
|
|
|
40
|
-
**Prompt:** `👥 [2/
|
|
40
|
+
**Prompt:** `👥 [2/10]: Who will be reading your documentation?`
|
|
41
41
|
|
|
42
|
-
You
|
|
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:
|
|
53
|
+
### Step 3: Specify Reader Knowledge Level
|
|
54
54
|
|
|
55
|
-
This
|
|
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:** `🧠 [
|
|
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
|
|
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:** `📊 [
|
|
73
|
+
**Prompt:** `📊 [4/10]: How detailed should your documentation be?`
|
|
82
74
|
|
|
83
|
-
Select one of the following levels
|
|
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
|
|
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:** `🌐 [
|
|
88
|
+
**Prompt:** `🌐 [5/10]: What's your main documentation language?`
|
|
97
89
|
|
|
98
|
-
You
|
|
90
|
+
You can select from a list of 12 supported languages, including English, Chinese (Simplified), and Spanish.
|
|
99
91
|
|
|
100
|
-
### Step
|
|
92
|
+
### Step 6: Choose Translation Languages
|
|
101
93
|
|
|
102
|
-
Select any additional languages you want the documentation to be translated
|
|
94
|
+
Select any additional languages into which you want the documentation to be translated.
|
|
103
95
|
|
|
104
|
-
**Prompt:** `🔄 [
|
|
96
|
+
**Prompt:** `🔄 [6/10]: Which languages should we translate to?`
|
|
105
97
|
|
|
106
|
-
You can choose multiple languages from the
|
|
98
|
+
You can choose multiple languages from the supported options, excluding the primary language selected in the previous step.
|
|
107
99
|
|
|
108
|
-
### Step
|
|
100
|
+
### Step 7: Define Documentation Directory
|
|
109
101
|
|
|
110
|
-
Specify the folder where the generated documentation files
|
|
102
|
+
Specify the folder where the generated documentation files will be saved.
|
|
111
103
|
|
|
112
|
-
**Prompt:** `📁 [
|
|
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
|
|
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
|
|
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:**
|
|
120
|
+
**Prompt:** `📋 [9/10]: Any custom rules or requirements for your documentation? (Optional, press Enter to skip)`
|
|
121
121
|
|
|
122
|
-
You
|
|
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
|
-
|
|
124
|
+
### Step 10: Configure Media Settings
|
|
125
125
|
|
|
126
|
-
|
|
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
|
-
|
|
128
|
+
**Prompt:** `🖼️ [10/10]: Minimum image width (in pixels) to include in documentation:`
|
|
129
129
|
|
|
130
|
-
|
|
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:
|
|
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
|
-
#
|
|
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
|
+

|
|
176
195
|
|
|
177
|
-
With your initial configuration
|
|
196
|
+
With your initial configuration saved, you are now prepared to create your documentation.
|
|
178
197
|
|
|
179
|
-
*
|
|
198
|
+
* To proceed, consult the [Generating Documentation](./guides-generating-documentation.md) guide for instructions on running the generation process.
|
package/docs/configuration.ja.md
CHANGED
|
@@ -1,96 +1,69 @@
|
|
|
1
1
|
# 設定
|
|
2
2
|
|
|
3
|
-
|
|
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"
|
|
9
|
-
|
|
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
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
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
|
-
|
|
67
|
+
プロジェクトの設定を進めるには、以下のガイドを参照してください:
|
|
68
|
+
* **[初期設定](./configuration-initial-setup.md)**:プロジェクトの `config.yaml` ファイルを作成します。
|
|
69
|
+
* **[設定の管理](./configuration-managing-preferences.md)**:個人のルールでツールの動作をカスタマイズします。
|
package/docs/configuration.md
CHANGED
|
@@ -1,96 +1,69 @@
|
|
|
1
1
|
# Configuration
|
|
2
2
|
|
|
3
|
-
Proper configuration is
|
|
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
|
|
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">
|
|
9
|
-
|
|
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
|
-
##
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
Below is
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
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
|
-
|
|
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
|
|
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.
|