@aigne/doc-smith 0.0.1

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 (44) hide show
  1. package/README.md +87 -0
  2. package/agents/batch-docs-detail-generator.yaml +14 -0
  3. package/agents/batch-translate.yaml +44 -0
  4. package/agents/check-detail-generated.mjs +128 -0
  5. package/agents/check-detail-result.mjs +141 -0
  6. package/agents/check-structure-planning-result.yaml +30 -0
  7. package/agents/check-structure-planning.mjs +54 -0
  8. package/agents/content-detail-generator.yaml +50 -0
  9. package/agents/detail-generator-and-translate.yaml +88 -0
  10. package/agents/detail-regenerator.yaml +107 -0
  11. package/agents/docs-generator.yaml +93 -0
  12. package/agents/format-structure-plan.mjs +23 -0
  13. package/agents/input-generator.mjs +142 -0
  14. package/agents/load-sources.mjs +329 -0
  15. package/agents/publish-docs.mjs +212 -0
  16. package/agents/reflective-structure-planner.yaml +10 -0
  17. package/agents/save-docs.mjs +153 -0
  18. package/agents/save-output.mjs +25 -0
  19. package/agents/save-single-doc.mjs +18 -0
  20. package/agents/schema/structure-plan-result.yaml +32 -0
  21. package/agents/schema/structure-plan.yaml +26 -0
  22. package/agents/structure-planning.yaml +49 -0
  23. package/agents/transform-detail-datasources.mjs +14 -0
  24. package/agents/translate.yaml +28 -0
  25. package/aigne.yaml +28 -0
  26. package/biome.json +51 -0
  27. package/docs-mcp/aigne.yaml +8 -0
  28. package/docs-mcp/get-docs-detail.mjs +42 -0
  29. package/docs-mcp/get-docs-structure.mjs +11 -0
  30. package/package.json +33 -0
  31. package/prompts/check-structure-planning-result.md +82 -0
  32. package/prompts/content-detail-generator.md +99 -0
  33. package/prompts/document/detail-example.md +441 -0
  34. package/prompts/document/detail-generator.md +95 -0
  35. package/prompts/document/structure-example.md +98 -0
  36. package/prompts/document/structure-getting-started.md +10 -0
  37. package/prompts/document/structure-planning.md +17 -0
  38. package/prompts/structure-planning.md +108 -0
  39. package/prompts/translator.md +69 -0
  40. package/tests/README.md +93 -0
  41. package/tests/check-detail-result.test.mjs +103 -0
  42. package/tests/load-sources.test.mjs +642 -0
  43. package/tests/test-save-docs.mjs +132 -0
  44. package/utils/utils.mjs +86 -0
