@aigne/doc-smith 0.8.12-beta.7 → 0.8.12-beta.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/.aigne/doc-smith/config.yaml +1 -1
  2. package/.aigne/doc-smith/media-description.yaml +91 -0
  3. package/.aigne/doc-smith/upload-cache.yaml +6 -69
  4. package/.release-please-manifest.json +1 -1
  5. package/CHANGELOG.md +12 -0
  6. package/agents/clear/choose-contents.mjs +14 -1
  7. package/agents/clear/clear-media-description.mjs +129 -0
  8. package/agents/clear/index.yaml +3 -1
  9. package/agents/evaluate/code-snippet.mjs +28 -24
  10. package/agents/evaluate/document-structure.yaml +0 -4
  11. package/agents/evaluate/document.yaml +1 -5
  12. package/agents/generate/index.yaml +1 -0
  13. package/agents/init/index.mjs +10 -0
  14. package/agents/media/batch-generate-media-description.yaml +44 -0
  15. package/agents/media/generate-media-description.yaml +47 -0
  16. package/agents/media/load-media-description.mjs +238 -0
  17. package/agents/update/index.yaml +1 -0
  18. package/agents/utils/load-sources.mjs +103 -53
  19. package/aigne.yaml +6 -0
  20. package/assets/report-template/report.html +34 -34
  21. package/docs/configuration-initial-setup.md +74 -55
  22. package/docs/configuration.ja.md +59 -86
  23. package/docs/configuration.md +59 -86
  24. package/docs/configuration.zh-TW.md +59 -86
  25. package/docs/configuration.zh.md +59 -86
  26. package/docs/getting-started.ja.md +43 -24
  27. package/docs/getting-started.md +29 -10
  28. package/docs/getting-started.zh-TW.md +42 -23
  29. package/docs/getting-started.zh.md +39 -20
  30. package/docs/guides-cleaning-up.md +19 -18
  31. package/docs/guides-evaluating-documents.md +70 -29
  32. package/docs/guides-generating-documentation.md +59 -121
  33. package/docs/guides-interactive-chat.md +34 -26
  34. package/docs/guides-managing-history.md +18 -13
  35. package/docs/guides-publishing-your-docs.md +40 -35
  36. package/docs/guides-translating-documentation.md +39 -34
  37. package/docs/guides-updating-documentation.md +11 -9
  38. package/docs/overview.md +2 -2
  39. package/docs/release-notes.md +60 -27
  40. package/package.json +2 -1
  41. package/prompts/evaluate/document-structure.md +6 -7
  42. package/prompts/evaluate/document.md +16 -25
  43. package/prompts/media/media-description/system-prompt.md +35 -0
  44. package/prompts/media/media-description/user-prompt.md +8 -0
  45. package/utils/constants/index.mjs +0 -107
  46. package/utils/file-utils.mjs +41 -0
  47. package/media.md +0 -19
@@ -1,18 +1,18 @@
1
- # 開始使用
1
+ # 入門指南
2
2
 
3
- 本指南提供安裝 AIGNE DocSmith 並產生第一份文件的逐步流程。整個過程設計得簡單明瞭,可以快速完成。
3
+ 本指南提供安裝 AIGNE DocSmith 並產生第一份文件的逐步流程。整個過程設計得相當簡單,幾分鐘內即可完成。
4
4
 
5
- ## 前提條件
5
+ ## 先決條件
6
6
 
7
- 在進行安裝之前,請確保您的系統符合以下要求:
7
+ 在開始安裝之前,請確保您的系統符合以下要求:
8
8
 
