2_documentation_patterns.xml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419
  1. <documentation_patterns>
  2. <overview>
  3. Standard patterns and templates for structuring extracted documentation
  4. to serve end-users with clear, practical information.
  5. </overview>
  6. <output_structure>
  7. <user_focused_template><![CDATA[
  8. # [Feature Name]
  9. [Brief, clear description of what the feature does and why it matters to users]
  10. ### Key Features
  11. - [Feature 1 - written in user-friendly terms]
  12. - [Feature 2 - focus on benefits]
  13. - [Feature 3 - avoid technical jargon]
  14. ---
  15. ## Why This Matters
  16. [Explain the problem this solves with a real-world example, like:]
  17. **[Before scenario]**: [Description of the old/manual way]
  18. - [Pain point 1]
  19. - [Pain point 2]
  20. **[With this feature]**: [Description of the improved experience]
  21. ## How it Works
  22. [Simple explanation of the feature's operation, avoiding implementation details]
  23. [Include visual representation if helpful - suggest where diagrams would help]
  24. ---
  25. ## Configuration
  26. [User-friendly explanation of settings]
  27. 1. **[Setting Name]**:
  28. - **Setting**: `[Technical name if needed]`
  29. - **Description**: [What this does in plain language]
  30. - **Default**: [Default value and what it means]
  31. 2. **[Setting Name]**:
  32. - **Setting**: `[Technical name if needed]`
  33. - **Description**: [What this does in plain language]
  34. - **Default**: [Default value and what it means]
  35. ---
  36. ## Benefits
  37. - **[Benefit 1]**: [Explanation of how this helps]
  38. - **[Benefit 2]**: [Explanation of how this helps]
  39. - **[Benefit 3]**: [Explanation of how this helps]
  40. ## Common Questions
  41. **"[Common user question]"**
  42. - [Clear, helpful answer]
  43. - [Additional tips if relevant]
  44. **"[Common user question]"**
  45. - [Clear, helpful answer]
  46. - [Additional tips if relevant]
  47. **"[Common user question]"**
  48. - [Clear, helpful answer]
  49. - [Additional tips if relevant]
  50. ## Need Help?
  51. If you run into issues:
  52. 1. [First troubleshooting step]
  53. 2. [Second troubleshooting step]
  54. 3. [Where to get help - e.g., GitHub Issues link]
  55. ]]></user_focused_template>
  56. <comprehensive_template><![CDATA[
  57. # [Feature Name] Documentation
  58. ## Table of Contents
  59. 1. [Overview](#overview)
  60. 2. [Quick Start](#quick-start)
  61. 3. [Architecture](#architecture)
  62. 4. [API Reference](#api-reference)
  63. 5. [Configuration](#configuration)
  64. 6. [User Guide](#user-guide)
  65. 7. [Developer Guide](#developer-guide)
  66. 8. [Administrator Guide](#administrator-guide)
  67. 9. [Security](#security)
  68. 10. [Performance](#performance)
  69. 11. [Troubleshooting](#troubleshooting)
  70. 12. [FAQ](#faq)
  71. 13. [Changelog](#changelog)
  72. 14. [References](#references)
  73. [Rest of comprehensive template remains available for technical documentation needs]
  74. ]]></comprehensive_template>
  75. </output_structure>
  76. <user_friendly_patterns>
  77. <before_after_examples>
  78. <template><![CDATA[
  79. **Previously**: When Roo needed to understand your project, you'd see multiple requests like:
  80. - "Can I read `src/app.js`?" → You approve
  81. - "Now can I read `src/utils.js`?" → You approve
  82. - "And can I read `src/config.json`?" → You approve
  83. **Now**: Roo asks once to read all related files together, getting the full picture immediately.
  84. ]]></template>
  85. </before_after_examples>
  86. <visual_separators>
  87. <use_case>Between major sections</use_case>
  88. <format>---</format>
  89. <purpose>Improve readability and scanning</purpose>
  90. </visual_separators>
  91. <conversational_questions>
  92. <template><![CDATA[
  93. ## Common Questions
  94. **"Why would I want to disable this feature?"**
  95. - You're using a less capable AI model that works better with single files
  96. - You want more control over which files are accessed
  97. - You're working with very large files that might exceed memory limits
  98. **"What happens if some files are blocked?"**
  99. - Roo will read the files you approve and work with those
  100. - Files blocked by `.rooignore` will be automatically excluded
  101. - You can still approve/deny individual files in the batch
  102. ]]></template>
  103. </conversational_questions>
  104. <practical_examples>
  105. <guideline>Show real tool output or interface elements</guideline>
  106. <guideline>Use actual file paths and settings names</guideline>
  107. <guideline>Include common error messages and solutions</guideline>
  108. </practical_examples>
  109. <benefit_focused_lists>
  110. <template><![CDATA[
  111. ## Benefits
  112. - **Faster Results**: Get answers in one step instead of multiple back-and-forth approvals
  113. - **Better Context**: Roo understands relationships between files immediately
  114. - **Less Interruption**: Approve once and let Roo work uninterrupted
  115. ]]></template>
  116. </benefit_focused_lists>
  117. <troubleshooting_section>
  118. <template><![CDATA[
  119. ## Troubleshooting
  120. **"Roo is asking for too many files at once"**
  121. - Lower the concurrent file limit in settings
  122. - You can still approve or deny individual files in the batch dialog
  123. **"The feature isn't working as expected"**
  124. - Check that "Enable concurrent file reads" is turned on in settings
  125. - Verify your concurrent file limit is set appropriately (default: 100)
  126. - Some AI models may not support this feature effectively
  127. ]]></template>
  128. </troubleshooting_section>
  129. <help_section>
  130. <template><![CDATA[
  131. ## Need Help?
  132. If you run into issues:
  133. 1. Check the [FAQ section](/faq) for common solutions
  134. 2. Report problems on [GitHub Issues](https://github.com/RooCodeInc/Roo-Code/issues)
  135. 3. Include what you were trying to do and any error messages
  136. ]]></template>
  137. </help_section>
  138. </user_friendly_patterns>
  139. <audience_specific_sections>
  140. <audience type="end_users">
  141. <focus_areas>
  142. <area>Step-by-step tutorials with screenshots</area>
  143. <area>Common use case examples</area>
  144. <area>Troubleshooting guides for user errors</area>
  145. <area>Feature benefits and value propositions</area>
  146. </focus_areas>
  147. <writing_style>
  148. <guideline>Use simple, non-technical language</guideline>
  149. <guideline>Include visual aids and examples</guideline>
  150. <guideline>Focus on outcomes rather than implementation</guideline>
  151. <guideline>Provide clear action steps</guideline>
  152. </writing_style>
  153. </audience>
  154. <audience type="developers">
  155. <focus_areas>
  156. <area>Code examples and snippets</area>
  157. <area>API specifications and contracts</area>
  158. <area>Integration patterns and best practices</area>
  159. <area>Performance optimization techniques</area>
  160. </focus_areas>
  161. <writing_style>
  162. <guideline>Use precise technical terminology</guideline>
  163. <guideline>Include code samples in multiple languages</guideline>
  164. <guideline>Document edge cases and limitations</guideline>
  165. <guideline>Provide debugging and testing guidance</guideline>
  166. </writing_style>
  167. </audience>
  168. <audience type="administrators">
  169. <focus_areas>
  170. <area>Deployment and configuration procedures</area>
  171. <area>Monitoring and maintenance tasks</area>
  172. <area>Security hardening guidelines</area>
  173. <area>Backup and disaster recovery</area>
  174. </focus_areas>
  175. <writing_style>
  176. <guideline>Focus on operational aspects</guideline>
  177. <guideline>Include command-line examples</guideline>
  178. <guideline>Document automation opportunities</guideline>
  179. <guideline>Emphasize security and compliance</guideline>
  180. </writing_style>
  181. </audience>
  182. <audience type="stakeholders">
  183. <focus_areas>
  184. <area>Business value and ROI</area>
  185. <area>Feature capabilities and limitations</area>
  186. <area>Competitive advantages</area>
  187. <area>Risk assessment and mitigation</area>
  188. </focus_areas>
  189. <writing_style>
  190. <guideline>Use business-oriented language</guideline>
  191. <guideline>Include metrics and KPIs</guideline>
  192. <guideline>Focus on strategic benefits</guideline>
  193. <guideline>Provide executive summaries</guideline>
  194. </writing_style>
  195. </audience>
  196. </audience_specific_sections>
  197. <metadata_patterns>
  198. <version_info>
  199. <template><![CDATA[
  200. ### Version Compatibility Matrix
  201. | Component | Min Version | Recommended | Max Version | Notes |
  202. |-----------|-------------|-------------|-------------|-------|
  203. | [Component] | [version] | [version] | [version] | [notes] |
  204. ]]></template>
  205. </version_info>
  206. <deprecation_notice>
  207. <template><![CDATA[
  208. > ⚠️ **Deprecation Notice**
  209. >
  210. > This feature/method is deprecated as of version [X.Y.Z].
  211. > - **Deprecated**: [date]
  212. > - **Removal Target**: [version/date]
  213. > - **Migration Path**: [See migration guide](#migration)
  214. > - **Replacement**: [new feature/method]
  215. ]]></template>
  216. </deprecation_notice>
  217. <security_warning>
  218. <template><![CDATA[
  219. > 🔒 **Security Consideration**
  220. >
  221. > [Description of security concern]
  222. > - **Risk Level**: [High/Medium/Low]
  223. > - **Affected Versions**: [versions]
  224. > - **Mitigation**: [steps to address]
  225. > - **References**: [CVE/advisory links]
  226. ]]></template>
  227. </security_warning>
  228. <performance_note>
  229. <template><![CDATA[
  230. > ⚡ **Performance Impact**
  231. >
  232. > [Description of performance consideration]
  233. > - **Impact**: [metrics/benchmarks]
  234. > - **Optimization**: [recommended approach]
  235. > - **Trade-offs**: [considerations]
  236. ]]></template>
  237. </performance_note>
  238. </metadata_patterns>
  239. <code_documentation_patterns>
  240. <api_endpoint>
  241. <template><![CDATA[
  242. ### `[METHOD] /api/[path]`
  243. **Description**: [What this endpoint does]
  244. **Authentication**: [Required/Optional] - [Type]
  245. **Parameters**:
  246. | Name | Type | Required | Description | Example |
  247. |------|------|----------|-------------|---------|
  248. | [param] | [type] | [Yes/No] | [description] | [example] |
  249. **Request Body**:
  250. ```json
  251. {
  252. "field": "value"
  253. }
  254. ```
  255. **Response**:
  256. - **Success (200)**:
  257. ```json
  258. {
  259. "status": "success",
  260. "data": {}
  261. }
  262. ```
  263. - **Error (4xx/5xx)**:
  264. ```json
  265. {
  266. "error": "error_code",
  267. "message": "Human readable message"
  268. }
  269. ```
  270. **Example**:
  271. ```bash
  272. curl -X [METHOD] https://api.example.com/[path] \
  273. -H "Authorization: Bearer [token]" \
  274. -H "Content-Type: application/json" \
  275. -d '{"field": "value"}'
  276. ```
  277. ]]></template>
  278. </api_endpoint>
  279. <function_documentation>
  280. <template><![CDATA[
  281. ### `functionName(parameters)`
  282. **Purpose**: [What this function does]
  283. **Parameters**:
  284. - `param1` (Type): [Description]
  285. - `param2` (Type, optional): [Description] - Default: [value]
  286. **Returns**: `Type` - [Description of return value]
  287. **Throws**:
  288. - `ErrorType`: [When this error occurs]
  289. **Example**:
  290. ```typescript
  291. const result = functionName(value1, value2);
  292. // Expected output: [description]
  293. ```
  294. **Notes**:
  295. - [Important consideration 1]
  296. - [Important consideration 2]
  297. ]]></template>
  298. </function_documentation>
  299. <configuration_option>
  300. <template><![CDATA[
  301. ### `CONFIG_NAME`
  302. **Type**: `string | number | boolean`
  303. **Default**: `default_value`
  304. **Environment Variable**: `APP_CONFIG_NAME`
  305. **Description**: [What this configuration controls]
  306. **Valid Values**:
  307. - `value1`: [Description]
  308. - `value2`: [Description]
  309. **Example**:
  310. ```yaml
  311. config:
  312. name: value
  313. ```
  314. **Impact**: [What changes when this is modified]
  315. ]]></template>
  316. </configuration_option>
  317. </code_documentation_patterns>
  318. <cross_reference_patterns>
  319. <internal_link>
  320. <format>[Link Text](#section-anchor)</format>
  321. <example>[See Configuration Guide](#configuration)</example>
  322. </internal_link>
  323. <external_link>
  324. <format>[Link Text](https://external.url)</format>
  325. <example>[Official Documentation](https://docs.example.com)</example>
  326. </external_link>
  327. <related_feature>
  328. <template><![CDATA[
  329. > 📌 **Related Features**
  330. > - [Feature A](../feature-a/README.md): [How it relates]
  331. > - [Feature B](../feature-b/README.md): [How it relates]
  332. ]]></template>
  333. </related_feature>
  334. <see_also>
  335. <template><![CDATA[
  336. > 👉 **See Also**
  337. > - [Related Topic 1](#anchor1)
  338. > - [Related Topic 2](#anchor2)
  339. > - [External Resource](https://example.com)
  340. ]]></template>
  341. </see_also>
  342. </cross_reference_patterns>
  343. </documentation_patterns>