# Rebuilding Aider with Jac
**Autonomous Code Editor Powered by Jac Object-Spatial Programming**
*Developed by Team ByteBrains*
## 🎥 Live Demonstration
**Watch the system in action:**
- **🤖 Agent Mode Demo:** [Autonomous Agentic AI Operations](https://youtu.be/2h2Y8VzGq8g)
- **⚙️ Standard Mode Demo:** [Standard Code Editing Features](https://youtu.be/qP_V97Zia7s)
See real-time autonomous code editing, multi-file coordination, and spatial programming capabilities demonstrated on production codebases.
---
[](https://www.python.org/downloads/)
[](https://openrouter.ai/)
[](https://github.com/ThiruvarankanM/Rebuilding-Aider-with-Jac-OSP)
[](https://docs.jac-lang.org/)
[](https://openrouter.ai/)
[](https://opensource.org/licenses/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
### Option 1: PyPI Package (Recommended)
```bash
pip install aider-jac-osp
```
### Option 2: Docker Container
```bash
# Build and run with Docker
docker build -t aider-jac-osp .
docker run -it -v $(pwd):/workspace aider-jac-osp
# Or use docker-compose
docker-compose up aider-jac-osp
```
### Option 3: Development Setup
```bash
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:
```bash
aider-genius setup
```
Configure API settings in `~/.aider-genius/config.json`:
```json
{
"llm_provider": "openrouter",
"model": "google/gemma-2-9b-it:free",
"api_key": "your-openrouter-key",
"max_tokens": 4000,
"temperature": 0.2
}
```
## Usage
### Quick Start
```bash
# Install the package
pip install aider-jac-osp
# Basic usage
aider --help # Standard aider interface
aider-genius --help # Advanced genius mode
```
### Project Analysis
```bash
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
```bash
aider-genius optimize main.py # Single file optimization
aider-genius optimize --files *.py # Batch optimization
```
### Autonomous Editing
```bash
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
```bash
# Install and verify package
pip install aider-jac-osp
pip show aider-jac-osp
# Test functionality
aider --version
aider-genius analyze --dry-run
python -c "import aider; print('Import successful')"
# Development testing
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**
Raw data
{
"_id": null,
"home_page": "https://github.com/ThiruvarankanM/Rebuilding-Aider-with-Jac-OSP",
"name": "aider-jac-osp",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "AI assistant LLM code OSP MTP Jac automation spatial-programming genius-mode",
"author": "Thiruvarankan M",
"author_email": "thiru07official@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/47/bd/3e6cd5f9b0a20171e8a8de7d13d8dd044f8ee48c1ef4594b7ccfa65dcb5b/aider_jac_osp-2.0.2.tar.gz",
"platform": null,
"description": "# Rebuilding Aider with Jac\n\n**Autonomous Code Editor Powered by Jac Object-Spatial Programming**\n\n*Developed by Team ByteBrains*\n\n## \ud83c\udfa5 Live Demonstration\n\n**Watch the system in action:**\n\n- **\ud83e\udd16 Agent Mode Demo:** [Autonomous Agentic AI Operations](https://youtu.be/2h2Y8VzGq8g)\n- **\u2699\ufe0f Standard Mode Demo:** [Standard Code Editing Features](https://youtu.be/qP_V97Zia7s)\n\nSee real-time autonomous code editing, multi-file coordination, and spatial programming capabilities demonstrated on production codebases.\n\n---\n\n[](https://www.python.org/downloads/)\n[](https://openrouter.ai/)\n[](https://github.com/ThiruvarankanM/Rebuilding-Aider-with-Jac-OSP)\n[](https://docs.jac-lang.org/)\n[](https://openrouter.ai/)\n[](https://opensource.org/licenses/MIT)\n\n## Overview\n\nAn 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.\n\n**Key Achievements:**\n- 25.8% token cost reduction on production codebases\n- Multi-file autonomous editing with coordinated changes\n- Spatial code analysis using Object-Spatial Programming algorithms\n- Professional CLI interface with comprehensive operation tracking\n- Multi-LLM provider support including cost-effective models\n\n## Installation\n\n### Option 1: PyPI Package (Recommended)\n```bash\npip install aider-jac-osp\n```\n\n### Option 2: Docker Container\n```bash\n# Build and run with Docker\ndocker build -t aider-jac-osp .\ndocker run -it -v $(pwd):/workspace aider-jac-osp\n\n# Or use docker-compose\ndocker-compose up aider-jac-osp\n```\n\n### Option 3: Development Setup\n```bash\ngit clone https://github.com/ThiruvarankanM/Rebuilding-Aider-with-Jac-OSP.git\ncd Rebuilding-Aider-with-Jac-OSP\npython -m venv .venv\nsource .venv/bin/activate\npip install -e .\n```\n\n## Configuration\n\nSet up the system:\n```bash\naider-genius setup\n```\n\nConfigure API settings in `~/.aider-genius/config.json`:\n```json\n{\n \"llm_provider\": \"openrouter\",\n \"model\": \"google/gemma-2-9b-it:free\",\n \"api_key\": \"your-openrouter-key\",\n \"max_tokens\": 4000,\n \"temperature\": 0.2\n}\n```\n\n## Usage\n\n### Quick Start\n```bash\n# Install the package\npip install aider-jac-osp\n\n# Basic usage\naider --help # Standard aider interface\naider-genius --help # Advanced genius mode\n```\n\n### Project Analysis\n```bash\naider-genius analyze # Analyze entire project structure\naider-genius analyze --dir src/ # Directory-specific analysis\naider-genius analyze --files main.py utils.py --verbose\n```\n\n### Cost Optimization\n```bash\naider-genius optimize main.py # Single file optimization\naider-genius optimize --files *.py # Batch optimization\n```\n\n### Autonomous Editing\n```bash\naider-genius edit \"add error handling\"\naider-genius edit \"improve logging\" --files app.py utils.py\naider-genius edit \"optimize performance\" --dry-run\n```\n\n## Architecture\n\n### Core System Components\n\nThe system implements autonomous intelligence through:\n\n- **Task Planning**: Independent decomposition of high-level objectives\n- **Spatial Analysis**: Multi-dimensional code relationship understanding\n- **Coordinated Execution**: Synchronized multi-file modification strategies\n- **Adaptive Learning**: Pattern recognition for improved decision making\n\n### Technology Stack\n- **Python**: Core system implementation and LLM integration\n- **Jac**: Object-Spatial Programming for advanced code analysis\n- **Rich**: Professional terminal interface with visual formatting\n- **Multi-LLM**: OpenAI, Anthropic, OpenRouter provider support\n\n### Project Structure\n```\naider/\n\u251c\u2500\u2500 cli.py # Command-line interface\n\u251c\u2500\u2500 integration/\n\u2502 \u251c\u2500\u2500 jac_bridge.py # Python-Jac integration layer\n\u2502 \u251c\u2500\u2500 file_editor.py # Autonomous editing engine\n\u2502 \u251c\u2500\u2500 llm_client.py # Multi-provider LLM client\n\u2502 \u2514\u2500\u2500 osp_interface.py # Spatial programming interface\n\u2514\u2500\u2500 jac/ # Spatial programming modules\n \u251c\u2500\u2500 repomap_osp.jac # File ranking algorithms\n \u251c\u2500\u2500 token_optimizer.jac # Cost optimization\n \u251c\u2500\u2500 planning_walker.jac # Task decomposition\n \u2514\u2500\u2500 context_gatherer.jac # Context optimization\n```\n\n## Key Features\n\n### Autonomous Code Understanding\n- Real-time analysis of project structure and dependencies\n- Intelligent file relevance scoring using spatial algorithms\n- Cross-component relationship mapping for coordinated changes\n- Pattern recognition for consistent code style maintenance\n\n### Professional Development Integration\n- Comprehensive backup system with version control\n- Dry-run mode for safe change preview\n- Git integration for collaborative workflows\n- Enterprise-grade error handling and logging\n\n### Cost-Effective Operation\n- Proven 25.8% token reduction on large codebases\n- Support for free-tier LLM models\n- Intelligent prompt optimization for minimal API usage\n- Configurable resource limits and usage tracking\n\n## Performance Metrics\n\n| Feature | Result | Impact |\n|---------|--------|---------|\n| Token Optimization | 25.8% reduction | Significant cost savings |\n| File Analysis | 23+ files processed | Comprehensive coverage |\n| Multi-file Coordination | Multiple simultaneous edits | Synchronized changes |\n| Processing Speed | Sub-3 second response | Real-time workflow |\n\n## Object-Spatial Programming Integration\n\nAider-Genius utilizes Object-Spatial Programming (OSP) for advanced code analysis:\n\n- Spatial code graphs for relationship visualization\n- Multi-dimensional dependency analysis\n- Context-aware code selection and modification\n- Predictive impact assessment across file boundaries\n\n## Supported LLM Providers\n\n- **OpenAI**: Complete GPT model support\n- **Anthropic**: Claude integration\n- **OpenRouter**: Multi-model access with free tiers\n- **Custom**: Extensible provider system\n\n## Command Reference\n\n| Command | Description |\n|---------|-------------|\n| `aider-genius setup` | Initialize system configuration |\n| `aider-genius analyze` | Perform spatial code analysis |\n| `aider-genius optimize` | Optimize token usage and costs |\n| `aider-genius edit <task>` | Execute autonomous editing tasks |\n| `aider-genius --help` | Display comprehensive help |\n\n## Testing\n\n```bash\n# Install and verify package\npip install aider-jac-osp\npip show aider-jac-osp\n\n# Test functionality\naider --version\naider-genius analyze --dry-run\npython -c \"import aider; print('Import successful')\"\n\n# Development testing\npython system_test.py\n\n# Test autonomous capabilities\naider-genius edit \"comprehensive code improvement\" --dry-run\n```\n\n## Contributing\n\n1. Fork the repository\n2. Create feature branches for enhancements\n3. Submit pull requests with comprehensive testing\n4. Follow established code quality standards\n\n## Future Enhancements\n\n- Advanced LLM integration (GPT-4, Claude-3)\n- Web-based interface for visual spatial programming\n- IDE plugins for native development environment integration\n- Enhanced pattern recognition with AST-based analysis\n- Team collaboration features with multi-developer coordination\n\n## License\n\nMIT License - Open source autonomous AI innovation\n\n---\n\n**Professional autonomous coding solution powered by Agentic AI and Object-Spatial Programming | Team ByteBrains**\n",
"bugtrack_url": null,
"license": null,
"summary": "Aider: AI-powered coding assistant rebuilt with Jac Object-Spatial Programming and Genius Mode",
"version": "2.0.2",
"project_urls": {
"Homepage": "https://github.com/ThiruvarankanM/Rebuilding-Aider-with-Jac-OSP"
},
"split_keywords": [
"ai",
"assistant",
"llm",
"code",
"osp",
"mtp",
"jac",
"automation",
"spatial-programming",
"genius-mode"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "7610d732dda16f942753360fea0130dd23a77479d68f104e88d21a6f0133706d",
"md5": "5394af30590a0b438ef4e6a4e6d99a0c",
"sha256": "82bce07fa6cb4f3d1c57a3f3522fe48b6bdd2e1d9dfc03787697d668e3e6b681"
},
"downloads": -1,
"filename": "aider_jac_osp-2.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5394af30590a0b438ef4e6a4e6d99a0c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 151642,
"upload_time": "2025-09-03T05:40:04",
"upload_time_iso_8601": "2025-09-03T05:40:04.951820Z",
"url": "https://files.pythonhosted.org/packages/76/10/d732dda16f942753360fea0130dd23a77479d68f104e88d21a6f0133706d/aider_jac_osp-2.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "47bd3e6cd5f9b0a20171e8a8de7d13d8dd044f8ee48c1ef4594b7ccfa65dcb5b",
"md5": "c148c8be72959d30a9f81223cd091332",
"sha256": "6b819a84e5020d19f12d104f1ce8dd4c2ac48da322fdc7e0f65b18379f4a6746"
},
"downloads": -1,
"filename": "aider_jac_osp-2.0.2.tar.gz",
"has_sig": false,
"md5_digest": "c148c8be72959d30a9f81223cd091332",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 142272,
"upload_time": "2025-09-03T05:40:06",
"upload_time_iso_8601": "2025-09-03T05:40:06.749048Z",
"url": "https://files.pythonhosted.org/packages/47/bd/3e6cd5f9b0a20171e8a8de7d13d8dd044f8ee48c1ef4594b7ccfa65dcb5b/aider_jac_osp-2.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-09-03 05:40:06",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ThiruvarankanM",
"github_project": "Rebuilding-Aider-with-Jac-OSP",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "rich",
"specs": [
[
">=",
"13.5.0"
]
]
},
{
"name": "prompt-toolkit",
"specs": [
[
">=",
"3.0.0"
]
]
},
{
"name": "configargparse",
"specs": [
[
">=",
"1.7.0"
]
]
},
{
"name": "pyperclip",
"specs": [
[
">=",
"1.8.0"
]
]
},
{
"name": "pillow",
"specs": [
[
">=",
"9.0.0"
]
]
},
{
"name": "litellm",
"specs": [
[
">=",
"1.0.0"
]
]
},
{
"name": "openai",
"specs": [
[
">=",
"1.0.0"
]
]
},
{
"name": "anthropic",
"specs": [
[
">=",
"0.7.0"
]
]
},
{
"name": "tiktoken",
"specs": [
[
">=",
"0.7.0"
]
]
},
{
"name": "tree-sitter",
"specs": [
[
">=",
"0.20.0"
]
]
},
{
"name": "gitpython",
"specs": [
[
">=",
"3.1.0"
]
]
},
{
"name": "aiofiles",
"specs": [
[
">=",
"23.0.0"
]
]
},
{
"name": "pydantic",
"specs": [
[
">=",
"2.0.0"
]
]
},
{
"name": "json5",
"specs": [
[
">=",
"0.9.0"
]
]
},
{
"name": "pyyaml",
"specs": [
[
">=",
"6.0.0"
]
]
},
{
"name": "shtab",
"specs": [
[
">=",
"1.6.0"
]
]
},
{
"name": "python-dotenv",
"specs": [
[
">=",
"1.0.0"
]
]
}
],
"lcname": "aider-jac-osp"
}