This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is a Rails 8.1.0 application called GitHub Team Auditor (GithubTeamAuditor module) built for auditing GitHub teams. The application uses modern Rails features including Solid libraries (Cache, Queue, Cable) and is configured for deployment with Kamal.
bin/ci- Run full CI pipeline (formatting, linting, security scan, tests, coverage)bin/ci --fix- Auto-fix RuboCop and ERB lint issues before running CI checksbin/coverage- Generate detailed test coverage report with line/branch analysisbin/watch-ci- Monitor CI status in real-time during development
bin/rails server- Start development serverbin/rails test- Run test suitebin/rails test:system- Run system testsbin/setup- Initial application setup
rubocop- Ruby style checking (Rails Omakase style)rubocop -A- Auto-fix Ruby style violationsbundle exec reek- Code smell detectionbundle exec erb_lint --lint-all- ERB template lintingbundle exec overcommit --run- Run all pre-commit checks (whitespace, tabs, line endings, final newlines, YAML/JSON syntax, merge conflicts, RuboCop, ErbLint, Reek)bin/rails zeitwerk:check- Verify Rails autoloadingbundle exec bundle-audit check- Check for vulnerable gem versionsbrakeman- Security vulnerability scanning
- Rails 8.1.0 with modern asset pipeline (Propshaft)
- Ruby 4.0.2
- SQLite3 for all environments including production
- ImportMap for JavaScript (no Node.js bundling)
- Hotwire (Turbo + Stimulus) for interactivity
- Solid Libraries: Database-backed cache, queue, and cable
The application uses separate SQLite databases:
- Primary database for application data
cachedatabase for Solid Cachequeuedatabase for Solid Queuecabledatabase for Solid Cable
- Overcommit: Git hook manager enforcing trailing whitespace, hard tabs, line endings, final newlines, YAML/JSON syntax
- EditorConfig: UTF-8, LF line endings, 2-space indentation (enforced by editors natively + overcommit hooks)
- RuboCop: Rails Omakase configuration (DHH's opinionated style)
- ErbLint: ERB template linting (Shopify's erb_lint)
- Reek: Code smell detection for maintainability
- Zeitwerk: Autoloading verification for Rails constants
- bundler-audit: Vulnerability scanning for gem dependencies
- Brakeman: Security scanning for Rails-specific vulnerabilities
- SimpleCov: Test coverage with detailed HTML reports
- NEVER add inline RuboCop disables (
# rubocop:disable,# rubocop:todo). Fix the code or configure the rule in.rubocop.ymlinstead. - NEVER add Reek disables — no inline
:reek:SomeSmellcomments AND no.reek.ymlexclusions. Fix the code instead. - Claude Code lint hooks (
.claude/hooks/) run RuboCop, Reek, and ERB Lint automatically after every file write/edit. Fix all issues the hooks report — do not suppress them.
- Minitest (Rails default) for unit and integration tests
- Capybara + Selenium for system tests
- Axe-core for automated accessibility testing (WCAG 2.1 AA)
- SimpleCov for coverage analysis with branch coverage tracking
- Pre-commit hooks run fast lint/style checks via overcommit (not full CI)
See docs/accessibility.md for detailed accessibility testing guide.
app/- Standard Rails MVC structure (currently minimal)config/application.rb- Main application configurationconfig/database.yml- Multi-database SQLite configurationconfig/deploy.yml- Kamal deployment configuration
bin/ci- Comprehensive CI script with formatting, linting, security, and testingbin/coverage- Advanced coverage reporting with HTML parsingbin/watch-ci- Real-time CI monitoring using GitHub CLI.editorconfig- Code formatting standards
overcommitfor git hook management (pre-commit lint checks)rubocopconfigured with Rails Omakaseerb_lintfor ERB template lintingbrakemanfor security scanning.editorconfigfor editor-native formatting standards- Pre-commit hooks enforce code quality via overcommit
This project follows Conventional Commits specification:
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
Types:
feat:New featurefix:Bug fixdocs:Documentation only changesstyle:Code style changes (formatting, missing semi-colons, etc)refactor:Code change that neither fixes a bug nor adds a featureperf:Performance improvementstest:Adding missing tests or correcting existing testsbuild:Changes that affect the build system or external dependenciesci:Changes to CI configuration files and scriptschore:Other changes that don't modify src or test files
Examples:
git commit -m "feat: add GitHub team member validation"
git commit -m "fix: handle API rate limiting in team fetcher"
git commit -m "docs: update setup instructions in README"
git commit -m "refactor: extract team analysis logic to service"The project enforces comprehensive test coverage using SimpleCov:
- Minimum coverage: 95% overall
- Per-file minimum: 80%
- Branch coverage: Enabled
- Coverage reports: Generated in
coverage/directory - CI integration: Coverage reports generated automatically with tests
Coverage configuration in test/test_helper.rb:
- Excludes test files, config, vendor, and database files
- Groups results by component type (Controllers, Models, Services, etc.)
- Fails CI if coverage drops below thresholds
- Setup: Run
bin/setupfor initial configuration - Development: Use
bin/watch-cifor real-time feedback during coding - Quality Check: Run
bin/ci --fixto auto-fix issues and verify code quality - Testing: Use
bin/rails testandbin/rails test:systemfor targeted testing - Coverage: Check
bin/coveragefor detailed test coverage analysis
The application emphasizes code quality with automated formatting, comprehensive testing, security scanning, and 95% code coverage requirement integrated into the development workflow.