@aigne/doc-smith 0.8.11-beta.5 → 0.8.11-beta.6

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 (95) hide show
  1. package/.aigne/doc-smith/config.yaml +1 -1
  2. package/.release-please-manifest.json +1 -1
  3. package/CHANGELOG.md +9 -2
  4. package/README.md +1 -1
  5. package/agents/clear/choose-contents.mjs +2 -2
  6. package/agents/clear/clear-document-structure.mjs +8 -8
  7. package/agents/clear/index.yaml +1 -1
  8. package/agents/evaluate/document-structure.yaml +1 -1
  9. package/agents/generate/check-document-structure.yaml +3 -3
  10. package/agents/generate/check-need-generate-structure.mjs +8 -8
  11. package/agents/generate/document-structure-tools/add-document.mjs +3 -3
  12. package/agents/generate/document-structure-tools/delete-document.mjs +2 -2
  13. package/agents/generate/document-structure-tools/move-document.mjs +3 -2
  14. package/agents/generate/document-structure-tools/update-document.mjs +2 -2
  15. package/agents/generate/generate-structure.yaml +1 -1
  16. package/agents/generate/update-document-structure.yaml +3 -3
  17. package/agents/generate/user-review-document-structure.mjs +10 -10
  18. package/agents/update/batch-generate-document.yaml +1 -1
  19. package/agents/update/check-document.mjs +2 -2
  20. package/agents/utils/check-feedback-refiner.mjs +1 -1
  21. package/agents/utils/choose-docs.mjs +1 -1
  22. package/agents/utils/load-document-all-content.mjs +3 -3
  23. package/agents/utils/load-sources.mjs +1 -1
  24. package/agents/utils/save-docs.mjs +7 -28
  25. package/aigne.yaml +2 -2
  26. package/docs/_sidebar.md +1 -1
  27. package/docs/advanced-how-it-works.md +3 -3
  28. package/docs/advanced-quality-assurance.md +1 -1
  29. package/docs/cli-reference.ja.md +151 -80
  30. package/docs/cli-reference.md +126 -55
  31. package/docs/cli-reference.zh-TW.md +133 -62
  32. package/docs/cli-reference.zh.md +143 -72
  33. package/docs/configuration-interactive-setup.md +1 -1
  34. package/docs/configuration-language-support.md +1 -1
  35. package/docs/configuration-preferences.md +1 -1
  36. package/docs/configuration.ja.md +104 -48
  37. package/docs/configuration.md +58 -2
  38. package/docs/configuration.zh-TW.md +99 -42
  39. package/docs/configuration.zh.md +78 -21
  40. package/docs/features-generate-documentation.ja.md +63 -44
  41. package/docs/features-generate-documentation.md +54 -35
  42. package/docs/features-generate-documentation.zh-TW.md +67 -48
  43. package/docs/features-generate-documentation.zh.md +61 -41
  44. package/docs/features-publish-your-docs.ja.md +69 -46
  45. package/docs/features-publish-your-docs.md +65 -42
  46. package/docs/features-publish-your-docs.zh-TW.md +73 -50
  47. package/docs/features-publish-your-docs.zh.md +67 -44
  48. package/docs/features-translate-documentation.ja.md +35 -33
  49. package/docs/features-translate-documentation.md +24 -22
  50. package/docs/features-translate-documentation.zh-TW.md +32 -30
  51. package/docs/features-translate-documentation.zh.md +29 -27
  52. package/docs/features-update-and-refine.ja.md +120 -66
  53. package/docs/features-update-and-refine.md +110 -56
  54. package/docs/features-update-and-refine.zh-TW.md +116 -62
  55. package/docs/features-update-and-refine.zh.md +118 -64
  56. package/docs/getting-started.ja.md +22 -22
  57. package/docs/getting-started.md +1 -1
  58. package/docs/getting-started.zh-TW.md +16 -16
  59. package/docs/getting-started.zh.md +28 -28
  60. package/docs/overview.md +3 -3
  61. package/docs-mcp/analyze-docs-relevance.yaml +6 -6
  62. package/docs-mcp/docs-search.yaml +1 -1
  63. package/package.json +2 -2
  64. package/prompts/common/document-structure/conflict-resolution-guidance.md +3 -3
  65. package/prompts/common/document-structure/document-structure-rules.md +2 -2
  66. package/prompts/detail/document-rules.md +1 -1
  67. package/prompts/detail/generate-document.md +1 -1
  68. package/prompts/evaluate/document-structure.md +6 -6
  69. package/prompts/structure/check-document-structure.md +10 -10
  70. package/prompts/structure/document-rules.md +2 -2
  71. package/prompts/structure/generate-structure-system.md +3 -3
  72. package/prompts/structure/structure-example.md +1 -1
  73. package/prompts/structure/structure-getting-started.md +1 -1
  74. package/prompts/structure/update-document-structure.md +9 -9
  75. package/prompts/utils/feedback-refiner.md +1 -1
  76. package/tests/agents/clear/choose-contents.test.mjs +1 -1
  77. package/tests/agents/clear/clear-document-structure.test.mjs +36 -30
  78. package/tests/agents/evaluate/generate-report.test.mjs +1 -1
  79. package/tests/agents/generate/check-need-generate-structure.test.mjs +1 -1
  80. package/tests/agents/generate/document-structure-tools/add-document.test.mjs +2 -2
  81. package/tests/agents/generate/document-structure-tools/delete-document.test.mjs +4 -4
  82. package/tests/agents/generate/document-structure-tools/move-document.test.mjs +3 -3
  83. package/tests/agents/generate/document-structure-tools/update-document.test.mjs +3 -3
  84. package/tests/agents/generate/user-review-document-structure.test.mjs +7 -5
  85. package/tests/agents/update/check-document.test.mjs +1 -1
  86. package/tests/agents/utils/format-document-structure.test.mjs +5 -5
  87. package/tests/agents/utils/load-sources.test.mjs +4 -4
  88. package/tests/agents/utils/save-docs.test.mjs +1 -1
  89. package/tests/utils/conflict-detector.test.mjs +1 -1
  90. package/tests/utils/docs-finder-utils.test.mjs +8 -8
  91. package/types/document-structure-schema.mjs +9 -9
  92. package/utils/conflict-detector.mjs +1 -1
  93. package/utils/constants/index.mjs +4 -4
  94. package/utils/docs-finder-utils.mjs +11 -11
  95. package/utils/markdown-checker.mjs +1 -1
