airiVibe Coding GuideArchitecture Overview

Architecture Overview

🤖 AI Context Prompt (Copy-Paste to Your LLM)

Prompt
"I'm working on **AIRI** — an open-source AI companion that lives as a desktop pet and joins Discord, Telegram, and Minecraft.
 
ARCHITECTURE
- apps/stage-tamagotchi  : Tauri desktop pet (Vue 3 + Rust plugins)
- apps/stage-web         : Browser version of the companion
- services/discord-bot   : Voice & text bot for Discord (Node.js)
- services/telegram-bot  : Tick-based chat agent for Telegram
- services/minecraft     : Autonomous player via mineflayer
- packages/stage-ui      : Shared UI components + Pinia stores
- packages/ccc           : Character Card Creator (persona data model)
- crates/                : Rust plugins (VAD, STT, window pass-through)
 
KEY CONCEPTS
- Character Card  → builds system prompt for the LLM
- Marker Parser   → transforms <|EMOTE_*|> etc. into animations/actions
- Voice Pipeline  → Silero-VAD → Whisper → LLM → TTS
- Click-Through   → Rust plugin toggles window ignoreCursorEvents
 
COMMON TASKS
- Change persona  : edit packages/ccc/src/define/card.ts or use Settings UI
- New marker      : update constants/emotions.ts + add handler
- Discord tweaks  : edit services/discord-bot/src/commands/
- Compile plugins : pnpm run build:native (uses Cargo)
 
Please help me with [YOUR TASK HERE]."

📖 Quick Architecture Tour

apps/
  stage-tamagotchi/     # desktop pet (Tauri + Vue)
  stage-web/            # web pet (Vite + Vue)
services/
  discord-bot/          # joins voice channels
  telegram-bot/         # autonomous ticking agent
  minecraft/            # in-game AI player
packages/
  stage-ui/             # UI library + Pinia stores + composables
  ccc/                  # Character Card schema helper
crates/
  tauri-plugin-*        # Rust: VAD, STT, mouse, window

Code Map — Where to Find What

Wondering about…Open this path
Desktop click-through logicapps/stage-tamagotchi/src/composables/tauri-window-pass-through-on-hover.ts
Live2D / VRM renderingapps/stage-tamagotchi/src/pages/index.vue
Voice Activity Detectioncrates/tauri-plugin-ipc-audio-vad-ort/src/lib.rs
Prompt builderapps/playground-prompt-engineering/src/composables/useCharacterPrompt.ts
Discord /summon commandservices/discord-bot/src/commands/join.ts
Telegram ticking promptservices/telegram-bot/src/prompts/system-ticking-v1.velin.md
Minecraft movement skillservices/minecraft/src/skills/movement.ts