-
-
Notifications
You must be signed in to change notification settings - Fork 0
Home
- Introduction
- Quick Reference
- Project Overview
- Architecture
- Getting Started
- Module Reference
- API Reference
- Development Guide
- Operations & Deployment
- Security & Compliance
- Troubleshooting
- Glossary
REChain Quantum-CrossAI IDE Engine is a next-generation integrated development environment that combines quantum computing capabilities with cross-AI model orchestration to provide an unparalleled development experience.
- Multi-Model AI Orchestration: Seamlessly routes tasks across multiple AI models
- Quantum Computing Integration: Leverages quantum algorithms for optimization
- Retrieval-Augmented Generation (RAG): Context-aware code assistance
- 3D Code Visualization: Web6-powered 3D graph visualization
- Multi-IDE Support: VS Code and Cursor integrations
- Distributed Architecture: Microservices-based scalable design
| Command | Description |
|---|---|
make install |
Install all dependencies |
make build |
Build the entire project |
make test |
Run all tests |
make dev |
Start development environment |
make docker-up |
Start with Docker Compose |
make lint |
Run linting |
make fmt |
Format code |
| Service | Port | Purpose |
|---|---|---|
| Orchestrator | 8081 | Task routing and model orchestration |
| Kernel | 8082 | Policy enforcement and sandbox |
| RAG | 8083 | Retrieval-Augmented Generation |
| Web6-3D | 8084 | 3D visualization engine |
| Quantum | 8085 | Quantum computing interface |
| Agent Compiler | 8086 | AI agent compilation |
curl http://localhost:8081/health # Orchestrator
curl http://localhost:8082/health # Kernel
curl http://localhost:8083/health # RAG
curl http://localhost:8084/health # Web6-3D
curl http://localhost:8085/health # Quantum
curl http://localhost:8086/health # Agent CompilerREChain is an open architecture for a multi-model, distributed IDE runtime. It coordinates:
- Model drivers for various AI providers
- Policy-controlled code execution
- RAG-based context retrieval
- IDE surface integrations (VS Code, Cursor)
| Layer | Technologies |
|---|---|
| Language | Go 1.21+, TypeScript/JavaScript |
| Runtime | Docker, Kubernetes |
| AI Models | OpenAI, Anthropic, Hugging Face |
| Quantum | Quantum simulators and hardware APIs |
| Storage | BoltDB, distributed cache |
| Monitoring | Prometheus, Grafana |
REChain-IDE/
├── .github/ # GitHub workflows and templates
├── docs/ # Comprehensive documentation
├── rechain-ide/ # Core modules
│ ├── agents/ # AI agents for code assistance
│ ├── cli/ # Command-line interface
│ ├── cursor-integration/# Cursor editor integration
│ ├── distributed-cache/# High-performance caching
│ ├── kernel/ # Core IDE kernel
│ ├── local-models/ # On-premises AI models
│ ├── orchestrator/ # Cross-AI model orchestrator
│ ├── quantum/ # Quantum computing integration
│ ├── rag/ # RAG system
│ ├── shared/ # Shared libraries
│ ├── vscode-extension/ # VS Code extension
│ ├── web6-3d/ # 3D visualization engine
│ └── windsraf-api/ # API gateway
├── requests/ # HTTP request examples
├── schemas/ # JSON schemas
└── scripts/ # Utility scripts
┌─────────────────────────────────────────────────────────────────┐
│ IDE Surface Layer │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────────────────┐ │
│ │ VS Code Ext │ │ Cursor │ │ CLI Interface │ │
│ └──────┬──────┘ └──────┬──────┘ └───────────┬─────────────┘ │
└─────────┼────────────────┼──────────────────────┼─────────────────┘
│ │ │
└────────────────┴──────────┬───────────┘
│
┌─────────────────────────────────────┼───────────────────────────┐
│ Orchestrator (8081)│ │
│ ┌───────────────────────────────────┴─────────────────────┐ │
│ │ Task Queue → Router → Model Drivers → Result Merger │ │
│ └─────────────────────────────────────────────────────────┘ │
└───────────────────────────┬─────────────────────────────────────────┘
│
┌───────────────┼───────────────┐
│ │ │
┌─────────┴────────┐ ┌────┴────┐ ┌───────┴───────┐
│ RAG (8083) │ │Quantum │ │ Web6-3D (8084)│
│ Index / Search │ │(8085) │ │ 3D Graph Vis │
└─────────┬─────────┘ └────┬────┘ └───────┬───────┘
│ │ │
┌─────────┴─────────┐ ┌────┴────┐ ┌───────┴────────┐
│ Kernel (8082) │ │ AI │ │ Agent Compiler │
│ Policy/Sandbox │ │ Models │ │ (8086) │
└───────────────────┘ └─────────┘ └────────────────┘
The brain of the system. Responsibilities:
- Task routing and queue management
- Multi-model dispatch
- Result merging strategies
- Cost optimization
- Health monitoring
Key Endpoints:
-
POST /tasks- Submit new tasks -
GET /tasks/{id}- Check task status -
GET /tasks/{id}/result- Get task results -
GET /models- List available models -
GET /dashboard/summary- System overview
Policy enforcement and sandbox execution:
- Security policy validation
- Sandboxed code execution
- Command filtering
- Resource limits
Key Endpoints:
-
POST /run- Execute guarded commands -
GET /metrics- Performance metrics
Context-aware intelligence:
- Code repository indexing
- Semantic search
- Lexical search
- Hybrid search with tunable weights
- Embedding generation
Key Endpoints:
-
POST /index- Index repository -
GET /search?q=...- Search (auto mode) -
GET /search/semantic?q=...- Semantic search -
GET /search/lexical?q=...- Lexical search -
GET /search/hybrid?q=...- Hybrid search -
POST /search/hybrid-tune- Adjust search weights
3D code visualization:
- Code graph visualization
- Interactive 3D scenes
- Dashboard proxy
- Prometheus metrics
Key Endpoints:
-
GET /graph- Code graph data -
GET /dashboard-summary- Dashboard data -
GET /- 3D viewer interface
Quantum computing integration:
- Quantum algorithm execution
- Optimization problems
- Simulation mode
- Hardware integration
Key Endpoints:
-
POST /optimize- Run quantum optimization -
GET /metrics- Quantum metrics
AI agent management:
- Agent compilation
- Agent deployment
- Version management
Key Endpoints:
-
POST /compile- Compile agent -
GET /metrics- Compiler metrics
1. User submits TaskSpec to Orchestrator
2. Orchestrator queries RAG for context (optional)
3. Orchestrator dispatches to appropriate model drivers
4. Results are merged using configured strategy
5. Kernel executes any guarded commands
6. Artifacts and diffs returned to IDE
- Go 1.21 or higher
- Node.js 18 or higher
- Docker (optional, for containerized development)
- Make (for build automation)
-
Clone the repository:
git clone <repository-url> cd REChain-IDE
-
Install dependencies:
make install
-
Build the project:
make build
-
Run tests:
make test
Option 1: Local Development
make devOption 2: Docker Compose
make docker-upThis starts:
- Orchestrator on port 8081
- Kernel on port 8082
- RAG on port 8083
- Web6-3D on port 8084
- Quantum on port 8085
- Agent Compiler on port 8086
Check all services are healthy:
make health-check
# or manually:
for port in 8081 8082 8083 8084 8085 8086; do
curl -s http://localhost:$port/health && echo " :$port OK"
doneCentral task routing and model orchestration.
Files:
-
main.go- Service entry point -
router.go- Task routing logic -
merger.go- Result merging strategies -
drivers/- Model driver implementations -
models.yaml- Model registry
Environment Variables:
ORCHESTRATOR_PORT=8081
MODEL_REGISTRY_PATH=/config/models.yaml
RAG_ENDPOINT=http://localhost:8083
KERNEL_ENDPOINT=http://localhost:8082Retrieval-Augmented Generation system.
Files:
-
main.go- Service entry point -
indexer.go- Repository indexing -
search.go- Search implementations -
embed.go- Embedding generation -
hybrid_tune.go- Search weight tuning
Environment Variables:
RAG_PORT=8083
RAG_CONFIG_PATH=/data/rag.db
EMBEDDING_MODEL=text-embedding-3-smallSearch Modes:
-
semantic- Vector similarity search -
lexical- Keyword-based search -
hybrid- Combined approach with tunable weights
Policy enforcement and sandbox execution.
Files:
-
main.go- Service entry point -
policy.go- Policy definitions -
sandbox.go- Sandbox execution -
guard.go- Command filtering
Environment Variables:
KERNEL_PORT=8082
POLICY_PATH=/config/policy.yaml
SANDBOX_ENABLED=true3D visualization engine.
Files:
-
main.go- Service entry point -
graph.go- Code graph generation -
viewer.go- 3D viewer interface -
dashboard.go- Dashboard proxy -
proxy.go- Prometheus proxy
Environment Variables:
WEB6_PORT=8084
ORCHESTRATOR_ENDPOINT=http://localhost:8081
GRAPH_DEPTH_DEFAULT=3Quantum computing integration.
Files:
-
main.go- Service entry point -
optimizer.go- Quantum optimization -
algorithms.go- Algorithm implementations
Environment Variables:
QUANTUM_PORT=8085
QUANTUM_SIMULATOR=true
QUANTUM_HARDWARE_ENDPOINT=Visual Studio Code integration.
Files:
-
package.json- Extension manifest -
extension.ts- Main extension code -
commands/- Command implementations -
providers/- Language providers
Command-line interface.
Commands:
-
rechain init- Initialize project -
rechain build- Build project -
rechain test- Run tests -
rechain deploy- Deploy application -
rechain status- Check service status
Submit Task
POST /tasks
Content-Type: application/json
{
"prompt": "Generate a Python function to calculate fibonacci",
"constraints": {
"models": ["gpt-4", "claude-3"],
"routing_weights": {"gpt-4": 0.7, "claude-3": 0.3}
}
}Get Task Status
GET /tasks/{id}Get Task Result
GET /tasks/{id}/resultCancel Task
POST /tasks/{id}/cancelList Models
GET /modelsGet Model Health
GET /models/healthGet Cost Profile
GET /models/cost-profile?budget_usd=10.00Replay Task
POST /tasks/{id}/replay?mode=force-policyModes:
-
force-policy- Use policy-based merge -
force-agent- Use agent compiler -
force-agent-soft- Try agent, fallback to policy
Get Debug Info
GET /tasks/{id}/debug
GET /tasks/{id}/debug?format=promGet Replay Chain
GET /tasks/{id}/replay-chainGet Summary
GET /dashboard/summary
GET /dashboard/summary?format=promGet Metrics
GET /metricsSemantic Search
GET /search/semantic?q=authentication middleware&k=10Lexical Search
GET /search/lexical?q=user login&k=10Hybrid Search
GET /search/hybrid?q=database connection&k=10Auto Mode Search
GET /search?q=function to sort array&k=10Get Current Weights
GET /search/hybrid-tuneUpdate Weights
POST /search/hybrid-tune
Content-Type: application/json
{
"lexical_weight": 0.3,
"semantic_weight": 0.7,
"temperature": 0.5
}Reset to Defaults
POST /search/hybrid-tune/resetIndex Repository
POST /index
Content-Type: application/json
{
"repo_path": "/path/to/repo",
"exclude_patterns": ["*.test.js", "node_modules/"]
}Get Code Graph
GET /graph?q=main&type=file&depth=3Parameters:
-
q- Filter query -
type- Filter type:file,dir,pkg,unknown -
depth- Context hop depth
Get Dashboard Summary
GET /dashboard-summary
GET /dashboard-summary?format=promGet Recent Tasks
GET /tasks/recent?limit=20
GET /tasks/recent?state=completed&merge_source=agent_compilerCompare Tasks
GET /debug-compare?id1=task-123&id2=task-456Execute Command
POST /run
Content-Type: application/json
{
"command": "go test ./...",
"working_dir": "/workspace",
"env": {"GOOS": "linux"}
}Run Optimization
POST /optimize
Content-Type: application/json
{
"algorithm": "qaoa",
"problem": "max-cut",
"graph": {
"nodes": [0, 1, 2, 3],
"edges": [[0,1], [1,2], [2,3], [3,0]]
},
"simulation": true
}Compile Agent
POST /compile
Content-Type: application/json
{
"agent_id": "code-reviewer",
"source": "...",
"version": "1.2.0"
}-
Install Prerequisites
# Go winget install Go.Go # Node.js winget install OpenJS.NodeJS # Docker Desktop winget install Docker.DockerDesktop
-
Configure Git Hooks
git config core.hooksPath .githooks chmod +x .githooks/* # On Unix systems
-
Set Up Environment Variables Create
.envfile:ORCHESTRATOR_PORT=8081 KERNEL_PORT=8082 RAG_PORT=8083 WEB6_PORT=8084 QUANTUM_PORT=8085 AGENT_COMPILER_PORT=8086 # API Keys (for production) OPENAI_API_KEY=sk-... ANTHROPIC_API_KEY=sk-ant-...
Go Code:
- Follow Effective Go guidelines
- Use
gofmtfor formatting - Add comments for exported functions
- Write unit tests with >80% coverage
TypeScript/JavaScript:
- Use ESLint and Prettier
- Follow Angular commit message format
- Use strict TypeScript mode
Run All Tests
make testRun Specific Module Tests
cd rechain-ide/orchestrator
go test ./...Integration Tests
make test-integrationLoad Tests
make test-loadView Service Logs
# Docker logs
docker-compose logs -f orchestrator
# Or local logs
./scripts/logs.sh orchestratorEnable Debug Mode
export DEBUG=1
export LOG_LEVEL=debug
make devAdd a New Model Driver
-
Create driver file:
// rechain-ide/orchestrator/drivers/mymodel.go package drivers type MyModelDriver struct { apiKey string } func (d *MyModelDriver) Execute(ctx context.Context, task TaskSpec) (Result, error) { // Implementation }
-
Register in
models.yaml:models: - id: my-model driver: mymodel capabilities: [code_generation, chat] cost_per_1k_tokens: 0.002
Add New RAG Index Field
-
Update
indexer.go:type CodeDocument struct { // Existing fields NewField string `json:"new_field"` }
-
Reindex:
curl -X POST http://localhost:8083/index \ -H "Content-Type: application/json" \ -d '{"repo_path": "/path/to/repo"}'
Build Images
make docker-buildStart Services
make docker-upView Logs
docker-compose logs -fScale Services
docker-compose up -d --scale orchestrator=3Apply Manifests
kubectl apply -f k8s/Check Status
kubectl get pods -l app=rechainView Logs
kubectl logs -l app=rechain-orchestratorPrometheus Metrics
All services expose /metrics endpoint:
# Orchestrator metrics
curl http://localhost:8081/metrics
# Key metrics:
# - rechain_task_trace_total
# - rechain_task_replay_total
# - rechain_merge_choice_total
# - rechain_forced_agent_fallback_totalGrafana Dashboard
Import dashboard from grafana/dashboards/rechain.json
Key panels:
- Task queue depth
- Model health status
- Response latency
- Merge strategy distribution
- Replay statistics
Web6 Alert Levels
| Level | Score | Condition |
|---|---|---|
| OK | 0 | All systems operational |
| Warn | 1 | Stale data (>60s old) |
| Critical | 2 | Multiple services down |
Check alerts:
curl http://localhost:8084/dashboard-web6/alertsRAG Data Backup
# Export hybrid tune config
curl http://localhost:8083/search/hybrid-tune/export > rag-config.json
# Import
curl -X POST http://localhost:8083/search/hybrid-tune/import \
-H "Content-Type: application/json" \
-d @rag-config.jsonDatabase Backup
# Backup BoltDB
cp /data/rag.db /backups/rag-$(date +%Y%m%d).dbHorizontal Scaling
Scale stateless services:
docker-compose up -d --scale orchestrator=5Vertical Scaling
Adjust resource limits:
services:
orchestrator:
deploy:
resources:
limits:
cpus: '4'
memory: 8GAPI Key Authentication
curl -H "Authorization: Bearer YOUR_API_KEY" \
http://localhost:8081/tasksJWT Authentication
curl -H "Authorization: Bearer JWT_TOKEN" \
http://localhost:8081/tasksInclude X-Request-Id header for request tracing:
curl -H "X-Request-Id: req-12345" \
http://localhost:8081/tasks/abc123Response includes the same header for correlation.
Kernel policies control allowed operations:
# policy.yaml
commands:
allowed:
- go test ./...
- go build .
- npm test
blocked:
- rm -rf /
- sudo *
resources:
max_cpu_percent: 80
max_memory_mb: 4096# Run security scan
make security-scan
# Check dependencies
go list -json -m all | nancy sleuth- GDPR data handling in
DATA_MANAGEMENT.md - Accessibility in
ACCESSIBILITY_GUIDELINES.md - Privacy policy in
docs/privacy.md
Symptom: make dev fails with port already in use
Solution:
# Find and kill process
lsof -i :8081
kill -9 <PID>
# Or use different ports
export ORCHESTRATOR_PORT=9081
make devSymptom: Empty search results
Solution:
# Check if indexed
curl http://localhost:8083/health
# Reindex repository
curl -X POST http://localhost:8083/index \
-d '{"repo_path": "/path/to/repo"}'
# Check search weights
curl http://localhost:8083/search/hybrid-tuneSymptom: GET /models/health shows fail status
Solution:
# Check model configuration
cat rechain-ide/orchestrator/models.yaml
# Verify API keys
env | grep API_KEY
# Check network connectivity
curl -I https://api.openai.comSymptom: Tasks taking too long
Solution:
# Check queue depth
curl http://localhost:8081/queue-depth
# View metrics
curl http://localhost:8081/metrics | grep rechain_task_latency
# Adjust routing weights
curl -X POST http://localhost:8081/tasks \
-d '{"constraints": {"models": ["faster-model"]}}'Symptom: 3D viewer shows blank page
Solution:
# Clear cache
curl -X POST http://localhost:8084/cache/clear
# Check graph data
curl http://localhost:8084/graph | head
# Verify Web6 health
curl http://localhost:8084/health| Service | Log Location |
|---|---|
| Orchestrator | /var/log/rechain/orchestrator.log |
| Kernel | /var/log/rechain/kernel.log |
| RAG | /var/log/rechain/rag.log |
| Web6-3D | /var/log/rechain/web6.log |
| Quantum | /var/log/rechain/quantum.log |
Enable verbose logging:
export DEBUG=1
export LOG_LEVEL=debug
export TRACE_ENABLED=true| Issue Type | Contact |
|---|---|
| Technical | support@rechain.ai |
| Security | security@rechain.ai |
| Documentation | docs@rechain.ai |
| Term | Definition |
|---|---|
| Agent Compiler | Service that compiles and deploys AI agents |
| Hybrid Search | Combined lexical and semantic search |
| Kernel | Core service for policy enforcement and sandbox execution |
| Merge Strategy | Algorithm for combining results from multiple models |
| Orchestrator | Central service for task routing and model coordination |
| RAG | Retrieval-Augmented Generation - context-aware AI |
| Replay | Re-executing a task with different merge strategies |
| Routing Weights | Priority values for model selection |
| TaskSpec | Specification for a task to be executed |
| Trace | Detailed execution log of a task |
| Web6 | Next-generation web platform with 3D and decentralized features |
| Quantum Optimization | Using quantum algorithms for optimization problems |
-
docs/index.md- Full documentation index -
docs/ARCHITECTURE.md- Architecture details -
docs/api.md- API reference -
docs/deployment.md- Deployment guide -
docs/SECURITY.md- Security documentation
- Project Repository: https://github.com/rechain/REChain-IDE
- Documentation Site: https://docs.rechain.ai
- API Reference: https://api.rechain.ai/docs
- Community Forum: https://community.rechain.ai
See CONTRIBUTING.md for:
- Code of conduct
- Pull request process
- Development workflow
- Commit message format
Last Updated: February 16, 2026 Version: 1.0.0