@@ -1,17 +1,17 @@
1
1
  # 入門指南
2
2
 
3
- 本指南將逐步引導您安裝 AIGNE DocSmith、設定專案,並從您的原始碼產生一套完整的說明文件。
3
+ 本指南將逐步引導您安裝 AIGNE DocSmith、設定專案,並從您的原始碼產生一套完整的文件。
4
4
 
5
5
  ## 步驟 1:先決條件
6
6
 
7
- 在開始之前,請確保您的系統上已安裝 Node.js 及其套件管理器 npm。DocSmith 是一個在 Node.js 環境中執行的命令列工具。
7
+ 在開始之前,請確保您的系統上已安裝 Node.js 及其套件管理器 npm。DocSmith 是一個在 Node.js 環境中運行的命令列工具。
8
8
 
9
9
  ### 安裝 Node.js
10
10
 
11
11
  以下是在各種作業系統上安裝 Node.js 的簡要說明。
12
12
 
13
13
  **Windows**
14
- 1. [Node.js 官方網站](https://nodejs.org/) 下載安裝程式。
14
+ 1. 從官方 [Node.js 網站](https://nodejs.org/) 下載安裝程式。
15
15
  2. 執行 `.msi` 安裝程式並依照安裝精靈的步驟進行。
16
16
 
17
17
  **macOS**
@@ -38,7 +38,7 @@ curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
38
38
  sudo apt-get install -y nodejs
39
39
  ```
40
40
 
41
- 對於基於 CentOS/RHEL/Fedora 的系統:
41
+ 對於 CentOS/RHEL/Fedora 系統:
42
42
 
43
43
  ```bash Terminal icon=lucide:laptop
44
44
  curl -fsSL https://rpm.nodesource.com/setup_lts.x | sudo bash -
@@ -62,7 +62,7 @@ DocSmith 工具包含在 AIGNE 命令列介面 (CLI) 中。請使用 npm 全域
62
62
  npm i -g @aigne/cli
63
63
  ```
64
64
 
65
- 安裝完成後,請執行說明文件的說明指令來驗證:
65
+ 安裝完成後,請執行文件工具的說明指令來進行驗證:
66
66
 
67
67
  ```bash Terminal
68
68
  aigne doc -h
@@ -70,7 +70,7 @@ aigne doc -h
70
70
 
71
71
  此指令將顯示 DocSmith 的說明選單,確認其已準備就緒可供使用。
72
72
 
73
- ## 步驟 3:產生您的說明文件
73
+ ## 步驟 3:產生您的文件
74
74
 
75
75
  安裝 CLI 後,您只需一個指令即可產生文件。請在終端機中導覽至您專案的根目錄並執行:
76
76
 
@@ -80,15 +80,15 @@ aigne doc generate
80
80
 
81
81
  ### 自動設定
82
82
 
83
- 當您首次在專案中執行此指令時,DocSmith 會偵測到尚無設定,並自動啟動一個互動式設定精靈。
83
+ 當您首次在專案中執行此指令時,DocSmith 會偵測到尚無設定檔,並自動啟動互動式設定精靈。
84
84
 
85
85
  ![執行 generate 指令會啟動設定精靈](https://docsmith.aigne.io/image-bin/uploads/0c45a32667c5250e54194a61d9495965.png)
86
86
 
87
- 系統將會提示您一系列問題,以定義說明文件的特性,包括:
87
+ 系統將會提示您回答一系列問題,以定義文件的特性,包括:
88
88
 
89
89
  - 主要目的與風格。
90
90
  - 預期的目標讀者。
91
- - 主要語言及任何用於翻譯的其他語言。
91
+ - 主要語言以及任何用於翻譯的其他語言。
92
92
  - 供 AI 分析的原始碼路徑。
93
93
  - 產生文件的輸出目錄。
94
94
 
@@ -98,24 +98,24 @@ aigne doc generate
98
98
 
99
99
  ![DocSmith 正在規劃結構並產生文件](https://docsmith.aigne.io/image-bin/uploads/d0766c19380a02eb8a6f8ce86a838849.png)
100
100
 
101
- ## 步驟 4:檢閱您的輸出
101
+ ## 步驟 4:檢視您的產出
102
102
 
103
103
  產生過程結束後,您的終端機中將會顯示一則確認訊息。
104
104
 
105
- ![成功產生說明文件的訊息](https://docsmith.aigne.io/image-bin/uploads/0967443611408ad9d0042793d590b8fd.png)
105
+ ![文件成功產生的訊息](https://docsmith.aigne.io/image-bin/uploads/0967443611408ad9d0042793d590b8fd.png)
106
106
 
107
- 您新的說明文件現在位於您在設定過程中指定的輸出目錄中。預設位置是 `.aigne/doc-smith/docs`。
107
+ 您的新文件現在位於您在設定過程中指定的輸出目錄中。預設位置為 `.aigne/doc-smith/docs`。
108
108
 
109
- ## 接下來呢?
109
+ ## 下一步是什麼?
110
110
 
111
- 現在您已經產生了第一份文件,可以探索其他功能:
111
+ 既然您已產生了第一份文件,您可以探索其他功能:
112
112
 
113
113
  <x-cards>
114
114
  <x-card data-title="核心功能" data-icon="lucide:box" data-href="/features">
115
- 探索主要指令與功能,從更新文件到線上發布。
115
+ 探索主要指令與功能,從更新文件到線上發佈。
116
116
  </x-card>
117
117
  <x-card data-title="設定指南" data-icon="lucide:settings" data-href="/configuration">
118
- 了解如何透過編輯 config.yaml 檔案來微調您文件的風格、目標讀者和語言。
118
+ 了解如何透過編輯 config.yaml 檔案來微調文件的風格、目標讀者和語言。
119
119
  </x-card>
120
120
  <x-card data-title="CLI 指令參考" data-icon="lucide:terminal" data-href="/cli-reference">
121
121
  取得所有可用的 `aigne doc` 指令及其選項的完整參考。
@@ -1,25 +1,25 @@
1
- # 入门指南
1
+ # 快速入门
2
2
 
3
- 本指南提供了一个分步演练,指导您安装 AIGNE DocSmith、配置项目,并从源代码生成一套完整的文档。
3
+ 本指南将引导您逐步安装 AIGNE DocSmith、配置项目,并从您的源代码生成一套完整的文档。
4
4
 
5
- ## 第 1 步:准备工作
5
+ ## 第 1 步:先决条件
6
6
 
7
- 在开始之前,请确保您的系统上已安装 Node.js 及其包管理器 npm。DocSmith 是一个在 Node.js 环境中运行的命令行工具。
7
+ 在开始之前,请确保您的系统上已安装 Node.js 及其包管理器 npm。DocSmith 是一个在 Node.js 环境下运行的命令行工具。
8
8
 
9
9
  ### 安装 Node.js
10
10
 
11
11
  以下是在各种操作系统上安装 Node.js 的简要说明。
12
12
 
13
13
  **Windows**
14
- 1. 从官方 [Node.js 网站](https://nodejs.org/) 下载安装程序。
14
+ 1. [Node.js 官方网站](https://nodejs.org/) 下载安装程序。
15
15
  2. 运行 `.msi` 安装程序,并按照安装向导中的步骤操作。
16
16
 
17
17
  **macOS**
18
18
 
19
19
  推荐的方法是使用 [Homebrew](https://brew.sh/):
20
20
 
21
- ```bash Terminal icon=lucide:apple
22
- # 如果您没有安装 Homebrew,请先安装
21
+ ```bash 终端 icon=lucide:apple
22
+ # 如果您还没有安装 Homebrew,请先安装
23
23
  /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
24
24
 
25
25
  # 安装 Node.js
@@ -32,7 +32,7 @@ brew install node
32
32
 
33
33
  对于基于 Ubuntu/Debian 的系统:
34
34
 
35
- ```bash Terminal icon=lucide:laptop
35
+ ```bash 终端 icon=lucide:laptop
36
36
  sudo apt update
37
37
  curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
38
38
  sudo apt-get install -y nodejs
@@ -40,47 +40,47 @@ sudo apt-get install -y nodejs
40
40
 
41
41
  对于基于 CentOS/RHEL/Fedora 的系统:
42
42
 
43
- ```bash Terminal icon=lucide:laptop
43
+ ```bash 终端 icon=lucide:laptop
44
44
  curl -fsSL https://rpm.nodesource.com/setup_lts.x | sudo bash -
45
45
  sudo yum install nodejs
46
46
  ```
47
47
 
48
48
  ### 验证
49
49
 
50
- 安装完成后,通过在终端中运行以下命令来验证 Node.js 和 npm 是否可用:
50
+ 安装完成后,在终端中运行以下命令,验证 Node.js 和 npm 是否可用:
51
51
 
52
- ```bash Terminal
52
+ ```bash 终端
53
53
  node --version
54
54
  npm --version
55
55
  ```
56
56
 
57
57
  ## 第 2 步:安装 AIGNE CLI
58
58
 
59
- DocSmith 工具包含在 AIGNE 命令行界面(CLI)中。使用 npm 全局安装最新版本的 AIGNE CLI:
59
+ DocSmith 工具包含在 AIGNE 命令行界面 (CLI) 中。使用 npm 全局安装最新版本的 AIGNE CLI:
60
60
 
61
- ```bash Terminal icon=logos:npm
61
+ ```bash 终端 icon=logos:npm
62
62
  npm i -g @aigne/cli
63
63
  ```
64
64
 
65
- 安装完成后,通过运行文档工具的帮助命令来验证安装:
65
+ 安装完成后,运行文档工具的帮助命令进行验证:
66
66
 
67
- ```bash Terminal
67
+ ```bash 终端
68
68
  aigne doc -h
69
69
  ```
70
70
 
71
- 此命令将显示 DocSmith 的帮助菜单,确认其已准备就绪。
71
+ 该命令将显示 DocSmith 的帮助菜单,确认其已准备就绪。
72
72
 
73
- ## 第 3 步:生成您的文档
73
+ ## 第 3 步:生成文档
74
74
 
75
- 安装 CLI 后,您可以使用单个命令生成文档。在终端中导航到您项目的根目录并运行:
75
+ 安装 CLI 后,您只需一个命令即可生成文档。在终端中导航到您项目的根目录并运行:
76
76
 
77
- ```bash Terminal icon=lucide:sparkles
77
+ ```bash 终端 icon=lucide:sparkles
78
78
  aigne doc generate
79
79
  ```
80
80
 
81
81
  ### 自动配置
82
82
 
83
- 当您首次在项目中运行此命令时,DocSmith 会检测到不存在任何配置,并自动启动一个交互式设置向导。
83
+ 当您在项目中首次运行此命令时,DocSmith 会检测到尚无配置,并自动启动一个交互式设置向导。
84
84
 
85
85
  ![运行 generate 命令会启动设置向导](https://docsmith.aigne.io/image-bin/uploads/0c45a32667c5250e54194a61d9495965.png)
86
86
 
@@ -88,23 +88,23 @@ aigne doc generate
88
88
 
89
89
  - 主要目的和风格。
90
90
  - 目标受众。
91
- - 主要语言以及用于翻译的其他语言。
91
+ - 主要语言及其他需要翻译的语言。
92
92
  - 供 AI 分析的源代码路径。
93
93
  - 生成文档的输出目录。
94
94
 
95
95
  ![回答提示以完成项目设置](https://docsmith.aigne.io/image-bin/uploads/fbedbfa256036ad6375a6c18047a75ad.png)
96
96
 
97
- 配置完成后,DocSmith 将继续分析您的源代码、规划文档结构并生成内容。
97
+ 配置完成后,DocSmith 将开始分析您的源代码,规划文档结构,并生成内容。
98
98
 
99
99
  ![DocSmith 正在规划结构并生成文档](https://docsmith.aigne.io/image-bin/uploads/d0766c19380a02eb8a6f8ce86a838849.png)
100
100
 
101
- ## 第 4 步:检查您的输出
101
+ ## 第 4 步:查看您的输出
102
102
 
103
- 生成过程结束后,您的终端中将显示一条确认消息。
103
+ 生成过程结束后,您的终端将显示一条确认消息。
104
104
 
105
- ![文档生成成功的消息](https://docsmith.aigne.io/image-bin/uploads/0967443611408ad9d0042793d590b8fd.png)
105
+ ![文档生成成功消息](https://docsmith.aigne.io/image-bin/uploads/0967443611408ad9d0042793d590b8fd.png)
106
106
 
107
- 您的新文档现在位于您在设置过程中指定的输出目录中。默认位置是 `.aigne/doc-smith/docs`。
107
+ 您的新文档现已位于您在设置过程中指定的输出目录中。默认位置是 `.aigne/doc-smith/docs`。
108
108
 
109
109
  ## 接下来做什么?
110
110
 
@@ -112,10 +112,10 @@ aigne doc generate
112
112
 
113
113
  <x-cards>
114
114
  <x-card data-title="核心功能" data-icon="lucide:box" data-href="/features">
115
- 探索主要命令和功能,从更新文档到在线发布。
115
+ 探索从更新文档到在线发布的主要命令和功能。
116
116
  </x-card>
117
117
  <x-card data-title="配置指南" data-icon="lucide:settings" data-href="/configuration">
118
- 学习如何通过编辑 config.yaml 文件来微调文档的风格、受众和语言。
118
+ 了解如何通过编辑 config.yaml 文件来微调文档的风格、受众和语言。
119
119
  </x-card>
120
120
  <x-card data-title="CLI 命令参考" data-icon="lucide:terminal" data-href="/cli-reference">
121
121
  获取所有可用的 `aigne doc` 命令及其选项的完整参考。
package/docs/overview.md CHANGED
@@ -14,11 +14,11 @@ The following diagram illustrates how DocSmith fits within the AIGNE architectur
14
14
 
15
15
  DocSmith provides a set of features to automate and simplify the documentation process:
16
16
 
17
- * **Structure Planning:** Analyzes a codebase to generate a logical document structure.
18
- * **Content Generation:** Populates the planned document structure with content generated from the source code.
17
+ * **Structure Planning:** Analyzes a codebase to generate a logical documentation structure.
18
+ * **Content Generation:** Populates the planned documentation structure with content generated from the source code.
19
19
  * **Multi-Language Support:** Translates documentation into 12 languages, including English, Chinese, Japanese, and Spanish.
20
20
  * **AIGNE Hub Integration:** Uses [AIGNE Hub](https://www.aigne.io/en/hub) as an LLM provider, allowing model switching without managing individual API keys.
21
- * **Document Publishing:** Publishes documentation to the official platform at [docsmith.aigne.io](https://docsmith.aigne.io/app/) or to a user's own [Discuss Kit](https://www.arcblock.io/docs/web3-kit/en/discuss-kit) instance.
21
+ * **One-Click Publishing:** Makes your documentation live with shareable links for your team or users. Publish to the official platform at [docsmith.aigne.io](https://docsmith.aigne.io/app/) or to your own [Discuss Kit](https://www.arcblock.io/docs/web3-kit/en/discuss-kit) instance.
22
22
  * **Iterative Updates:** Detects source code changes to update documentation and supports targeted regeneration of specific documents based on user feedback.
23
23
 
24
24
  ## Next Steps
@@ -1,7 +1,7 @@
1
1
  name: analyze-docs-relevance
2
- description: Analyze which documents in the document structure are relevant to the user query
2
+ description: Analyze which documents in the documentation structure are relevant to the user query
3
3
  instructions: |
4
- You are an AI assistant that analyzes the relevance between a user query and documents in a document structure.
4
+ You are an AI assistant that analyzes the relevance between a user query and documents in a documentation structure.
5
5
 
6
6
  <document_structure>
7
7
  {{ originalDocumentStructure }}
@@ -11,9 +11,9 @@ instructions: |
11
11
  {{ query }}
12
12
  </user-query>
13
13
 
14
- Given a user query and a document structure containing multiple documents, your task is to:
14
+ Given a user query and a documentation structure containing multiple documents, your task is to:
15
15
  1. Understand the user's search intent from the query
16
- 2. Analyze each document in the document structure to determine relevance
16
+ 2. Analyze each document in the documentation structure to determine relevance
17
17
  3. Return a list of relevant documents with their paths, titles, and descriptions
18
18
 
19
19
  Consider the following factors for relevance:
@@ -44,7 +44,7 @@ input_schema:
44
44
  type: string
45
45
  description:
46
46
  type: string
47
- description: Document structure containing all available documents
47
+ description: Documentation Structure containing all available documents
48
48
  output_schema:
49
49
  type: object
50
50
  properties:
@@ -52,7 +52,7 @@ output_schema:
52
52
  type: array
53
53
  items:
54
54
  type: string
55
- description: Must be selected from paths in the document structure, cannot be other paths
55
+ description: Must be selected from paths in the documentation structure, cannot be other paths
56
56
  description: List of relevant documents
57
57
  reasoning:
58
58
  type: string
@@ -38,5 +38,5 @@ output_schema:
38
38
  type: string
39
39
  description:
40
40
  type: string
41
- description: List of relevant documents from document structure
41
+ description: List of relevant documents from documentation structure
42
42
  mode: sequential
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aigne/doc-smith",
3
- "version": "0.8.11-beta.5",
3
+ "version": "0.8.11-beta.6",
4
4
  "description": "AI-driven documentation generation tool built on the AIGNE Framework",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -14,7 +14,7 @@
14
14
  "dependencies": {
15
15
  "@aigne/aigne-hub": "^0.10.0",
16
16
  "@aigne/anthropic": "^0.14.0",
17
- "@aigne/cli": "^1.49.0",
17
+ "@aigne/cli": "^1.49.1",
18
18
  "@aigne/core": "^1.61.0",
19
19
  "@aigne/gemini": "^0.14.0",
20
20
  "@aigne/openai": "^0.16.0",
@@ -1,8 +1,8 @@
1
1
  <conflict_resolution_guidance>
2
- When users select potentially conflicting options, conflict resolution guidance will be provided in user_rules. Please carefully read these guidelines and implement the corresponding resolution strategies in the document structure.
2
+ When users select potentially conflicting options, conflict resolution guidance will be provided in user_rules. Please carefully read these guidelines and implement the corresponding resolution strategies in the documentation structure.
3
3
 
4
4
  Core principles for conflict resolution:
5
- 1. **Layered need satisfaction**: Simultaneously satisfy multiple purposes and audiences through reasonable document structure hierarchy
5
+ 1. **Layered need satisfaction**: Simultaneously satisfy multiple purposes and audiences through reasonable documentation structure hierarchy
6
6
  2. **Clear navigation paths**: Provide clear document usage paths for users with different needs
7
7
  3. **Avoid content duplication**: Ensure content across different sections is complementary rather than repetitive
8
8
  4. **Progressive disclosure**: From high-level overview to specific details, meeting needs at different depth levels
@@ -12,5 +12,5 @@ Common conflict resolution patterns:
12
12
  - **Audience conflicts**: Design role-oriented sections or paths
13
13
  - **Depth conflicts**: Adopt progressive structures that allow users to choose appropriate depth levels
14
14
 
15
- When generating document structure, prioritize conflict resolution strategies to ensure the final structure can harmoniously satisfy all user needs.
15
+ When generating documentation structure, prioritize conflict resolution strategies to ensure the final structure can harmoniously satisfy all user needs.
16
16
  </conflict_resolution_guidance>
@@ -16,8 +16,8 @@ Structural planning rules:
16
16
  5. The order of {{nodeName}} in output should follow the target audience's browsing path. It doesn't need to follow the exact order in DataSources—progress from simple to advanced, from understanding to exploration, with reasonable pathways
17
17
  6. Each {{nodeName}} should have a clear content plan and must not duplicate content from other {{nodeName}} items
18
18
  7. Information planned for each {{nodeName}} should be clearly describable within a single page. If there's too much information to display or the concepts are too broad, consider splitting into sub-{{nodeName}} items
19
- 8. If previous document structure and user feedback are provided, make only necessary modifications based on user feedback without major changes
20
- 9. If previous document structure is provided but no feedback is given, **directly return the previous document structure**
19
+ 8. If previous documentation structure and user feedback are provided, make only necessary modifications based on user feedback without major changes
20
+ 9. If previous documentation structure is provided but no feedback is given, **directly return the previous documentation structure**
21
21
  10. If review feedback exists, it indicates your previous generation didn't meet requirements. Optimize your output based on the review feedback
22
22
 
23
23
  {{nodeName}} planning rules:
@@ -8,7 +8,7 @@ Documentation Generation Rules:
8
8
  - Include links to related documents in the introduction using Markdown format to help users navigate to relevant content
9
9
  - Add links to further reading materials in the summary section using Markdown format
10
10
  - Use proper Markdown link syntax, for example: [Next Chapter Title](next_chapter_path)
11
- - **Ensure next_chapter_path references either external URLs or valid paths from the structure plan**—use absolute paths from the structure plan
11
+ - **Ensure next_chapter_path references either external URLs or valid paths from the documentation structure**—use absolute paths from the documentation structure
12
12
  - When DataSources includes third-party links, incorporate them appropriately throughout the document
13
13
  - Structure each section with: title, introduction, code examples, response data samples, and explanatory notes. Place explanations directly after code examples without separate "Example Description" subheadings
14
14
  - Maintain content completeness and logical flow so users can follow the documentation seamlessly
@@ -40,7 +40,7 @@ Custom code block generation rules:
40
40
  Diagram generate guide:
41
41
  Evaluate for each document whether diagrams are necessary.
42
42
  - Use diagrams to clarify complex concepts and diversify the presentation of the page.
43
- - The document overview page must include an architecture diagram that illustrates the entire document structure.
43
+ - The document overview page must include an architecture diagram that illustrates the entire documentation structure.
44
44
  - For the first page of each section, include a structural diagram of the current module when it adds clarity.
45
45
  - For individual article pages, consider detailed flowcharts when the content or overall architecture warrants them.
46
46
  - The number of diagrams is flexible, but aim for 0-3 diagrams as a practical range.
@@ -1,16 +1,16 @@
1
1
  <role_and_goal>
2
2
 
3
- You are a professional **documentation structure architect** responsible for conducting **high-standard quality** reviews of AI-generated document structure.
4
- Your task is to rigorously evaluate the **completeness and adaptability** of document structure based on the user's selected **document purpose, target audiences, and desired coverage depth**.
3
+ You are a professional **documentation structure architect** responsible for conducting **high-standard quality** reviews of AI-generated documentation structure.
4
+ Your task is to rigorously evaluate the **completeness and adaptability** of documentation structure based on the user's selected **document purpose, target audiences, and desired coverage depth**.
5
5
  You must **precisely map** the correspondence between each module in the structure and user requirements, and provide **compelling reasons** to support scoring in each dimension, ensuring that evaluation results can **effectively guide structure optimization**.
6
6
 
7
7
  </role_and_goal>
8
8
 
9
9
  <context>
10
10
 
11
- **document structure to be evaluated (documentStructure)**:
11
+ **documentation structure to be evaluated (documentStructure)**:
12
12
 
13
- - **Document Structure**
13
+ - **Documentation Structure**
14
14
  {{ documentStructureYaml }}
15
15
 
16
16
  - **User selections**
@@ -22,7 +22,7 @@ You must **precisely map** the correspondence between each module in the structu
22
22
  {{ coverageDepth }}
23
23
 
24
24
  - **Notes**
25
- - The document structure can satisfy multiple purposes or multiple audiences through **different document modules**; a single document is not required to be compatible with all.
25
+ - The documentation structure can satisfy multiple purposes or multiple audiences through **different document modules**; a single document is not required to be compatible with all.
26
26
  - If priorities are provided, missing high-priority items is more serious than missing secondary items.
27
27
 
28
28
  </context>
@@ -66,7 +66,7 @@ Apply these levels to the following key points. Create a separate detail entry f
66
66
 
67
67
  Strictly follow these steps:
68
68
  1. **Mapping Coverage**
69
- - Determine which modules in the document structure correspond to each purpose and audience (list correspondences).
69
+ - Determine which modules in the documentation structure correspond to each purpose and audience (list correspondences).
70
70
  - Note uncovered purposes/audiences (especially high-priority ones) and any depth or hygiene issues tied to specific modules.
71
71
 
72
72
  2. **Assign Levels**
@@ -1,8 +1,8 @@
1
1
  <role_and_goal>
2
- You are a meticulous AI Agent responsible for quality control. Your task is to compare new document structures with previous versions based on specific user feedback. You must act as a strict gatekeeper, ensuring that only intended and explicitly requested changes occur.
2
+ You are a meticulous AI Agent responsible for quality control. Your task is to compare new documentation structures with previous versions based on specific user feedback. You must act as a strict gatekeeper, ensuring that only intended and explicitly requested changes occur.
3
3
 
4
4
  Your primary objective is to validate three critical rules:
5
- 1. **Feedback Implementation**: The new document structure **must** correctly implement all changes requested in the user feedback.
5
+ 1. **Feedback Implementation**: The new documentation structure **must** correctly implement all changes requested in the user feedback.
6
6
  2. **Unrelated Node Stability**: Nodes not mentioned in user feedback **must not have their path or sourcesIds attributes modified**
7
7
  - `path` and `sourcesIds` are critical identifiers linking existing content, and their stability is paramount.
8
8
  - For scenarios where users request adding new nodes, the new nodes may affect the order of existing nodes, which is acceptable.
@@ -10,7 +10,7 @@ Your primary objective is to validate three critical rules:
10
10
  </role_and_goal>
11
11
 
12
12
  <context>
13
- - **Original document structure (originalDocumentStructure)**:
13
+ - **Original documentation structure (originalDocumentStructure)**:
14
14
  <original_document_structure>
15
15
  {{ originalDocumentStructure }}
16
16
  </original_document_structure>
@@ -22,14 +22,14 @@ Your primary objective is to validate three critical rules:
22
22
  ```
23
23
  {% endif %}
24
24
 
25
- - **Newly generated document structure (documentStructure)**:
25
+ - **Newly generated documentation structure (documentStructure)**:
26
26
  <document_structure>
27
27
  {{ documentStructure }}
28
28
  </document_structure>
29
29
  </context>
30
30
 
31
31
  <quality_control_rules>
32
- ### Scenario 1: Initial Run (No Original document Structure)
32
+ ### Scenario 1: Initial Run (No Original Documentation Structure)
33
33
  If `original_document_structure` is null, empty, or not provided, this indicates the first structure generation. There is no baseline for comparison.
34
34
  Your validation automatically passes.
35
35
 
@@ -52,7 +52,7 @@ Your output must be a valid JSON object containing `isValid` and `reason`, retur
52
52
  ```json
53
53
  {
54
54
  "isValid": true,
55
- "reason": "The new document structure correctly implements user feedback while maintaining stability of all unrelated nodes."
55
+ "reason": "The new documentation structure correctly implements user feedback while maintaining stability of all unrelated nodes."
56
56
  }
57
57
  ```
58
58
 
@@ -61,7 +61,7 @@ Your output must be a valid JSON object containing `isValid` and `reason`, retur
61
61
  ```json
62
62
  {
63
63
  "isValid": false,
64
- "reason": "The new document structure fails to correctly implement user feedback. [Please provide specific details, e.g.: 'Feedback requested renaming 'Introduction' to 'Overview', but this change was not executed.']"
64
+ "reason": "The new documentation structure fails to correctly implement user feedback. [Please provide specific details, e.g.: 'Feedback requested renaming 'Introduction' to 'Overview', but this change was not executed.']"
65
65
  }
66
66
  ```
67
67
 
@@ -70,7 +70,7 @@ Your output must be a valid JSON object containing `isValid` and `reason`, retur
70
70
  ```json
71
71
  {
72
72
  "isValid": false,
73
- "reason": "The new document structure modified unrelated nodes, which is not allowed. [Please provide specific details, e.g.: 'The path of node 'API Reference' was changed from '/api' to '/reference/api' without any feedback requesting this change. This is a critical error.']"
73
+ "reason": "The new documentation structure modified unrelated nodes, which is not allowed. [Please provide specific details, e.g.: 'The path of node 'API Reference' was changed from '/api' to '/reference/api' without any feedback requesting this change. This is a critical error.']"
74
74
  }
75
75
  ```
76
76
 
@@ -78,7 +78,7 @@ Your output must be a valid JSON object containing `isValid` and `reason`, retur
78
78
  ```json
79
79
  {
80
80
  "isValid": false,
81
- "reason": "The document structure contains nodes without associated data sources. Each node must have at least one source file linked through sourcesIds."
81
+ "reason": "The documentation structure contains nodes without associated data sources. Each node must have at least one source file linked through sourcesIds."
82
82
  }
83
83
  ```
84
84
 
@@ -87,7 +87,7 @@ Your output must be a valid JSON object containing `isValid` and `reason`, retur
87
87
  ```json
88
88
  {
89
89
  "isValid": true,
90
- "reason": "Initial document structure generation with no previous version for comparison."
90
+ "reason": "Initial documentation structure generation with no previous version for comparison."
91
91
  }
92
92
  ```
93
93
  </output_constraints>
@@ -1,6 +1,6 @@
1
- Document structure planning rules:
1
+ Documentation structure rules:
2
2
 
3
- - Generate a comprehensive document structure that encompasses all features in the source code and includes code examples.
3
+ - Generate a comprehensive documentation structure that encompasses all features in the source code and includes code examples.
4
4
  - Plan the structure based on the provided source code, ensuring each planned node has enough information to be displayed.
5
5
  - Group related content in the same section to avoid scattering it across multiple sections and duplicating content.
6
6
  - Keep the structure concise, avoiding splitting the same functionality into multiple parts. If content is too complex to present together without hurting readability, create sub-levels.
@@ -9,13 +9,13 @@ Key capabilities and behavioral principles:
9
9
  - Structured Thinking: Strong logical analysis capabilities to decompose complex information into clear chapters, sections, and items, establishing reasonable hierarchical relationships.
10
10
  - User-Oriented Approach: Ability to flexibly adjust the focus and level of detail in structural planning based on document objectives and audience characteristics provided by users.
11
11
  - Modular Design: Tendency to divide documents into independent, reusable modules or sections for easy content population and subsequent maintenance.
12
- - Flexibility and Adaptability: Ability to handle multiple types of data sources and design the most suitable document structure based on data source characteristics (such as code function/class structures, API endpoints/parameters, text paragraphs/themes).
12
+ - Flexibility and Adaptability: Ability to handle multiple types of data sources and design the most suitable documentation structure based on data source characteristics (such as code function/class structures, API endpoints/parameters, text paragraphs/themes).
13
13
  - Clarity and Completeness: Ensure the final structural plan is easy to understand and can guide the LLM to generate a comprehensive and well-organized document.
14
14
 
15
15
 
16
16
  Objectives:
17
- - This structural plan should be reasonable and clear, capable of comprehensively displaying information from the user-provided context while providing users with logical browsing paths.
18
- - Each {{nodeName}} should include: {{nodeName}} title, a one-sentence introduction to the main information this {{nodeName}} displays, with information presentation and organization methods matching the target audience.
17
+ - Create a clear and logical structural plan that comprehensively presents information from the user-provided context while providing users with intuitive navigation paths.
18
+ - Each {{nodeName}} should include: a {{nodeName}} title, a one-sentence introduction describing its main content, with presentation and organization methods tailored to the target audience.
19
19
 
20
20
  {% include "../common/document-structure/intj-traits.md" %}
21
21
 
@@ -1,5 +1,5 @@
1
1
  <document_structure_examples>
2
- Below are some high-quality document structure examples for your reference:
2
+ Below are some high-quality documentation structure examples for your reference:
3
3
 
4
4
  Example A: Open Source Frontend Framework Docs
5
5
  ```yaml
@@ -1,5 +1,5 @@
1
1
  <getting_started_document_structure_rules>
2
- Based on the provided data sources, plan a Getting Started document structure:
2
+ Based on the provided data sources, plan a Getting Started documentation structure:
3
3
  - The entire structure should be complete and continuous, allowing users to follow the documentation step by step to complete a working example
4
4
  - Each document section should complete a relatively complete step, avoiding overly long individual sections that create reading pressure for users
5
5
  - Provide reference command lines and code as needed to facilitate users following the documentation
@@ -1,7 +1,7 @@
1
1
  <role_and_goal>
2
2
 
3
- You are a document structure update specialist with the strategic mindset of an **INTJ** (The Architect).
4
- You analyze user feedback and intentions to modify existing document structures using specific operations.
3
+ You are a documentation structure update specialist with the strategic mindset of an **INTJ** (The Architect).
4
+ You analyze user feedback and intentions to modify existing documentation structures using specific operations.
5
5
  Your task is to understand user requirements and execute the appropriate structure modifications efficiently and accurately.
6
6
 
7
7
  {% include "../common/document-structure/intj-traits.md" %}
@@ -12,15 +12,15 @@ Processing workflow:
12
12
  - Analyze user feedback to understand the specific intent (add, delete, update, or move sections)
13
13
  - Determine which tools to use based on the user's requirements
14
14
  - Execute the appropriate operations using available tools
15
- - Ensure all modifications maintain document structure integrity
15
+ - Ensure all modifications maintain documentation structure integrity
16
16
 
17
17
  Rules:
18
- ** Never generate new document structures directly. All changes must be made using Tools. **
19
- ** Use the document structure returned by Tools as the latest version, check if it satisfies the user's feedback, and if so, return the latest version directly. **
18
+ ** Never generate new documentation structures directly. All changes must be made using Tools. **
19
+ ** Use the documentation structure returned by Tools as the latest version, check if it satisfies the user's feedback, and if so, return the latest version directly. **
20
20
 
21
21
  Objectives:
22
- - This structural plan should be reasonable and clear, capable of comprehensively displaying information from the user-provided context while providing users with logical browsing paths.
23
- - Each {{nodeName}} should include: {{nodeName}} title, a one-sentence introduction to the main information this {{nodeName}} displays, with information presentation and organization methods matching the target audience.
22
+ - Create a clear and logical structural plan that comprehensively presents information from the user-provided context while providing users with intuitive navigation paths.
23
+ - Each {{nodeName}} should include: a {{nodeName}} title, a one-sentence introduction describing its main content, with presentation and organization methods tailored to the target audience.
24
24
 
25
25
  </role_and_goal>
26
26
 
@@ -28,7 +28,7 @@ Objectives:
28
28
 
29
29
  {% include "../common/document-structure/user-preferences.md" %}
30
30
 
31
- Initial Document Structure:
31
+ Initial Documentation Structure:
32
32
  <initial_document_structure>
33
33
  {{documentStructure}}
34
34
  </initial_document_structure>
@@ -87,7 +87,7 @@ Operation execution rules:
87
87
  - **Use only the appropriate tools** based on the determined operation type
88
88
  - **Validate all required parameters** before calling tools
89
89
  - **Maintain data integrity** by ensuring all constraints are met
90
- - **Only use Tools to update data** Use provided Tools to modify document structure, use the document structure returned by Tools as the latest version
90
+ - **Only use Tools to update data** Use provided Tools to modify documentation structure, use the documentation structure returned by Tools as the latest version
91
91
  - **Use Tool return results** When all Tool calls are complete, directly use the result from the last Tool
92
92
 
93
93
  Tool usage guidelines:
@@ -33,7 +33,7 @@ Save determination rules:
33
33
  **One-time operations (do not save)**:
34
34
  - Only corrects current version/typos/individual phrasing/local factual errors with no stable reusable value → `save=false`
35
35
  - Fixes that are highly specific to a single line or data point and unlikely to recur (e.g., "change the year from 2020 to 2021") → `save=false`
36
- - Document structure adjustments, adding new documents, and moving document positions are always one-time operations → `save=false`
36
+ - Documentation Structure adjustments, adding new documents, and moving document positions are always one-time operations → `save=false`
37
37
 
38
38
  **Reusable policies (save)**:
39
39
  - Writing styles, structural conventions, inclusion/exclusion items, translation conventions that are broadly applicable and should be consistently executed in the future → `save=true`
@@ -15,7 +15,7 @@ describe("choose-contents", () => {
15
15
  path: "/test/docs",
16
16
  })),
17
17
  clearDocumentStructure: mock(async () => ({
18
- message: "Document structure cleared",
18
+ message: "Documentation Structure cleared",
19
19
  cleared: true,
20
20
  path: "/test/structure.json",
21
21
  })),