Skip to content

Commit 0ad8e78

Browse files
chore: update release notes workflow and documentation for v3.26.5 (#329)
1 parent bb2e39e commit 0ad8e78

File tree

9 files changed

+297
-19
lines changed

9 files changed

+297
-19
lines changed

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

Lines changed: 198 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@
4141
<incorrect>2025-18-07 (Invalid - would mean 18th month)</incorrect>
4242
</examples>
4343
<implementation>
44-
When PR list provided directly: Use new Date().toISOString().split('T')[0]
44+
When PR list provided directly: Use new Date().toISOString().split('T')[0] (UTC)
45+
Note: toISOString returns UTC; do not convert to local time to avoid off-by-one day differences.
4546
</implementation>
4647
</critical_date_format>
4748

@@ -87,6 +88,9 @@
8788
<action>Fetch PRs from GitHub</action>
8889
<skip_if>User provided PR list</skip_if>
8990
<commands>
91+
<get_release_published_date><![CDATA[
92+
gh release view vX.Y.Z --repo RooCodeInc/Roo-Code --json publishedAt | jq -r '.publishedAt'
93+
]]></get_release_published_date>
9094
<get_tag_date><![CDATA[
9195
gh api repos/RooCodeInc/Roo-Code/git/refs/tags/vX.Y.Z --jq '.object.sha' | xargs -I {} gh api repos/RooCodeInc/Roo-Code/git/commits/{} --jq '.committer.date'
9296
]]></get_tag_date>
@@ -99,10 +103,11 @@ gh pr list --repo RooCodeInc/Roo-Code --state merged --search "merged:YYYY-MM-DD
99103

100104
<phase name="pr_processing">
101105
<initialization priority="CRITICAL">
102-
<action>Create temp_pr_analysis.md</action>
106+
<action>Create .roo/tmp/release-notes/temp_pr_analysis.md</action>
103107
<details>
104-
Parent task MUST create this file before ANY subtasks.
108+
Parent task MUST create this file (and .roo/tmp/release-notes/temp_pr_inclusion.json, .roo/tmp/release-notes/temp_pr_list.md if needed) before ANY subtasks.
105109
Subtasks will ONLY append using insert_content.
110+
Temp files live under .roo/tmp/release-notes/
106111
</details>
107112
</initialization>
108113

@@ -128,7 +133,7 @@ Investigate PR #[number] for release notes v[version].
128133
3. Get issue details
129134
4. Categorize change
130135
5. Identify documentation needs (new features, behavior changes, deprecations)
131-
6. Append to temp_pr_analysis.md using insert_content line 0
136+
6. Append to .roo/tmp/release-notes/temp_pr_analysis.md using insert_content line 0
132137
133138
Include documentation flags:
134139
- docs-new: Completely new feature
@@ -144,7 +149,7 @@ CRITICAL: Never create/overwrite files, only append.
144149
[ ] Get issue details for each linked issue
145150
[ ] Categorize the change (Feature/QOL/Bug Fix/Provider Update)
146151
[ ] Identify documentation needs
147-
[ ] Write analysis to temp_pr_analysis.md
152+
[ ] Write analysis to .roo/tmp/release-notes/temp_pr_analysis.md
148153
]]></todos_template>
149154
</subtask_pattern>
150155

