Files
meatbag/project_overview.md

39 lines
3.1 KiB
Markdown

# Meatbag (WhetForge) - Project Overview
## 1. Vision & Core Philosophy
**Meatbag** is a Human Latency Optimization platform for AI agents. It serves as a universal, context-aware interface that allows CLI agents, scripts, and local LLMs to communicate with a human—requesting permissions, confirmations, or input—without relying on inefficient polling or manual terminal monitoring.
Our philosophy is "UI-as-Config." The watch, phone, or TV is not an app; it is a **stateless rendering node**. The intelligence and state reside in the WhetForge Backend.
## 2. Key Features
* **Context-Aware Attention Routing:** A backend intelligence layer that evaluates where you are and what you are doing. It applies AttentionTiers (e.g., Silent Haptic, Screen Override, Notification) to ensure the AI reaches you in the most respectful, efficient way.
* **JSON-First Universal Rendering:** Clients are built on Compose Multiplatform (CMP). They receive a JSON payload and inflate native UI primitives dynamically. No app updates are required to add new UI patterns.
* **Hybrid Configuration:**
* **AI-Generated:** CLI agents can send one-off JSON payloads to request specific actions.
* **Human-Designed:** Users can build static profiles (like keymaps or custom dashboards) for repetitive tasks.
* **Drag-and-Drop UI Builder:** A desktop-based visual editor that allows users to design their own Meatbag dashboards. This tool serializes the UI tree into your JSON schema and syncs it to the WhetForge cloud.
* **WhetForge Marketplace:** A platform for sharing pre-built profiles and UI primitives. Users can download "profiles" for specific CLI agents, smart home integrations, or custom automation workflows.
## 3. Architecture
### Stateless Clients (CMP)
* **Responsibility:** Purely a renderer. Takes JSON -> Renders CMP Primitives -> Sends back `callback_id`.
* **Targets:** Wear OS (Primary), Android (Phone), Android TV, Desktop.
### Stateful Backend (Ktor)
* **Routing Engine:** The brain. Maps agent requests to device rules based on user-defined priority.
* **Storage:** Manages User Profile JSONs, permission logs, and the marketplace registry.
* **Agent API:** A set of REST/SSE endpoints for CLI agents to push requests and receive callbacks.
## 4. The Agentic Flow (Example)
1. **Agent Logic:** A CLI agent reaches a step requiring permission (e.g., "Deploying to Production?").
2. **Request:** The agent calls the Meatbag API.
3. **Routing:** Backend detects user context -> Selects device -> Pushes attention signal.
4. **Interaction:** User taps "YES" on client.
5. **Resolution:** Client sends `callback_id` back to server -> Server notifies Agent -> Agent resumes.
## 5. Development Roadmap
1. **Phase 1 (The MVP):** Establish the Schema (Sealed Classes), the Ktor Backend routing, and the basic CMP "Renderer" module for Wear OS.
2. **Phase 2 (Human UX):** Build the local file-system bridge for "Profile" storage and the visual Drag-and-Drop builder for custom layouts.
3. **Phase 3 (Platform Expansion):** Roll out client renderers for Mobile/TV and integrate the Marketplace API into the backend.