@aigne/doc-smith 0.8.12-beta.7 → 0.8.12-beta.9
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/CHANGELOG.md +25 -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/publish/index.yaml +4 -0
- package/agents/publish/publish-docs.mjs +77 -5
- package/agents/publish/translate-meta.mjs +103 -0
- package/agents/update/generate-document.yaml +30 -28
- package/agents/update/index.yaml +1 -0
- package/agents/update/update-document-detail.yaml +3 -1
- package/agents/utils/load-sources.mjs +103 -53
- package/agents/utils/update-branding.mjs +69 -0
- package/aigne.yaml +6 -0
- package/assets/report-template/report.html +34 -34
- package/package.json +17 -2
- package/prompts/common/document/role-and-personality.md +3 -1
- package/prompts/detail/d2-diagram/guide.md +7 -1
- package/prompts/detail/d2-diagram/user-prompt.md +3 -0
- package/prompts/detail/generate/system-prompt.md +6 -7
- package/prompts/detail/generate/user-prompt.md +12 -3
- package/prompts/detail/update/user-prompt.md +0 -2
- 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/prompts/structure/update/user-prompt.md +0 -4
- package/utils/constants/index.mjs +0 -107
- package/utils/file-utils.mjs +86 -0
- package/utils/markdown-checker.mjs +0 -20
- package/utils/request.mjs +7 -0
- package/utils/upload-files.mjs +231 -0
- package/utils/utils.mjs +11 -1
- package/.aigne/doc-smith/config.yaml +0 -77
- package/.aigne/doc-smith/history.yaml +0 -37
- package/.aigne/doc-smith/output/structure-plan.json +0 -162
- package/.aigne/doc-smith/preferences.yml +0 -97
- package/.aigne/doc-smith/upload-cache.yaml +0 -1893
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -28
- package/.github/workflows/ci.yml +0 -54
- package/.github/workflows/create-release-pr.yaml +0 -21
- package/.github/workflows/publish-docs.yml +0 -65
- package/.github/workflows/release.yml +0 -49
- package/.github/workflows/reviewer.yml +0 -54
- package/.release-please-manifest.json +0 -3
- package/RELEASE.md +0 -9
- package/assets/screenshots/doc-complete-setup.png +0 -0
- package/assets/screenshots/doc-generate-docs.png +0 -0
- package/assets/screenshots/doc-generate.png +0 -0
- package/assets/screenshots/doc-generated-successfully.png +0 -0
- package/assets/screenshots/doc-publish.png +0 -0
- package/assets/screenshots/doc-regenerate.png +0 -0
- package/assets/screenshots/doc-translate-langs.png +0 -0
- package/assets/screenshots/doc-translate.png +0 -0
- package/assets/screenshots/doc-update.png +0 -0
- package/biome.json +0 -73
- package/codecov.yml +0 -15
- package/docs/_sidebar.md +0 -15
- package/docs/configuration-initial-setup.ja.md +0 -179
- package/docs/configuration-initial-setup.md +0 -179
- package/docs/configuration-initial-setup.zh-TW.md +0 -179
- package/docs/configuration-initial-setup.zh.md +0 -179
- package/docs/configuration-managing-preferences.ja.md +0 -100
- package/docs/configuration-managing-preferences.md +0 -100
- package/docs/configuration-managing-preferences.zh-TW.md +0 -100
- package/docs/configuration-managing-preferences.zh.md +0 -100
- package/docs/configuration.ja.md +0 -96
- package/docs/configuration.md +0 -96
- package/docs/configuration.zh-TW.md +0 -96
- package/docs/configuration.zh.md +0 -96
- package/docs/getting-started.ja.md +0 -88
- package/docs/getting-started.md +0 -88
- package/docs/getting-started.zh-TW.md +0 -88
- package/docs/getting-started.zh.md +0 -88
- package/docs/guides-cleaning-up.ja.md +0 -51
- package/docs/guides-cleaning-up.md +0 -51
- package/docs/guides-cleaning-up.zh-TW.md +0 -51
- package/docs/guides-cleaning-up.zh.md +0 -51
- package/docs/guides-evaluating-documents.ja.md +0 -66
- package/docs/guides-evaluating-documents.md +0 -66
- package/docs/guides-evaluating-documents.zh-TW.md +0 -66
- package/docs/guides-evaluating-documents.zh.md +0 -66
- package/docs/guides-generating-documentation.ja.md +0 -151
- package/docs/guides-generating-documentation.md +0 -151
- package/docs/guides-generating-documentation.zh-TW.md +0 -151
- package/docs/guides-generating-documentation.zh.md +0 -151
- package/docs/guides-interactive-chat.ja.md +0 -85
- package/docs/guides-interactive-chat.md +0 -85
- package/docs/guides-interactive-chat.zh-TW.md +0 -85
- package/docs/guides-interactive-chat.zh.md +0 -85
- package/docs/guides-managing-history.ja.md +0 -48
- package/docs/guides-managing-history.md +0 -48
- package/docs/guides-managing-history.zh-TW.md +0 -48
- package/docs/guides-managing-history.zh.md +0 -48
- package/docs/guides-publishing-your-docs.ja.md +0 -78
- package/docs/guides-publishing-your-docs.md +0 -78
- package/docs/guides-publishing-your-docs.zh-TW.md +0 -78
- package/docs/guides-publishing-your-docs.zh.md +0 -78
- package/docs/guides-translating-documentation.ja.md +0 -95
- package/docs/guides-translating-documentation.md +0 -95
- package/docs/guides-translating-documentation.zh-TW.md +0 -95
- package/docs/guides-translating-documentation.zh.md +0 -95
- package/docs/guides-updating-documentation.ja.md +0 -77
- package/docs/guides-updating-documentation.md +0 -77
- package/docs/guides-updating-documentation.zh-TW.md +0 -77
- package/docs/guides-updating-documentation.zh.md +0 -77
- package/docs/guides.ja.md +0 -32
- package/docs/guides.md +0 -32
- package/docs/guides.zh-TW.md +0 -32
- package/docs/guides.zh.md +0 -32
- package/docs/overview.ja.md +0 -61
- package/docs/overview.md +0 -61
- package/docs/overview.zh-TW.md +0 -61
- package/docs/overview.zh.md +0 -61
- package/docs/release-notes.ja.md +0 -255
- package/docs/release-notes.md +0 -255
- package/docs/release-notes.zh-TW.md +0 -255
- package/docs/release-notes.zh.md +0 -255
- package/media.md +0 -19
- package/prompts/common/afs/afs-tools-usage.md +0 -5
- package/prompts/common/afs/use-afs-instruction.md +0 -1
- package/release-please-config.json +0 -14
- package/tests/agents/chat/chat.test.mjs +0 -46
- package/tests/agents/clear/choose-contents.test.mjs +0 -284
- package/tests/agents/clear/clear-auth-tokens.test.mjs +0 -268
- package/tests/agents/clear/clear-document-config.test.mjs +0 -167
- package/tests/agents/clear/clear-document-structure.test.mjs +0 -380
- package/tests/agents/clear/clear-generated-docs.test.mjs +0 -222
- package/tests/agents/evaluate/code-snippet.test.mjs +0 -163
- package/tests/agents/evaluate/fixtures/api-services.md +0 -87
- package/tests/agents/evaluate/fixtures/js-sdk.md +0 -94
- package/tests/agents/evaluate/generate-report.test.mjs +0 -312
- package/tests/agents/generate/check-document-structure.test.mjs +0 -45
- package/tests/agents/generate/check-need-generate-structure.test.mjs +0 -279
- package/tests/agents/generate/document-structure-tools/add-document.test.mjs +0 -449
- package/tests/agents/generate/document-structure-tools/delete-document.test.mjs +0 -410
- package/tests/agents/generate/document-structure-tools/generate-sub-structure.test.mjs +0 -277
- package/tests/agents/generate/document-structure-tools/move-document.test.mjs +0 -476
- package/tests/agents/generate/document-structure-tools/update-document.test.mjs +0 -548
- package/tests/agents/generate/generate-structure.test.mjs +0 -45
- package/tests/agents/generate/user-review-document-structure.test.mjs +0 -319
- package/tests/agents/history/view.test.mjs +0 -97
- package/tests/agents/init/init.test.mjs +0 -1657
- package/tests/agents/prefs/prefs.test.mjs +0 -431
- package/tests/agents/publish/publish-docs.test.mjs +0 -787
- package/tests/agents/translate/choose-language.test.mjs +0 -311
- package/tests/agents/translate/translate-document.test.mjs +0 -51
- package/tests/agents/update/check-document.test.mjs +0 -463
- package/tests/agents/update/check-update-is-single.test.mjs +0 -300
- package/tests/agents/update/document-tools/update-document-content.test.mjs +0 -329
- package/tests/agents/update/generate-document.test.mjs +0 -51
- package/tests/agents/update/save-and-translate-document.test.mjs +0 -369
- package/tests/agents/update/user-review-document.test.mjs +0 -582
- package/tests/agents/utils/action-success.test.mjs +0 -54
- package/tests/agents/utils/check-detail-result.test.mjs +0 -743
- package/tests/agents/utils/check-feedback-refiner.test.mjs +0 -478
- package/tests/agents/utils/choose-docs.test.mjs +0 -406
- package/tests/agents/utils/exit.test.mjs +0 -70
- package/tests/agents/utils/feedback-refiner.test.mjs +0 -51
- package/tests/agents/utils/find-item-by-path.test.mjs +0 -517
- package/tests/agents/utils/find-user-preferences-by-path.test.mjs +0 -382
- package/tests/agents/utils/format-document-structure.test.mjs +0 -364
- package/tests/agents/utils/fs.test.mjs +0 -267
- package/tests/agents/utils/load-sources.test.mjs +0 -1470
- package/tests/agents/utils/save-docs.test.mjs +0 -109
- package/tests/agents/utils/save-output.test.mjs +0 -315
- package/tests/agents/utils/save-single-doc.test.mjs +0 -364
- package/tests/agents/utils/transform-detail-datasources.test.mjs +0 -320
- package/tests/utils/auth-utils.test.mjs +0 -596
- package/tests/utils/blocklet.test.mjs +0 -336
- package/tests/utils/conflict-detector.test.mjs +0 -355
- package/tests/utils/constants.test.mjs +0 -295
- package/tests/utils/d2-utils.test.mjs +0 -437
- package/tests/utils/deploy.test.mjs +0 -399
- package/tests/utils/docs-finder-utils.test.mjs +0 -650
- package/tests/utils/file-utils.test.mjs +0 -521
- package/tests/utils/history-utils.test.mjs +0 -206
- package/tests/utils/kroki-utils.test.mjs +0 -646
- package/tests/utils/linter/fixtures/css/keyword-error.css +0 -1
- package/tests/utils/linter/fixtures/css/missing-semicolon.css +0 -1
- package/tests/utils/linter/fixtures/css/syntax-error.css +0 -1
- package/tests/utils/linter/fixtures/css/undeclare-variable.css +0 -1
- package/tests/utils/linter/fixtures/css/unused-variable.css +0 -2
- package/tests/utils/linter/fixtures/css/valid-code.css +0 -1
- package/tests/utils/linter/fixtures/dockerfile/keyword-error.dockerfile +0 -1
- package/tests/utils/linter/fixtures/dockerfile/missing-semicolon.dockerfile +0 -2
- package/tests/utils/linter/fixtures/dockerfile/syntax-error.dockerfile +0 -2
- package/tests/utils/linter/fixtures/dockerfile/undeclare-variable.dockerfile +0 -1
- package/tests/utils/linter/fixtures/dockerfile/unused-variable.dockerfile +0 -1
- package/tests/utils/linter/fixtures/dockerfile/valid-code.dockerfile +0 -2
- package/tests/utils/linter/fixtures/go/keyword-error.go +0 -5
- package/tests/utils/linter/fixtures/go/missing-semicolon.go +0 -5
- package/tests/utils/linter/fixtures/go/syntax-error.go +0 -6
- package/tests/utils/linter/fixtures/go/undeclare-variable.go +0 -5
- package/tests/utils/linter/fixtures/go/unused-variable.go +0 -5
- package/tests/utils/linter/fixtures/go/valid-code.go +0 -7
- package/tests/utils/linter/fixtures/js/keyword-error.js +0 -3
- package/tests/utils/linter/fixtures/js/missing-semicolon.js +0 -6
- package/tests/utils/linter/fixtures/js/syntax-error.js +0 -4
- package/tests/utils/linter/fixtures/js/undeclare-variable.js +0 -3
- package/tests/utils/linter/fixtures/js/unused-variable.js +0 -7
- package/tests/utils/linter/fixtures/js/valid-code.js +0 -15
- package/tests/utils/linter/fixtures/json/keyword-error.json +0 -1
- package/tests/utils/linter/fixtures/json/missing-semicolon.json +0 -1
- package/tests/utils/linter/fixtures/json/syntax-error.json +0 -1
- package/tests/utils/linter/fixtures/json/undeclare-variable.json +0 -1
- package/tests/utils/linter/fixtures/json/unused-variable.json +0 -1
- package/tests/utils/linter/fixtures/json/valid-code.json +0 -1
- package/tests/utils/linter/fixtures/jsx/keyword-error.jsx +0 -5
- package/tests/utils/linter/fixtures/jsx/missing-semicolon.jsx +0 -5
- package/tests/utils/linter/fixtures/jsx/syntax-error.jsx +0 -5
- package/tests/utils/linter/fixtures/jsx/undeclare-variable.jsx +0 -5
- package/tests/utils/linter/fixtures/jsx/unused-variable.jsx +0 -4
- package/tests/utils/linter/fixtures/jsx/valid-code.jsx +0 -5
- package/tests/utils/linter/fixtures/python/keyword-error.py +0 -3
- package/tests/utils/linter/fixtures/python/missing-semicolon.py +0 -2
- package/tests/utils/linter/fixtures/python/syntax-error.py +0 -3
- package/tests/utils/linter/fixtures/python/undeclare-variable.py +0 -3
- package/tests/utils/linter/fixtures/python/unused-variable.py +0 -6
- package/tests/utils/linter/fixtures/python/valid-code.py +0 -12
- package/tests/utils/linter/fixtures/ruby/keyword-error.rb +0 -2
- package/tests/utils/linter/fixtures/ruby/missing-semicolon.rb +0 -1
- package/tests/utils/linter/fixtures/ruby/syntax-error.rb +0 -2
- package/tests/utils/linter/fixtures/ruby/undeclare-variable.rb +0 -1
- package/tests/utils/linter/fixtures/ruby/unused-variable.rb +0 -2
- package/tests/utils/linter/fixtures/ruby/valid-code.rb +0 -1
- package/tests/utils/linter/fixtures/sass/keyword-error.sass +0 -2
- package/tests/utils/linter/fixtures/sass/missing-semicolon.sass +0 -3
- package/tests/utils/linter/fixtures/sass/syntax-error.sass +0 -3
- package/tests/utils/linter/fixtures/sass/undeclare-variable.sass +0 -2
- package/tests/utils/linter/fixtures/sass/unused-variable.sass +0 -4
- package/tests/utils/linter/fixtures/sass/valid-code.sass +0 -2
- package/tests/utils/linter/fixtures/scss/keyword-error.scss +0 -1
- package/tests/utils/linter/fixtures/scss/missing-semicolon.scss +0 -1
- package/tests/utils/linter/fixtures/scss/syntax-error.scss +0 -1
- package/tests/utils/linter/fixtures/scss/undeclare-variable.scss +0 -1
- package/tests/utils/linter/fixtures/scss/unused-variable.scss +0 -2
- package/tests/utils/linter/fixtures/scss/valid-code.scss +0 -1
- package/tests/utils/linter/fixtures/shell/keyword-error.sh +0 -5
- package/tests/utils/linter/fixtures/shell/missing-semicolon.sh +0 -3
- package/tests/utils/linter/fixtures/shell/syntax-error.sh +0 -4
- package/tests/utils/linter/fixtures/shell/undeclare-variable.sh +0 -3
- package/tests/utils/linter/fixtures/shell/unused-variable.sh +0 -4
- package/tests/utils/linter/fixtures/shell/valid-code.sh +0 -3
- package/tests/utils/linter/fixtures/ts/keyword-error.ts +0 -1
- package/tests/utils/linter/fixtures/ts/missing-semicolon.ts +0 -1
- package/tests/utils/linter/fixtures/ts/syntax-error.ts +0 -1
- package/tests/utils/linter/fixtures/ts/undeclare-variable.ts +0 -1
- package/tests/utils/linter/fixtures/ts/unused-variable.ts +0 -3
- package/tests/utils/linter/fixtures/ts/valid-code.ts +0 -3
- package/tests/utils/linter/fixtures/tsx/keyword-error.tsx +0 -5
- package/tests/utils/linter/fixtures/tsx/missing-semicolon.tsx +0 -5
- package/tests/utils/linter/fixtures/tsx/syntax-error.tsx +0 -5
- package/tests/utils/linter/fixtures/tsx/undeclare-variable.tsx +0 -6
- package/tests/utils/linter/fixtures/tsx/unused-variable.tsx +0 -6
- package/tests/utils/linter/fixtures/tsx/valid-code.tsx +0 -5
- package/tests/utils/linter/fixtures/vue/keyword-error.vue +0 -6
- package/tests/utils/linter/fixtures/vue/missing-semicolon.vue +0 -6
- package/tests/utils/linter/fixtures/vue/syntax-error.vue +0 -6
- package/tests/utils/linter/fixtures/vue/undeclare-variable.vue +0 -6
- package/tests/utils/linter/fixtures/vue/unused-variable.vue +0 -7
- package/tests/utils/linter/fixtures/vue/valid-code.vue +0 -6
- package/tests/utils/linter/fixtures/yaml/keyword-error.yml +0 -1
- package/tests/utils/linter/fixtures/yaml/missing-semicolon.yml +0 -2
- package/tests/utils/linter/fixtures/yaml/syntax-error.yml +0 -1
- package/tests/utils/linter/fixtures/yaml/undeclare-variable.yml +0 -1
- package/tests/utils/linter/fixtures/yaml/unused-variable.yml +0 -2
- package/tests/utils/linter/fixtures/yaml/valid-code.yml +0 -3
- package/tests/utils/linter/index.test.mjs +0 -440
- package/tests/utils/linter/scan-results.mjs +0 -42
- package/tests/utils/load-config.test.mjs +0 -141
- package/tests/utils/markdown/index.test.mjs +0 -478
- package/tests/utils/mermaid-validator.test.mjs +0 -541
- package/tests/utils/mock-chat-model.mjs +0 -12
- package/tests/utils/preferences-utils.test.mjs +0 -465
- package/tests/utils/save-value-to-config.test.mjs +0 -483
- package/tests/utils/utils.test.mjs +0 -941
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
# ドキュメントの評価
|
|
2
|
-
|
|
3
|
-
`evaluate` コマンドは、生成されたドキュメントの品質と整合性を評価するための体系的なプロセスを提供します。初期設定で定義した目標に対して、ドキュメント全体の構造と個々のドキュメントの内容の両方を分析します。このプロセスにより詳細なレポートが生成され、改善点を特定し、ドキュメントが意図した目的と対象読者に効果的に役立つことを確認するのに役立ちます。
|
|
4
|
-
|
|
5
|
-
## 仕組み
|
|
6
|
-
|
|
7
|
-
評価プロセスは、主に2つの段階で動作します。まず、高レベルのドキュメント構造を評価し、次に、個々のドキュメントの内容を分析します。
|
|
8
|
-
|
|
9
|
-
1. **構造評価**: このツールは、ドキュメント全体の構成(目次など)を検査します。選択したドキュメントの目標、対象読者、および内容の深さに基づいて、構造が論理的で完全であるかどうかを検証します。
|
|
10
|
-
2. **内容評価**: 構造を分析した後、ツールは各ドキュメントの内容を検査します。読みやすさ、一貫性、正確性など、いくつかの品質次元に対してドキュメントをスコアリングします。また、コード例が正しく実装されているかもチェックします。
|
|
11
|
-
|
|
12
|
-
完了すると、ツールは結果をユーザーフレンドリーなHTMLレポートにまとめ、高レベルのスコアと詳細で実行可能なフィードバックの両方を提供します。
|
|
13
|
-
|
|
14
|
-
## 評価の実行
|
|
15
|
-
|
|
16
|
-
評価プロセスを開始するには、ターミナルで次のコマンドを実行します。
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
aignite evaluate
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
コマンドは、ドキュメントを分析する際の進捗状況を表示します。完了すると、生成されたレポートファイルの場所を示すメッセージが表示されます。
|
|
23
|
-
|
|
24
|
-
```text
|
|
25
|
-
✔ Generate evaluation report
|
|
26
|
-
Evaluation report generated successfully.
|
|
27
|
-
- JSON Report: .aigc/evaluate/20231027103000/integrity-report.json
|
|
28
|
-
- HTML Report: .aigc/evaluate/20231027103000/report.html
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
Webブラウザで `report.html` ファイルを開くと、詳細な分析を表示できます。
|
|
32
|
-
|
|
33
|
-
## レポートの理解
|
|
34
|
-
|
|
35
|
-
評価レポートは、分析プロセスの2つの段階を反映して、2つの主要なセクションに分かれています。
|
|
36
|
-
|
|
37
|
-
### 構造評価
|
|
38
|
-
|
|
39
|
-
このセクションでは、ドキュメント全体のアーキテクチャに関するフィードバックを提供します。生成されたドキュメント階層が、指定した設定とどれだけ整合しているかを測定します。
|
|
40
|
-
|
|
41
|
-
| ディメンション | 説明 |
|
|
42
|
-
| :--- | :--- |
|
|
43
|
-
| **目的カバレッジ** | ドキュメント構造が、選択した主要な目標(例:「すぐに始める」)を効果的にサポートしているかを評価します。 |
|
|
44
|
-
| **対象読者カバレッジ** | 構造が、定義した対象読者(例:「非技術系ユーザー」)に対して適切であるかを判断します。 |
|
|
45
|
-
| **深度カバレッジ** | 構造の詳細レベルが、選択した内容の深さ(例:「すべてのパラメータをカバー」)と一致しているかを確認します。 |
|
|
46
|
-
|
|
47
|
-
### ドキュメント内容の評価
|
|
48
|
-
|
|
49
|
-
このセクションでは、内容の品質をドキュメントごとに分析します。各ドキュメントは、一連の標準化された基準に基づいてスコアリングされます。
|
|
50
|
-
|
|
51
|
-
| ディメンション | 説明 |
|
|
52
|
-
| :--- | :--- |
|
|
53
|
-
| **読みやすさ** | テキストがどれだけ読みやすく、理解しやすいかを測定します。 |
|
|
54
|
-
| **整合性** | ドキュメント内の情報の論理的な流れと構成を評価します。 |
|
|
55
|
-
| **内容の品質** | 提示された情報の正確性、関連性、明確さを評価します。 |
|
|
56
|
-
| **統一性** | ドキュメント全体で用語、フォーマット、スタイルが統一されているかを確認します。 |
|
|
57
|
-
| **目的との整合性** | 内容が指定されたドキュメントの目標をどれだけ満たしているかを判断します。 |
|
|
58
|
-
| **対象読者との整合性** | 言語と例が対象読者に適しているかを評価します。 |
|
|
59
|
-
| **知識レベルとの整合性** | 内容の複雑さが、定義された読者の知識レベルと一致しているかを確認します。 |
|
|
60
|
-
| **ナビゲーション性** | ユーザーが情報を見つけるのに役立つ内部リンクや構造要素の有効性を評価します。 |
|
|
61
|
-
|
|
62
|
-
## まとめ
|
|
63
|
-
|
|
64
|
-
`evaluate` コマンドの使用は、正確で効果的なドキュメントを維持するための重要なステップです。具体的な指標と特定のフィードバックを提供し、内容を体系的に改善することができます。評価レポートを確認した後、的を絞った改善を進めることができます。
|
|
65
|
-
|
|
66
|
-
このフィードバックに基づいてドキュメントを修正する次のステップについては、[ドキュメントの更新](./guides-updating-documentation.md)のガイドを参照してください。
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
# Evaluating Documents
|
|
2
|
-
|
|
3
|
-
The `evaluate` command provides a systematic process to assess the quality and alignment of your generated documentation. It analyzes both the overall structure and the content of individual documents against the goals you defined during the initial setup. This process results in a detailed report, helping you identify areas for improvement and ensure the documentation effectively serves its intended purpose and audience.
|
|
4
|
-
|
|
5
|
-
## How It Works
|
|
6
|
-
|
|
7
|
-
The evaluation process operates in two primary stages. First, it assesses the high-level document structure, and second, it analyzes the content of each individual document.
|
|
8
|
-
|
|
9
|
-
1. **Structure Evaluation**: The tool examines your documentation's overall organization (like a table of contents). It verifies whether the structure is logical and complete based on the documentation goals, target audience, and content depth you selected.
|
|
10
|
-
2. **Content Evaluation**: After analyzing the structure, the tool inspects each document's content. It scores the document against several quality dimensions, including readability, coherence, and accuracy. It also checks for the correct implementation of code examples.
|
|
11
|
-
|
|
12
|
-
Upon completion, the tool compiles the findings into a user-friendly HTML report, providing both high-level scores and detailed, actionable feedback.
|
|
13
|
-
|
|
14
|
-
## Running the Evaluation
|
|
15
|
-
|
|
16
|
-
To initiate the evaluation process, execute the following command in your terminal:
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
aignite evaluate
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
The command will display progress as it analyzes your documentation. Once finished, it will provide a message indicating the location of the generated report files.
|
|
23
|
-
|
|
24
|
-
```text
|
|
25
|
-
✔ Generate evaluation report
|
|
26
|
-
Evaluation report generated successfully.
|
|
27
|
-
- JSON Report: .aigc/evaluate/20231027103000/integrity-report.json
|
|
28
|
-
- HTML Report: .aigc/evaluate/20231027103000/report.html
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
You can open the `report.html` file in your web browser to view the detailed analysis.
|
|
32
|
-
|
|
33
|
-
## Understanding the Report
|
|
34
|
-
|
|
35
|
-
The evaluation report is organized into two main sections, reflecting the two stages of the analysis process.
|
|
36
|
-
|
|
37
|
-
### Structure Evaluation
|
|
38
|
-
|
|
39
|
-
This section provides feedback on the overall architecture of your documentation. It measures how well the generated document hierarchy aligns with your specified configuration.
|
|
40
|
-
|
|
41
|
-
| Dimension | Description |
|
|
42
|
-
| :--- | :--- |
|
|
43
|
-
| **Purpose Coverage** | Assesses if the document structure effectively supports the primary goals you selected (e.g., "Get started quickly"). |
|
|
44
|
-
| **Audience Coverage** | Determines if the structure is appropriate for your defined target audience (e.g., "non-technical users"). |
|
|
45
|
-
| **Depth Coverage** | Checks if the level of detail in the structure matches your selected content depth (e.g., "covers all parameters"). |
|
|
46
|
-
|
|
47
|
-
### Document Content Evaluation
|
|
48
|
-
|
|
49
|
-
This section provides a document-by-document breakdown of content quality. Each document is scored based on a set of standardized criteria.
|
|
50
|
-
|
|
51
|
-
| Dimension | Description |
|
|
52
|
-
| :--- | :--- |
|
|
53
|
-
| **Readability** | Measures how easy the text is to read and comprehend. |
|
|
54
|
-
| **Coherence** | Evaluates the logical flow and organization of information within the document. |
|
|
55
|
-
| **Content Quality** | Assesses the accuracy, relevance, and clarity of the information presented. |
|
|
56
|
-
| **Consistency** | Checks for uniform terminology, formatting, and style across the document. |
|
|
57
|
-
| **Purpose Alignment** | Determines how well the content meets the specified documentation goals. |
|
|
58
|
-
| **Audience Alignment** | Assesses if the language and examples are suitable for the target audience. |
|
|
59
|
-
| **Knowledge Level Alignment** | Checks if the content complexity matches the defined reader knowledge level. |
|
|
60
|
-
| **Navigability** | Evaluates the effectiveness of internal links and structural elements that help users find information. |
|
|
61
|
-
|
|
62
|
-
## Summary
|
|
63
|
-
|
|
64
|
-
Using the `evaluate` command is a crucial step in maintaining accurate and effective documentation. It provides concrete metrics and specific feedback, allowing you to refine your content methodically. After reviewing the evaluation report, you can proceed to make targeted improvements.
|
|
65
|
-
|
|
66
|
-
For the next steps on modifying your documents based on this feedback, please see the guide on [Updating Documentation](./guides-updating-documentation.md).
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
# 評估文件
|
|
2
|
-
|
|
3
|
-
`evaluate` 指令提供了一個系統化的流程,用以評估您所產生的文件的品質與契合度。它會根據您在初始設定中定義的目標,分析整體結構以及個別文件的內容。此流程會產出一份詳細的報告,幫助您找出需要改進的地方,並確保文件能有效地服務其預期目的和讀者。
|
|
4
|
-
|
|
5
|
-
## 運作方式
|
|
6
|
-
|
|
7
|
-
評估流程主要分為兩個階段。首先,它會評估高層次的文件結構;其次,它會分析每份個別文件的內容。
|
|
8
|
-
|
|
9
|
-
1. **結構評估**:該工具會檢查您文件的整體組織(例如目錄)。它會根據您所選的文件目標、目標讀者和內容深度,驗證結構是否合乎邏輯且完整。
|
|
10
|
-
2. **內容評估**:分析完結構後,該工具會檢視每份文件的內容。它會根據多個品質維度(包括可讀性、連貫性和準確性)對文件進行評分。它還會檢查程式碼範例的實作是否正確。
|
|
11
|
-
|
|
12
|
-
完成後,該工具會將結果彙編成一份易於使用的 HTML 報告,提供高層次的分數和詳細、可行的回饋。
|
|
13
|
-
|
|
14
|
-
## 執行評估
|
|
15
|
-
|
|
16
|
-
要啟動評估流程,請在您的終端機中執行以下指令:
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
aignite evaluate
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
該指令在分析您的文件時會顯示進度。完成後,它會提供一則訊息,指出所產生的報告檔案的位置。
|
|
23
|
-
|
|
24
|
-
```text
|
|
25
|
-
✔ Generate evaluation report
|
|
26
|
-
Evaluation report generated successfully.
|
|
27
|
-
- JSON Report: .aigc/evaluate/20231027103000/integrity-report.json
|
|
28
|
-
- HTML Report: .aigc/evaluate/20231027103000/report.html
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
您可以在網頁瀏覽器中開啟 `report.html` 檔案,以查看詳細的分析。
|
|
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
|
-
| **讀者契合度** | 評估語言和範例是否適合目標讀者。 |
|
|
59
|
-
| **知識水準契合度** | 檢查內容的複雜度是否與所定義的讀者知識水準相符。 |
|
|
60
|
-
| **導覽性** | 評估內部連結和結構元素在幫助使用者尋找資訊方面的有效性。 |
|
|
61
|
-
|
|
62
|
-
## 總結
|
|
63
|
-
|
|
64
|
-
使用 `evaluate` 指令是維護準確且有效文件的關鍵步驟。它提供具體的指標和明確的回饋,讓您能有條不紊地完善您的內容。檢視評估報告後,您便可以著手進行針對性的改進。
|
|
65
|
-
|
|
66
|
-
關於根據此回饋修改文件的後續步驟,請參閱 [更新文件](./guides-updating-documentation.md) 的指南。
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
# 评估文档
|
|
2
|
-
|
|
3
|
-
`evaluate` 命令提供了一个系统化的流程,用于评估您生成的文档的质量和一致性。它会根据您在初始设置中定义的目标,分析文档的整体结构和单个文档的内容。此过程会生成一份详细的报告,帮助您识别需要改进的地方,并确保文档能够有效地服务于其预定目的和受众。
|
|
4
|
-
|
|
5
|
-
## 工作原理
|
|
6
|
-
|
|
7
|
-
评估过程分为两个主要阶段。首先,它评估高层级的文档结构;其次,它分析每个独立文档的内容。
|
|
8
|
-
|
|
9
|
-
1. **结构评估**:该工具会检查您文档的整体组织结构(例如目录)。它会根据您选择的文档目标、目标受众和内容深度,验证结构是否逻辑清晰且完整。
|
|
10
|
-
2. **内容评估**:在分析结构之后,该工具会检查每个文档的内容。它会根据可读性、连贯性和准确性等多个质量维度对文档进行评分。它还会检查代码示例的正确实现。
|
|
11
|
-
|
|
12
|
-
完成后,该工具会将结果汇编成一份用户友好的 HTML 报告,提供高层级评分和详细、可操作的反馈。
|
|
13
|
-
|
|
14
|
-
## 运行评估
|
|
15
|
-
|
|
16
|
-
要启动评估过程,请在终端中执行以下命令:
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
aignite evaluate
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
该命令在分析您的文档时会显示进度。完成后,它将提供一条消息,指明生成的报告文件的位置。
|
|
23
|
-
|
|
24
|
-
```text
|
|
25
|
-
✔ Generate evaluation report
|
|
26
|
-
Evaluation report generated successfully.
|
|
27
|
-
- JSON Report: .aigc/evaluate/20231027103000/integrity-report.json
|
|
28
|
-
- HTML Report: .aigc/evaluate/20231027103000/report.html
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
您可以在 Web 浏览器中打开 `report.html` 文件以查看详细分析。
|
|
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
|
-
| **受众对齐** | 评估语言和示例是否适合目标受众。 |
|
|
59
|
-
| **知识水平对齐** | 检查内容复杂度是否与定义的读者知识水平相匹配。 |
|
|
60
|
-
| **导航性** | 评估内部链接和结构元素在帮助用户查找信息方面的有效性。 |
|
|
61
|
-
|
|
62
|
-
## 总结
|
|
63
|
-
|
|
64
|
-
使用 `evaluate` 命令是维护准确有效文档的关键步骤。它提供具体的指标和明确的反馈,让您能够有条不紊地优化内容。在审阅评估报告后,您可以着手进行有针对性的改进。
|
|
65
|
-
|
|
66
|
-
关于根据此反馈修改文档的后续步骤,请参阅[更新文档](./guides-updating-documentation.md)指南。
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
# ドキュメントの生成
|
|
2
|
-
|
|
3
|
-
このガイドでは、プロジェクトのソースファイルから完全なドキュメント一式を作成するための体系的な手順を説明します。このプロセスは `aigne doc generate` コマンドを使用して開始します。このコマンドはコードベースを分析し、論理的な構造を提案し、各ドキュメントのコンテンツを書き込みます。
|
|
4
|
-
|
|
5
|
-
このコマンドは、ドキュメントを最初に作成するための主要なツールです。作成済みのドキュメントを修正する場合は、[ドキュメントの更新](./guides-updating-documentation.md)ガイドを参照してください。
|
|
6
|
-
|
|
7
|
-
### 生成ワークフロー
|
|
8
|
-
|
|
9
|
-
`generate` コマンドは、ドキュメントを構築するための一連の自動化されたステップを実行します。このプロセスは対話形式で設計されており、コンテンツが書き込まれる前に、提案された構造を確認・承認できます。
|
|
10
|
-
|
|
11
|
-
```d2
|
|
12
|
-
direction: down
|
|
13
|
-
|
|
14
|
-
start: {
|
|
15
|
-
label: "開始"
|
|
16
|
-
shape: oval
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
run_command: {
|
|
20
|
-
label: "'aigne doc generate' を実行"
|
|
21
|
-
shape: rectangle
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
check_config: {
|
|
25
|
-
label: "設定ファイルは存在するか?"
|
|
26
|
-
shape: diamond
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
interactive_setup: {
|
|
30
|
-
label: "対話型セットアップをガイド"
|
|
31
|
-
shape: rectangle
|
|
32
|
-
tooltip: ".aigne/doc-smith/config.yaml が見つからない場合、対話型セットアップがトリガーされます。"
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
propose_structure: {
|
|
36
|
-
label: "プロジェクトを分析し、ドキュメント構造を提案"
|
|
37
|
-
shape: rectangle
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
review_structure: {
|
|
41
|
-
label: "ユーザーが提案された構造を確認"
|
|
42
|
-
shape: rectangle
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
user_approve: {
|
|
46
|
-
label: "構造を承認するか?"
|
|
47
|
-
shape: diamond
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
provide_feedback: {
|
|
51
|
-
label: "構造を洗練させるためのフィードバックを提供"
|
|
52
|
-
shape: rectangle
|
|
53
|
-
tooltip: "ユーザーはセクションの名前変更、追加、削除などの変更を要求できます。"
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
generate_content: {
|
|
57
|
-
label: "すべてのドキュメントのコンテンツを生成"
|
|
58
|
-
shape: rectangle
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
end: {
|
|
62
|
-
label: "終了"
|
|
63
|
-
shape: oval
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
start -> run_command
|
|
67
|
-
run_command -> check_config
|
|
68
|
-
check_config -> interactive_setup: {
|
|
69
|
-
label: "いいえ"
|
|
70
|
-
}
|
|
71
|
-
interactive_setup -> propose_structure
|
|
72
|
-
check_config -> propose_structure: {
|
|
73
|
-
label: "はい"
|
|
74
|
-
}
|
|
75
|
-
propose_structure -> review_structure
|
|
76
|
-
review_structure -> user_approve
|
|
77
|
-
user_approve -> provide_feedback: {
|
|
78
|
-
label: "いいえ"
|
|
79
|
-
}
|
|
80
|
-
provide_feedback -> review_structure
|
|
81
|
-
user_approve -> generate_content: {
|
|
82
|
-
label: "はい"
|
|
83
|
-
}
|
|
84
|
-
generate_content -> end
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
## ステップバイステップのプロセス
|
|
88
|
-
|
|
89
|
-
ドキュメントを生成するには、ターミナルでプロジェクトのルートディレクトリに移動し、以下の手順に従ってください。
|
|
90
|
-
|
|
91
|
-
### 1. 生成コマンドの実行
|
|
92
|
-
|
|
93
|
-
`generate` コマンドを実行してプロセスを開始します。ツールはプロジェクトのファイルと構造の分析から始めます。
|
|
94
|
-
|
|
95
|
-
```bash 基本的な生成コマンド
|
|
96
|
-
aigne doc generate
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
簡潔にするために、エイリアスの `gen` や `g` を使用することもできます。
|
|
100
|
-
|
|
101
|
-
### 2. ドキュメント構造の確認
|
|
102
|
-
|
|
103
|
-
分析が完了すると、ツールは提案されたドキュメント構造を表示し、確認を求めます。
|
|
104
|
-
|
|
105
|
-
```
|
|
106
|
-
ドキュメント構造を最適化しますか?
|
|
107
|
-
❯ いいえ、問題ありません
|
|
108
|
-
はい、構造を最適化します(例:「はじめに」を「クイックスタート」に名称変更、「APIリファレンス」を「設定」の前に移動するなど)
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
- **いいえ、問題ありません**: このオプションを選択すると、提案された構造を承認し、直接コンテンツ生成に進みます。
|
|
112
|
-
- **はい、構造を最適化します**: このオプションを選択すると、プランを修正できます。ツールは対話ループでフィードバックを求めます。次のようなプレーンテキストで指示を与えることができます。
|
|
113
|
-
- `「トラブルシューティング」という新しいドキュメントを追加`
|
|
114
|
-
- `「レガシー機能」ドキュメントを削除`
|
|
115
|
-
- `「インストール」を構造の最上部に移動`
|
|
116
|
-
|
|
117
|
-
フィードバックのたびに、AIが構造を修正し、再度確認できます。フィードバックを入力せずにEnterキーを押すと、ループを終了して最終的な構造を承認します。
|
|
118
|
-
|
|
119
|
-
### 3. コンテンツの生成
|
|
120
|
-
|
|
121
|
-
ドキュメント構造が承認されると、DocSmithはプラン内の各ドキュメントの詳細なコンテンツの生成を開始します。このプロセスは自動的に実行され、所要時間はプロジェクトの規模と複雑さによって異なります。
|
|
122
|
-
|
|
123
|
-
完了すると、生成されたファイルは設定で指定された出力ディレクトリ(例:`./docs`)に保存されます。
|
|
124
|
-
|
|
125
|
-
## コマンドパラメータ
|
|
126
|
-
|
|
127
|
-
`generate` コマンドは、その動作を制御するためのいくつかのオプションパラメータを受け入れます。
|
|
128
|
-
|
|
129
|
-
| パラメータ | 説明 | 例 |
|
|
130
|
-
|---|---|---|
|
|
131
|
-
| `--forceRegenerate` | 既存の構造やコンテンツをすべて無視して、すべてのドキュメントを最初から再構築します。完全にリセットしたい場合に便利です。 | `aigne doc generate --forceRegenerate` |
|
|
132
|
-
| `--feedback` | 対話型の確認が始まる前に、構造生成フェーズでAIをガイドするための初期のテキストベースの指示を提供します。 | `aigne doc generate --feedback "Add more API examples"` |
|
|
133
|
-
| `--glossary` | 用語集ファイル(例:`glossary.md`)を指定して、ドキュメント全体で一貫した用語の使用を保証します。 | `aigne doc generate --glossary @/path/to/glossary.md` |
|
|
134
|
-
|
|
135
|
-
### 例:完全な再構築の強制
|
|
136
|
-
|
|
137
|
-
以前に生成されたすべてのドキュメントを破棄し、コードの現在の状態に基づいて新しいセットを作成したい場合は、`--forceRegenerate` フラグを使用します。
|
|
138
|
-
|
|
139
|
-
```bash 再構築の強制
|
|
140
|
-
aigne doc generate --forceRegenerate
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
## まとめ
|
|
144
|
-
|
|
145
|
-
`generate` コマンドは、初期プロジェクトドキュメントを作成するプロセス全体を統括します。自動化されたコード分析と対話型の確認プロセスを組み合わせることで、構造化された関連性の高いドキュメント一式を生成します。
|
|
146
|
-
|
|
147
|
-
ドキュメントが生成されたら、次のような操作ができます。
|
|
148
|
-
|
|
149
|
-
- [ドキュメントの更新](./guides-updating-documentation.md): 特定のドキュメントに変更を加える。
|
|
150
|
-
- [ドキュメントの翻訳](./guides-translating-documentation.md): コンテンツを他の言語に翻訳する。
|
|
151
|
-
- [ドキュメントの公開](./guides-publishing-your-docs.md): ドキュメントをオンラインで利用可能にする。
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
# Generating Documentation
|
|
2
|
-
|
|
3
|
-
This guide provides a systematic procedure for creating a complete set of documentation from your project's source files. The process is initiated using the `aigne doc generate` command, which analyzes your codebase, proposes a logical structure, and then writes the content for each document.
|
|
4
|
-
|
|
5
|
-
This command is the primary tool for the initial creation of your documentation. For modifying documents after they have been created, refer to the [Updating Documentation](./guides-updating-documentation.md) guide.
|
|
6
|
-
|
|
7
|
-
### The Generation Workflow
|
|
8
|
-
|
|
9
|
-
The `generate` command executes a sequence of automated steps to build your documentation. The process is designed to be interactive, allowing you to review and approve the proposed structure before content is written.
|
|
10
|
-
|
|
11
|
-
```d2
|
|
12
|
-
direction: down
|
|
13
|
-
|
|
14
|
-
start: {
|
|
15
|
-
label: "Start"
|
|
16
|
-
shape: oval
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
run_command: {
|
|
20
|
-
label: "Run 'aigne doc generate'"
|
|
21
|
-
shape: rectangle
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
check_config: {
|
|
25
|
-
label: "Configuration file exists?"
|
|
26
|
-
shape: diamond
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
interactive_setup: {
|
|
30
|
-
label: "Guide through interactive setup"
|
|
31
|
-
shape: rectangle
|
|
32
|
-
tooltip: "If .aigne/doc-smith/config.yaml is not found, an interactive setup is triggered."
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
propose_structure: {
|
|
36
|
-
label: "Analyze project and propose document structure"
|
|
37
|
-
shape: rectangle
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
review_structure: {
|
|
41
|
-
label: "User reviews the proposed structure"
|
|
42
|
-
shape: rectangle
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
user_approve: {
|
|
46
|
-
label: "Approve structure?"
|
|
47
|
-
shape: diamond
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
provide_feedback: {
|
|
51
|
-
label: "Provide feedback to refine structure"
|
|
52
|
-
shape: rectangle
|
|
53
|
-
tooltip: "User can request changes like renaming, adding, or removing sections."
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
generate_content: {
|
|
57
|
-
label: "Generate content for all documents"
|
|
58
|
-
shape: rectangle
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
end: {
|
|
62
|
-
label: "End"
|
|
63
|
-
shape: oval
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
start -> run_command
|
|
67
|
-
run_command -> check_config
|
|
68
|
-
check_config -> interactive_setup: {
|
|
69
|
-
label: "No"
|
|
70
|
-
}
|
|
71
|
-
interactive_setup -> propose_structure
|
|
72
|
-
check_config -> propose_structure: {
|
|
73
|
-
label: "Yes"
|
|
74
|
-
}
|
|
75
|
-
propose_structure -> review_structure
|
|
76
|
-
review_structure -> user_approve
|
|
77
|
-
user_approve -> provide_feedback: {
|
|
78
|
-
label: "No"
|
|
79
|
-
}
|
|
80
|
-
provide_feedback -> review_structure
|
|
81
|
-
user_approve -> generate_content: {
|
|
82
|
-
label: "Yes"
|
|
83
|
-
}
|
|
84
|
-
generate_content -> end
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
## Step-by-Step Process
|
|
88
|
-
|
|
89
|
-
To generate your documentation, navigate to the root directory of your project in your terminal and follow these steps.
|
|
90
|
-
|
|
91
|
-
### 1. Run the Generate Command
|
|
92
|
-
|
|
93
|
-
Execute the `generate` command to begin the process. The tool will start by analyzing your project's files and structure.
|
|
94
|
-
|
|
95
|
-
```bash Basic Generation Command
|
|
96
|
-
aigne doc generate
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
You can also use the aliases `gen` or `g` for brevity.
|
|
100
|
-
|
|
101
|
-
### 2. Review the Documentation Structure
|
|
102
|
-
|
|
103
|
-
After the analysis is complete, the tool will display the proposed documentation structure and prompt you for review:
|
|
104
|
-
|
|
105
|
-
```
|
|
106
|
-
Would you like to optimize the documentation structure?
|
|
107
|
-
❯ No, looks good
|
|
108
|
-
Yes, optimize the structure (e.g. rename 'Getting Started' to 'Quick Start', move 'API Reference' before 'Configuration')
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
- **No, looks good**: Select this option to approve the proposed structure and proceed directly to content generation.
|
|
112
|
-
- **Yes, optimize the structure**: Select this option to modify the plan. The tool will then ask for your feedback in an interactive loop. You can provide instructions in plain text, such as:
|
|
113
|
-
- `Add a new document 'Troubleshooting'`
|
|
114
|
-
- `Remove the 'Legacy Features' document`
|
|
115
|
-
- `Move 'Installation' to the top of the structure`
|
|
116
|
-
|
|
117
|
-
After each piece of feedback, the AI will revise the structure, and you can review it again. Press Enter without typing any feedback to exit the loop and approve the final structure.
|
|
118
|
-
|
|
119
|
-
### 3. Content Generation
|
|
120
|
-
|
|
121
|
-
Once the documentation structure is approved, DocSmith will begin generating the detailed content for each document in the plan. This process runs automatically, and its duration depends on the size and complexity of your project.
|
|
122
|
-
|
|
123
|
-
Upon completion, the generated files will be saved to the output directory specified in your configuration (e.g., `./docs`).
|
|
124
|
-
|
|
125
|
-
## Command Parameters
|
|
126
|
-
|
|
127
|
-
The `generate` command accepts several optional parameters to control its behavior.
|
|
128
|
-
|
|
129
|
-
| Parameter | Description | Example |
|
|
130
|
-
|---|---|---|
|
|
131
|
-
| `--forceRegenerate` | Rebuilds all documentation from scratch, ignoring any existing structure or content. This is useful when you want a complete reset. | `aigne doc generate --forceRegenerate` |
|
|
132
|
-
| `--feedback` | Provides initial text-based instructions to guide the AI during the structure generation phase, before the interactive review starts. | `aigne doc generate --feedback "Add more API examples"` |
|
|
133
|
-
| `--glossary` | Specifies a glossary file (e.g., `glossary.md`) to ensure consistent use of terminology throughout the documentation. | `aigne doc generate --glossary @/path/to/glossary.md` |
|
|
134
|
-
|
|
135
|
-
### Example: Forcing a Complete Rebuild
|
|
136
|
-
|
|
137
|
-
If you want to discard all previously generated documents and create a new set based on the current state of your code, use the `--forceRegenerate` flag.
|
|
138
|
-
|
|
139
|
-
```bash Forcing Regeneration
|
|
140
|
-
aigne doc generate --forceRegenerate
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
## Summary
|
|
144
|
-
|
|
145
|
-
The `generate` command orchestrates the entire process of creating your initial project documentation. It combines automated code analysis with an interactive review process to produce a structured and relevant set of documents.
|
|
146
|
-
|
|
147
|
-
After your documents are generated, you may want to:
|
|
148
|
-
|
|
149
|
-
- [Update Documentation](./guides-updating-documentation.md): Make changes to specific documents.
|
|
150
|
-
- [Translate Documentation](./guides-translating-documentation.md): Translate your content into other languages.
|
|
151
|
-
- [Publishing Your Docs](./guides-publishing-your-docs.md): Make your documentation available online.
|