Copilot instructions
.github/copilot-instructions.mdCopilot instructions
Quality
89/100
Scores the file, not the repository.Length
792 words
25 headings · 6 code blocksRepository
9.7k
— · pushed 2 days agoLast changed
2 days ago
First indexed 2 days ago.1# Active Admin - GitHub Copilot Instructions23## Project Overview45Active Admin is a Ruby on Rails framework for creating elegant backends for website administration. It provides a DSL for developers to quickly create good-looking administration interfaces.67## Technology Stack89- **Backend**: Ruby on Rails (currently Rails ~> 8.1.0)10- **Frontend**: JavaScript (ES6+), Tailwind CSS, Flowbite11- **Testing**: RSpec (unit tests), Cucumber (feature tests), Capybara (integration tests)12- **Build Tools**: Rollup (JavaScript bundling), cssbundling-rails13- **Key Dependencies**: Devise (authentication), Ransack (search), Formtastic (forms), Kaminari (pagination)1415## Ruby Conventions1617- Minimum Ruby version: 3.3+ (required)18- Minimum Rails version: 7.2+ (required by gemspec)19- Current development uses Rails ~> 8.1.020- Follow RuboCop style guide (configuration in `.rubocop.yml`)21- RuboCop plugins enabled: capybara, packaging, performance, rails, rspec22- Use frozen string literals: `# frozen_string_literal: true` at the top of Ruby files2324## JavaScript Conventions2526- Use ES6+ modern JavaScript syntax27- Follow ESLint configuration (see `eslint.config.js`)28- JavaScript source files are in `app/javascript/`29- Build JavaScript with: `npm run build`30- Lint JavaScript with: `npm run lint`3132## Testing Guidelines3334### Ruby Tests (RSpec)35- Unit tests are in `spec/unit/`36- Request specs are in `spec/requests/`37- Helper specs are in `spec/helpers/`38- Run RSpec tests: `bundle exec rspec`3940### Feature Tests (Cucumber)41- Cucumber features are in `features/`42- Uses Capybara with Cuprite (headless Chrome)43- Cucumber scenarios require Chrome to be installed44- Run Cucumber tests: `bundle exec cucumber`45- Lint Gherkin files: `npm run gherkin-lint`4647### Running All Tests48- Run the complete test suite: `bin/rake`49- Tests run against a sample Rails app generated in `tmp/test_apps/`5051## Building and Development5253### Setup54```bash55bundle install56yarn install57```5859Note: The `bin/rake local server` command requires foreman, which it will invoke automatically. Install with `gem install foreman` if needed.6061### Testing Against Different Rails Versions62```bash63# Available versions: rails_72, rails_8064export BUNDLE_GEMFILE=gemfiles/rails_72/Gemfile65```6667### Local Development Server68```bash69bin/rake local server70# Visit http://localhost:3000/admin71# Login: admin@example.com / password72```7374### Other Local Commands75```bash76bin/rake local console # Rails console77bin/rake local db:migrate # Run migrations78```7980## Code Organization8182- `lib/active_admin/` - Core framework code83- `app/` - Rails application components (controllers, helpers, views, assets)84- `spec/` - RSpec tests85- `features/` - Cucumber feature tests86- `docs/` - VitePress documentation (run with `npm run docs:dev`)8788## Important Guidelines89901. **Minimal Changes**: Make surgical, precise changes. Don't refactor unrelated code.912. **Backward Compatibility**: Active Admin is a widely-used gem. Maintain backward compatibility unless explicitly breaking changes are intended.923. **Test Coverage**: Include tests for new features. Prefer RSpec specs (especially request specs) over Cucumber features when possible, as specs are easier to work with and maintain.934. **Documentation**: Update documentation in `docs/` if adding user-facing features.945. **Internationalization**: Support i18n - translation files are in `config/locales/`956. **Security**: This is an administration framework so be extra cautious with security implications.967. **Code Quality**: Always run ALL relevant linters before submitting any PR to ensure code follows project style guidelines:97 - Ruby code: `bundle exec rubocop`98 - JavaScript code: `npm run lint`99 - Gherkin files: `npm run gherkin-lint`100 - Run these linters BEFORE requesting code review or submitting the PR.101102## Contributing Workflow1031041. Create feature request discussion before starting significant new features1052. Fork and create a descriptive branch1063. Ensure tests pass: `bin/rake`1074. **Run ALL linters BEFORE submitting PR**:108 - Ruby code: `bundle exec rubocop`109 - JavaScript code: `npm run lint`110 - Gherkin files: `npm run gherkin-lint`1115. View changes in browser: `bin/rake local server`1126. Submit pull request with passing CI113114## Commit Message Guidelines115116Follow the project's commit message standards as outlined in [CONTRIBUTING.md](../CONTRIBUTING.md):117118### Format Requirements119- **Reference**: Follow [How to Write a Git Commit Message](https://cbea.ms/git-commit/#seven-rules)120- **Format**: Use imperative mood ("Add feature" not "Added feature")121- **Length**: Limit subject line to 50 characters, body lines to 72 characters122- **Structure**:123```124 Short summary (50 chars max)125126 Detailed explanation if needed (72 chars per line)127128 - Use bullet points for multiple changes129 - Reference issues with "Fixes #123" or "Closes #456"130```131132### Commit Message Examples133```134Fix temporal query performance regression135136Add support for Rails 8.0 compatibility137138Update dependencies for security patches139140Fixes #123141```142143### Best Practices144- Keep commits atomic (one logical change per commit)145- Write clear, descriptive commit messages146- Reference related issues and pull requests147- Avoid generic messages like "Fix bug" or "Update code"148149## Additional Context150151- This is both a Ruby gem and an npm package152- Published to RubyGems as `activeadmin`153- Published to npm as `@activeadmin/activeadmin`154- The project uses both Ruby and JavaScript tooling155- CI runs tests against multiple Rails versions156- Code coverage tracked with SimpleCov and CodeCov157
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| louislam/uptime-kuma.github/copilot-instructions.md · 90k | Copilot instructions | setupbuildtestlint-format+9 | 100/100 | 3 days ago | |
| chihebnabil/lovable-boilerplate.github/instructions/global.instructions.md · 63 | Copilot instructions | buildlint-formatstylearch+4 | 100/100 | 3 days ago | |
| JCodesMore/ai-website-cloner-template.github/copilot-instructions.md · 31k | Copilot instructions | buildlint-formatstylearch+3 | 97/100 | 2 days ago | |
| darkmatter/nixmac.github/copilot-instructions.md · 24 | Copilot instructions | setupbuildtestlint-format+8 | 96/100 | 3 days ago | |
| nerolis-lab/nerolis-lab.github/copilot-instructions.md · 32 | Copilot instructions | setupbuildtestlint-format+11 | 96/100 | 3 days ago | |
| thangaram611/second-brain.github/copilot-instructions.md · 0 | Copilot instructions | setupteststylearch+4 | 96/100 | 3 days ago | |
| keycloak/keycloak.github/copilot-instructions.md · 36k | Copilot instructions | setupbuildtestlint-format+6 | 93/100 | 3 days ago | |
| jnPiyush/AgentX.github/instructions/typescript.instructions.md · 14 | Copilot instructions | setuptestlint-formatstyle+5 | 92/100 | 3 days ago |
