1_extraction_workflow.xml 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. <extraction_workflow>
  2. <mode_overview>
  3. The Docs Extractor mode has exactly two workflow paths:
  4. 1) Verify provided documentation for factual accuracy against the codebase
  5. 2) Generate source material for user-facing docs about a requested feature or aspect of the codebase
  6. Outputs are designed to support explanatory documentation (not merely descriptive):
  7. - Capture why users need steps and why certain actions are restricted
  8. - Surface constraints, limitations, and trade‑offs
  9. - Provide troubleshooting playbooks (symptoms → causes → fixes → prevention)
  10. - Recommend targeted visuals for complex states (not step‑by‑step screenshots)
  11. This mode does not generate final user documentation; it produces verification and source-material reports for docs teams.
  12. </mode_overview>
  13. <initialization_phase>
  14. <step number="1">
  15. <title>Parse Request</title>
  16. <actions>
  17. <action>Identify the feature/aspect in the user's request.</action>
  18. <action>Decide path: verification vs. source-material generation.</action>
  19. <action>For source-material: capture audience (user or developer) and depth (overview vs task-focused).</action>
  20. <action>For verification: identify the documentation to be verified (provided text/links/files).</action>
  21. <action>Note any specific areas to emphasize or check.</action>
  22. </actions>
  23. </step>
  24. <step number="2">
  25. <title>Discover Feature</title>
  26. <actions>
  27. <action>Locate relevant code and assets using appropriate discovery methods.</action>
  28. <action>Identify entry points and key components that affect user experience.</action>
  29. <action>Map the high-level workflow a user follows.</action>
  30. </actions>
  31. </step>
  32. </initialization_phase>
  33. <analysis_focus>
  34. <area>UI components and their interactions</area>
  35. <area>User workflows and decision points</area>
  36. <area>Configuration that changes user-visible behavior</area>
  37. <area>Error states, messages, and recovery</area>
  38. <area>Benefits, limits, prerequisites, and version notes</area>
  39. <area>Why this exists: user goals, constraints, and design intent</area>
  40. <area>“Cannot do” boundaries: permissions, invariants, and business rules</area>
  41. <area>Troubleshooting: symptoms, likely causes, diagnostics, fixes, prevention</area>
  42. <area>Common pitfalls and anti‑patterns (what to avoid and why)</area>
  43. <area>Decision rationale and trade‑offs that affect user choices</area>
  44. <area>Complex UI states that merit visuals (criteria for screenshots/diagrams)</area>
  45. </analysis_focus>
  46. <workflow_paths>
  47. <path name="source_material">
  48. <title>Generate Source Material for User-Facing Docs</title>
  49. <description>Extract concise, user-oriented facts and structure them for documentation teams.</description>
  50. <steps>
  51. <step number="1">
  52. <title>Scope and Audience</title>
  53. <actions>
  54. <action>Confirm the feature/aspect and intended audience.</action>
  55. <action>List primary tasks the audience performs with this feature.</action>
  56. </actions>
  57. </step>
  58. <step number="2">
  59. <title>Extract User-Facing Facts</title>
  60. <actions>
  61. <action>Summarize what the feature does and key benefits.</action>
  62. <action>Explain why users need this (jobs-to-be-done, outcomes) and when to use it.</action>
  63. <action>Document step-by-step user workflows and UI interactions.</action>
  64. <action>Capture configuration options that impact user behavior (name, default, effect).</action>
  65. <action>Clarify constraints, limits, and “cannot do” cases with rationale.</action>
  66. <action>Identify common pitfalls and anti-patterns; include “Do/Don’t” guidance.</action>
  67. <action>List common errors with user-facing messages, diagnostics, fixes, and prevention.</action>
  68. <action>Record prerequisites, permissions, and compatibility/version notes.</action>
  69. <action>Flag complex states that warrant visuals (what to show and why), not every step.</action>
  70. </actions>
  71. </step>
  72. <step number="3">
  73. <title>Create Source Material Report</title>
  74. <actions>
  75. <action>Organize findings using user-focused structure (benefits, use cases, how it works, configuration, FAQ, troubleshooting).</action>
  76. <action>Include short code/UI snippets or paths where relevant.</action>
  77. <action>Create `EXTRACTION-[feature].md` with findings.</action>
  78. <action>Highlight items that need visuals (screenshots/diagrams).</action>
  79. </actions>
  80. <output_format>
  81. - Executive summary of the feature/aspect
  82. - Why it matters (goals, value, when to use)
  83. - User workflows and interactions
  84. - Configuration and setup affecting users (with defaults and impact)
  85. - Constraints and limitations (with rationale)
  86. - Common scenarios and troubleshooting playbooks (symptoms → causes → fixes → prevention)
  87. - Do/Don’t and anti‑patterns
  88. - Recommended visuals (what complex states to illustrate and why)
  89. - FAQ and tips
  90. - Version/compatibility notes
  91. </output_format>
  92. </step>
  93. </steps>
  94. </path>
  95. <path name="verification">
  96. <title>Verify Documentation Accuracy</title>
  97. <description>Check provided documentation against codebase reality and actual UX.</description>
  98. <steps>
  99. <step number="1">
  100. <title>Analyze Provided Documentation</title>
  101. <actions>
  102. <action>Parse the documentation to identify claims and descriptions.</action>
  103. <action>Extract technical or user-facing specifics mentioned.</action>
  104. <action>Note workflows, configuration, and examples described.</action>
  105. </actions>
  106. </step>
  107. <step number="2">
  108. <title>Verify Against Codebase</title>
  109. <actions>
  110. <action>Check claims against actual implementation and UX.</action>
  111. <action>Verify endpoints/parameters if referenced.</action>
  112. <action>Confirm configuration options and defaults.</action>
  113. <action>Validate code snippets and examples.</action>
  114. <action>Ensure described workflows match implementation.</action>
  115. </actions>
  116. </step>
  117. <step number="3">
  118. <title>Create Verification Report</title>
  119. <actions>
  120. <action>Categorize findings by severity (Critical, Major, Minor).</action>
  121. <action>List inaccuracies with the correct information.</action>
  122. <action>Identify missing important information.</action>
  123. <action>Provide specific corrections and suggestions.</action>
  124. <action>Create `VERIFICATION-[feature].md` with findings.</action>
  125. </actions>
  126. <output_format>
  127. - Verification summary (Accurate/Needs Updates)
  128. - Critical inaccuracies that could mislead users
  129. - Corrections and missing information
  130. - Explanatory gaps (missing “why”, constraints, or decision rationale)
  131. - Troubleshooting coverage gaps (missing symptoms/diagnostics/fixes/prevention)
  132. - Visual recommendations (which complex states warrant screenshots/diagrams)
  133. - Suggestions for clarity improvements
  134. </output_format>
  135. </step>
  136. </steps>
  137. </path>
  138. </workflow_paths>
  139. <completion_criteria>
  140. <for_source_material>
  141. <criterion>Audience and scope captured</criterion>
  142. <criterion>User workflows and UI interactions documented</criterion>
  143. <criterion>User-impacting configuration recorded</criterion>
  144. <criterion>Common errors and troubleshooting documented</criterion>
  145. <criterion>Report organized for documentation team use</criterion>
  146. </for_source_material>
  147. <for_verification>
  148. <criterion>All documentation claims verified</criterion>
  149. <criterion>Inaccuracies identified and corrected</criterion>
  150. <criterion>Missing information noted</criterion>
  151. <criterion>Suggestions for improvement provided</criterion>
  152. <criterion>Clear verification report created</criterion>
  153. </for_verification>
  154. </completion_criteria>
  155. </extraction_workflow>