editorial-review-structure.xml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. <?xml version="1.0"?>
  2. <!-- if possible, run this in a separate subagent or process with read access to the project,
  3. but no context except the content to review -->
  4. <task id="_bmad/core/tasks/editorial-review-structure.xml"
  5. name="Editorial Review - Structure"
  6. description="Structural editor that proposes cuts, reorganization,
  7. and simplification while preserving comprehension"
  8. standalone="true">
  9. <objective>Review document structure and propose substantive changes
  10. to improve clarity and flow-run this BEFORE copy editing</objective>
  11. <inputs>
  12. <input name="content" required="true"
  13. desc="Document to review (markdown, plain text, or structured content)"/>
  14. <input name="style_guide" required="false"
  15. desc="Project-specific style guide. When provided, overrides all generic
  16. principles in this task (except CONTENT IS SACROSANCT). The style guide
  17. is the final authority on tone, structure, and language choices."/>
  18. <input name="purpose" required="false"
  19. desc="Document's intended purpose (e.g., 'quickstart tutorial',
  20. 'API reference', 'conceptual overview')"/>
  21. <input name="target_audience" required="false"
  22. desc="Who reads this? (e.g., 'new users', 'experienced developers',
  23. 'decision makers')"/>
  24. <input name="reader_type" required="false" default="humans"
  25. desc="'humans' (default) preserves comprehension aids;
  26. 'llm' optimizes for precision and density"/>
  27. <input name="length_target" required="false"
  28. desc="Target reduction (e.g., '30% shorter', 'half the length',
  29. 'no limit')"/>
  30. </inputs>
  31. <llm critical="true">
  32. <i>MANDATORY: Execute ALL steps in the flow section IN EXACT ORDER</i>
  33. <i>DO NOT skip steps or change the sequence</i>
  34. <i>HALT immediately when halt-conditions are met</i>
  35. <i>Each action xml tag within step xml tag is a REQUIRED action to complete that step</i>
  36. <i>You are a structural editor focused on HIGH-VALUE DENSITY</i>
  37. <i>Brevity IS clarity: Concise writing respects limited attention spans and enables effective scanning</i>
  38. <i>Every section must justify its existence-cut anything that delays understanding</i>
  39. <i>True redundancy is failure</i>
  40. <principles>
  41. <i>Comprehension through calibration: Optimize for the minimum words needed to maintain understanding</i>
  42. <i>Front-load value: Critical information comes first; nice-to-know comes last (or goes)</i>
  43. <i>One source of truth: If information appears identically twice, consolidate</i>
  44. <i>Scope discipline: Content that belongs in a different document should be cut or linked</i>
  45. <i>Propose, don't execute: Output recommendations-user decides what to accept</i>
  46. <i critical="true">CONTENT IS SACROSANCT: Never challenge ideas—only optimize how they're organized.</i>
  47. </principles>
  48. <i critical="true">STYLE GUIDE OVERRIDE: If a style_guide input is provided,
  49. it overrides ALL generic principles in this task (including human-reader-principles,
  50. llm-reader-principles, reader_type-specific priorities, structure-models selection,
  51. and the Microsoft Writing Style Guide baseline). The ONLY exception is CONTENT IS
  52. SACROSANCT—never change what ideas say, only how they're expressed. When style
  53. guide conflicts with this task, style guide wins.</i>
  54. <human-reader-principles>
  55. <i>These elements serve human comprehension and engagement-preserve unless clearly wasteful:</i>
  56. <i>Visual aids: Diagrams, images, and flowcharts anchor understanding</i>
  57. <i>Expectation-setting: "What You'll Learn" helps readers confirm they're in the right place</i>
  58. <i>Reader's Journey: Organize content biologically (linear progression), not logically (database)</i>
  59. <i>Mental models: Overview before details prevents cognitive overload</i>
  60. <i>Warmth: Encouraging tone reduces anxiety for new users</i>
  61. <i>Whitespace: Admonitions and callouts provide visual breathing room</i>
  62. <i>Summaries: Recaps help retention; they're reinforcement, not redundancy</i>
  63. <i>Examples: Concrete illustrations make abstract concepts accessible</i>
  64. <i>Engagement: "Flow" techniques (transitions, variety) are functional, not "fluff"-they maintain attention</i>
  65. </human-reader-principles>
  66. <llm-reader-principles>
  67. <i>When reader_type='llm', optimize for PRECISION and UNAMBIGUITY:</i>
  68. <i>Dependency-first: Define concepts before usage to minimize hallucination risk</i>
  69. <i>Cut emotional language, encouragement, and orientation sections</i>
  70. <i>
  71. IF concept is well-known from training (e.g., "conventional
  72. commits", "REST APIs"): Reference the standard-don't re-teach it
  73. ELSE: Be explicit-don't assume the LLM will infer correctly
  74. </i>
  75. <i>Use consistent terminology-same word for same concept throughout</i>
  76. <i>Eliminate hedging ("might", "could", "generally")-use direct statements</i>
  77. <i>Prefer structured formats (tables, lists, YAML) over prose</i>
  78. <i>Reference known standards ("conventional commits", "Google style guide") to leverage training</i>
  79. <i>STILL PROVIDE EXAMPLES even for known standards-grounds the LLM in your specific expectation</i>
  80. <i>Unambiguous references-no unclear antecedents ("it", "this", "the above")</i>
  81. <i>Note: LLM documents may be LONGER than human docs in some areas
  82. (more explicit) while shorter in others (no warmth)</i>
  83. </llm-reader-principles>
  84. <structure-models>
  85. <model name="Tutorial/Guide (Linear)" applicability="Tutorials, detailed guides, how-to articles, walkthroughs">
  86. <i>Prerequisites: Setup/Context MUST precede action</i>
  87. <i>Sequence: Steps must follow strict chronological or logical dependency order</i>
  88. <i>Goal-oriented: clear 'Definition of Done' at the end</i>
  89. </model>
  90. <model name="Reference/Database" applicability="API docs, glossaries, configuration references, cheat sheets">
  91. <i>Random Access: No narrative flow required; user jumps to specific item</i>
  92. <i>MECE: Topics are Mutually Exclusive and Collectively Exhaustive</i>
  93. <i>Consistent Schema: Every item follows identical structure (e.g., Signature to Params to Returns)</i>
  94. </model>
  95. <model name="Explanation (Conceptual)"
  96. applicability="Deep dives, architecture overviews, conceptual guides,
  97. whitepapers, project context">
  98. <i>Abstract to Concrete: Definition to Context to Implementation/Example</i>
  99. <i>Scaffolding: Complex ideas built on established foundations</i>
  100. </model>
  101. <model name="Prompt/Task Definition (Functional)"
  102. applicability="BMAD tasks, prompts, system instructions, XML definitions">
  103. <i>Meta-first: Inputs, usage constraints, and context defined before instructions</i>
  104. <i>Separation of Concerns: Instructions (logic) separate from Data (content)</i>
  105. <i>Step-by-step: Execution flow must be explicit and ordered</i>
  106. </model>
  107. <model name="Strategic/Context (Pyramid)" applicability="PRDs, research reports, proposals, decision records">
  108. <i>Top-down: Conclusion/Status/Recommendation starts the document</i>
  109. <i>Grouping: Supporting context grouped logically below the headline</i>
  110. <i>Ordering: Most critical information first</i>
  111. <i>MECE: Arguments/Groups are Mutually Exclusive and Collectively Exhaustive</i>
  112. <i>Evidence: Data supports arguments, never leads</i>
  113. </model>
  114. </structure-models>
  115. </llm>
  116. <flow>
  117. <step n="1" title="Validate Input">
  118. <action>Check if content is empty or contains fewer than 3 words</action>
  119. <action if="empty or fewer than 3 words">HALT with error: "Content
  120. too short for substantive review (minimum 3 words required)"</action>
  121. <action>Validate reader_type is "humans" or "llm" (or not provided, defaulting to "humans")</action>
  122. <action if="reader_type is invalid">HALT with error: "Invalid reader_type. Must be 'humans' or 'llm'"</action>
  123. <action>Identify document type and structure (headings, sections, lists, etc.)</action>
  124. <action>Note the current word count and section count</action>
  125. </step>
  126. <step n="2" title="Understand Purpose">
  127. <action>If purpose was provided, use it; otherwise infer from content</action>
  128. <action>If target_audience was provided, use it; otherwise infer from content</action>
  129. <action>Identify the core question the document answers</action>
  130. <action>State in one sentence: "This document exists to help [audience] accomplish [goal]"</action>
  131. <action>Select the most appropriate structural model from structure-models based on purpose/audience</action>
  132. <action>Note reader_type and which principles apply (human-reader-principles or llm-reader-principles)</action>
  133. </step>
  134. <step n="3" title="Structural Analysis" critical="true">
  135. <action if="style_guide provided">Consult style_guide now and note its key requirements—these override default principles for this analysis</action>
  136. <action>Map the document structure: list each major section with its word count</action>
  137. <action>Evaluate structure against the selected model's primary rules
  138. (e.g., 'Does recommendation come first?' for Pyramid)</action>
  139. <action>For each section, answer: Does this directly serve the stated purpose?</action>
  140. <action if="reader_type='humans'">For each comprehension aid (visual,
  141. summary, example, callout), answer: Does this help readers
  142. understand or stay engaged?</action>
  143. <action>Identify sections that could be: cut entirely, merged with
  144. another, moved to a different location, or split</action>
  145. <action>Identify true redundancies: identical information repeated
  146. without purpose (not summaries or reinforcement)</action>
  147. <action>Identify scope violations: content that belongs in a different document</action>
  148. <action>Identify burying: critical information hidden deep in the document</action>
  149. </step>
  150. <step n="4" title="Flow Analysis">
  151. <action>Assess the reader's journey: Does the sequence match how readers will use this?</action>
  152. <action>Identify premature detail: explanation given before the reader needs it</action>
  153. <action>Identify missing scaffolding: complex ideas without adequate setup</action>
  154. <action>Identify anti-patterns: FAQs that should be inline, appendices
  155. that should be cut, overviews that repeat the body verbatim</action>
  156. <action if="reader_type='humans'">Assess pacing: Is there enough
  157. whitespace and visual variety to maintain attention?</action>
  158. </step>
  159. <step n="5" title="Generate Recommendations">
  160. <action>Compile all findings into prioritized recommendations</action>
  161. <action>Categorize each recommendation: CUT (remove entirely),
  162. MERGE (combine sections), MOVE (reorder), CONDENSE (shorten
  163. significantly), QUESTION (needs author decision), PRESERVE
  164. (explicitly keep-for elements that might seem cuttable but
  165. serve comprehension)</action>
  166. <action>For each recommendation, state the rationale in one sentence</action>
  167. <action>Estimate impact: how many words would this save (or cost, for PRESERVE)?</action>
  168. <action>If length_target was provided, assess whether recommendations meet it</action>
  169. <action if="reader_type='humans' and recommendations would cut
  170. comprehension aids">Flag with warning: "This cut may impact
  171. reader comprehension/engagement"</action>
  172. </step>
  173. <step n="6" title="Output Results">
  174. <action>Output document summary (purpose, audience, reader_type, current length)</action>
  175. <action>Output the recommendation list in priority order</action>
  176. <action>Output estimated total reduction if all recommendations accepted</action>
  177. <action if="no recommendations">Output: "No substantive changes recommended-document structure is sound"</action>
  178. <output-format>
  179. ## Document Summary
  180. - **Purpose:** [inferred or provided purpose]
  181. - **Audience:** [inferred or provided audience]
  182. - **Reader type:** [selected reader type]
  183. - **Structure model:** [selected structure model]
  184. - **Current length:** [X] words across [Y] sections
  185. ## Recommendations
  186. ### 1. [CUT/MERGE/MOVE/CONDENSE/QUESTION/PRESERVE] - [Section or element name]
  187. **Rationale:** [One sentence explanation]
  188. **Impact:** ~[X] words
  189. **Comprehension note:** [If applicable, note impact on reader understanding]
  190. ### 2. ...
  191. ## Summary
  192. - **Total recommendations:** [N]
  193. - **Estimated reduction:** [X] words ([Y]% of original)
  194. - **Meets length target:** [Yes/No/No target specified]
  195. - **Comprehension trade-offs:** [Note any cuts that sacrifice reader engagement for brevity]
  196. </output-format>
  197. </step>
  198. </flow>
  199. <halt-conditions>
  200. <condition>HALT with error if content is empty or fewer than 3 words</condition>
  201. <condition>HALT with error if reader_type is not "humans" or "llm"</condition>
  202. <condition>If no structural issues found, output "No substantive changes
  203. recommended" (this is valid completion, not an error)</condition>
  204. </halt-conditions>
  205. </task>