chore: Add agentic coding tooling

This commit is contained in:
Flo
2026-03-30 13:39:40 +02:00
parent 2a5302388e
commit 078d55982b
40 changed files with 2131 additions and 0 deletions

47
.crosslink/rules/ruby.md Normal file
View File

@@ -0,0 +1,47 @@
### Ruby Best Practices
#### Code Style
- Follow Ruby Style Guide (use RuboCop)
- Use 2 spaces for indentation
- Prefer symbols over strings for hash keys
- Use `snake_case` for methods and variables
```ruby
# GOOD: Idiomatic Ruby
class UserService
def initialize(repository)
@repository = repository
end
def find_user(id)
@repository.find(id)
rescue ActiveRecord::RecordNotFound
nil
end
end
# BAD: Non-idiomatic
class UserService
def initialize(repository)
@repository = repository
end
def findUser(id) # Wrong naming
begin
@repository.find(id)
rescue
return nil
end
end
end
```
#### Error Handling
- Use specific exception classes
- Don't rescue `Exception` (too broad)
- Use `ensure` for cleanup
#### Security
- Use parameterized queries (ActiveRecord does this by default)
- Sanitize user input in views (Rails does this by default)
- Never use `eval` or `send` with user input
- Use `strong_parameters` in Rails controllers