| Dimension | Shared | Only in A | Only in B | Overlap |
|---|---|---|---|---|
| Sections | 0 | 6 | 7 | 0% |
| Commands | 0 | 0 | 4 | 0% |
| Section tags | 1 | 1 | 1 | 33% |
What each file covers
Sections
0 shared · 6 only in A · 7 only in B- − App
- − Directory Structure
- − Code Style Guidelines
- − Ruby
- − Templates
- − Translations
- + Database
- + Code Style
- + Database Migrations
- + Commands
- + Local
- + Docker
- + Important Note
Commands
0 shared · 0 only in A · 4 only in B- + bundle exec rails g migration MigrationName
- + bundle exec rails db:migrate
- + bundle exec rails db:rollback
- + bundle exec rails db:seed
Section tags
1 shared · 1 only in A · 1 only in B- − architecture
- + database
- code-style
Line diff
opf/openproject · app/AGENTS.md
@@ −1 @@
1# App
2
3## Directory Structure
4
5- `app/components/` - ViewComponent-based UI components (Ruby + ERB)
6- `app/contracts/` - Validation and authorization contracts
7- `app/controllers/` - Rails controllers
8- `app/models/` - ActiveRecord models
9- `app/services/` - Service objects (business logic)
10- `app/workers/` - Background job workers
11
12## Code Style Guidelines
13
14### Ruby
15- Follow [Ruby community style guide](https://github.com/bbatsov/ruby-style-guide)
16- Use service objects for complex business logic (return `ServiceResult`)
17- Use contracts for validation and authorization
18- Keep controllers thin, models focused
19- Document with [YARD](https://yardoc.org/)
20- Write RSpec tests for all new features
21- **Work package identifiers**: `WorkPackage.find("PROJ-42")` resolves semantic identifiers transparently. Use `find_by_display_id` only when input could legitimately be numeric OR semantic (controllers, URL-driven components, macro resolvers). Low-level code (queries, filters, services) should stick to `find_by(id:)` with primary keys. See `app/models/work_package/semantic_identifier/finder_methods.rb`.
22
23### Templates
24- Use ERB for server-rendered views
25- Use ViewComponents for reusable UI (with Lookbook previews)
26- Lint with erb_lint before committing
27
28## Translations
29
30- UI strings must use translation keys (never hard-coded)
31
opf/openproject · db/AGENTS.md
@@ +1 @@
1# Database
2
3## Code Style
4
5### Database Migrations
6- Follow Rails migration conventions
7- Migrations are "squashed" between major releases (see `docs/development/migrations/`)
8
9## Commands
10
11### Local
12
13```bash
14bundle exec rails g migration MigrationName # Generate a migration
15bundle exec rails db:migrate # Run migrations
16bundle exec rails db:rollback # Rollback last migration
17bundle exec rails db:seed # Seed sample data
18```
19
20### Docker
21
22```bash
23bin/compose exec backend bundle exec rails db:migrate # Run migrations
24bin/compose exec backend bundle exec rails db:seed # Seed data
25```
26
27## Important Note
28
29**CRITICAL**: `config/database.yml` must NOT exist when using Docker (rename or delete it)
30
@@ −1 +1 @@
1−# App
1+# Database
22
3−## Directory Structure
3+## Code Style
44
5−- `app/components/` - ViewComponent-based UI components (Ruby + ERB)
6−- `app/contracts/` - Validation and authorization contracts
7−- `app/controllers/` - Rails controllers
8−- `app/models/` - ActiveRecord models
9−- `app/services/` - Service objects (business logic)
10−- `app/workers/` - Background job workers
5+### Database Migrations
6+- Follow Rails migration conventions
7+- Migrations are "squashed" between major releases (see `docs/development/migrations/`)
118
12−## Code Style Guidelines
9+## Commands
1310
14−### Ruby
15−- Follow [Ruby community style guide](https://github.com/bbatsov/ruby-style-guide)
16−- Use service objects for complex business logic (return `ServiceResult`)
17−- Use contracts for validation and authorization
18−- Keep controllers thin, models focused
19−- Document with [YARD](https://yardoc.org/)
20−- Write RSpec tests for all new features
21−- **Work package identifiers**: `WorkPackage.find("PROJ-42")` resolves semantic identifiers transparently. Use `find_by_display_id` only when input could legitimately be numeric OR semantic (controllers, URL-driven components, macro resolvers). Low-level code (queries, filters, services) should stick to `find_by(id:)` with primary keys. See `app/models/work_package/semantic_identifier/finder_methods.rb`.
11+### Local
2212
23−### Templates
24−- Use ERB for server-rendered views
25−- Use ViewComponents for reusable UI (with Lookbook previews)
26−- Lint with erb_lint before committing
13+```bash
14+bundle exec rails g migration MigrationName # Generate a migration
15+bundle exec rails db:migrate # Run migrations
16+bundle exec rails db:rollback # Rollback last migration
17+bundle exec rails db:seed # Seed sample data
18+```
2719
28−## Translations
20+### Docker
2921
30−- UI strings must use translation keys (never hard-coded)
22+```bash
23+bin/compose exec backend bundle exec rails db:migrate # Run migrations
24+bin/compose exec backend bundle exec rails db:seed # Seed data
25+```
26+
27+## Important Note
28+
29+**CRITICAL**: `config/database.yml` must NOT exist when using Docker (rename or delete it)
3130
