Skip to main content

Aider: AI-powered coding assistant rebuilt with Jac Object-Spatial Programming and Genius Mode

Project description

Rebuilding Aider with Jac

Autonomous Code Editor Powered by Jac Object-Spatial Programming

Developed by Team ByteBrains

🎥 Live Demonstration

Watch the system in action: View Complete Demo

See real-time autonomous code editing, multi-file coordination, and spatial programming capabilities demonstrated on production codebases.


Python 3.8+ Agentic AI OSP Technology Jac Language Multi-LLM License: MIT

Overview

An autonomous code editing system that demonstrates Agentic AI capabilities through intelligent task planning, multi-file coordination, and spatial code analysis. Built with Python-Jac integration for professional development workflows.

Key Achievements:

  • 25.8% token cost reduction on production codebases
  • Multi-file autonomous editing with coordinated changes
  • Spatial code analysis using Object-Spatial Programming algorithms
  • Professional CLI interface with comprehensive operation tracking
  • Multi-LLM provider support including cost-effective models

Installation

git clone https://github.com/ThiruvarankanM/Rebuilding-Aider-with-Jac-OSP.git
cd Rebuilding-Aider-with-Jac-OSP
python -m venv .venv
source .venv/bin/activate
pip install -e .

Configuration

Set up the system:

aider-genius setup

Configure API settings in ~/.aider-genius/config.json:

{
  "llm_provider": "openrouter",
  "model": "google/gemma-2-9b-it:free",
  "api_key": "your-openrouter-key",
  "max_tokens": 4000,
  "temperature": 0.2
}

Usage

Project Analysis

aider-genius analyze                    # Analyze entire project structure
aider-genius analyze --dir src/         # Directory-specific analysis
aider-genius analyze --files main.py utils.py --verbose

Cost Optimization

aider-genius optimize main.py          # Single file optimization
aider-genius optimize --files *.py     # Batch optimization

Autonomous Editing

aider-genius edit "add error handling"
aider-genius edit "improve logging" --files app.py utils.py
aider-genius edit "optimize performance" --dry-run

Architecture

Core System Components

The system implements autonomous intelligence through:

  • Task Planning: Independent decomposition of high-level objectives
  • Spatial Analysis: Multi-dimensional code relationship understanding
  • Coordinated Execution: Synchronized multi-file modification strategies
  • Adaptive Learning: Pattern recognition for improved decision making

Technology Stack

  • Python: Core system implementation and LLM integration
  • Jac: Object-Spatial Programming for advanced code analysis
  • Rich: Professional terminal interface with visual formatting
  • Multi-LLM: OpenAI, Anthropic, OpenRouter provider support

Project Structure

aider/
├── cli.py                     # Command-line interface
├── integration/
│   ├── jac_bridge.py         # Python-Jac integration layer
│   ├── file_editor.py        # Autonomous editing engine
│   ├── llm_client.py         # Multi-provider LLM client
│   └── osp_interface.py      # Spatial programming interface
└── jac/                      # Spatial programming modules
    ├── repomap_osp.jac       # File ranking algorithms
    ├── token_optimizer.jac   # Cost optimization
    ├── planning_walker.jac   # Task decomposition
    └── context_gatherer.jac  # Context optimization

Key Features

Autonomous Code Understanding

  • Real-time analysis of project structure and dependencies
  • Intelligent file relevance scoring using spatial algorithms
  • Cross-component relationship mapping for coordinated changes
  • Pattern recognition for consistent code style maintenance

Professional Development Integration

  • Comprehensive backup system with version control
  • Dry-run mode for safe change preview
  • Git integration for collaborative workflows
  • Enterprise-grade error handling and logging

Cost-Effective Operation

  • Proven 25.8% token reduction on large codebases
  • Support for free-tier LLM models
  • Intelligent prompt optimization for minimal API usage
  • Configurable resource limits and usage tracking

Performance Metrics

Feature Result Impact
Token Optimization 25.8% reduction Significant cost savings
File Analysis 23+ files processed Comprehensive coverage
Multi-file Coordination Multiple simultaneous edits Synchronized changes
Processing Speed Sub-3 second response Real-time workflow

Object-Spatial Programming Integration

Aider-Genius utilizes Object-Spatial Programming (OSP) for advanced code analysis:

  • Spatial code graphs for relationship visualization
  • Multi-dimensional dependency analysis
  • Context-aware code selection and modification
  • Predictive impact assessment across file boundaries

Supported LLM Providers

  • OpenAI: Complete GPT model support
  • Anthropic: Claude integration
  • OpenRouter: Multi-model access with free tiers
  • Custom: Extensible provider system

Command Reference

Command Description
aider-genius setup Initialize system configuration
aider-genius analyze Perform spatial code analysis
aider-genius optimize Optimize token usage and costs
aider-genius edit <task> Execute autonomous editing tasks
aider-genius --help Display comprehensive help

Testing

# Verify system functionality
python system_test.py

# Test autonomous capabilities
aider-genius edit "comprehensive code improvement" --dry-run

Contributing

  1. Fork the repository
  2. Create feature branches for enhancements
  3. Submit pull requests with comprehensive testing
  4. Follow established code quality standards

Future Enhancements

  • Advanced LLM integration (GPT-4, Claude-3)
  • Web-based interface for visual spatial programming
  • IDE plugins for native development environment integration
  • Enhanced pattern recognition with AST-based analysis
  • Team collaboration features with multi-developer coordination

License

MIT License - Open source autonomous AI innovation


Professional autonomous coding solution powered by Agentic AI and Object-Spatial Programming | Team ByteBrains

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

aider_jac_osp-2.0.1.tar.gz (116.5 kB view details)

Uploaded Source

Built Distribution

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

aider_jac_osp-2.0.1-py3-none-any.whl (126.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: aider_jac_osp-2.0.1.tar.gz
  • Upload date:
  • Size: 116.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for aider_jac_osp-2.0.1.tar.gz
Algorithm Hash digest
SHA256 85321f6c4a5a5893b2b9b75224d8f865e71d9c0715d030e6fcc36c1520ab10c7
MD5 b32d15f62d044be5200016c990b54580
BLAKE2b-256 a5cd0fb18ad7403001924956c77f0f0f35a9f20b8c0da39300b5c5be559f7963

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aider_jac_osp-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 126.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for aider_jac_osp-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c3ec3bc3ed22d2075f33516cd8be591256d1903e2b93705dbae234d950b640b4
MD5 4f4d394d0827215fdc0e8897e7b6dfb7
BLAKE2b-256 6f67a50a54402dc928f4d7e59885ecb6d253367817c1cb1cbc8a61d496e5cd31

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