@@ -175,7 +180,7 @@ CRITICAL: Never create/overwrite files, only append.
175180
3. Get issue details
176181
4. Categorize change
177182
5. Identify documentation needs (new features, behavior changes, deprecations)
178-
6. Append to temp_pr_analysis.md using insert_content line 0
183+
6. Append to .roo/tmp/release-notes/temp_pr_analysis.md using insert_content line 0
179184
180185
Include documentation flags:
181186
- docs-new: Completely new feature
@@ -190,7 +195,7 @@ CRITICAL: Never create/overwrite files, only append.</message>
190195
[ ] Get issue details for each linked issue
191196
[ ] Categorize the change (Feature/QOL/Bug Fix/Provider Update)
192197
[ ] Identify documentation needs
193-
[ ] Write analysis to temp_pr_analysis.md
198+
[ ] Write analysis to .roo/tmp/release-notes/temp_pr_analysis.md
194199
</todos>
195200
</new_task>
196201
@@ -204,10 +209,161 @@ CRITICAL: Never create/overwrite files, only append.</message>
204209
</critical_notes>
205210
</subtask_creation_example>
206211
</phase>
212+
213+
<phase name="changelog_alignment">
214+
<description>Align the working PR set with the repository changelog for the selected version(s)</description>
215+
<step number="1">
216+
<action>Fetch changelog content for v[VERSION] (Release body first, then CHANGELOG.md at tag, then PR scan as last resort)</action>
217+
<commands>
218+
<strategy priority="1"><![CDATA[
219+
gh release view vX.Y.Z --repo RooCodeInc/Roo-Code --json body | jq -r '.body'
220+
]]></strategy>
221+
<strategy priority="2"><![CDATA[
222+
# Fallback to CHANGELOG at the tag commit
223+
gh api repos/RooCodeInc/Roo-Code/contents/CHANGELOG.md?ref=vX.Y.Z --jq '.content' | base64 -d
224+
]]></strategy>
225+
<strategy priority="3"><![CDATA[
226+
# Fallback to main branch CHANGELOG if tag content unavailable
227+
gh api repos/RooCodeInc/Roo-Code/contents/CHANGELOG.md --jq '.content' | base64 -d
228+
]]></strategy>
229+
<strategy priority="4"><![CDATA[
230+
# Last resort: scan merged PRs in the version window for ones that modified CHANGELOG.md
231+
# Requires YYYY-MM-DD..YYYY-MM-DD boundaries computed earlier
232+
gh pr list --repo RooCodeInc/Roo-Code --state merged --search "merged:YYYY-MM-DD..YYYY-MM-DD" --json number --limit 1000 \
233+
| jq '.[].number' \
234+
| xargs -I {} gh pr view {} --json files \
235+
| jq -r 'select(.files[].path=="CHANGELOG.md") | .number'
236+
]]></strategy>
237+
</commands>
238+
<dependency_note>Use the first non-empty result as changelog_source. Prefer the Release body; only fall back to file or PR scan if empty or unavailable.</dependency_note>
239+
<critical>Do not attempt to locate a "changelog PR" when a Release body or CHANGELOG.md content is available.</critical>
240+
</step>
241+
242+
<step number="2">
243+
<action>Extract version section lines from changelog_source</action>
244+
<details>
245+
If using Release body: treat the entire body as the v[VERSION] section.
246+
If using CHANGELOG.md: isolate the v[VERSION] section by heading match:
247+
- Headings commonly appear as "## vX.Y.Z", "## X.Y.Z", or "## [X.Y.Z]".
248+
</details>
249+
<parsing>
250+
<regex>Detect PR references as: /#(\d{1,7})/g</regex>
251+
<heuristics>
252+
- If a bullet has no explicit PR number, attempt fuzzy matching to PR titles
253+
- If ambiguous, mark as "unlinked" and exclude by default pending user choice
254+
</heuristics>
255+
</parsing>
256+
</step>
257+
258+
<step number="2a">
259+
<action>Supplement candidate PR set with changelog-referenced PRs not in fetched list and spawn analysis subtasks</action>
260+
<details>
261+
- Identify referenced PR numbers from step 2 that are missing from .roo/tmp/release-notes/temp_pr_analysis.md
262+
- For each missing PR, fetch details and create a new investigation subtask (same pattern as pr_processing) to append analysis to temp_pr_analysis.md
263+
- Mark these as out_of_range if their mergedAt is outside the computed date window
264+
- Wait for all spawned subtasks to complete before proceeding
265+
</details>
266+
<commands>
267+
<fetch><![CDATA[
268+
# For each referenced PR number N not present in .roo/tmp/release-notes/temp_pr_analysis.md:
269+
gh pr view N --repo RooCodeInc/Roo-Code --json number,title,author,mergedAt,labels,files
270+
]]></fetch>
271+
<spawn_subtask><![CDATA[
272+
<new_task>
273+
<mode>release-notes-writer</mode>
274+
<message>Investigate PR #[NUMBER] (changelog-referenced, possibly out of original range) for release notes v[version]. Follow standard analysis and append to .roo/tmp/release-notes/temp_pr_analysis.md.</message>
275+
<todos>
276+
[ ] Fetch PR #[NUMBER] details using gh pr view
277+
[ ] Extract linked issues from PR body
278+
[ ] Get issue details for each linked issue
279+
[ ] Categorize the change (Feature/QOL/Bug Fix/Provider Update)
280+
[ ] Identify documentation needs
281+
[ ] Write analysis to .roo/tmp/release-notes/temp_pr_analysis.md
282+
</todos>
283+
</new_task>
284+
]]></spawn_subtask>
285+
</step>
286+
287+
<step number="2b">
288+
<action>Detect out-of-range referenced PRs</action>
289+
<output>
290+
<metric name="out_of_range_count">Number of referenced PRs with mergedAt outside the YYYY-MM-DD..YYYY-MM-DD window</metric>
291+
</output>
292+
</step>
293+
294+
<step number="3">
295+
<action>Partition PRs using changelog</action>
296+
<result>
297+
<in_changelog>PRs explicitly referenced or confidently matched to changelog lines</in_changelog>
298+
<excluded>PRs not referenced or ambiguous</excluded>
299+
</result>
300+
<analysis>
301+
Provide a brief summary:
302+
- Included: [IN_COUNT] PRs
303+
- Excluded: [EX_COUNT] PRs
304+
Possible reasons for exclusion:
305+
- Not mentioned in changelog
306+
- Combined under a meta PR
307+
- Documentation-only or infra work
308+
- Outside computed date window
309+
- Title did not match any changelog line
310+
</analysis>
311+
</step>
312+
313+
<step number="4">
314+
<action>Ask for inclusion policy</action>
315+
<tool>ask_followup_question</tool>
316+
<template><![CDATA[
317+
<ask_followup_question>
318+
<question>Changelog alignment for v[VERSION]: [IN_COUNT] PRs referenced, [EX_COUNT] not referenced. How should I proceed?</question>
319+
<follow_up>
320+
<suggest>Only include the PRs referenced in the changelog</suggest>
321+
<suggest>Include all PRs from the date range</suggest>
322+
<suggest>Review each excluded PR one by one so I can choose</suggest>
323+
</follow_up>
324+
</ask_followup_question>
325+
]]></template>
326+
<critical>Do not proceed until one of the provided options is selected.</critical>
327+
</step>
328+
329+
<step number="5" optional="true">
330+
<when>User selects per-PR review</when>
331+
<action>Iteratively review excluded PRs</action>
332+
<loop>
333+
For each PR in the excluded set:
334+
- Show title, author, brief labels, and a 1–2 sentence user-impact summary
335+
- Ask: include this PR?
336+
- Options: "Yes, include this PR" or "No, skip this PR"
337+
- Build the final inclusion set as (in_changelog ∪ user_selected_inclusions)
338+
</loop>
339+
<template><![CDATA[
340+
<ask_followup_question>
341+
<question>Include PR #[NUMBER] - [TITLE]? Short analysis: [WHY IT MATTERS].</question>
342+
<follow_up>
343+
<suggest>Yes, include this PR</suggest>
344+
<suggest>No, skip this PR</suggest>
345+
</follow_up>
346+
</ask_followup_question>
347+
]]></template>
348+
<completion>After the loop, proceed with the finalized PR set.</completion>
349+
</step>
350+
351+
<handoff>Proceed to feature selection using the finalized PR set. Persist included/excluded lists to .roo/tmp/release-notes/temp_pr_inclusion.json for downstream filtering.</handoff>
352+
</phase>
207353

