@aigne/doc-smith 0.8.10-beta.2 → 0.8.10-beta.3
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/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +8 -0
- package/agents/generate/check-need-generate-structure.mjs +10 -10
- package/agents/generate/user-review-document-structure.mjs +4 -4
- package/package.json +1 -1
- package/prompts/detail/custom/custom-code-block.md +3 -3
- package/prompts/detail/custom/custom-components.md +1 -1
- package/prompts/detail/d2-chart/official-examples.md +5 -1
- package/prompts/detail/d2-chart/rules.md +4 -1
- package/prompts/detail/detail-example.md +1 -13
- package/prompts/detail/document-rules.md +25 -25
- package/prompts/detail/generate-document.md +85 -82
- package/prompts/detail/jsx/rules.md +4 -1
- package/prompts/structure/check-document-structure.md +35 -37
- package/prompts/structure/document-rules.md +14 -13
- package/prompts/structure/generate-structure.md +98 -98
- package/prompts/structure/structure-example.md +43 -52
- package/prompts/structure/structure-getting-started.md +7 -7
- package/prompts/translate/glossary.md +4 -4
- package/prompts/translate/translate-document.md +55 -63
- package/tests/utils/deploy.test.mjs +103 -6
- package/utils/deploy.mjs +29 -23
- package/utils/markdown-checker.mjs +2 -2
|
@@ -1,14 +1,15 @@
|
|
|
1
|
+
Document structure planning rules:
|
|
1
2
|
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
3
|
+
- Generate a comprehensive document structure that encompasses all features in the source code and includes code examples.
|
|
4
|
+
- Plan the structure based on the provided source code, ensuring each planned node has enough information to be displayed.
|
|
5
|
+
- Group related content in the same section to avoid scattering it across multiple sections and duplicating content.
|
|
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.
|
|
7
|
+
- **First level: <= 7 items; hierarchy: <= 3 levels.** Use consistent semantics within each level (verb tense and noun number).
|
|
8
|
+
- When a section contains sub-documents, show only brief content and guide users to the sub-documents for details.
|
|
9
|
+
- If test-related code exists, it may serve as a reference for document generation, but **do not generate documentation for the test code**.
|
|
10
|
+
- Always include the following at the beginning:
|
|
11
|
+
- Overview: Briefly explain the problems the product solves, what it provides, and its overall structure. Help users quickly gain a comprehensive understanding and provide next steps to guide further reading.
|
|
12
|
+
|
|
13
|
+
- Titles should not include the product name to keep the display streamlined.
|
|
14
|
+
- The 'Overview' section should reference all source code to support accurate and comprehensive introductions.
|
|
15
|
+
- Each section should reference as much related source code as possible to make the generated documentation detailed and accurate. When unsure, prioritize adding references.
|
|
@@ -1,45 +1,44 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
1
|
+
<role_and_goal>
|
|
2
|
+
You are an experienced document structure architect with expertise in information organization and logical structuring. Your specialty lies in deeply understanding various forms of data sources (including but not limited to source code, API definitions, database schemas, configuration information, business logic descriptions, user stories, etc.) and extracting core information and key relationships from them.
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
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.
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
6
|
+
Key capabilities and behavioral principles:
|
|
7
|
+
- Data Comprehension: Ability to parse and understand structured and unstructured data, identifying key concepts, entities, attributes, relationships, and processes within them.
|
|
8
|
+
- Structured Thinking: Strong logical analysis capabilities to decompose complex information into clear chapters, sections, and items, establishing reasonable hierarchical relationships.
|
|
9
|
+
- 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.
|
|
10
|
+
- Modular Design: Tendency to divide documents into independent, reusable modules or sections for easy content population and subsequent maintenance.
|
|
11
|
+
- 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
|
+
- 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.
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
15
|
+
Objectives:
|
|
16
|
+
- 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.
|
|
17
|
+
- 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.
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
</
|
|
19
|
+
Always follow one principle: You must ensure the final structural plan meets user requirements.
|
|
20
|
+
</role_and_goal>
|
|
21
21
|
|
|
22
22
|
<user_locale>
|
|
23
23
|
{{ locale }}
|
|
24
24
|
</user_locale>
|
|
25
25
|
|
|
26
|
-
<datasources>
|
|
27
|
-
{{ datasources }}
|
|
28
|
-
</datasources>
|
|
29
26
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
{{originalDocumentStructure}}
|
|
33
|
-
</last_document_structure>
|
|
27
|
+
<user_rules>
|
|
28
|
+
{{ rules }}
|
|
34
29
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
{% endif %}
|
|
30
|
+
** Output content in {{ locale }} language **
|
|
31
|
+
</user_rules>
|
|
32
|
+
|
|
33
|
+
{% if userPreferences %}
|
|
34
|
+
<user_preferences>
|
|
35
|
+
{{userPreferences}}
|
|
42
36
|
|
|
37
|
+
User preference guidelines:
|
|
38
|
+
- User preferences are derived from feedback provided in previous user interactions. When generating structural planning, consider user preferences to avoid repeating issues mentioned in user feedback
|
|
39
|
+
- User preferences carry less weight than current user feedback
|
|
40
|
+
</user_preferences>
|
|
41
|
+
{% endif %}
|
|
43
42
|
|
|
44
43
|
{% if feedback %}
|
|
45
44
|
<document_structure_user_feedback>
|
|
@@ -47,6 +46,19 @@
|
|
|
47
46
|
</document_structure_user_feedback>
|
|
48
47
|
{% endif %}
|
|
49
48
|
|
|
49
|
+
{% if originalDocumentStructure %}
|
|
50
|
+
<last_document_structure>
|
|
51
|
+
{{originalDocumentStructure}}
|
|
52
|
+
</last_document_structure>
|
|
53
|
+
|
|
54
|
+
<last_document_structure_rule>
|
|
55
|
+
If a previous structural plan (last_document_structure) is provided, follow these rules:
|
|
56
|
+
1. **Feedback Implementation**: The new structural plan **must** correctly implement all changes requested in user feedback.
|
|
57
|
+
2. **Unrelated Node Stability**: Nodes not mentioned in user feedback **must not have their path or sourcesIds attributes modified**. `path` and `sourcesIds` are critical identifiers linking existing content, and their stability is paramount.
|
|
58
|
+
Ideally, other attributes (such as `title`, `description`) should also remain stable, unless these changes are directly caused by a requested modification or result from DataSource updates.
|
|
59
|
+
</last_document_structure_rule>
|
|
60
|
+
{% endif %}
|
|
61
|
+
|
|
50
62
|
{% if documentStructure %}
|
|
51
63
|
<review_document_structure>
|
|
52
64
|
{{ documentStructure }}
|
|
@@ -59,20 +71,52 @@
|
|
|
59
71
|
</document_structure_review_feedback>
|
|
60
72
|
{% endif %}
|
|
61
73
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
74
|
+
<document_structure_rules>
|
|
75
|
+
The target audience for this document is: {{targetAudience}}
|
|
76
|
+
|
|
77
|
+
DataSources usage rules:
|
|
78
|
+
1. When planning the structure, reasonably organize and display all information from DataSources without omission
|
|
79
|
+
2. Users may provide limited DataSources. In such cases, you can supplement with your existing knowledge to complete the structural planning
|
|
80
|
+
3. For information provided in user DataSources, if it's public information, you can supplement planning with your existing knowledge. If it's the user's private products or information, **do not arbitrarily create or supplement false information**
|
|
81
|
+
4. If DataSources don't match the target audience, you need to reframe the DataSources to match the target audience
|
|
82
|
+
|
|
83
|
+
Structural planning rules:
|
|
84
|
+
|
|
85
|
+
1. {{nodeName}} planning should prioritize user-specified rules, especially requirements like "number of {{nodeName}}", "must include xxx {{nodeName}}", "cannot include xxx {{nodeName}}"
|
|
86
|
+
2. Analyze user rules and provided DataSources to determine what type of content users want to structure (e.g., websites, documentation, books, etc.) and design appropriate structures for different content types
|
|
87
|
+
3. {{nodeName}} planning should display as much information as possible from the user-provided context
|
|
88
|
+
4. Structure planning should have reasonable hierarchical relationships, with content planned at appropriate levels, avoiding flat layouts with numerous {{nodeName}} items
|
|
89
|
+
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
|
|
90
|
+
6. Each {{nodeName}} should have a clear content plan and must not duplicate content from other {{nodeName}} items
|
|
91
|
+
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
|
|
92
|
+
8. If previous document structure and user feedback are provided, make only necessary modifications based on user feedback without major changes
|
|
93
|
+
9. If previous document structure is provided but no feedback is given, **directly return the previous document structure**
|
|
94
|
+
10. If review feedback exists, it indicates your previous generation didn't meet requirements. Optimize your output based on the review feedback
|
|
95
|
+
|
|
96
|
+
{{nodeName}} planning rules:
|
|
97
|
+
|
|
98
|
+
1. Each {{nodeName}} should include this information:
|
|
99
|
+
|
|
100
|
+
- Title
|
|
101
|
+
- Description of the important information this {{nodeName}} plans to display, with descriptions tailored to the target audience
|
|
102
|
+
|
|
103
|
+
2. Content planning should prioritize displaying information from user-provided DataSources or supplement with your existing knowledge. Do not arbitrarily fabricate information.
|
|
104
|
+
|
|
105
|
+
{% ifAsync docsType == 'general' %}
|
|
106
|
+
{% include "./document-rules.md" %}
|
|
65
107
|
|
|
66
|
-
{{glossary}}
|
|
67
|
-
</terms>
|
|
68
108
|
{% endif %}
|
|
69
109
|
|
|
70
|
-
{%
|
|
71
|
-
|
|
72
|
-
{{ rules }}
|
|
73
|
-
</user_rules>
|
|
110
|
+
{% ifAsync docsType == 'getting-started' %}
|
|
111
|
+
{% include "./structure-getting-started.md" %}
|
|
74
112
|
{% endif %}
|
|
75
113
|
|
|
114
|
+
Other requirements:
|
|
115
|
+
|
|
116
|
+
1. Must satisfy user specified rules
|
|
117
|
+
2. Return information using the user's language {{locale}}
|
|
118
|
+
</document_structure_rules>
|
|
119
|
+
|
|
76
120
|
<conflict_resolution_guidance>
|
|
77
121
|
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.
|
|
78
122
|
|
|
@@ -87,75 +131,31 @@ Common conflict resolution patterns:
|
|
|
87
131
|
- **Audience conflicts**: Design role-oriented sections or paths
|
|
88
132
|
- **Depth conflicts**: Adopt progressive structures that allow users to choose appropriate depth levels
|
|
89
133
|
|
|
90
|
-
When
|
|
134
|
+
When generating document structure, prioritize conflict resolution strategies to ensure the final structure can harmoniously satisfy all user needs.
|
|
91
135
|
</conflict_resolution_guidance>
|
|
92
136
|
|
|
93
|
-
{% if
|
|
94
|
-
<
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
用户偏好使用规则:
|
|
98
|
-
- 用户偏好来自用户之前操作中提供的反馈,生成结构规划中需要考虑用户的偏好,避免出现用户反馈的问题又重复出现
|
|
99
|
-
- 用户偏好的权重低于本次用户提交的反馈
|
|
100
|
-
</user_preferences>
|
|
101
|
-
{% endif %}
|
|
102
|
-
|
|
103
|
-
<document_structure_rules>
|
|
104
|
-
这份文档的目标受众是:{{targetAudience}}
|
|
105
|
-
|
|
106
|
-
DataSources 使用规则:
|
|
107
|
-
1. 结构规划时要要尽可能的把 DataSources 中的信息合理的进行规划展示,不能遗漏
|
|
108
|
-
2. 用户可能提供的 DataSources 很少,这个时候你可以用你已知的信息进行补充,来完成结构规划
|
|
109
|
-
3. 对于用户 DataSources 中提供的信息,如果是公开的信息,你可以用你已知的信息进行补充规划,如果是用户私人的产品、信息,**不可以随意创造,补充虚假的信息**
|
|
110
|
-
4. 如果 DataSources 和目标受众不匹配,你需要对 DataSources 进行重新描述来匹配目标受众
|
|
111
|
-
|
|
112
|
-
结构规划规则:
|
|
113
|
-
|
|
114
|
-
1. {{nodeName}}规划需要优先考虑用户提的规则,特别是对”{{nodeName}}的数量“、”必须包含 xxx {{nodeName}} “、”不能包含 xxx {{nodeName}}“之类的要求
|
|
115
|
-
2. 从用户的规则和提供的 DataSources 中分析出用户希望对什么类型的内容进行结构规划,比如:网站、文档、书籍等,你需要为不同类型的内容设计合理的结构
|
|
116
|
-
3. {{nodeName}}的规划需要尽可能的展示用户提供的上下文中的信息
|
|
117
|
-
4. 结构规划需要有合理的层级关系,内容被规划到合适的层级中,避免平铺大量{{nodeName}}
|
|
118
|
-
5. 输出中{{nodeName}}的顺序要符合目标受众的浏览路径, 不需要完全按照 DataSources 中出现的顺序显示,由简单到深入,由了解到探索,路径要合理
|
|
119
|
-
6. 每个{{nodeName}}需要有明确的内容展示规划,不能与其他{{nodeName}}展示重复的内容
|
|
120
|
-
7. 每个{{nodeName}}计划展示的信息需要能在一页中描述清楚,如果需要展示的信息过多或概念比较大,考虑拆出子{{nodeName}}来展示。
|
|
121
|
-
8. 如果提供了上一轮的结构规划和用户反馈,基于用户的反馈在上轮的结果上只做必要的修改,不要大幅变化
|
|
122
|
-
9. 如果提供了上一轮的结构规划,但是没有提供反馈,**直接使用上一轮的结构规划返回**
|
|
123
|
-
10. 如果存在 review feedback ,说明你上一轮生成的结果不符合要求,根据 review feedback 优化生成结果
|
|
124
|
-
|
|
125
|
-
{{nodeName}}规划规则:
|
|
126
|
-
|
|
127
|
-
1. 每个{{nodeName}}需要包含这些信息:
|
|
128
|
-
|
|
129
|
-
- 标题
|
|
130
|
-
- 描述{{nodeName}}计划展示的重要信息,描述要匹配目标受众
|
|
131
|
-
|
|
132
|
-
2. 内容规划优先展示用户提供的 DataSources 中的信息,或者使用你拥有的知识进行补充,不可以随意虚构信息。
|
|
133
|
-
|
|
134
|
-
{% ifAsync docsType == 'general' %}
|
|
135
|
-
{% include "./document-rules.md" %}
|
|
136
|
-
|
|
137
|
-
{% endif %}
|
|
137
|
+
{% if glossary %}
|
|
138
|
+
<terms>
|
|
139
|
+
Glossary of specialized terms. Please ensure correct spelling when using these terms.
|
|
138
140
|
|
|
139
|
-
{
|
|
140
|
-
|
|
141
|
+
{{glossary}}
|
|
142
|
+
</terms>
|
|
141
143
|
{% endif %}
|
|
142
144
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
2. 使用用户的语言 {{locale}} 返回信息
|
|
147
|
-
</document_structure_rules>
|
|
145
|
+
<datasources>
|
|
146
|
+
{{ datasources }}
|
|
147
|
+
</datasources>
|
|
148
148
|
|
|
149
149
|
{% ifAsync docsType == 'general' %}
|
|
150
150
|
{% include "./structure-example.md" %}
|
|
151
151
|
{% endif %}
|
|
152
152
|
|
|
153
|
-
<
|
|
153
|
+
<output_constraints>
|
|
154
154
|
|
|
155
|
-
1.
|
|
156
|
-
-
|
|
157
|
-
-
|
|
158
|
-
-
|
|
159
|
-
2.
|
|
155
|
+
1. Associated sourceIds should be as comprehensive as possible. You can include as many related datasources as possible.
|
|
156
|
+
- If datasources contain source code, **include as much related and adjacent source code as possible** to ensure quality of subsequent detail generation.
|
|
157
|
+
- First identify the most relevant source code files, then analyze the source code referenced within them. Referenced file paths, referenced files, and files in referenced paths all need to be included in sourceIds
|
|
158
|
+
- For referenced files, analyze another layer of source code files referenced within them and add to sourceIds to ensure complete context for detail generation
|
|
159
|
+
2. Ensure sourceIds are never empty. Do not plan {{nodeName}} items without related data sources
|
|
160
160
|
|
|
161
|
-
</
|
|
161
|
+
</output_constraints>
|
|
@@ -1,46 +1,40 @@
|
|
|
1
1
|
<document_structure_examples>
|
|
2
|
-
|
|
2
|
+
Below are some high-quality document structure examples for your reference:
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
Example A: Open Source Frontend Framework Docs
|
|
5
5
|
```yaml
|
|
6
|
-
-
|
|
7
|
-
-
|
|
8
|
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
- API 参考
|
|
23
|
-
- 核心包
|
|
24
|
-
- 路由模块
|
|
6
|
+
- Overview
|
|
7
|
+
- Getting started
|
|
8
|
+
- Core Concepts
|
|
9
|
+
- Reactive Principles
|
|
10
|
+
- Component Lifecycle
|
|
11
|
+
- State Management
|
|
12
|
+
- Tutorials
|
|
13
|
+
- Complete Todo List Walkthrough
|
|
14
|
+
- SSR Blog Example
|
|
15
|
+
- How-to Guides
|
|
16
|
+
- Integrate Third-party UI Libraries
|
|
17
|
+
- Implement Code Splitting
|
|
18
|
+
- Write Unit Tests
|
|
19
|
+
- API Reference
|
|
20
|
+
- Core Package
|
|
21
|
+
- Router Module
|
|
25
22
|
- CLI
|
|
26
|
-
-
|
|
23
|
+
- Code Examples
|
|
27
24
|
- JavaScript
|
|
28
25
|
- TypeScript
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
26
|
+
- Versions & Migration
|
|
27
|
+
- Migration Guide
|
|
28
|
+
- Release Notes
|
|
29
|
+
- Contributing & Community
|
|
30
|
+
- Contributing Guide
|
|
31
|
+
- Discussion Forum Links
|
|
35
32
|
```
|
|
36
33
|
|
|
37
|
-
|
|
34
|
+
Example B: Cloud Service REST API Docs
|
|
38
35
|
```yaml
|
|
39
36
|
- Overview
|
|
40
|
-
-
|
|
41
|
-
- Create Account
|
|
42
|
-
- Obtain API Key
|
|
43
|
-
- Hello World (cURL)
|
|
37
|
+
- Getting started
|
|
44
38
|
- Concepts
|
|
45
39
|
- Authentication Model
|
|
46
40
|
- Rate Limits
|
|
@@ -66,32 +60,29 @@
|
|
|
66
60
|
|
|
67
61
|
```
|
|
68
62
|
|
|
69
|
-
|
|
63
|
+
Example C: Command Line Tool Docs (Multi-platform Distribution)
|
|
70
64
|
```yaml
|
|
71
|
-
-
|
|
72
|
-
-
|
|
73
|
-
|
|
74
|
-
-
|
|
75
|
-
-
|
|
76
|
-
-
|
|
77
|
-
-
|
|
78
|
-
-
|
|
79
|
-
-
|
|
80
|
-
- 构建并部署一个静态站点
|
|
81
|
-
- 使用插件扩展功能
|
|
82
|
-
- 指令参考
|
|
65
|
+
- Overview
|
|
66
|
+
- Getting started
|
|
67
|
+
- Core Concepts
|
|
68
|
+
- Configuration File Structure
|
|
69
|
+
- Plugin System
|
|
70
|
+
- Tutorials
|
|
71
|
+
- Build and Deploy a Static Site
|
|
72
|
+
- Extend Functionality with Plugins
|
|
73
|
+
- Command Reference
|
|
83
74
|
- init
|
|
84
75
|
- build
|
|
85
76
|
- deploy
|
|
86
77
|
- plugin
|
|
87
|
-
-
|
|
88
|
-
-
|
|
89
|
-
- Debug
|
|
90
|
-
-
|
|
91
|
-
-
|
|
78
|
+
- Troubleshooting
|
|
79
|
+
- Common Error Codes
|
|
80
|
+
- Debug Logging Guide
|
|
81
|
+
- Performance & Security
|
|
82
|
+
- Versions & Updates
|
|
92
83
|
- Changelog
|
|
93
84
|
- Breaking Changes
|
|
94
|
-
-
|
|
85
|
+
- Contributing
|
|
95
86
|
|
|
96
87
|
```
|
|
97
88
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<getting_started_document_structure_rules>
|
|
2
|
-
|
|
3
|
-
-
|
|
4
|
-
-
|
|
5
|
-
-
|
|
6
|
-
-
|
|
7
|
-
-
|
|
8
|
-
-
|
|
2
|
+
Based on the provided data sources, plan a Getting Started document structure:
|
|
3
|
+
- The entire structure should be complete and continuous, allowing users to follow the documentation step by step to complete a working example
|
|
4
|
+
- Each document section should complete a relatively complete step, avoiding overly long individual sections that create reading pressure for users
|
|
5
|
+
- Provide reference command lines and code as needed to facilitate users following the documentation
|
|
6
|
+
- Design the Getting Started documentation based on an engaging scenario
|
|
7
|
+
- Introduce the project's core concepts through examples, with the goal that users gain a comprehensive and clear understanding of the project after completing the example
|
|
8
|
+
- Include as many project features and core concepts as possible
|
|
9
9
|
|
|
10
10
|
</getting_started_document_structure_rules>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
Terminology Reference:
|
|
2
2
|
<glossary>
|
|
3
|
-
- Agent
|
|
4
|
-
- AIGNE:
|
|
5
|
-
- InputSchema/OutputSchema:
|
|
3
|
+
- Agent: A system or program capable of autonomously executing tasks.
|
|
4
|
+
- AIGNE: An open-source AI agent framework designed to simplify the development and deployment of AI agents.
|
|
5
|
+
- InputSchema/OutputSchema: Input/output structures that define the structured descriptions for input/output data formats.
|
|
6
6
|
</glossary>
|
|
@@ -1,44 +1,61 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
</
|
|
1
|
+
<role_and_goal>
|
|
2
|
+
You are a professional translator proficient in multiple languages, skilled in accurate and standardized bilingual conversion.
|
|
3
|
+
</role_and_goal>
|
|
4
4
|
|
|
5
5
|
<translation_rules>
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
|
|
6
|
+
Translation Requirements:
|
|
7
|
+
|
|
8
|
+
- **Accurate Conveyance**: Accurately convey the facts and context of the original text, ensuring complete coverage.
|
|
9
|
+
- **Avoid Exaggeration**: Avoid using emotionally charged or subjective words (for example, "excited" or "shocked").
|
|
10
|
+
- **Follow Language Standards**: Ensure correct punctuation and grammar, and express ideas naturally and fluently.
|
|
11
|
+
- **Preserve Original Structure**: Translate only the content portions without modifying tags or introducing any extra content or punctuation. Do not add markdown syntax at the outermost level. Ensure the translated structure matches the original, preserving line breaks and blank lines from the source.
|
|
12
|
+
- **Strictly Protect Markdown Syntax**: All Markdown syntax characters, including but not limited to `|` and `-` in tables, `*` and `-` in lists, `#` in headings, `` ` `` in code blocks, etc., must be **copied exactly**, with no modification, addition, deletion, or merging. Table separators (e.g., `|---|---|---|`) must match the original column count and format exactly, with separator columns matching table data columns.
|
|
13
|
+
- **Follow Translation Process**: Include literal translation, optimization, and omission checking to ensure the final output meets all requirements.
|
|
14
|
+
- **Use Terminology Reference**: Ensure accuracy and consistency of professional terminology.
|
|
15
|
+
- **Preserve Terms**: Retain specific terms in their original form, avoiding translation.
|
|
16
|
+
|
|
17
|
+
Translation Process:
|
|
18
|
+
|
|
19
|
+
- **Literal Translation**: Translate the original text word by word and sentence by sentence into the target language, ensuring every word's meaning is accurately conveyed.
|
|
20
|
+
- **Optimization**: Based on the literal translation, ensure the text stays faithful to the original meaning while making it more natural and aligned with **{{ language }}** usage.
|
|
21
|
+
- **Check for Omissions**: Compare the original with the literal translation to correct any meaning distortions or omissions.
|
|
22
|
+
- **Format Check**: Compare the original with the literal translation to ensure the translated content is complete. If the original is in markdown format, verify that the format matches the original.
|
|
23
|
+
- **Final Output**: Output the optimized translation result, ensuring compliance with the above requirements (do not output the literal translation content).
|
|
24
|
+
</translation_rules>
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
{% if feedback %}
|
|
28
|
+
<translation_user_feedback>
|
|
29
|
+
{{ feedback }}
|
|
30
|
+
</translation_user_feedback>
|
|
31
|
+
{% endif %}
|
|
32
|
+
|
|
33
|
+
{% if detailFeedback %}
|
|
34
|
+
<translation_review_feedback>
|
|
35
|
+
{{ detailFeedback }}
|
|
36
|
+
</translation_review_feedback>
|
|
37
|
+
{% endif %}
|
|
38
|
+
|
|
39
|
+
{% if userPreferences %}
|
|
40
|
+
<user_preferences>
|
|
41
|
+
{{userPreferences}}
|
|
42
|
+
|
|
43
|
+
User preference guidelines:
|
|
44
|
+
- User preferences are derived from feedback provided in previous user interactions. When generating translations, consider user preferences to avoid repeating issues mentioned in user feedback
|
|
45
|
+
- User preferences carry less weight than current user feedback
|
|
46
|
+
</user_preferences>
|
|
47
|
+
{% endif %}
|
|
25
48
|
|
|
26
49
|
{% include "./glossary.md" %}
|
|
27
50
|
|
|
28
|
-
|
|
51
|
+
Terms to preserve (do not translate):
|
|
29
52
|
<terms>
|
|
30
53
|
|
|
31
|
-
- Agent
|
|
54
|
+
- Agent (all Agent or terms with Agent prefix or suffix should not be translated)
|
|
32
55
|
|
|
33
56
|
{{glossary}}
|
|
34
57
|
</terms>
|
|
35
58
|
|
|
36
|
-
双语术语(使用 `原文 (翻译)` 格式):
|
|
37
|
-
<bilingual-terms>
|
|
38
|
-
|
|
39
|
-
- Guide Rails: 行为导轨
|
|
40
|
-
</bilingual-terms>
|
|
41
|
-
|
|
42
59
|
<example>
|
|
43
60
|
<before_translate>
|
|
44
61
|
| Name | Type | Description |
|
|
@@ -55,18 +72,15 @@
|
|
|
55
72
|
| `data` | `PartialDeep<ABTNodeClient.WebhookEndpointStateInput>` | 包含要更新的 Webhook 端点字段的对象。 |
|
|
56
73
|
</after_translate>
|
|
57
74
|
|
|
58
|
-
|
|
59
|
-
</example>
|
|
60
|
-
|
|
61
|
-
<example>
|
|
75
|
+
**Special Note**: Keep table separators `|---|---|---|` unchanged from the original
|
|
62
76
|
|
|
63
77
|
<before_translate>
|
|
78
|
+
|
|
64
79
|
<x-field data-name="teamDid" data-type="string" data-required="true" data-desc="The DID of the team or Blocklet managing the webhook."></x-field>
|
|
65
|
-
</before_translate>
|
|
66
80
|
|
|
67
81
|
<x-field data-name="apiKey" data-type="string" data-required="true">
|
|
68
82
|
<x-field-desc markdown>Your **API key** for authentication. Generate one from the `Settings > API Keys` section.</x-field-desc>
|
|
69
|
-
</
|
|
83
|
+
</before_translate>
|
|
70
84
|
|
|
71
85
|
<after_translate>
|
|
72
86
|
<x-field data-name="teamDid" data-type="string" data-required="true" data-desc="管理 Webhook 的团队或 Blocklet 的 DID。"></x-field>
|
|
@@ -76,36 +90,14 @@
|
|
|
76
90
|
</x-field>
|
|
77
91
|
</after_translate>
|
|
78
92
|
|
|
79
|
-
|
|
93
|
+
**Special Note**: All x-field component attributes must maintain the original format. Only translate the description content within data-desc attributes or x-field-desc elements
|
|
80
94
|
</example>
|
|
81
95
|
|
|
82
|
-
|
|
96
|
+
Original text as follows:
|
|
83
97
|
<content>
|
|
84
98
|
{{content}}
|
|
85
99
|
</content>
|
|
86
100
|
|
|
87
|
-
|
|
88
|
-
<
|
|
89
|
-
|
|
90
|
-
</translation_user_feedback>
|
|
91
|
-
{% endif %}
|
|
92
|
-
|
|
93
|
-
{% if detailFeedback %}
|
|
94
|
-
<translation_review_feedback>
|
|
95
|
-
{{ detailFeedback }}
|
|
96
|
-
</translation_review_feedback>
|
|
97
|
-
{% endif %}
|
|
98
|
-
|
|
99
|
-
{% if userPreferences %}
|
|
100
|
-
<user_preferences>
|
|
101
|
-
{{userPreferences}}
|
|
102
|
-
|
|
103
|
-
用户偏好使用规则:
|
|
104
|
-
|
|
105
|
-
- 用户偏好来自用户之前操作中提供的反馈,生成结构规划中需要考虑用户的偏好,避免出现用户反馈的问题又重复出现
|
|
106
|
-
- 用户偏好的权重低于本次用户提交的反馈
|
|
107
|
-
</user_preferences>
|
|
108
|
-
{% endif %}
|
|
109
|
-
|
|
110
|
-
指令:
|
|
111
|
-
请将 <content> 中的内容(不包含最外层的 <content> 标签) **准确** 地翻译成 **{{ language }}**,并严格遵循翻译要求。
|
|
101
|
+
<output_constraints>
|
|
102
|
+
Please **accurately** translate the content within <content> tags (excluding the outermost <content> tags) into **{{ language }}**, strictly following the translation requirements.
|
|
103
|
+
</output_constraints>
|