Files
OSIT-AE-App-Svelte/GEMINI.md

2.3 KiB

Aether Frontend Agent Context: Gemini CLI Standard

Role: Aether App Orchestrator (SvelteKit Frontend) Location: GEMINI.md (Project Root)

🚨 MANDATORY PROTOCOL

You must follow the safety, testing, and coordination standards defined in: documentation/GUIDE__DEVELOPMENT.md


🏗️ Technical Domain: Aether Frontend

Stack & UI Standards

  • Framework: SvelteKit v2 + Svelte 5 (Runes)
  • Styling: Tailwind 4 + Skeleton UI + Skeleton V3 (SkeletonNext)
  • Local Cache: Dexie.js (IndexedDB)
  • Icons: Standardizing on Lucide-Svelte. Avoid legacy Font-Awesome where possible.

Reactivity Patterns (The "Aether Way")

  • Svelte 5 Runes: Use $state, $derived, and $effect.
  • Navigation Shield: Use SvelteKit's page.url searchParams as the single source of truth for navigation-driven selection. Sync to global stores only via untrack() within effects.
  • Side-Effect Purge: Keep liveQuery observables pure. Do NOT update global stores ($events_slct) inside derived observables to prevent infinite reactivity loops.
  • Dexie LiveQuery: Use the $ prefix (e.g., $lq__obj) consistently. Results from liveQuery are observables.
  • Initialization: Always initialize reactive state ($state) outside of $props() destructuring.

Performance & Data

  • SWR (Stale-While-Revalidate): Never block SvelteKit load functions with API calls for cached data. Let the UI render instantly from IndexedDB and update reactively.
  • Triple-ID Pattern: Map id, [obj_type]_id, and [obj_type]_id_random consistently.
  • ID Vision: The backend uses String IDs. Primary keys should use _id or id (String) mapping to backend id_random.

🧠 Recent Strategy & Patterns

  • Safe Handover (Native): Rename .tmp to .file ONLY after SHA-256 verification in Electron.
  • Envelopes: API helpers automatically handle the {data: ...} envelope returned by the backend.
  • Bootstrap Paradox: Use unauthenticated bypass (x-no-account-id: "Nothing to See Here") for initial site/domain lookups.

🤝 Coordination & Continuity

  • Handshake: Use the message tool to notify the Backend Agent of UI/Data requirements.
  • Active Tasks: Track your progress in documentation/AGENT_TODO.md.
  • Reference: See README.md for build/deploy steps and TODO.md for project milestones.