Skip to content

Commit 1128146

Browse files
committed
feat: implement Discord release notes generation with version handling and formatting
1 parent c4e29dc commit 1128146

File tree

1 file changed

+199
-0
lines changed

1 file changed

+199
-0
lines changed
Lines changed: 199 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,199 @@
1+
---
2+
description: Generate Discord-formatted release notes from existing release files
3+
argument-hint: <version(s)> [compress]
4+
---
5+
6+
<task>
7+
Generate Discord-formatted release notes from existing Roo Code release documentation
8+
</task>
9+
10+
<context>
11+
Discord has specific formatting requirements and character limits. Release notes need to be
12+
transformed from the documentation format to be suitable for Discord announcements while
13+
maintaining clarity and highlighting key features.
14+
</context>
15+
16+
<requirements>
17+
<input_handling>
18+
- Accept single version: "3.20.3" or "v3.20.3"
19+
- Accept multiple versions: "3.20.3, 3.20.4"
20+
- Support optional compression flag for long notes
21+
- Validate that release files exist before processing
22+
</input_handling>
23+
24+
<transformations>
25+
<remove_elements>
26+
- All PR links and numbers (e.g., ([#1234](link)) becomes empty)
27+
- GitHub-specific formatting
28+
- Frontmatter sections
29+
</remove_elements>
30+
31+
<convert_links>
32+
- Internal docs: [text](/path) → [text](https://docs.roocode.com/path)
33+
- Preserve external links as-is
34+
- Ensure all links are absolute
35+
</convert_links>
36+
37+
<preserve_elements>
38+
- Section structure and headings
39+
- Contributor acknowledgments (thanks username!)
40+
- Feature descriptions and benefits
41+
- Bullet point formatting
42+
</preserve_elements>
43+
</transformations>
44+
45+
<output_format>
46+
<single_version>
47+
- Include version and date in title
48+
- Maintain original section order
49+
- Add footer: [Full X.Y.Z Release Notes](https://docs.roocode.com/update-notes/vX.Y.Z)
50+
</single_version>
51+
52+
<multiple_versions>
53+
- Separate sections per version with clear headers
54+
- Option to combine by category with version indicators
55+
- Include footer links for each version
56+
</multiple_versions>
57+
58+
<compression optional="true">
59+
- When character count exceeds 1800 (leaving buffer for Discord's 2000 limit)
60+
- Compress smaller sections into summary format
61+
- Keep major features expanded
62+
- Format: "## :wrench: [Other Improvements and Fixes](link)"
63+
- List contributor count and affected areas
64+
</compression>
65+
</output_format>
66+
</requirements>
67+
68+
<workflow>
69+
<step number="1">
70+
<action>Parse version input</action>
71+
<details>
72+
- Extract version numbers (with or without 'v' prefix)
73+
- Detect compression flag if present
74+
- Handle comma-separated lists for multiple versions
75+
</details>
76+
</step>
77+
78+
<step number="2">
79+
<action>Verify release files exist</action>
80+
<details>
81+
- Check docs/update-notes/vX.Y.Z.mdx for each version
82+
- If missing, offer to process only existing versions
83+
- Provide clear error message for missing files
84+
</details>
85+
</step>
86+
87+
<step number="3">
88+
<action>Read and transform content</action>
89+
<details>
90+
- Load release notes content
91+
- Apply all transformations listed in requirements
92+
- Preserve markdown formatting for Discord
93+
- Calculate character count for compression decisions
94+
</details>
95+
</step>
96+
97+
<step number="4">
98+
<action>Format for Discord</action>
99+
<details>
100+
- Apply Discord-friendly formatting
101+
- Use emoji for visual appeal where appropriate
102+
- Ensure proper spacing between sections
103+
- Add version indicators for multi-version output
104+
</details>
105+
</step>
106+
107+
<step number="5">
108+
<action>Handle character limits</action>
109+
<details>
110+
- Check total character count
111+
- If over 1800 chars and compression requested, apply compression
112+
- If over 2000 chars without compression, warn user
113+
- Suggest splitting into multiple messages if needed
114+
</details>
115+
</step>
116+
117+
<step number="6">
118+
<action>Output formatted text</action>
119+
<details>
120+
- Display the formatted announcement
121+
- Do NOT create any files
122+
- Provide copy-ready text block
123+
- Include character count information
124+
</details>
125+
</step>
126+
</workflow>
127+
128+
<examples>
129+
<example name="single_version">
130+
<input>/discord-release-notes 3.20.3</input>
131+
<output_preview>
132+
# Roo Code 3.20.3 Release Notes (2024-01-15)
133+
134+
This release adds context condensing, improves performance, and fixes UI bugs.
135+
136+
## Context Condensing is Now Default
137+
138+
We've made context condensing the default behavior (thanks contributor!):
139+
140+
- **Automatic optimization**: Reduces token usage by up to 40%
141+
- **Smart selection**: Preserves relevant context
142+
- **Configurable**: Adjust settings via preferences
143+
144+
This significantly improves response times for large codebases.
145+
146+
## Bug Fixes
147+
148+
* **File handling**: Fixed errors with special characters (thanks user1!)
149+
* **Terminal output**: Resolved streaming issues (thanks user2!)
150+
151+
[Full 3.20.3 Release Notes](https://docs.roocode.com/update-notes/v3.20.3)
152+
</output_preview>
153+
</example>
154+
155+
<example name="multiple_versions_compressed">
156+
<input>/discord-release-notes 3.20.3, 3.20.4 compress</input>
157+
<output_preview>
158+
# Roo Code Updates: v3.20.3 & v3.20.4
159+
160+
## v3.20.3 - Context Condensing (2024-01-15)
161+
162+
Major feature: Context condensing is now default, reducing token usage by up to 40% (thanks contributor!)
163+
164+
## v3.20.4 - Performance Boost (2024-01-18)
165+
166+
Key improvements: 2x faster file operations and improved memory usage (thanks dev-team!)
167+
168+
## :wrench: Other Improvements and Fixes
169+
170+
Both releases include 15+ bug fixes and QOL improvements. Thanks to all 12 contributors!
171+
172+
Release Notes: [v3.20.3](https://docs.roocode.com/update-notes/v3.20.3) | [v3.20.4](https://docs.roocode.com/update-notes/v3.20.4)
173+
</output_preview>
174+
</example>
175+
</examples>
176+
177+
<error_handling>
178+
<scenario type="missing_file">
179+
<message>Release notes for version X.Y.Z not found. Would you like to:
180+
1. Process only existing versions
181+
2. Create release notes first
182+
3. Cancel</message>
183+
</scenario>
184+
185+
<scenario type="character_limit">
186+
<message>Warning: Output exceeds Discord's 2000 character limit (current: [count]).
187+
Consider using 'compress' flag or splitting into multiple messages.</message>
188+
</scenario>
189+
190+
<scenario type="invalid_version">
191+
<message>Invalid version format. Please use: X.Y.Z or vX.Y.Z</message>
192+
</scenario>
193+
</error_handling>
194+
195+
<output_instructions>
196+
Present the Discord-formatted text in a code block for easy copying.
197+
Include metadata: character count, versions processed, compression status.
198+
Never create files - only display formatted output.
199+
</output_instructions>

0 commit comments

Comments
 (0)