{"id":31205316,"url":"https://github.com/aygp-dr/agentic-rails","last_synced_at":"2025-11-11T11:25:16.107Z","repository":{"id":315678605,"uuid":"1060463460","full_name":"aygp-dr/agentic-rails","owner":"aygp-dr","description":"Risk-aware Rails framework with Progressive Commit Protocol, experiment-driven development, tmux integration, and DevOps automation","archived":false,"fork":false,"pushed_at":"2025-09-20T02:08:02.000Z","size":110,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-20T03:08:44.423Z","etag":null,"topics":["devops","experiment-driven-development","performance-monitoring","rails","risk-management"],"latest_commit_sha":null,"homepage":"https://github.com/aygp-dr/agentic-rails","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aygp-dr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-20T00:56:58.000Z","updated_at":"2025-09-20T02:08:06.000Z","dependencies_parsed_at":"2025-09-20T03:09:01.779Z","dependency_job_id":"88a6410c-90f3-4b36-ac09-71499a406e7c","html_url":"https://github.com/aygp-dr/agentic-rails","commit_stats":null,"previous_names":["aygp-dr/agentic-rails"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/aygp-dr/agentic-rails","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aygp-dr%2Fagentic-rails","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aygp-dr%2Fagentic-rails/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aygp-dr%2Fagentic-rails/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aygp-dr%2Fagentic-rails/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aygp-dr","download_url":"https://codeload.github.com/aygp-dr/agentic-rails/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aygp-dr%2Fagentic-rails/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276134580,"owners_count":25591181,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-20T02:00:10.207Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["devops","experiment-driven-development","performance-monitoring","rails","risk-management"],"created_at":"2025-09-20T17:57:57.407Z","updated_at":"2025-10-08T17:04:35.154Z","avatar_url":"https://github.com/aygp-dr.png","language":"Ruby","readme":"# Agentic Rails\n\n[![Rails](https://img.shields.io/badge/Rails-7.2-red)](https://rubyonrails.org/)\n[![Ruby](https://img.shields.io/badge/Ruby-3.3-red)](https://www.ruby-lang.org/)\n[![PostgreSQL](https://img.shields.io/badge/PostgreSQL-15+-blue)](https://www.postgresql.org/)\n[![Docker](https://img.shields.io/badge/Docker-Ready-blue)](https://www.docker.com/)\n[![tmux](https://img.shields.io/badge/tmux-3.4+-green)](https://github.com/tmux/tmux)\n[![License](https://img.shields.io/badge/License-MIT-yellow)](LICENSE)\n[![Progressive Commits](https://img.shields.io/badge/Progressive-Commits-purple)](docs/PROGRESSIVE_COMMIT_PROTOCOL_GUIDE.md)\n[![Risk-Aware](https://img.shields.io/badge/Risk--Aware-Development-orange)](.github/COMMIT_PROTOCOL.md)\n\n\u003e **A risk-aware, performance-optimized Rails framework that integrates terminal productivity, DevOps automation, and experiment-driven development practices.**\n\n![Agentic Rails Demo](demo/final-demo.gif)\n\nAgentic Rails combines wisdom from five essential books to create a comprehensive development framework that actively manages its own risks, performance, and deployment lifecycle. It implements the Progressive Commit Protocol for traceable, experiment-driven development with built-in hypothesis testing.\n\n## Overview\n\nAgentic Rails integrates concepts from five essential books:\n- **Agile Web Development with Rails 7.2**: Modern Rails with Hotwire\n- **tmux 3**: Terminal multiplexer for productivity\n- **DevOps in Practice**: Continuous delivery and monitoring\n- **Rails Scales**: Performance optimization techniques\n- **Risk-First Software Development**: Risk management methodology\n\n## Key Features\n\n### 1. Risk-Aware Architecture\n- Built-in risk assessment for all models\n- Automatic risk scoring and mitigation suggestions\n- Real-time risk monitoring via ActionCable\n- Risk-based deployment decisions\n\n### 2. Performance at Scale\n- Comprehensive performance monitoring\n- Automatic scaling based on metrics and risks\n- Multi-tier caching strategies\n- Database optimization and sharding\n\n### 3. DevOps Integration\n- Dockerized deployment\n- CI/CD with GitHub Actions\n- Prometheus + Grafana monitoring\n- Infrastructure as Code\n\n### 4. Developer Productivity\n- tmux configurations for Rails development\n- Pre-configured layouts for different workflows\n- Automated testing and monitoring setups\n\n## Demo\n\nRun the interactive demo to see Agentic Rails in action:\n\n```bash\n# Quick demo showing risk assessment\nbash demo/final-demo.sh\n\n# Or record your own demo\nasciinema rec demo/my-demo.cast\nbash demo/showcase.sh\n# Press Ctrl+D to stop recording\n\n# Convert to GIF\nagg demo/my-demo.cast demo/my-demo.gif\n```\n\n## Quick Start\n\n### Prerequisites\n- Ruby 3.3+ (via rbenv, rvm, chruby, or asdf)\n- PostgreSQL 15+\n- Redis 7+\n- Docker \u0026 Docker Compose\n- tmux 3.4+\n\n### Ruby Version Management\n\nThe project supports multiple Ruby version managers:\n\n#### FreeBSD (Recommended: rbenv)\n```bash\n# Install rbenv and ruby-build\nsudo pkg install rbenv ruby-build\n\n# Add to shell config\necho 'eval \"$(rbenv init -)\"' \u003e\u003e ~/.bashrc\nsource ~/.bashrc\n\n# Install Ruby\nrbenv install 3.3.0\nrbenv global 3.3.0\n```\n\n#### macOS (rbenv or rvm)\n```bash\n# Using Homebrew\nbrew install rbenv ruby-build\n# Or for RVM\n\\curl -sSL https://get.rvm.io | bash -s stable\n```\n\n#### Linux (any manager)\nAll version managers work well on Linux. Choose based on preference.\n\n### Installation\n\n```bash\n# Clone the repository\ngit clone https://github.com/aygp-dr/agentic-rails.git\ncd agentic-rails\n\n# Install dependencies\nbundle install\nyarn install\n\n# Setup database\nrails db:create db:migrate db:seed\n\n# Start tmux development environment\ntmux new-session -s agentic-rails\ntmux source-file .tmux.conf\n```\n\n### Development Workflow\n\n#### Using tmux layouts\n\n```bash\n# Development layout (editor, server, console, tests, monitoring)\ntmux source-file .tmux/dev-layout.conf\n\n# Testing layout (focused on TDD)\ntmux source-file .tmux/test-layout.conf\n\n# Monitoring layout (production-like monitoring)\ntmux source-file .tmux/monitor-layout.conf\n```\n\n#### Running the application\n\n```bash\n# Start all services\ndocker-compose up\n\n# Or run individually\nrails server\nredis-server\nsidekiq\n\n# Run tests\nrails test\nrails test:system\n```\n\n## Architecture\n\n### Risk-Aware Models\n\n```ruby\nclass Product \u003c ApplicationRecord\n  include RiskAware\n  include PerformanceMonitored\n\n  # Automatically tracks:\n  # - Feature risks (implementation complexity)\n  # - Dependency risks (external services)\n  # - Model risks (data complexity)\n  # - Environmental risks (security, legal)\nend\n```\n\n### Performance Monitoring\n\n```ruby\n# Automatic performance tracking\nProduct.with_performance_tracking do\n  # Complex operations monitored for:\n  # - Query time\n  # - Memory usage\n  # - Cache performance\nend\n```\n\n### Scaling Service\n\n```ruby\n# Automatic scaling based on metrics and risks\nScalingService.analyze_and_scale\n# Determines strategy: horizontal, vertical, cache, or database optimization\n```\n\n## Deployment\n\n### Production Deployment\n\n```bash\n# Build and deploy\ndocker build -t agentic-rails .\ndocker-compose -f config/deploy/docker-compose.yml up -d\n\n# Run migrations\ndocker-compose exec web rails db:migrate\n\n# Monitor deployment\ndocker-compose exec web rails console\n\u003e DevOps::Monitoring::MetricsCollector.start\n```\n\n### CI/CD Pipeline\n\nGitHub Actions automatically:\n1. Runs tests (unit, integration, system)\n2. Performs security checks (Brakeman, bundler-audit)\n3. Checks code quality (RuboCop, Rails Best Practices)\n4. Runs performance benchmarks\n5. Deploys to production on main branch\n\n## Monitoring \u0026 Observability\n\n### Metrics Dashboard\n\nAccess Grafana at `http://localhost:3001`\n- Application metrics (requests, response times, errors)\n- Infrastructure metrics (CPU, memory, disk, network)\n- Business metrics (users, revenue, engagement)\n- Risk indicators (security, compliance, stability)\n\n### Alerts\n\nConfigured alerts for:\n- High response times (\u003e500ms)\n- Low Apdex scores (\u003c0.7)\n- High error rates (\u003e5%)\n- Resource exhaustion\n- Security threats\n- Business KPI degradation\n\n## Risk Management\n\n### Risk Categories\n\n1. **Feature Risks**: New feature impact\n2. **Dependency Risks**: External service reliability\n3. **Model Risks**: Data and complexity issues\n4. **Environmental Risks**: Security and compliance\n\n### Risk Mitigation\n\nAutomatic mitigations:\n- Feature flags for gradual rollouts\n- Circuit breakers for dependencies\n- Automatic test coverage increases\n- Security audit triggers\n\n## Performance Optimization\n\n### Caching Strategy\n\nMulti-tier caching:\n1. CDN caching for static assets\n2. Redis for application cache\n3. Fragment caching with Russian Dolls\n4. Database query caching\n\n### Database Optimization\n\n- Automatic N+1 query detection\n- Missing index identification\n- Read replica configuration\n- Horizontal sharding support\n\n### Scaling Strategies\n\nAutomatic scaling based on:\n- Request rate thresholds\n- Memory and CPU usage\n- Response time degradation\n- Error rate increases\n\n## Security\n\n- Automated security scanning with Brakeman\n- Dependency vulnerability checking\n- Rate limiting and DDoS protection\n- Encrypted secrets management\n- Audit logging\n\n## Testing\n\n### Test Coverage\n\n```bash\n# Run all tests with coverage\nCOVERAGE=true rails test\n\n# Performance benchmarks\nrails test:benchmark\n\n# System tests with headless Chrome\nrails test:system\n```\n\n### Continuous Testing\n\nGuard configuration for:\n- Auto-running affected tests\n- Live reload on file changes\n- Performance regression detection\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Follow risk-aware development:\n   - Assess risks before implementation\n   - Include performance tests\n   - Document scaling considerations\n4. Submit a pull request\n\n## License\n\nMIT License - See LICENSE file for details\n\n## Support\n\n- Documentation: `/docs`\n- Issues: GitHub Issues\n- Slack: #agentic-rails\n\n## Credits\n\nBuilt using principles from:\n- Sam Ruby - Agile Web Development with Rails\n- Brian P. Hogan - tmux 3\n- Danilo Sato - DevOps in Practice\n- Cristian Planas - Rails Scales!\n- Rob Moffat - Risk-First Software Development","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faygp-dr%2Fagentic-rails","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faygp-dr%2Fagentic-rails","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faygp-dr%2Fagentic-rails/lists"}