Skip to main content

Rev - Autonomous AI Development System with Multi-Agent Orchestration

Project description

rev โ€” Production-Grade Agentic Development System

A robust, pattern-based autonomous development system powered by Ollama for local LLM inference. Built on 21 Agentic Design Patterns for production-grade code generation, testing, and validation.

๐ŸŒŸ What Makes Rev Different

Rev isn't just another AI coding assistant โ€” it's a complete agentic development system implementing industry-proven design patterns:

  • ๐Ÿง  Agentic Design Patterns โ€” Built on 21 patterns from research (Goal Setting, Routing, RAG, Recovery, Resource Budgets, etc.)
  • ๐Ÿ” Hybrid Search โ€” Combines symbolic (regex) + semantic (RAG/TF-IDF) code search for superior context gathering
  • ๐Ÿ“Š Resource-Aware โ€” Tracks steps, tokens, and time budgets to prevent runaway execution
  • ๐ŸŽฏ Goal-Oriented โ€” Derives measurable goals from requests and validates they're met
  • ๐Ÿ›ก๏ธ Production-Ready โ€” Multi-layer validation, security scanning, auto-recovery, and rollback planning
  • โšก Intelligent โ€” Self-routing, priority scheduling, and adaptive agent configuration

Key Features

Agentic Design Patterns (NEW!)

  • ๐ŸŽฏ Goal Setting & Monitoring โ€” Automatic goal derivation with measurable success metrics
  • ๐Ÿ”€ Intelligent Routing โ€” Analyzes requests and configures optimal agent pipeline
  • ๐Ÿ” RAG (Retrieval-Augmented Generation) โ€” Semantic code search using TF-IDF for better context
  • ๐Ÿ“Š Resource Budgets โ€” Tracks and enforces limits on steps, tokens, and execution time
  • ๐Ÿ”„ Exception Recovery โ€” Automatic rollback plans and recovery strategies
  • ๐Ÿ“ก Inter-Agent Communication โ€” Message bus for coordinated multi-agent workflows
  • โš™๏ธ Coding Workflows โ€” Multi-stage chains (analyze โ†’ design โ†’ plan โ†’ implement โ†’ test โ†’ refine)

Core Capabilities

  • ๐Ÿค– 6-Agent System โ€” Planning, Research, Review, Execution, Validation, and Learning agents
  • ๐ŸŽญ Orchestrator Mode โ€” Meta-agent coordinates all agents with resource tracking
  • ๐Ÿ” Research Agent โ€” Pre-planning codebase exploration (symbolic + semantic search)
  • ๐Ÿ“š Learning Agent โ€” Project memory that learns from past executions
  • โœ… Validation Agent โ€” Post-execution verification with goal evaluation
  • ๐Ÿ›ก๏ธ Intelligent Review โ€” Automatic validation with security vulnerability detection
  • ๐Ÿ”ฌ Advanced Analysis (NEW!) โ€” Test coverage, code context, symbol usage, dependencies, semantic diffs
  • ๐Ÿ“š Complex Task Handling โ€” Recursive breakdown of large features
  • ๐Ÿ”“ Smart Automation โ€” Autonomous execution with review-based approval
  • ๐Ÿ“‹ Planning Mode โ€” Comprehensive task checklists with recursive decomposition
  • โšก Execution Mode โ€” Iterative completion with optional action-level review
  • ๐Ÿš€ Parallel Execution โ€” Run 2+ tasks concurrently for 2-4x faster completion
  • ๐Ÿงช Automatic Testing โ€” Runs tests after each change to validate correctness
  • ๐Ÿ”ง Full Code Operations โ€” Review, edit, add, delete, rename files
  • ๐Ÿ  Local LLM โ€” Uses Ollama (no API keys, fully private)
  • ๐ŸŽฏ Advanced Planning โ€” Dependency analysis, impact assessment, risk evaluation
  • ๐Ÿ› ๏ธ Built-in Utilities โ€” File conversion, code refactoring, dependency management
  • โšก Intelligent Caching โ€” File content, LLM responses, repo context, dependency trees

Architecture

Multi-Agent Orchestration System (v2.0)

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                   USER REQUEST                      โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                  โ”‚
         โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
         โ”‚  ORCHESTRATOR   โ”‚  (Optional - coordinates all agents)
         โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                  โ”‚
                  โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚           1. LEARNING AGENT (NEW!)                  โ”‚
โ”‚  โ€ข Recall similar past tasks                       โ”‚
โ”‚  โ€ข Provide success patterns                        โ”‚
โ”‚  โ€ข Estimate execution time                         โ”‚
โ”‚  โ€ข Warn about past failures                        โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                  โ”‚
                  โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚           2. RESEARCH AGENT (NEW!)                  โ”‚
โ”‚  โ€ข Explore codebase before planning               โ”‚
โ”‚  โ€ข Find relevant files and patterns               โ”‚
โ”‚  โ€ข Identify similar implementations               โ”‚
โ”‚  โ€ข Suggest approach based on codebase style       โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                  โ”‚
                  โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚           3. PLANNING AGENT                         โ”‚
โ”‚  โ€ข Break down request into atomic tasks            โ”‚
โ”‚  โ€ข Recursive breakdown for complex features        โ”‚
โ”‚  โ€ข Generate ordered execution checklist            โ”‚
โ”‚  โ€ข Assess dependencies, risks, and impact          โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                  โ”‚
                  โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚           4. REVIEW AGENT                           โ”‚
โ”‚  โ€ข Validate plan completeness                      โ”‚
โ”‚  โ€ข Identify security vulnerabilities               โ”‚
โ”‚  โ€ข Check for missing or unnecessary tasks          โ”‚
โ”‚  โ€ข Decision: Approved / Suggestions / Rejected     โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                  โ”‚
                  โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚           5. EXECUTION AGENT                        โ”‚
