@aigne/doc-smith 0.9.8-alpha.3 → 0.9.8-alpha.4

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 (257) hide show
  1. package/CLAUDE.md +43 -0
  2. package/README.md +94 -250
  3. package/aigne.yaml +2 -149
  4. package/doc-smith/SKILL.md +117 -0
  5. package/doc-smith/references/changeset_schema.md +118 -0
  6. package/doc-smith/references/document_structure_schema.md +139 -0
  7. package/doc-smith/references/document_update_guide.md +193 -0
  8. package/doc-smith/references/structure_confirmation_guide.md +133 -0
  9. package/doc-smith/references/structure_planning_guide.md +146 -0
  10. package/doc-smith/references/user_intent_guide.md +172 -0
  11. package/doc-smith.yaml +114 -0
  12. package/main-system-prompt.md +56 -0
  13. package/package.json +3 -69
  14. package/scripts/README.md +90 -0
  15. package/scripts/install.sh +86 -0
  16. package/scripts/uninstall.sh +52 -0
  17. package/CHANGELOG.md +0 -994
  18. package/LICENSE +0 -93
  19. package/agentic-agents/common/base-info.md +0 -53
  20. package/agentic-agents/common/completer.md +0 -54
  21. package/agentic-agents/common/planner.md +0 -168
  22. package/agentic-agents/common/worker.md +0 -93
  23. package/agentic-agents/create/index.yaml +0 -129
  24. package/agentic-agents/create/objective.md +0 -44
  25. package/agentic-agents/create/set-custom-prompt.mjs +0 -27
  26. package/agentic-agents/detail/index.yaml +0 -95
  27. package/agentic-agents/detail/objective.md +0 -9
  28. package/agentic-agents/detail/set-custom-prompt.mjs +0 -88
  29. package/agentic-agents/predict-resources/index.yaml +0 -44
  30. package/agentic-agents/predict-resources/instructions.md +0 -61
  31. package/agentic-agents/structure/design-rules.md +0 -39
  32. package/agentic-agents/structure/index.yaml +0 -86
  33. package/agentic-agents/structure/objective.md +0 -14
  34. package/agentic-agents/structure/review-criteria.md +0 -55
  35. package/agentic-agents/structure/set-custom-prompt.mjs +0 -78
  36. package/agentic-agents/utils/init-workspace-cache.mjs +0 -171
  37. package/agentic-agents/utils/load-base-sources.mjs +0 -20
  38. package/agentic-agents/workspace-cache-sharing-design.md +0 -671
  39. package/agents/chat/chat-system.md +0 -38
  40. package/agents/chat/index.mjs +0 -59
  41. package/agents/chat/skills/generate-document.yaml +0 -15
  42. package/agents/chat/skills/list-documents.mjs +0 -15
  43. package/agents/chat/skills/update-document.yaml +0 -24
  44. package/agents/clear/choose-contents.mjs +0 -192
  45. package/agents/clear/clear-auth-tokens.mjs +0 -88
  46. package/agents/clear/clear-deployment-config.mjs +0 -49
  47. package/agents/clear/clear-document-config.mjs +0 -36
  48. package/agents/clear/clear-document-structure.mjs +0 -102
  49. package/agents/clear/clear-generated-docs.mjs +0 -142
  50. package/agents/clear/clear-media-description.mjs +0 -129
  51. package/agents/clear/index.yaml +0 -26
  52. package/agents/create/analyze-diagram-type-llm.yaml +0 -160
  53. package/agents/create/analyze-diagram-type.mjs +0 -297
  54. package/agents/create/check-document-structure.yaml +0 -30
  55. package/agents/create/check-need-generate-structure.mjs +0 -105
  56. package/agents/create/document-structure-tools/add-document.mjs +0 -85
  57. package/agents/create/document-structure-tools/delete-document.mjs +0 -116
  58. package/agents/create/document-structure-tools/move-document.mjs +0 -109
  59. package/agents/create/document-structure-tools/update-document.mjs +0 -84
  60. package/agents/create/generate-diagram-image.yaml +0 -60
  61. package/agents/create/generate-structure.yaml +0 -117
  62. package/agents/create/index.yaml +0 -49
  63. package/agents/create/refine-document-structure.yaml +0 -12
  64. package/agents/create/replace-d2-with-image.mjs +0 -625
  65. package/agents/create/update-document-structure.yaml +0 -54
  66. package/agents/create/user-add-document/add-documents-to-structure.mjs +0 -90
  67. package/agents/create/user-add-document/find-documents-to-add-links.yaml +0 -47
  68. package/agents/create/user-add-document/index.yaml +0 -46
  69. package/agents/create/user-add-document/prepare-documents-to-translate.mjs +0 -22
  70. package/agents/create/user-add-document/print-add-document-summary.mjs +0 -63
  71. package/agents/create/user-add-document/review-documents-with-new-links.mjs +0 -110
  72. package/agents/create/user-remove-document/find-documents-with-invalid-links.mjs +0 -78
  73. package/agents/create/user-remove-document/index.yaml +0 -40
  74. package/agents/create/user-remove-document/prepare-documents-to-translate.mjs +0 -22
  75. package/agents/create/user-remove-document/print-remove-document-summary.mjs +0 -53
  76. package/agents/create/user-remove-document/remove-documents-from-structure.mjs +0 -99
  77. package/agents/create/user-remove-document/review-documents-with-invalid-links.mjs +0 -115
  78. package/agents/create/user-review-document-structure.mjs +0 -140
  79. package/agents/create/utils/init-current-content.mjs +0 -34
  80. package/agents/create/utils/merge-document-structures.mjs +0 -30
  81. package/agents/evaluate/code-snippet.mjs +0 -97
  82. package/agents/evaluate/document-structure.yaml +0 -67
  83. package/agents/evaluate/document.yaml +0 -82
  84. package/agents/evaluate/generate-report.mjs +0 -85
  85. package/agents/evaluate/index.yaml +0 -46
  86. package/agents/history/index.yaml +0 -6
  87. package/agents/history/view.mjs +0 -78
  88. package/agents/init/check.mjs +0 -16
  89. package/agents/init/index.mjs +0 -275
  90. package/agents/init/validate.mjs +0 -16
  91. package/agents/localize/choose-language.mjs +0 -107
  92. package/agents/localize/index.yaml +0 -58
  93. package/agents/localize/record-translation-history.mjs +0 -23
  94. package/agents/localize/translate-document.yaml +0 -24
  95. package/agents/localize/translate-multilingual.yaml +0 -51
  96. package/agents/media/batch-generate-media-description.yaml +0 -46
  97. package/agents/media/generate-media-description.yaml +0 -50
  98. package/agents/media/load-media-description.mjs +0 -256
  99. package/agents/prefs/index.mjs +0 -203
  100. package/agents/publish/index.yaml +0 -26
  101. package/agents/publish/publish-docs.mjs +0 -356
  102. package/agents/publish/translate-meta.mjs +0 -103
  103. package/agents/schema/document-structure-item.yaml +0 -26
  104. package/agents/schema/document-structure-refine-item.yaml +0 -23
  105. package/agents/schema/document-structure.yaml +0 -29
  106. package/agents/update/batch-generate-document.yaml +0 -27
  107. package/agents/update/batch-update-document.yaml +0 -7
  108. package/agents/update/check-diagram-flag.mjs +0 -116
  109. package/agents/update/check-document.mjs +0 -162
  110. package/agents/update/check-generate-diagram.mjs +0 -106
  111. package/agents/update/check-sync-image-flag.mjs +0 -55
  112. package/agents/update/check-update-is-single.mjs +0 -53
  113. package/agents/update/document-tools/update-document-content.mjs +0 -303
  114. package/agents/update/generate-diagram.yaml +0 -63
  115. package/agents/update/generate-document.yaml +0 -70
  116. package/agents/update/handle-document-update.yaml +0 -103
  117. package/agents/update/index.yaml +0 -79
  118. package/agents/update/pre-check-generate-diagram.yaml +0 -44
  119. package/agents/update/save-and-translate-document.mjs +0 -76
  120. package/agents/update/sync-images-and-exit.mjs +0 -148
  121. package/agents/update/update-document-detail.yaml +0 -71
  122. package/agents/update/update-single/update-single-document-detail.mjs +0 -280
  123. package/agents/update/update-single-document.yaml +0 -7
  124. package/agents/update/user-review-document.mjs +0 -272
  125. package/agents/utils/action-success.mjs +0 -16
  126. package/agents/utils/analyze-document-feedback-intent.yaml +0 -32
  127. package/agents/utils/analyze-feedback-intent.mjs +0 -136
  128. package/agents/utils/analyze-structure-feedback-intent.yaml +0 -29
  129. package/agents/utils/check-detail-result.mjs +0 -38
  130. package/agents/utils/check-feedback-refiner.mjs +0 -81
  131. package/agents/utils/choose-docs.mjs +0 -293
  132. package/agents/utils/document-icon-generate.yaml +0 -52
  133. package/agents/utils/document-title-streamline.yaml +0 -48
  134. package/agents/utils/ensure-document-icons.mjs +0 -129
  135. package/agents/utils/exit.mjs +0 -6
  136. package/agents/utils/feedback-refiner.yaml +0 -50
  137. package/agents/utils/find-item-by-path.mjs +0 -114
  138. package/agents/utils/find-user-preferences-by-path.mjs +0 -37
  139. package/agents/utils/format-document-structure.mjs +0 -35
  140. package/agents/utils/generate-document-or-skip.mjs +0 -41
  141. package/agents/utils/handle-diagram-operations.mjs +0 -263
  142. package/agents/utils/load-all-document-content.mjs +0 -30
  143. package/agents/utils/load-document-all-content.mjs +0 -84
  144. package/agents/utils/load-sources.mjs +0 -405
  145. package/agents/utils/map-reasoning-effort-level.mjs +0 -15
  146. package/agents/utils/post-generate.mjs +0 -144
  147. package/agents/utils/read-current-document-content.mjs +0 -46
  148. package/agents/utils/save-doc-translation.mjs +0 -61
  149. package/agents/utils/save-doc.mjs +0 -88
  150. package/agents/utils/save-output.mjs +0 -26
  151. package/agents/utils/save-sidebar.mjs +0 -51
  152. package/agents/utils/skip-if-content-exists.mjs +0 -27
  153. package/agents/utils/streamline-document-titles-if-needed.mjs +0 -88
  154. package/agents/utils/transform-detail-data-sources.mjs +0 -45
  155. package/agents/utils/update-branding.mjs +0 -84
  156. package/assets/report-template/report.html +0 -198
  157. package/docs-mcp/analyze-content-relevance.yaml +0 -50
  158. package/docs-mcp/analyze-docs-relevance.yaml +0 -59
  159. package/docs-mcp/docs-search.yaml +0 -42
  160. package/docs-mcp/get-docs-detail.mjs +0 -41
  161. package/docs-mcp/get-docs-structure.mjs +0 -16
  162. package/docs-mcp/read-doc-content.mjs +0 -119
  163. package/prompts/common/document/content-rules-core.md +0 -20
  164. package/prompts/common/document/markdown-syntax-rules.md +0 -65
  165. package/prompts/common/document/media-file-list-usage-rules.md +0 -18
  166. package/prompts/common/document/openapi-usage-rules.md +0 -189
  167. package/prompts/common/document/role-and-personality.md +0 -16
  168. package/prompts/common/document/user-preferences.md +0 -9
  169. package/prompts/common/document-structure/conflict-resolution-guidance.md +0 -16
  170. package/prompts/common/document-structure/document-icon-generate.md +0 -116
  171. package/prompts/common/document-structure/document-structure-rules.md +0 -43
  172. package/prompts/common/document-structure/document-title-streamline.md +0 -86
  173. package/prompts/common/document-structure/glossary.md +0 -7
  174. package/prompts/common/document-structure/intj-traits.md +0 -5
  175. package/prompts/common/document-structure/openapi-usage-rules.md +0 -28
  176. package/prompts/common/document-structure/output-constraints.md +0 -18
  177. package/prompts/common/document-structure/user-locale-rules.md +0 -10
  178. package/prompts/common/document-structure/user-preferences.md +0 -9
  179. package/prompts/detail/custom/admonition-usage-rules.md +0 -94
  180. package/prompts/detail/custom/code-block-usage-rules.md +0 -163
  181. package/prompts/detail/custom/custom-components/x-card-usage-rules.md +0 -63
  182. package/prompts/detail/custom/custom-components/x-cards-usage-rules.md +0 -83
  183. package/prompts/detail/custom/custom-components/x-field-desc-usage-rules.md +0 -120
  184. package/prompts/detail/custom/custom-components/x-field-group-usage-rules.md +0 -80
  185. package/prompts/detail/custom/custom-components/x-field-usage-rules.md +0 -189
  186. package/prompts/detail/custom/custom-components-usage-rules.md +0 -18
  187. package/prompts/detail/diagram/generate-image-system.md +0 -135
  188. package/prompts/detail/diagram/generate-image-user.md +0 -32
  189. package/prompts/detail/diagram/guide.md +0 -29
  190. package/prompts/detail/diagram/official-examples.md +0 -712
  191. package/prompts/detail/diagram/pre-check.md +0 -23
  192. package/prompts/detail/diagram/role-and-personality.md +0 -2
  193. package/prompts/detail/diagram/rules.md +0 -46
  194. package/prompts/detail/diagram/system-prompt.md +0 -1139
  195. package/prompts/detail/diagram/user-prompt.md +0 -43
  196. package/prompts/detail/generate/detail-example.md +0 -457
  197. package/prompts/detail/generate/document-rules.md +0 -45
  198. package/prompts/detail/generate/system-prompt.md +0 -61
  199. package/prompts/detail/generate/user-prompt.md +0 -99
  200. package/prompts/detail/jsx/rules.md +0 -6
  201. package/prompts/detail/update/system-prompt.md +0 -121
  202. package/prompts/detail/update/user-prompt.md +0 -41
  203. package/prompts/evaluate/document-structure.md +0 -93
  204. package/prompts/evaluate/document.md +0 -149
  205. package/prompts/media/media-description/system-prompt.md +0 -43
  206. package/prompts/media/media-description/user-prompt.md +0 -17
  207. package/prompts/structure/check-document-structure.md +0 -93
  208. package/prompts/structure/document-rules.md +0 -21
  209. package/prompts/structure/find-documents-to-add-links.md +0 -52
  210. package/prompts/structure/generate/system-prompt.md +0 -13
  211. package/prompts/structure/generate/user-prompt.md +0 -137
  212. package/prompts/structure/review/structure-review-system.md +0 -81
  213. package/prompts/structure/structure-example.md +0 -89
  214. package/prompts/structure/structure-getting-started.md +0 -10
  215. package/prompts/structure/update/system-prompt.md +0 -93
  216. package/prompts/structure/update/user-prompt.md +0 -43
  217. package/prompts/translate/admonition.md +0 -20
  218. package/prompts/translate/code-block.md +0 -33
  219. package/prompts/translate/glossary.md +0 -6
  220. package/prompts/translate/translate-document.md +0 -305
  221. package/prompts/utils/analyze-document-feedback-intent.md +0 -54
  222. package/prompts/utils/analyze-structure-feedback-intent.md +0 -43
  223. package/prompts/utils/feedback-refiner.md +0 -105
  224. package/types/document-schema.mjs +0 -55
  225. package/types/document-structure-schema.mjs +0 -261
  226. package/utils/auth-utils.mjs +0 -275
  227. package/utils/blocklet.mjs +0 -104
  228. package/utils/check-document-has-diagram.mjs +0 -95
  229. package/utils/conflict-detector.mjs +0 -149
  230. package/utils/constants/index.mjs +0 -620
  231. package/utils/constants/linter.mjs +0 -102
  232. package/utils/d2-utils.mjs +0 -198
  233. package/utils/debug.mjs +0 -3
  234. package/utils/delete-diagram-images.mjs +0 -99
  235. package/utils/deploy.mjs +0 -86
  236. package/utils/docs-finder-utils.mjs +0 -623
  237. package/utils/evaluate/report-utils.mjs +0 -132
  238. package/utils/extract-api.mjs +0 -32
  239. package/utils/file-utils.mjs +0 -960
  240. package/utils/history-utils.mjs +0 -203
  241. package/utils/icon-map.mjs +0 -26
  242. package/utils/image-compress.mjs +0 -75
  243. package/utils/kroki-utils.mjs +0 -173
  244. package/utils/linter/index.mjs +0 -50
  245. package/utils/load-config.mjs +0 -107
  246. package/utils/markdown/index.mjs +0 -26
  247. package/utils/markdown-checker.mjs +0 -694
  248. package/utils/mermaid-validator.mjs +0 -140
  249. package/utils/mermaid-worker-pool.mjs +0 -250
  250. package/utils/mermaid-worker.mjs +0 -233
  251. package/utils/openapi/index.mjs +0 -28
  252. package/utils/preferences-utils.mjs +0 -175
  253. package/utils/request.mjs +0 -10
  254. package/utils/store/index.mjs +0 -45
  255. package/utils/sync-diagram-to-translations.mjs +0 -262
  256. package/utils/upload-files.mjs +0 -231
  257. package/utils/utils.mjs +0 -1354
