1+ <discord_only_workflow_instructions >
2+ <overview >
3+ Specialized workflow for generating Discord-formatted release notes from existing release files.
4+ This allows users to quickly get Discord-ready announcements without creating release notes from scratch.
5+ </overview >
6+
7+ <entry_patterns >
8+ <description >
9+ User messages that trigger the Discord-only workflow
10+ </description >
11+ <patterns >
12+ <pattern >Discord release notes for X.Y.Z</pattern >
13+ <pattern >Generate Discord format for vX.Y.Z</pattern >
14+ <pattern >Discord announcement for X.Y.Z, A.B.C, D.E.F</pattern >
15+ <pattern >Discord notes for v3.23.14</pattern >
16+ <pattern >Discord release notes for 3.23.14, 3.23.15</pattern >
17+ </patterns >
18+ </entry_patterns >
19+
20+ <workflow_steps >
21+ <step number =" 1" >
22+ <title >Parse Version Numbers</title >
23+ <action >Extract version numbers from user request</action >
24+ <details >
25+ Support multiple formats:
26+ - Single version: "3.23.14" or "v3.23.14"
27+ - Multiple versions: "3.23.14, 3.23.15, 3.23.16"
28+ - Mixed formats: "v3.23.14, 3.23.15, v3.23.16"
29+ </details >
30+ <parsing_rules >
31+ <rule >Strip 'v' prefix if present</rule >
32+ <rule >Split by commas for multiple versions</rule >
33+ <rule >Trim whitespace</rule >
34+ <rule >Validate version format (X.Y.Z)</rule >
35+ </parsing_rules >
36+ </step >
37+
38+ <step number =" 2" >
39+ <title >Check File Existence</title >
40+ <action >Verify release notes files exist</action >
41+ <tool >list_files</tool >
42+ <details >
43+ Check docs/update-notes/ for each requested version file (vX.Y.Z.mdx)
44+ </details >
45+ <error_handling >
46+ <missing_files >
47+ <action >Report which versions are missing</action >
48+ <example ><![CDATA[
49+ <ask_followup_question>
50+ <question>I couldn't find release notes for the following versions: v3.23.16, v3.23.17. Would you like me to:</question>
51+ <follow_up>
52+ <suggest>Generate Discord notes for the versions that exist (3.23.14, 3.23.15)</suggest>
53+ <suggest mode="release-notes-writer">Create release notes for v3.23.16 first</suggest>
54+ <suggest>Cancel this request</suggest>
55+ </follow_up>
56+ </ask_followup_question>
57+ ]]> </example >
58+ </missing_files >
59+ </error_handling >
60+ </step >
61+
62+ <step number =" 3" >
63+ <title >Process Each Version Using Subtasks</title >
64+ <action >Create Discord formatting subtask for each existing version</action >
65+ <details >
66+ For each version that exists, create a subtask to handle the Discord formatting.
67+ This ensures consistency with the standard workflow's Discord formatting approach.
68+ </details >
69+ <substeps >
70+ <substep number =" 1" >
71+ <action >Create temporary results file</action >
72+ <tool >write_to_file</tool >
73+ <file >temp_discord_results.md</file >
74+ <content ># Discord Release Notes Results
75+
76+ </content >
77+ <details >Initialize a file to collect results from subtasks</details >
78+ </substep >
79+ <substep number =" 2" >
80+ <action >Create Discord formatting subtask for each version</action >
81+ <tool >new_task</tool >
82+ <details >
83+ For each existing version, create a release-notes-writer subtask.
84+ </details >
85+ <message_format >
86+ Generate Discord-formatted release notes for version X.Y.Z.
87+
88+ Requirements:
89+ 1. Strip all PR links and numbers (#XXXX).
90+ 2. Keep structure and content.
91+ 3. Prepend https://docs.roocode.com/ to all internal doc links.
92+ 4. If compressing, summarize with this format:
93+ ## :wrench: [Other Improvements and Fixes](https://docs.roocode.com/update-notes/vX.Y.Z#section-anchor)
94+ This release includes X other fixes covering [list key areas]. Thanks to contributors: [list contributors].
95+ 5. Add footer link:
96+ [Full X.Y.Z Release Notes](https://docs.roocode.com/update-notes/vX.Y.Z)
97+
98+ Convert docs/update-notes/vX.Y.Z.mdx to Discord format.
99+ Write the result to temp_discord_release_notes.md.
100+
101+ Special handling: [Include any compression or highlights-only requests from user]
102+ </message_format >
103+ </substep >
104+ <substep number =" 3" >
105+ <action >Wait for subtask completion</action >
106+ <details >
107+ The subtask will handle reading the file, applying transformations, and writing results.
108+ </details >
109+ </substep >
110+ <substep number =" 4" >
111+ <action >Read subtask results and append to collection</action >
112+ <tool >read_file</tool >
113+ <file >temp_discord_release_notes.md</file >
114+ <details >
115+ After each subtask completes, read its output and append to the results collection.
116+ </details >
117+ </substep >
118+ </substeps >
119+ </step >
120+
121+ <step number =" 4" >
122+ <title >Combine Multiple Versions</title >
123+ <action >When multiple versions requested, intelligently combine content</action >
124+ <combination_strategy >
125+ <substep number =" 1" >
126+ <action >Sort versions in descending order (newest first)</action >
127+ <reason >Present most recent changes first for better visibility</reason >
128+ </substep >
129+ <substep number =" 2" >
130+ <action >Extract and merge content by category</action >
131+ <categories >
132+ <category name =" major_features" >
133+ <description >Combine all major features across versions</description >
134+ <format >List under unified "## Major Features" section</format >
135+ </category >
136+ <category name =" bug_fixes" >
137+ <description >Merge all bug fixes</description >
138+ <format >Group under "## Bug Fixes" with version indicators</format >
139+ </category >
140+ <category name =" improvements" >
141+ <description >Combine QOL and other improvements</description >
142+ <format >List under "## Improvements" section</format >
143+ </category >
144+ </categories >
145+ </substep >
146+ <substep number =" 3" >
147+ <action >Add version indicators to each item</action >
148+ <format >Append (vX.Y.Z) to each bullet point</format >
149+ <example >* **File Handling**: Fixed large file errors (v3.23.15) (thanks user!)</example >
150+ </substep >
151+ <substep number =" 4" >
152+ <action >Consolidate duplicate contributors</action >
153+ <details >If same contributor appears in multiple versions, list once</details >
154+ </substep >
155+ </combination_strategy >
156+ </step >
157+
158+ <step number =" 5" >
159+ <title >Compile and Format Final Output</title >
160+ <action >Read all subtask results and format based on version count</action >
161+ <substeps >
162+ <substep number =" 1" >
163+ <action >Read collected results</action >
164+ <tool >read_file</tool >
165+ <file >temp_discord_results.md</file >
166+ <details >Read all Discord-formatted content from subtasks</details >
167+ </substep >
168+ <substep number =" 2" >
169+ <action >Determine output format</action >
170+ <details >
171+ Based on number of versions and user preferences, choose appropriate format:
172+ - Single version: Present as-is from subtask
173+ - Multiple versions with "combine" request: Merge into unified sections
174+ - Multiple versions default: Present separately
175+ </details >
176+ </substep >
177+ <substep number =" 3" >
178+ <action >Apply final formatting if needed</action >
179+ <details >
180+ For multiple versions, may need to:
181+ - Combine sections by category
182+ - Add version indicators to items
183+ - Consolidate duplicate contributors
184+ - Create unified header and footer
185+ </details >
186+ </substep >
187+ </substeps >
188+ <single_version_note >
189+ For single versions, the subtask output can be used directly without additional formatting.
190+ </single_version_note >
191+ <multiple_versions_note >
192+ For multiple versions, additional processing may be needed to combine or organize the content appropriately.
193+ </multiple_versions_note >
194+ </step >
195+
196+ <step number =" 6" >
197+ <title >Provide Copy Instructions</title >
198+ <action >Give user the formatted text with copy guidance</action >
199+ <completion_message >
200+ Here's the Discord-formatted release notes. You can copy and paste this directly into Discord.
201+
202+ [Include formatted text in a code block for easy copying]
203+ </completion_message >
204+ <length_warning >
205+ <condition >If output exceeds 2000 characters</condition >
206+ <action >Warn user about Discord's character limit and suggest splitting</action >
207+ </length_warning >
208+ </step >
209+ </workflow_steps >
210+
211+ <implementation_details >
212+ <detail name =" no_permanent_files" >
213+ <description >This workflow does not create or modify any permanent files</description >
214+ <reason >It only reads existing files and uses temporary files for subtask coordination</reason >
215+ </detail >
216+ <detail name =" no_github_api" >
217+ <description >No GitHub API calls are needed</description >
218+ <reason >All information comes from existing release note files</reason >
219+ </detail >
220+ <detail name =" subtask_based" >
221+ <description >Uses subtasks for consistency with standard workflow</description >
222+ <reason >Ensures Discord formatting logic remains consistent across all workflows</reason >
223+ </detail >
224+ <detail name =" temporary_files" >
225+ <description >Uses temporary files for subtask communication</description >
226+ <files >
227+ <file >temp_discord_results.md - Collects all subtask outputs</file >
228+ <file >temp_discord_release_notes.md - Individual subtask output</file >
229+ </files >
230+ </detail >
231+ </implementation_details >
232+
233+ <examples >
234+ <example name =" single_version" >
235+ <user_request >Discord release notes for 3.23.14</user_request >
236+ <workflow >
237+ 1. Parse version: 3.23.14
238+ 2. Check file exists: docs/update-notes/v3.23.14.mdx ✓
239+ 3. Create Discord formatting subtask
240+ 4. Subtask reads file and transforms content
241+ 5. Read subtask output and present to user
242+ </workflow >
243+ </example >
244+
245+ <example name =" multiple_versions_separate" >
246+ <user_request >Generate Discord announcement for v3.23.14, v3.23.15, v3.23.16</user_request >
247+ <workflow >
248+ 1. Parse versions: 3.23.14, 3.23.15, 3.23.16
249+ 2. Check files: v3.23.14.mdx ✓, v3.23.15.mdx ✓, v3.23.16.mdx ✗
250+ 3. Ask user how to proceed with missing v3.23.16
251+ 4. Create subtasks for existing versions
252+ 5. Collect subtask outputs
253+ 6. Format as separate sections for each version
254+ 7. Output Discord announcement with version sections
255+ </workflow >
256+ </example >
257+
258+ <example name =" multiple_versions_combined" >
259+ <user_request >Combine Discord release notes for 3.23.14 and 3.23.15</user_request >
260+ <workflow >
261+ 1. Parse versions: 3.23.14, 3.23.15
262+ 2. Check both files exist
263+ 3. Create subtasks for each version
264+ 4. Collect subtask outputs
265+ 5. Detect "combine" keyword - use combined format
266+ 6. Merge features, fixes, and improvements with version tags
267+ 7. Output single combined announcement
268+ </workflow >
269+ </example >
270+
271+ <example name =" with_compression" >
272+ <user_request >Discord notes for 3.23.14, compress the minor fixes</user_request >
273+ <workflow >
274+ 1. Parse version and compression request
275+ 2. Check file exists
276+ 3. Create subtask with compression instructions
277+ 4. Subtask applies compression during transformation
278+ 5. Output condensed Discord format
279+ </workflow >
280+ </example >
281+
282+ <example name =" range_request_combined" >
283+ <user_request >Discord release notes for 3.23.14-3.23.16 combined</user_request >
284+ <workflow >
285+ 1. Parse range: 3.23.14 to 3.23.16
286+ 2. Find all versions in range
287+ 3. Create subtasks for each version
288+ 4. Collect all subtask outputs
289+ 5. Combine into unified sections with version indicators
290+ 6. Output merged announcement
291+ </workflow >
292+ </example >
293+ </examples >
294+
295+ <error_scenarios >
296+ <scenario name =" no_versions_found" >
297+ <trigger >User provides version numbers but no files exist</trigger >
298+ <response >Explain that no release notes exist and offer to create them</response >
299+ </scenario >
300+ <scenario name =" invalid_version_format" >
301+ <trigger >User provides invalid version format (e.g., "3.23" without patch)</trigger >
302+ <response >Ask for clarification on the full version number</response >
303+ </scenario >
304+ <scenario name =" ambiguous_request" >
305+ <trigger >Unclear if user wants Discord format or full release notes</trigger >
306+ <response >Ask for clarification with suggested options</response >
307+ </scenario >
308+ </error_scenarios >
309+ </discord_only_workflow_instructions >
0 commit comments