This file provides guidance to LLMs when working with code in this repository.
mt is a desktop music player designed for large music collections, built with Tauri (Rust backend), basecoat (with Tailwind CSS), and Alpine.js. The backend uses Rust for audio playback and system integration, while the frontend is a modern web-based UI with reactive components.
- ALWAYS use atomic commits — see Git Workflow for interactive staging, patch mode, and worktree management
- NEVER create *.backup files. This is a version controlled repo
Always use Context7 MCP when I need library/API documentation, code generation, setup or configuration steps without me having to explicitly ask.
- alpinejs/alpine
- basharovv/musicat
- dubzzz/fast-check
- hunvreus/basecoat
- jdx/mise
- microsoft/playwright
- mrlesk/backlog.md
- nextest-rs/nextest
- roborev-dev/roborev
- serial-ata/lofty-rs
- sharkdp/hyperfine
- taiko2k/tauon
- tailwindlabs/tailwindcss
- tranxuanthang/lrclib
- websites/deno
- websites/last_fm_api
- websites/rs_tauri_2_9_5
- websites/taskfile_dev
| Topic | Guide |
|---|---|
| Commands, tooling, dependencies | Development Guide |
| Testing strategy, E2E, coverage | Testing Guide |
| Local GitHub Actions testing | act Guide |
| Atomic commits, worktrees | Git Workflow |
| System architecture, components | Tauri Architecture |
| MCP bridge tools | MCP Tool Reference |
| Remote debugging, crash analysis | Debugging Guide |
| Last.fm scrobbling | Last.fm Integration |
| Cross-platform builds, CI/CD | Build Configuration |
| Continuous code review | roborev |
MT uses a pure Rust + Tauri architecture:
- Frontend: Tauri WebView (Alpine.js + Basecoat/Tailwind CSS)
- Backend: Native Rust (91 Tauri commands)
- Audio: Rodio/Symphonia
- Database: SQLite via rusqlite (
mt.dbin Tauri app data dir) - Build Cache: sccache (shared across worktrees/workspaces)
| Platform | App Data Dir |
|---|---|
| macOS | ~/Library/Application Support/com.mt.desktop/ |
| Linux | $XDG_DATA_HOME/com.mt.desktop/ |
Database: mt.db, Logs: see Observability
See Tauri Architecture for full details.
The queue store (app/frontend/js/stores/queue.js) maintains tracks in play order — the items array always reflects the order tracks will be played.
- Without shuffle: Tracks play sequentially in the order they were added
- With shuffle enabled: The
itemsarray is physically reordered using Fisher-Yates shuffle- Current track moves to index 0
- Remaining tracks are randomly shuffled
- When shuffle is disabled: Original order is restored from
_originalOrder - Loop + Shuffle: When queue ends with loop=all, items are re-shuffled for a new random order
Now Playing view: Always displays tracks in the order they will play (current track first, then upcoming).
All commands use Taskfile. Run task --list for full list.
task lint # Run all linters (Rust + JS)
task format # Run all formatters (Rust + JS)
task test # Run all tests (Rust + JS unit)
task test:e2e # Run Playwright E2E tests
task pre-commit # Run pre-commit hooksFrontend (uses Deno toolchain, not ESLint/Prettier):
deno lint # Lint JS/TS
deno fmt # Format JS/TS
deno fmt --check # Check formatting without changes
cd app/frontend && npx vitest run # Unit/property tests (Vitest via Node)
cd app/frontend && npx playwright test # E2E testsBackend (Rust):
cargo clippy --workspace # Lint
cargo fmt --all # Format
cargo nextest run --workspace # Tests (falls back to cargo test)
cargo check --manifest-path src-tauri/Cargo.toml # Fast type check (no binary)- Before committing:
task lint && task format - After changing frontend code:
cd app/frontend && npx vitest run - After changing Rust code:
cargo nextest run --workspace
- Components: Modular, single-responsibility. Use Alpine.js for interactivity, basecoat/Tailwind for styling.
- IPC: All backend operations via Tauri commands. Use async/await. Emit events for real-time updates.
- File Organization: Frontend in
app/frontend/, backend insrc-tauri/src/. Keep files under 500 LOC. - Testing: Unit tests + Playwright E2E. All integration tests MUST use Playwright.
- Code Style:
deno lint+deno fmt(frontend),cargo fmt+cargo clippy(backend). Run formatters before committing.
Every commit is automatically reviewed by roborev via git hooks. Reviews run in the background and findings must be addressed before merging.
Config: .roborev.toml (project), ~/.roborev/config.toml (global)
roborev show # List recent reviews
roborev show --job <id> # View a specific review
roborev show --job <id> --json # Machine-readable review output
roborev fix # Fix all unaddressed reviews
roborev fix <job_id> # Fix a specific review
roborev fix --unaddressed --list # List unaddressed reviews without fixing
roborev refine # Fix, re-review, repeat until passing
roborev comment --job <id> "<msg>" # Add a comment to a review
roborev address <job_id> # Mark a review as addressed| Skill | Purpose |
|---|---|
/roborev-review |
Request a code review for a specific commit |
/roborev-review-branch |
Review all commits on the current branch |
/roborev-fix |
Discover and fix all unaddressed review findings |
/roborev-address |
Fetch a review and make code changes to address findings |
/roborev-respond |
Comment on a review and mark it as addressed |
/roborev-design-review |
Request a design review for a commit |
/roborev-design-review-branch |
Design review for all commits on current branch |
- Commit — roborev automatically reviews in the background
- Check —
roborev showorroborev fix --unaddressed --listto see findings - Fix —
/roborev-fixaddresses findings, runs tests, comments, and marks addressed - Refine —
roborev refineloops fix-and-review in an isolated worktree until passing
When roborev fix cannot automatically resolve a finding, create a backlog task with the roborev label and reference the job ID.
<CRITICAL_INSTRUCTION>
This project uses Backlog.md MCP for all task and project management.
CRITICAL RESOURCE: Read backlog://workflow/overview to understand when and how to use Backlog for this project.
- First time working here? Read the overview resource IMMEDIATELY to learn the workflow
- Already familiar? You should have the overview cached ("## Backlog.md Overview (MCP)")
- When to read it: BEFORE creating tasks, or when you're unsure whether to track work
| Command | Purpose |
|---|---|
task_create |
Create a new task (status defaults to "To Do") |
task_edit |
Edit metadata, check ACs, update notes, change status |
task_view |
View full task details |
task_search |
Find tasks by keyword |
task_list |
List tasks with optional filters |
task_complete |
Moves task to backlog/completed/ — only use for cleanup, not for marking done |
- Create:
task_create— new task inbacklog/tasks/ - Start:
task_edit(status: "In Progress")— mark as active - Done:
task_edit(status: "Done")— mark finished, stays inbacklog/tasks/(visible on kanban) - Archive:
task_complete— moves tobacklog/completed/(use only when explicitly cleaning up)
IMPORTANT: Use task_edit(status: "Done") to mark tasks as done. Do NOT use task_complete unless the user explicitly asks to archive/clean up — it removes the task from the kanban.
The overview resource contains additional detail on decision frameworks, search-first workflow, and guides for task creation, execution, and completion.
</CRITICAL_INSTRUCTION>