โ”‚  โ€ข Execute tasks sequentially or in parallel       โ”‚
โ”‚  โ€ข [Optional] Review Agent validates each action   โ”‚
โ”‚  โ€ข Make changes, run tests, validate               โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                  โ”‚
                  โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚           6. VALIDATION AGENT (NEW!)                โ”‚
โ”‚  โ€ข Run test suite                                  โ”‚
โ”‚  โ€ข Check syntax errors                             โ”‚
โ”‚  โ€ข Run linter                                      โ”‚
โ”‚  โ€ข Semantic validation (did changes match request?)โ”‚
โ”‚  โ€ข Auto-fix minor issues (optional)               โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                  โ”‚
                  โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚           LEARNING AGENT (POST)                     โ”‚
โ”‚  โ€ข Store successful patterns                       โ”‚
โ”‚  โ€ข Update project context                          โ”‚
โ”‚  โ€ข Record for future reference                     โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Agentic Design Patterns

Rev implements 21 Agentic Design Patterns from cutting-edge AI agent research, making it a production-grade development system rather than a simple code assistant.

Pattern Implementations

Phase 1: Foundational Patterns โœ…

  • Goal Setting & Monitoring โ€” Automatic derivation of measurable goals from user requests
  • Prompt Chaining (Coding Workflows) โ€” Multi-stage workflows: analyze โ†’ design โ†’ plan โ†’ implement โ†’ test โ†’ refine
  • Routing โ€” Intelligent request analysis that selects optimal agent configuration
  • Inter-Agent Communication โ€” Message bus with pub/sub for coordinated workflows
  • RAG (Retrieval-Augmented Generation) โ€” Semantic code search using TF-IDF alongside symbolic search
  • Exception Handling & Recovery โ€” Automatic rollback plans and recovery strategies
  • Resource-Aware Optimization โ€” Budget tracking for steps, tokens, and execution time

Phase 2: Core Integrations โœ…

  • TaskRouter Integration โ€” Routes every request to determine coding mode and agent configuration
  • Goal Integration โ€” Goals automatically derived and validated post-execution
  • Priority Scheduling โ€” Higher-priority tasks execute first for critical path optimization
  • Metrics Emission โ€” JSONL metrics for evaluation and monitoring (.rev-metrics/)

Phase 3: Advanced Integration โœ…

  • RAG Integration โ€” Research Agent uses hybrid symbolic + semantic search (enabled by default)
  • Resource Budget Tracking โ€” Orchestrator tracks and enforces budgets across all phases
  • Goal Validation โ€” Validation Agent evaluates whether goals were met

Pattern Benefits

๐ŸŽฏ Superior Context Gathering

# Research Agent uses both approaches:
# Symbolic: Finds exact matches for "authenticate", "login", "jwt"
# Semantic: Finds conceptually related code even without keywords
rev "Add OAuth2 authentication"

๐Ÿ“Š Controlled Execution

# Resource budgets prevent runaway execution:
# - Max steps: 200 (configurable via REV_MAX_STEPS)
# - Max tokens: 100,000 (REV_MAX_TOKENS)
# - Max time: 1800s / 30min (REV_MAX_SECONDS)
rev "Refactor entire authentication system"
# Output: "๐Ÿ“Š Resource Usage: Steps: 45/200 | Tokens: 12000/100000 | Time: 120s/1800s"

๐ŸŽฏ Goal-Oriented Validation

# Goals automatically derived and validated:
rev "Fix all failing tests"
# Derives goal: "All tests must pass"
# Validation checks: Tests passed? โœ…
# Goal met? โœ…

๐Ÿ”€ Adaptive Configuration

# Router analyzes request and optimizes:
rev "Quick typo fix in README"
# โ†’ Route: quick_edit (skips research, minimal review)

rev "Implement payment processing system"
# โ†’ Route: full_feature (enables all agents, strict review)

Pattern Usage

Most patterns are enabled by default with graceful degradation:

  • RAG Search: Enabled (falls back to symbolic if unavailable)
  • Resource Budgets: Always tracking (configurable limits)
  • Goal Validation: Runs if goals exist (auto-derived for most tasks)
  • Routing: Always active (optimizes agent pipeline)

Configuration:

# Disable RAG for faster execution
rev --research-depth shallow "Quick task"

# Adjust resource budgets
export REV_MAX_STEPS=500
export REV_MAX_TOKENS=200000
export REV_MAX_SECONDS=3600  # 1 hour

# Control routing behavior via strictness
rev --review-strictness strict "Critical production change"

See IMPLEMENTATION_SUMMARY.md for complete pattern documentation and usage examples.

Installation

Quick Install (Recommended)

# Install via pip (coming soon to PyPI)
pip install rev-agentic

# Or install from source
git clone https://github.com/redsand/rev
cd rev
pip install -e .

1. Install Ollama

# macOS
brew install ollama

# Linux
curl -fsSL https://ollama.ai/install.sh | sh

# Windows - Download from https://ollama.ai

2. Pull a Code Model

โš ๏ธ Important: rev requires a model with function/tool calling support for full functionality.

Recommended models with tool support:

# Best for code tasks
ollama pull llama3.1:latest        # Best overall (tool support)
ollama pull qwen2.5:7b              # Good for code (tool support)
ollama pull mistral-nemo:latest     # Fast with tools

# Legacy (no tool support - limited functionality)
ollama pull gpt-oss:120b-cloud        # โš ๏ธ No tool support
ollama pull deepseek-coder:latest   # โš ๏ธ Check version for tool support

๐ŸŒ Ollama Cloud Models (NEW!):