@@ -0,0 +1,441 @@
1
+ <example>
2
+ 下面是一些优质的文档详情供你参考:
3
+
4
+ <example_item>
5
+ # Quick install guide
6
+
7
+ Before you can use Django, you’ll need to get it installed. We have a complete installation guide that covers all the possibilities; this guide will guide you to a minimal installation that’ll work while you walk through the introduction.
8
+
9
+ ## Install Python
10
+
11
+ Being a Python web framework, Django requires Python. See What Python version can I use with Django? for details. Python includes a lightweight database called SQLite so you won’t need to set up a database just yet.
12
+
13
+ Get the latest version of Python at [https://www.python.org/downloads/](https://www.python.org/downloads/) or with your operating system’s package manager.
14
+
15
+ You can verify that Python is installed by typing `python` from your shell; you should see something like:
16
+
17
+ ```
18
+ Python 3.x.y
19
+ [GCC 4.x] on linux
20
+ Type "help", "copyright", "credits" or "license" for more information.
21
+ >>>
22
+ ```
23
+
24
+ ## Set up a database
25
+
26
+ This step is only necessary if you’d like to work with a “large” database engine like PostgreSQL, MariaDB, MySQL, or Oracle. To install such a database, consult the database installation information.
27
+
28
+ ## Install Django
29
+
30
+ You’ve got three options to install Django:
31
+
32
+ 1. Install an official release. This is the best approach for most users.
33
+ 2. Install a version of Django provided by your operating system distribution.
34
+ 3. Install the latest development version. This option is for enthusiasts who want the latest-and-greatest features and aren’t afraid of running brand new code. You might encounter new bugs in the development version, but reporting them helps the development of Django. Also, releases of third-party packages are less likely to be compatible with the development version than with the latest stable release.
35
+
36
+ ## Verifying
37
+
38
+ To verify that Django can be seen by Python, type `python` from your shell. Then at the Python prompt, try to import Django:
39
+
40
+ ```python
41
+ >>> import django
42
+ >>> print(django.get_version())
43
+ 5.2
44
+ ```
45
+
46
+ You may have another version of Django installed.
47
+
48
+ ## That’s it!
49
+
50
+ That’s it – you can now move onto the tutorial.
51
+ </example_item>
52
+
53
+ <example_item>
54
+ # Products
55
+
56
+ Products are a fundamental resource in PaymentKit, representing the goods or services you offer. This section provides a comprehensive guide to managing your products using the PaymentKit Node.js SDK, including creating, retrieving, updating, listing, and deleting products.
57
+
58
+ For information on defining pricing models for your products, refer to the [Prices](/core-resources/prices) section. To manage customer information, see [Customers](/core-resources/customers).
59
+
60
+ ## Create a Product
61
+
62
+ Use the `create` method to define a new product in your PaymentKit system. You can optionally include associated prices during product creation.
63
+
64
+ **Parameters**
65
+
66
+ | Name | Type | Description |
67
+ |---|---|---|
68
+ | `name` | `string` | The name of the product. |
69
+ | `description` | `string` | An optional description for the product. |
70
+ | `type` | `string` | The type of product (e.g., `'service'`, `'good'`). |
71
+ | `prices` | `Partial<TPrice>[]` | An optional array of partial price objects to associate with the product upon creation. Each object can include `type`, `unit_amount`, `currency_id`, and `recurring` details. |
72
+
73
+ **Returns**
74
+
75
+ | Name | Type | Description |
76
+ |---|---|---|
77
+ | `product` | `TProductExpanded` | The newly created product object, including expanded details. |
78
+
79
+ **Example**
80
+
81
+ ```javascript
82
+ import payment from '@blocklet/payment-js';
83
+
84
+ async function createNewProduct() {
85
+ try {
86
+ const product = await payment.products.create({
87
+ name: 'Premium Service Plan',
88
+ description: 'Access to all premium features and support.',
89
+ type: 'service',
90
+ prices: [
91
+ {
92
+ type: 'recurring',
93
+ unit_amount: '19.99',
94
+ currency_id: 'usd_xxxxxx', // Replace with your currency ID
95
+ recurring: {
96
+ interval: 'month',
97
+ interval_count: 1,
98
+ },
99
+ },
100
+ ],
101
+ });
102
+ console.log('Product created:', product.id);
103
+ } catch (error) {
104
+ console.error('Error creating product:', error.message);
105
+ }
106
+ }
107
+
108
+ createNewProduct();
109
+ ```
110
+
111
+ **Example Response**
112
+ ```
113
+ {
114
+ "id": xxxx,
115
+ "name": xxxx,
116
+ }
117
+ ```
118
+
119
+ This example demonstrates how to create a new product named "Premium Service Plan" with an associated monthly recurring price.
120
+
121
+ ## Retrieve a Product
122
+
123
+ Use the `retrieve` method to fetch details of a specific product by its ID.
124
+
125
+ **Parameters**
126
+
127
+ | Name | Type | Description |
128
+ |---|---|---|
129
+ | `id` | `string` | The unique identifier of the product to retrieve. |
130
+
131
+ **Returns**
132
+
133
+ | Name | Type | Description |
134
+ |---|---|---|
135
+ | `product` | `TProductExpanded` | The retrieved product object, including expanded details. |
136
+
137
+ **Example**
138
+
139
+ ```javascript
140
+ import payment from '@blocklet/payment-js';
141
+
142
+ async function getProductDetails(productId) {
143
+ try {
144
+ const product = await payment.products.retrieve(productId);
145
+ console.log('Product details:', product.name, product.description);
146
+ } catch (error) {
147
+ console.error(`Error retrieving product ${productId}:`, error.message);
148
+ }
149
+ }
150
+
151
+ getProductDetails('prod_xxx'); // Replace with a valid product ID
152
+ ```
153
+
154
+ **Example Response**
155
+ ```
156
+ {
157
+ "id": xxxx,
158
+ "name": xxxx,
159
+ }
160
+ ```
161
+
162
+ This example retrieves and logs the details of a product using its ID.
163
+
164
+ ## Update a Product
165
+
166
+ Use the `update` method to modify an existing product's details.
167
+
168
+ **Parameters**
169
+
170
+ | Name | Type | Description |
171
+ |---|---|---|
172
+ | `id` | `string` | The unique identifier of the product to update. |
173
+ | `data` | `Partial<TProduct>` | An object containing the product fields to update. Available fields include `name`, `description`, `type`, etc. |
174
+
175
+ **Returns**
176
+
177
+ | Name | Type | Description |
178
+ |---|---|---|
179
+ | `product` | `TProductExpanded` | The updated product object. |
180
+
181
+ **Example**
182
+
183
+ ```javascript
184
+ import payment from '@blocklet/payment-js';
185
+
186
+ async function updateProductDescription(productId) {
187
+ try {
188
+ const updatedProduct = await payment.products.update(productId, {
189
+ description: 'Updated description for the premium service plan.',
190
+ });
191
+ console.log('Product updated:', updatedProduct.id, updatedProduct.description);
192
+ } catch (error) {
193
+ console.error(`Error updating product ${productId}:`, error.message);
194
+ }
195
+ }
196
+
197
+ updateProductDescription('prod_xxx'); // Replace with a valid product ID
198
+ ```
199
+
200
+ **Example Response**
201
+ ```
202
+ {
203
+ "id": xxxx,
204
+ "name": xxxx,
205
+ }
206
+ ```
207
+
208
+ This example updates the description of an existing product.
209
+
210
+ ## List Products
211
+
212
+ Use the `list` method to retrieve a paginated list of products. You can filter the results by various criteria.
213
+
214
+ **Parameters**
215
+
216
+ | Name | Type | Description |
217
+ |---|---|---|
218
+ | `active` | `boolean` | Optional. Filter by product active status. |
219
+ | `name` | `string` | Optional. Filter by product name. |
220
+ | `description` | `string` | Optional. Filter by product description. |
221
+ | `metadata.{key}` | `string` | Optional. Filter by custom metadata fields. Use `metadata.yourKey` to specify a metadata property. |
222
+ | `page` | `number` | Optional. The page number for pagination (default: 1). |
223
+ | `pageSize` | `number` | Optional. The number of items per page (default: 50). |
224
+ | `order` | `string` | Optional. Sort order (e.g., `'created_at:ASC'`, `'updated_at:DESC'`). |
225
+ | `activeFirst` | `boolean` | Optional. If `true`, active products are listed first. |
226
+
227
+ **Returns**
228
+
229
+ | Name | Type | Description |
230
+ |---|---|---|
231
+ | `data` | `TProductExpanded[]` | An array of product objects. |
232
+ | `page` | `number` | The current page number. |
233
+ | `pageSize` | `number` | The number of items per page. |
234
+ | `total` | `number` | The total number of products matching the criteria. |
235
+
236
+ **Example**
237
+
238
+ ```javascript
239
+ import payment from '@blocklet/payment-js';
240
+
241
+ async function listActiveProducts() {
242
+ try {
243
+ const products = await payment.products.list({
244
+ active: true,
245
+ pageSize: 10,
246
+ order: 'name:ASC',
247
+ });
248
+ console.log(`Found ${products.total} active products:`);
249
+ products.data.forEach(product => {
250
+ console.log(`- ${product.name} (ID: ${product.id})`);
251
+ });
252
+ } catch (error) {
253
+ console.error('Error listing products:', error.message);
254
+ }
255
+ }
256
+
257
+ listActiveProducts();
258
+ ```
259
+
260
+ **Example Response**
261
+ ```
262
+ {
263
+ "page": 1,
264
+ "pageSize": 20,
265
+ "total": 100,
266
+ "data": [
267
+ {
268
+ "id": xxx,
269
+ "name": xxx,
270
+ }
271
+ ]
272
+ }
273
+ ```
274
+
275
+ This example lists the first 10 active products, sorted alphabetically by name.
276
+
277
+ ## Search Products
278
+
279
+ Use the `search` method to find products based on a general search query. This is useful for free-text searches across product fields.
280
+
281
+ **Parameters**
282
+
283
+ | Name | Type | Description |
284
+ |---|---|---|
285
+ | `query` | `string` | The search string to match against product fields. |
286
+ | `page` | `number` | Optional. The page number for pagination (default: 1). |
287
+ | `pageSize` | `number` | Optional. The number of items per page (default: 50). |
288
+
289
+ **Returns**
290
+
291
+ | Name | Type | Description |
292
+ |---|---|---|
293
+ | `data` | `TProductExpanded[]` | An array of product objects that match the search query. |
294
+ | `page` | `number` | The current page number. |
295
+ | `pageSize` | `number` | The number of items per page. |
296
+ | `total` | `number` | The total number of products matching the criteria. |
297
+
298
+ **Example**
299
+
300
+ ```javascript
301
+ import payment from '@blocklet/payment-js';
302
+
303
+ async function searchProducts(searchTerm) {
304
+ try {
305
+ const searchResults = await payment.products.search({
306
+ query: searchTerm,
307
+ pageSize: 5,
308
+ });
309
+ console.log(`Found ${searchResults.total} products matching "${searchTerm}":`);
310
+ searchResults.data.forEach(product => {
311
+ console.log(`- ${product.name} (ID: ${product.id})`);
312
+ });
313
+ } catch (error) {
314
+ console.error(`Error searching for products with "${searchTerm}":`, error.message);
315
+ }
316
+ }
317
+
318
+ searchProducts('service');
319
+ ```
320
+
321
+ **Example Response**
322
+ ```
323
+ {
324
+ "page": 1,
325
+ "pageSize": 20,
326
+ "total": 100,
327
+ "data": [
328
+ {
329
+ "id": xxx,
330
+ "name": xxx,
331
+ }
332
+ ]
333
+ }
334
+ ```
335
+
336
+ This example searches for products containing the term "service" and logs the results.
337
+
338
+ ## Archive a Product
339
+
340
+ Use the `archive` method to set a product's status to archived. Archived products are typically not visible or purchasable but are retained in the system.
341
+
342
+ **Parameters**
343
+
344
+ | Name | Type | Description |
345
+ |---|---|---|
346
+ | `id` | `string` | The unique identifier of the product to archive. |
347
+
348
+ **Returns**
349
+
350
+ | Name | Type | Description |
351
+ |---|---|---|
352
+ | `product` | `TProduct` | The archived product object. |
353
+
354
+ **Example**
355
+
356
+ ```javascript
357
+ import payment from '@blocklet/payment-js';
358
+
359
+ async function archiveProduct(productId) {
360
+ try {
361
+ const archivedProduct = await payment.products.archive(productId);
362
+ console.log(`Product ${archivedProduct.id} has been archived.`);
363
+ } catch (error) {
364
+ console.error(`Error archiving product ${productId}:`, error.message);
365
+ }
366
+ }
367
+
368
+ archiveProduct('prod_xxx'); // Replace with a valid product ID
369
+ ```
370
+
371
+ **Example Response**
372
+ ```
373
+ {
374
+ "id": xxxx,
375
+ "name": xxxx,
376
+ }
377
+ ```
378
+
379
+ This example archives a specified product.
380
+
381
+ ## Delete a Product
382
+
383
+ Use the `del` method to permanently delete a product from your PaymentKit system. Use with caution, as this action is irreversible.
384
+
385
+ **Parameters**
386
+
387
+ | Name | Type | Description |
388
+ |---|---|---|
389
+ | `id` | `string` | The unique identifier of the product to delete. |
390
+
391
+ **Returns**
392
+
393
+ | Name | Type | Description |
394
+ |---|---|---|
395
+ | `product` | `TProduct` | The deleted product object. |
396
+
397
+ **Example**
398
+
399
+ ```javascript
400
+ import payment from '@blocklet/payment-js';
401
+
402
+ async function deleteProduct(productId) {
403
+ try {
404
+ const deletedProduct = await payment.products.del(productId);
405
+ console.log(`Product ${deletedProduct.id} has been permanently deleted.`);
406
+ } catch (error) {
407
+ console.error(`Error deleting product ${productId}:`, error.message);
408
+ }
409
+ }
410
+
411
+ deleteProduct('prod_xxx'); // Replace with a valid product ID
412
+ ```
413
+
414
+ **Example Response**
415
+ ```
416
+ {
417
+ "id": xxxx,
418
+ "name": xxxx,
419
+ }
420
+ ```
421
+
422
+ This example permanently deletes a specified product.
423
+
424
+ ---
425
+
426
+ This section covered the essential operations for managing products within PaymentKit. You can now define and organize your offerings. Continue to the [Prices](/core-resources/prices) section to learn how to set up pricing for your products.
427
+
428
+ </example_item>
429
+
430
+ <bad_example>
431
+ - 错误示例:
432
+ - A["开始:`blocklet server upgrade`"]
433
+ - A -- "执行命令(例如 `start`、`stop`)" --> B
434
+ </bad_example>
435
+
436
+ <good_example>
437
+ - 正确示例:
438
+ - A["开始:blocklet server upgrade"]
439
+ - A -- "执行命令(例如 start、stop)" --> B
440
+ </good_example>
441
+ </example>
@@ -0,0 +1,95 @@
1
+
2
+ <document_rules>
3
+ 文档类信息生成规则:
4
+ - 如果当前部分是存在子文档,当前文档只展示简要的内容,引导用户到子文档中查看详细的内容
5
+ - 每个部分文档需要包含:标题、开头介绍、多个 section 介绍、结尾总结
6
+ - 文档标题中已经主题 API 名称,文档中的小标题不需要重复显示,直接显示子 API 名称
7
+ - 开头介绍包含关联文档的链接,使用 markdown 的 link 格式,引导用户阅读相关的文档
8
+ - 结尾总结中包含下一步阅读文档的链接,使用 markdown 的 link 格式,引导用户阅读相关的文档
9
+ - 确保 markdown 链接格式正确,示例:[Next Chapter Title](next_chapter_path)
10
+ - **确保 next_chapter_path 是外部地址或结构规划中存在的 path**, 直接使用结构规划中 path 绝对路径
11
+ - 如果 dataSources 中包含相关的第三方链接,在文档详情中可以在相关的地方关联这些第三方链接
12
+ - 每个 section 需要包含:标题、介绍、代码示例、响应数据示例、示例说明,示例说明跟在示例代码后描述,不需要‘示例说明’这样的小标题
13
+ - 确保文档中的内容是完整、连贯的,用户可以跟着文档一步步顺利执行
14
+ - 说明要尽可能的详细,如果存在配置项或参数,需要解释每个配置项或参数的含义,如果参数有多个可选值,每种可选值需要解释其含义,并尽可能配上代码示例
15
+ - 参数优先使用 markdown 中的 table 来展示,让内容看上去更整齐,容易阅读
16
+ - 接口/方法调用的说明必须包含 **响应数据示例**
17
+ - 使用 mermaid 图表解释复杂的概念 (```mermaid``` format),让页面内容展示形式更丰富
18
+ - 使用 `flowchart` 图表解释概念之间的关系
19
+ - 使用 `sequenceDiagram` 图表解释调用、执行的流程,
20
+ - **确保 mermaid `flowchart` 和 `graph` 图表中所有节点的 label 都使用 " 包裹**,使用简单文案描述,不包含任何特殊符号,示例:A["@abc"]、B("AIGNE")、C{"@aigne/core"}
21
+ - **确保 mermaid `flowchart` 和 `graph` 图表中所有节点连线上的描述都使用 " 包裹**,使用简单文案描述,不包含任何特殊符号,示例: E -- "Yes, Cache Hit" --> F["Serve Cached HTML"];
22
+ - **确保 mermaid`sequenceDiagram` 图表所有节点名不使用 " 包裹,示例:`participant AIGNE as AIGNE Engine`
23
+ - 更多的使用 table 、mermaid 图表来解释信息,过长的文本描述会让用户阅读有压力
24
+ - 概览部分,必须包含 mermaid 图表,展示产品的架构图
25
+ - 对输出的 markdown 进行检查,确认输出内容完整,table 、mermaid 信息完整并且格式正确
26
+ - **确保内容完整性**:在生成任何文档内容,特别是代码块(如 Mermaid、JSON、代码等)时,必须确保其是**完整且语法正确**的。在输出完成后,必须进行一次**自我检查**,确认所有的代码块、列表、表格等都已完全闭合且没有中途截断。
27
+ - **代码块原子性**:将每个代码块(例如 ```mermaid ... ```)视为一个**不可分割的原子单元**。必须一次性完整生成,从开始标记(```mermaid)到结束标记(```)之间的所有内容都不能省略或截断。
28
+ - **确保 Markdown 语法**:Markdown 格式正确,特别是表格的分隔线(例如 `|---|---|---|`),需要与表格数据列数一致。
29
+ - README 文件只做参考,你需要从代码中获取最新、最完整的信息
30
+ </document_rules>
31
+
32
+ <TONE_STYLE>
33
+ - Documentation should be plain, rigorous and accurate, avoiding grandiose or empty vocabulary
34
+ - You are writing for humans, not algorithms
35
+ - Clarity and Flow
36
+ - Target a Flesch Reading Ease score near 80
37
+ - Vary sentence length to maintain rhythm and attention
38
+ - Use natural transitions and rhetorical cues to guide the reader
39
+ - Favor active voice, but mix in passive when needed
40
+ - Mimic natural human quirks: slight redundancy, mild digressions, and spontaneous tone
41
+ - Voice Characteristics
42
+ - Use contractions and idioms sparingly to maintain an informal, yet credible tone
43
+ - Blend technical precision with relatable language
44
+ - Be direct: say what happened, why it matters, and how it helps
45
+
46
+ Example Tone Transformations
47
+ ❌ "We’re thrilled to announce our most powerful update yet…"
48
+ ✅ "You can now include location and timestamp metadata for each claim, enabling audit-ready transparency."
49
+
50
+ ❌ "Unlock the future of verification."
51
+ ✅ "This release makes real-world claims independently verifiable across sectors."
52
+ </TONE_STYLE>
53
+
54
+ <WORDS_PHRASES_TO_AVOID>
55
+
56
+ Do not use promotional fluff or filler emotion. Avoid the following unless quoting a user or citing feedback: Do not use words and phrases that are similar to following if you are asked to output in language other than English.
57
+
58
+ <emotion-words>
59
+ excited
60
+ thrilled
61
+ delighted
62
+ proud to announce
63
+ happy to share
64
+ Overused Adjectives:
65
+ powerful
66
+ seamless
67
+ revolutionary
68
+ robust
69
+ amazing
70
+ significant
71
+ transformative
72
+ innovative
73
+ disruptive
74
+ groundbreaking
75
+ </emotion-words>
76
+
77
+ <generic-hype-verbs>
78
+ unlock
79
+ unleash
80
+ empower
81
+ elevate
82
+ reimagine
83
+ transform
84
+ Empty Marketing Phrases:
85
+ in today's world
86
+ at the end of the day
87
+ best practices
88
+ end-to-end
89
+ game changer
90
+ cutting edge
91
+ </generic-hype-verbs>
92
+
93
+ ➡️ Instead, focus on concrete outcomes and observable benefits.
94
+ Example: “Now includes location and timestamp for each field report” is better than “a powerful new update.”
95
+ </WORDS_PHRASES_TO_AVOID>
@@ -0,0 +1,98 @@
1
+ <example>
2
+ 下面是一些优质的文档结构规划供你参考:
3
+
4
+ 示例 A:开源前端框架 Docs
5
+ ```yaml
6
+ - 概览
7
+ - 快速开始
8
+ - 安装
9
+ - 第一个组件
10
+ - 运行本地示例
11
+ - 基础概念
12
+ - 响应式原理
13
+ - 组件生命周期
14
+ - 状态管理
15
+ - 教程
16
+ - Todo List 全流程
17
+ - SSR 博客示例
18
+ - 任务指引
19
+ - 如何集成第三方 UI 库
20
+ - 如何做代码拆分
21
+ - 如何做单元测试
22
+ - API 参考
23
+ - 核心包
24
+ - 路由模块
25
+ - CLI
26
+ - 示例代码
27
+ - JavaScript
28
+ - TypeScript
29
+ - 版本与迁移
30
+ - v3 → v4 迁移指南
31
+ - 发布日志
32
+ - 贡献与社区
33
+ - 贡献指南
34
+ - 讨论区链接
35
+ ```
36
+
37
+ 示例 B:云服务 REST API Docs
38
+ ```yaml
39
+ - Overview
40
+ - Get Started
41
+ - Create Account
42
+ - Obtain API Key
43
+ - Hello World (cURL)
44
+ - Concepts
45
+ - Authentication Model
46
+ - Rate Limits
47
+ - Error Handling
48
+ - Tutorials
49
+ - Build a Serverless Image Resizer
50
+ - Streaming Analytics Pipeline
51
+ - How-to Guides
52
+ - Upload Large Files
53
+ - Rotate API Keys
54
+ - Monitor Usage with Grafana
55
+ - API Reference
56
+ - Authentication
57
+ - Storage
58
+ - CDN
59
+ - SDK Examples
60
+ - Python
61
+ - Go
62
+ - JavaScript
63
+ - Release Notes
64
+ - Troubleshooting & FAQ
65
+ - Security & Best Practices
66
+
67
+ ```
68
+
69
+ 示例 C:命令行工具 Docs(多平台发行版)
70
+ ```yaml
71
+ - 概览
72
+ - 快速开始
73
+ - 二进制下载
74
+ - Homebrew 安装
75
+ - Windows Scoop 安装
76
+ - 核心概念
77
+ - Configuration 文件结构
78
+ - 插件系统
79
+ - 教程
80
+ - 构建并部署一个静态站点
81
+ - 使用插件扩展功能
82
+ - 指令参考
83
+ - init
84
+ - build
85
+ - deploy
86
+ - plugin
87
+ - 故障排查
88
+ - 常见错误代码
89
+ - Debug 日志指南
90
+ - 性能与安全
91
+ - 版本与升级
92
+ - Changelog
93
+ - Breaking Changes
94
+ - 贡献
95
+
96
+ ```
97
+
98
+ </example>
@@ -0,0 +1,10 @@
1
+ <document_rules>
2
+ 基于提供的数据源,规划一份 Getting Started 文档结构规划:
3
+ - 整个结构规划是完整且连续的,用户跟着文档一步步操作,可以完成一个可运行示例
4
+ - 每个部分文档完成一个相对完整的步骤,避免单个部分文档过长,用户阅读有压力
5
+ - 根据需要提供参考的命令行、代码,方便用户跟着文档执行
6
+ - 基于一个有趣的场景来设计 Getting Started 文档
7
+ - 在示例中介绍项目的核心概念,目标是用户跟随文档完成示例后,对项目有一个比较完整清晰的理解
8
+ - 尽可能包含项目的功能、核心概念
9
+
10
+ </document_rules>
@@ -0,0 +1,17 @@
1
+
2
+ <document_rules>
3
+ 文档类结构规划规则:
4
+ - 对于结构规划需要生成完整的文档结构,覆盖源码中的所有功能,并提供代码示例的示例。
5
+ - 基于提供的源代码进行结构规划,确保规划的节点都有足够的信息展示
6
+ - 相关的内容要聚合到同一个部分文档中,不要分散到多个部分文档中,避免内容在多个部分文档中重复
7
+ - 结构规划要精炼,避免同一个功能被拆为了多个部分,当内容足够复杂,放在一起展示过长影响用户阅读时,考虑拆出子层级
8
+ - **第一层 <= 7 项**,层级 <= 3 级;同一层使用统一语义(动词时态、名词单复数)
9
+ - 如果当前部分是存在子文档,当前文档只展示简要的内容,引导用户到子文档中查看详细的内容
10
+ - 总是在一开始包含下列内容:
11
+ - Overview:简要说明产品能解决什么,产品能提供什么,产品的结构信息,让用户能快速有一个全面的认识,给出下一步的入口,引导用户阅读
12
+ - Getting Started:内容包含安装、最小运行示例,让用户用通过一部分文档,在很短的时间就能跑通一个最简单的示例
13
+ - 标题中不需要包含产品名称,显示更加精简
14
+ - 'Overview' 和 'Getting Started' 章节应该引用所有源代码,方便写出准确全面的介绍
15
+ - **'Getting Started' 下不需要拆分子章节**
16
+ - 每个部分文档都应该尽可能多的引用相关的源代码,来确保生成文档更详细准确,对于你不确定的项,优先添加引用
17
+ </document_rules>