@@ -1,116 +0,0 @@
1
- # Document Icon Generation
2
-
3
- <role>
4
- You are an icon selection specialist. Your task is to generate appropriate Iconify icon names for document structure root nodes based on their title and description. The icon should semantically match the document's purpose and content to provide better visual identification.
5
- </role>
6
-
7
- <input>
8
-
9
- - documentList: {{documentList}}
10
-
11
- </input>
12
-
13
- <icon_generation_rules>
14
-
15
- **Core Requirements:**
16
-
17
- 1. **Icon Format:**
18
- - Must be a valid **Lucide icon name** in the format: `lucide:icon-name`
19
- - Examples: `lucide:book`, `lucide:rocket`, `lucide:code`, `lucide:settings`
20
- - **Only Lucide icons are supported** - do not use other icon collections
21
-
22
- 3. **Icon Selection Guidelines:**
23
- - Choose icons that **semantically match** the document's purpose and content based on both title and description
24
- - Analyze the combined meaning of title and description to understand the document's purpose
25
- - Consider the **target audience** and **document type** when selecting icons
26
-
27
- 4. **Icon Categories and Suggestions:**
28
-
29
- **General Documentation:**
30
- - `lucide:book` - General documentation, guides
31
- - `lucide:file-text` - Text documents, articles
32
- - `lucide:book-open` - Reading materials, tutorials
33
- - `lucide:library` - Reference materials
34
-
35
- **Getting Started & Quick Start:**
36
- - `lucide:rocket` - Quick start, getting started guides
37
- - `lucide:play-circle` - Getting started, tutorials
38
- - `lucide:zap` - Quick start, fast setup
39
- - `lucide:sparkles` - Quick start, new features
40
-
41
- **API & Code References:**
42
- - `lucide:code` - API documentation, code references
43
- - `lucide:file-code-2` - Code files, programming guides
44
- - `lucide:terminal` - Command-line interfaces, CLI tools
45
- - `lucide:git-branch` - Version control, development
46
- - `lucide:brackets` - Code syntax, programming
47
-
48
- **Configuration & Settings:**
49
- - `lucide:settings` - Configuration guides, settings
50
- - `lucide:cog` - Configuration, setup
51
- - `lucide:wrench` - Tools, configuration
52
- - `lucide:sliders` - Settings, preferences
53
-
54
- **Tutorials & Learning:**
55
- - `lucide:graduation-cap` - Learning materials, tutorials
56
- - `lucide:lightbulb` - Tips, tutorials, guides
57
- - `lucide:book-open` - Learning, reading
58
- - `lucide:school` - Educational content
59
-
60
- **Project & Overview:**
61
- - `lucide:folder-open` - Project overview, structure
62
- - `lucide:layers` - Architecture, structure
63
- - `lucide:package` - Packages, modules
64
- - `lucide:box` - Components, modules
65
-
66
- **User & Community:**
67
- - `lucide:users` - User guides, community
68
- - `lucide:user` - User documentation
69
- - `lucide:help-circle` - Help, FAQ
70
- - `lucide:message-circle` - Communication, chat
71
-
72
- **Security & Admin:**
73
- - `lucide:shield` - Security, protection
74
- - `lucide:key` - Authentication, access
75
- - `lucide:lock` - Security, privacy
76
- - `lucide:shield-check` - Security verification
77
-
78
- **Deployment & Operations:**
79
- - `lucide:cloud` - Cloud services, deployment
80
- - `lucide:server` - Server, infrastructure
81
- - `lucide:database` - Database, data
82
- - `lucide:network` - Networking, connections
83
-
84
- 5. **Selection Process:**
85
- - Read both title and description carefully
86
- - Identify the primary purpose and content type
87
- - Match to the most appropriate icon category
88
- - Select the most semantically relevant Lucide icon from that category
89
- - Ensure the icon clearly represents the document's purpose
90
- - **Only use Lucide icons** - format must be `lucide:icon-name`
91
-
92
- 6. **Important Notes:**
93
- - Only generate icons for root-level documents (where parentId is null or empty)
94
- - Each document should have exactly one icon
95
- - Icons should be immediately recognizable and semantically clear
96
- - Avoid overly generic icons when a more specific one is available
97
- - Consider cultural and language context when appropriate
98
-
99
- </icon_generation_rules>
100
-
101
- <output_rules>
102
-
103
- Return a JSON object with:
104
-
105
- - `documentList`: array of document items with generated icons, each containing:
106
- - `path`: the same path from input (for mapping purposes)
107
- - `icon`: Lucide icon name in the format `lucide:icon-name` (e.g., `lucide:book`)
108
-
109
- Ensure each item:
110
- - Preserves the exact `path` value from the corresponding input item
111
- - Has an `icon` field with a valid Lucide icon name (format: `lucide:icon-name`)
112
- - The icon semantically matches the document's title and description
113
- - **Only uses Lucide icons** - do not use other icon collections
114
-
115
- </output_rules>
116
-
@@ -1,43 +0,0 @@
1
- <document_structure_rules>
2
- The target audience for this document is: {{targetAudience}}
3
-
4
- `<data_sources>` usage rules:
5
- 1. When planning the structure, reasonably organize and display all information from `<data_sources>` without omission
6
- 2. Users may provide limited `<data_sources>`. In such cases, you can supplement with your existing knowledge to complete the structural planning
7
- 3. For information provided in user `<data_sources>`, 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**
8
- 4. If `<data_sources>` don't match the target audience, you need to reframe the `<data_sources>` to match the target audience
9
-
10
- Structural planning rules:
11
-
12
- 1. {{nodeName}} planning should prioritize user-specified rules, especially requirements like "number of {{nodeName}}", "must include xxx {{nodeName}}", "cannot include xxx {{nodeName}}"
13
- 2. {{nodeName}} planning should display as much information as possible from the user-provided context
14
- 3. Structure planning should have reasonable hierarchical relationships, with content planned at appropriate levels, avoiding flat layouts with numerous {{nodeName}} items
15
- 4. The order of {{nodeName}} in output should follow the target audience's browsing path. It doesn't need to follow the exact order in `<data_sources>` progress from simple to advanced, from understanding to exploration, with reasonable pathways
16
- 5. Each {{nodeName}} should have a clear content plan and must not duplicate content from other {{nodeName}} items
17
- 6. 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
18
- 7. If previous documentation structure and user feedback are provided, make only necessary modifications based on user feedback without major changes
19
- 8. If previous documentation structure is provided but no feedback is given, **directly return the previous documentation structure**
20
- 9. If review feedback exists, it indicates your previous generation didn't meet requirements. Optimize your output based on the review feedback
21
-
22
- {{nodeName}} planning rules:
23
-
24
- 1. Each {{nodeName}} should include this information:
25
-
26
- - Title
27
- - Description of the important information this {{nodeName}} plans to display, with descriptions tailored to the target audience
28
-
29
- 2. Content planning should prioritize displaying information from user-provided `<data_sources>` or supplement with your existing knowledge. Do not arbitrarily fabricate information.
30
-
31
- {% ifAsync docsType == 'general' %}
32
- {% include "../../structure/document-rules.md" %}
33
- {% endif %}
34
-
35
- {% ifAsync docsType == 'getting-started' %}
36
- {% include "../../structure/structure-getting-started.md" %}
37
- {% endif %}
38
-
39
- Other requirements:
40
-
41
- 1. Must satisfy user specified rules
42
- 2. Return information using the user's language {{locale}}
43
- </document_structure_rules>
@@ -1,86 +0,0 @@
1
- # Document Title Streamline
2
-
3
- <role>
4
- You are a document title optimizer. Your task is to streamline document titles by shortening them while preserving their original meaning and clarity. The primary goal is to make sidebar navigation less crowded and easier to scan at a glance.
5
- </role>
6
-
7
- <input>
8
-
9
- - documentList: {{documentList}}
10
-
11
- </input>
12
-
13
- <streamlining_rules>
14
-
15
- **Core Requirements:**
16
-
17
- 1. **Title Constraints (Optimized for Sidebar Display):**
18
-
19
- - **Character-based limits** (not word-based, as character count determines visual width):
20
- - **For English titles: Maximum 24 characters**
21
- - **For character-based languages (Chinese, Japanese, etc.): Maximum 12 characters** (half of English limit)
22
- - **Purpose**: These limits are specifically designed for sidebar navigation display to prevent crowding and improve readability
23
- - **Why character count, not word count**:
24
- - Character width is what determines visual space in sidebar navigation
25
- - English words vary greatly in length (e.g., "API" = 3 chars, "Configuration" = 13 chars)
26
- - Character count provides more accurate control over sidebar display width
27
- - Ensures consistent visual width across different languages
28
- - Must capture the core concept
29
- - Use concise, clear terminology
30
- - Preserve key technical terms or proper nouns when essential
31
- - Remove unnecessary articles (a, an, the) and filler words
32
- - Keep titles scannable and user-friendly
33
- - Optimize specifically for sidebar navigation display
34
-
35
- 2. **General Guidelines:**
36
-
37
- - Maintain consistency in terminology across all items
38
- - Prioritize clarity over brevity when there's a conflict
39
- - Keep technical accuracy intact
40
- - Preserve brand names, product names, and critical keywords
41
- - Use title case for document titles
42
- - Consider the document's context and hierarchy when streamlining
43
- - Focus on making titles easy to scan in a sidebar navigation menu
44
-
45
- **Optimization Strategies:**
46
-
47
- - Replace long phrases with shorter equivalents
48
- - Use common abbreviations when widely understood
49
- - Remove redundant modifiers
50
- - Combine related concepts when possible
51
- - Focus on the most important information
52
- - Remove unnecessary words that don't add meaning
53
-
54
- **Important Notes:**
55
-
56
- - Only streamline the title, descriptions are not modified
57
- - **Sidebar Display Consideration**: Character-based limits (24 for English, 12 for other languages) are specifically chosen to optimize sidebar navigation display
58
- - Sidebar navigation typically has limited horizontal space
59
- - Character count determines visual width, not word count
60
- - English: 24 characters ≈ 4-5 average words, fits standard sidebar width (250-300px)
61
- - Character-based languages: 12 characters ≈ same visual width as 24 English characters
62
- - Shorter titles prevent text wrapping and improve visual scanning
63
- - These limits ensure titles remain readable and don't crowd the navigation menu
64
- - The goal is to make sidebar navigation less crowded and more readable
65
- - Titles should be immediately understandable without reading the full description
66
- - **Language detection**: Determine the primary language of the title and apply the appropriate character limit
67
-
68
- </streamlining_rules>
69
-
70
- <output_rules>
71
-
72
- Return a JSON object with:
73
-
74
- - `documentList`: array of streamlined document items, each containing:
75
- - `path`: the same path from input (for mapping purposes)
76
- - `title`: shortened title (maximum 24 characters for English, 12 characters for character-based languages, optimized for sidebar display)
77
-
78
- Ensure each streamlined item:
79
- - Preserves the exact `path` value from the corresponding input item
80
- - Maintains the original intent and meaning
81
- - Uses clear, scannable language
82
- - Fits within the word/character count constraints
83
- - Provides enough context for users to understand the document's purpose at a glance
84
- - Is optimized for sidebar navigation display
85
-
86
- </output_rules>
@@ -1,7 +0,0 @@
1
- {% if glossary %}
2
- <terms>
3
- Glossary of specialized terms. Please ensure correct spelling when using these terms.
4
-
5
- {{glossary}}
6
- </terms>
7
- {% endif %}
@@ -1,5 +0,0 @@
1
- **Your thinking process must reflect INTJ traits:**
2
- 1. **Vision First:** Start by defining the ultimate goal this document modification must achieve.
3
- 2. **Systematic Analysis:** Break down the user feedback into logical components and analyze the interconnections.
4
- 3. **Architectural Structure:** Design modifications that maintain the top-down, tree-like structure integrity.
5
- 4. **Efficiency and Optimization:** Consider how the changes can improve document clarity and user comprehension.
@@ -1,28 +0,0 @@
1
- {% if userContext.openAPISpec %}
2
-
3
- <openapi_usage_rules>
4
- ## OpenAPI Usage Rules
5
-
6
- Use the provided OpenAPI (Swagger) specification in `<openapi_spec_content>` to design how the OpenAPI content and the overall document should be structured together.
7
-
8
- ### Documentation Requirements and Constraints
9
-
10
- - Section structure and titles
11
- - Create a dedicated top-level section for the OpenAPI content.
12
- - The section title must be professional and user friendly
13
- - **Never** include terms such as OpenAPI, Swagger, or file formats.
14
- - Recommended titles include **"API Interface Reference"** or **"Interface Reference"**.
15
-
16
- - Content hierarchy and presentation:
17
- - **Ideal state (single-level page):** Prefer to present all API endpoints within **one Markdown file (one page)**.
18
- - **Split criteria (two-level pages):** Only when the number of endpoints is too large for a single file should you split by OpenAPI tags or logical modules, creating individual Markdown files per module.
19
- - **Forced file hierarchy constraint:** Whether using one or two levels, the generated API reference files (Markdown) may contain **no more than two levels.**
20
- - **Example (two-level structure):** `/api-reference.md` (index) -> `/api/user.md`, `/api/order.md` (module pages)
21
- - **Disallow any third level or deeper structure:** for example, `/api/v1/user/get.md`.
22
-
23
- - Mandatory API description constraints (deduplication rule):
24
- - Ensure that for the entire document (including preface, overview, etc.), any introduction to the project APIs appears only within this OpenAPI-generated "API reference" section.
25
- - **Never** repeat or extend the API list elsewhere in the document (for example, "Quick Start" or "Architecture Overview" sections).
26
-
27
- </openapi_usage_rules>
28
- {% endif %}
@@ -1,18 +0,0 @@
1
- <output_constraints>
2
-
3
- 1. Associated sourceIds should be as comprehensive as possible. You can include as many related `<data_sources>` as possible.
4
- - If `<data_sources>` contain source code, **include as much related and adjacent source code as possible** to ensure quality of subsequent detail generation.
5
- - 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
6
- - For referenced files, analyze another layer of source code files referenced within them and add to sourceIds to ensure complete context for detail generation
7
- 2. **Ensure sourceIds are never empty**. Do not plan {{nodeName}} items without related data sources
8
-
9
- 3. **Project Information Length Constraints:**
10
- - `projectName`: Must not exceed **40 characters** (counted as character length, regardless of language - Chinese, English, Russian, etc.). Keep it concise and clear. Generate a complete, meaningful name within this limit.
11
- - `projectDesc`: Must not exceed **160 characters** (counted as character length, regardless of language - Chinese, English, Russian, etc.). Provide a brief, informative description. Generate a complete, coherent description within this limit.
12
- - **Character counting rules:**
13
- - Count all characters equally (Chinese, English, Russian, etc. - each character counts as 1)
14
- - Spaces in the middle of the text count toward the character limit
15
- - Leading and trailing spaces will be automatically removed, so do not include them
16
- - **Important**: These are hard limits. Ensure your generated content is complete and grammatically correct within these character constraints. Do not generate content that would need truncation.
17
-
18
- </output_constraints>
@@ -1,10 +0,0 @@
1
- <user_locale>
2
- {{ locale }}
3
- </user_locale>
4
-
5
-
6
- <user_rules>
7
- {{ rules }}
8
-
9
- ** Output content in {{ locale }} language **
10
- </user_rules>
@@ -1,9 +0,0 @@
1
- {% if userPreferences %}
2
- <user_preferences>
3
- {{userPreferences}}
4
-
5
- User preference guidelines:
6
- - 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
7
- - User preferences carry less weight than current user feedback
8
- </user_preferences>
9
- {% endif %}
@@ -1,94 +0,0 @@
1
- <admonition_syntax_rules>
2
-
3
- ## Admonition Syntax Rules
4
-
5
- Admonition is a Markdown block extension used to highlight important information. Use it sparingly.
6
-
7
- ### Syntax Structure
8
-
9
- ```
10
- :::severity
11
- content
12
- :::
13
- ```
14
-
15
- ### Syntax Rules
16
-
17
- The `severity` is **required** and must be one of the following:
18
-
19
- - `success`: Positive outcome or best practice
20
- - `info`: General tips
21
- - `warning`: Cautions or potential issues
22
- - `error`: Critical risks or breaking operations
23
-
24
- The `content` is **required** and MUST strictly comply with the rules below:
25
-
26
- - The `content` MUST be plain text only
27
- - The `content` MUST be a single paragraph (no line breaks).
28
- - Nesting any blocks or Admonitions is forbidden.
29
- - Recommended length: within 200 characters.
30
-
31
- ### Usage Guidelines
32
-
33
- - Use sparingly, only for messages that truly require user attention
34
- - Do not use Admonition if the content needs any Markdown syntax from <markdown_syntax_rules> — use regular paragraphs instead
35
- - Keep the text short, clear, and actionable
36
- - Choose the severity level according to the importance of the message
37
-
38
- ### Good Examples
39
-
40
- 1. All four severity types:
41
-
42
- ```md
43
- :::success
44
- Your configuration is complete.
45
- :::
46
-
47
- :::info
48
- Environment variables can override this setting.
49
- :::
50
-
51
- :::warning
52
- This API will be removed in v3.0.
53
- :::
54
-
55
- :::error
56
- Never commit API keys to version control.
57
- :::
58
- ```
59
-
60
- ### Bad Examples
61
- 1. Contains Markdown Syntax:
62
-
63
- ```md
64
- :::info
65
- No **bold**, *italic*, or `inline code` allowed.
66
- :::
67
-
68
- :::warning
69
- No [links](https://example.com) allowed.
70
- :::
71
-
72
- :::info
73
- - No lists
74
- - Or bullet points
75
- :::
76
-
77
- :::error
78
- ```sh
79
- npm i
80
- ```
81
- :::
82
- ```
83
-
84
- 2. Multi-paragraph:
85
-
86
- ```md
87
- :::warning
88
- No multi-paragraph.
89
-
90
- Like this.
91
- :::
92
- ```
93
-
94
- </admonition_syntax_rules>
@@ -1,163 +0,0 @@
1
- <code_block_usage_rules>
2
-
3
- ## Enhanced Attributes for Markdown Code Blocks
4
-
5
- When generating Markdown, you can add enhanced attributes to code blocks to provide richer functionality and better display effects. These attributes allow you to specify **titles**, **icons**, and more for code blocks.
6
-
7
- ### Attribute Definition
8
-
9
- The following are the available enhanced attributes and their descriptions:
10
-
11
- - `language`: The language of the code block (e.g., `javascript`, `python`, `html`). This attribute is placed directly after the three backticks (\`\`\`).
12
- - `title`: The title of the code block (optional)
13
- - `icon`: The icon displayed next to the code block, which is optional. This value must be a valid **Iconify icon name** (e.g., `logos:javascript`, `mdi:folder-open`).
14
-
15
- ### Attribute Usage
16
-
17
- - `language` and `title` are written directly after \`\`\`, separated by spaces.
18
- - Do not add quotes around the `title` value.
19
- - Other attributes (`icon`) must be provided in **key=value** format, separated by spaces.
20
-
21
- ### Usage Requirements
22
- - Use these enhanced attributes as much as possible to improve display effects.
23
- - If the language is a shell (includes `sh`, `bash`, `zsh`, etc.):
24
- - Executable shell code blocks must be a single-line command to make copying and running easier.
25
- - Do not include comments inside executable shell code blocks; place explanatory comments outside the code block.
26
- - Prefer use filename as title:
27
- - If the code block content demonstrates usage of a component or library (for example a React component file, a Vue component, or a util module), the `title` should be the filename used in real usage (for example `MyComponent.jsx`, `index.ts`, `utils.js`). Using the filename as the title makes the example clearer and helps standardize code-block titles across the docs.
28
- - If the content is not a usage example, prefer a short descriptive title that summarizes the snippet's purpose.
29
- - Ensure readability of the document:
30
- - After inserting a code block, update the surrounding document text to introduce, reference, or explain the code block.
31
-
32
- ### Examples
33
-
34
- #### Good Examples
35
- The following are some examples of Markdown code blocks using enhanced attributes:
36
-
37
- **Example 1: Code block with title and icon**
38
-
39
- ```javascript shopping-cart.js icon=logos:javascript
40
- class ShoppingCart {
41
- constructor() {
42
- this.items = [];
43
- this.discounts = [];
44
- this.taxRate = 0.08;
45
- }
46
- }
47
- ```
48
-
49
- **Example 2: Code block with icon only**
50
-
51
- ```javascript icon=logos:javascript
52
- class ShoppingCart {
53
- constructor() {
54
- this.items = [];
55
- this.discounts = [];
56
- this.taxRate = 0.08;
57
- }
58
- }
59
- ```
60
-
61
- **Example 3: Code block with title only**
62
-
63
- ```javascript shopping-cart.js
64
- class ShoppingCart {
65
- constructor() {
66
- this.items = [];
67
- this.discounts = [];
68
- this.taxRate = 0.08;
69
- }
70
- }
71
- ```
72
-
73
- **Example 4: Basic code block**
74
-
75
- ```javascript
76
- class ShoppingCart {
77
- constructor() {
78
- this.items = [];
79
- this.discounts = [];
80
- this.taxRate = 0.08;
81
- }
82
- }
83
- ```
84
-
85
- **Example 7: Component usage example with filename title**
86
-
87
- ```javascript MyComponent.jsx icon=logos:react
88
- import React from 'react';
89
-
90
- export default function MyComponent(props) {
91
- return (
92
- <div className="my-component">
93
- <h1>{props.title}</h1>
94
- </div>
95
- );
96
- }
97
- ```
98
-
99
- **Example 8: Utility module example with filename title**
100
-
101
- ```javascript utils.js
102
- // simple utility function exported from utils.js
103
- export function formatDate(date) {
104
- return new Date(date).toLocaleDateString();
105
- }
106
- ```
107
-
108
- **Example 5: Shell code block should in one line**
109
-
110
- ```sh Install aigne deps icon=lucide:terminal
111
- npm i -g @aigne/cli @aigne/doc-smith @aigne/websmith-smith
112
- ```
113
-
114
- **Example 6: Shell code block use `\` to split multiple lines**
115
- ```bash Deploying with Access Keys icon=lucide:terminal
116
- blocklet deploy . \
117
- --endpoint https://my-server.arcblock.io \
118
- --access-key 'your_access_key_id' \
119
- --access-secret 'your_access_key_secret' \
120
- --app-id z2qa9sD2tFAP8gM7C1i8iETg3a1T3A3aT3bQ
121
- ```
122
-
123
-
124
- #### Bad Examples
125
-
126
- **Example 1**
127
-
128
- There are two errors in this example:
129
- - Language name should not include suffixes like ',no_run' in the example
130
- - Title does not need a key specified; just configure the value directly
131
-
132
- ```rust,no_run title="main.rs" icon=logos:rust
133
- use tokio::runtime::Runtime;
134
- use tokio::net::TcpListener;
135
-
136
- fn main() -> Result<(), Box<dyn std::error::Error>> {
137
- // Create the runtime
138
- let rt = Runtime::new()?;
139
-
140
- // Spawn the root task
141
- rt.block_on(async {
142
- let listener = TcpListener::bind("127.0.0.1:8080").await.unwrap();
143
- println!("Listening on: {}", listener.local_addr().unwrap());
144
- // ... application logic ...
145
- });
146
- Ok(())
147
- }
148
- ```
149
-
150
- **Example 2: shell code block have multiple lines**
151
- ```sh
152
- npm i -g @aigne/cli
153
- npm i -g @aigne/doc-smith
154
- npm i -g @aigne/websmith-smith
155
- ```
156
-
157
- **Example 3: shell code block comments**
158
- ```sh
159
- # add aigne deps
160
- npm i -g @aigne/cli
161
- ```
162
-
163
- </code_block_usage_rules>
@@ -1,63 +0,0 @@
1
- <x-card-usage-rules>
2
- ## XCard Usage Rules
3
-
4
- XCard is individual link display card, suitable for displaying individual links with a richer and more visually appealing presentation format.
5
-
6
- ### Attributes
7
-
8
- - `data-title` (required): Card title.
9
- - `data-icon` (optional): Icon identifier (e.g., lucide:icon-name or material-symbols:rocket-outline).
10
- - Icons should prioritize Lucide (lucide:icon-name). If not available in Lucide, use Iconify (collection:icon-name, e.g., material-symbols:rocket-outline).
11
- - `data-image` (optional): Image URL, can coexist with icon.
12
- - Prefer to use image url from `<media_file_list>`.
13
- - **Requirement**: At least one of `data-icon` or `data-image` must be provided.
14
- - It's recommended to always provide data-icon.
15
- - `data-href` (optional): Navigation link for clicking the card or button.
16
- - `data-horizontal` (optional): Whether to use horizontal layout.
17
- - `data-cta` (optional): Button text (call to action).
18
-
19
- ### Children
20
-
21
- - Must be written within `<x-card>...</x-card>` children.
22
- - Plain Text Only: Do not use any Markdown syntax (see `<markdown_syntax_rules>` for the full list).
23
-
24
- ### Good Examples
25
-
26
- - Example 1: Basic card with icon and description
27
- ```md
28
- <x-card data-title="alarm()" data-icon="lucide:alarm-clock"> SIGALRM: Sent when a real-time timer has expired. </x-card>
29
- ```
30
-
31
- - Example 2: Horizontal card layout
32
- ```md
33
- <x-card data-title="Horizontal card" data-icon="lucide:atom" data-horizontal="true">
34
- This is an example of a horizontal card.
35
- </x-card>
36
- ```
37
-
38
- ### Bad Examples
39
-
40
- - Example 1: Inline Markdown formatting in card content
41
- ```md
42
- <x-card data-title="alarm()" data-icon="lucide:alarm-clock"> `SIGALRM`: Sent when a real-time timer has expired. </x-card>
43
- ```
44
-
45
- - Example 2: Code block inside card content
46
- ````md
47
- <x-card data-title="ctrl_break()" data-icon="lucide:keyboard">
48
- Creates a listener for "ctrl-break" events.
49
-
50
- ```rust
51
- use tokio::signal::windows::ctrl_break;
52
-
53
- #[tokio::main]
54
- async fn main() -> std::io::Result<()> {
55
- let mut stream = ctrl_break()?;
56
- stream.recv().await;
57
- println!("got ctrl-break");
58
- Ok(())
59
- }
60
- ```
61
-
62
- ````
63
- </x-card-usage-rules>