β οΈ ALPHA STATE WARNING: This application is currently in active development (Alpha). Many features typically found in mature IDEs may be incomplete, unstable, or missing. Not all features work as expected. Use with caution.
AI-Powered IDE with Multi-Model Deliberation Architecture
Inspired by PolyCouncil's proven multi-model deliberation system, PolyCode IDE is a locally-run, AI-powered code editor that uses multiple LLMs through LMStudio to generate and edit code collaboratively.
- Multi-Model Deliberation: Uses PolyCouncil's architecture with parallel model execution, rubric-based scoring, and weighted consensus voting
- Local LLM Integration: Fully local execution using LMStudio (no external API calls)
- VS Code-like Interface: Familiar file explorer and editor experience
- Multi-Language Support: JavaScript, TypeScript, Python, Java, C/C++, and more
- AI Code Generation: Generate code from natural language prompts
- AI Code Editing: Edit existing code with natural language instructions
- Code Analysis: Analyze code quality using multi-model evaluation
π¨βπ» Developers: Check out our comprehensive Developer Guide to start contributing!
-
PolyCouncil Orchestrator (
src/main/core/orchestrator.js)- Coordinates multiple LLMs in parallel
- Implements rubric-based scoring
- Performs weighted consensus voting
- Assigns personas to different models
-
LMStudio Client (
src/main/core/lmstudio-client.js)- Handles communication with local LMStudio API
- OpenAI-compatible interface
- Model management and connection checking
-
Code Rubric (
src/main/core/rubric.js)- Defines evaluation criteria (correctness, quality, best practices, etc.)
- Calculates weighted scores
- Evaluates code quality
-
Frontend (
src/renderer/)- React-based UI
- Monaco Editor (VS Code's editor)
- File explorer
- AI assistant panel
- Node.js (v18 or higher)
- LMStudio - Download from lmstudio.ai
- Install and start LMStudio
- Load at least one language model
- Ensure API server is running on
http://localhost:1234
- Clone or navigate to the project directory:
cd PolyCode- Install dependencies:
npm install- Build the React frontend (if using a bundler):
# For development, you may need to set up a build process
# For now, the app loads directly from files-
Start LMStudio:
- Open LMStudio
- Load one or more language models
- Start the local server (usually runs on port 1234)
-
Start PolyCode IDE:
npm start- Using the IDE:
- Create or open files using the file explorer
- Use the AI panel to:
- Generate Code: Describe what you want to build
- Edit Code: Provide instructions to modify existing code
- Analyze Code: Get quality analysis and recommendations
-
Parallel Generation: Multiple LLMs generate code independently, each with a different persona (architect, engineer, reviewer, optimizer)
-
Cross-Evaluation: Each model evaluates all other models' outputs using the rubric system
-
Weighted Voting: Scores are aggregated using weighted averages
-
Consensus Selection: The best generation is selected based on aggregated scores
This approach ensures higher quality code by leveraging the strengths of multiple models and perspectives.
PolyCode/
βββ src/
β βββ main/ # Electron main process
β β βββ main.js # Main entry point
β β βββ preload.js # Preload script for IPC
β β βββ core/
β β βββ orchestrator.js # PolyCouncil orchestrator
β β βββ lmstudio-client.js # LMStudio API client
β β βββ rubric.js # Code evaluation rubric
β βββ renderer/ # React frontend
β βββ app.jsx # Main React app
β βββ components/ # React components
β β βββ Editor.jsx
β β βββ FileExplorer.jsx
β β βββ AIPanel.jsx
β β βββ StatusBar.jsx
β βββ styles/
β βββ main.css
βββ package.json
βββ README.md
You can configure which models and personas to use by modifying the orchestrator configuration. The system automatically detects available models from LMStudio.
Edit src/main/core/rubric.js to customize evaluation criteria and weights.
PolyCode IDE is built with Electron, React, and TypeScript. We welcome contributions from developers!
-
Developer Guide - Comprehensive guide for developers
- Quick start for new developers
- Project structure overview
- Architecture overview
- Development environment setup
- Common development tasks
- Debugging guide
-
Setup Guide - Setup and installation instructions
- Prerequisites (Node.js, LMStudio, etc.)
- Installation steps
- Configuration steps
- First-time setup
- Platform-specific notes
- Troubleshooting common issues
-
Contributing Guide - Contribution guidelines
- How to contribute (bug reports, features, PRs)
- Code review process
- Commit message conventions
- Branch naming conventions
- Coding standards
- Testing requirements
-
Code Style Guide - Code style and formatting
- Naming conventions
- Code formatting rules
- React/JSX conventions
- JavaScript/TypeScript conventions
- Comments and documentation
- Best practices
-
Testing Guide - Testing instructions
- How to run tests
- Writing unit, integration, and E2E tests
- Test organization
- Test coverage requirements
- Debugging tests
-
Deployment Guide - Build and deployment
- Build commands
- Platform-specific builds
- Electron packaging
- Distribution formats
- Signing configuration
- Release process
- Architecture Documentation - Technical deep dive into system architecture
- Project Summary - Project overview and completed features
- Quick Start Guide - Quick start for users
- LSP Setup - Language Server Protocol setup
- TypeScript Migration - TypeScript migration notes
- Keyboard Shortcuts - Available keyboard shortcuts
npm run devThis will start the app with developer tools enabled.
npm run buildPlatform-specific builds:
npm run build:win # Windows
npm run build:mac # macOS
npm run build:linux # Linuxnpm test # Run all tests
npm run test:watch # Run tests in watch mode
npm run test:coverage # Run tests with coverage report- β Input validation & sanitization
- β Code execution sandboxing
- β Error recovery system
- β Optimized deliberation parallelization
- β Response caching system
- β Bundle size optimization
- β Keyboard shortcuts system (17+ shortcuts, customizable)
- β Monaco editor enhancements (custom theme, auto-save, multi-cursor)
- β Save confirmation dialogs (dirty tracking, auto-save indicator)
- β File explorer improvements (icons, search, context menu, breadcrumbs)
- β Git integration (status, commit, push, pull, branches, history, diffs)
- β Terminal integration (multi-tabbed, shell commands, project-aware)
- β Code snippets system (75+ snippets, Ctrl+Space, custom snippets)
- β LSP support foundation (diagnostics, hover, go-to-definition, auto-complete)
- β TypeScript migration setup (strict mode, tsconfig, build support)
- β Unit testing framework (Jest, 11/11 tests passing)
- β Enhanced rubric evaluation (LLM-based scoring, quality metrics)
- β Dependency upgrades (18 packages, security fixes)
- β Logging framework (Winston, structured logs, file rotation)
- β Developer guide creation (7 new comprehensive docs)
- β Debugging capabilities (breakpoints, step-through, variables, call stack)
- β Code deduplication (18% reduction, shared utilities, API layer)
- β State management system (Zustand store, persistence, 7 state slices)
- β Inline documentation (83% JSDoc coverage, usage examples)
- Real-time code suggestions
- Multi-file project context
- Plugin system
- Model performance tracking
- Custom persona definitions
MIT
Inspired by the PolyCouncil project's multi-model deliberation architecture.