# Ensure Ollama is running (cloud models proxy through local Ollama)
ollama serve

# Use powerful cloud-hosted models (requires authentication)
rev --model qwen3-coder:480b-cloud "Your task"
rev --model llama3.3:90b-cloud "Complex refactoring task"

Important: Cloud models require your local Ollama instance to be running. The local instance automatically proxies requests to Ollama's cloud service.

On first use, you'll be prompted to authenticate:

  1. A browser URL will be displayed
  2. Visit the URL and sign in with your Ollama account
  3. Authorize your device
  4. Press Enter to continue

Verify tool support:

# List models
ollama list

# Check model info
ollama show llama3.1:latest

3. Install Dependencies

pip install -r requirements.txt

Usage

One-Shot Mode

Execute a single task with fully autonomous operation:

rev "Add error handling to all API endpoints"

The agent will:

  1. Analyze your repository
  2. Generate an execution plan
  3. Execute autonomously (no approval needed)
  4. Prompt ONLY for destructive operations (delete, force push, etc.)
  5. Show final summary

New in v2: Autonomous by default! No more repeated approval prompts. The agent only asks permission for potentially destructive operations.

Interactive REPL

For iterative development with session memory:

rev --repl

The REPL now maintains context across multiple prompts:

agent> Review all documentation files
  โ„น๏ธ  Running in autonomous mode - destructive operations will prompt
  ... reviews README.md, COVERAGE.md, etc ...

agent> Now create a project overview document based on what you reviewed
  ... uses knowledge from previous reviews to create comprehensive overview ...

agent> /status
Session Summary:
  - Tasks completed: 15
  - Files reviewed: 8
  - Files modified: 1

New REPL Commands:

  • /status - Show what's been done in this session
  • /clear - Clear session memory
  • /help - Show all commands
  • /exit - Exit with session summary
  • /mode - Control execution depth and thinking level (NEW in v2.0!)

Execution Modes (NEW!)

Rev v2.0 introduces flexible execution modes that control the depth of analysis, research, and validation. Use /mode in REPL or configure via command-line:

# In REPL
rev> /mode thorough
Mode: thorough
  โœ“ Orchestrator mode enabled
  Research:        Enabled (deep)
  Learning:        Enabled
  Review:          Enabled (strict)
  Validation:      Enabled + auto-fix
  Parallel Workers: 3

rev> Implement user authentication
# Executes with thorough mode settings...

Available Modes:

Mode Feature Matrix

Feature simple standard thorough max
Orchestration โŒ โœ… โœ… โœ…
Research โŒ Medium Deep Deep
Learning โŒ โŒ โœ… โœ…
Review Lenient Moderate Strict Strict
Validation โŒ โœ… โœ… + auto-fix โœ… + auto-fix
Action Review โŒ โŒ โŒ โœ…
Parallel Workers 1 2 3 4
Best For Quick fixes Daily development Complex features Critical changes

Mode Descriptions:

  • simple - Fast execution with minimal overhead. No research or learning. Sequential execution. Perfect for quick fixes and testing.

  • standard - Balanced approach (DEFAULT). Medium research depth, moderate review, validation enabled, 2 parallel workers. Ideal for daily development.

  • thorough - Comprehensive analysis. Deep research + learning, strict review, full validation with auto-fix, 3 parallel workers. Use for complex features and refactoring.

  • max - Maximum capabilities. Full orchestration with all agents, deep research + learning, strict review with action-level validation, auto-fix, 4 parallel workers. For critical architectural changes.

Command-Line Mode Control:

# Standard mode (default)
rev "Add feature X"

# Simple mode for quick tasks
rev --no-orchestrate "Fix typo in README"

# Thorough mode for complex tasks
rev --orchestrate --research-depth deep --learn --auto-fix "Refactor auth system"

Manual Approval Mode

If you want to manually approve the execution plan (old behavior):

rev --prompt "Run all tests and fix any failures"

With --prompt, the agent will ask for approval before starting execution. Default behavior: Runs autonomously without prompting (except for scary operations).

What Operations Require Confirmation?

Even in autonomous mode, the agent will always prompt for potentially destructive operations:

Scary Operations (will prompt):

  • File deletion or removal
  • Git operations: reset --hard, clean -f, push --force
  • Commands containing: delete, remove, rm, clean, reset, force, destroy, drop, truncate
  • Applying patches without dry-run first
  • Tasks with "delete" action type

Safe Operations (no prompt):

  • Reading files
  • Searching code
  • Running tests
  • Creating/modifying files
  • Git diff/log/status
  • Running linters/formatters

Configuration

Environment Variables

# Ollama configuration
export OLLAMA_BASE_URL="http://localhost:11434"  # Default
export OLLAMA_MODEL="gpt-oss:120b-cloud"           # Default

# Reliability tuning (optional)
export OLLAMA_MAX_RETRIES=6                     # Retries for transient 5xx errors
export OLLAMA_RETRY_BACKOFF_SECONDS=2           # Base backoff between retries
export OLLAMA_RETRY_BACKOFF_MAX_SECONDS=30      # Cap for backoff delay
export OLLAMA_TIMEOUT_MAX_MULTIPLIER=3          # Cap timeout growth (10m -> 30m)

# Then run agent
rev "Your task here"

Command-Line Options

rev [OPTIONS] "task description"

