Skip to content

Add Copilot instructions for repository conventions#290

Draft
Copilot wants to merge 7 commits intomainfrom
copilot/setup-copilot-instructions
Draft

Add Copilot instructions for repository conventions#290
Copilot wants to merge 7 commits intomainfrom
copilot/setup-copilot-instructions

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 11, 2026

Adds .github/copilot-instructions.md to configure GitHub Copilot with project-specific context and conventions.

Contents

  • Modernization status: Prominent section documenting ongoing refactoring to dry-system, rom-rb, and modern Discord features
  • Target architecture: Migration to dry-system for dependency injection, rom-rb for database, slash commands and components v2
  • Modernization goals: Reduce global state, improve error handling, define interfaces, clean architecture with FP influences
  • Design philosophy: Functional programming principles, minimal state, clear interfaces, elegant expressiveness
  • Architecture: discordrb-based Discord bot with modular command structure, ActiveRecord/SQLite persistence (marked as legacy)
  • Ruby conventions: Frozen string literals, RuboCop config (80 char lines, semantic blocks), Ruby 3.2+ idioms (numbered params, endless methods, argument forwarding)
  • Module patterns: Discordrb::Commands::CommandContainer extension (legacy), guidance toward slash commands and modern interactions
  • Database patterns: Current ActiveRecord patterns (legacy) and future rom-rb patterns
  • i18n requirements: All user-facing strings through t() helper with entries in share/locales/en.yml
  • Development workflow: Bot CLI commands, Nix flake integration, dependency management with bundix
  • Security: ActiveRecord parameterization, Rails::Html::FullSanitizer for HTML in wiki content

Example patterns documented

# Numbered block parameters
roles = records.pluck(:role_id).map { event.server.role(_1) }

# Endless method definitions  
def self.hex_code?(string) = string.match?(/^#?[[:xdigit:]]{6}$/)

# Argument forwarding
def find_by_abbrev(...); super; end

All examples extracted from actual codebase usage.

Key Guidance

The instructions clearly mark legacy patterns and direct contributors to prefer modern approaches when they conflict with existing conventions. Legacy patterns should only be preserved when they represent genuinely good design choices.

Original prompt

This section details on the original issue you should resolve

<issue_title>✨ Set up Copilot instructions</issue_title>
<issue_description>Configure instructions for this repository as documented in Best practices for Copilot coding agent in your repository.

</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 5 commits February 11, 2026 21:06
Co-authored-by: anna328p <9790772+anna328p@users.noreply.github.com>
Co-authored-by: anna328p <9790772+anna328p@users.noreply.github.com>
Co-authored-by: anna328p <9790772+anna328p@users.noreply.github.com>
Co-authored-by: anna328p <9790772+anna328p@users.noreply.github.com>
Co-authored-by: anna328p <9790772+anna328p@users.noreply.github.com>
Copilot AI changed the title [WIP] Set up Copilot instructions for the repository Add Copilot instructions for repository conventions Feb 11, 2026
Copilot AI requested a review from anna328p February 11, 2026 21:10
Copy link
Copy Markdown
Collaborator

@anna328p anna328p left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add notes that the project is undergoing modernization and refactoring.

  • new architecture: dry-system, rom-rb, etc.
  • new Discord features: slash commands, components v2 in favor of embeds, etc.
  • general refactors: rewrite modules to reduce and centralize global state; improve error handling; document and define interfaces; follow general best practices for modern, clean architecture, while maintaining elegant code with a distinct, personal style, with FP influences.

The current choices should only be preserved in the cases where they're good.

…tures

Co-authored-by: anna328p <9790772+anna328p@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Feb 11, 2026

Please add notes that the project is undergoing modernization and refactoring.

  • new architecture: dry-system, rom-rb, etc....

Added modernization notes in commit 8bd7a24. The instructions now include:

  • Prominent warning section about ongoing modernization
  • Target architecture: dry-system for DI, rom-rb for data access, Discord slash commands & components v2
  • Modernization goals: reduced global state, improved error handling, defined interfaces, clean architecture
  • Design philosophy section emphasizing FP influences and elegant code style
  • Legacy markers on current patterns with guidance to prefer modern approaches
  • Clear directive to prioritize modern patterns over legacy conventions when they conflict

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

✨ Set up Copilot instructions

2 participants