This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is a Ruby gem called "airb" - an AI-powered programming assistant that runs in a terminal chat interface. It uses the VSM (Viable System Model) architecture to coordinate between different systems including intelligence, governance, coordination, identity, and monitoring.
bin/setup- Install dependenciesrake spec- Run testsbin/console- Interactive console for experimentationbundle exec rake install- Install gem locallyrakeorrake default- Run both tests and RuboCoprake rubocop- Run RuboCop linterexe/airb- Run the airb CLI directly
The codebase follows a modular VSM-based architecture:
Airb::CLI- Entry point that builds the organism and starts the runtimeAirb::Organism- Factory that assembles all systems and tools using VSM DSLAirb::Ports::ChatTTY- Terminal interface for user interaction
Intelligence- Handles LLM interactions with support for OpenAI, Anthropic, and Gemini providersGovernance- Security layer that validates file operations and prompts for risky actionsCoordination- Manages async message flow and turn-takingIdentity- System identificationMonitoring- VSM monitoring system
File system tools in lib/airb/tools/fs/:
ListFiles- Directory listingReadFile- File reading with path safetyEditFile- File editing with governance approval
AIRB_PROVIDER- LLM provider (openai, anthropic, gemini)AIRB_MODEL- Specific model to useOPENAI_API_KEY,ANTHROPIC_API_KEY,GEMINI_API_KEY- API keysVSM_LENS=1- Enable VSM visualization dashboardVSM_LENS_PORT,VSM_LENS_TOKEN- Lens configuration
- Uses RuboCop with double quotes for strings
- Ruby 3.4+ required
- Frozen string literals enabled throughout
- VSM framework patterns for system composition