208354
<phase name="compilation">
209355
<step number="1">
210-
<action>Read and organize PR findings</action>
356+
<action>Read and organize PR findings (filtered to finalized inclusion set)</action>
357+
<inputs>
358+
<file>.roo/tmp/release-notes/temp_pr_analysis.md</file>
359+
<file optional="true">.roo/tmp/release-notes/temp_pr_inclusion.json</file>
360+
</inputs>
361+
<precondition>
362+
If .roo/tmp/release-notes/temp_pr_inclusion.json does not exist, you MUST execute the changelog_alignment phase now to obtain an inclusion decision, then retry this step.
363+
</precondition>
364+
<filtering>
365+
Include only PRs listed in "included" from .roo/tmp/release-notes/temp_pr_inclusion.json. Do not fall back to using all analyzed PRs without an explicit inclusion policy.
366+
</filtering>
211367
<categories>Features, QOL Improvements, Bug Fixes, Provider Updates</categories>
212368
<critical>QOL Improvements MUST come before Bug Fixes</critical>
213369
</step>
@@ -227,12 +383,19 @@ I've analyzed all PRs for v[VERSION]. Here are the changes I found:
227383
228384
Which features should I highlight with expanded sections in the release notes?
229385
]]></template>
230-
<critical>Must get explicit confirmation before writing notes</critical>
386+
<gating>
387+
<rule>Do not proceed until an explicit selection from the provided options is received.</rule>
388+
<rule>On freeform responses, re-ask with reformulated options derived from the user's input until a provided option is chosen.</rule>
389+
</gating>
390+
<critical>Must get explicit confirmation before writing notes; see user_interactions.feature_selection.gating_rules</critical>
231391
</step>
232392

