Skip to content

Commit 8ccaa57

Browse files
CopilotdoublegateCopilot
authored
Configure Copilot instructions per best practices (#63)
* Initial plan * docs: enhance Copilot instructions with best practices Co-authored-by: doublegate <6858123+doublegate@users.noreply.github.com> * Update .github/copilot-instructions.md Removed bullet point to avoid redundancy, as the existing rule in the Critical Rules section already covers “Zero Placeholder Code” rule — DG 1/10 Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: doublegate <6858123+doublegate@users.noreply.github.com> Co-authored-by: DoubleGate <parobek@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 8e06121 commit 8ccaa57

File tree

1 file changed

+84
-0
lines changed

1 file changed

+84
-0
lines changed

.github/copilot-instructions.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# GitHub Copilot Instructions for RustIRC
22

3+
> **Purpose**: This file provides context and guidelines for GitHub Copilot when working on this repository. It helps Copilot understand project conventions, standards, and best practices that cannot be inferred from code alone.
4+
35
## Project Overview
46

57
RustIRC is a modern IRC client built in Rust that combines the best features from established IRC clients (mIRC, HexChat, WeeChat). The project prioritizes full IRC protocol compliance (RFC 1459/2812, IRCv3), cross-platform support (Windows, macOS, Linux), and provides multiple interface modes (GUI with Iced 0.13.1, TUI with ratatui, CLI).
@@ -177,3 +179,85 @@ When in doubt, prioritize:
177179
3. Cross-platform compatibility
178180
4. Protocol compliance
179181
5. Code quality and documentation
182+
183+
## Working with Issues and Pull Requests
184+
185+
### Issue Assignment Guidelines
186+
- When assigned an issue, read it completely along with all comments
187+
- Check for related issues or PRs that provide additional context
188+
- Ask clarifying questions if the requirements are ambiguous
189+
- Break down large tasks into smaller, manageable steps
190+
- Report progress regularly using commit messages and PR updates
191+
192+
### Pull Request Guidelines
193+
- Create focused PRs that address a single issue or feature
194+
- Write clear commit messages following Conventional Commits format
195+
- Include tests for new functionality or bug fixes
196+
- Update documentation to reflect code changes
197+
- Request review when ready, highlighting areas needing particular attention
198+
- Respond to review feedback promptly and professionally
199+
200+
### When to Ask for Clarification
201+
- Requirements are unclear or contradictory
202+
- You encounter architectural decisions that affect multiple components
203+
- You need access to external resources or credentials
204+
- You discover security vulnerabilities that need immediate attention
205+
- You find that the requested change would break existing functionality
206+
207+
## Boundaries and Constraints
208+
209+
### What NOT to Do
210+
- **Never** commit secrets, credentials, or sensitive data to the repository
211+
- **Never** remove or disable tests to make builds pass
212+
- **Never** introduce known security vulnerabilities
213+
- **Never** make breaking changes without explicit approval
214+
- **Never** modify `.github/workflows/` files without thorough testing
215+
- **Never** add dependencies without checking for security advisories
216+
- **Never** disable clippy warnings without addressing the underlying issue
217+
218+
### Safe Operations
219+
- Add new features in isolated modules
220+
- Fix bugs with accompanying regression tests
221+
- Refactor code while maintaining existing tests
222+
- Update documentation and examples
223+
- Add missing error handling
224+
- Improve type safety
225+
- Optimize performance with benchmarks
226+
227+
## Common Task Examples
228+
229+
### Adding a New IRC Command
230+
1. Define the command in `rustirc_protocol::Command`
231+
2. Implement parsing in the protocol layer
232+
3. Add handler in the core engine
233+
4. Update GUI/TUI/CLI interfaces to expose the command
234+
5. Add tests for parsing and execution
235+
6. Update user documentation with command usage
236+
237+
### Fixing a GUI Issue
238+
1. Reproduce the issue in GUI mode (`cargo run`)
239+
2. Identify the affected component in `rustirc-gui/`
240+
3. Check Iced 0.13.1 API patterns in existing code
241+
4. Implement the fix following Material Design 3 patterns
242+
5. Test across different window sizes and themes
243+
6. Verify no regressions with `cargo test`
244+
245+
### Adding a Lua Script Example
246+
1. Create script in `scripts/` directory
247+
2. Document the script purpose and API usage
248+
3. Ensure security best practices (no sensitive data)
249+
4. Test with `rustirc-scripting` test harness
250+
5. Add to `scripts/README.md` with usage examples
251+
252+
## Quality Assurance Checklist
253+
254+
Before marking work as complete, verify:
255+
- [ ] Code compiles without errors on all platforms
256+
- [ ] All tests pass (`cargo test --workspace --lib --bins`)
257+
- [ ] Code is formatted (`cargo fmt --check`)
258+
- [ ] No clippy warnings (`cargo clippy -- -D warnings`)
259+
- [ ] Documentation is updated
260+
- [ ] CHANGELOG.md is updated for user-facing changes
261+
- [ ] No secrets or sensitive data in commits
262+
- [ ] Cross-platform compatibility verified
263+
- [ ] Security implications considered

0 commit comments

Comments
 (0)