9
- * **Node.js**:需要 20 或更新版本。DocSmith 使用 Node Package Manager (npm) 安裝,npm 包含在 Node.js 的安裝中。若要安裝 Node.js,請造訪官方 [Node.js 網站](https://nodejs.org/) 並按照您作業系統的說明進行操作。您可以透過開啟終端機並執行 `node -v` 和 `npm -v` 來驗證安裝。
9
+ * **Node.js**:需要 20 或更新版本。DocSmith 使用 Node Package Manager (npm) 安裝,npm 已包含在 Node.js 的安裝程式中。若要安裝 Node.js,請造訪官方 [Node.js 網站](https://nodejs.org/) 並依照您作業系統的說明進行操作。您可以開啟終端機並執行 `node -v` 和 `npm -v` 來驗證安裝。
10
10
 
11
- * **API 金鑰**:開始時不需要任何 API 金鑰。預設情況下,DocSmith 使用 AIGNE Hub 服務進行 AI 驅動的生成,讓您無需直接設定即可使用各種大型語言模型。
11
+ * **API 金鑰**:開始時不需要任何 API 金鑰。預設情況下,DocSmith 使用 AIGNE Hub 服務進行 AI 驅動的產生,讓您無需直接設定即可使用各種大型語言模型。
12
12
 
13
13
  ## 安裝
14
14
 
15
- 此工具作為 AIGNE 命令列介面 (CLI) 的一部分進行分發。
15
+ 此工具是 AIGNE 命令列介面 (CLI) 的一部分。安裝過程包含兩個簡單的步驟。
16
16
 
17
17
  ### 步驟 1:安裝 AIGNE CLI
18
18
 
@@ -22,17 +22,17 @@
22
22
  npm install -g @aigne/cli
23
23
  ```
24
24
 
25
- 此指令會下載並安裝套件,使 `aigne` 指令在任何目錄下都可用。
25
+ 此指令會從 npm 登錄檔下載並安裝套件,讓 `aigne` 指令可以在您終端機的任何目錄中使用。
26
26
 
27
27
  ### 步驟 2:驗證安裝
28
28
 
29
- 安裝完成後,請執行文件工具的說明指令來進行驗證:
29
+ 安裝完成後,您可以執行文件工具的說明指令來進行驗證:
30
30
 
31
31
  ```bash title="驗證安裝"
32
32
  aigne doc --help
33
33
  ```
34
34
 
35
- 此指令應會顯示可用的 DocSmith 指令與選項列表,確認安裝成功。
35
+ 此指令應會顯示可用的 DocSmith 指令及其選項列表,這表示安裝已成功。
36
36
 
37
37
  ## 產生您的第一份文件
38
38
 
@@ -40,15 +40,15 @@ aigne doc --help
40
40
 
41
41
  ### 步驟 1:導覽至您的專案目錄
42
42
 
43
- 開啟您的終端機,並使用 `cd` 指令將目前目錄切換到您想要建立文件的專案根目錄。
43
+ 開啟您的終端機,並使用 `cd` 指令將當前目錄切換到您想要建立文件的專案根目錄。
44
44
 
45
- ```bash title="切換目錄" icon=mdi:folder-open
45
+ ```bash title="變更目錄" icon=mdi:folder-open
46
46
  cd /path/to/your/project
47
47
  ```
48
48
 
49
49
  ### 步驟 2:執行產生指令
50
50
 
51
- 執行主要的 `generate` 指令。這個單一指令會處理整個文件建立過程。
51
+ 執行主要的 `generate` 指令。這個單一指令能處理從分析到內容產生的整個文件建立過程。
52
52
 
53
53
  ```bash title="執行產生指令"
54
54
  aigne doc generate
@@ -56,33 +56,52 @@ aigne doc generate
56
56
 
57
57
  ### 步驟 3:完成互動式設定
58
58
 
59
- 當您第一次在專案中執行 `generate` 指令時,DocSmith 將啟動一次性的互動式設定流程。系統會詢問您一系列問題來設定您的文件偏好,例如其主要目的、目標受眾和語言。設定完成後,將會在 `.aigne/doc-smith` 目錄中建立一個 `config.yaml` 檔案來儲存您的設定。
59
+ 當您第一次在專案中執行 `generate` 指令時,DocSmith 將啟動一次性的互動式設定流程。系統將引導您回答一系列問題,以設定您的文件偏好,例如其主要目的、目標受眾和語言。
60
+
61
+ ![互動式設定過程的螢幕截圖](../assets/screenshots/doc-complete-setup.png)
62
+
63
+ 您的回答會儲存到位於 `.aigne/doc-smith` 目錄中的 `config.yaml` 檔案。如果需要,之後可以手動編輯此檔案。
60
64
 
61
65
  ### 步驟 4:等待產生
62
66
 
63
67
  設定完成後,DocSmith 將自動執行以下操作:
64
68
 
65
- 1. **分析程式碼庫**:掃描您的原始檔案以了解專案的結構和邏輯。
66
- 2. **規劃結構**:為文件建立一個邏輯計畫,包含章節和主題。
69
+ 1. **分析程式碼庫**:掃描您的原始碼檔案,以了解專案的結構、功能和邏輯。
70
+ 2. **規劃結構**:為文件建立一個邏輯計畫,概述章節和主題。
67
71
  3. **產生內容**:根據分析和您的設定撰寫文件內容。
68
72
 
69
- 完成後,將會出現一則確認訊息,且產生的檔案將位於設定時指定的輸出目錄中(例如 `.aigne/doc-smith/docs`)。
73
+ 完成後,將會出現一則確認訊息,且產生的檔案將位於設定時指定的輸出目錄中(預設為 `.aigne/doc-smith/docs`)。
74
+
75
+ ![產生成功後顯示的成功訊息螢幕截圖](../assets/screenshots/doc-generated-successfully.png)
76
+
77
+ ## 探索所有指令
78
+
79
+ DocSmith 提供了一組指令來管理您文件的完整生命週期。下表列出了所有可用的指令及其功能。
80
+
81
+ | Command | Description |
82
+ | :---------- | :------------------------------------------------------------------------------------------------------------ |
83
+ | `generate` | 分析程式碼庫並根據設定產生一套完整的文件。 |
84
+ | `update` | 以互動方式選取並重新產生現有文件的特定部分,通常會附上新的回饋。 |
85
+ | `translate` | 將現有文件翻譯成 12 種支援語言中的一種或多種,例如 `zh` 或 `ja`。 |
86
+ | `publish` | 將產生的文件發布到一個線上平台,使其可透過 URL 存取。 |
87
+ | `init` | 啟動互動式設定精靈,以建立或覆寫 `config.yaml` 設定檔。 |
88
+ | `prefs` | 顯示 `config.yaml` 檔案中的目前設定。 |
70
89
 
71
- ## 接下來呢?
90
+ ## 下一步是什麼?
72
91
 
73
- 您已成功產生第一份文件。以下是管理和強化文件的常見後續步驟:
92
+ 您已成功產生第一份文件。以下是管理和增強文件的常見後續步驟:
74
93
 
75
94
  <x-cards data-columns="2">
76
95
  <x-card data-title="更新文件" data-icon="lucide:refresh-cw" data-href="/guides/updating-documentation">
77
96
  根據程式碼變更或新需求,修改或重新產生文件的特定部分。
78
97
  </x-card>
79
98
  <x-card data-title="翻譯文件" data-icon="lucide:languages" data-href="/guides/translating-documentation">
80
- 將您的文件翻譯成 12 種支援的語言之一,例如中文、西班牙文或德文。
99
+ 將您的文件翻譯成 12 種支援的語言中的任何一種,例如中文、西班牙文或德文。
81
100
  </x-card>
82
101
  <x-card data-title="發布您的文件" data-icon="lucide:rocket" data-href="/guides/publishing-your-docs">
83
- 將您的文件發布到網路上,供您的團隊或大眾使用。
102
+ 讓您的團隊或大眾可以在線上存取您的文件。
84
103
  </x-card>
85
104
  <x-card data-title="檢視設定" data-icon="lucide:settings" data-href="/configuration/initial-setup">
86
- 檢視並修改在初始設定期間建立的 config.yaml 檔案,以調整您的偏好設定。
105
+ 檢視並修改在初始設定期間建立的 config.yaml 檔案,以調整您的偏好。
87
106
  </x-card>
88
- </x-cards>
107
+ </x-cards>
@@ -1,18 +1,18 @@
1
1
  # 快速入门
2
2
 
3
- 本指南提供了安装 AIGNE DocSmith 并生成您的第一套文档的分步流程。该过程设计得非常简单,可以快速完成。
3
+ 本指南提供了安装 AIGNE DocSmith 并生成您的第一套文档的分步流程。该过程设计得简单明了,几分钟内即可完成。
4
4
 
5
- ## 前置要求
5
+ ## 前提条件
6
6
 
7
7
  在继续安装之前,请确保您的系统满足以下要求:
8
8
 
9
- * **Node.js**:需要 20 或更高版本。DocSmith 使用 Node.js 包管理器(npm)进行安装,该管理器包含在 Node.js 的安装包中。要安装 Node.js,请访问 [Node.js 官方网站](https://nodejs.org/) 并按照适用于您操作系统的说明进行操作。您可以通过打开终端并运行 `node -v` 和 `npm -v` 来验证安装。
9
+ * **Node.js**:需要 20 或更高版本。DocSmith 使用 Node Package Manager (npm) 进行安装,npm 已包含在 Node.js 的安装包中。要安装 Node.js,请访问官方 [Node.js 网站](https://nodejs.org/) 并按照适用于您操作系统的说明进行操作。您可以通过打开终端并运行 `node -v` 和 `npm -v` 来验证安装。
10
10
 
11
- * **API 密钥**:开始时不需要任何 API 密钥。默认情况下,DocSmith 使用 AIGNE Hub 服务进行 AI 驱动的生成,这使您无需直接配置即可使用各种大型语言模型。
11
+ * **API 密钥**:开始时无需任何 API 密钥。默认情况下,DocSmith 使用 AIGNE Hub 服务进行 AI 驱动的生成,这使您无需直接配置即可使用各种大型语言模型。
12
12
 
13
13
  ## 安装
14
14
 
15
- 该工具作为 AIGNE 命令行界面(CLI)的一部分进行分发。
15
+ 该工具作为 AIGNE 命令行界面 (CLI) 的一部分进行分发。安装过程包括两个简单的步骤。
16
16
 
17
17
  ### 第 1 步:安装 AIGNE CLI
18
18
 
@@ -22,21 +22,21 @@
22
22
  npm install -g @aigne/cli
23
23
  ```
24
24
 
25
- 该命令会下载并安装软件包,使 `aigne` 命令在任何目录下都可用。
25
+ 此命令会从 npm 注册表下载并安装该软件包,使 `aigne` 命令在您终端的任何目录中都可用。
26
26
 
27
27
  ### 第 2 步:验证安装
28
28
 
29
- 安装完成后,通过运行文档工具的帮助命令来验证安装:
29
+ 安装完成后,您可以通过运行文档工具的帮助命令来验证安装:
30
30
 
31
31
  ```bash title="验证安装"
32
32
  aigne doc --help
33
33
  ```
34
34
 
35
- 该命令应显示 DocSmith 的可用命令和选项列表,以确认安装成功。
35
+ 此命令应显示可用的 DocSmith 命令及其选项列表,这确认了安装已成功。
36
36
 
37
37
  ## 生成您的第一份文档
38
38
 
39
- 请按照以下步骤分析您的项目并生成一套完整的文档。
39
+ 请按照以下步骤分析您的项目并生成一整套文档。
40
40
 
41
41
  ### 第 1 步:导航到您的项目目录
42
42
 
@@ -48,7 +48,7 @@ cd /path/to/your/project
48
48
 
49
49
  ### 第 2 步:运行生成命令
50
50
 
51
- 执行主要的 `generate` 命令。这个单一的命令会处理整个文档创建过程。
51
+ 执行主要的 `generate` 命令。这一个命令即可处理从分析到内容生成的整个文档创建过程。
52
52
 
53
53
  ```bash title="运行生成命令"
54
54
  aigne doc generate
@@ -56,17 +56,36 @@ aigne doc generate
56
56
 
57
57
  ### 第 3 步:完成交互式设置
58
58
 
59
- 当您首次在项目中运行 `generate` 命令时,DocSmith 将启动一次性的交互式设置过程。系统会询问您一系列问题,以配置您的文档偏好,例如其主要目的、目标受众和语言。系统将在 `.aigne/doc-smith` 目录中创建一个 `config.yaml` 文件来存储您的设置。
59
+ 当您首次在项目中运行 `generate` 命令时,DocSmith 将启动一次性的交互式设置过程。系统将引导您完成一系列问题,以配置您的文档偏好,例如其主要目的、目标受众和语言。
60
+
61
+ ![交互式设置过程的屏幕截图](../assets/screenshots/doc-complete-setup.png)
62
+
63
+ 您的回答将保存到位于 `.aigne/doc-smith` 目录中的 `config.yaml` 文件。如果需要,稍后可以手动编辑此文件。
60
64
 
61
65
  ### 第 4 步:等待生成
62
66
 
63
67
  设置完成后,DocSmith 将自动执行以下操作:
64
68
 
65
- 1. **分析代码库**:它会扫描您的源文件以理解项目的结构和逻辑。
66
- 2. **规划结构**:它会为文档创建一个逻辑计划,包括章节和主题。
67
- 3. **生成内容**:它会根据分析和您的配置来编写文档内容。
69
+ 1. **分析代码库**:扫描您的源文件以了解项目的结构、功能和逻辑。
70
+ 2. **规划结构**:为文档创建一个逻辑规划,概述各个部分和主题。
71
+ 3. **生成内容**:根据分析和您的配置编写文档内容。
72
+
73
+ 完成后,将出现一条确认消息,生成的文件将位于设置期间指定的输出目录中(默认为 `.aigne/doc-smith/docs`)。
74
+
75
+ ![生成成功后显示成功消息的屏幕截图](../assets/screenshots/doc-generated-successfully.png)
76
+
77
+ ## 探索所有命令
78
+
79
+ DocSmith 提供了一组命令来管理文档的整个生命周期。下表列出了所有可用命令及其功能。
68
80
 
69
- 完成后,将显示一条确认消息,生成的文件将位于设置期间指定的输出目录中(例如 `.aigne/doc-smith/docs`)。
81
+ | 命令 | 描述 |
82
+ | :---------- | :------------------------------------------------------------------------------------------------------------ |
83
+ | `generate` | 分析代码库并根据配置生成一整套文档。 |
84
+ | `update` | 交互式地选择并重新生成现有文档的特定部分,通常会附带新的反馈。 |
85
+ | `translate` | 将现有文档翻译成 12 种支持的语言中的一种或多种,例如 `zh` 或 `ja`。 |
86
+ | `publish` | 将生成的文档发布到实时平台,使其可通过 URL 访问。 |
87
+ | `init` | 启动交互式设置向导以创建或覆盖 `config.yaml` 配置文件。 |
88
+ | `prefs` | 显示 `config.yaml` 文件中的当前配置设置。 |
70
89
 
71
90
  ## 后续步骤
72
91
 
@@ -77,12 +96,12 @@ aigne doc generate
77
96
  根据代码更改或新要求,修改或重新生成文档的特定部分。
78
97
  </x-card>
79
98
  <x-card data-title="翻译文档" data-icon="lucide:languages" data-href="/guides/translating-documentation">
80
- 将您的文档翻译成 12 种支持的语言中的任意一种,例如中文、西班牙语或德语。
99
+ 将您的文档翻译成 12 种支持的语言中的任何一种,例如中文、西班牙语或德语。
81
100
  </x-card>
82
101
  <x-card data-title="发布您的文档" data-icon="lucide:rocket" data-href="/guides/publishing-your-docs">
83
- 将您的文档在线发布,供您的团队或公众使用。
102
+ 将您的文档在线提供给您的团队或公众。
84
103
  </x-card>
85
- <x-card data-title="审查配置" data-icon="lucide:settings" data-href="/configuration/initial-setup">
86
- 审查并修改在初始设置期间创建的 config.yaml 文件,以调整您的偏好。
104
+ <x-card data-title="审阅配置" data-icon="lucide:settings" data-href="/configuration/initial-setup">
105
+ 审阅和修改在初始设置期间创建的 config.yaml 文件以调整您的偏好。
87
106
  </x-card>
88
- </x-cards>
107
+ </x-cards>
@@ -1,51 +1,52 @@
1
1
  # Cleaning Up
2
2
 
3
- The `aigne doc clear` command provides a straightforward method for removing generated files, cached data, and configuration settings. This is useful when you want to reset your documentation project, start from a clean state, or troubleshoot issues related to outdated or corrupted files.
3
+ The `aigne doc clear` command provides a systematic method for removing generated files, cached data, and configuration settings from your project. This is a practical step when you need to reset the documentation workspace, start from a clean state, or resolve issues that may be caused by outdated files.
4
4
 
5
5
  ## Interactive Cleaning
6
6
 
7
- The simplest way to use the command is to run it without any arguments:
7
+ For controlled and precise cleanup, running the command without any arguments is the recommended procedure.
8
8
 
9
9
  ```bash
10
10
  aigne doc clear
11
11
  ```
12
12
 
13
- Executing this command will launch an interactive prompt, allowing you to select precisely which items you want to remove. This is the recommended approach for most use cases as it provides clear descriptions for each option and prevents accidental data loss.
13
+ This action initiates an interactive prompt, which lists all available cleanup options. Each option is presented with a clear description of what it does, allowing you to select the exact items for removal. This interactive method prevents the accidental deletion of important data.
14
14
 
15
- ## Cleanup Targets
15
+ ## Cleanup Options
16
16
 
17
- The `clear` command can remove several distinct types of data. The following table details each available target, what it does, and the specific files or directories it affects.
17
+ The `clear` command can remove several distinct types of data. The following table provides a detailed breakdown of each available option, its function, and the specific files or directories it affects.
18
18
 
19
- | Target | Description | Files and Directories Affected |
19
+ | Option | Description | Files and Directories Affected |
20
20
  | :--- | :--- | :--- |
21
- | `generatedDocs` | Deletes all generated documents in your output directory, but keeps the documentation structure plan. | The directory specified by `docsDir` in your configuration. |
22
- | `documentStructure` | Deletes all generated documents and the documentation structure plan, effectively resetting your documentation content. | The `.aigne/doc-smith/output/structure-plan.json` file and the `docsDir` directory. |
23
- | `documentConfig` | Deletes the project's configuration file. You will need to run `aigne doc init` again after this. | The `.aigne/doc-smith/config.yaml` file. |
24
- | `authTokens` | Removes saved authorization tokens for publishing sites. You will be prompted to select which sites to clear. | The `~/.aigne/doc-smith-connected.yaml` file in your home directory. |
25
- | `deploymentConfig` | Deletes the `appUrl` from your configuration file. | The `.aigne/doc-smith/config.yaml` file. |
21
+ | `generatedDocs` | Deletes all generated documents located in the output directory. The documentation structure plan is preserved. | The directory specified by `docsDir` in your configuration. |
22
+ | `documentStructure` | Deletes all generated documents and the documentation structure plan. This action resets all documentation content. | The `.aigne/doc-smith/output/structure-plan.json` file and the `docsDir` directory. |
23
+ | `documentConfig` | Deletes the project's configuration file. After this action, `aigne doc init` must be run to create a new configuration. | The `.aigne/doc-smith/config.yaml` file. |
24
+ | `authTokens` | Removes saved authorization tokens for publishing sites. You will be prompted to select which site authorizations to clear. | The `~/.aigne/doc-smith-connected.yaml` file located in your home directory. |
25
+ | `deploymentConfig` | Removes only the `appUrl` setting from your configuration file, leaving other settings intact. | The `.aigne/doc-smith/config.yaml` file. |
26
+ | `mediaDescription` | Deletes the cached, AI-generated descriptions for your media files. These will be regenerated during the next documentation build. | The `.aigne/doc-smith/cache/media-description.json` file. |
26
27
 
27
28
  ## Non-Interactive Cleaning
28
29
 
29
- For automated scripts or users who prefer the command line, you can specify one or more targets to clear directly using the `--targets` flag. This will bypass the interactive prompt.
30
+ For use in automated scripts or for users who prefer direct command-line operations, you can specify one or more cleanup targets using the `--targets` flag. This bypasses the interactive prompt and executes the cleanup immediately.
30
31
 
31
- ### Clear a Single Target
32
+ ### Clear a Single Option
32
33
 
33
- To clear only the generated documents, use the following command:
34
+ To remove only the generated documents, execute the following command:
34
35
 
35
36
  ```bash
36
37
  aigne doc clear --targets generatedDocs
37
38
  ```
38
39
 
39
- ### Clear Multiple Targets
40
+ ### Clear Multiple Options
40
41
 
41
- You can provide multiple target names to clear several items at once. For example, to remove both the document configuration and the documentation structure, run:
42
+ You can provide a space-separated list of target names to remove several items at once. For instance, to delete both the document configuration and the documentation structure, run the command below:
42
43
 
43
44
  ```bash
44
45
  aigne doc clear --targets documentConfig documentStructure
45
46
  ```
46
47
 
47
- After clearing your configuration, you can start fresh by running the setup process again.
48
+ After clearing the configuration, you can begin a new setup process.
48
49
 
49
50
  ---
50
51
 
51
- For more information on the initial setup, refer to the [Initial Setup](./configuration-initial-setup.md) guide.
52
+ For detailed instructions on creating a new configuration, please refer to the [Initial Setup](./configuration-initial-setup.md) guide.
@@ -1,66 +1,107 @@
1
1
  # Evaluating Documents
2
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.
3
+ The `evaluate` command provides a systematic method to assess the quality and completeness of your generated documentation. It analyzes both the overall document structure and the content of individual files against the criteria defined during project setup. The process concludes by generating a detailed report, which helps identify areas for improvement and ensures the documentation aligns with its intended purpose and audience.
4
4
 
5
- ## How It Works
5
+ ## The Evaluation Process
6
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.
7
+ The evaluation command executes a two-stage analysis to provide a comprehensive assessment of your documentation.
8
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.
9
+ ```d2
10
+ direction: down
11
11
 
12
- Upon completion, the tool compiles the findings into a user-friendly HTML report, providing both high-level scores and detailed, actionable feedback.
12
+ start: {
13
+ label: "Run Command\naignite evaluate"
14
+ shape: oval
15
+ }
13
16
 
14
- ## Running the Evaluation
17
+ structure-eval: {
18
+ label: "Stage 1: Evaluate\nDocument Structure"
19
+ shape: rectangle
20
+ }
15
21
 
16
- To initiate the evaluation process, execute the following command in your terminal:
22
+ content-eval: {
23
+ label: "Stage 2: Evaluate\nDocument Content"
24
+ shape: rectangle
25
+ }
26
+
27
+ report-gen: {
28
+ label: "Generate Report"
29
+ shape: rectangle
30
+ }
31
+
32
+ output: {
33
+ label: "Output HTML &\nJSON Report Files"
34
+ shape: oval
35
+ }
36
+
37
+ start -> structure-eval: "Analyzes overall organization"
38
+ structure-eval -> content-eval: "Analyzes each file individually"
39
+ content-eval -> report-gen: "Aggregates all findings"
40
+ report-gen -> output: "Saves report to disk"
41
+ ```
42
+
43
+ 1. **Structure Evaluation**: The tool first examines the documentation's high-level organization, analogous to a table of contents. It verifies whether the structure is logical and complete based on the specified documentation goals, target audience, and content depth.
44
+ 2. **Content Evaluation**: Following the structural analysis, the tool inspects the content of each document. It scores each file against several quality dimensions, including readability, coherence, and factual accuracy. It also validates the correctness and formatting of included code snippets.
45
+
46
+ The findings from both stages are compiled into an HTML report that presents high-level scores and specific, actionable feedback.
47
+
48
+ ## How to Run an Evaluation
49
+
50
+ To initiate the evaluation process, execute the `evaluate` command from your project's root directory.
51
+
52
+ ### Execute the Command
53
+
54
+ Open your terminal and run the following command:
17
55
 
18
56
  ```bash
19
57
  aignite evaluate
20
58
  ```
21
59
 
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.
60
+ The tool will display its progress as it analyzes the documentation.
61
+
62
+ ### Review the Output
63
+
64
+ Upon completion, a confirmation message will appear in the terminal, specifying the location of the generated report files.
23
65
 
24
66
  ```text
25
67
  ✔ Generate evaluation report
26
68
  Evaluation report generated successfully.
27
- - JSON Report: .aigc/evaluate/20231027103000/integrity-report.json
28
- - HTML Report: .aigc/evaluate/20231027103000/report.html
69
+ - JSON Report: .aigc/evaluate/20240520114500/integrity-report.json
70
+ - HTML Report: .aigc/evaluate/20240520114500/report.html
29
71
  ```
30
72
 
31
- You can open the `report.html` file in your web browser to view the detailed analysis.
73
+ Open the `report.html` file in a web browser to view the detailed analysis.
32
74
 
33
- ## Understanding the Report
75
+ ## Understanding the Evaluation Report
34
76
 
35
- The evaluation report is organized into two main sections, reflecting the two stages of the analysis process.
77
+ The report is organized into sections that correspond to the stages of the evaluation process, providing a clear breakdown of the analysis.
36
78
 
37
- ### Structure Evaluation
79
+ ### Structure Evaluation Details
38
80
 
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.
81
+ This section presents feedback on the overall architecture of your documentation. It measures how effectively the document hierarchy aligns with the project's configuration.
40
82
 
41
83
  | Dimension | Description |
42
84
  | :--- | :--- |
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"). |
85
+ | **Purpose Coverage** | Assesses if the document structure adequately supports the primary goals selected (e.g., "Get started quickly"). |
86
+ | **Audience Coverage** | Determines if the structure is organized in a way that is suitable for the defined target audience (e.g., "non-technical users"). |
87
+ | **Depth Coverage** | Checks if the level of detail implied by the structure matches the selected content depth (e.g., "covers all parameters"). |
46
88
 
47
- ### Document Content Evaluation
89
+ ### Document Content Evaluation Details
48
90
 
49
- This section provides a document-by-document breakdown of content quality. Each document is scored based on a set of standardized criteria.
91
+ This section provides a file-by-file breakdown of content quality. Each document is scored based on a set of standardized criteria.
50
92
 
51
93
  | Dimension | Description |
52
94
  | :--- | :--- |
53
- | **Readability** | Measures how easy the text is to read and comprehend. |
95
+ | **Readability** | Measures the ease with which the text can be read and understood. |
54
96
  | **Coherence** | Evaluates the logical flow and organization of information within the document. |
55
97
  | **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. |
98
+ | **Consistency** | Checks for uniform terminology, formatting, and style throughout the document. |
99
+ | **Purpose Alignment** | Determines how well the content fulfills the specified documentation goals. |
100
+ | **Audience Alignment** | Assesses if the language, tone, and examples are appropriate for the target audience. |
101
+ | **Knowledge Level Alignment** | Checks if the content's complexity matches the defined reader knowledge level. |
61
102
 
62
103
  ## Summary
63
104
 
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.
105
+ Using the `evaluate` command is an essential step for maintaining accurate and effective documentation. It provides objective metrics and specific feedback, enabling a methodical approach to refining your content. After reviewing the evaluation report, you can make targeted improvements to enhance documentation quality.
65
106
 
66
- For the next steps on modifying your documents based on this feedback, please see the guide on [Updating Documentation](./guides-updating-documentation.md).
107
+ For guidance on modifying your documents based on this feedback, refer to the [Updating Documentation](./guides-updating-documentation.md) guide.