@aigne/doc-smith 0.8.12-beta.8 → 0.8.12
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 +15 -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/update-document-detail.yaml +3 -1
- package/agents/utils/update-branding.mjs +69 -0
- package/package.json +16 -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/structure/update/user-prompt.md +0 -4
- package/utils/file-utils.mjs +69 -24
- 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/media-description.yaml +0 -91
- 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 -1830
- 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 -198
- 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 -69
- package/docs/configuration.md +0 -69
- package/docs/configuration.zh-TW.md +0 -69
- package/docs/configuration.zh.md +0 -69
- package/docs/getting-started.ja.md +0 -107
- package/docs/getting-started.md +0 -107
- package/docs/getting-started.zh-TW.md +0 -107
- package/docs/getting-started.zh.md +0 -107
- package/docs/guides-cleaning-up.ja.md +0 -51
- package/docs/guides-cleaning-up.md +0 -52
- 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 -107
- 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 -89
- 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 -93
- 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 -53
- 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 -83
- 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 -100
- 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 -79
- 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 -288
- package/docs/release-notes.zh-TW.md +0 -255
- package/docs/release-notes.zh.md +0 -255
- 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,198 +0,0 @@
|
|
|
1
|
-
# Initial Setup
|
|
2
|
-
|
|
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
|
-
|
|
5
|
-
## How to Start the Setup Process
|
|
6
|
-
|
|
7
|
-
To begin the configuration manually, navigate to your project's root directory in a terminal and execute the following command:
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
aigne doc init
|
|
11
|
-
```
|
|
12
|
-
|
|
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
|
-
|
|
15
|
-
## Configuration Steps
|
|
16
|
-
|
|
17
|
-
The setup process will prompt you with a series of questions. The following sections detail each step.
|
|
18
|
-
|
|
19
|
-
### Step 1: Define Documentation Purpose
|
|
20
|
-
|
|
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
|
-
|
|
23
|
-
**Prompt:** `📝 [1/10]: What should your documentation help readers achieve?`
|
|
24
|
-
|
|
25
|
-
You can select one or more options from the following list:
|
|
26
|
-
|
|
27
|
-
| Option | Name | Description |
|
|
28
|
-
| :--- | :--- | :--- |
|
|
29
|
-
| `getStarted` | Get started quickly | Help new users go from zero to working in <30 minutes. |
|
|
30
|
-
| `completeTasks` | Complete specific tasks | Guide users through common workflows and use cases. |
|
|
31
|
-
| `findAnswers` | Find answers fast | Provide a searchable reference for all features and APIs. |
|
|
32
|
-
| `understandSystem` | Understand the system | Explain how it works and the reasoning behind design decisions. |
|
|
33
|
-
| `solveProblems` | Solve problems | Help users troubleshoot and fix issues. |
|
|
34
|
-
| `mixedPurpose` | Mix of above | Cover multiple needs. |
|
|
35
|
-
|
|
36
|
-
### Step 2: Identify Target Audience
|
|
37
|
-
|
|
38
|
-
Next, specify the primary readers of your documentation. This helps to adjust the language and technical depth appropriately.
|
|
39
|
-
|
|
40
|
-
**Prompt:** `👥 [2/10]: Who will be reading your documentation?`
|
|
41
|
-
|
|
42
|
-
You may select multiple audiences from this list:
|
|
43
|
-
|
|
44
|
-
| Option | Name | Description |
|
|
45
|
-
| :--- | :--- | :--- |
|
|
46
|
-
| `endUsers` | End users (non-technical) | People who use the product but do not code. |
|
|
47
|
-
| `developers` | Developers integrating | Engineers adding this to their projects. |
|
|
48
|
-
| `devops` | DevOps/Infrastructure | Teams deploying, monitoring, and maintaining systems. |
|
|
49
|
-
| `decisionMakers` | Technical decision makers | Architects or leads evaluating the technology. |
|
|
50
|
-
| `supportTeams` | Support teams | People helping others use the product. |
|
|
51
|
-
| `mixedTechnical` | Mixed technical audience | A combination of developers, DevOps, and other technical users. |
|
|
52
|
-
|
|
53
|
-
### Step 3: Specify Reader Knowledge Level
|
|
54
|
-
|
|
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.
|
|
56
|
-
|
|
57
|
-
**Prompt:** `🧠 [3/10]: How much do readers already know about your project?`
|
|
58
|
-
|
|
59
|
-
Select the option that best describes your readers:
|
|
60
|
-
|
|
61
|
-
| Option | Name | Description |
|
|
62
|
-
| :--- | :--- | :--- |
|
|
63
|
-
| `completeBeginners` | Complete beginners | New to the domain or technology entirely. |
|
|
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. |
|
|
66
|
-
| `emergencyTroubleshooting` | Emergency/troubleshooting | Users who need to fix a problem quickly. |
|
|
67
|
-
| `exploringEvaluating` | Exploring/evaluating | Users trying to determine if the tool fits their needs. |
|
|
68
|
-
|
|
69
|
-
### Step 4: Set Documentation Depth
|
|
70
|
-
|
|
71
|
-
Choose how detailed the documentation should be. This parameter determines the scope and level of detail in the generated content.
|
|
72
|
-
|
|
73
|
-
**Prompt:** `📊 [4/10]: How detailed should your documentation be?`
|
|
74
|
-
|
|
75
|
-
Select one of the following levels:
|
|
76
|
-
|
|
77
|
-
| Option | Name | Description |
|
|
78
|
-
| :--- | :--- | :--- |
|
|
79
|
-
| `essentialOnly` | Essential only | Covers the most common 80% of use cases concisely. |
|
|
80
|
-
| `balancedCoverage` | Balanced coverage | Provides good depth with practical examples. |
|
|
81
|
-
| `comprehensive` | Comprehensive | Covers all features, edge cases, and advanced scenarios. |
|
|
82
|
-
| `aiDecide` | Let AI decide | The tool analyzes code complexity to suggest an appropriate depth. |
|
|
83
|
-
|
|
84
|
-
### Step 5: Select Primary Language
|
|
85
|
-
|
|
86
|
-
Choose the main language for your documentation. The system will detect your operating system's language and suggest it as the default.
|
|
87
|
-
|
|
88
|
-
**Prompt:** `🌐 [5/10]: What's your main documentation language?`
|
|
89
|
-
|
|
90
|
-
You can select from a list of 12 supported languages, including English, Chinese (Simplified), and Spanish.
|
|
91
|
-
|
|
92
|
-
### Step 6: Choose Translation Languages
|
|
93
|
-
|
|
94
|
-
Select any additional languages into which you want the documentation to be translated.
|
|
95
|
-
|
|
96
|
-
**Prompt:** `🔄 [6/10]: Which languages should we translate to?`
|
|
97
|
-
|
|
98
|
-
You can choose multiple languages from the supported options, excluding the primary language selected in the previous step.
|
|
99
|
-
|
|
100
|
-
### Step 7: Define Documentation Directory
|
|
101
|
-
|
|
102
|
-
Specify the folder where the generated documentation files will be saved.
|
|
103
|
-
|
|
104
|
-
**Prompt:** `📁 [7/10]: Where should we save your documentation?`
|
|
105
|
-
|
|
106
|
-
The default path is `.aigne/doc-smith/docs`. You can accept this default or provide a different path.
|
|
107
|
-
|
|
108
|
-
### Step 8: Specify Content Sources
|
|
109
|
-
|
|
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
|
-
|
|
120
|
-
**Prompt:** `📋 [9/10]: Any custom rules or requirements for your documentation? (Optional, press Enter to skip)`
|
|
121
|
-
|
|
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
|
-
|
|
124
|
-
### Step 10: Configure Media Settings
|
|
125
|
-
|
|
126
|
-
Set a minimum width for images to be included in the documentation. This helps filter out low-resolution images or icons.
|
|
127
|
-
|
|
128
|
-
**Prompt:** `🖼️ [10/10]: Minimum image width (in pixels) to include in documentation:`
|
|
129
|
-
|
|
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
|
|
139
|
-
# Project information for documentation publishing
|
|
140
|
-
projectName: AIGNE DocSmith
|
|
141
|
-
projectDesc: AIGNE DocSmith is a powerful, AI-driven documentation generation tool...
|
|
142
|
-
projectLogo: ../assets/screenshots/9645caf64b4232699982c4d940b03b90.svg
|
|
143
|
-
|
|
144
|
-
# =============================================================================
|
|
145
|
-
# Documentation Configuration
|
|
146
|
-
# =============================================================================
|
|
147
|
-
|
|
148
|
-
# Purpose: What's the main outcome you want readers to achieve?
|
|
149
|
-
documentPurpose:
|
|
150
|
-
- getStarted
|
|
151
|
-
- completeTasks
|
|
152
|
-
|
|
153
|
-
# Target Audience: Who will be reading this most often?
|
|
154
|
-
targetAudienceTypes:
|
|
155
|
-
- endUsers
|
|
156
|
-
|
|
157
|
-
# Reader Knowledge Level: What do readers typically know when they arrive?
|
|
158
|
-
readerKnowledgeLevel: completeBeginners
|
|
159
|
-
|
|
160
|
-
# Documentation Depth: How comprehensive should the documentation be?
|
|
161
|
-
documentationDepth: comprehensive
|
|
162
|
-
|
|
163
|
-
# Custom Rules: Define specific documentation generation rules and requirements
|
|
164
|
-
rules: |
|
|
165
|
-
Avoid using vague or empty words that don't provide measurable or specific details...
|
|
166
|
-
|
|
167
|
-
# Target Audience: Describe your specific target audience and their characteristics
|
|
168
|
-
targetAudience: |
|
|
169
|
-
|
|
170
|
-
# Language settings
|
|
171
|
-
locale: en
|
|
172
|
-
translateLanguages:
|
|
173
|
-
- zh
|
|
174
|
-
- zh-TW
|
|
175
|
-
- ja
|
|
176
|
-
|
|
177
|
-
# Paths
|
|
178
|
-
docsDir: ./docs # Directory to save generated documentation
|
|
179
|
-
sourcesPath: # Source code paths to analyze
|
|
180
|
-
- ./README.md
|
|
181
|
-
- ./agents
|
|
182
|
-
|
|
183
|
-
# =============================================================================
|
|
184
|
-
# Media Settings
|
|
185
|
-
# =============================================================================
|
|
186
|
-
media:
|
|
187
|
-
minImageWidth: 800
|
|
188
|
-
```
|
|
189
|
-
|
|
190
|
-
## Summary and Next Steps
|
|
191
|
-
|
|
192
|
-
Once the setup is complete, you will see a confirmation message.
|
|
193
|
-
|
|
194
|
-

|
|
195
|
-
|
|
196
|
-
With your initial configuration saved, you are now prepared to create your documentation.
|
|
197
|
-
|
|
198
|
-
* To proceed, consult the [Generating Documentation](./guides-generating-documentation.md) guide for instructions on running the generation process.
|
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
# 初始設定
|
|
2
|
-
|
|
3
|
-
本指南將逐步引導您完成 AIGNE DocSmith 的互動式設定流程。此流程會在您首次執行 `generate` 指令時啟動,也可以手動開始。其目的是建立一個 `config.yaml` 檔案,用來儲存您產生文件的偏好設定。
|
|
4
|
-
|
|
5
|
-
## 開始流程
|
|
6
|
-
|
|
7
|
-
若要手動開始設定,請在終端機中導覽至您的專案根目錄,並執行以下指令:
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
aigne doc init
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
此指令會啟動一個互動式問卷,引導您完成文件設定。
|
|
14
|
-
|
|
15
|
-
## 設定步驟
|
|
16
|
-
|
|
17
|
-
設定流程包含九個問題,旨在根據您的特定需求量身打造文件。
|
|
18
|
-
|
|
19
|
-
### 步驟 1:定義文件目的
|
|
20
|
-
|
|
21
|
-
首先,系統會請您定義文件的主要目標。這項選擇會影響所產生內容的語氣、結構和重點。
|
|
22
|
-
|
|
23
|
-
**提示:** `📝 [1/9]:您的文件應幫助讀者達成什麼目標?`
|
|
24
|
-
|
|
25
|
-
您可以從下表中選取多個選項:
|
|
26
|
-
|
|
27
|
-
| 選項 | 名稱 | 描述 |
|
|
28
|
-
| :--- | :--- | :--- |
|
|
29
|
-
| `getStarted` | 快速入門 | 幫助新使用者在 30 分鐘內從零到上手。 |
|
|
30
|
-
| `completeTasks` | 完成特定任務 | 引導使用者完成常見的工作流程和使用案例。 |
|
|
31
|
-
| `findAnswers` | 快速尋找答案 | 為所有功能和 API 提供可搜尋的參考資料。 |
|
|
32
|
-
| `understandSystem` | 了解系統 | 解釋其運作方式以及設計決策背後的原因。 |
|
|
33
|
-
| `solveProblems` | 解決問題 | 幫助使用者進行疑難排解和修復問題。 |
|
|
34
|
-
| `mixedPurpose` | 以上混合 | 全面涵蓋多種需求。 |
|
|
35
|
-
|
|
36
|
-
### 步驟 2:識別目標讀者
|
|
37
|
-
|
|
38
|
-
接著,請指定文件的主要讀者是誰。這有助於適當地調整語言和技術深度。
|
|
39
|
-
|
|
40
|
-
**提示:** `👥 [2/9]:誰會閱讀您的文件?`
|
|
41
|
-
|
|
42
|
-
您可以選取以下一種或多種讀者群:
|
|
43
|
-
|
|
44
|
-
| 選項 | 名稱 | 描述 |
|
|
45
|
-
| :--- | :--- | :--- |
|
|
46
|
-
| `endUsers` | 終端使用者(非技術人員) | 使用產品但不寫程式的人。 |
|
|
47
|
-
| `developers` | 進行整合的開發者 | 將此產品加入其專案的工程師。 |
|
|
48
|
-
| `devops` | DevOps/基礎架構人員 | 部署、監控和維護系統的團隊。 |
|
|
49
|
-
| `decisionMakers` | 技術決策者 | 評估此技術的架構師或主管。 |
|
|
50
|
-
| `supportTeams` | 支援團隊 | 協助他人使用產品的人員。 |
|
|
51
|
-
| `mixedTechnical` | 混合技術背景的讀者 | 開發者、DevOps 和其他技術使用者的組合。 |
|
|
52
|
-
|
|
53
|
-
### 步驟 3:提供自訂規則
|
|
54
|
-
|
|
55
|
-
這個選填步驟讓您可以提供特定的指示或限制,供 AI 在內容生成過程中遵循。
|
|
56
|
-
|
|
57
|
-
**提示:** `📋 [3/9]:您的文件是否有任何自訂規則或要求?(選填,按 Enter 鍵跳過)`
|
|
58
|
-
|
|
59
|
-
您可以輸入任何特定要求,例如語氣、風格或要排除的內容。例如:「避免使用行銷語言,並專注於技術準確性。」
|
|
60
|
-
|
|
61
|
-
### 步驟 4:指定讀者知識水平
|
|
62
|
-
|
|
63
|
-
請指出您讀者群的預設知識水平。這能確保內容的難易度適中,不會過於基礎或過於複雜。
|
|
64
|
-
|
|
65
|
-
**提示:** `🧠 [4/9]:讀者對您的專案已經了解多少?`
|
|
66
|
-
|
|
67
|
-
請選擇最能描述您讀者的選項:
|
|
68
|
-
|
|
69
|
-
| 選項 | 名稱 | 描述 |
|
|
70
|
-
| :--- | :--- | :--- |
|
|
71
|
-
| `completeBeginners` | 完全的初學者 | 完全不熟悉該領域或技術。 |
|
|
72
|
-
| `domainFamiliar` | 熟悉領域,但對工具陌生 | 了解問題領域,但對此解決方案是新手。 |
|
|
73
|
-
| `experiencedUsers` | 有經驗的使用者 | 需要參考資料或進階主題的常規使用者。 |
|
|
74
|
-
| `emergencyTroubleshooting` | 緊急/疑難排解 | 需要快速解決問題的使用者。 |
|
|
75
|
-
| `exploringEvaluating` | 探索/評估 | 試圖判斷此工具是否符合其需求的使用者。 |
|
|
76
|
-
|
|
77
|
-
### 步驟 5:設定文件深度
|
|
78
|
-
|
|
79
|
-
選擇文件的詳細程度。這決定了所產生內容的範圍和詳細程度。
|
|
80
|
-
|
|
81
|
-
**提示:** `📊 [5/9]:您的文件應該多詳細?`
|
|
82
|
-
|
|
83
|
-
請選擇以下其中一個詳細程度:
|
|
84
|
-
|
|
85
|
-
| 選項 | 名稱 | 描述 |
|
|
86
|
-
| :--- | :--- | :--- |
|
|
87
|
-
| `essentialOnly` | 僅含必要內容 | 簡潔地涵蓋 80% 最常見的使用案例。 |
|
|
88
|
-
| `balancedCoverage` | 均衡的涵蓋範圍 | 提供具備實用範例的良好深度。 |
|
|
89
|
-
| `comprehensive` | 全面詳盡 | 涵蓋所有功能、邊界案例和進階情境。 |
|
|
90
|
-
| `aiDecide` | 讓 AI 決定 | 工具會分析程式碼的複雜度,以建議適當的深度。 |
|
|
91
|
-
|
|
92
|
-
### 步驟 6:選擇主要語言
|
|
93
|
-
|
|
94
|
-
選擇文件的主要語言。系統會偵測您作業系統的語言,並建議其為預設語言。
|
|
95
|
-
|
|
96
|
-
**提示:** `🌐 [6/9]:您的主要文件語言是什麼?`
|
|
97
|
-
|
|
98
|
-
系統將會顯示一份包含 12 種支援語言的清單,包括英語、簡體中文和西班牙語。
|
|
99
|
-
|
|
100
|
-
### 步驟 7:選擇翻譯語言
|
|
101
|
-
|
|
102
|
-
選擇您希望將文件翻譯成的其他語言。
|
|
103
|
-
|
|
104
|
-
**提示:** `🔄 [7/9]:我們應該將文件翻譯成哪些語言?`
|
|
105
|
-
|
|
106
|
-
您可以從支援的選項清單中選擇多種語言,不包括您在上一步驟中選擇的主要語言。
|
|
107
|
-
|
|
108
|
-
### 步驟 8:定義輸出目錄
|
|
109
|
-
|
|
110
|
-
指定儲存所產生文件檔案的資料夾。
|
|
111
|
-
|
|
112
|
-
**提示:** `📁 [8/9]:我們應該將您的文件儲存在哪裡?`
|
|
113
|
-
|
|
114
|
-
預設路徑為 `.aigne/doc-smith/docs`。您可以接受此路徑或提供不同的路徑。
|
|
115
|
-
|
|
116
|
-
### 步驟 9:指定內容來源
|
|
117
|
-
|
|
118
|
-
指出工具應分析哪些檔案和資料夾以產生文件。您可以新增多個路徑,並使用 glob 模式進行進階篩選。
|
|
119
|
-
|
|
120
|
-
**提示:** `🔍 [9/9]:內容來源`
|
|
121
|
-
|
|
122
|
-
系統會提示您輸入檔案路徑、資料夾路徑或 glob 模式(例如 `src/**/*.js`)。如果您未提供任何路徑,工具預設會分析整個專案目錄。
|
|
123
|
-
|
|
124
|
-
## 產生的設定檔
|
|
125
|
-
|
|
126
|
-
完成問卷後,DocSmith 會將您的回答儲存到位於 `.aigne/doc-smith/` 目錄中名為 `config.yaml` 的設定檔。此檔案將作為未來所有文件產生的藍圖,並且可以隨時手動編輯。
|
|
127
|
-
|
|
128
|
-
以下是一個產生的 `config.yaml` 檔案範例:
|
|
129
|
-
|
|
130
|
-
```yaml config.yaml title="config.yaml"
|
|
131
|
-
# 文件發布的專案資訊
|
|
132
|
-
projectName: AIGNE DocSmith
|
|
133
|
-
projectDesc: AIGNE DocSmith is a powerful, AI-driven documentation generation tool...
|
|
134
|
-
projectLogo: https://docsmith.aigne.io/image-bin/uploads/9645caf64b4232699982c4d940b03b90.svg
|
|
135
|
-
|
|
136
|
-
# =============================================================================
|
|
137
|
-
# 文件設定
|
|
138
|
-
# =============================================================================
|
|
139
|
-
|
|
140
|
-
# 目的:您希望讀者達成的最主要成果是什麼?
|
|
141
|
-
documentPurpose:
|
|
142
|
-
- getStarted
|
|
143
|
-
- completeTasks
|
|
144
|
-
|
|
145
|
-
# 目標讀者:誰最常閱讀此文件?
|
|
146
|
-
targetAudienceTypes:
|
|
147
|
-
- endUsers
|
|
148
|
-
|
|
149
|
-
# 讀者知識水平:讀者在閱讀文件時通常具備哪些知識?
|
|
150
|
-
readerKnowledgeLevel: completeBeginners
|
|
151
|
-
|
|
152
|
-
# 文件深度:文件應該多全面?
|
|
153
|
-
documentationDepth: comprehensive
|
|
154
|
-
|
|
155
|
-
# 自訂規則:定義特定的文件產生規則和要求
|
|
156
|
-
rules: |
|
|
157
|
-
Avoid using vague or empty words...
|
|
158
|
-
|
|
159
|
-
# 目標讀者:描述您的特定目標讀者及其特徵
|
|
160
|
-
targetAudience: |
|
|
161
|
-
|
|
162
|
-
# 語言設定
|
|
163
|
-
locale: en
|
|
164
|
-
translateLanguages:
|
|
165
|
-
- zh
|
|
166
|
-
- ja
|
|
167
|
-
|
|
168
|
-
# 目錄和來源路徑設定
|
|
169
|
-
docsDir: ./docs # 儲存所產生文件的目錄
|
|
170
|
-
sourcesPath: # 要分析的原始碼路徑
|
|
171
|
-
- ./README.md
|
|
172
|
-
- ./agents
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
## 後續步驟
|
|
176
|
-
|
|
177
|
-
初始設定完成後,您現在可以開始建立文件了。
|
|
178
|
-
|
|
179
|
-
* 請前往 [產生文件](./guides-generating-documentation.md) 指南,了解如何執行產生流程。
|
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
# 初始设置
|
|
2
|
-
|
|
3
|
-
本指南将分步介绍 AIGNE DocSmith 的交互式设置过程。此过程在您首次运行 `generate` 命令时启动,也可以手动启动。其目的是创建一个 `config.yaml` 文件,用于存储您生成文档的偏好设置。
|
|
4
|
-
|
|
5
|
-
## 启动过程
|
|
6
|
-
|
|
7
|
-
要手动开始配置,请在终端中导航到项目的根目录并执行以下命令:
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
aigne doc init
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
此命令会启动一个交互式问卷,引导您完成文档设置的配置。
|
|
14
|
-
|
|
15
|
-
## 配置步骤
|
|
16
|
-
|
|
17
|
-
设置过程包括九个问题,旨在根据您的具体需求定制文档。
|
|
18
|
-
|
|
19
|
-
### 步骤 1:定义文档目的
|
|
20
|
-
|
|
21
|
-
首先,您需要定义文档的主要目标。此选择会影响生成内容的基调、结构和重点。
|
|
22
|
-
|
|
23
|
-
**提示:** `📝 [1/9]:您的文档应帮助读者实现什么目标?`
|
|
24
|
-
|
|
25
|
-
您可以从下面的列表中选择多个选项:
|
|
26
|
-
|
|
27
|
-
| 选项 | 名称 | 描述 |
|
|
28
|
-
| :--- | :--- | :--- |
|
|
29
|
-
| `getStarted` | 快速入门 | 帮助新用户在 30 分钟内从零开始上手。 |
|
|
30
|
-
| `completeTasks` | 完成特定任务 | 指导用户完成常见工作流和用例。 |
|
|
31
|
-
| `findAnswers` | 快速查找答案 | 为所有功能和 API 提供可搜索的参考。 |
|
|
32
|
-
| `understandSystem` | 理解系统 | 解释其工作原理及设计决策背后的原因。 |
|
|
33
|
-
| `solveProblems` | 解决问题 | 帮助用户排查和修复问题。 |
|
|
34
|
-
| `mixedPurpose` | 以上混合 | 全面覆盖多种需求。 |
|
|
35
|
-
|
|
36
|
-
### 步骤 2:确定目标受众
|
|
37
|
-
|
|
38
|
-
接下来,指定谁将是您文档的主要读者。这有助于适当地调整语言和技术深度。
|
|
39
|
-
|
|
40
|
-
**提示:** `👥 [2/9]:谁将是您文档的读者?`
|
|
41
|
-
|
|
42
|
-
您可以选择以下一个或多个受众:
|
|
43
|
-
|
|
44
|
-
| 选项 | 名称 | 描述 |
|
|
45
|
-
| :--- | :--- | :--- |
|
|
46
|
-
| `endUsers` | 最终用户(非技术人员) | 使用产品但不编码的人员。 |
|
|
47
|
-
| `developers` | 集成开发者 | 将此产品添加到其项目中的工程师。 |
|
|
48
|
-
| `devops` | DevOps/基础设施 | 部署、监控和维护系统的团队。 |
|
|
49
|
-
| `decisionMakers` | 技术决策者 | 评估该技术的架构师或负责人。 |
|
|
50
|
-
| `supportTeams` | 支持团队 | 帮助他人使用产品的人员。 |
|
|
51
|
-
| `mixedTechnical` | 混合技术受众 | 开发人员、DevOps 和其他技术用户的组合。 |
|
|
52
|
-
|
|
53
|
-
### 步骤 3:提供自定义规则
|
|
54
|
-
|
|
55
|
-
此可选步骤允许您提供具体说明或约束,供 AI 在内容生成过程中遵循。
|
|
56
|
-
|
|
57
|
-
**提示:** `📋 [3/9]:对您的文档有任何自定义规则或要求吗?(可选,按 Enter 键跳过)`
|
|
58
|
-
|
|
59
|
-
您可以输入任何具体要求,例如语气、风格或要排除的内容。例如:“避免使用营销性语言,专注于技术准确性。”
|
|
60
|
-
|
|
61
|
-
### 步骤 4:指定读者知识水平
|
|
62
|
-
|
|
63
|
-
指明您受众的假定知识水平。这能确保内容难度适中,既不会过于基础,也不会过于复杂。
|
|
64
|
-
|
|
65
|
-
**提示:** `🧠 [4/9]:读者对您的项目了解多少?`
|
|
66
|
-
|
|
67
|
-
选择最能描述您读者的选项:
|
|
68
|
-
|
|
69
|
-
| 选项 | 名称 | 描述 |
|
|
70
|
-
| :--- | :--- | :--- |
|
|
71
|
-
| `completeBeginners` | 完全初学者 | 完全不熟悉该领域或技术。 |
|
|
72
|
-
| `domainFamiliar` | 熟悉领域,不熟悉工具 | 了解问题领域,但对该解决方案不熟悉。 |
|
|
73
|
-
| `experiencedUsers` | 经验丰富的用户 | 需要参考或高级主题的常规用户。 |
|
|
74
|
-
| `emergencyTroubleshooting` | 紧急/故障排查 | 需要快速解决问题的用户。 |
|
|
75
|
-
| `exploringEvaluating` | 探索/评估 | 试图确定该工具是否满足其需求的用户。 |
|
|
76
|
-
|
|
77
|
-
### 步骤 5:设置文档深度
|
|
78
|
-
|
|
79
|
-
选择文档的详细程度。这决定了生成内容的范围和细节水平。
|
|
80
|
-
|
|
81
|
-
**提示:** `📊 [5/9]:您的文档应该有多详细?`
|
|
82
|
-
|
|
83
|
-
选择以下详细级别之一:
|
|
84
|
-
|
|
85
|
-
| 选项 | 名称 | 描述 |
|
|
86
|
-
| :--- | :--- | :--- |
|
|
87
|
-
| `essentialOnly` | 仅包含核心内容 | 简明扼要地覆盖 80% 的最常见用例。 |
|
|
88
|
-
| `balancedCoverage` | 平衡覆盖 | 提供良好深度和实用示例。 |
|
|
89
|
-
| `comprehensive` | 全面详尽 | 覆盖所有功能、边缘案例和高级场景。 |
|
|
90
|
-
| `aiDecide` | 由 AI 决定 | 工具会分析代码复杂度以建议合适的深度。 |
|
|
91
|
-
|
|
92
|
-
### 步骤 6:选择主要语言
|
|
93
|
-
|
|
94
|
-
选择您文档的主要语言。系统将检测您操作系统的语言并建议其为默认语言。
|
|
95
|
-
|
|
96
|
-
**提示:** `🌐 [6/9]:您的主要文档语言是什么?`
|
|
97
|
-
|
|
98
|
-
系统将为您呈现一个包含 12 种受支持语言的列表,包括英语、中文(简体)和西班牙语。
|
|
99
|
-
|
|
100
|
-
### 步骤 7:选择翻译语言
|
|
101
|
-
|
|
102
|
-
选择您希望将文档翻译成的其他语言。
|
|
103
|
-
|
|
104
|
-
**提示:** `🔄 [7/9]:我们应该翻译成哪些语言?`
|
|
105
|
-
|
|
106
|
-
您可以从支持的选项列表中选择多种语言,不包括您在上一步中选择的主要语言。
|
|
107
|
-
|
|
108
|
-
### 步骤 8:定义输出目录
|
|
109
|
-
|
|
110
|
-
指定保存生成的文档文件的文件夹。
|
|
111
|
-
|
|
112
|
-
**提示:** `📁 [8/9]:我们应该将您的文档保存在哪里?`
|
|
113
|
-
|
|
114
|
-
默认路径是 `.aigne/doc-smith/docs`。您可以接受此路径或提供其他路径。
|
|
115
|
-
|
|
116
|
-
### 步骤 9:指定内容源
|
|
117
|
-
|
|
118
|
-
指明工具应分析哪些文件和文件夹以生成文档。您可以添加多个路径,并使用 glob 模式进行高级筛选。
|
|
119
|
-
|
|
120
|
-
**提示:** `🔍 [9/9]:内容源`
|
|
121
|
-
|
|
122
|
-
系统将提示您输入文件路径、文件夹路径或 glob 模式(例如,`src/**/*.js`)。如果您不提供任何路径,工具将默认分析整个项目目录。
|
|
123
|
-
|
|
124
|
-
## 生成的配置文件
|
|
125
|
-
|
|
126
|
-
完成问卷后,DocSmith 会将您的回答保存到 `.aigne/doc-smith/` 目录中一个名为 `config.yaml` 的配置文件中。该文件将作为未来所有文档生成的蓝图,并可随时手动编辑。
|
|
127
|
-
|
|
128
|
-
以下是生成的 `config.yaml` 文件示例:
|
|
129
|
-
|
|
130
|
-
```yaml config.yaml title="config.yaml"
|
|
131
|
-
# 用于文档发布的项目信息
|
|
132
|
-
projectName: AIGNE DocSmith
|
|
133
|
-
projectDesc: AIGNE DocSmith is a powerful, AI-driven documentation generation tool...
|
|
134
|
-
projectLogo: https://docsmith.aigne.io/image-bin/uploads/9645caf64b4232699982c4d940b03b90.svg
|
|
135
|
-
|
|
136
|
-
# =============================================================================
|
|
137
|
-
# 文档配置
|
|
138
|
-
# =============================================================================
|
|
139
|
-
|
|
140
|
-
# 目的:您希望读者实现的主要成果是什么?
|
|
141
|
-
documentPurpose:
|
|
142
|
-
- getStarted
|
|
143
|
-
- completeTasks
|
|
144
|
-
|
|
145
|
-
# 目标受众:谁会最常阅读本文档?
|
|
146
|
-
targetAudienceTypes:
|
|
147
|
-
- endUsers
|
|
148
|
-
|
|
149
|
-
# 读者知识水平:读者通常具备哪些知识?
|
|
150
|
-
readerKnowledgeLevel: completeBeginners
|
|
151
|
-
|
|
152
|
-
# 文档深度:文档应达到何种程度的全面性?
|
|
153
|
-
documentationDepth: comprehensive
|
|
154
|
-
|
|
155
|
-
# 自定义规则:定义具体的文档生成规则和要求
|
|
156
|
-
rules: |
|
|
157
|
-
Avoid using vague or empty words...
|
|
158
|
-
|
|
159
|
-
# 目标受众:描述您的具体目标受众及其特征
|
|
160
|
-
targetAudience: |
|
|
161
|
-
|
|
162
|
-
# 语言设置
|
|
163
|
-
locale: en
|
|
164
|
-
translateLanguages:
|
|
165
|
-
- zh
|
|
166
|
-
- ja
|
|
167
|
-
|
|
168
|
-
# 目录和源路径配置
|
|
169
|
-
docsDir: ./docs # 保存生成文档的目录
|
|
170
|
-
sourcesPath: # 要分析的源代码路径
|
|
171
|
-
- ./README.md
|
|
172
|
-
- ./agents
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
## 后续步骤
|
|
176
|
-
|
|
177
|
-
完成初始配置后,您现在可以开始创建文档了。
|
|
178
|
-
|
|
179
|
-
* 继续阅读 [生成文档](./guides-generating-documentation.md) 指南,了解如何运行生成过程。
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
# プリファレンスの管理
|
|
2
|
-
|
|
3
|
-
ドキュメントを生成または更新する際に、`--feedback` フラグを使用してフィードバックを提供できます。このフィードバックは「プリファレンス」として保存され、将来のセッションで再利用されることで、AIが以前の指示との一貫性を維持するようになります。`aigne doc prefs` コマンドは、これらの保存されたプリファレンスを直接管理する方法を提供します。
|
|
4
|
-
|
|
5
|
-
このガイドでは、保存されたプリファレンスのリスト表示、削除、およびアクティブ状態の切り替え方法について詳しく説明します。
|
|
6
|
-
|
|
7
|
-
## 保存されたプリファレンスの表示
|
|
8
|
-
|
|
9
|
-
保存されているすべてのプリファレンスを確認するには、`--list` フラグを使用します。このコマンドは、各プリファレンスをそのステータス、スコープ、一意のID、および内容とともに表示します。
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
aigne doc prefs --list
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
### 出力の理解
|
|
16
|
-
|
|
17
|
-
リストは、各プリファレンスルールに関する明確な情報を提供するようにフォーマットされています:
|
|
18
|
-
|
|
19
|
-
* **ステータス**: プリファレンスがアクティブか非アクティブかを示します。
|
|
20
|
-
* `🟢`: アクティブ。ルールはドキュメント生成中に適用されます。
|
|
21
|
-
* `⚪`: 非アクティブ。ルールは保存されていますが、無視されます。
|
|
22
|
-
* **スコープ**: プリファレンスが適用されるコンテキスト(例:`global`、`document`)。
|
|
23
|
-
* **ID**: プリファレンスの一意の識別子で、削除や切り替えに使用されます。
|
|
24
|
-
* **パス**: プリファレンスが特定のファイルにのみ適用される場合、そのパスがここにリストされます。
|
|
25
|
-
* **ルール内容**: プリファレンスルール自体のテキストです。
|
|
26
|
-
|
|
27
|
-
**出力例:**
|
|
28
|
-
|
|
29
|
-
```
|
|
30
|
-
# ユーザープリファレンス
|
|
31
|
-
|
|
32
|
-
**フォーマットの説明:**
|
|
33
|
-
- 🟢 = アクティブなプリファレンス, ⚪ = 非アクティブなプリファレンス
|
|
34
|
-
- [scope] = プリファレンスのスコープ (global, structure, document, translation)
|
|
35
|
-
- ID = 一意のプリファレンス識別子
|
|
36
|
-
- Paths = 特定のファイルパス(該当する場合)
|
|
37
|
-
|
|
38
|
-
🟢 [document] 2af5c | Paths: /guides/generating-documentation.md
|
|
39
|
-
具体的で検証可能な事実と情報に焦点を当てること。測定可能または具体的な情報を提供しない、曖昧または空虚な言葉の使用は避けること...
|
|
40
|
-
|
|
41
|
-
⚪ [global] 8b1e2
|
|
42
|
-
ドキュメント全体でフォーマルかつアカデミックなトーンを使用すること。
|
|
43
|
-
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
## プリファレンスの削除
|
|
47
|
-
|
|
48
|
-
プリファレンスが不要になった場合、`--remove` フラグを使用して完全に削除できます。IDを指定するか、インタラクティブメニューを通じてプリファレンスを削除できます。
|
|
49
|
-
|
|
50
|
-
### インタラクティブモード
|
|
51
|
-
|
|
52
|
-
リストからプリファレンスを選択するには、IDなしでコマンドを実行します。これにより、削除したい項目をチェックできるインタラクティブなプロンプトが開きます。
|
|
53
|
-
|
|
54
|
-
```bash
|
|
55
|
-
aigne doc prefs --remove
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
チェックリストが表示され、1つ以上のプリファレンスを選択できます。これは、正しい項目を確実に削除するための推奨される方法です。
|
|
59
|
-
|
|
60
|
-
### ダイレクトモード
|
|
61
|
-
|
|
62
|
-
削除したいプリファレンスの一意のIDがすでにわかっている場合は、`--id` フラグを使用してそれらを指定できます。削除する項目が確かな場合は、この方法がより高速です。
|
|
63
|
-
|
|
64
|
-
```bash
|
|
65
|
-
# 単一のプリファレンスを削除
|
|
66
|
-
aigne doc prefs --remove --id 2af5c
|
|
67
|
-
|
|
68
|
-
# 複数のプリファレンスを削除
|
|
69
|
-
aigne doc prefs --remove --id 2af5c --id 8b1e2
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
## プリファレンスの切り替え
|
|
73
|
-
|
|
74
|
-
プリファレンスを完全に削除する代わりに、一時的に有効または無効にすることができます。これは、ルールを失うことなく特定のタスクのために一時停止したい場合に便利です。プリファレンスのアクティブ状態を変更するには、`--toggle` フラグを使用します。
|
|
75
|
-
|
|
76
|
-
### インタラクティブモード
|
|
77
|
-
|
|
78
|
-
IDなしでコマンドを実行すると、削除コマンドと同様のインタラクティブなチェックリストが起動します。
|
|
79
|
-
|
|
80
|
-
```bash
|
|
81
|
-
aigne doc prefs --toggle
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
有効化または無効化したいプリファレンスを選択できます。ステータスアイコン(`🟢`/`⚪`)が更新され、新しい状態が反映されます。
|
|
85
|
-
|
|
86
|
-
### ダイレクトモード
|
|
87
|
-
|
|
88
|
-
特定のプリファレンスを直接切り替えるには、`--id` フラグを使用します。
|
|
89
|
-
|
|
90
|
-
```bash
|
|
91
|
-
# 単一のプリファレンスを切り替え
|
|
92
|
-
aigne doc prefs --toggle --id 2af5c
|
|
93
|
-
|
|
94
|
-
# 複数のプリファレンスを切り替え
|
|
95
|
-
aigne doc prefs --toggle --id 2af5c --id 8b1e2
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
---
|
|
99
|
-
|
|
100
|
-
プリファレンスを管理することで、ドキュメント生成プロセスをきめ細かく制御し、出力がプロジェクトの特定の要件やスタイルに一貫して沿うようにすることができます。
|