airiVibe Coding GuideBuild a Desktop Pet

🎯 Task: Customise Your Desktop AIRI in 15 Minutes

Transform the existing AIRI desktop app with your own avatar, colours, and shortcuts—no complex refactor needed.

Task Description

Using the existing apps/stage-tamagotchi:

  1. Replace the default Live2D model with your custom my-waifu.zip.
  2. Change the move mode shortcut from Shift+Alt+N to Ctrl+Shift+P.
  3. Update UI colours to match your brand.
  4. Verify voice pipeline and click-through still work.

📜 Complete LLM Prompt (Copy-Paste Ready)

Prompt
"You are DevPetGPT. Help me customise the AIRI desktop pet with my own avatar and branding.
 
WORKSPACE CONTEXT:
- Monorepo with apps/stage-tamagotchi/ (Tauri + Vue desktop app)
- Live2D models: packages/stage-ui/src/stores/display-models.ts manages presets
- Shortcuts: apps/stage-tamagotchi/src/stores/shortcuts.ts defines keybindings
- Main UI: apps/stage-tamagotchi/src/pages/index.vue orchestrates everything
- Click-through logic: uses pixel alpha sampling on canvas
 
MY CUSTOMISATIONS:
1. NEW AVATAR: Add my-waifu.zip as default Live2D model
2. NEW SHORTCUT: Change move mode from 'Shift+Alt+N' to 'Ctrl+Shift+P' 
3. NEW COLOURS: Primary brand colour #FF70A9 for UI elements
 
TASKS (provide exact diffs):
1. Add my-waifu.zip to displayModelsPresets array in packages/stage-ui/src/stores/display-models.ts
2. Update default shortcut in apps/stage-tamagotchi/src/stores/shortcuts.ts (line ~75)
3. Find and update primary colour references in CSS/Vue files
4. Ensure TypeScript compiles without errors
 
REQUIREMENTS:
- Output unified diff patches for each modified file
- Maintain existing functionality (voice, click-through, gaze tracking)
- Use proper Live2D model structure (id, format, type, url, name, previewImage)
- Handle both macOS (meta key) and Windows/Linux (ctrl key) shortcuts
- Test with 'pnpm dev --filter stage-tamagotchi'
 
OUTPUT: Only diff blocks, no explanations."

🔧 Prerequisites & Setup

  • Node ≥ 18 & pnpm ≥ 8 installed
  • Rust toolchain (for native audio plugins)
  • macOS/Windows microphone permissions
  • Your custom Live2D model as my-waifu.zip

Tip: If you only want to design and let AI generate patches, the AI handles Cargo—but local builds still need Rust.


✅ Detailed Task Checklist

Phase 1: Model Integration

  • Place my-waifu.zip in apps/stage-tamagotchi/public/assets/live2d/models/
  • Add entry to displayModelsPresets array in packages/stage-ui/src/stores/display-models.ts:
    { 
      id: 'custom-waifu', 
      format: DisplayModelFormat.Live2dZip, 
      type: 'url', 
      url: '/assets/live2d/models/my-waifu.zip', 
      name: 'My Waifu', 
      previewImage: '/assets/live2d/models/my-waifu/preview.png',
      importedAt: Date.now() 
    }
  • Verify model loads in Settings → Appearance → Model Selection

Phase 2: Shortcut Customisation

  • Edit apps/stage-tamagotchi/src/stores/shortcuts.ts line ~75:
    shortcut: useVersionedLocalStorage('shortcuts/window/move', 'Shift+Ctrl+P', ...)
  • Test shortcut works: Press Ctrl+Shift+P → window enters move mode
  • Verify both macOS (Cmd+Shift+P) and Windows (Ctrl+Shift+P) variants

Phase 3: UI Theming

  • Find primary colour references in Vue components
  • Update to brand colour #FF70A9
  • Add subtle drop-shadow to UI elements: filter: drop-shadow(0 0 4px rgba(255,112,169,0.6))
  • Test hover states on resource island and buttons

Phase 4: Voice Pipeline Verification

  • Launch app: pnpm dev --filter stage-tamagotchi
  • Grant microphone permission when prompted
  • Speak “Hello AIRI” → should get vocal response < 2s
  • Check console for VAD/STT plugin errors

Phase 5: Click-Through Testing

  • Move cursor away from avatar → window becomes click-through
  • Move cursor over avatar → window regains focus
  • Hover near edges → UI buttons appear
  • Verify alpha threshold works with new model

Phase 6: Build & Package

  • Run pnpm lint typecheck → no errors
  • Test production build: pnpm tauri build
  • Verify binary works on target OS
  • Check idle power consumption < 3W (optional: powermetrics on macOS)

🧑‍🔬 Troubleshooting Guide

IssueSolution
Live2D model invisibleEnsure ZIP contains model3.json or rename main JSON file accordingly
Shortcut not recognisedClear localStorage, restart app. Check keybinding differs on macOS (meta) vs Windows (ctrl)
Voice latency > 2sSwitch STT to whisper-tiny-int8 in Settings → Providers, or use cloud API
Window never click-throughLower CLICK_THROUGH_ALPHA_THRESHOLD to 100 in the pixel sampler composable
Build fails on Rust pluginsRun pnpm run build:native first, then retry pnpm tauri build
Model preview missingAdd preview.png to same folder as model ZIP, reference in previewImage field

🔗 Key Files Deep Dive

What You’re ChangingExact File PathKey Lines/Sections
Default models listpackages/stage-ui/src/stores/display-models.tsdisplayModelsPresets array (~line 48)
Keyboard shortcutsapps/stage-tamagotchi/src/stores/shortcuts.tsshortcuts array (~line 72-80)
Main desktop UIapps/stage-tamagotchi/src/pages/index.vueCanvas rendering, hover detection
Click-through logicapps/stage-tamagotchi/src/pages/index.vuewatchThrottled([mouseX, mouseY]) (~line 58)
Resource islandapps/stage-tamagotchi/src/components/Widgets/ResourceStatusIsland/index.vueStatus display component

🎯 Success Criteria

Your custom avatar displays on desktop and follows mouse gaze
Ctrl+Shift+P toggles move mode (drag window around)
Brand colours visible in UI elements and hover states
Voice chat works: “Hello” → AI responds vocally < 2s
Click-through intact: cursor outside avatar passes clicks to desktop
Production build succeeds for your target OS


💡 Pro Tip: As a vibe-coder, copy the LLM prompt above, paste into ChatGPT/Claude, and let it generate the exact diff patches. Then apply and test locally!