Skip to content

Commit a531c3d

Browse files
authored
feat: add support for combining multiple Discord release notes (#260)
1 parent fbf3fc1 commit a531c3d

File tree

3 files changed

+204
-6
lines changed

3 files changed

+204
-6
lines changed

.roo/rules-release-notes-writer/10_discord_only_workflow.xml

Lines changed: 102 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,45 @@
9595
</step>
9696

9797
<step number="4">
98+
<title>Combine Multiple Versions</title>
99+
<action>When multiple versions requested, intelligently combine content</action>
100+
<combination_strategy>
101+
<substep number="1">
102+
<action>Sort versions in descending order (newest first)</action>
103+
<reason>Present most recent changes first for better visibility</reason>
104+
</substep>
105+
<substep number="2">
106+
<action>Extract and merge content by category</action>
107+
<categories>
108+
<category name="major_features">
109+
<description>Combine all major features across versions</description>
110+
<format>List under unified "## Major Features" section</format>
111+
</category>
112+
<category name="bug_fixes">
113+
<description>Merge all bug fixes</description>
114+
<format>Group under "## Bug Fixes" with version indicators</format>
115+
</category>
116+
<category name="improvements">
117+
<description>Combine QOL and other improvements</description>
118+
<format>List under "## Improvements" section</format>
119+
</category>
120+
</categories>
121+
</substep>
122+
<substep number="3">
123+
<action>Add version indicators to each item</action>
124+
<format>Append (vX.Y.Z) to each bullet point</format>
125+
<example>* **File Handling**: Fixed large file errors (v3.23.15) (thanks user!)</example>
126+
</substep>
127+
<substep number="4">
128+
<action>Consolidate duplicate contributors</action>
129+
<details>If same contributor appears in multiple versions, list once</details>
130+
</substep>
131+
</combination_strategy>
132+
</step>
133+
134+
<step number="5">
98135
<title>Format Output</title>
99-
<action>Present Discord-ready text</action>
136+
<action>Present Discord-ready text based on version count</action>
100137
<single_version_format><![CDATA[
101138
# Roo Code X.Y.Z Release Notes
102139
@@ -113,7 +150,32 @@
113150
114151
[Full X.Y.Z Release Notes](https://docs.roocode.com/update-notes/vX.Y.Z)
115152
]]></single_version_format>
116-
<multiple_versions_format><![CDATA[
153+
<multiple_versions_combined_format><![CDATA[
154+
# Roo Code Release Notes (vX.Y.Z - vA.B.C)
155+
156+
Combined release notes for versions X.Y.Z through A.B.C.
157+
158+
## Major Features
159+
160+
* **[Feature Name]** (vX.Y.Z): [Description without PR links]
161+
* **[Another Feature]** (vA.B.C): [Description]
162+
163+
## Bug Fixes
164+
165+
* **[Category]**: [Fix description] (vX.Y.Z) (thanks [contributor]!)
166+
* **[Category]**: [Another fix] (vA.B.C) (thanks [contributor]!)
167+
168+
## Improvements
169+
170+
* **[Improvement Type]**: [Description] (vX.Y.Z)
171+
* **[Another Type]**: [Description] (vA.B.C)
172+
173+
---
174+
Full release notes:
175+
- [X.Y.Z Release Notes](https://docs.roocode.com/update-notes/vX.Y.Z)
176+
- [A.B.C Release Notes](https://docs.roocode.com/update-notes/vA.B.C)
177+
]]></multiple_versions_combined_format>
178+
<multiple_versions_separate_format><![CDATA[
117179
# Roo Code Release Notes
118180
119181
## Version X.Y.Z
@@ -128,17 +190,27 @@
128190
Full release notes:
129191
- [X.Y.Z Release Notes](https://docs.roocode.com/update-notes/vX.Y.Z)
130192
- [A.B.C Release Notes](https://docs.roocode.com/update-notes/vA.B.C)
131-
]]></multiple_versions_format>
193+
]]></multiple_versions_separate_format>
194+
<format_selection>
195+
<rule>Use combined format when user explicitly requests "combined" or "merge"</rule>
196+
<rule>Use combined format for 2-3 closely related patch versions (e.g., 3.23.14, 3.23.15)</rule>
197+
<rule>Use separate format for many versions or major/minor releases</rule>
198+
<rule>Ask user preference if unclear</rule>
199+
</format_selection>
132200
</step>
133201

134-
<step number="5">
202+
<step number="6">
135203
<title>Provide Copy Instructions</title>
136204
<action>Give user the formatted text with copy guidance</action>
137205
<completion_message>
138206
Here's the Discord-formatted release notes. You can copy and paste this directly into Discord.
139207

140208
[Include formatted text in a code block for easy copying]
141209
</completion_message>
210+
<length_warning>
211+
<condition>If output exceeds 2000 characters</condition>
212+
<action>Warn user about Discord's character limit and suggest splitting</action>
213+
</length_warning>
142214
</step>
143215
</workflow_steps>
144216

@@ -168,14 +240,27 @@ Full release notes:
168240
</workflow>
169241
</example>
170242

171-
<example name="multiple_versions">
243+
<example name="multiple_versions_separate">
172244
<user_request>Generate Discord announcement for v3.23.14, v3.23.15, v3.23.16</user_request>
173245
<workflow>
174246
1. Parse versions: 3.23.14, 3.23.15, 3.23.16
175247
2. Check files: v3.23.14.mdx ✓, v3.23.15.mdx ✓, v3.23.16.mdx ✗
176248
3. Ask user how to proceed with missing v3.23.16
177249
4. Process existing versions
178-
5. Output combined Discord announcement
250+
5. Determine format: separate sections for each version
251+
6. Output Discord announcement with version sections
252+
</workflow>
253+
</example>
254+
255+
<example name="multiple_versions_combined">
256+
<user_request>Combine Discord release notes for 3.23.14 and 3.23.15</user_request>
257+
<workflow>
258+
1. Parse versions: 3.23.14, 3.23.15
259+
2. Check both files exist
260+
3. Read and process both versions
261+
4. Detect "combine" keyword - use combined format
262+
5. Merge features, fixes, and improvements with version tags
263+
6. Output single combined announcement
179264
</workflow>
180265
</example>
181266

@@ -188,6 +273,17 @@ Full release notes:
188273
4. Output condensed Discord format
189274
</workflow>
190275
</example>
276+
277+
<example name="range_request_combined">
278+
<user_request>Discord release notes for 3.23.14-3.23.16 combined</user_request>
279+
<workflow>
280+
1. Parse range: 3.23.14 to 3.23.16
281+
2. Find all versions in range
282+
3. Process each version's content
283+
4. Combine into unified sections with version indicators
284+
5. Output merged announcement
285+
</workflow>
286+
</example>
191287
</examples>
192288

193289
<error_scenarios>

.roo/rules-release-notes-writer/11_discord_workflow_tests.xml

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,57 @@
117117
- Combined output for all versions
118118
</validation>
119119
</scenario>
120+
121+
<scenario id="8">
122+
<name>Combined format request</name>
123+
<user_input>Combine Discord release notes for 3.23.14 and 3.23.15</user_input>
124+
<expected_behavior>
125+
1. Detect "combine" keyword
126+
2. Parse versions: 3.23.14, 3.23.15
127+
3. Check both files exist
128+
4. Read and process both versions
129+
5. Merge content by category with version indicators
130+
6. Output single combined announcement
131+
</expected_behavior>
132+
<validation>
133+
- Features from both versions in one section
134+
- Bug fixes merged with version tags
135+
- No duplicate sections
136+
- Version indicators on each item
137+
</validation>
138+
</scenario>
139+
140+
<scenario id="9">
141+
<name>Multiple patch versions auto-combine</name>
142+
<user_input>Discord release notes for 3.23.14, 3.23.15</user_input>
143+
<expected_behavior>
144+
1. Detect consecutive patch versions
145+
2. Automatically choose combined format
146+
3. Merge all content with version tags
147+
4. Present unified announcement
148+
</expected_behavior>
149+
<validation>
150+
- Smart format selection based on version proximity
151+
- Clear version attribution for each change
152+
- Consolidated contributor list
153+
</validation>
154+
</scenario>
155+
156+
<scenario id="10">
157+
<name>Mixed major/minor versions</name>
158+
<user_input>Discord notes for 3.22.0, 3.23.0, 3.23.14</user_input>
159+
<expected_behavior>
160+
1. Detect mix of major/minor versions
161+
2. Use separate format (not combined)
162+
3. Create section for each version
163+
4. Maintain clear separation
164+
</expected_behavior>
165+
<validation>
166+
- Each version gets its own section
167+
- No attempt to merge different minor versions
168+
- Clear version headers
169+
</validation>
170+
</scenario>
120171
</test_scenarios>
121172

122173
<edge_cases>
@@ -134,6 +185,16 @@
134185
<input>Discord format for v3.23.1, v3.23.2, v3.23.3, ... (20+ versions)</input>
135186
<expected>Process all but suggest breaking into smaller groups</expected>
136187
</case>
188+
189+
<case name="explicit_separate_request">
190+
<input>Discord release notes for 3.23.14 and 3.23.15 separately</input>
191+
<expected>Use separate format even for consecutive patches</expected>
192+
</case>
193+
194+
<case name="combine_non_consecutive">
195+
<input>Combine Discord notes for 3.23.14, 3.23.20</input>
196+
<expected>Still combine but note version gap</expected>
197+
</case>
137198
</edge_cases>
138199

139200
<integration_tests>
@@ -160,6 +221,43 @@
160221
</case>
161222
</cases>
162223
</test>
224+
225+
<test name="format_selection_logic">
226+
<description>Verify correct format selection based on context</description>
227+
<cases>
228+
<case>
229+
<versions>3.23.14, 3.23.15</versions>
230+
<keyword>none</keyword>
231+
<expected_format>combined (auto-detected for consecutive patches)</expected_format>
232+
</case>
233+
<case>
234+
<versions>3.23.14, 3.23.15, 3.23.16</versions>
235+
<keyword>combine</keyword>
236+
<expected_format>combined (explicit request)</expected_format>
237+
</case>
238+
<case>
239+
<versions>3.22.0, 3.23.0</versions>
240+
<keyword>combine</keyword>
241+
<expected_format>combined (respecting user request despite major versions)</expected_format>
242+
</case>
243+
<case>
244+
<versions>3.23.14, 3.23.15</versions>
245+
<keyword>separately</keyword>
246+
<expected_format>separate (explicit request overrides auto-detection)</expected_format>
247+
</case>
248+
</cases>
249+
</test>
250+
251+
<test name="content_merging">
252+
<description>Verify proper content merging in combined format</description>
253+
<validations>
254+
<validation>Version tags added to each item</validation>
255+
<validation>Categories properly merged</validation>
256+
<validation>No duplicate content</validation>
257+
<validation>Contributors consolidated</validation>
258+
<validation>Proper sorting (newest first)</validation>
259+
</validations>
260+
</test>
163261
</integration_tests>
164262

165263
<performance_considerations>

.roo/rules-release-notes-writer/6_mode_summary.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<feature>Contributor acknowledgment (authors and issue reporters).</feature>
1515
<feature>Direct Discord formatting for existing releases.</feature>
1616
<feature>Multi-version Discord announcement support.</feature>
17+
<feature>Intelligent combining of multiple release notes into unified Discord announcements.</feature>
1718
</key_features>
1819

1920
<workflow_summary>
@@ -55,6 +56,7 @@
5556
<example>Discord release notes for 3.23.14</example>
5657
<example>Generate Discord format for v3.23.14, v3.23.15</example>
5758
<example>Discord announcement for 3.23.14</example>
59+
<example>Combine Discord release notes for 3.23.14 and 3.23.15</example>
5860
</examples>
5961
</mode>
6062
<mode type="subtask">
@@ -93,6 +95,8 @@
9395
<instruction>Reads existing files and applies Discord formatting.</instruction>
9496
<instruction>Outputs Discord-ready text without creating files.</instruction>
9597
<instruction>Supports multiple versions in a single request.</instruction>
98+
<instruction>Can combine multiple versions into a unified announcement with version indicators.</instruction>
99+
<instruction>Automatically detects when to combine consecutive patch versions.</instruction>
96100
</discord_only_workflow>
97101
<subtask_workflow>
98102
<instruction>Receives "Investigate PR #X" message.</instruction>

0 commit comments

Comments
 (0)