This file provides guidance to WARP (warp.dev) when working with code in this repository.
# Setup development environment
bin/setup
# Interactive console for experimentation
bin/console
# Install gem locally for testing
bundle exec rake install
# Run all tests
bundle exec rspec
# Run tests with coverage (opens HTML report)
rake coverage
# Lint code with RuboCop
bundle exec rubocop
# Auto-fix RuboCop offenses (safe only)
bundle exec rubocop --autocorrect
# Run comprehensive quality assurance
rake qa# Run specific test file
bundle exec rspec spec/a2a_spec.rb
# Run tests with focus on failed specs
bundle exec rspec --only-failures
# Generate YARD documentation
bundle exec yard
# Type checking with Steep
bundle exec steep check
# Security audit
bundle exec bundle-audit
# Documentation coverage measurement
rake yardstick_measure
rake verify_measurements# Watch files for changes (requires Guard)
bundle exec guard
# Build gem package
bundle exec rake build
# Release new version (updates version, creates tag, pushes to RubyGems)
bundle exec rake release# Update Gemfile dependencies with commit
claude --print --verbose "/gemfile:update --commit"- A2A Protocol Implementation: Ruby implementation of the Agent2Agent communication protocol
- Dry-Struct Based: Uses
dry-structfor typed data structures with validation - Case Transformation: Automatic conversion between snake_case (Ruby) and camelCase (JSON protocol)
- JSON-RPC Messages: Full support for JSON-RPC request/response patterns
- CaseTransformation: Handles snake_case ↔ camelCase conversion during serialization
- JSONDeserialization: Enables creating objects directly from JSON strings
- AdditionalProperties: Supports flexible schema with extra properties
- Protocol-compliant data structures (requests, responses, agents, tasks, etc.)
- All types inherit from
Dry::Structwith validation - Support for additional properties beyond defined attributes
- Ruby Version: 3.4+ required
- Type System: RBS type definitions in
sig/directory - Testing: RSpec with FactoryBot for test data
- Code Quality: RuboCop with multiple plugins (performance, RSpec, factory_bot)
- Documentation: YARD with 100% coverage requirement
- Security: Bundler Audit integration
- CI/CD: Overcommit hooks for pre-commit validation
The gem provides Ruby objects for all A2A protocol message types:
- Task management (send, cancel, status)
- Agent capabilities and authentication
- File and artifact handling
- Push notifications
- Error handling with standardized codes
All objects support:
- Instantiation from hash data (with automatic key transformation)
- JSON serialization with protocol-compliant camelCase keys
- Type validation and additional property support
- Parsing from JSON strings via
from_jsonmethods