diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 33a2a88fd..49f1cf698 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -1,5 +1,12 @@ # This project is a Ruby on Rails application. +# Frontend requirements: +- Strongly prefer Stimulus for JavaScript behavior — do not write raw/inline JS or jQuery +- Always use Tailwind CSS utility classes for styling — do not write custom CSS unless absolutely necessary +- Prefer Turbo for navigation and form submissions before reaching for Stimulus +- ES6+ syntax, ESM imports/exports +- Stimulus controller naming: `[name]_controller.js` + # Code style requirements: - Use modern Ruby syntax - Prefer early returns and guard clauses @@ -50,3 +57,9 @@ This project uses rubocop-rails-omakase. All code MUST follow these rules: - Use `Foo.method` not `Foo::method` for method calls - No parentheses around conditions: `if foo` not `if (foo)` - No semicolons to separate statements + +# PRs +- On every push, update the PR title and description to reflect the current diff + +# Git +- When rebasing onto main, review incoming changes for their intent and flag any oversights — missing tests, incomplete migrations, broken assumptions, or conflicts between the two branches. Check both directions: schema/model changes on either branch that affect views, partials, or layouts on the other (e.g., main redesigned a table's CSS but your branch adds new columns to it, or vice versa) diff --git a/AGENTS.md b/AGENTS.md index e3cd2a1fd..5be71ab97 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -208,6 +208,12 @@ end ## Frontend +### Preferences + +- **Strongly prefer Stimulus** for JavaScript behavior — do not write raw/inline JS or jQuery +- **Always use Tailwind CSS** utility classes for styling — do not write custom CSS unless absolutely necessary +- Prefer Turbo for navigation and form submissions before reaching for Stimulus + ### Stimulus Controllers (32) Key controllers: @@ -313,6 +319,14 @@ RuboCop linting on PRs and pushes to main. | Positioning | Positioning gem for ordered records | | API | JWT tokens, Apipie docs, Rack CORS | +## PRs + +- On every push, update the PR title and description to reflect the current diff + +## Git + +- When rebasing onto main, review incoming changes for their intent and flag any oversights — missing tests, incomplete migrations, broken assumptions, or conflicts between the two branches. Check both directions: schema/model changes on either branch that affect views, partials, or layouts on the other (e.g., main redesigned a table's CSS but your branch adds new columns to it, or vice versa) + ## Rake Tasks Located in `lib/tasks/` (~17 files). Notable: diff --git a/CLAUDE.md b/CLAUDE.md index f3ac1e1c6..30c8e3ba4 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -149,10 +149,11 @@ bundle exec bundle-audit check --update ## JavaScript - ES6+ syntax, ESM imports/exports -- Prefer Stimulus + Turbo for new interactive features +- **Strongly prefer Stimulus** for JavaScript behavior — do not write raw/inline JS or jQuery +- **Always use Tailwind CSS** utility classes for styling — do not write custom CSS unless absolutely necessary +- Prefer Turbo for navigation and form submissions before reaching for Stimulus - Controller naming: `[name]_controller.js` - Keep controllers focused and small -- Use Tailwind CSS v4 utility classes - **Use Stimulus targets and data attributes** to reference DOM elements — avoid `this.element.querySelector` and direct DOM queries. Declare `static targets = [...]` and use `data-[controller]-target` attributes in views. - **Use Stimulus shorthand action descriptors and shorthand pairs** — omit the event when it's the default for that element (e.g., `input` for ``/`