Skip to content

Commit d0a0c5d

Browse files
committed
Enhance release notes workflow with Discord formatting capabilities and subtask management
1 parent dd59e98 commit d0a0c5d

File tree

4 files changed

+313
-52
lines changed

4 files changed

+313
-52
lines changed

.roo/rules-release-notes-writer/1_workflow.xml

Lines changed: 77 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -49,68 +49,59 @@
4949
</steps>
5050
</phase>
5151
<phase name="process_each_pr">
52-
<description>Process PRs individually, investigating each one thoroughly and storing findings in a temporary file for later compilation.</description>
53-
<iterative_workflow>
52+
<description>Process PRs individually by creating subtasks for each PR investigation, storing findings in a temporary file for later compilation.</description>
53+
<subtask_workflow>
5454
<overview>
55-
For each PR in the list, execute a complete investigation workflow and immediately
56-
store the findings in a temporary markdown file (e.g., temp_pr_analysis.md).
57-
This allows for incremental building of release note data.
55+
For each PR in the list, create a dedicated subtask using the new_task tool.
56+
Each subtask will investigate one PR thoroughly and store findings in temp_pr_analysis.md.
57+
This allows for clear separation of concerns and incremental progress tracking.
5858
</overview>
5959

6060
<per_pr_steps>
6161
<step number="1">
62-
<action>Gather comprehensive PR details</action>
63-
<tools>
64-
<tool>github.get_pull_request - Title, author, description</tool>
65-
<tool>github.get_pull_request_files - Changed files (optional)</tool>
66-
<tool>github.get_pull_request_diff - Code changes (if needed for clarity)</tool>
67-
</tools>
68-
<details>Extract PR title, author username, and description for analysis</details>
62+
<action>Create PR investigation subtask</action>
63+
<tool>new_task</tool>
64+
<details>
65+
Create a new task in release-notes-writer mode to investigate the specific PR
66+
</details>
67+
<message_format>
68+
Investigate PR #[number] for release notes v[version].
69+
70+
Your task is to:
71+
1. Get full PR details using github.get_pull_request
72+
2. Extract any linked issues from the PR description (e.g., "Fixes #123")
73+
3. Get details for each linked issue using github.get_issue
74+
4. Analyze the change and categorize it (bug fix, feature, improvement, etc.)
75+
5. Write your findings to temp_pr_analysis.md in the specified format
76+
77+
Use insert_content with line 0 to append to the file.
78+
</message_format>
6979
</step>
7080

