This file defines repository-wide common rules for AI coding agents.
Use rules in this order:
- Directory-specific AGENT.md (frontend/, docs/, backend/) when present
- Instructions under .github/instructions/* and .github/copilot-instructions.md
- This root AGENT.md
When rules conflict, prefer the rule with narrower scope.
- Monorepo: frontend (Vue/Vite), backend (Rust/Tauri), docs (Nuxt)
- Package manager: pnpm only
- Keep this repository template-generic; do not add product-specific logic
- .env is the source of truth for app metadata/version; do not manually desync version fields
This repository is a template. When it is used for a concrete app, fill in this section first.
- App name: vrm2sl (VRM to Second Life Converter)
- Domain/business context: 3D avatar format conversion — VRM 1.0 (glTF extension) to Second Life Bento-compatible GLB
- Target users: Second Life residents who own VRM avatars and want to import them into Second Life
- Supported platforms: Windows, macOS, Linux
- Release constraints: Offline-only; no external network calls during conversion
- Feature 1: VRM 1.0 file analysis — validates humanoid bone mapping, detects missing bones, estimates avatar height, and reports texture info
- Feature 2: VRM to GLB conversion — remaps skeleton to SL Bento rig, corrects bind-pose rotations (finger Y-axis zeroing), rescales to target height, and optionally downscales textures
- Feature 3: Real-time 3D preview — renders the loaded VRM/GLB using Three.js with orbit camera, idle animation, and BVH retargeting support
- FR-1: Accept VRM 1.0 input files via file picker dialog or drag-and-drop
- FR-2: Produce a GLB output compatible with Second Life's Bento skeleton importer
- FR-3: Report conversion metrics (scale factor, texture counts, validation issues) to the user
- Performance: Analysis and conversion of typical VRM files (< 100 MB) must complete within a reasonable time on a modern desktop
- Security: File I/O is sandboxed via Tauri capabilities; no arbitrary shell execution
- Accessibility: Vuetify-based UI; follow standard keyboard navigation patterns
- Localization: UI text must be present in en, ja, fr, ko, zhHans, zhHant
- Observability/logging: Rust backend emits structured log events via
send_log_with_handle; frontend displays them in the log panel
- VRM 0.x support (tool explicitly rejects VRM 0.x files)
- Upload to Second Life servers
- Batch/folder conversion
- Naming/domain terms: "SL" = Second Life; "Bento" = SL's extended skeleton with finger/face bones; "VRM" = Virtual Reality Model (glTF extension by VRM Consortium)
- API/command naming conventions: Tauri commands use snake_case with
_commandsuffix (e.g.analyze_vrm_command,convert_vrm_command) - Storage and data retention policy: Project settings are persisted as JSON by the user on explicit save; no auto-save
- Error handling policy: Tauri commands return
Result<T, String>; frontend shows errors viauseNotification
Rule: Before implementing app-specific features, check this section and align implementation decisions with it.
For all generated code, documentation comments in English are mandatory.
Add JSDoc-compliant comments for generated:
- functions (including exported arrow functions)
- constants
- classes
Use tags when applicable:
- @param
- @returns
- @throws
- @example
Add Rustdoc comments for generated:
- functions
- constants
- types (struct, enum, trait)
Use sections when applicable:
This applies to newly created symbols and symbols modified during refactoring.
- frontend/: frontend/AGENT.md
- docs/: docs/AGENT.md
- backend/: backend/AGENT.md