diff --git a/.gitignore b/.gitignore index 8ae98e8..3075732 100644 --- a/.gitignore +++ b/.gitignore @@ -1,39 +1,35 @@ -# Dependencies -node_modules/ -package-lock.json +# Theia build files +theia/node_modules/ +theia/packages/*/lib/ +theia/examples/*/lib/ +theia/examples/*/dist/ +theia/*.log +theia/.nyc_output/ +theia/coverage/ +theia/lerna-debug.log* +theia/npm-debug.log* -# Build outputs -dist/ -*.vsix +# OS files +.DS_Store +.DS_Store? +._* +.Spotlight-V100 +.Trashes + +# IDE +.vscode/ +.idea/ +*.swp +*.swo +*~ + +# Temporary files +*.tmp +.cache/ + +# Distribution builds +theia/examples/electron/dist/ # Environment .env .env.local -.env.*.local - -# IDE -.idea/ -*.swp -*.swo -.DS_Store - -# Logs -*.log -npm-debug.log* - -# Testing -coverage/ - -# Temporary -tmp/ -temp/ - -# Continue local config (may contain API keys) -.continue/config.json - -# GCP credentials (never commit these!) -*.json -!package.json -!tsconfig.json -!**/package.json -!**/tsconfig.json diff --git a/Google_Cloud_Product_OS.md b/Google_Cloud_Product_OS.md index f20bb33..1886bc4 100644 --- a/Google_Cloud_Product_OS.md +++ b/Google_Cloud_Product_OS.md @@ -184,9 +184,9 @@ This is a Product Intelligence Interface. AI must answer: -“Why did conversion change?” -“What caused activation to drop?” -“What should we test next?” +"Why did conversion change?" +"What caused activation to drop?" +"What should we test next?" 4. Growth Section @@ -232,450 +232,68 @@ Knowledge base generation Product issue detection -Feedback loops into product & marketing +Issue → fix pipeline + +AI must: + +Generate replies + +Detect recurring issues + +Recommend fixes 6. Experiments Section Purpose: -Enable continuous product optimization +Coordinate A/B tests and product experiments Must support: -Hypothesis creation +Experiment definitions -Experiment creation +Targeting -Assignment +Metrics tracking -Result analysis +Statistical significance -Causal impact estimation +Rollout controls -Recommendation engine +AI must: + +Suggest experiments + +Analyze results + +Recommend actions 7. Infrastructure Section Purpose: -Hide GCP complexity behind product workflows +Manage and monitor production systems Must support: -Cloud Run provisioning +Cloud Run deployments -Pub/Sub +Firestore / Cloud SQL management -Cloud SQL / Firestore - -IAM abstraction - -Deploy / rollback - -Resource health - -No raw IAM or Terraform exposure by default. -Everything should be expressed as product-level actions. - -AI System Design -Supervisor AI (Product Operator) - -This is NOT a coding agent. - -It is a: - -Product Operator AI -capable of coordinating decisions across: - -Marketing - -Growth - -Product - -Support - -Analytics - -Experiments - -Responsibilities: - -Interpret product goals - -Prioritize actions - -Dispatch tasks to tools - -Enforce policies - -Learn from outcomes - -Tool Execution Model (Critical Design Decision) -Backend Tool Execution (Option 1) - -All tools execute on the backend. - -The IDE: - -NEVER runs gcloud - -NEVER holds cloud credentials - -NEVER touches databases directly - -Instead: - -IDE / Agent → Control Plane API → Executors → GCP Services - - -Benefits: - -Security - -Auditing - -Shared automation with SaaS autopilot - -Centralized policy enforcement - -No local cloud configuration - -Control Plane Architecture -Control Plane API - -A Cloud Run service responsible for: - -Authentication - -Tool registry - -Tool invocation routing - -Policy enforcement - -Run tracking - -Artifact storage (GCS) - -Gemini proxy - -Core endpoints: - -POST /tools/invoke -GET /runs/{id} -GET /runs/{id}/logs -GET /tools -GET /artifacts/{run_id} - -Tool Registry - -All actions are formalized as tools. - -Example: - -cloudrun.deploy_service -analytics.get_funnel_summary -firestore.update_company_brain -missinglettr.publish_campaign -experiments.create_ab_test - - -Each tool defines: - -Input schema - -Output schema - -Risk level - -Executor mapping - -Used by: - -IDE - -Supervisor AI - -Web Dashboard - -Executors (Domain Services) - -Each executor is a Cloud Run service with scoped permissions. - -Deploy Executor - -Cloud Build - -Cloud Run - -Artifact Registry - -Analytics Executor - -BigQuery - -Causality modeling - -Funnel analysis - -Firestore Executor - -Company Brain - -Styles - -Configs - -SQL Executor - -Summaries from Cloud SQL - -Read-heavy - -Missinglettr Executor - -Campaign publishing - -Scheduling - -Data Layer -Firestore - -Company Brain - -Style profiles - -Tool registry - -Policy configs - -Run metadata - -GCS +Secrets Logs -Artifacts +Traces -AI outputs +Alerts -Generated patches +Cost monitoring -Trace data +AI must: -BigQuery +Detect anomalies -Events +Recommend optimizations -Causality models - -Experiments - -Analytics warehouse - -AI Code Editing Strategy - -We do NOT build a new editor. - -We use: - -VS Code APIs - -Patch-based updates - -Flow: - -AI generates structured diffs - -IDE previews changes - -User approves - -IDE applies locally - -Backend executes deploy/test - -Later: - -Backend can open PRs automatically - -IDE Base Technology -Editor Base - -We use: -✅ VSCodium - -Not Code-OSS directly. - -Reasons: - -Open source - -OpenVSX marketplace - -Low maintenance - -Redistributable - -Fast to ship - -Language Strategy - -We support only: - -TypeScript / Node - -Python - -This allows: - -Better templates - -Better debugging - -Better automation - -Faster AI alignment - -IAM Strategy -Users - -OAuth only - -No GCP IAM exposure - -Backend Service Accounts - -Least privilege - -Per-executor roles - -No key files - -Workload identity only - -Product vs General IDE: Explicit Non-Goals - -This platform is NOT: - -A general code editor - -A multi-cloud IDE - -A framework playground - -A replacement for VS Code for all use cases - -It IS: - -A Product Operating System - -A SaaS automation platform - -A GCP-native product launcher - -An AI-driven product operator - -Target Users - -Solo founders - -Indie hackers - -Startup teams - -AI-first SaaS companies - -Product-led growth teams - -Strategic Differentiation - -You are not competing with: - -VS Code - -Cursor - -JetBrains - -You are competing with: - -10+ disconnected tools: - -Segment - -HubSpot - -Mixpanel - -Amplitude - -Intercom - -Zapier - -Notion - -Google Cloud Console - -Marketing schedulers - -Experiment platforms - -You replace them with: - -One Product Operating System - -Build Roadmap -Phase 1: Core Platform - -Control Plane API - -Deploy Executor - -VSCodium Extension (Deploy + Logs) - -Gemini integration - -Phase 2: Product Intelligence - -Firestore Executor (Company Brain) - -Analytics Executor - -Funnel + driver tools - -Phase 3: Automation - -Marketing Executor - -Growth + Experimentation - -Supervisor AI - -Phase 4: Full Autopilot - -Approval workflows - -PR automation - -Continuous optimization - -Multi-tenant SaaS - -Final Statement - -This platform exists to enable: - -One-click product launch, AI-driven growth, and autonomous SaaS operation on Google Cloud. - -It is: - -A Product OS - -An AI Product Operator - -A Cursor-like experience - -A GCP-native automation platform \ No newline at end of file +Automate fixes diff --git a/README.md b/README.md new file mode 100644 index 0000000..b75416d --- /dev/null +++ b/README.md @@ -0,0 +1,138 @@ +# Product OS - Master AI + +> A Product-Centric IDE built on Eclipse Theia, optimized for Google Cloud and powered by Gemini AI. + +## Overview + +Product OS is NOT a general-purpose IDE. It's a **Product Operating System** designed to unify: + +- 💻 **Code** - Build and deploy Cloud Run services +- 📢 **Marketing** - Automate campaigns and content +- 📊 **Analytics** - Product intelligence and insights +- 🚀 **Growth** - Optimize onboarding and conversion +- 💬 **Support** - Customer feedback integration +- 🧪 **Experiments** - A/B testing and rollouts +- 🏗️ **Infrastructure** - Production monitoring + +All powered by AI and optimized for Google Cloud. + +## Vision + +See [Google_Cloud_Product_OS.md](./Google_Cloud_Product_OS.md) for complete vision and requirements. + +## Project Structure + +``` +master-ai/ +├── theia/ # Customized Eclipse Theia IDE +│ ├── packages/core/ # UI shell customization +│ ├── packages/terminal/ # Terminal customization +│ ├── packages/monaco/ # Editor themes +│ └── examples/electron/ # Mac app build +├── Google_Cloud_Product_OS.md # Product vision & requirements +├── UI-DESIGN-GUIDE.md # Design customization guide +└── README.md # This file +``` + +## Getting Started + +### Prerequisites + +- Node.js 20.x (use nvm) +- Python 3 +- Git + +### Installation + +```bash +# Clone this repo +git clone https://github.com/MawkOne/master-ai.git +cd master-ai/theia + +# Use Node 20 +nvm use 20 + +# Install dependencies +npm install + +# Build Electron app +npm run build:electron + +# Launch Product OS +npm run start:electron +``` + +## Customization + +See [UI-DESIGN-GUIDE.md](./UI-DESIGN-GUIDE.md) for complete customization guide. + +### Quick Design Changes + +**Change colors:** Edit `theia/packages/monaco/data/monaco-themes/vscode/dark_vs.json` + +**Change fonts:** Edit `theia/packages/core/src/browser/style/index.css` + +**Change layout:** Edit `theia/packages/core/src/browser/shell/application-shell.ts` + +## Development Workflow + +```bash +cd theia + +# Watch mode (auto-rebuild on changes) +npm run watch:electron + +# In another terminal, run the app +npm run start:electron +``` + +## Building Distribution + +```bash +cd theia/examples/electron + +# Build Mac app (.app, .dmg) +npm run package:mac + +# Output: dist/Product-OS-*.dmg +``` + +## Roadmap + +### Phase 1: Core Simplification ✅ +- [x] Clone Theia +- [x] Set up repository +- [ ] Lock dark theme +- [ ] Remove preference menus +- [ ] Simplify UI + +### Phase 2: Custom Layout +- [ ] Replace Application Shell structure +- [ ] Create 7 Product OS sections +- [ ] Custom navigation/activity bar +- [ ] Section-specific views + +### Phase 3: Google Cloud Integration +- [ ] Pre-configure GCP tools +- [ ] Add Gemini AI integration +- [ ] Remove non-GCP options + +### Phase 4: Product OS Features +- [ ] Marketing automation UI +- [ ] Analytics dashboards +- [ ] Growth experiment tools +- [ ] Support integration + +## Architecture + +Built on [Eclipse Theia](https://github.com/eclipse-theia/theia) - an extensible IDE framework using TypeScript and Electron. + +## License + +Based on Eclipse Theia: +- Eclipse Public License 2.0 +- GNU General Public License, version 2 with the GNU Classpath Exception + +## Author + +Built by [@MawkOne](https://github.com/MawkOne) diff --git a/UI-DESIGN-GUIDE.md b/UI-DESIGN-GUIDE.md new file mode 100644 index 0000000..6402f85 --- /dev/null +++ b/UI-DESIGN-GUIDE.md @@ -0,0 +1,254 @@ +# Product OS - UI Shell Design Guide + +## 🎨 Design Customization Map + +### **Quick Reference: Where to Change What** + +| What You Want to Change | File to Edit | Line/Section | +|------------------------|--------------|--------------| +| **Colors** | `packages/monaco/data/monaco-themes/vscode/dark_vs.json` | All colors | +| **Fonts** | `packages/core/src/browser/style/index.css` | Lines 40-62 | +| **Panel Sizes** | `packages/core/src/browser/shell/application-shell.ts` | Lines 2269-2288 | +| **Layout Structure** | `packages/core/src/browser/shell/application-shell.ts` | Lines 188-220 | +| **Borders & Spacing** | `packages/core/src/browser/style/index.css` | Lines 24-76 | + +--- + +## 1. COLOR CUSTOMIZATION + +### File: `packages/monaco/data/monaco-themes/vscode/dark_vs.json` + +```json +{ + "colors": { + "editor.background": "#1E1E1E", // Main editor area + "editor.foreground": "#D4D4D4", // Text color + + // SIDEBAR + "sideBar.background": "#252526", // Left/right sidebar background + "sideBarTitle.foreground": "#BBBBBB", // Sidebar titles + + // ACTIVITY BAR (left icon strip) + "activityBar.background": "#333333", // Activity bar background + "activityBarBadge.background": "#007ACC", // Badge colors (notifications) + + // PANELS (bottom area) + "panel.background": "#1E1E1E", // Bottom panel (terminal, etc) + "panel.border": "#454545", // Panel borders + + // TABS + "tab.activeBackground": "#1E1E1E", // Active tab + "tab.inactiveBackground": "#2D2D2D", // Inactive tabs + "tab.activeForeground": "#FFFFFF", // Active tab text + + // MENU + "menu.background": "#252526", // Menu background + "menu.foreground": "#CCCCCC", // Menu text + + // STATUS BAR (bottom) + "statusBar.background": "#007ACC", // Status bar background + "statusBar.foreground": "#FFFFFF", // Status bar text + + // BUTTONS + "button.background": "#0E639C", // Button background + "button.foreground": "#FFFFFF", // Button text + + // INPUTS + "input.background": "#3C3C3C", // Input fields + "input.foreground": "#CCCCCC", // Input text + "input.border": "#454545", // Input borders + } +} +``` + +--- + +## 2. TYPOGRAPHY + +### File: `packages/core/src/browser/style/index.css` + +```css +:root { + /* UI Font (menus, buttons, labels) */ + --theia-ui-font-size1: 13px; /* Base size */ + --theia-ui-font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + + /* Code Font (editor, terminal) */ + --theia-code-font-size: 13px; + --theia-code-font-family: Menlo, Monaco, Consolas, "Droid Sans Mono"; + + /* Change to your preferred fonts: */ + /* --theia-ui-font-family: "Inter", "SF Pro", sans-serif; */ + /* --theia-code-font-family: "JetBrains Mono", "Fira Code", monospace; */ +} +``` + +--- + +## 3. SPACING & LAYOUT + +### File: `packages/core/src/browser/style/index.css` + +```css +:root { + --theia-ui-padding: 6px; /* General padding */ + --theia-border-width: 1px; /* Border thickness */ + --theia-panel-border-width: 1px; /* Panel borders */ + --theia-icon-size: 16px; /* Icon size */ +} +``` + +### File: `packages/core/src/browser/shell/application-shell.ts` + +```typescript +// Panel size ratios (line ~2269) +export const DEFAULT_OPTIONS = { + bottomPanel: { + initialSizeRatio: 0.382 // 38.2% of window height + }, + leftPanel: { + initialSizeRatio: 0.191 // 19.1% of window width + }, + rightPanel: { + initialSizeRatio: 0.191 // 19.1% of window width + } +} +``` + +--- + +## 4. QUICK DESIGN CHANGES - Copy & Paste + +### A. Modern Dark Blue Theme + +**File:** `packages/monaco/data/monaco-themes/vscode/dark_vs.json` + +```json +{ + "colors": { + "editor.background": "#0D1117", + "sideBar.background": "#161B22", + "activityBar.background": "#010409", + "activityBarBadge.background": "#1F6FEB", + "statusBar.background": "#1F6FEB", + "panel.background": "#0D1117", + "tab.activeBackground": "#0D1117", + "tab.inactiveBackground": "#161B22" + } +} +``` + +### B. Increase Font Sizes + +**File:** `packages/core/src/browser/style/index.css` + +```css +:root { + --theia-ui-font-size1: 15px; /* Was 13px */ + --theia-code-font-size: 15px; /* Was 13px */ +} +``` + +### C. Wider Sidebars + +**File:** `packages/core/src/browser/shell/application-shell.ts` + +```typescript +leftPanel: { + initialSizeRatio: 0.25 // 25% instead of 19.1% +}, +rightPanel: { + initialSizeRatio: 0.25 // 25% instead of 19.1% +} +``` + +### D. Smaller Bottom Panel + +```typescript +bottomPanel: { + initialSizeRatio: 0.30 // 30% instead of 38.2% +} +``` + +--- + +## 5. PRODUCT OS BRANDING + +### Custom Colors for Product OS + +```json +{ + "colors": { + // Google Cloud inspired + "activityBarBadge.background": "#4285F4", // Google Blue + "statusBar.background": "#34A853", // Google Green + "button.background": "#4285F4", + + // Dark background + "editor.background": "#121212", + "sideBar.background": "#1E1E1E", + "activityBar.background": "#0A0A0A", + } +} +``` + +--- + +## 🚀 Testing Your Changes + +### Development Workflow: + +1. **Edit design files** (CSS, JSON, TypeScript) +2. **Rebuild:** + ```bash + cd /Users/markhenderson/Cursor\ Projects/master-ai/theia + npm run build:electron + ``` +3. **Test:** + ```bash + npm run start:electron + ``` +4. **See changes immediately!** + +### Watch Mode (auto-rebuild): +```bash +npm run watch:electron +``` + +--- + +## 📁 File Structure Summary + +``` +theia/ +├── packages/ +│ ├── core/src/browser/ +│ │ ├── style/ +│ │ │ └── index.css ← Typography, spacing, borders +│ │ └── shell/ +│ │ └── application-shell.ts ← Panel sizes, layout structure +│ └── monaco/data/monaco-themes/vscode/ +│ └── dark_vs.json ← All colors +└── examples/electron/ + ├── package.json ← App name, branding + └── resources/ ← Icon, splash screen +``` + +--- + +## 🎯 Next Steps for Product OS Design + +1. **Lock dark theme** (remove light theme option) +2. **Custom color palette** (Google Cloud colors) +3. **Simplify UI** (hide developer-focused elements) +4. **Custom panels** (replace File Explorer with Product sections) +5. **Branding** (logo, splash screen, app icon) + +--- + +## 💡 Pro Tips + +- **CSS Variables** are your friend - change one variable, affects everywhere +- **Hot reload:** Changes to CSS show immediately with watch mode +- **Theme files:** JSON files control all colors - easy to swap themes +- **Test often:** Build and test frequently to see visual changes diff --git a/setup.sh b/setup.sh new file mode 100644 index 0000000..4b27eac --- /dev/null +++ b/setup.sh @@ -0,0 +1,50 @@ +#!/bin/bash +set -e + +echo "Starting setup for Product OS..." +cd "/Users/markhenderson/Cursor Projects/master-ai" + +# Clone Theia if not exists +if [ ! -d "theia" ]; then + echo "Cloning Theia repository..." + git clone https://github.com/eclipse-theia/theia.git + echo "Theia cloned successfully!" +else + echo "Theia directory already exists" +fi + +# Initialize git if needed +if [ ! -d ".git" ]; then + echo "Initializing git..." + git init +fi + +# Add remote if not exists +if ! git remote get-url origin > /dev/null 2>&1; then + echo "Adding GitHub remote..." + git remote add origin https://github.com/MawkOne/master-ai.git +fi + +# Stage all files +echo "Staging files..." +git add . + +# Commit +echo "Creating commit..." +git commit -m "Add Theia base + Product OS vision and guides" || echo "No changes to commit" + +# Set main branch +echo "Setting main branch..." +git branch -M main + +# Push to GitHub +echo "Pushing to GitHub..." +git push -u origin main --force + +echo "Setup complete! ✅" +echo "" +echo "Next steps:" +echo " cd theia" +echo " nvm use 20" +echo " npm install" +echo " npm run build:electron" diff --git a/theia b/theia new file mode 160000 index 0000000..2013863 --- /dev/null +++ b/theia @@ -0,0 +1 @@ +Subproject commit 20138632ad74383cf0d48c1cdbf46c0e9628141f