.ai/guidelines.md
These guidelines ensure all AI agents (Copilot, Claude, Cursor, etc.) contribute code that is consistent with the conventions and patterns used in the Faraday codebase. Agents must:
lib/faraday/ for main code, spec/faraday/ for tests).Faraday::MyAdapter in lib/faraday/my_adapter.rb).Faraday::Middleware.DEFAULT_OPTIONS constant for configuration defaults. Validate options via validate_default_options if needed.on_request, on_complete, and on_error as needed. Only add hooks required for your logic.Faraday::Middleware.register_middleware your_key: YourClass. Use clear, unique keys.env hash or local variables.Faraday::MiddlewareRegistry and register themselves.Parallelism module and set supports_parallel = true.build_connection, close, etc.) as seen in existing adapters.lib/faraday/adapter/.spec/support).app and verify correct invocation of hooks.AI agents are responsible for:
Keep this file current and aligned with the real conventions and architecture of the Faraday codebase.