7181
<step number="2">
72-
<action>Extract and gather linked issue details</action>
73-
<process>
74-
<substep>Parse PR description for issue references (Fixes #123, Closes #456, etc.)</substep>
75-
<substep>For each found issue number, use github.get_issue to gather details</substep>
76-
<substep>Extract issue reporter username and title for context</substep>
77-
</process>
78-
<tools>
79-
<tool>github.get_issue - For each linked issue found</tool>
80-
</tools>
82+
<action>Wait for subtask completion</action>
83+
<details>
84+
The subtask will handle all investigation steps:
85+
- Fetching PR details and linked issues
86+
- Analyzing and categorizing the change
87+
- Writing structured findings to temp_pr_analysis.md
88+
- Reporting completion via attempt_completion
89+
</details>
8190
</step>
8291

8392
<step number="3">
84-
<action>Analyze and categorize the change</action>
85-
<analysis_framework>
86-
<question>What changed? (core functionality/feature affected)</question>
87-
<question>Why did it change? (problem being solved)</question>
88-
<question>How does this impact users? (benefits in plain language)</question>
89-
<question>What category? (bug fix, feature, improvement, etc.)</question>
90-
</analysis_framework>
91-
</step>
92-
93-
<step number="4">
94-
<action>Write findings to temporary file</action>
95-
<process>
96-
<substep>Create or append to temp_pr_analysis.md</substep>
97-
<substep>Include structured data for this PR</substep>
98-
<substep>Store all contributor information</substep>
99-
<substep>Include categorization and user impact analysis</substep>
100-
</process>
101-
<file_format>
102-
Use a consistent markdown format that can be easily parsed later
103-
for generating the final release notes
104-
</file_format>
93+
<action>Move to next PR</action>
94+
<details>
95+
After subtask completion confirmation, proceed to create the next PR investigation subtask
96+
</details>
10597
</step>
10698
</per_pr_steps>
10799

108100
<completion_per_pr>
109-
After each PR analysis is complete and written to the temporary file,
110-
move on to the next PR. This ensures thorough investigation of each
111-
change before proceeding.
101+
After each subtask completes and confirms it has written findings to the temporary file,
102+
move on to the next PR. This ensures thorough investigation of each change before proceeding.
112103
</completion_per_pr>
113-
</iterative_workflow>
104+
</subtask_workflow>
114105
</phase>
115106
<phase name="compile_final_release_notes">
116107
<description>Read the temporary analysis file and compile all findings into the final release notes format</description>
@@ -174,9 +165,48 @@
174165
</step>
175166
</steps>
176167
</phase>
168+
<phase name="discord_formatting" optional="true">
169+
<description>Generate Discord-formatted release notes by creating a subtask that converts the existing release notes to Discord format</description>
170+
<when_to_use>Use this phase when the user specifically asks for Discord formatting of the release notes</when_to_use>
171+
<steps>
172+
<step number="1">
173+
<action>Create Discord formatting subtask</action>
174+
<tool>new_task</tool>
175+
<details>
176+
Create a new task in release-notes-writer mode to generate Discord-formatted release notes
177+
based on the completed release notes file
178+
</details>
179+
<task_instructions>
180+
Generate Discord-formatted release notes for version X.Y.Z.
181+
182+
Requirements:
183+
1. Strip all PR links and references to PR numbers (#XXXX)
184+
2. Keep structure and content identical to the existing release notes
185+
3. Replace all internal documentation links to use https://docs.roocode.com/ prefix
186+
4. If requested to compress sections, summarize using this format:
187+
## :wrench: [Other Improvements and Fixes](https://docs.roocode.com/update-notes/vX.Y.Z#section-anchor)
188+
This release includes X additional enhancements, covering [list key areas]. A huge thank you to the contributors in these sections: [list contributors]!
189+
5. At the bottom, include links to full release notes:
190+
[Full X.Y.Z Release Notes](https://docs.roocode.com/update-notes/vX.Y.Z)
191+
192+
Convert the release notes from docs/update-notes/vX.Y.Z.mdx to Discord format.
193+
</task_instructions>
194+
</step>
195+
<step number="2">
196+
<action>Handle compression requests</action>
197+
<details>
198+
If the user asks to compress specific sections, the subtask should:
199+
- Summarize the overall changes of the requested sections/points
200+
- Use the specified format for compressed sections
201+
- Thank only contributors from the compressed sections, not the overall release
202+
- Maintain links to the full release notes for detailed information
203+
</details>
204+
</step>
205+
</steps>
206+
</phase>
177207
</main_workflow>
178208

179-
<completion_criteria>
209+
<completion_criteria>
180210
<criterion>Release notes file created with proper formatting</criterion>
181211
<criterion>All PRs analyzed and converted to user benefits</criterion>
182212
<criterion>Index and sidebar files updated</criterion>

.roo/rules-release-notes-writer/4_tool_usage.xml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,41 @@ Use insert_content with line 0 to append to the file.</message>
176176
<step>Main task continues with next PR</step>
177177
</subtask_workflow>
178178
</tool>
179+
180+
<tool name="new_task">
181+
<purpose>Create subtask for Discord formatting of release notes</purpose>
182+
<when_to_use>
183+
When user requests Discord formatting of the completed release notes
184+
</when_to_use>
185+
<parameters>
186+
<parameter name="mode">Always "release-notes-writer" for Discord formatting subtasks</parameter>
187+
<parameter name="message">Structured message with version and formatting requirements</parameter>
188+
</parameters>
189+
<usage><![CDATA[
190+
<new_task>
191+
<mode>release-notes-writer</mode>
192+
<message>Generate Discord-formatted release notes for version X.Y.Z.
193+
194+
Requirements:
195+
1. Strip all PR links and references to PR numbers (#XXXX)
196+
2. Keep structure and content identical to the existing release notes
197+
3. Replace all internal documentation links to use https://docs.roocode.com/ prefix
198+
4. If requested to compress sections, summarize using this format:
199+
## :wrench: [Other Improvements and Fixes](https://docs.roocode.com/update-notes/vX.Y.Z#section-anchor)
200+
This release includes X additional enhancements, covering [list key areas]. A huge thank you to the contributors in these sections: [list contributors]!
201+
5. At the bottom, include links to full release notes:
202+
[Full X.Y.Z Release Notes](https://docs.roocode.com/update-notes/vX.Y.Z)
203+
204+
Convert the release notes from docs/update-notes/vX.Y.Z.mdx to Discord format.</message>
205+
</new_task>
206+
]]></usage>
207+
<compression_guidelines>
208+
<guideline>When compressing sections, only thank contributors from the compressed sections</guideline>
209+
<guideline>Maintain the overall structure but summarize detailed points</guideline>
210+
<guideline>Use emojis like :wrench: for compressed sections</guideline>
211+
<guideline>Always link to the full release notes for complete details</guideline>
212+
</compression_guidelines>
213+
</tool>
179214
</subtask_tools>
180215

181216
<file_tools>

.roo/rules-release-notes-writer/7_subtask_handling.xml

Lines changed: 71 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,24 @@
1010
The mode determines its operating context by examining the user's initial message
1111
</description>
1212
<patterns>
13-
<pattern type="subtask">
14-
<regex>^Investigate PR #(\d+) for release notes</regex>
13+
<pattern type="subtask_pr">
14+
<regex>^Investigate PR #(\d+) for release notes v([\d.]+)</regex>
1515
<action>Execute single PR investigation workflow</action>
1616
</pattern>
17+
<pattern type="subtask_discord">
18+
<regex>^Generate Discord-formatted release notes for version ([\d.]+)</regex>
19+
<action>Execute Discord formatting workflow</action>
20+
</pattern>
1721
<pattern type="main">
1822
<regex>^(Create|Generate|Make) release notes for (version |v)?[\d.]+</regex>
1923
<action>Execute full release notes workflow</action>
2024
</pattern>
2125
</patterns>
2226
</mode_detection>
2327

24-
<subtask_workflow>
28+
<pr_investigation_workflow>
2529
<when_triggered>
26-
When the message matches the subtask pattern "Investigate PR #[number] for release notes"
30+
When the message matches the PR investigation pattern "Investigate PR #[number] for release notes v[version]"
2731
</when_triggered>
2832

2933
<steps>
@@ -105,7 +109,69 @@
105109
</message>
106110
</step>
107111
</steps>
108-
</subtask_workflow>
112+
</pr_investigation_workflow>
113+
114+
<discord_formatting_workflow>
115+
<when_triggered>
116+
When the message matches the Discord formatting pattern "Generate Discord-formatted release notes for version [version]"
117+
</when_triggered>
118+
119+
<steps>
120+
<step number="1">
121+
<action>Extract version number from message</action>
122+
<details>
123+
Parse the message to get the version number for which to format Discord release notes
124+
</details>
125+
</step>
126+
127+
<step number="2">
128+
<action>Read completed release notes file</action>
129+
<tool>read_file</tool>
130+
<file>docs/update-notes/vX.Y.Z.mdx</file>
131+
<details>
132+
Read the existing release notes file that was created by the main workflow
133+
</details>
134+
</step>
135+
136+
<step number="3">
137+
<action>Transform content for Discord</action>
138+
<transformations>
139+
<transformation>Remove all PR links and references (#XXXX)</transformation>
140+
<transformation>Convert internal docs links to https://docs.roocode.com/ format</transformation>
141+
<transformation>Preserve structure and content</transformation>
142+
<transformation>Handle compression requests if specified</transformation>
143+
</transformations>
144+
</step>
145+
146+
<step number="4">
147+
<action>Apply compression (if requested)</action>
148+
<compression_format><![CDATA[
149+
## :wrench: [Other Improvements and Fixes](https://docs.roocode.com/update-notes/vX.Y.Z#section-anchor)
150+
This release includes X additional enhancements, covering [list key areas]. A huge thank you to the contributors in these sections: [list contributors]!
151+
]]></compression_format>
152+
<rules>
153+
<rule>Only thank contributors from compressed sections</rule>
154+
<rule>Summarize overall changes of compressed sections</rule>
155+
<rule>Link to full release notes section</rule>
156+
</rules>
157+
</step>
158+
159+
<step number="5">
160+
<action>Add footer links</action>
161+
<footer><![CDATA[
162+
[Full X.Y.Z Release Notes](https://docs.roocode.com/update-notes/vX.Y.Z)
163+
]]></footer>
164+
</step>
165+
166+
<step number="6">
167+
<action>Present Discord-formatted content</action>
168+
<tool>attempt_completion</tool>
169+
<message>
170+
Present the Discord-formatted release notes content for easy copying
171+
</message>
172+
</step>
173+
</steps>
174+
</discord_formatting_workflow>
109175

110176
<error_handling>
111177
<scenario>

0 commit comments

Comments
 (0)