Options:
  --repl                       Interactive REPL mode
  --model MODEL                Ollama model to use (default: gpt-oss:120b-cloud)
  --base-url URL               Ollama API URL (default: http://localhost:11434)
  --prompt                     Prompt for approval before execution (default: auto-approve)
  -j N, --parallel N           Number of concurrent tasks (default: 2, use 1 for sequential)

  # Agent Control
  --orchestrate                Enable orchestrator mode (full multi-agent coordination)
  --learn                      Enable learning agent for project memory
  --research                   Enable research agent for pre-planning exploration
  --research-depth LEVEL       Research depth: shallow, medium, deep (default: medium)
  --review / --no-review       Enable/disable review agent (default: enabled)
  --review-strictness LEVEL    Review strictness: lenient, moderate, strict (default: moderate)
  --action-review              Enable action-level review during execution
  --validate / --no-validate   Enable/disable validation agent (default: enabled)
  --auto-fix                   Enable auto-fix for minor validation issues

  -h, --help                   Show help message

Parallel Execution

New in v2.0: Concurrent task execution for faster completion!

By default, rev now runs 2 tasks in parallel when they don't have dependencies on each other. This dramatically speeds up execution for complex tasks.

Examples:

# Use default (2 concurrent tasks)
rev "Review all API endpoints and add tests"

# Run 4 tasks in parallel for maximum speed
rev -j 4 "Refactor all components and update tests"

# Run sequentially (old behavior) for debugging
rev -j 1 "Complex refactoring that needs careful sequencing"

# Run 8 tasks in parallel for large codebases
rev -j 8 "Update all imports across the project"

How it works:

  • The agent automatically tracks task dependencies
  • Independent tasks (like reviewing different files) run in parallel
  • Dependent tasks (like "run tests" after "fix bug") wait for prerequisites
  • Thread-safe execution ensures no conflicts

Performance benefits:

  • 2x-4x faster execution for typical tasks
  • Scales well with more workers for large codebases
  • No manual intervention needed - dependencies are automatic

Examples

Example 1: Add Feature

rev "Add rate limiting middleware to Express app"

Generated Plan:

  1. [REVIEW] Analyze current Express middleware structure
  2. [ADD] Create rate-limiting middleware module
  3. [EDIT] Integrate rate limiter into main app
  4. [ADD] Add tests for rate limiting
  5. [TEST] Run test suite to validate

Example 2: Fix Bugs

rev "Fix all ESLint errors in src/ directory"

Generated Plan:

  1. [REVIEW] Run ESLint to identify all errors
  2. [EDIT] Fix import order issues
  3. [EDIT] Fix unused variable warnings
  4. [EDIT] Fix indentation errors
  5. [TEST] Run ESLint again to verify fixes

Example 3: Refactoring

rev "Refactor authentication logic into separate service"

Generated Plan:

  1. [REVIEW] Analyze current authentication code
  2. [ADD] Create AuthService class
  3. [EDIT] Extract auth logic to service
  4. [EDIT] Update controllers to use AuthService
  5. [EDIT] Update dependency injection
  6. [TEST] Run integration tests

How It Works

Planning Phase

The agent uses Ollama to:

  1. Analyze repository context (git status, file structure, recent commits)
  2. Understand your request
  3. Break it into atomic, ordered tasks
  4. Classify each task by type (review, edit, add, delete, test)

Execution Phase

For each task, the agent:

  1. Gathers context using tools like read_file, search_code, list_dir
  2. Makes changes using write_file or apply_patch (unified diffs)
  3. Validates changes by running run_tests
  4. Reports completion and moves to next task

Available Tools

The agent has access to 41 powerful tools across multiple categories:

New in v2.0.1: SSH remote execution! Connect to remote hosts, execute commands, and transfer files for managing your infrastructure.

New in v2.0.1: Cross-platform OS detection! The agent automatically detects your operating system (Windows, Linux, macOS) and adapts tool usage accordingly - choosing bash vs PowerShell, correct path separators, and platform-specific commands.

Core File Operations

Tool Description
read_file Read file contents
write_file Create or overwrite files
delete_file Delete a file
move_file Move or rename files
copy_file Copy a file to a new location
append_to_file Append content to a file
replace_in_file Find and replace text within a file (supports regex)
create_directory Create directories
get_file_info Get file metadata (size, modified time, etc.)
file_exists Check if a file or directory exists
read_file_lines Read specific line range from a file
tree_view Generate a tree view of directory structure

Code Discovery & Search

Tool Description
list_dir List files matching glob pattern
search_code Search code with regex (symbolic search)
rag_search Semantic code search using RAG/TF-IDF (NEW!)

Git Operations

Tool Description
git_diff View current uncommitted changes
git_status Get detailed git status
git_log Get git commit history
git_commit Commit changes with a message
git_branch Git branch operations (list, create, switch, current)
apply_patch Apply unified diff patches
get_repo_context Get git status and repo structure

Command Execution

Tool Description
run_cmd Execute shell commands
run_tests Run test suite (pytest, npm test, etc.)

Utility Tools

Tool Description
install_package Install Python packages using pip
web_fetch Fetch content from URLs
execute_python Execute Python code snippets
get_system_info Get system info (OS, version, architecture, shell type)

SSH Remote Execution

Tool Description
ssh_connect Connect to a remote host via SSH
ssh_exec Execute commands on a remote host
ssh_copy_to Copy a file to a remote host
ssh_copy_from Copy a file from a remote host
ssh_disconnect Disconnect from a remote host
ssh_list_connections List all active SSH connections

MCP (Model Context Protocol) Support

Tool Description
mcp_add_server Add an MCP server for extended capabilities
mcp_list_servers List configured MCP servers
mcp_call_tool Call tools on MCP servers

New in v2.0.1: MCP support allows the agent to connect to external tools and data sources through the Model Context Protocol, enabling integration with databases, APIs, and other development tools.

New in v2.0.1: Rev now includes 9 default MCP servers for enhanced coding capabilities:

  • ๐Ÿง  Core: memory, sequential-thinking, fetch
  • ๐Ÿš€ Coding & CI/CD: DeepWiki (GitHub search), Exa Search (code search), Semgrep (static analysis)
  • ๐Ÿ“š Docs: Cloudflare Docs, Astro Docs
  • ๐Ÿค– AI/ML: Hugging Face

๐Ÿ”’ Private Mode: Use /private on to disable all public MCP servers when working with secure/unsharable code. See MCP_SERVERS.md for details.

Advanced Code Analysis Tools (NEW!)

New in v2.0.1: Five powerful analysis tools for improved development accuracy, review, and bug fixing:

Tool Description Use Case
analyze_test_coverage Test coverage analysis using coverage.py/Istanbul Check coverage before modifying code
analyze_code_context Git history, bug fixes, code churn analysis Understand why code exists before refactoring
find_symbol_usages Find all references to functions/classes/variables Assess impact before renaming/deleting
analyze_dependencies Dependency graph with impact radius Understand ripple effects before changes
analyze_semantic_diff Detect breaking changes beyond line diffs Verify backward compatibility

How Agents Use These Tools:

# Before refactoring, agents automatically:
rev "Refactor UserService.authenticate method"

# 1. analyze_test_coverage() โ†’ Ensures 85% coverage exists
# 2. analyze_code_context() โ†’ Discovers recent bug fix for race condition
# 3. find_symbol_usages() โ†’ Finds 47 usages across 12 files
# 4. analyze_dependencies() โ†’ Calculates HIGH impact radius
# 5. Makes changes with full awareness
# 6. analyze_semantic_diff() โ†’ Verifies no breaking changes

Benefits:

  • ๐Ÿ›ก๏ธ Prevents bugs: Understands historical context to avoid re-introducing bugs
  • ๐ŸŽฏ Impact awareness: Knows exactly what will break before making changes
  • โœ… Coverage validation: Ensures adequate tests exist before modifications
  • ๐Ÿ” Dependency tracking: Maps full impact radius of changes
  • โšก Breaking change detection: Automatic backward compatibility checks

These tools transform Rev from "code modifier" to "intelligent code surgeon" with full awareness of consequences.

Troubleshooting

"Ollama API error: Connection refused"

Ensure Ollama is running:

ollama serve

"Model not found"

Pull the model first:

ollama pull gpt-oss:120b-cloud

"401 Unauthorized" for Cloud Models

Cloud models (ending with -cloud) require authentication. The agent will:

  1. Detect the 401 error automatically
  2. Display a signin URL
  3. Wait for you to authenticate

Steps to authenticate:

# When you see the authentication prompt:
# 1. Visit the displayed URL in your browser
# 2. Sign in with your Ollama account
# 3. Authorize the device
# 4. Press Enter to continue

# The authentication persists, so you only need to do this once per device

Example:

rev --model qwen3-coder:480b-cloud "Review code"

# Output:
# ============================================================
# OLLAMA CLOUD AUTHENTICATION REQUIRED
# ============================================================
# Model 'qwen3-coder:480b-cloud' requires authentication.
#
# To authenticate:
# 1. Visit this URL in your browser:
#    https://ollama.com/connect?name=YOUR-DEVICE&key=...
#
# 2. Sign in with your Ollama account
# 3. Authorize this device
# ============================================================
#
# Press Enter after completing authentication...

"400 Bad Request" or "Model not using tools"

Some Ollama models don't support function/tool calling. This is normal for older or smaller models.

Models with tool support (recommended):

  • llama3.1 (8B, 70B, 405B)
  • mistral-nemo
  • mistral-large
  • qwen2.5 (7B and up)
  • phi3.5

How to fix:

  1. Use a model with tool support:

    ollama pull llama3.1:latest
    rev --model llama3.1:latest "Your task"
    
  2. Or enable debug mode to see what's happening:

    OLLAMA_DEBUG=1 rev "Your task"
    

The agent will automatically retry without tools if it detects the model doesn't support them, but tool support is highly recommended for best results.

"Path escapes repo"

rev only operates within the current repository for safety. Use relative paths.

Tasks not completing

Try a more specific request or use a larger model:

rev --model deepseek-coder:33b "Your task"

Testing & Coverage

Test Coverage: 80% - Production Ready โœ…

  • 136 tests passing (100% pass rate)
  • 800+ statements in the rev package
  • Cross-platform tested (Linux, macOS, Windows detection)
  • SSH remote execution tested (connection management, file transfer)
  • 99% test code coverage (tests are well-tested themselves)

What's Tested

  • โœ… File operations (read, write, delete, move, copy, append, replace)
  • โœ… Advanced file operations (file_exists, read_file_lines, tree_view)
  • โœ… Git operations (diff, patch, commit, status, log, branch)
  • โœ… Command execution and validation
  • โœ… Utility tools (install_package, web_fetch, execute_python, get_system_info)
  • โœ… System information detection (OS, version, shell type, caching)
  • โœ… SSH remote execution (connect, execute, file transfer, disconnect)
  • โœ… MCP (Model Context Protocol) integration
  • โœ… Task management (Task, ExecutionPlan)
  • โœ… Tool execution routing
  • โœ… Ollama integration (mocked)
  • โœ… Planning and execution modes
  • โœ… Security validations
  • โœ… REPL mode commands and session tracking
  • โœ… CLI argument parsing
  • โœ… Scary operation detection and prompting
  • โœ… Edge cases and error handling

Code Quality Initiatives

  • โœ… Static code analysis with automated linting
  • โœ… Type hinting for improved code clarity
  • โœ… Comprehensive documentation coverage
  • โœ… Security scanning and vulnerability assessment
  • โœ… Performance benchmarking and optimization
  • โœ… Cross-platform compatibility verification
  • โœ… Dependency security scanning

Running Tests

# Run all tests
python -m pytest tests -v

# Run with coverage report
python -m pytest tests --cov=rev --cov-report=term-missing

# Generate HTML coverage report
python -m pytest tests --cov=rev --cov-report=html

For detailed coverage information, see COVERAGE.md.

For future testing, quality, documentation, and security improvements, see RECOMMENDATIONS.md.

Advanced Planning

rev includes sophisticated planning capabilities that analyze your tasks before execution:

Features

๐Ÿ” Dependency Analysis

  • Automatically determines optimal task ordering
  • Identifies parallelization opportunities
  • Calculates critical path through task dependencies

๐Ÿ“Š Impact Assessment

  • Predicts scope of changes before making them
  • Identifies affected files and modules
  • Estimates change magnitude

โš ๏ธ Risk Evaluation

  • Evaluates risk level for each task (๐ŸŸข LOW, ๐ŸŸก MEDIUM, ๐ŸŸ  HIGH, ๐Ÿ”ด CRITICAL)
  • Identifies potentially breaking changes
  • Flags dangerous operations (database, security, delete, etc.)

๐Ÿ”„ Rollback Planning

  • Automatically generates recovery procedures
  • Action-specific rollback steps
  • Database and production rollback guidance

Example Output:

============================================================
EXECUTION PLAN
============================================================
1. [REVIEW] Analyze current authentication module
   Risk: ๐ŸŸข LOW

2. [EDIT] Refactor auth to use dependency injection
   Risk: ๐ŸŸก MEDIUM (Destructive/modifying action: edit)
   Depends on: #1

3. [DELETE] Remove deprecated auth helpers
   Risk: ๐Ÿ”ด CRITICAL (Destructive/modifying action: delete)
   Depends on: #2
   โš ๏ธ  Warning: Potentially breaking change

============================================================
PLANNING ANALYSIS SUMMARY
============================================================
Total tasks: 5
Risk distribution:
  ๐ŸŸข LOW: 2
  ๐ŸŸก MEDIUM: 2
  ๐Ÿ”ด CRITICAL: 1

โšก Parallelization potential: 3 tasks can run concurrently
   Critical path length: 4 steps

๐Ÿ”ด CRITICAL: 1 high-risk task(s) require extra caution
   - Task #3: Remove deprecated auth helpers...
     Rollback plan available
============================================================

Learn More: See ADVANCED_PLANNING.md for complete documentation.

Multi-Agent Quorum System

New in v2.0.1: rev now uses a 3-agent quorum system that provides intelligent review and validation at multiple stages for more accurate and secure code changes.

The Three Agents

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  1. PLANNING AGENT                                       โ”‚
โ”‚  โ€ข Breaks down complex requests into atomic tasks       โ”‚
โ”‚  โ€ข Analyzes dependencies and risks                      โ”‚
โ”‚  โ€ข Performs recursive breakdown for complex features    โ”‚
โ”‚  โ€ข Creates comprehensive execution plans                โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                    โ†“
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  2. REVIEW AGENT (NEW!)                                  โ”‚
โ”‚  โ€ข Validates execution plans before execution           โ”‚
โ”‚  โ€ข Reviews individual actions during execution          โ”‚
โ”‚  โ€ข Identifies security vulnerabilities                  โ”‚
โ”‚  โ€ข Suggests improvements and alternatives               โ”‚
โ”‚  โ€ข Checks for missing tasks or unnecessary steps        โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                    โ†“
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  3. EXECUTION AGENT                                      โ”‚
โ”‚  โ€ข Executes approved tasks sequentially or in parallel  โ”‚
โ”‚  โ€ข Calls tools and makes code changes                   โ”‚
โ”‚  โ€ข Validates results                                    โ”‚
โ”‚  โ€ข Applies recommendations from Review Agent            โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

How It Works

1. Planning Phase - The Planning Agent analyzes your request

rev "Add user authentication with JWT"

The Planning Agent will:

  • Analyze your repository structure
  • Break down the request into specific tasks
  • Identify dependencies between tasks
  • Assess risks for each task
  • Handle recursive breakdown for complex features

End-to-end flow (Planning โžœ Review โžœ Execution)

  1. rev "<task>" kicks off the planning phase to draft a full execution plan.
  2. The review phase evaluates completeness, safety, and risk before any edits occur.
  3. The execution phase applies the approved steps with validations and tests, stopping on failures and surfacing actionable errors.

This flow runs automatically for every request, ensuring the plan, review, and execution steps all complete instead of stopping after planning.

For example, a high-level task like "Implement authentication system" will be automatically broken down into:

  • Design authentication architecture
  • Create user model and database schema
  • Implement JWT token generation
  • Add authentication middleware
  • Create login/register endpoints
  • Write authentication tests

2. Review Phase - The Review Agent validates the plan

============================================================
REVIEW AGENT - PLAN REVIEW
============================================================
โ†’ Analyzing plan with review agent...

============================================================
REVIEW RESULTS
============================================================

Decision: โœ… APPROVED WITH SUGGESTIONS
Confidence: 85%

Plan is generally sound but could be improved

๐Ÿ’ก Suggestions (3):
  - Add rate limiting to prevent brute force attacks
  - Include password reset functionality
  - Add integration tests for authentication flow

๐Ÿ”’ Security Concerns (1):
  - Ensure JWT secrets are stored in environment variables
============================================================

The Review Agent examines:

  • Completeness: Are all necessary tasks included?
  • Security: Are there potential vulnerabilities?
  • Best Practices: Does the plan follow industry standards?
  • Edge Cases: Are error cases handled?
  • Dependencies: Are task dependencies correct?

3. Execution Phase - The Execution Agent runs the tasks

  • Each task is executed with full context
  • Optional: Action-level review can validate each tool call
  • Results are validated and tested

Review Modes

Plan Review (Default: Enabled)

# Enable plan review (default)
rev "Add authentication"

# Disable plan review
rev --no-review "Add authentication"

# Adjust review strictness
rev --review-strictness strict "Delete old migrations"
rev --review-strictness lenient "Add logging"

Strictness levels:

  • Lenient: Only flags critical issues
  • Moderate (default): Flags medium+ severity issues
  • Strict: Flags all potential issues

Action Review (Optional: Disabled by default)

# Enable action-level review (reviews each tool call)
rev --action-review "Implement payment processing"

Action review provides real-time validation:

  • Detects command injection vulnerabilities
  • Identifies hardcoded secrets
  • Warns about SQL injection risks
  • Suggests alternative approaches
  • Validates file operations

Review Decision Types

The Review Agent can make four types of decisions:

โœ… APPROVED - Plan is safe and complete

โœ… Plan approved by review agent.

โœ… APPROVED WITH SUGGESTIONS - Plan is good but has recommendations

โœ… Plan approved with suggestions. Review recommendations above.

๐Ÿ’ก Suggestions:
  - Add error handling for edge cases
  - Consider adding validation tests

โš ๏ธ REQUIRES CHANGES - Plan has issues that should be addressed

โš ๏ธ Plan requires changes. Review the issues above.
Continue anyway? (y/N):

โŒ REJECTED - Plan has critical issues

โŒ Plan rejected by review agent. Please revise your request.

๐Ÿ”ด Issues:
  - CRITICAL: Hardcoded database credentials
  - HIGH: Missing input validation

Benefits of Multi-Agent System

๐Ÿ›ก๏ธ Enhanced Security

  • Automatic detection of security vulnerabilities
  • Multiple layers of validation before code changes
  • Quick security checks without LLM calls (command injection, secrets, etc.)

๐ŸŽฏ Better Accuracy

  • Identifies missing tasks before execution
  • Catches logical errors in plans
  • Suggests improvements and alternative approaches

๐Ÿ“š Complex Task Handling

  • Recursive breakdown for large features
  • Automatic decomposition of high-complexity tasks
  • Better handling of multi-step implementations

โšก Smart Defaults

  • Auto-approves low-risk plans (review only, read-only operations)
  • Focuses review effort on high-risk changes
  • Configurable strictness for different scenarios

Example: Complex Feature with Review

rev "Implement a REST API for user management with authentication, validation, and tests"

Planning Agent Output:

โ†’ Checking for complex tasks...
  โ”œโ”€ Breaking down complex task: Implement REST API authentication...
     โ””โ”€ Expanded into 8 subtasks

EXECUTION PLAN
1. [REVIEW] Analyze current project structure
2. [ADD] Create user model with validation
3. [ADD] Implement JWT authentication middleware
4. [ADD] Create user registration endpoint
5. [ADD] Create user login endpoint
6. [ADD] Add password hashing utilities
7. [ADD] Write unit tests for authentication
8. [ADD] Write integration tests for API endpoints
9. [TEST] Run full test suite

Review Agent Output:

REVIEW RESULTS

Decision: โœ… APPROVED WITH SUGGESTIONS
Confidence: 90%

Plan provides comprehensive REST API implementation

๐Ÿ’ก Suggestions (3):
  - Add rate limiting to login endpoint
  - Include password reset functionality
  - Add API documentation (OpenAPI/Swagger)

๐Ÿ”’ Security Concerns (2):
  - Ensure JWT secrets use environment variables
  - Add HTTPS requirement for production

The quorum ensures:

  • Planning Agent decomposes the complex request
  • Review Agent validates completeness and security
  • Execution Agent implements with confidence

Configuration Options

# Full control over review behavior
rev \
  --review \                      # Enable plan review (default)
  --review-strictness moderate \  # Set strictness level
  --action-review \               # Enable action-level review
  "Your complex task"

# Minimal review for simple tasks
rev \
  --review-strictness lenient \
  "Update documentation"

# Maximum scrutiny for critical changes
rev \
  --review-strictness strict \
  --action-review \
  "Migrate database schema"

Best Practices with Multi-Agent System:

  1. Use default settings for most tasks - they provide good balance
  2. Enable action review for security-critical operations (auth, payments, database)
  3. Use strict mode when working with production code or critical infrastructure
  4. Use lenient mode for documentation updates or low-risk refactoring
  5. Review suggestions even when approved - they often provide valuable insights

Best Practices

  1. Be Specific โ€” Clearer requests generate better plans

    • โœ— "Fix the code"
    • โœ“ "Add null checks to user input validation in api/users.js"
  2. Start Small โ€” Test with simple tasks first

    • โœ— "Rewrite entire authentication system"
    • โœ“ "Add password strength validation"
  3. Use Appropriate Models

    • Small tasks: codellama:7b (fast)
    • Complex refactoring: codellama:34b or deepseek-coder:33b
  4. Review Changes โ€” Use git diff before committing

    rev "Add feature X"
    git diff  # Review changes
    git commit -am "Add feature X"
    
  5. Iterative Development โ€” Use REPL for interactive work

    rev --repl
    
  6. Documentation First โ€” Review documentation before making changes

    • Use rev "Review all documentation files" to understand the codebase
    • Keep documentation updated alongside code changes
    • Add docstrings and inline comments for complex logic
    • See RECOMMENDATIONS.md for documentation improvement ideas
  7. Security Conscious Development โ€” Follow security best practices

    • Review security recommendations in RECOMMENDATIONS.md
    • Validate all inputs and sanitize file paths
    • Keep dependencies updated and scan for vulnerabilities
    • Implement least privilege principles for file operations
    • Use secure communication channels for remote execution

Built-in Utilities

rev includes powerful utility functions for common development tasks:

File Format Conversion

Convert between common file formats without external tools:

# JSON โ†” YAML
rev "Convert config.json to YAML format"
rev "Convert docker-compose.yaml to JSON"

# CSV โ†” JSON
rev "Convert users.csv to JSON array"
rev "Convert data.json to CSV format"

# .env to JSON
rev "Convert .env to JSON configuration"

Code Refactoring

Automated code analysis and improvement:

# Remove unused imports
rev "Remove unused imports from src/app.py"

# Extract magic numbers to constants
rev "Find magic numbers in config.py that should be constants"

# Simplify complex conditionals
rev "Analyze validator.py for overly complex if statements"

Dependency Management

Multi-language dependency analysis and updates:

# Analyze dependencies (auto-detects Python/JavaScript/Rust/Go)
rev "Analyze project dependencies and check for issues"

# Check for outdated packages
rev "Check for outdated dependencies"
rev "Find outdated packages including major version updates"

Security Scanning

Comprehensive security analysis:

# Scan for vulnerabilities
rev "Scan dependencies for known security vulnerabilities"

# Static code security analysis
rev "Run security scan on src/ directory"

# Detect secrets
rev "Scan repository for accidentally committed secrets"

# Check license compliance
rev "Check dependency licenses for GPL and restrictive licenses"

See UTILITIES.md for complete documentation, API reference, and integration examples.

Intelligent Caching

rev includes a high-performance caching system that dramatically improves speed by caching frequently accessed data:

Cache Types

File Content Cache (60s TTL)

  • Caches file contents with automatic invalidation on file modification
  • 10-100x faster for repeatedly accessed files

LLM Response Cache (1 hour TTL)

  • Caches identical LLM queries to avoid redundant API calls
  • Near-instant responses for repeated questions
  • Significant cost savings for cloud models

Repository Context Cache (30s TTL)

  • Caches git status, logs, and file trees
  • Invalidates automatically on new commits
  • 5-20x faster for repository queries

Dependency Tree Cache (10 min TTL)

  • Caches dependency analysis results
  • Invalidates when dependency files change
  • 10-50x faster for dependency operations

Usage

# View cache statistics
rev "Show cache statistics"

# Clear caches (useful after major changes)
rev "Clear all caches"
rev "Clear LLM response cache"

# Caches persist automatically to .rev_cache/

Performance Impact

Real-world improvements:

  • File reads: 10-40x faster (repeated access)
  • Repo context: 20-100x faster
  • Dependency analysis: 40-200x faster
  • Identical LLM queries: 400-2000x faster

Overall: 30-50% faster development iteration cycles, 40-60% reduction in cloud API costs.

See CACHING.md for complete documentation, configuration options, and optimization tips.

Advanced Usage

Custom Test Commands

The agent detects test frameworks automatically, but you can customize:

# For Python projects
rev "Fix failing tests" --model gpt-oss:120b-cloud

# For Node.js projects
rev "Add tests for new API endpoints"

Chain Multiple Tasks

rev "Add logging, then refactor error handling, then update tests"

The agent will create a plan that sequences these correctly.

CI/CD Integration

# In your CI pipeline
rev --yes "Run tests and fix any linting errors"
if [ $? -eq 0 ]; then
  git commit -am "Auto-fix linting issues"
  git push
fi

Allowed Commands

For security, only these commands are permitted:

  • Python: python, pip, pytest, ruff, black, isort, mypy
  • JavaScript: node, npm, npx, pnpm, prettier, eslint
  • Version Control: git
  • Build: make

File Structure

.
โ”œโ”€โ”€ rev/             # Package (CLI entry: `rev`)
โ”œโ”€โ”€ requirements.txt       # Minimal dependencies (just requests)
โ”œโ”€โ”€ tests/                 # Comprehensive test suite (planning, review, execution)
โ”‚   โ”œโ”€โ”€ test_agent.py      # Core agent behavior
โ”‚   โ”œโ”€โ”€ test_advanced_planning.py  # Multi-agent planning and validation
โ”‚   โ””โ”€โ”€ ...                # Additional integration and tool tests
โ”œโ”€โ”€ COVERAGE.md            # Detailed coverage report
โ”œโ”€โ”€ RECOMMENDATIONS.md     # Future improvement suggestions
โ””โ”€โ”€ README.md              # This file

License

MIT

Contributing

Contributions are welcome! This is a production-grade agentic development system focused on autonomous workflows with comprehensive analysis capabilities.

For feature requests or bug reports, please open an issue on GitHub.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rev_agentic-2.0.1.tar.gz (264.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rev_agentic-2.0.1-py3-none-any.whl (228.2 kB view details)

Uploaded Python 3

File details

Details for the file rev_agentic-2.0.1.tar.gz.

File metadata

  • Download URL: rev_agentic-2.0.1.tar.gz
  • Upload date:
  • Size: 264.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for rev_agentic-2.0.1.tar.gz
Algorithm Hash digest
SHA256 bb293cc9d9e96085e6bfaf990a092e64477fc8034e953e816448c60b3bff4c93
MD5 d3bbf03d831d4df8078a5a202a306021
BLAKE2b-256 9fb52eeb022826798678de4459c5f0263e480b4af92c361665ff52971e0ed574

See more details on using hashes here.

File details

Details for the file rev_agentic-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: rev_agentic-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 228.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for rev_agentic-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 01db4480bf7f9d6282442923b790cede27e7af0b6b82b98c01f47c21084e3b28
MD5 e09032aee71a2e770d36a68c91e788e1
BLAKE2b-256 75c28ae5321096b38ad29693bb6d7e58b7d05717185d3ecc3799ff45a2940441

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page