Releases: dharan1007/codebase--os
the agentic ai that will give u unlimited coding help and replaces ur antigravity and claude code
Codebase OS (COS) is far more than a simple LLM wrapper; it is a High-Fidelity Engineering Platform designed to handle complex, real-world software tasks with industrial-grade safety and autonomy.
Here is a deep dive into its most advanced features and "hidden" capabilities:
- The "Unstoppable" Autonomous Agent (cos agent)
Unlike standard agents that might get confused or loop indefinitely, COS uses a Three-Expert Workflow:
Phase 1: The Architect: Before writing a single line of code, the system spawns an "Architect" agent. It scans the repository, builds a technical strategy, and identifies the correct files to modify.
Phase 2: The Actor: The main agent executes the plan using a "Context Shield" to prevent message bloat. It can read files, write code, and run shell commands (like npm test or tsc) to verify its work.
Phase 3: The Reviewer: After completion, a specialized "Security Reviewer" audits the changes for hardcoded secrets, logic bugs, or security vulnerabilities before giving the final [SAFE] approval.
2. Self-Healing Executor
This is a key differentiator. If the AI applies a change that introduces a compilation error:
Automatic Detection: The SelfHealingExecutor immediately detects the failure using the local environment's diagnostics (e.g., TypeScript compiler).
Surgical Repair: Instead of starting over, it creates "Heal Tasks"—targeted requests to fix only the specific lines it broke while preserving all other logic.
Max Retries: It will attempt to "heal" itself up to 3 times automatically before ever asking the user for help.
3. Atomic Safety & Checkpoints
COS treats every AI interaction like a database transaction:
Checkpoints: Every single file write and agent step is autosaved to a local Database. If your internet cuts out or you stop the process, you can run cos continue to resume exactly where the AI left off.
Local Snapshots: Before the AI modifies a file, COS takes a snapshot. This allows for the cos rollback command, which can undo complex, multi-file changes with 100% precision.
4. Semantic Relationship Graph
While other tools use "RAG" (searching text for keywords), COS uses a Graph-Based Context:
Impact Analysis: If you ask it to refactor a function, it doesn't just search for the function name. It traverses the RelationshipGraph to find every file that imports it, every class that extends it, and every type that depends on it.
Propagation Engine: It can warn you about "Breaking Changes" across the codebase before you even apply them.
5. Advanced Utility Suite
cos visualize: Generates a browser-based architectural map of your project.
cos mindMap: Creates a logic-flow diagram to help you (and the AI) understand complex legacy code.
cos git: Deep integration that can automatically create feature branches, commit changes with meaningful messages, and handle merge conflicts.
cos env: Securely manages your environment variables and secrets, ensuring they are never leaked to the AI provider.
🛠️ Technical Capabilities Summary
Auto-Diagnostics: Detects and fixes bugs autonomously.
Build-Aware: Only considers a task "done" if the code actually compiles.
Token-Efficient: Truncates large outputs and prunes history to work reliably even on lower-tier AI models.
Multi-Model Intelligence: Can route tasks between Gemini 1.5 Pro (for deep reasoning) and Gemini 1.5 Flash (for fast, cheap discovery) automatically.
In essence, Codebase OS turns a "stateless" AI into a permanent, local member of your engineering team that understands your architectural decisions and respects your build stability.
this is a the replacement of claude code antigravity and everything with unlimited api keys and allmodels supported
Codebase OS (COS) is a proprietary, foundational layer for intelligent software development. It essentially acts as an "operating system" for your codebase, providing a semantic memory and reasoning layer that standard tools lack.
🏗️ Project Architecture
The project is built using a modular Node.js + TypeScript architecture, designed for high performance and strict type safety.
1. Core Intelligence Layer (src/core)
This is the "brain" of the project. Unlike standard AI tools that simply read files as text, COS treats your code as a graph:
RelationshipGraph: Maps every symbol (functions, classes, variables) and their dependencies. It doesn't just know where a file is; it knows how it connects to the rest of the system.PropagationEngine: This is a standout feature. When you change code, this engine calculates the "ripple effect," predicting which files will be impacted and categorizing the severity (e.g.,breakingvspatch).Scanner & Watcher: Keeps the system updated in real-time. As you type, the graph evolves.
2. CLI & API Layer (src/cli)
Provides a suite of commands that turn a standard terminal into an AI-powered command center:
cos ask: Direct Q&A with the codebase.cos agent: Autonomous multi-step engineering.cos fix: Automatic diagnostic and repair system.
3. Persistence Layer (src/storage)
COS stores everything locally. It maintains a GraphStore and ChangeHistory, ensuring that the AI’s memory of your project is persistent across sessions and completely private.
🚀 How it is Different & Better
Comparing Codebase OS to tools like Claude or generic agents (including myself as Antigravity), there are several "unfair advantages" built into this project:
| Feature | Generic Agents (Claude/Antigravity) | Codebase OS |
|---|---|---|
| Context Strategy | "Window-based" (sees what you show it) | Graph-based (understands every link in the repo) |
| Impact Prediction | Guesswork based on text search | Deterministic (uses PropagationEngine logic) |
| Change Safety | Trial and error | Impact Analysis (knows what will break before changing) |
| Memory | Resets every conversation | Persistent (local graph store keeps learning) |
| Autonomy | Task-by-task execution | State-Aware (understands project architecture/layers) |
🛠️ How it is Built
- Language: TypeScript (for enterprise-grade reliability).
- State Management: Local file-based storage using JSON/SQLite patterns for the graph.
- AI Integration: Multi-provider support (OpenRouter, Gemini) with specialized prompt engineering for "Chain of Thought" reasoning.
- Visualization: Built-in architectural mapping to see your code's structure in a browser.
In short, while standard AI agents are like "smart editors," Codebase OS is a Semantic Engine. It provides the high-fidelity context that allows an AI to act like a senior architect who has been working on the project for years.