233393
<step number="3">
234394
<action>Create release notes file</action>
235-
<format>docs/update-notes/vX.Y.Z.mdx</format>
395+
<format>
396+
For patch versions (X.Y.Z): docs/update-notes/vX.Y.Z.mdx
397+
For minor/major summaries (X.Y): docs/update-notes/vX.Y.mdx
398+
</format>
236399
</step>
237400

238401
<step number="4">
@@ -256,6 +419,10 @@ Which features should I highlight with expanded sections in the release notes?
256419
<when>If any documentation flags were identified</when>
257420
<tool>new_task with mode="documentation-writer"</tool>
258421
</step>
422+
<step number="7">
423+
<action>Cleanup temporary files</action>
424+
<details>Delete .roo/tmp/release-notes/* (temp_pr_analysis.md, temp_pr_list.md, temp_pr_inclusion.json) after notes are finalized.</details>
425+
</step>
259426
</phase>
260427
</main_workflow>
261428

@@ -265,6 +432,7 @@ Which features should I highlight with expanded sections in the release notes?
265432
<transformations>
266433
- Remove PR links and numbers
267434
- Convert /path to https://docs.roocode.com/path
435+
- Convert "* " list bullets to "• " bullets
268436
- Add footer link with markdown format
269437
- Handle compression if requested
270438
- Wrap entire output in markdown code block
@@ -302,25 +470,41 @@ Which features should I highlight with expanded sections in the release notes?
302470
<workflow name="version_only">
303471
<description>Extract PR list when user provides just a version</description>
304472
<steps>
473+
<step>Ensure parent created .roo/tmp/release-notes/temp_pr_list.md (empty)</step>
305474
<step>Spawn PR extraction subtask using new_task with mode="release-notes-writer"</step>
306-
<step>Subtask writes PR list to temp_pr_list.md</step>
475+
<step>Subtask appends PR list to .roo/tmp/release-notes/temp_pr_list.md using insert_content line 0</step>
307476
<step>Ask user how to proceed</step>
308477
</steps>
309478
<implementation>
310479
<tool>new_task</tool>
311480
<mode>release-notes-writer</mode>
312-
<message>Extract PR list for version [VERSION] and write to temp_pr_list.md</message>
481+
<message>Extract PR list for version [VERSION] and append to .roo/tmp/release-notes/temp_pr_list.md using insert_content line 0</message>
313482
</implementation>
314483
</workflow>
315484

316485
<workflow name="latest">
317486
<description>Auto-detect missing versions</description>
318487
<steps>
319488
<step>Find most recent release notes</step>
320-
<step>Read changelog or GitHub releases</step>
321-
<step>Identify missing versions</step>
489+
<step>List existing docs files in docs/update-notes (vX.Y or vX.Y.Z)</step>
490+
<step>List tags or releases from GitHub</step>
491+
<step>Compute missing versions (tags minus existing docs)</step>
322492
<step>Ask which to process</step>
323493
</steps>
494+
<commands>
495+
<existing_notes><![CDATA[
496+
ls docs/update-notes | grep -E '^v[0-9]+\.[0-9]+(\.[0-9]+)?\.(md|mdx)$' | sed -E 's/\.(md|mdx)$//' | sort -V
497+
]]></existing_notes>
498+
<tags><![CDATA[
499+
gh api -X GET /repos/RooCodeInc/Roo-Code/tags --paginate --jq '.[].name' | grep -E '^v[0-9]+\.[0-9]+(\.[0-9]+)?$' | sort -V
500+
]]></tags>
501+
<releases><![CDATA[
502+
# Alternative:
503+
gh release list --repo RooCodeInc/Roo-Code --limit 200 | awk '{print $1}' | grep -E '^v[0-9]+\.[0-9]+(\.[0-9]+)?$' | sort -V
504+
]]></releases>
505+
<note>Present the set difference (tags/releases not present in docs) as candidates.</note>
506+
</commands>
507+
<handoff>After the user selects versions to process, immediately execute the changelog_alignment phase for each selected version before entering the compilation phase.</handoff>
324508
</workflow>
325509
</special_workflows>
326510

.roo/rules-release-notes-writer/2_content_standards.xml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ Concluding sentence about the benefit.
133133
- Place inside parentheses before PR link
134134
- Include both PR author and issue reporter
135135
- List PR author first
136+
- If PR author equals issue reporter, use a single username once
137+
- Do not thank these names: outlined in the special instructions section `Release Notes "thank you" exclusions`
136138
</rules>
137139
</contributor_acknowledgments>
138140

@@ -162,7 +164,7 @@ Concluding sentence about the benefit.
162164
<format>[X.Y.Z](/update-notes/vX.Y.Z) (YYYY-MM-DD)</format>
163165
<rules>
164166
- List chronologically, newest first
165-
- Use absolute paths from /docs/
167+
- Use absolute paths from site root (no /docs prefix)
166168
- Omit .md extension
167169
- Include release date in ISO 8601 format
168170
</rules>
@@ -224,7 +226,7 @@ Concluding sentence about the benefit.
224226
</documentation_links>
225227

226228
<forbidden_elements>
227-
- "Summary" or "Highlights" sections
229+
- "Summary" or "Highlights" sections in docs/update-notes (Discord announcements may use "Feature Highlights")
228230
- Version numbers in docs outside update-notes
229231
- Temporal references like "as of version X.Y.Z"
230232
- Marketing language or buzzwords
@@ -335,6 +337,9 @@ These releases include 18 improvements across bug fixes, provider updates, QOL e
335337
<from>## Major Features</from>
336338
<to>## ✨ Feature Highlights</to>
337339

340+
<from>* </from>
341+
<to>• </to>
342+
338343
<from>Happy coding! 🦘</from>
339344
<to>(remove entirely)</to>
340345
</transformations>

0 commit comments

Comments
 (0)