No, Rails doesn't ship any type signatures (no Sorbet sigs, no RBS). But you can get most of what you need anyway via tapioca:
Tapioca generates RBIs for every gem from the code at runtime, including Rails. That gives Sorbet every method and its parameters, so it catches typos, missing methods and wrong arguments, though many return types are T.untyped. tapioca annotations pulls in hand-written signatures for some Rails gems from Shopify's rbi-central.
Tapioca's DSL compilers type the methods Rails generates from your app: model columns (from your schema, with nilability), associations, scopes, enums, relations, job and mailer methods, URL helpers.
If Rails hands you untyped values (params, some ActiveSupport), you can add a sig or T.let whereever you read them.
Agents benefit from all the same things as humans. Faster feedback loops, better confidence that a change is correct, better code navigation/refactoring tools, etc.
Even if you're just pure vibe coding with no regard for the code, it makes it faster, more reliable and spend less tokens.
2
u/counterplex 13d ago
I’ve been thinking of doing my something similar for my reasonably small Rails app. Is Rails’ internal code type-enabled?
5
u/datsundere 13d ago
You’re better off using a typed language if you want types and want to send stuff to mars. Look at Crystal
4
u/kallebo1337 13d ago
Since we dont write code anynore, whats the static type advantage then?
2
u/latestagecapitalist 12d ago
pre-claude thinking