Skip to content

Commit ef9ca48

Browse files
refactor: Update workflow and tool usage to utilize GitHub CLI comman… (#248)
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
1 parent 9c50bc4 commit ef9ca48

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1159
-433
lines changed

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

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,21 +33,32 @@
3333
</step>
3434
<step number="2">
3535
<action>Fetch release dates</action>
36-
<tool>github.get_tag</tool>
37-
<details>Get commit dates for new and previous version tags to set a date range.</details>
36+
<tool>gh api (get tag)</tool>
37+
<details>Get commit dates for new and previous version tags to set a date range using gh CLI.</details>
3838
</step>
3939
<step number="3">
4040
<action>Search for merged PRs within date range</action>
41-
<tool>github.search_issues</tool>
41+
<tool>gh pr list or gh search prs</tool>
4242
<details>
43-
Use release date range to search for merged PRs.
44-
Query: `is:pr is:merged repo:RooCodeInc/Roo-Code merged:YYYY-MM-DD..YYYY-MM-DD`
45-
</details>
43+
Use release date range to search for merged PRs.
44+
Query: `--state merged --search "merged:YYYY-MM-DD..YYYY-MM-DD"`
45+
</details>
4646
</step>
4747
</steps>
4848
</phase>
4949
<phase name="process_each_pr">
5050
<description>Process PRs with subtasks. Each subtask investigates one PR, storing findings in a temp file.</description>
51+
<initialization>
52+
<step>
53+
<action>Create temporary analysis file</action>
54+
<tool>write_to_file</tool>
55+
<file>temp_pr_analysis.md</file>
56+
<content># PR Analysis for Release Notes v[version]
57+
58+
</content>
59+
<details>Create an empty temp file that subtasks will append to.</details>
60+
</step>
61+
</initialization>
5162
<subtask_workflow>
5263
<overview>
5364
For each PR, create a subtask with new_task. Each subtask investigates one PR and appends findings to temp_pr_analysis.md.
@@ -64,11 +75,13 @@
6475
Investigate PR #[number] for release notes v[version].
6576

6677
Task:
67-
1. Get PR details with github.get_pull_request
78+
1. Get PR details with gh pr view
6879
2. Extract linked issues from PR description (e.g., "Fixes #123")
69-
3. Get details for linked issues with github.get_issue
80+
3. Get details for linked issues with gh issue view
7081
4. Analyze and categorize the change (bug fix, feature, etc.)
71-
5. Append findings to temp_pr_analysis.md in the specified format. Use insert_content with line 0.
82+
5. Append findings to temp_pr_analysis.md in the specified format. Use insert_content with line 0 to append to the end of the file.
83+
84+
Use update_todo_list to track your progress through these steps.
7285
</message_format>
7386
</step>
7487

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

Lines changed: 85 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,54 @@
11
<tool_usage_guide>
22
<overview>
3-
Guidance for using GitHub MCP and file tools for creating release notes.
3+
Guidance for using GitHub CLI (gh) and file tools for creating release notes.
44
</overview>
55

6-
<github_tools>
7-
<tool name="github.get_tag">
6+
<github_cli_tools>
7+
<tool name="gh api (get tag)">
88
<purpose>Fetch release date for a version tag.</purpose>
99
<usage><![CDATA[
10-
<use_mcp_tool>
11-
<server_name>github</server_name>
12-
<tool_name>get_tag</tool_name>
13-
<arguments>{ "owner": "RooCodeInc", "repo": "Roo-Code", "tag": "v3.20.3" }</arguments>
14-
</use_mcp_tool>
10+
<execute_command>
11+
<command>gh api repos/RooCodeInc/Roo-Code/git/refs/tags/v3.20.3 --jq '.object.sha' | xargs -I {} gh api repos/RooCodeInc/Roo-Code/git/commits/{} --jq '.committer.date'</command>
12+
</execute_command>
1513
]]></usage>
1614
<output>Returns commit date for the tag to set the PR search range.</output>
1715
</tool>
1816

19-
<tool name="github.search_issues">
17+
<tool name="gh pr list (search PRs)">
2018
<purpose>Get all merged PRs between two dates.</purpose>
2119
<usage><![CDATA[
22-
<use_mcp_tool>
23-
<server_name>github</server_name>
24-
<tool_name>search_issues</tool_name>
25-
<arguments>{ "owner": "RooCodeInc", "repo": "Roo-Code", "q": "is:pr is:merged repo:RooCodeInc/Roo-Code merged:2025-01-10..2025-01-13" }</arguments>
26-
</use_mcp_tool>
20+
<execute_command>
21+
<command>gh pr list --repo RooCodeInc/Roo-Code --state merged --search "merged:2025-01-10..2025-01-13" --json number,title,author,mergedAt --limit 1000</command>
22+
</execute_command>
2723
]]></usage>
28-
<parsing_tip>Extract PR numbers from the results list.</parsing_tip>
24+
<parsing_tip>Returns JSON array with PR numbers, titles, authors, and merge dates.</parsing_tip>
2925
</tool>
3026

31-
<tool name="github.get_pull_request">
27+
<tool name="gh pr view">
3228
<purpose>Get details for a specific PR.</purpose>
3329
<usage><![CDATA[
34-
<use_mcp_tool>
35-
<server_name>github</server_name>
36-
<tool_name>get_pull_request</tool_name>
37-
<arguments>{ "owner": "RooCodeInc", "repo": "Roo-Code", "pull_number": 1234 }</arguments>
38-
</use_mcp_tool>
30+
<execute_command>
31+
<command>gh pr view 1234 --repo RooCodeInc/Roo-Code --json number,title,author,body,mergedAt,files</command>
32+
</execute_command>
3933
]]></usage>
4034
<extract>
4135
<field>title</field>
42-
<field>user.login (author)</field>
36+
<field>author.login (author)</field>
4337
<field>body</field>
38+
<field>files (changed files)</field>
4439
</extract>
4540
</tool>
4641

47-
<tool name="github.get_pull_request_files">
48-
<purpose>See which files changed in a PR.</purpose>
49-
<usage><![CDATA[
50-
<use_mcp_tool>
51-
<server_name>github</server_name>
52-
<tool_name>get_pull_request_files</tool_name>
53-
<arguments>{ "owner": "RooCodeInc", "repo": "Roo-Code", "pull_number": 1234 }</arguments>
54-
</use_mcp_tool>
55-
]]></usage>
56-
<analysis>
57-
Use file paths to understand change scope (e.g., src/extension/* for core, webview-ui/* for UI).
58-
</analysis>
59-
</tool>
60-
61-
<tool name="github.get_pull_request_diff">
62-
<purpose>Get code changes for deeper analysis.</purpose>
63-
<when_to_use>When PR title/description is unclear.</when_to_use>
64-
</tool>
65-
66-
<tool name="github.get_issue">
42+
<tool name="gh issue view">
6743
<purpose>Get details for linked issues to acknowledge all contributors.</purpose>
6844
<usage><![CDATA[
69-
<use_mcp_tool>
70-
<server_name>github</server_name>
71-
<tool_name>get_issue</tool_name>
72-
<arguments>{ "owner": "RooCodeInc", "repo": "Roo-Code", "issue_number": 987 }</arguments>
73-
</use_mcp_tool>
45+
<execute_command>
46+
<command>gh issue view 987 --repo RooCodeInc/Roo-Code --json number,title,author,body</command>
47+
</execute_command>
7448
]]></usage>
7549
<extract>
7650
<field>title</field>
77-
<field>user.login (reporter)</field>
51+
<field>author.login (reporter)</field>
7852
<field>body</field>
7953
</extract>
8054
<issue_extraction_patterns>
@@ -85,7 +59,17 @@
8559
<pattern>#123</pattern>
8660
</issue_extraction_patterns>
8761
</tool>
88-
</github_tools>
62+
63+
<tool name="gh search prs">
64+
<purpose>Alternative method to search for PRs with more complex queries.</purpose>
65+
<usage><![CDATA[
66+
<execute_command>
67+
<command>gh search prs --repo RooCodeInc/Roo-Code --merged --merged-at "2025-01-10..2025-01-13" --json number,title,author,mergedAt --limit 1000</command>
68+
</execute_command>
69+
]]></usage>
70+
<note>Use this if gh pr list doesn't support the date range properly.</note>
71+
</tool>
72+
</github_cli_tools>
8973

9074
<subtask_tools>
9175
<tool name="new_task">
@@ -101,15 +85,65 @@
10185
<message>Investigate PR #1234 for release notes v3.20.3.
10286
10387
Task:
104-
1. Get PR details (github.get_pull_request)
88+
1. Get PR details (gh pr view)
10589
2. Extract linked issues from description
106-
3. Get issue details (github.get_issue)
90+
3. Get issue details (gh issue view)
10791
4. Analyze and categorize change
10892
5. Write findings to temp_pr_analysis.md in the required format. Use insert_content with line 0.
93+
94+
Use update_todo_list to track your progress through these steps.
10995
</message>
11096
</new_task>
11197
]]></usage>
11298
</tool>
99+
100+
<tool name="update_todo_list">
101+
<purpose>Track progress through PR investigation steps in subtasks.</purpose>
102+
<when_to_use>At the start of each PR investigation subtask and after completing each step.</when_to_use>
103+
<usage><![CDATA[
104+
<!-- Initial todo list at start of PR investigation -->
105+
<update_todo_list>
106+
<todos>
107+
[ ] Fetch PR details with gh pr view
108+
[ ] Extract linked issues from PR description
109+
[ ] Get details for each linked issue
110+
[ ] Analyze and categorize the change
111+
[ ] Write findings to temp_pr_analysis.md
112+
[ ] Complete subtask
113+
</todos>
114+
</update_todo_list>
115+
116+
<!-- After fetching PR details -->
117+
<update_todo_list>
118+
<todos>
119+
[x] Fetch PR details with gh pr view
120+
[-] Extract linked issues from PR description
121+
[ ] Get details for each linked issue
122+
[ ] Analyze and categorize the change
123+
[ ] Write findings to temp_pr_analysis.md
124+
[ ] Complete subtask
125+
</todos>
126+
</update_todo_list>
127+
128+
<!-- Final update when all done -->
129+
<update_todo_list>
130+
<todos>
131+
[x] Fetch PR details with gh pr view
132+
[x] Extract linked issues from PR description
133+
[x] Get details for each linked issue
134+
[x] Analyze and categorize the change
135+
[x] Write findings to temp_pr_analysis.md
136+
[x] Complete subtask
137+
</todos>
138+
</update_todo_list>
139+
]]></usage>
140+
<best_practices>
141+
<practice>Update immediately after each step completes</practice>
142+
<practice>Use [-] for in-progress items, [x] for completed</practice>
143+
<practice>Add specific issue numbers when multiple issues exist</practice>
144+
<practice>Only mark complete when verified</practice>
145+
</best_practices>
146+
</tool>
113147

114148
<tool name="new_task">
115149
<purpose>Create a subtask for Discord formatting.</purpose>

.roo/rules-release-notes-writer/5_complete_example.xml

Lines changed: 45 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,56 @@ Task:
6060
3. Get issue details (github.get_issue).
6161
4. Analyze and categorize change.
6262
5. Write findings to temp_pr_analysis.md. Use insert_content with line 0.
63+
64+
Use update_todo_list to track your progress through these steps.
6365
</message>
6466
</new_task>
6567
]]></tool_use>
6668
<subtask_execution>
67-
<note>Subtask executes independently.</note>
69+
<note>Subtask executes independently with todo tracking.</note>
6870
<actions>
69-
<action>Fetch PR #1234, get linked issue #987.</action>
70-
<action>Analyze, categorize as Bug Fix.</action>
71-
<action>Write findings to temp_pr_analysis.md.</action>
72-
<action>Report completion.</action>
71+
<action>Create initial todo list:
72+
<tool_use><![CDATA[
73+
<update_todo_list>
74+
<todos>
75+
[ ] Fetch PR details with github.get_pull_request
76+
[ ] Extract linked issues from PR description
77+
[ ] Get details for each linked issue
78+
[ ] Analyze and categorize the change
79+
[ ] Write findings to temp_pr_analysis.md
80+
[ ] Complete subtask
81+
</todos>
82+
</update_todo_list>
83+
]]></tool_use>
84+
</action>
85+
<action>Fetch PR #1234, get linked issue #987, update todos:
86+
<tool_use><![CDATA[
87+
<update_todo_list>
88+
<todos>
89+
[x] Fetch PR details with github.get_pull_request
90+
[x] Extract linked issues from PR description
91+
[-] Get details for each linked issue
92+
[ ] Analyze and categorize the change
93+
[ ] Write findings to temp_pr_analysis.md
94+
[ ] Complete subtask
95+
</todos>
96+
</update_todo_list>
97+
]]></tool_use>
98+
</action>
99+
<action>Complete analysis and write findings:
100+
<tool_use><![CDATA[
101+
<update_todo_list>
102+
<todos>
103+
[x] Fetch PR details with github.get_pull_request
104+
[x] Extract linked issues from PR description
105+
[x] Get details for each linked issue
106+
[x] Analyze and categorize the change
107+
[x] Write findings to temp_pr_analysis.md
108+
[x] Complete subtask
109+
</todos>
110+
</update_todo_list>
111+
]]></tool_use>
112+
</action>
73113
</actions>
74114
</subtask_execution>
75115
<result>Subtask completed, findings written to temp_pr_analysis.md.</result>

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

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,33 +32,39 @@
3232

3333
<steps>
3434
<step number="1">
35-
<action>Extract PR number from message.</action>
35+
<action>Extract PR number from message and create todo list.</action>
36+
<tool>update_todo_list</tool>
37+
<details>Initialize tracking for the PR investigation steps.</details>
3638
</step>
3739

3840
<step number="2">
3941
<action>Fetch PR details.</action>
40-
<tool>github.get_pull_request</tool>
42+
<tool>gh pr view</tool>
4143
<extract>Title, author, description, merge date.</extract>
44+
<todo_update>Mark "Fetch PR details" as complete.</todo_update>
4245
</step>
4346

4447
<step number="3">
4548
<action>Extract linked issues from PR description.</action>
4649
<process>Search for patterns like "Fixes #123".</process>
50+
<todo_update>Mark "Extract linked issues" as complete.</todo_update>
4751
</step>
4852

4953
<step number="4">
5054
<action>Fetch issue details.</action>
51-
<tool>github.get_issue</tool>
55+
<tool>gh issue view</tool>
5256
<details>For each linked issue, get title and reporter.</details>
57+
<todo_update>Mark "Get details for each linked issue" as complete.</todo_update>
5358
</step>
5459

5560
<step number="5">
5661
<action>Analyze and categorize the change.</action>
5762
<categories>Bug Fix, Feature, QOL Improvement, Provider Update, Performance.</categories>
63+
<todo_update>Mark "Analyze and categorize the change" as complete.</todo_update>
5864
</step>
5965

6066
<step number="6">
61-
<action>Write findings to temp file.</action>
67+
<action>Append findings to temp file.</action>
6268
<tool>insert_content (line 0)</tool>
6369
<format><![CDATA[
6470
## PR #[number]: [Title]
@@ -72,12 +78,15 @@
7278
---
7379
]]></format>
7480
<file>temp_pr_analysis.md</file>
81+
<todo_update>Mark "Append findings to temp_pr_analysis.md" as complete.</todo_update>
7582
</step>
7683

7784
<step number="7">
78-
<action>Report completion.</action>
79-
<tool>attempt_completion</tool>
80-
<message>Investigated PR #[number], findings documented in temp_pr_analysis.md.</message>
85+
<action>Write completion summary to temp file.</action>
86+
<tool>write_to_file</tool>
87+
<file>temp_subtask_complete.md</file>
88+
<content>Investigated PR #[number], findings documented in temp_pr_analysis.md.</content>
89+
<todo_update>Mark "Complete subtask" as complete.</todo_update>
8190
</step>
8291
</steps>
8392
</pr_investigation_workflow>
@@ -121,8 +130,17 @@ This release includes N other fixes... Thanks to contributors: [list]
121130
</step>
122131

123132
<step number="6">
124-
<action>Present Discord-formatted content.</action>
125-
<tool>attempt_completion</tool>
133+
<action>Write Discord-formatted content to temp file.</action>
134+
<tool>write_to_file</tool>
135+
<file>temp_discord_release_notes.md</file>
136+
<details>Write the complete Discord-formatted release notes to the temp file.</details>
137+
</step>
138+
139+
<step number="7">
140+
<action>Write completion summary to temp file.</action>
141+
<tool>write_to_file</tool>
142+
<file>temp_subtask_complete.md</file>
143+
<content>Discord-formatted release notes for version [version] written to temp_discord_release_notes.md.</content>
126144
</step>
127145
</steps>
128146
</discord_formatting_workflow>

0 commit comments

Comments
 (0)