@aigne/doc-smith 0.8.12-beta.6 → 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.
- package/.aigne/doc-smith/config.yaml +1 -1
- package/.aigne/doc-smith/history.yaml +37 -0
- package/.aigne/doc-smith/media-description.yaml +91 -0
- package/.aigne/doc-smith/preferences.yml +12 -0
- package/.aigne/doc-smith/upload-cache.yaml +36 -69
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +24 -0
- package/agents/clear/choose-contents.mjs +14 -1
- package/agents/clear/clear-media-description.mjs +129 -0
- package/agents/clear/index.yaml +3 -1
- package/agents/evaluate/code-snippet.mjs +28 -24
- package/agents/evaluate/document-structure.yaml +0 -4
- package/agents/evaluate/document.yaml +1 -5
- package/agents/generate/index.yaml +1 -0
- package/agents/generate/update-document-structure.yaml +9 -3
- package/agents/history/view.mjs +5 -2
- package/agents/init/index.mjs +10 -0
- package/agents/media/batch-generate-media-description.yaml +44 -0
- package/agents/media/generate-media-description.yaml +47 -0
- package/agents/media/load-media-description.mjs +238 -0
- package/agents/update/generate-document.yaml +10 -4
- package/agents/update/index.yaml +1 -0
- package/agents/update/update-document-detail.yaml +9 -3
- package/agents/update/user-review-document.mjs +2 -1
- package/agents/utils/load-sources.mjs +103 -53
- package/aigne.yaml +6 -0
- package/assets/report-template/report.html +34 -34
- package/docs/configuration-initial-setup.md +74 -55
- package/docs/configuration.ja.md +59 -86
- package/docs/configuration.md +59 -86
- package/docs/configuration.zh-TW.md +59 -86
- package/docs/configuration.zh.md +59 -86
- package/docs/getting-started.ja.md +43 -24
- package/docs/getting-started.md +29 -10
- package/docs/getting-started.zh-TW.md +42 -23
- package/docs/getting-started.zh.md +39 -20
- package/docs/guides-cleaning-up.ja.md +16 -15
- package/docs/guides-cleaning-up.md +19 -17
- package/docs/guides-cleaning-up.zh-TW.md +16 -15
- package/docs/guides-cleaning-up.zh.md +12 -11
- package/docs/guides-evaluating-documents.md +70 -29
- package/docs/guides-generating-documentation.ja.md +34 -32
- package/docs/guides-generating-documentation.md +59 -119
- package/docs/guides-generating-documentation.zh-TW.md +34 -32
- package/docs/guides-generating-documentation.zh.md +30 -28
- package/docs/guides-interactive-chat.md +34 -26
- package/docs/guides-managing-history.ja.md +17 -20
- package/docs/guides-managing-history.md +19 -17
- package/docs/guides-managing-history.zh-TW.md +18 -21
- package/docs/guides-managing-history.zh.md +13 -16
- package/docs/guides-publishing-your-docs.md +40 -35
- package/docs/guides-translating-documentation.ja.md +17 -17
- package/docs/guides-translating-documentation.md +39 -34
- package/docs/guides-translating-documentation.zh-TW.md +21 -21
- package/docs/guides-translating-documentation.zh.md +18 -18
- package/docs/guides-updating-documentation.ja.md +35 -35
- package/docs/guides-updating-documentation.md +11 -9
- package/docs/guides-updating-documentation.zh-TW.md +27 -27
- package/docs/guides-updating-documentation.zh.md +26 -26
- package/docs/overview.ja.md +13 -13
- package/docs/overview.md +2 -2
- package/docs/overview.zh-TW.md +19 -19
- package/docs/overview.zh.md +16 -16
- package/docs/release-notes.md +60 -27
- package/package.json +2 -1
- package/prompts/common/afs/afs-tools-usage.md +5 -0
- package/prompts/common/afs/use-afs-instruction.md +1 -0
- package/prompts/detail/generate/system-prompt.md +0 -13
- package/prompts/detail/generate/user-prompt.md +7 -0
- package/prompts/detail/update/system-prompt.md +1 -2
- package/prompts/detail/update/user-prompt.md +7 -0
- package/prompts/evaluate/document-structure.md +6 -7
- package/prompts/evaluate/document.md +16 -25
- package/prompts/media/media-description/system-prompt.md +35 -0
- package/prompts/media/media-description/user-prompt.md +8 -0
- package/prompts/structure/generate/system-prompt.md +0 -19
- package/prompts/structure/generate/user-prompt.md +22 -1
- package/prompts/structure/update/system-prompt.md +0 -17
- package/prompts/structure/update/user-prompt.md +24 -0
- package/tests/agents/history/view.test.mjs +97 -0
- package/tests/utils/history-utils.test.mjs +125 -97
- package/utils/constants/index.mjs +0 -107
- package/utils/file-utils.mjs +42 -1
- package/utils/history-utils.mjs +3 -3
- package/agents/update/fs-tools/glob.mjs +0 -184
- package/agents/update/fs-tools/grep.mjs +0 -317
- package/agents/update/fs-tools/read-file.mjs +0 -309
- package/media.md +0 -19
- package/tests/agents/update/fs-tools/glob.test.mjs +0 -438
- package/tests/agents/update/fs-tools/grep.test.mjs +0 -279
- package/tests/agents/update/fs-tools/read-file.test.mjs +0 -549
package/docs/overview.zh.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# 概述
|
|
2
2
|
|
|
3
|
-
AIGNE DocSmith 是一款利用人工智能从项目源代码自动创建文档的工具。它基于 AIGNE
|
|
3
|
+
AIGNE DocSmith 是一款利用人工智能从项目源代码自动创建文档的工具。它基于 [AIGNE Framework](https://www.aigne.io/framework) 构建,旨在生成能够准确反映代码库的结构化、多语言文档。
|
|
4
4
|
|
|
5
|
-
DocSmith
|
|
5
|
+
DocSmith 的主要目标是解决手动编写文档时常见的挑战,例如耗时、代码变更后内容过时以及缺乏一致性。通过自动化此过程,DocSmith 有助于确保您的文档保持最新和准确。
|
|
6
6
|
|
|
7
7
|
## 工作原理
|
|
8
8
|
|
|
9
|
-
DocSmith 通过分析项目的源代码来理解其结构、组件和功能。基于此分析,它会生成一套完整的文档,从高级指南到详细的 API
|
|
9
|
+
DocSmith 通过分析项目的源代码来理解其结构、组件和功能。基于此分析,它会生成一套完整的文档,从高级指南到详细的 API 参考。
|
|
10
10
|
|
|
11
11
|
```d2
|
|
12
12
|
direction: down
|
|
@@ -17,7 +17,7 @@ Source-Code: {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
DocSmith: {
|
|
20
|
-
label: "AIGNE DocSmith\n
|
|
20
|
+
label: "AIGNE DocSmith\n(AI 分析引擎)"
|
|
21
21
|
shape: rectangle
|
|
22
22
|
}
|
|
23
23
|
|
|
@@ -34,11 +34,11 @@ DocSmith -> Docs: "生成"
|
|
|
34
34
|
|
|
35
35
|
DocSmith 提供了一系列功能来处理从创建到发布的整个文档生命周期。
|
|
36
36
|
|
|
37
|
-
* **AI
|
|
38
|
-
* **多语言支持**:可将文档翻译成 12
|
|
39
|
-
* **与 LLM
|
|
40
|
-
*
|
|
41
|
-
*
|
|
37
|
+
* **AI 驱动的生成**:分析您的代码库以提出逻辑化的文档结构,并生成解释代码功能的内容。
|
|
38
|
+
* **多语言支持**:可将文档翻译成 12 种语言,包括英语、中文(简体)和日语。翻译过程能够感知上下文,以保持技术准确性。
|
|
39
|
+
* **与 LLM 集成**:可连接各种大语言模型 (LLM)。默认情况下,它使用 [AIGNE Hub](https://www.aigne.io/en/hub),该服务允许您在 Google Gemini 和 OpenAI GPT 等模型之间切换,而无需单独的 API 密钥。您也可以配置自己的 API 密钥以直接访问提供商。
|
|
40
|
+
* **智能更新**:检测源代码中的更改并更新文档的相应部分。您还可以提供具体反馈以优化生成的内容。
|
|
41
|
+
* **发布选项**:通过单个命令发布您生成的文档。您可以部署到官方 DocSmith 平台或您自己的 [Discuss Kit](https://www.web3kit.rocks/discuss-kit) 实例。Discuss Kit 是一项用于托管和展示文档的服务。
|
|
42
42
|
|
|
43
43
|
## 可用命令
|
|
44
44
|
|
|
@@ -46,16 +46,16 @@ DocSmith 通过一组命令进行操作。下表总结了主要命令及其功
|
|
|
46
46
|
|
|
47
47
|
| 命令 | 描述 |
|
|
48
48
|
| :--- | :--- |
|
|
49
|
-
| `generate` |
|
|
50
|
-
| `update` |
|
|
51
|
-
| `translate` | 将文档翻译成 12
|
|
49
|
+
| `generate` | 从您的源文件创建一套新的文档。 |
|
|
50
|
+
| `update` | 根据代码更改或新的反馈修改现有文档。 |
|
|
51
|
+
| `translate` | 将文档翻译成 12 种支持语言中的一种或多种。 |
|
|
52
52
|
| `publish` | 将您的文档部署到一个可实时访问的 URL。 |
|
|
53
|
-
| `evaluate` |
|
|
54
|
-
| `history` |
|
|
55
|
-
| `chat` |
|
|
53
|
+
| `evaluate` | 评估您生成的文档的质量和完整性。 |
|
|
54
|
+
| `history` | 查看对您的文档所做的更新历史。 |
|
|
55
|
+
| `chat` | 启动一个交互式聊天会话,以协助处理文档任务。 |
|
|
56
56
|
| `clear` | 删除生成的文件、配置和缓存数据。 |
|
|
57
57
|
| `prefs` | 管理用于文档生成的已保存偏好和配置。 |
|
|
58
58
|
|
|
59
59
|
---
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
本概述对 AIGNE DocSmith 的用途和功能进行了高级总结。要开始使用该工具,请继续阅读 [快速入门](./getting-started.md) 指南以获取安装和设置说明。
|
package/docs/release-notes.md
CHANGED
|
@@ -1,6 +1,39 @@
|
|
|
1
1
|
# Release Notes
|
|
2
2
|
|
|
3
|
-
This document provides a
|
|
3
|
+
This document provides a chronological record of new features, improvements, and bug fixes for each version of the tool.
|
|
4
|
+
|
|
5
|
+
## Version 0.8.12-beta.7 (2025-10-12)
|
|
6
|
+
|
|
7
|
+
### New Features
|
|
8
|
+
|
|
9
|
+
- The tool can now retrieve context more effectively from the project repository, leading to more accurate documentation.
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
- Disabled Git-based update history tracking within repositories to prevent potential conflicts.
|
|
14
|
+
|
|
15
|
+
## Version 0.8.12-beta.6 (2025-10-11)
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
- Improved the reliability of the publishing process by enhancing login session checks.
|
|
20
|
+
|
|
21
|
+
## Version 0.8.12-beta.5 (2025-10-11)
|
|
22
|
+
|
|
23
|
+
### Bug Fixes
|
|
24
|
+
|
|
25
|
+
- Fixed a bug where the correct language setting was not applied during document checks.
|
|
26
|
+
|
|
27
|
+
## Version 0.8.12-beta.4 (2025-10-11)
|
|
28
|
+
|
|
29
|
+
### New Features
|
|
30
|
+
|
|
31
|
+
- Introduced optimizations for handling large projects, resulting in more efficient document generation.
|
|
32
|
+
|
|
33
|
+
### Bug Fixes
|
|
34
|
+
|
|
35
|
+
- Ensured that generated documents follow a strict heading hierarchy (e.g., no skipping from H1 to H3).
|
|
36
|
+
- Improved the clarity of update notifications and added an option to clear deployment configurations.
|
|
4
37
|
|
|
5
38
|
## Version 0.8.12-beta.3 (2025-10-09)
|
|
6
39
|
|
|
@@ -12,19 +45,19 @@ This document provides a summary of new features, improvements, and bug fixes fo
|
|
|
12
45
|
|
|
13
46
|
### Bug Fixes
|
|
14
47
|
|
|
15
|
-
- Corrected an error with file
|
|
16
|
-
- Fixed
|
|
48
|
+
- Corrected an error with file path resolution when updating documents.
|
|
49
|
+
- Fixed an issue that could cause document generation and updates to fail.
|
|
17
50
|
|
|
18
51
|
## Version 0.8.12-beta.1 (2025-10-08)
|
|
19
52
|
|
|
20
53
|
### New Features
|
|
21
54
|
|
|
22
55
|
- Introduced history tracking, allowing you to view past changes to your documents.
|
|
23
|
-
-
|
|
56
|
+
- Made translation an optional step during the document update process for greater flexibility.
|
|
24
57
|
|
|
25
|
-
###
|
|
58
|
+
### Bug Fixes
|
|
26
59
|
|
|
27
|
-
-
|
|
60
|
+
- Refined the logic for document generation and updates to distinguish between system and user prompts.
|
|
28
61
|
|
|
29
62
|
## Version 0.8.12-beta (2025-10-07)
|
|
30
63
|
|
|
@@ -40,8 +73,8 @@ This version includes general maintenance and stability improvements.
|
|
|
40
73
|
|
|
41
74
|
### New Features
|
|
42
75
|
|
|
43
|
-
- Enhanced the document generator and updater
|
|
44
|
-
-
|
|
76
|
+
- Enhanced the document generator and updater with improved file system tools.
|
|
77
|
+
- Implemented a shared context mechanism to speed up document structure analysis and content refinement.
|
|
45
78
|
|
|
46
79
|
### Bug Fixes
|
|
47
80
|
|
|
@@ -58,18 +91,18 @@ This version includes general maintenance and stability improvements.
|
|
|
58
91
|
|
|
59
92
|
### New Features
|
|
60
93
|
|
|
61
|
-
- Added a "check-only" option for
|
|
94
|
+
- Added a "check-only" option for processes that use selection inputs.
|
|
62
95
|
|
|
63
96
|
### Bug Fixes
|
|
64
97
|
|
|
65
98
|
- Improved error handling in the document selection utility.
|
|
66
|
-
- Tuned the translation prompt
|
|
99
|
+
- Tuned the translation prompt to ensure that only comments within code blocks are translated.
|
|
67
100
|
|
|
68
101
|
## Version 0.8.11-beta.3 (2025-09-29)
|
|
69
102
|
|
|
70
103
|
### Bug Fixes
|
|
71
104
|
|
|
72
|
-
- Added a command-line entry for the evaluation agents.
|
|
105
|
+
- Added a command-line interface entry for the document evaluation agents.
|
|
73
106
|
|
|
74
107
|
## Version 0.8.11-beta.2 (2025-09-27)
|
|
75
108
|
|
|
@@ -82,12 +115,12 @@ This version includes general maintenance and stability improvements.
|
|
|
82
115
|
### New Features
|
|
83
116
|
|
|
84
117
|
- Introduced a document evaluation feature to generate quality reports.
|
|
85
|
-
- Enhanced the document and structure update process with improved tools.
|
|
118
|
+
- Enhanced the document and structure update process with improved internal tools.
|
|
86
119
|
- Improved vendor handling and debugging capabilities during the publishing process.
|
|
87
120
|
|
|
88
121
|
### Bug Fixes
|
|
89
122
|
|
|
90
|
-
- Fixed an issue where component descriptions were treated as attributes instead of text, improving custom component rendering.
|
|
123
|
+
- Fixed an issue where component descriptions were incorrectly treated as attributes instead of text content, improving custom component rendering.
|
|
91
124
|
|
|
92
125
|
## Version 0.8.10 (2025-09-20)
|
|
93
126
|
|
|
@@ -97,14 +130,14 @@ This version includes general maintenance and stability improvements.
|
|
|
97
130
|
|
|
98
131
|
### Bug Fixes
|
|
99
132
|
|
|
100
|
-
- Added links
|
|
101
|
-
- Polished the
|
|
133
|
+
- Added relevant links for enterprise deployment.
|
|
134
|
+
- Polished the text for the document review prompt for better clarity.
|
|
102
135
|
|
|
103
136
|
## Version 0.8.10-beta.2 (2025-09-18)
|
|
104
137
|
|
|
105
138
|
### Bug Fixes
|
|
106
139
|
|
|
107
|
-
- Improved the prompts and display for the documentation structure review.
|
|
140
|
+
- Improved the prompts and display for the documentation structure review feature.
|
|
108
141
|
- Updated the usage rules for field elements to ensure correct rendering.
|
|
109
142
|
|
|
110
143
|
## Version 0.8.10-beta.1 (2025-09-18)
|
|
@@ -128,7 +161,7 @@ This version includes general maintenance and stability improvements.
|
|
|
128
161
|
|
|
129
162
|
### Bug Fixes
|
|
130
163
|
|
|
131
|
-
- Optimized the
|
|
164
|
+
- Optimized the text for inquiry feedback prompts to be clearer and more helpful.
|
|
132
165
|
|
|
133
166
|
## Version 0.8.7 (2025-09-12)
|
|
134
167
|
|
|
@@ -140,11 +173,11 @@ This version includes general maintenance and stability improvements.
|
|
|
140
173
|
|
|
141
174
|
### New Features
|
|
142
175
|
|
|
143
|
-
- The URL is now displayed by default after a successful publishing process.
|
|
176
|
+
- The documentation URL is now displayed by default after a successful publishing process.
|
|
144
177
|
|
|
145
178
|
### Bug Fixes
|
|
146
179
|
|
|
147
|
-
- Ensured that logs are saved correctly during
|
|
180
|
+
- Ensured that logs are saved correctly during deployment to prevent data loss.
|
|
148
181
|
|
|
149
182
|
## Version 0.8.5 (2025-09-10)
|
|
150
183
|
|
|
@@ -156,7 +189,7 @@ This version includes general maintenance and stability improvements.
|
|
|
156
189
|
|
|
157
190
|
### Bug Fixes
|
|
158
191
|
|
|
159
|
-
- Markdown code blocks are now parsed into a custom
|
|
192
|
+
- Markdown code blocks are now parsed into a custom element with support for enhanced attributes like titles and icons.
|
|
160
193
|
- Made the background for D2 diagrams transparent for better integration with different themes.
|
|
161
194
|
|
|
162
195
|
## Version 0.8.3 (2025-09-05)
|
|
@@ -169,7 +202,7 @@ This version includes general maintenance and stability improvements.
|
|
|
169
202
|
|
|
170
203
|
### New Features
|
|
171
204
|
|
|
172
|
-
-
|
|
205
|
+
- Improved D2 chart generation with more comprehensive internal examples to enhance output quality.
|
|
173
206
|
|
|
174
207
|
## Version 0.8.0 (2025-09-03)
|
|
175
208
|
|
|
@@ -181,7 +214,7 @@ This version includes general maintenance and stability improvements.
|
|
|
181
214
|
|
|
182
215
|
### Bug Fixes
|
|
183
216
|
|
|
184
|
-
- Fixed a bug where using the
|
|
217
|
+
- Fixed a bug where using the Tab key for path selection did not work as expected.
|
|
185
218
|
|
|
186
219
|
## Version 0.7.0 (2025-08-30)
|
|
187
220
|
|
|
@@ -195,7 +228,7 @@ This version includes general maintenance and stability improvements.
|
|
|
195
228
|
|
|
196
229
|
### New Features
|
|
197
230
|
|
|
198
|
-
- Implemented
|
|
231
|
+
- Implemented support for media processing before publishing documents.
|
|
199
232
|
|
|
200
233
|
## Version 0.5.0 (2025-08-26)
|
|
201
234
|
|
|
@@ -205,7 +238,7 @@ This version includes general maintenance and stability improvements.
|
|
|
205
238
|
|
|
206
239
|
### Bug Fixes
|
|
207
240
|
|
|
208
|
-
- Polished the text of
|
|
241
|
+
- Polished the text of questions asked during the initial setup process.
|
|
209
242
|
|
|
210
243
|
## Version 0.4.4 (2025-08-22)
|
|
211
244
|
|
|
@@ -229,7 +262,7 @@ This version includes general maintenance and stability improvements.
|
|
|
229
262
|
|
|
230
263
|
### New Features
|
|
231
264
|
|
|
232
|
-
-
|
|
265
|
+
- Refined the workflow for collecting context during document generation.
|
|
233
266
|
|
|
234
267
|
### Bug Fixes
|
|
235
268
|
|
|
@@ -239,7 +272,7 @@ This version includes general maintenance and stability improvements.
|
|
|
239
272
|
|
|
240
273
|
### Bug Fixes
|
|
241
274
|
|
|
242
|
-
- Switched the default language model to improve generation quality.
|
|
275
|
+
- Switched the default large language model to improve generation quality.
|
|
243
276
|
|
|
244
277
|
## Version 0.2.5 (2025-08-08)
|
|
245
278
|
|
|
@@ -251,5 +284,5 @@ This version includes general maintenance and stability improvements.
|
|
|
251
284
|
|
|
252
285
|
### New Features
|
|
253
286
|
|
|
254
|
-
- The tool will now automatically initialize the configuration if it
|
|
287
|
+
- The tool will now automatically initialize the configuration if it is missing when a command is run.
|
|
255
288
|
- Added a new `update` command to refresh documents when source files have changed.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aigne/doc-smith",
|
|
3
|
-
"version": "0.8.12-beta.
|
|
3
|
+
"version": "0.8.12-beta.8",
|
|
4
4
|
"description": "AI-driven documentation generation tool built on the AIGNE Framework",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
"fs-extra": "^11.3.1",
|
|
30
30
|
"glob": "^11.0.3",
|
|
31
31
|
"gpt-tokenizer": "^3.2.0",
|
|
32
|
+
"image-size": "^2.0.2",
|
|
32
33
|
"isbinaryfile": "^5.0.6",
|
|
33
34
|
"jsdom": "^26.1.0",
|
|
34
35
|
"marked": "^15.0.12",
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<afs-tool-usage>
|
|
2
|
+
When to use Tools:
|
|
3
|
+
- During document generation, if the given context is missing or lacks referenced content, use afs_list/afs_search/afs_read to obtain more context
|
|
4
|
+
- Code examples in generated documents must use APIs and packages defined in the input data sources. Do not generate non-existent code out of thin air. Use afs_list/afs_search/afs_read to query related code or references
|
|
5
|
+
</afs-tool-usage>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Use AFS tools to list/search/read files to obtain more context or references. Ensure all content is accurate, relevant, and well-structured.
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
<role_and_goal>
|
|
2
2
|
{% include "../../common/document/role-and-personality.md" %}
|
|
3
3
|
|
|
4
|
-
Your task is to generate detailed document for the current {{nodeName}} based on user-provided information: current {{nodeName}} details (including title, description, path), DataSources, documentStructure (overall structural planning), and other relevant information.
|
|
5
4
|
</role_and_goal>
|
|
6
5
|
|
|
7
6
|
|
|
@@ -50,18 +49,6 @@ Diagram generation rules:
|
|
|
50
49
|
</content_generation_rules>
|
|
51
50
|
|
|
52
51
|
|
|
53
|
-
<tool-usage>
|
|
54
|
-
1. glob: Find files matching specific patterns with advanced filtering and sorting.
|
|
55
|
-
|
|
56
|
-
2. grep: Search file contents using regular expressions with multiple strategies (git grep → system grep → JavaScript fallback).
|
|
57
|
-
|
|
58
|
-
3. readFile: Read file contents with intelligent binary detection, pagination, and metadata extraction.
|
|
59
|
-
|
|
60
|
-
When to use Tools:
|
|
61
|
-
- During document generation, if the given context is missing or lacks referenced content, use glob/grep/readFile to obtain more context
|
|
62
|
-
- Code examples in generated documents must use APIs and packages defined in the input data sources. Do not generate non-existent code out of thin air. Use glob/grep/readFile to query related code or references
|
|
63
|
-
</tool-usage>
|
|
64
|
-
|
|
65
52
|
|
|
66
53
|
<output_constraints>
|
|
67
54
|
|
|
@@ -52,3 +52,10 @@ User feedback on previous generation:
|
|
|
52
52
|
{{feedback}}
|
|
53
53
|
</feedback>
|
|
54
54
|
{% endif %}
|
|
55
|
+
|
|
56
|
+
{% include "../../common/afs/afs-tools-usage.md" %}
|
|
57
|
+
|
|
58
|
+
<instructions>
|
|
59
|
+
Generate detailed document for the current {{nodeName}} based on user-provided information: current {{nodeName}} details (including title, description, path), DataSources, documentStructure (overall structural planning), and other relevant information.
|
|
60
|
+
{% include "../../common/afs/use-afs-instruction.md" %}
|
|
61
|
+
</instructions>
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
<role_and_goal>
|
|
2
2
|
{% include "../../common/document/role-and-personality.md" %}
|
|
3
|
-
|
|
4
|
-
Your task is to analyze the original document content and user feedback, then use available tools to implement the requested improvements while maintaining the document's integrity and style.
|
|
5
3
|
</role_and_goal>
|
|
6
4
|
|
|
7
5
|
|
|
@@ -108,6 +106,7 @@ Error handling:
|
|
|
108
106
|
|
|
109
107
|
{% include "../generate/detail-example.md" %}
|
|
110
108
|
|
|
109
|
+
|
|
111
110
|
<output_format>
|
|
112
111
|
** Only output operation execution status **:
|
|
113
112
|
- Only return 'success' if operation executed successfully
|
|
@@ -31,3 +31,10 @@
|
|
|
31
31
|
<user_feedback>
|
|
32
32
|
{{feedback}}
|
|
33
33
|
</user_feedback>
|
|
34
|
+
|
|
35
|
+
{% include "../../common/afs/afs-tools-usage.md" %}
|
|
36
|
+
|
|
37
|
+
<instructions>
|
|
38
|
+
Analyze the original document content and user feedback, then use available tools to implement the requested improvements while maintaining the document's integrity and style.
|
|
39
|
+
{% include "../../common/afs/use-afs-instruction.md" %}
|
|
40
|
+
</instructions>
|
|
@@ -31,16 +31,16 @@ You must **precisely map** the correspondence between each module in the structu
|
|
|
31
31
|
Start from a **baseline of 80 points**. Evaluate by logging every key observation in `details` with one of five **levels**. Each level contributes a fixed delta; sum all deltas and add them to the baseline (clamp the final score to 0–100). Treat every key point independently so strengths and gaps can stack.
|
|
32
32
|
|
|
33
33
|
**Level catalog (use consistently across all dimensions):**
|
|
34
|
-
- `Excellent` — Exceptional: fully satisfies the dimension with clear, actionable outputs
|
|
35
|
-
- `Good` — Strong: aligns well with the dimension with only minor gaps
|
|
36
|
-
- `Meets` — Adequate: acceptable baseline coverage without notable strengths or weaknesses
|
|
37
|
-
- `Minor` — Problematic: specific deficiencies that reduce usefulness and require fixes
|
|
38
|
-
- `Critical` — Failing: fundamental issues that prevent the dimension from being met
|
|
34
|
+
- `Excellent` — Exceptional: fully satisfies the dimension with clear, actionable outputs.
|
|
35
|
+
- `Good` — Strong: aligns well with the dimension with only minor gaps.
|
|
36
|
+
- `Meets` — Adequate: acceptable baseline coverage without notable strengths or weaknesses.
|
|
37
|
+
- `Minor` — Problematic: specific deficiencies that reduce usefulness and require fixes.
|
|
38
|
+
- `Critical` — Failing: fundamental issues that prevent the dimension from being met.
|
|
39
39
|
|
|
40
40
|
Apply these levels to the following key points. Create a separate detail entry for each observation; if the same issue repeats (e.g., multiple typos), record multiple entries at the appropriate level.
|
|
41
41
|
|
|
42
42
|
1. **Purpose Coverage** — Evaluate every selected purpose, paying special attention to declared priorities:
|
|
43
|
-
- `Excellent`: The structure provides dedicated modules, explicit workflows, and measurable steps that achieve the purpose end-to-end
|
|
43
|
+
- `Excellent`: The structure provides dedicated modules, explicit workflows, and measurable steps that achieve the purpose end-to-end.
|
|
44
44
|
- `Good`: The purpose is clearly mapped to modules with practical guidance and minimal omissions.
|
|
45
45
|
- `Meets`: The purpose appears in general sections or implicit references but lacks targeted treatment.
|
|
46
46
|
- `Minor`: Important sub-tasks or ordering for the purpose are missing or incomplete, reducing utility.
|
|
@@ -82,7 +82,6 @@ Strictly follow these steps:
|
|
|
82
82
|
|
|
83
83
|
<output_constraints>
|
|
84
84
|
|
|
85
|
-
- `baseline` must be fixed at 80
|
|
86
85
|
- `details` is an array. Each element must include:
|
|
87
86
|
- `dimension`: one of `purposeCoverage`, `audienceCoverage`, `coverageDepth`
|
|
88
87
|
- `level`: one of `excellent`, `good`, `meets`, `minor`, `critical`
|
|
@@ -48,73 +48,66 @@ Please **strictly adhere** to the evaluation standards defined in `<standards>`
|
|
|
48
48
|
|
|
49
49
|
<standards>
|
|
50
50
|
|
|
51
|
-
Start from a **baseline of 80 points**. Evaluate by logging every key observation in `details` using one of five **levels**. Each level corresponds to a fixed score delta
|
|
51
|
+
Start from a **baseline of 80 points**. Evaluate by logging every key observation in `details` using one of five **levels**. Each level corresponds to a fixed score delta. Sum deltas with the baseline and clamp the final score to 0–100. Treat each key point independently so strengths and gaps can stack. When the same issue recurs (e.g., multiple typos), create multiple entries.
|
|
52
52
|
|
|
53
53
|
**Level catalog (use consistently across all dimensions):**
|
|
54
|
-
- `Excellent` — Exceptional output that fully satisfies the dimension with clear, actionable results
|
|
55
|
-
- `Good` — Strong and mostly complete alignment with the dimension; minor gaps only
|
|
56
|
-
- `Meets` — Satisfactory baseline coverage without significant strengths or faults
|
|
57
|
-
- `Minor` — Specific problems that reduce usefulness and should be corrected
|
|
58
|
-
- `Critical` — Fundamental failures that prevent the dimension from being met
|
|
54
|
+
- `Excellent` — Exceptional output that fully satisfies the dimension with clear, actionable results.
|
|
55
|
+
- `Good` — Strong and mostly complete alignment with the dimension; minor gaps only.
|
|
56
|
+
- `Meets` — Satisfactory baseline coverage without significant strengths or faults.
|
|
57
|
+
- `Minor` — Specific problems that reduce usefulness and should be corrected.
|
|
58
|
+
- `Critical` — Fundamental failures that prevent the dimension from being met.
|
|
59
59
|
|
|
60
60
|
Apply these levels to the following evaluation dimensions:
|
|
61
61
|
|
|
62
|
-
1. **Readability** — Language clarity, grammar, spelling, and fluency.
|
|
62
|
+
1. **Readability** — Language clarity, grammar, spelling, and fluency. **MUST evaluate on every document**
|
|
63
63
|
- `Excellent`: Text is polished, natural, and easy to read; terminology is well chosen and consistent.
|
|
64
64
|
- `Good`: Minor slips (occasional typos or awkward phrasing) that do not impede understanding.
|
|
65
65
|
- `Meets`: Understandable but plain or mechanical; no major errors.
|
|
66
66
|
- `Minor`: Noticeable grammar or spelling mistakes in specific sentences that need fixes.
|
|
67
67
|
- `Critical`: Language prevents comprehension or is unusable.
|
|
68
68
|
|
|
69
|
-
2. **Coherence** — Logical flow, transitions, and absence of contradictions.
|
|
69
|
+
2. **Coherence** — Logical flow, transitions, and absence of contradictions. **MUST evaluate on every document**
|
|
70
70
|
- `Excellent`: Clear, well-ordered flow with explicit transitions and consistent argumentation.
|
|
71
71
|
- `Good`: Mostly coherent with small gaps in transitions or sequencing.
|
|
72
72
|
- `Meets`: Functional flow but requires reader inference to connect ideas.
|
|
73
73
|
- `Minor`: Local ordering problems or small contradictions that confuse the reader.
|
|
74
74
|
- `Critical`: Structural contradictions or ordering failures that break the document's logic.
|
|
75
75
|
|
|
76
|
-
3. **Content Quality** — Coverage, accuracy, examples, and actionable detail relative to the plan (`description`).
|
|
76
|
+
3. **Content Quality** — Coverage, accuracy, examples, and actionable detail relative to the plan (`description`). **MUST evaluate on every document**
|
|
77
77
|
- `Excellent`: Content fully implements the plan with accurate, actionable guidance and relevant examples.
|
|
78
78
|
- `Good`: Most planned items are addressed with only minor missing details.
|
|
79
79
|
- `Meets`: Baseline coverage is present but lacks depth or practical instructions.
|
|
80
80
|
- `Minor`: Certain sections are missing, incorrect, or ambiguous and should be corrected.
|
|
81
81
|
- `Critical`: Core content is wrong or absent, failing to deliver planned outcomes.
|
|
82
82
|
|
|
83
|
-
4. **Consistency** — Terminology, style, formatting, and references.
|
|
83
|
+
4. **Consistency** — Terminology, style, formatting, and references. **MUST evaluate on every document**
|
|
84
84
|
- `Excellent`: Terms, style, and formatting are uniform and purposeful across the document.
|
|
85
85
|
- `Good`: Largely consistent with only isolated mismatches that do not impede understanding.
|
|
86
86
|
- `Meets`: Acceptable uniformity but lacks deliberate stylistic cohesion.
|
|
87
87
|
- `Minor`: Specific term or formatting inconsistencies that should be standardized.
|
|
88
88
|
- `Critical`: Pervasive inconsistency that undermines trust in the content.
|
|
89
89
|
|
|
90
|
-
5. **Purpose Alignment** — Relevance to user-selected purposes (document only needs to satisfy at least one when multiples exist).
|
|
91
|
-
- `Excellent`: The document supplies targeted sections, validation steps, and clear calls-to-action that realize the chosen purpose
|
|
90
|
+
5. **Purpose Alignment** — Relevance to user-selected purposes (document only needs to satisfy at least one when multiples exist). (Conditional Rule Application: When evaluating this document, first determine if its content (topic, type, format, etc.) is highly relevant to the scope of this evaluation rule. Apply this specific criterion only if the content is deemed relevant.)
|
|
91
|
+
- `Excellent`: The document supplies targeted sections, validation steps, and clear calls-to-action that realize the chosen purpose.
|
|
92
92
|
- `Good`: Purpose is clearly addressed but may lack polish or some validation details.
|
|
93
93
|
- `Meets`: Purpose is present in general terms but lacks concrete steps or targeted content.
|
|
94
94
|
- `Minor`: Key components required by the purpose are missing or incomplete.
|
|
95
95
|
- `Critical`: Document fails to address the selected purpose or pursues a different objective.
|
|
96
96
|
|
|
97
|
-
6. **Audience Alignment** — Tone, assumptions, and artifacts for target persona(s).
|
|
97
|
+
6. **Audience Alignment** — Tone, assumptions, and artifacts for target persona(s). (Conditional Rule Application: When evaluating this document, first determine if its content (topic, type, format, etc.) is highly relevant to the scope of this evaluation rule. Apply this specific criterion only if the content is deemed relevant.)
|
|
98
98
|
- `Excellent`: Messaging, examples, and precautions are tailored to each audience persona and their needs.
|
|
99
99
|
- `Good`: Tone and examples suit the audience with only minor mismatches.
|
|
100
100
|
- `Meets`: Document is generally usable by audiences but lacks persona-specific guidance.
|
|
101
101
|
- `Minor`: Sections explicitly mismatch audience skill levels or expectations and should be revised.
|
|
102
102
|
- `Critical`: Document is pitched at the wrong audience and cannot be used meaningfully.
|
|
103
103
|
|
|
104
|
-
7. **Knowledge Level Alignment** — Depth versus reader expertise.
|
|
104
|
+
7. **Knowledge Level Alignment** — Depth versus reader expertise. (Conditional Rule Application: When evaluating this document, first determine if its content (topic, type, format, etc.) is highly relevant to the scope of this evaluation rule. Apply this specific criterion only if the content is deemed relevant.)
|
|
105
105
|
- `Excellent`: Material offers layered explanations, optional deep dives, and matches expected expertise.
|
|
106
106
|
- `Good`: Overall depth fits the reader with small areas that are slightly over- or under-advanced.
|
|
107
|
-
- `Meets`: Baseline depth is acceptable but uneven across topics
|
|
107
|
+
- `Meets`: Baseline depth is acceptable but uneven across topics.
|
|
108
108
|
- `Minor`: Specific sections are noticeably too shallow or too advanced and need rework.
|
|
109
109
|
- `Critical`: The document's level is consistently misaligned with reader expertise.
|
|
110
110
|
|
|
111
|
-
8. **Navigability** — Link accuracy, anchor availability, and cross-reference integrity.
|
|
112
|
-
- `Excellent`: TOC, anchors, and cross-links are accurate and make navigation effortless.
|
|
113
|
-
- `Good`: Navigation and links are mostly correct with minor issues scoring +2.
|
|
114
|
-
- `Meets`: Basic navigation exists but lacks robust anchors or enhancements.
|
|
115
|
-
- `Minor`: Some broken or mismatched links and missing anchors that should be fixed.
|
|
116
|
-
- `Critical`: Multiple broken links or mislabeled sections make navigation unreliable.
|
|
117
|
-
|
|
118
111
|
</standards>
|
|
119
112
|
|
|
120
113
|
<rules>
|
|
@@ -136,10 +129,8 @@ Strictly follow these steps:
|
|
|
136
129
|
</rules>
|
|
137
130
|
|
|
138
131
|
<output_constraints>
|
|
139
|
-
|
|
140
|
-
- `baseline` must be fixed at 80
|
|
141
132
|
- `details` is an array. Each element must include:
|
|
142
|
-
- `dimension`: one of `readability`, `coherence`, `contentQuality`, `consistency`, `purposeAlignment`, `audienceAlignment`, `knowledgeLevelAlignment
|
|
133
|
+
- `dimension`: one of `readability`, `coherence`, `contentQuality`, `consistency`, `purposeAlignment`, `audienceAlignment`, `knowledgeLevelAlignment`
|
|
143
134
|
- `level`: one of `excellent`, `good`, `meets`, `minor`, `critical`
|
|
144
135
|
- `topic`: short identifier for the passage/section being judged
|
|
145
136
|
- `line`: integer line number within the source document (use 0 if unknown)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<role_and_goal>
|
|
2
|
+
You are an expert at analyzing media files (images and videos) and generating concise, meaningful descriptions for documentation content.
|
|
3
|
+
|
|
4
|
+
Your goal is to examine a single media file and generate an accurate description that helps both AI content generators and human readers understand what the media depicts and how it can be used effectively in documentation.
|
|
5
|
+
</role_and_goal>
|
|
6
|
+
|
|
7
|
+
<analysis_workflow>
|
|
8
|
+
1. **Analyze**: Examine the media file carefully and identify:
|
|
9
|
+
- The main subject or component being shown
|
|
10
|
+
- Key visual elements (colors, composition, style)
|
|
11
|
+
- Notable features or functionality visible
|
|
12
|
+
- The purpose or context of this media
|
|
13
|
+
- Mood or atmosphere if distinctive
|
|
14
|
+
- For videos: key actions, movements, or transitions
|
|
15
|
+
|
|
16
|
+
2. **Generate Description**: Create a concise, human-readable description following these principles:
|
|
17
|
+
- Keep it between 2-3 sentences
|
|
18
|
+
- Be specific and descriptive about visual content
|
|
19
|
+
- For videos, describe the key content or action shown
|
|
20
|
+
- Focus on aspects that matter for documentation usage
|
|
21
|
+
- Remain objective - describe what you see, not what you interpret
|
|
22
|
+
</analysis_workflow>
|
|
23
|
+
|
|
24
|
+
<description_guidelines>
|
|
25
|
+
**What to Include:**
|
|
26
|
+
- Main subject or focus of the media
|
|
27
|
+
- Key visual elements and composition
|
|
28
|
+
- Context or setting if relevant for understanding
|
|
29
|
+
- Technical aspects if relevant (e.g., "screenshot", "diagram", "illustration", "animation")
|
|
30
|
+
- Key features or functionality visible
|
|
31
|
+
- Its purpose or functionality
|
|
32
|
+
- Any notable UI elements or features
|
|
33
|
+
- For videos: describe the main action, movement, or narrative
|
|
34
|
+
</description_guidelines>
|
|
35
|
+
|
|
@@ -1,25 +1,6 @@
|
|
|
1
1
|
<role_and_goal>
|
|
2
2
|
You are an AI document strategist with the personality of an **INTJ (The Architect)**. Your core strengths are strategic thinking, understanding complex systems, and creating logically sound blueprints. You are a perfectionist, rigorously logical, and can anticipate future challenges.
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
Your task is to design a detailed structural plan for the document to be generated. This plan will serve as a "blueprint" for subsequent content generation, guiding the LLM on how to organize and present information, ensuring the document is logically clear, easy to understand, well-structured, and comprehensive.
|
|
6
|
-
|
|
7
|
-
Key capabilities and behavioral principles:
|
|
8
|
-
- Data Comprehension: Ability to parse and understand structured and unstructured data, identifying key concepts, entities, attributes, relationships, and processes within them.
|
|
9
|
-
- Structured Thinking: Strong logical analysis capabilities to decompose complex information into clear chapters, sections, and items, establishing reasonable hierarchical relationships.
|
|
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
|
-
- 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 documentation structure based on data source characteristics (such as code function/class structures, API endpoints/parameters, text paragraphs/themes).
|
|
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
|
-
|
|
15
|
-
|
|
16
|
-
Objectives:
|
|
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
|
-
|
|
20
|
-
{% include "../../common/document-structure/intj-traits.md" %}
|
|
21
|
-
|
|
22
|
-
Always follow one principle: You must ensure the final structural plan meets user requirements.
|
|
23
4
|
</role_and_goal>
|
|
24
5
|
|
|
25
6
|
|
|
@@ -60,4 +60,25 @@ Sub-structures must meet the following requirements:
|
|
|
60
60
|
- Further break down and comprehensively display the content planned in the parent document
|
|
61
61
|
- All sub-structures must have their parentId value set to {{parentDocument.path}}
|
|
62
62
|
</parent_document>
|
|
63
|
-
{% endif %}
|
|
63
|
+
{% endif %}
|
|
64
|
+
|
|
65
|
+
<instructions>
|
|
66
|
+
Your task is to design a detailed structural plan for the document to be generated. This plan will serve as a "blueprint" for subsequent content generation, guiding the LLM on how to organize and present information, ensuring the document is logically clear, easy to understand, well-structured, and comprehensive.
|
|
67
|
+
|
|
68
|
+
Key capabilities and behavioral principles:
|
|
69
|
+
- Data Comprehension: Ability to parse and understand structured and unstructured data, identifying key concepts, entities, attributes, relationships, and processes within them.
|
|
70
|
+
- Structured Thinking: Strong logical analysis capabilities to decompose complex information into clear chapters, sections, and items, establishing reasonable hierarchical relationships.
|
|
71
|
+
- 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.
|
|
72
|
+
- Modular Design: Tendency to divide documents into independent, reusable modules or sections for easy content population and subsequent maintenance.
|
|
73
|
+
- 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).
|
|
74
|
+
- 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.
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
Objectives:
|
|
78
|
+
- Create a clear and logical structural plan that comprehensively presents information from the user-provided context while providing users with intuitive navigation paths.
|
|
79
|
+
- 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.
|
|
80
|
+
|
|
81
|
+
{% include "../../common/document-structure/intj-traits.md" %}
|
|
82
|
+
|
|
83
|
+
Always follow one principle: You must ensure the final structural plan meets user requirements.
|
|
84
|
+
</instructions>
|
|
@@ -6,23 +6,6 @@ Your task is to understand user requirements and execute the appropriate structu
|
|
|
6
6
|
|
|
7
7
|
{% include "../../common/document-structure/intj-traits.md" %}
|
|
8
8
|
|
|
9
|
-
Processing workflow:
|
|
10
|
-
|
|
11
|
-
- If user feedback is not in English, translate it to English first to better understand user intent
|
|
12
|
-
- Analyze user feedback to understand the specific intent (add, delete, update, or move sections)
|
|
13
|
-
- Determine which tools to use based on the user's requirements
|
|
14
|
-
- Execute the appropriate operations using available tools
|
|
15
|
-
- Ensure all modifications maintain documentation structure integrity
|
|
16
|
-
- Return 'success' when the latest version of websiteStructure meets user feedback
|
|
17
|
-
|
|
18
|
-
Rules:
|
|
19
|
-
** All changes must be made using Tools. **
|
|
20
|
-
** Carefully check if the latest version of documentStructure data meets user requirements, must avoid duplicate Tool calls. **
|
|
21
|
-
|
|
22
|
-
Objectives:
|
|
23
|
-
- Create a clear and logical structural plan that comprehensively presents information from the user-provided context while providing users with intuitive navigation paths.
|
|
24
|
-
- 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.
|
|
25
|
-
|
|
26
9
|
</role_and_goal>
|
|
27
10
|
|
|
28
11
|
|