{"id":51391934,"url":"https://github.com/ishan-parihar/icode","last_synced_at":"2026-07-04T00:06:25.539Z","repository":{"id":356378841,"uuid":"1201152078","full_name":"ishan-parihar/icode","owner":"ishan-parihar","description":"Rust-native AI coding harness — 48K LOC, 9 crates, mock LLM testing, MCP/LSP lifecycle, permission enforcement","archived":false,"fork":false,"pushed_at":"2026-05-07T19:08:16.000Z","size":6888,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-07T21:13:54.767Z","etag":null,"topics":["ai-coding","code-generation","developer-tools","llm","lsp","mcp","programming","rust"],"latest_commit_sha":null,"homepage":"https://github.com/ishan-parihar/icode","language":"Rust","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/ishan-parihar.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":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-04T09:26:05.000Z","updated_at":"2026-05-07T19:09:25.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ishan-parihar/icode","commit_stats":null,"previous_names":["ishan-parihar/icode"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/ishan-parihar/icode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ishan-parihar%2Ficode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ishan-parihar%2Ficode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ishan-parihar%2Ficode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ishan-parihar%2Ficode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ishan-parihar","download_url":"https://codeload.github.com/ishan-parihar/icode/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ishan-parihar%2Ficode/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35105544,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-03T02:00:05.635Z","response_time":110,"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":["ai-coding","code-generation","developer-tools","llm","lsp","mcp","programming","rust"],"created_at":"2026-07-04T00:06:25.450Z","updated_at":"2026-07-04T00:06:25.521Z","avatar_url":"https://github.com/ishan-parihar.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# icode 🛠️\n\n**The Hardened Runtime for AI Coding Agents.**\n\n[![Rust](https://img.shields.io/badge/language-Rust-orange.svg)](https://www.rust-lang.org/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![TUI](https://img.shields.io/badge/UI-Terminal-blue.svg)](https://github.com/ratatui-org/ratatui)\n[![MCP](https://img.shields.io/badge/Protocol-MCP-purple.svg)](https://modelcontextprotocol.io/)\n\n`icode` is not just a coding assistant; it is a **high-performance, memory-safe execution environment** designed to host AI agents. Written entirely in Rust, it provides the critical infrastructure needed to move AI agents from \"chat-bot wrappers\" to \"production-grade system operators.\"\n\nWhile most agents live in dynamic runtimes (Node/Python), `icode` explores the frontier of **Strict Agent Orchestration**: combining zero-cost abstractions, explicit permission boundaries, and a deterministic tool-execution loop.\n\n---\n\n## 🚩 The Problem: The \"Fragile Agent\" Gap\n\nCurrent AI coding assistants often suffer from three systemic failures:\n1. **Non-Deterministic Tooling**: Tool execution is often a \"best effort\" string-matching process, leading to fragile edits and silent failures.\n2. **Security Blindspots**: Giving an LLM `bash` access is a security nightmare. Most agents lack a granular, policy-driven permission layer that can actually be audited.\n3. **State Decay**: As sessions grow, the \"context window\" becomes a mess. Managing session snapshots, reverts, and compaction in a way that doesn't confuse the model is a massive engineering challenge.\n\n## 💡 The Solution: A Hardened AI Runtime\n\n`icode` solves these problems by implementing a **layered runtime architecture**:\n\n### 1. The Guardrail Layer (Permission Engine)\nInstead of a simple \"yes/no\" for tools, `icode` implements a **Policy-Driven Permission System**. It validates every tool call against workspace boundaries and specific safety rules *before* the command ever hits the shell.\n\n### 2. The Orchestration Layer (Agent Delegation)\n`icode` treats agents as modular entities. It supports **Hierarchical Delegation**: a \"Master\" agent can spawn specialized sub-agents (Explorer, Librarian, Fixer) for bounded tasks, each with its own isolated context and tool-set.\n\n### 3. The State Layer (Session Management)\nUsing a custom SQLite-backed store, `icode` manages sessions as first-class citizens. It supports **Atomic Session Snapshots**, allowing a user to \"branch\" a coding session or revert the entire workspace state if an agent goes off the rails.\n\n---\n\n## ✨ Engineering Highlights\n\n### 🏗 System Architecture\n- **Rust-Native Core**: Built with a modular crate workspace for maximum compile-time safety and runtime performance.\n- **TUI Excellence**: A high-fidelity Terminal User Interface (TUI) featuring a command palette, real-time debug panels, and a structured message stream.\n- **MCP Integration**: Native support for the **Model Context Protocol (MCP)**, allowing `icode` to plug into any MCP-compliant server for external data and tools.\n- **Provider Agnostic**: A unified API layer that abstracts away the differences between Anthropic, OpenAI, Gemini, and local LLM providers.\n\n### 🛠 Technical Specifications\n- **Memory Safety**: Zero-overhead abstractions for handling large file buffers and streaming LLM responses.\n- **Hook-Based Extensibility**: A `hooks-engine` that allows injecting custom logic (e.g., `todo_continuation_enforcer`) into the agent's thought-action loop.\n- **Parity Harness**: A dedicated testing suite that ensures `icode` tool outputs maintain strict parity with reference implementations.\n\n---\n\n## 🌌 Potentialities \u0026 Future Scope\n\n`icode` is a prototype for the next generation of **AI Operating Systems**:\n\n- **Autonomous System Operator**: Moving from \"editing files\" to \"managing infrastructure.\" An agent that can monitor logs, detect crashes, and apply patches autonomously.\n- **Local-First Intelligence**: Fully integrating local models (Llama/Mistral) into the hardened runtime, removing the dependency on external APIs.\n- **Standardized Agent Schemas**: Developing a protocol for how agents \"handoff\" work to one another across different runtimes.\n\n---\n\n## 🚀 Quick Start\n\n### Installation\n```bash\ncd rust\ncargo build -p icode-cli\n# Or use the install script\n./rust/scripts/install.sh\n```\n\n### Basic Usage\n```bash\n# Start the interactive TUI\nicode\n\n# Run a one-shot command\nicode \"Refactor the auth logic in src/auth.rs\"\n```\n\n## 🛠 Tech Stack\n- **Language**: Rust (Edition 2021)\n- **TUI**: Ratatui / Crossterm\n- **Async**: Tokio\n- **Persistence**: SQLite\n- **Protocol**: MCP (Model Context Protocol)\n\n---\nDeveloped by [Ishan Parihar](https://github.com/ishan-parihar) as an exploration into the intersection of systems programming and agentic AI.\n\nIf you find this project useful, [consider supporting its development](https://rzp.io/rzp/ishan-parihar) ☕\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fishan-parihar%2Ficode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fishan-parihar%2Ficode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fishan-parihar%2Ficode/lists"}