@aigne/doc-smith 0.8.12-beta.3 → 0.8.12-beta.5
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 +9 -6
- package/.aigne/doc-smith/output/structure-plan.json +123 -109
- package/.aigne/doc-smith/upload-cache.yaml +48 -0
- package/.github/workflows/publish-docs.yml +4 -7
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +20 -0
- package/agents/clear/choose-contents.mjs +22 -5
- package/agents/clear/clear-auth-tokens.mjs +2 -4
- package/agents/clear/clear-deployment-config.mjs +49 -0
- package/agents/clear/clear-document-config.mjs +2 -5
- package/agents/clear/clear-document-structure.mjs +2 -6
- package/agents/clear/clear-generated-docs.mjs +0 -1
- package/agents/generate/check-need-generate-structure.mjs +15 -60
- package/agents/generate/document-structure-tools/generate-sub-structure.mjs +131 -0
- package/agents/generate/generate-structure-without-tools.yaml +65 -0
- package/agents/generate/generate-structure.yaml +7 -1
- package/agents/generate/index.yaml +0 -3
- package/agents/generate/update-document-structure.yaml +3 -0
- package/agents/generate/user-review-document-structure.mjs +7 -5
- package/agents/init/index.mjs +15 -15
- package/agents/publish/publish-docs.mjs +130 -111
- package/agents/translate/index.yaml +1 -1
- package/agents/update/batch-generate-document.yaml +1 -1
- package/agents/update/batch-update-document.yaml +1 -1
- package/agents/update/check-document.mjs +4 -19
- package/agents/update/user-review-document.mjs +4 -3
- package/agents/utils/load-sources.mjs +54 -151
- package/agents/utils/transform-detail-datasources.mjs +14 -18
- package/aigne.yaml +2 -0
- package/biome.json +1 -1
- package/docs/_sidebar.md +13 -15
- package/docs/configuration-initial-setup.ja.md +179 -0
- package/docs/configuration-initial-setup.md +179 -0
- package/docs/configuration-initial-setup.zh-TW.md +179 -0
- package/docs/configuration-initial-setup.zh.md +179 -0
- package/docs/configuration-managing-preferences.ja.md +100 -0
- package/docs/configuration-managing-preferences.md +100 -0
- package/docs/configuration-managing-preferences.zh-TW.md +100 -0
- package/docs/configuration-managing-preferences.zh.md +100 -0
- package/docs/configuration.ja.md +68 -184
- package/docs/configuration.md +62 -178
- package/docs/configuration.zh-TW.md +70 -186
- package/docs/configuration.zh.md +67 -183
- package/docs/getting-started.ja.md +46 -78
- package/docs/getting-started.md +46 -78
- package/docs/getting-started.zh-TW.md +47 -79
- package/docs/getting-started.zh.md +47 -79
- package/docs/guides-cleaning-up.ja.md +50 -0
- package/docs/guides-cleaning-up.md +50 -0
- package/docs/guides-cleaning-up.zh-TW.md +50 -0
- package/docs/guides-cleaning-up.zh.md +50 -0
- package/docs/guides-evaluating-documents.ja.md +66 -0
- package/docs/guides-evaluating-documents.md +66 -0
- package/docs/guides-evaluating-documents.zh-TW.md +66 -0
- package/docs/guides-evaluating-documents.zh.md +66 -0
- package/docs/guides-generating-documentation.ja.md +149 -0
- package/docs/guides-generating-documentation.md +149 -0
- package/docs/guides-generating-documentation.zh-TW.md +149 -0
- package/docs/guides-generating-documentation.zh.md +149 -0
- package/docs/guides-interactive-chat.ja.md +85 -0
- package/docs/guides-interactive-chat.md +85 -0
- package/docs/guides-interactive-chat.zh-TW.md +85 -0
- package/docs/guides-interactive-chat.zh.md +85 -0
- package/docs/guides-managing-history.ja.md +51 -0
- package/docs/guides-managing-history.md +51 -0
- package/docs/guides-managing-history.zh-TW.md +51 -0
- package/docs/guides-managing-history.zh.md +51 -0
- package/docs/guides-publishing-your-docs.ja.md +78 -0
- package/docs/guides-publishing-your-docs.md +78 -0
- package/docs/guides-publishing-your-docs.zh-TW.md +78 -0
- package/docs/guides-publishing-your-docs.zh.md +78 -0
- package/docs/guides-translating-documentation.ja.md +95 -0
- package/docs/guides-translating-documentation.md +95 -0
- package/docs/guides-translating-documentation.zh-TW.md +95 -0
- package/docs/guides-translating-documentation.zh.md +95 -0
- package/docs/guides-updating-documentation.ja.md +77 -0
- package/docs/guides-updating-documentation.md +77 -0
- package/docs/guides-updating-documentation.zh-TW.md +77 -0
- package/docs/guides-updating-documentation.zh.md +77 -0
- package/docs/guides.ja.md +32 -0
- package/docs/guides.md +32 -0
- package/docs/guides.zh-TW.md +32 -0
- package/docs/guides.zh.md +32 -0
- package/docs/overview.ja.md +39 -60
- package/docs/overview.md +39 -60
- package/docs/overview.zh-TW.md +39 -60
- package/docs/overview.zh.md +39 -60
- package/docs/release-notes.ja.md +255 -0
- package/docs/release-notes.md +255 -0
- package/docs/release-notes.zh-TW.md +255 -0
- package/docs/release-notes.zh.md +255 -0
- package/package.json +4 -2
- package/prompts/common/document/content-rules-core.md +1 -0
- package/prompts/common/document-structure/document-structure-rules.md +8 -9
- package/prompts/common/document-structure/output-constraints.md +1 -1
- package/prompts/structure/document-rules.md +8 -2
- package/prompts/structure/generate/system-prompt.md +27 -2
- package/prompts/structure/generate/user-prompt.md +18 -0
- package/prompts/structure/update/system-prompt.md +12 -0
- package/prompts/structure/update/user-prompt.md +3 -0
- package/tests/agents/clear/choose-contents.test.mjs +8 -4
- package/tests/agents/generate/check-need-generate-structure.test.mjs +53 -63
- package/tests/agents/generate/document-structure-tools/generate-sub-structure.test.mjs +277 -0
- package/tests/agents/init/init.test.mjs +18 -18
- package/tests/agents/publish/publish-docs.test.mjs +79 -0
- package/tests/agents/update/check-document.test.mjs +7 -67
- package/tests/agents/utils/load-sources.test.mjs +90 -90
- package/tests/agents/utils/transform-detail-datasources.test.mjs +153 -196
- package/tests/utils/file-utils.test.mjs +309 -1
- package/utils/auth-utils.mjs +9 -3
- package/utils/constants/index.mjs +3 -1
- package/utils/file-utils.mjs +315 -0
- package/utils/utils.mjs +89 -50
- package/docs/advanced-how-it-works.ja.md +0 -101
- package/docs/advanced-how-it-works.md +0 -101
- package/docs/advanced-how-it-works.zh-TW.md +0 -101
- package/docs/advanced-how-it-works.zh.md +0 -101
- package/docs/advanced-quality-assurance.ja.md +0 -92
- package/docs/advanced-quality-assurance.md +0 -92
- package/docs/advanced-quality-assurance.zh-TW.md +0 -92
- package/docs/advanced-quality-assurance.zh.md +0 -92
- package/docs/advanced.ja.md +0 -20
- package/docs/advanced.md +0 -20
- package/docs/advanced.zh-TW.md +0 -20
- package/docs/advanced.zh.md +0 -20
- package/docs/changelog.ja.md +0 -486
- package/docs/changelog.md +0 -486
- package/docs/changelog.zh-TW.md +0 -486
- package/docs/changelog.zh.md +0 -486
- package/docs/cli-reference.ja.md +0 -311
- package/docs/cli-reference.md +0 -311
- package/docs/cli-reference.zh-TW.md +0 -311
- package/docs/cli-reference.zh.md +0 -311
- package/docs/configuration-interactive-setup.ja.md +0 -138
- package/docs/configuration-interactive-setup.md +0 -138
- package/docs/configuration-interactive-setup.zh-TW.md +0 -138
- package/docs/configuration-interactive-setup.zh.md +0 -138
- package/docs/configuration-language-support.ja.md +0 -64
- package/docs/configuration-language-support.md +0 -64
- package/docs/configuration-language-support.zh-TW.md +0 -64
- package/docs/configuration-language-support.zh.md +0 -64
- package/docs/configuration-llm-setup.ja.md +0 -56
- package/docs/configuration-llm-setup.md +0 -56
- package/docs/configuration-llm-setup.zh-TW.md +0 -56
- package/docs/configuration-llm-setup.zh.md +0 -56
- package/docs/configuration-preferences.ja.md +0 -144
- package/docs/configuration-preferences.md +0 -144
- package/docs/configuration-preferences.zh-TW.md +0 -144
- package/docs/configuration-preferences.zh.md +0 -144
- package/docs/features-generate-documentation.ja.md +0 -95
- package/docs/features-generate-documentation.md +0 -95
- package/docs/features-generate-documentation.zh-TW.md +0 -95
- package/docs/features-generate-documentation.zh.md +0 -95
- package/docs/features-publish-your-docs.ja.md +0 -130
- package/docs/features-publish-your-docs.md +0 -130
- package/docs/features-publish-your-docs.zh-TW.md +0 -130
- package/docs/features-publish-your-docs.zh.md +0 -130
- package/docs/features-translate-documentation.ja.md +0 -90
- package/docs/features-translate-documentation.md +0 -90
- package/docs/features-translate-documentation.zh-TW.md +0 -90
- package/docs/features-translate-documentation.zh.md +0 -90
- package/docs/features-update-and-refine.ja.md +0 -142
- package/docs/features-update-and-refine.md +0 -142
- package/docs/features-update-and-refine.zh-TW.md +0 -143
- package/docs/features-update-and-refine.zh.md +0 -142
- package/docs/features.ja.md +0 -62
- package/docs/features.md +0 -62
- package/docs/features.zh-TW.md +0 -62
- package/docs/features.zh.md +0 -62
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
# インタラクティブなセットアップ
|
|
2
|
-
|
|
3
|
-
AIGNE DocSmithには、`aigne doc init`コマンドで起動するインタラクティブなセットアップウィザードが含まれており、プロジェクトの設定を効率化します。このガイド付きプロセスでは、ドキュメントの目標に関する一連の質問が行われ、回答に基づいて`config.yaml`ファイルが生成されます。設定エラーを防ぎ、入力に基づいて具体的な推奨事項を提供するため、新しいドキュメントプロジェクトを開始する際に推奨される方法です。
|
|
4
|
-
|
|
5
|
-
## ウィザードの実行
|
|
6
|
-
|
|
7
|
-
プロセスを開始するには、プロジェクトのルートディレクトリで次のコマンドを実行します。
|
|
8
|
-
|
|
9
|
-
```bash aigne doc init icon=lucide:sparkles
|
|
10
|
-
npx aigne doc init
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
ウィザードが8つのステップでドキュメントの設定を案内します。
|
|
14
|
-
|
|
15
|
-
## ガイド付きプロセス
|
|
16
|
-
|
|
17
|
-
ウィザードでは、以下の主要な設定項目についてプロンプトが表示されます。
|
|
18
|
-
|
|
19
|
-
1. **プライマリゴール**: 読者の主な目的を定義します(例:利用開始、回答の検索)。
|
|
20
|
-
2. **ターゲットオーディエンス**: ドキュメントの主な読者を指定します(例:非技術系のエンドユーザー、開発者)。
|
|
21
|
-
3. **読者の知識レベル**: 読者の一般的な初期知識を評価します。
|
|
22
|
-
4. **ドキュメントの深さ**: コンテンツの詳細レベルと範囲を決定します。
|
|
23
|
-
5. **プライマリ言語**: ドキュメントの主要言語を設定します。
|
|
24
|
-
6. **翻訳言語**: 翻訳用の追加言語を選択します。
|
|
25
|
-
7. **出力ディレクトリ**: 生成されたドキュメントファイルの場所を指定します。
|
|
26
|
-
8. **ソースコードパス**: globパターンをサポートし、分析するファイルとディレクトリを定義します。
|
|
27
|
-
|
|
28
|
-
## アシスト付き設定
|
|
29
|
-
|
|
30
|
-
ウィザードは、一貫性のある効果的な設定を作成するために、事前定義された一連のルールを使用します。
|
|
31
|
-
|
|
32
|
-
```d2
|
|
33
|
-
direction: down
|
|
34
|
-
|
|
35
|
-
User-Selections: {
|
|
36
|
-
label: "1. ユーザーが入力\n(目的、オーディエンスなど)"
|
|
37
|
-
shape: rectangle
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
Wizard-Engine: {
|
|
41
|
-
label: "2. ウィザードのルールエンジン"
|
|
42
|
-
shape: rectangle
|
|
43
|
-
grid-columns: 2
|
|
44
|
-
|
|
45
|
-
Filtering: {
|
|
46
|
-
label: "オプションフィルタリング\n(互換性のない選択を防止)"
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
Conflict-Detection: {
|
|
50
|
-
label: "競合検出\n(複雑なニーズを特定)"
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
Guided-Experience: {
|
|
55
|
-
label: "3. ガイド付きエクスペリエンス"
|
|
56
|
-
shape: rectangle
|
|
57
|
-
content: "ユーザーには簡素化された関連オプションが表示される"
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
Final-Config: {
|
|
61
|
-
label: "4. 最終設定"
|
|
62
|
-
content: "config.yamlが競合解決戦略とともに生成される"
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
User-Selections -> Wizard-Engine
|
|
66
|
-
Wizard-Engine.Filtering -> Guided-Experience
|
|
67
|
-
Wizard-Engine.Conflict-Detection -> Final-Config
|
|
68
|
-
Guided-Experience -> User-Selections: "絞り込み"
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
### オプションフィルタリング
|
|
72
|
-
|
|
73
|
-
選択を行うと、ウィザードは後続のオプションをフィルタリングして、論理的な設定に導きます。これは、互換性のない選択を防ぐための一連の質問間競合ルールに基づいています。
|
|
74
|
-
|
|
75
|
-
たとえば、ターゲットオーディエンスとして「エンドユーザー(非技術者)」を選択した場合、ウィザードは知識レベルの選択肢である「専門家である」を非表示にします。このルールの理由は、「非技術系のユーザーは通常、経験豊富な技術ユーザーではない」ということであり、非論理的な選択を防ぎます。
|
|
76
|
-
|
|
77
|
-
### 競合の検出と解決
|
|
78
|
-
|
|
79
|
-
場合によっては、非技術系の**エンドユーザー**と専門家の**開発者**の両方向けにドキュメントを作成するなど、効果的なドキュメント構造を必要とする複数の目標やオーディエンスが存在することがあります。ウィザードはこれらを「解決可能な競合」として識別します。
|
|
80
|
-
|
|
81
|
-
そして、これらのニーズにドキュメント構造内で対応するための戦略を策定します。エンドユーザー対開発者の例では、解決戦略として別々のユーザーパスを作成します。
|
|
82
|
-
|
|
83
|
-
- **ユーザーガイドパス**: 平易な言葉を使用し、UIの操作に焦点を当て、ビジネス成果を志向します。
|
|
84
|
-
- **開発者ガイドパス**: コード中心で技術的に正確であり、SDKの例や設定スニペットを含みます。
|
|
85
|
-
|
|
86
|
-
このアプローチにより、最終的なドキュメントは、単一の混乱したコンテンツの混合物を作成するのではなく、複数のオーディエンスに効果的に対応できるように構成されます。
|
|
87
|
-
|
|
88
|
-
## 生成される出力
|
|
89
|
-
|
|
90
|
-
ウィザードを完了すると、プロジェクトに`config.yaml`ファイルが保存されます。このファイルは完全にコメント化されており、各オプションの説明と利用可能なすべての選択肢がリストされているため、後で手動で確認したり変更したりするのが簡単です。
|
|
91
|
-
|
|
92
|
-
以下は生成されたファイルのスニペットです。
|
|
93
|
-
|
|
94
|
-
```yaml config.yaml icon=logos:yaml
|
|
95
|
-
# ドキュメント公開用のプロジェクト情報
|
|
96
|
-
projectName: your-project-name
|
|
97
|
-
projectDesc: Your project description.
|
|
98
|
-
projectLogo: ""
|
|
99
|
-
|
|
100
|
-
# =============================================================================
|
|
101
|
-
# Documentation Configuration
|
|
102
|
-
# =============================================================================
|
|
103
|
-
|
|
104
|
-
# Purpose: What's the main outcome you want readers to achieve?
|
|
105
|
-
# Available options (uncomment and modify as needed):
|
|
106
|
-
# getStarted - すぐに始める: 新規ユーザーが30分未満でゼロから作業を開始できるように支援
|
|
107
|
-
# completeTasks - 特定のタスクを完了する: 一般的なワークフローやユースケースをユーザーに案内
|
|
108
|
-
documentPurpose:
|
|
109
|
-
- completeTasks
|
|
110
|
-
- findAnswers
|
|
111
|
-
|
|
112
|
-
# Target Audience: Who will be reading this most often?
|
|
113
|
-
# Available options (uncomment and modify as needed):
|
|
114
|
-
# endUsers - エンドユーザー (非技術者): 製品を使用するがコーディングはしない人々
|
|
115
|
-
# developers - 開発者 (製品/APIを統合): これを自分のプロジェクトに追加するエンジニア
|
|
116
|
-
targetAudienceTypes:
|
|
117
|
-
- endUsers
|
|
118
|
-
- developers
|
|
119
|
-
|
|
120
|
-
# ... その他の設定
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
完了すると、ターミナルに確認メッセージが表示されます。
|
|
124
|
-
|
|
125
|
-

|
|
126
|
-
|
|
127
|
-
## 次のステップ
|
|
128
|
-
|
|
129
|
-
設定ファイルが準備できたので、ドキュメントを生成、翻訳、または公開する準備が整いました。
|
|
130
|
-
|
|
131
|
-
<x-cards>
|
|
132
|
-
<x-card data-title="ドキュメントの生成" data-icon="lucide:play-circle" data-href="/features/generate-documentation">
|
|
133
|
-
単一のコマンドを使用してソースコードから完全なドキュメントセットを自動的に作成する方法を学びます。
|
|
134
|
-
</x-card>
|
|
135
|
-
<x-card data-title="設定ガイド" data-icon="lucide:settings" data-href="/configuration">
|
|
136
|
-
利用可能なすべての設定を深く掘り下げ、config.yamlファイルを手動で微調整する方法を学びます。
|
|
137
|
-
</x-card>
|
|
138
|
-
</x-cards>
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
# Interactive Setup
|
|
2
|
-
|
|
3
|
-
AIGNE DocSmith includes an interactive setup wizard, launched with the `aigne doc init` command, to streamline project configuration. This guided process asks a series of questions about your documentation goals and generates a `config.yaml` file based on your answers. It is the recommended method for starting a new documentation project, as it helps prevent configuration errors and provides specific recommendations based on your inputs.
|
|
4
|
-
|
|
5
|
-
## Running the Wizard
|
|
6
|
-
|
|
7
|
-
To start the process, run the following command in the root directory of your project:
|
|
8
|
-
|
|
9
|
-
```bash aigne doc init icon=lucide:sparkles
|
|
10
|
-
npx aigne doc init
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
The wizard will then walk you through an 8-step process to configure your documentation.
|
|
14
|
-
|
|
15
|
-
## The Guided Process
|
|
16
|
-
|
|
17
|
-
The wizard prompts for the following key configuration details:
|
|
18
|
-
|
|
19
|
-
1. **Primary Goal**: Defines the main purpose for your readers (e.g., getting started, finding answers).
|
|
20
|
-
2. **Target Audience**: Specifies the primary readers of the documentation (e.g., non-technical end-users, developers).
|
|
21
|
-
3. **Reader Knowledge Level**: Assesses the typical starting knowledge of your audience.
|
|
22
|
-
4. **Documentation Depth**: Determines the level of detail and scope of the content.
|
|
23
|
-
5. **Primary Language**: Sets the main language for the documentation.
|
|
24
|
-
6. **Translation Languages**: Selects additional languages for translation.
|
|
25
|
-
7. **Output Directory**: Specifies the location for the generated documentation files.
|
|
26
|
-
8. **Source Code Paths**: Defines which files and directories to analyze, with support for glob patterns.
|
|
27
|
-
|
|
28
|
-
## Assisted Configuration
|
|
29
|
-
|
|
30
|
-
The wizard uses a set of predefined rules to help you create a coherent and effective configuration.
|
|
31
|
-
|
|
32
|
-
```d2
|
|
33
|
-
direction: down
|
|
34
|
-
|
|
35
|
-
User-Selections: {
|
|
36
|
-
label: "1. User provides input\n(Purpose, Audience, etc.)"
|
|
37
|
-
shape: rectangle
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
Wizard-Engine: {
|
|
41
|
-
label: "2. Wizard's Rule Engine"
|
|
42
|
-
shape: rectangle
|
|
43
|
-
grid-columns: 2
|
|
44
|
-
|
|
45
|
-
Filtering: {
|
|
46
|
-
label: "Option Filtering\n(Prevents incompatible selections)"
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
Conflict-Detection: {
|
|
50
|
-
label: "Conflict Detection\n(Identifies complex needs)"
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
Guided-Experience: {
|
|
55
|
-
label: "3. Guided Experience"
|
|
56
|
-
shape: rectangle
|
|
57
|
-
content: "User sees simplified, relevant options"
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
Final-Config: {
|
|
61
|
-
label: "4. Final Configuration"
|
|
62
|
-
content: "config.yaml is generated with\nconflict resolution strategies"
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
User-Selections -> Wizard-Engine
|
|
66
|
-
Wizard-Engine.Filtering -> Guided-Experience
|
|
67
|
-
Wizard-Engine.Conflict-Detection -> Final-Config
|
|
68
|
-
Guided-Experience -> User-Selections: "Refines"
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
### Option Filtering
|
|
72
|
-
|
|
73
|
-
As you make selections, the wizard filters subsequent options to guide you toward a logical configuration. This is based on a set of cross-question conflict rules that prevent incompatible choices.
|
|
74
|
-
|
|
75
|
-
For example, if you select "End users (non-technical)" as your target audience, the wizard will hide the "Is an expert" knowledge level option. The rule's reasoning is that "Non-technical users are typically not experienced technical users," thus preventing an illogical selection.
|
|
76
|
-
|
|
77
|
-
### Conflict Detection and Resolution
|
|
78
|
-
|
|
79
|
-
In some cases, you may have multiple goals or audiences that require a specific documentation structure to be effective, such as creating documentation for both non-technical **End Users** and expert **Developers**. The wizard identifies these as "resolvable conflicts."
|
|
80
|
-
|
|
81
|
-
It then formulates a strategy to address these needs within the documentation structure. For the End User vs. Developer example, the resolution strategy is to create separate user paths:
|
|
82
|
-
|
|
83
|
-
- **User Guide Path**: Uses plain language, focuses on UI interactions, and is oriented toward business outcomes.
|
|
84
|
-
- **Developer Guide Path**: Is code-first, technically precise, and includes SDK examples and configuration snippets.
|
|
85
|
-
|
|
86
|
-
This approach ensures the final documentation is structured to serve multiple audiences effectively, rather than creating a single, confusing mix of content.
|
|
87
|
-
|
|
88
|
-
## Generated Output
|
|
89
|
-
|
|
90
|
-
After you complete the wizard, it saves a `config.yaml` file in your project. This file is fully commented, explaining each option and listing all available choices, which makes it easy to review and modify manually later.
|
|
91
|
-
|
|
92
|
-
Here is a snippet of a generated file:
|
|
93
|
-
|
|
94
|
-
```yaml config.yaml icon=logos:yaml
|
|
95
|
-
# Project information for documentation publishing
|
|
96
|
-
projectName: your-project-name
|
|
97
|
-
projectDesc: Your project description.
|
|
98
|
-
projectLogo: ""
|
|
99
|
-
|
|
100
|
-
# =============================================================================
|
|
101
|
-
# Documentation Configuration
|
|
102
|
-
# =============================================================================
|
|
103
|
-
|
|
104
|
-
# Purpose: What's the main outcome you want readers to achieve?
|
|
105
|
-
# Available options (uncomment and modify as needed):
|
|
106
|
-
# getStarted - Get started quickly: Help new users go from zero to working in <30 minutes
|
|
107
|
-
# completeTasks - Complete specific tasks: Guide users through common workflows and use cases
|
|
108
|
-
documentPurpose:
|
|
109
|
-
- completeTasks
|
|
110
|
-
- findAnswers
|
|
111
|
-
|
|
112
|
-
# Target Audience: Who will be reading this most often?
|
|
113
|
-
# Available options (uncomment and modify as needed):
|
|
114
|
-
# endUsers - End users (non-technical): People who use the product but don't code
|
|
115
|
-
# developers - Developers integrating your product/API: Engineers adding this to their projects
|
|
116
|
-
targetAudienceTypes:
|
|
117
|
-
- endUsers
|
|
118
|
-
- developers
|
|
119
|
-
|
|
120
|
-
# ... other settings
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
Upon completion, you will see a confirmation message in your terminal.
|
|
124
|
-
|
|
125
|
-

|
|
126
|
-
|
|
127
|
-
## Next Steps
|
|
128
|
-
|
|
129
|
-
With your configuration file in place, you are ready to generate, translate, or publish your documentation.
|
|
130
|
-
|
|
131
|
-
<x-cards>
|
|
132
|
-
<x-card data-title="Generate Documentation" data-icon="lucide:play-circle" data-href="/features/generate-documentation">
|
|
133
|
-
Learn how to use a single command to automatically create a complete set of documentation from your source code.
|
|
134
|
-
</x-card>
|
|
135
|
-
<x-card data-title="Configuration Guide" data-icon="lucide:settings" data-href="/configuration">
|
|
136
|
-
Dive deeper into all available settings and learn how to fine-tune the config.yaml file manually.
|
|
137
|
-
</x-card>
|
|
138
|
-
</x-cards>
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
# 互動式設定
|
|
2
|
-
|
|
3
|
-
AIGNE DocSmith 包含一個互動式設定精靈,可透過 `aigne doc init` 指令啟動,用以簡化專案設定。此引導式流程會詢問一系列關於您文件目標的問題,並根據您的回答產生一個 `config.yaml` 檔案。這是開始新文件專案的建議方法,因為它有助於防止設定錯誤,並根據您的輸入提供具體建議。
|
|
4
|
-
|
|
5
|
-
## 執行精靈
|
|
6
|
-
|
|
7
|
-
若要開始此流程,請在您專案的根目錄中執行以下指令:
|
|
8
|
-
|
|
9
|
-
```bash aigne doc init icon=lucide:sparkles
|
|
10
|
-
npx aigne doc init
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
接著,此精靈將引導您完成一個 8 步驟的流程來設定您的文件。
|
|
14
|
-
|
|
15
|
-
## 引導式流程
|
|
16
|
-
|
|
17
|
-
此精靈會提示您輸入以下關鍵設定細節:
|
|
18
|
-
|
|
19
|
-
1. **主要目標**:定義讀者的主要目的(例如:快速入門、尋找答案)。
|
|
20
|
-
2. **目標受眾**:指明文件的主要讀者(例如:非技術背景的終端使用者、開發人員)。
|
|
21
|
-
3. **讀者知識水平**:評估您受眾的典型起始知識水平。
|
|
22
|
-
4. **文件深度**:決定內容的詳細程度和範圍。
|
|
23
|
-
5. **主要語言**:設定文件的主要語言。
|
|
24
|
-
6. **翻譯語言**:選擇額外的翻譯語言。
|
|
25
|
-
7. **輸出目錄**:指定產生文件檔案的位置。
|
|
26
|
-
8. **原始碼路徑**:定義要分析的檔案和目錄,支援 glob 模式。
|
|
27
|
-
|
|
28
|
-
## 輔助設定
|
|
29
|
-
|
|
30
|
-
此精靈使用一組預定義的規則來幫助您建立一個一致且有效的設定。
|
|
31
|
-
|
|
32
|
-
```d2
|
|
33
|
-
direction: down
|
|
34
|
-
|
|
35
|
-
User-Selections: {
|
|
36
|
-
label: "1. 使用者提供輸入\n(目的、受眾等)"
|
|
37
|
-
shape: rectangle
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
Wizard-Engine: {
|
|
41
|
-
label: "2. 精靈的規則引擎"
|
|
42
|
-
shape: rectangle
|
|
43
|
-
grid-columns: 2
|
|
44
|
-
|
|
45
|
-
Filtering: {
|
|
46
|
-
label: "選項篩選\n(防止不相容的選擇)"
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
Conflict-Detection: {
|
|
50
|
-
label: "衝突偵測\n(識別複雜需求)"
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
Guided-Experience: {
|
|
55
|
-
label: "3. 引導式體驗"
|
|
56
|
-
shape: rectangle
|
|
57
|
-
content: "使用者看到簡化、相關的選項"
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
Final-Config: {
|
|
61
|
-
label: "4. 最終設定"
|
|
62
|
-
content: "config.yaml 根據\n衝突解決策略產生"
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
User-Selections -> Wizard-Engine
|
|
66
|
-
Wizard-Engine.Filtering -> Guided-Experience
|
|
67
|
-
Wizard-Engine.Conflict-Detection -> Final-Config
|
|
68
|
-
Guided-Experience -> User-Selections: "優化"
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
### 選項篩選
|
|
72
|
-
|
|
73
|
-
當您進行選擇時,精靈會篩選後續選項,引導您達成一個合乎邏輯的設定。這是基於一組跨問題的衝突規則,用以防止不相容的選擇。
|
|
74
|
-
|
|
75
|
-
例如,如果您選擇「終端使用者(非技術背景)」作為您的目標受眾,精靈將會隱藏「是專家」這個知識水平選項。該規則的理由是「非技術背景的使用者通常不是經驗豐富的技術使用者」,從而防止不合邏輯的選擇。
|
|
76
|
-
|
|
77
|
-
### 衝突偵測與解決
|
|
78
|
-
|
|
79
|
-
在某些情況下,您可能有多個目標或受眾,需要特定的文件結構才能有效,例如為非技術背景的**終端使用者**和專業的**開發人員**建立文件。精靈將這些情況識別為「可解決的衝突」。
|
|
80
|
-
|
|
81
|
-
然後,它會制定一個策略,在文件結構內解決這些需求。以終端使用者與開發人員的例子來說,解決策略是建立獨立的使用者路徑:
|
|
82
|
-
|
|
83
|
-
- **使用者指南路徑**:使用淺顯的語言,專注於使用者介面互動,並以業務成果為導向。
|
|
84
|
-
- **開發人員指南路徑**:以程式碼優先,技術上精確,並包含 SDK 範例和設定片段。
|
|
85
|
-
|
|
86
|
-
這種方法確保最終的文件結構能有效地服務多個受眾,而不是創造一個單一、混亂的內容組合。
|
|
87
|
-
|
|
88
|
-
## 產生的輸出
|
|
89
|
-
|
|
90
|
-
完成精靈後,它會在您的專案中儲存一個 `config.yaml` 檔案。這個檔案有完整的註解,解釋了每個選項並列出了所有可用選擇,使其易於日後手動檢視和修改。
|
|
91
|
-
|
|
92
|
-
以下是產生的檔案片段:
|
|
93
|
-
|
|
94
|
-
```yaml config.yaml icon=logos:yaml
|
|
95
|
-
# 用於文件發布的專案資訊
|
|
96
|
-
projectName: your-project-name
|
|
97
|
-
projectDesc: Your project description.
|
|
98
|
-
projectLogo: ""
|
|
99
|
-
|
|
100
|
-
# =============================================================================
|
|
101
|
-
# 文件設定
|
|
102
|
-
# =============================================================================
|
|
103
|
-
|
|
104
|
-
# 目的:您希望讀者達成的最主要成果是什麼?
|
|
105
|
-
# 可用選項(取消註解並視需要修改):
|
|
106
|
-
# getStarted - 快速入門:幫助新使用者在 30 分鐘內從零到上手
|
|
107
|
-
# completeTasks - 完成特定任務:引導使用者完成常見的工作流程和使用案例
|
|
108
|
-
documentPurpose:
|
|
109
|
-
- completeTasks
|
|
110
|
-
- findAnswers
|
|
111
|
-
|
|
112
|
-
# 目標受眾:誰會最常閱讀這份文件?
|
|
113
|
-
# 可用選項(取消註解並視需要修改):
|
|
114
|
-
# endUsers - 終端使用者(非技術背景):使用產品但不寫程式的人
|
|
115
|
-
# developers - 開發人員整合您的產品/API:將此加入其專案的工程師
|
|
116
|
-
targetAudienceTypes:
|
|
117
|
-
- endUsers
|
|
118
|
-
- developers
|
|
119
|
-
|
|
120
|
-
# ... 其他設定
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
完成後,您將在終端機中看到一條確認訊息。
|
|
124
|
-
|
|
125
|
-

|
|
126
|
-
|
|
127
|
-
## 後續步驟
|
|
128
|
-
|
|
129
|
-
設定檔案就緒後,您就可以產生、翻譯或發布您的文件了。
|
|
130
|
-
|
|
131
|
-
<x-cards>
|
|
132
|
-
<x-card data-title="產生文件" data-icon="lucide:play-circle" data-href="/features/generate-documentation">
|
|
133
|
-
了解如何使用單一指令從您的原始碼自動建立一套完整的文件。
|
|
134
|
-
</x-card>
|
|
135
|
-
<x-card data-title="設定指南" data-icon="lucide:settings" data-href="/configuration">
|
|
136
|
-
深入了解所有可用設定,並學習如何手動微調 config.yaml 檔案。
|
|
137
|
-
</x-card>
|
|
138
|
-
</x-cards>
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
# 交互式设置
|
|
2
|
-
|
|
3
|
-
AIGNE DocSmith 包含一个交互式设置向导,通过 `aigne doc init` 命令启动,用于简化项目配置。这个引导式过程会询问一系列关于您文档目标的问题,并根据您的回答生成一个 `config.yaml` 文件。这是启动新文档项目的推荐方法,因为它有助于防止配置错误,并根据您的输入提供具体建议。
|
|
4
|
-
|
|
5
|
-
## 运行向导
|
|
6
|
-
|
|
7
|
-
要开始此过程,请在您的项目根目录中运行以下命令:
|
|
8
|
-
|
|
9
|
-
```bash aigne doc init icon=lucide:sparkles
|
|
10
|
-
npx aigne doc init
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
然后,向导将引导您完成一个 8 步流程来配置您的文档。
|
|
14
|
-
|
|
15
|
-
## 引导式流程
|
|
16
|
-
|
|
17
|
-
向导会提示您输入以下关键配置详情:
|
|
18
|
-
|
|
19
|
-
1. **主要目标**:定义读者的主要目的(例如,快速入门、寻找答案)。
|
|
20
|
-
2. **目标受众**:明确文档的主要读者(例如,非技术最终用户、开发者)。
|
|
21
|
-
3. **读者知识水平**:评估受众的典型初始知识水平。
|
|
22
|
-
4. **文档深度**:确定内容的详细程度和范围。
|
|
23
|
-
5. **主要语言**:设置文档的主要语言。
|
|
24
|
-
6. **翻译语言**:选择用于翻译的其他语言。
|
|
25
|
-
7. **输出目录**:指定生成文档文件的位置。
|
|
26
|
-
8. **源代码路径**:定义要分析的文件和目录,支持 glob 模式。
|
|
27
|
-
|
|
28
|
-
## 辅助配置
|
|
29
|
-
|
|
30
|
-
向导使用一套预定义规则来帮助您创建连贯有效的配置。
|
|
31
|
-
|
|
32
|
-
```d2
|
|
33
|
-
direction: down
|
|
34
|
-
|
|
35
|
-
User-Selections: {
|
|
36
|
-
label: "1. 用户提供输入\n(目的、受众等)"
|
|
37
|
-
shape: rectangle
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
Wizard-Engine: {
|
|
41
|
-
label: "2. 向导的规则引擎"
|
|
42
|
-
shape: rectangle
|
|
43
|
-
grid-columns: 2
|
|
44
|
-
|
|
45
|
-
Filtering: {
|
|
46
|
-
label: "选项过滤\n(防止不兼容的选择)"
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
Conflict-Detection: {
|
|
50
|
-
label: "冲突检测\n(识别复杂需求)"
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
Guided-Experience: {
|
|
55
|
-
label: "3. 引导式体验"
|
|
56
|
-
shape: rectangle
|
|
57
|
-
content: "用户看到简化、相关的选项"
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
Final-Config: {
|
|
61
|
-
label: "4. 最终配置"
|
|
62
|
-
content: "config.yaml 生成时\n包含冲突解决策略"
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
User-Selections -> Wizard-Engine
|
|
66
|
-
Wizard-Engine.Filtering -> Guided-Experience
|
|
67
|
-
Wizard-Engine.Conflict-Detection -> Final-Config
|
|
68
|
-
Guided-Experience -> User-Selections: "优化"
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
### 选项过滤
|
|
72
|
-
|
|
73
|
-
在您做出选择时,向导会过滤后续选项,以引导您进行逻辑配置。这是基于一套跨问题冲突规则,可防止不兼容的选择。
|
|
74
|
-
|
|
75
|
-
例如,如果您选择“最终用户(非技术)”作为目标受众,向导将隐藏“是专家”这一知识水平选项。该规则的理由是“非技术用户通常不是经验丰富的技术用户”,从而防止不合逻辑的选择。
|
|
76
|
-
|
|
77
|
-
### 冲突检测与解决
|
|
78
|
-
|
|
79
|
-
在某些情况下,您可能有多个目标或受众,需要特定的文档结构才能有效,例如为非技术的**最终用户**和专业的**开发者**创建文档。向导将这些情况识别为“可解决的冲突”。
|
|
80
|
-
|
|
81
|
-
然后,它会制定一个策略,在文档结构中满足这些需求。对于最终用户与开发者的例子,解决方法是创建独立的用户路径:
|
|
82
|
-
|
|
83
|
-
- **用户指南路径**:使用通俗易懂的语言,侧重于 UI 交互,并以业务成果为导向。
|
|
84
|
-
- **开发者指南路径**:代码优先,技术上精确,并包含 SDK 示例和配置片段。
|
|
85
|
-
|
|
86
|
-
这种方法确保最终的文档结构能够有效地服务于多个受众,而不是创建一个单一、混乱的内容混合体。
|
|
87
|
-
|
|
88
|
-
## 生成的输出
|
|
89
|
-
|
|
90
|
-
完成向导后,它会在您的项目中保存一个 `config.yaml` 文件。该文件有完整的注释,解释了每个选项并列出了所有可用选项,便于以后手动审查和修改。
|
|
91
|
-
|
|
92
|
-
以下是生成文件的片段:
|
|
93
|
-
|
|
94
|
-
```yaml config.yaml icon=logos:yaml
|
|
95
|
-
# 用于文档发布的项目信息
|
|
96
|
-
projectName: your-project-name
|
|
97
|
-
projectDesc: Your project description.
|
|
98
|
-
projectLogo: ""
|
|
99
|
-
|
|
100
|
-
# =============================================================================
|
|
101
|
-
# 文档配置
|
|
102
|
-
# =============================================================================
|
|
103
|
-
|
|
104
|
-
# 目的:您希望读者达成的最主要成果是什么?
|
|
105
|
-
# 可用选项(根据需要取消注释并修改):
|
|
106
|
-
# getStarted - 快速入门:帮助新用户在 30 分钟内从零开始上手
|
|
107
|
-
# completeTasks - 完成特定任务:引导用户完成常见工作流程和用例
|
|
108
|
-
documentPurpose:
|
|
109
|
-
- completeTasks
|
|
110
|
-
- findAnswers
|
|
111
|
-
|
|
112
|
-
# 目标受众:谁会最常阅读这份文档?
|
|
113
|
-
# 可用选项(根据需要取消注释并修改):
|
|
114
|
-
# endUsers - 最终用户(非技术):使用产品但不编写代码的人
|
|
115
|
-
# developers - 集成您的产品/API 的开发者:将此产品添加到其项目中的工程师
|
|
116
|
-
targetAudienceTypes:
|
|
117
|
-
- endUsers
|
|
118
|
-
- developers
|
|
119
|
-
|
|
120
|
-
# ... 其他设置
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
完成后,您将在终端中看到一条确认消息。
|
|
124
|
-
|
|
125
|
-

|
|
126
|
-
|
|
127
|
-
## 后续步骤
|
|
128
|
-
|
|
129
|
-
配置文件就绪后,您就可以生成、翻译或发布您的文档了。
|
|
130
|
-
|
|
131
|
-
<x-cards>
|
|
132
|
-
<x-card data-title="生成文档" data-icon="lucide:play-circle" data-href="/features/generate-documentation">
|
|
133
|
-
了解如何使用单个命令从源代码自动创建一套完整的文档。
|
|
134
|
-
</x-card>
|
|
135
|
-
<x-card data-title="配置指南" data-icon="lucide:settings" data-href="/configuration">
|
|
136
|
-
深入了解所有可用设置,并学习如何手动微调 config.yaml 文件。
|
|
137
|
-
</x-card>
|
|
138
|
-
</x-cards>
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
# 言語サポート
|
|
2
|
-
|
|
3
|
-
AIGNE DocSmithは、12言語へのドキュメントの自動翻訳を提供し、グローバルな読者向けのローカライズされたコンテンツの生成と維持を可能にします。この機能は主に `aigne doc translate` コマンドを通じて管理されます。
|
|
4
|
-
|
|
5
|
-
翻訳ワークフローは、AIエンジンを使用してソースドキュメントを処理し、選択したターゲット言語でバージョンを生成します。`aigne doc translate` コマンドは、翻訳するドキュメントと言語を選択するためのインタラクティブなインターフェースを提供します。
|
|
6
|
-
|
|
7
|
-

|
|
8
|
-
|
|
9
|
-
## サポートされている言語
|
|
10
|
-
|
|
11
|
-
DocSmithは、以下の言語に対するAIによる翻訳をサポートしています。プロジェクトの主要言語は `aigne doc init` による初期設定時に定義でき、以下の言語からいくつでも翻訳対象として選択できます。
|
|
12
|
-
|
|
13
|
-
| Language | Language Code |
|
|
14
|
-
|---|---|
|
|
15
|
-
| English | `en` |
|
|
16
|
-
| 简体中文 | `zh` |
|
|
17
|
-
| 繁體中文 | `zh-TW` |
|
|
18
|
-
| 日本語 | `ja` |
|
|
19
|
-
| 한국어 | `ko` |
|
|
20
|
-
| Español | `es` |
|
|
21
|
-
| Français | `fr` |
|
|
22
|
-
| Deutsch | `de` |
|
|
23
|
-
| Português | `pt` |
|
|
24
|
-
| Русский | `ru` |
|
|
25
|
-
| Italiano | `it` |
|
|
26
|
-
| العربية | `ar` |
|
|
27
|
-
|
|
28
|
-
## 翻訳の設定と使用方法
|
|
29
|
-
|
|
30
|
-
言語設定は、プロジェクトを初期化する際に設定します。`aigne doc translate` コマンドを使用して、いつでも新しい言語を追加したり、既存のドキュメントを翻訳したりできます。このコマンドは2つの操作モードをサポートしています。
|
|
31
|
-
|
|
32
|
-
### ガイド付き翻訳のためのインタラクティブモード
|
|
33
|
-
|
|
34
|
-
ステップバイステップのガイド付きプロセスについては、引数なしでコマンドを実行してください。この方法はほとんどのユーザーに推奨されます。
|
|
35
|
-
|
|
36
|
-
```bash Interactive Translation icon=lucide:wand
|
|
37
|
-
aigne doc translate
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
インタラクティブモードでは、一連のプロンプトが表示され、翻訳するドキュメントを選択し、リストからターゲット言語を選ぶことができます。このモードでは、プロジェクトの設定にまだ含まれていない新しい翻訳言語を追加することもできます。
|
|
41
|
-
|
|
42
|
-

|
|
43
|
-
|
|
44
|
-
### 自動化のためのコマンドライン引数
|
|
45
|
-
|
|
46
|
-
直接制御したり、自動化スクリプトで使用したりする場合は、ドキュメントと言語をコマンドライン引数として指定できます。この方法は、CI/CDパイプラインへの統合に適しています。
|
|
47
|
-
|
|
48
|
-
```bash Command Example icon=lucide:terminal
|
|
49
|
-
# overview.mdとexamples.mdを中国語と日本語に翻訳する
|
|
50
|
-
aigne doc translate --langs zh --langs ja --docs overview.md --docs examples.md
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
以下の表は、`translate` コマンドの主要なパラメータを詳述しています。
|
|
54
|
-
|
|
55
|
-
| Parameter | Description |
|
|
56
|
-
|---|---|
|
|
57
|
-
| `--langs` | ターゲット言語の言語コードを指定します。このフラグを複数回使用して、複数の言語を選択できます。 |
|
|
58
|
-
| `--docs` | 翻訳するドキュメントへのパス(例:`overview.md`)を指定します。このフラグも複数回使用できます。 |
|
|
59
|
-
| `--feedback` | 翻訳モデルをガイドするための特定の指示を提供します(例:`"Use a formal tone"`)。 |
|
|
60
|
-
| `--glossary` | カスタム用語集ファイル(例:`@path/to/glossary.md`)を使用して、プロジェクト固有の用語の一貫した翻訳を保証します。 |
|
|
61
|
-
|
|
62
|
-
---
|
|
63
|
-
|
|
64
|
-
このセクションでは、利用可能な言語とその有効化方法の概要を説明しました。翻訳ワークフローに関する完全なガイドについては、[ドキュメントの翻訳](./features-translate-documentation.md)ガイドを参照してください。
|