Metadata-Version: 2.4
Name: amber-orca-studio
Version: 5.0.0
Summary: Enterprise Mojave Amber GUI for Dual RTX 3060 Cluster, Multi-Project RAG, and Expansional Skill Synthesis
Author: AmberOrca Contributors
License: MIT
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: PyQt6>=6.7.0
Requires-Dist: beautifulsoup4>=4.12.0
Requires-Dist: lxml>=5.0.0
Requires-Dist: aiohttp>=3.9.0
Requires-Dist: qasync>=0.27.0
Dynamic: license-file

<div align="center">

<img src="assets/icon.png" alt="AmberOrca Studio Logo" width="160" style="border-radius: 24px; box-shadow: 0 10px 30px rgba(245, 158, 11, 0.3);" />

# ⚡ AmberOrca Studio v5.0
### *Enterprise Dual RTX 3060 Cluster Orchestrator, Multi-Project RAG & Expansional Skill Engine*

[![Python 3.10+](https://img.shields.io/badge/Python-3.10+-38bdf8.svg?logo=python&logoColor=white)](https://python.org)
[![PyQt6](https://img.shields.io/badge/GUI-PyQt6%20v6.7+-44403c.svg?logo=qt&logoColor=white)](https://riverbankcomputing.com/software/pyqt/)
[![GPU: Dual RTX 3060](https://img.shields.io/badge/Hardware-Dual%20RTX%203060%20(24GB)-f59e0b.svg?logo=nvidia&logoColor=white)](https://nvidia.com)
[![Theme: Mojave Amber](https://img.shields.io/badge/Theme-Mojave%20Amber-d97706.svg)](https://github.com)
[![Status: Production Ready](https://img.shields.io/badge/Status-Production%20Ready-10b981.svg)](https://github.com)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)

</div>

---

## 🌅 Overview

**AmberOrca Studio** is a high-performance, asynchronous desktop control center built from the ground up in **PyQt6** with a **Mojave Amber** glassmorphic aesthetic. It orchestrates local and remote **Dual NVIDIA GeForce RTX 3060** compute clusters (`24 GB total VRAM`), multi-project incremental RAG vector synchronization, expansional skill synthesis, and real-time slash commands (`/`).

---

## ✨ Key Capabilities

```mermaid
graph TD
    UI["🖥️ AmberOrca Studio UI (Mojave Amber)"] --> Telemetry["📊 Real-time Dual GPU Telemetry"]
    UI --> ModelManager["🎮 24h Keep-Alive VRAM Preloader"]
    UI --> RAGHub["🧠 Multi-Project Incremental RAG Engine"]
    UI --> SkillSynth["🧬 Expansional Skill Synthesizer"]
    UI --> SlashEngine["⌨️ Native '/' Slash Command Autocomplete"]
    UI --> WebIngest["🌐 BeautifulSoup & GPU Synthesis"]

    RAGHub --> Deduplication["🔍 SHA-256 Content Deduplicator"]
    RAGHub --> Caching["⚡ mtime Incremental Cache"]
    RAGHub --> VectorStore["📁 Vector Chunks & Manifest Storage"]

    SkillSynth --> Domains["7 Unified Capability Domains"]

    ModelManager --> Cluster["🖥️ Dual RTX 3060 Compute Node (owlyyyrt)"]
```

### 1. 🎮 Dual RTX 3060 Model Lifecycle & VRAM Pinning
- **24h Keep-Alive Preloading**: Preload large quantization models (`qwen3.8-uncensored:27b-q5`, `orcarouter/Qwen3.8-27B-Uncensored-FP8`, `qwen2.5-coder:14b`) across dual Ampere GPUs (`GA104` + `GA106`) with zero unloading latency.
- **Fast Model Eviction**: Instant memory reclamation via dedicated VRAM release endpoints.
- **Live Hardware Telemetry**: Real-time VRAM allocation bars, PCIe bus signals, power draw ($W$), temperature ($^\circ\text{C}$), and compute utilization (%).

### 2. 🧠 Multi-Project Incremental RAG & SHA-256 Deduplication
- **Dynamic Category Filtering**: Interactive filter pills across `All`, `📁 Projects`, `🧠 Skills`, `🛡️ Rules`, `⚡ Brain`, `🌐 Remote`, and `➕ Custom`.
- **Selective Sync**: Checkbox-based path inclusion to index only target repositories.
- **SHA-256 Deduplication**: Eliminates duplicate files across repositories, preventing index bloat and redundant embeddings.
- **Incremental Change Detection**: Re-indexes only modified or new files based on `mtime` and hash comparisons in $< 0.4\text{s}$.

### 3. 🧬 Expansional Unified Skill Synthesizer
- Automatically consolidates 1,150+ raw skills and rules into **7 Expansional Capability Domains**:
  1. 🧠 **ADHD Developer & Executive Function** (Micro-chunking, zero-fluff next steps)
  2. ⚡ **LLM Token Optimization & KV Invariants** (Prompt prefix caching, `q8_0` KV cache, sequential I/O)
  3. 🕷️ **Scalable Web Extraction & Crawling** (Scrapy spider architectures, ItemLoader pipelines)
  4. 🔬 **Reverse Engineering & Binary Analysis** (Ghidra headless scripts, AST parsing)
  5. 🌐 **Modern Web, SEO & Performance Auditing** (Core Web Vitals, E-E-A-T, semantic HTML5)
  6. 🎮 **Dual RTX 3060 Cluster & Telemetry** (Multi-GPU load balancing, systemd tunnels)
  7. 🛠️ **General Software Engineering & DevOps** (Python, Rust, systemd, testing)

### 4. ⌨️ Interactive Slash Commands (`/`) with Real-Time QCompleter
Type `/` in the chat or RAG prompt to trigger instant autocompletion:

| Slash Command | Syntax | Description |
|---|---|---|
| `/help` | `/help` | Display interactive directory of all available commands. |
| `/sync` | `/sync [list\|add\|toggle]` | Run incremental sync, list sources, or add new projects. |
| `/skills` | `/skills [name\|unified]` | Inspect installed agent skills or view synthesized domains. |
| `/rules` | `/rules [rule_name]` | List or view active behavioral guardrails and system rules. |
| `/rag` | `/rag <query>` | Execute semantic vector search across all indexed repositories. |
| `/adhd` | `/adhd [chunk\|dump\|step]` | Activate ADHD executive function micro-chunking and low-friction workflow. |
| `/model` | `/model [name]` | Switch active LLM target model. |
| `/load` | `/load [name]` | Preload model weights into Dual RTX 3060 GPU VRAM. |
| `/evict` | `/evict [name]` | Evict / unload model from GPU VRAM. |
| `/styles` | `/styles` | List all personal writing styles and uncensored personas. |
| `/persona` | `/persona [id]` | Switch active persona style preset. |
| `/scrape` | `/scrape <url>` | Scrape URL with BeautifulSoup & synthesize with RTX 3060. |
| `/compress`| `/compress <text>` | Compress prompt with RTK token optimization. |
| `/telemetry`| `/telemetry` | Display live Dual GPU metrics and latency signals. |
| `/clear` | `/clear` | Clear chat transcript. |

---

## 🚀 Quick Start

### Installation

```bash
# Clone the repository
git clone https://github.com/CodeAtCode/AmberOrcaStudio.git
cd AmberOrcaStudio

# Install dependencies with pacman/paru (Arch/CachyOS) or pip
pip install -r requirements.txt
```

### Launching AmberOrca Studio

```bash
# Run via CLI launcher
amber-orca

# Or run via script
./run.sh
```

---

## ⚙️ Configuration & Invariants

AmberOrca Studio adheres to the following token optimization and self-hosted Ollama invariants:

- **KV Cache Quantization**: `OLLAMA_KV_CACHE_TYPE=q8_0` (halves KV VRAM consumption, expands context up to 32k).
- **Prompt Prefix Caching**: `LLAMA_ARG_CACHE_PROMPT=true` & `LLAMA_ARG_CACHE_REUSE=256` for zero-recalculation prefix reuse.
- **Direct Sequential I/O**: `LLAMA_ARG_MMAP=false` for stable model serving across NVMe/NTFS mounts.
- **Scheduler Load Timeout**: `OLLAMA_LOAD_TIMEOUT=30m` for split multi-GPU topologies.

---

## 📂 Project Structure

```
AmberOrcaStudio/
├── assets/
│   └── icon.png                  # Mojave Amber App Icon
├── config/
│   └── settings.json             # Persistent application preferences
├── logs/
│   └── launch_debug.log          # Mirroring debug & crash telemetry
├── src/
│   ├── app.py                    # Main PyQt6 Application Window
│   ├── async_engine.py           # Asynchronous HTTP/Ollama client
│   ├── brain_sync.py             # Multi-project knowledge migrator
│   ├── logger.py                 # Structured logger & UI callback
│   ├── model_manager.py          # GPU model preload & eviction
│   ├── prompt_optimizer.py       # RTK prompt compression & persona manager
│   ├── rag_engine.py             # Incremental RAG, SHA-256 deduplication
│   ├── skill_synthesizer.py      # Expansional unified skill domains
│   ├── slash_commands.py         # Native '/' slash command interpreter
│   ├── styles.py                 # Mojave Amber design tokens & QSS
│   ├── sync_registry.py          # Knowledge & project path registry
│   └── web_scraper.py            # BeautifulSoup DOM extraction & parsing
├── storage/
│   ├── brain_knowledge/          # Persistent vector chunks & manifest
│   ├── sync_sources.json         # Registered project paths & categories
│   └── unified_skills.json       # Synthesized expansional skill catalog
├── .github/                      # GitHub template repository workflows
├── run.sh                        # Application startup runner
└── pyproject.toml                # Project build & dependency metadata
```

---

## 📜 License

Distributed under the **MIT License**. See [`LICENSE`](LICENSE) for details.
