aboutsummaryrefslogtreecommitdiffstats
path: root/AGENTS.md
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--AGENTS.md55
1 files changed, 55 insertions, 0 deletions
diff --git a/AGENTS.md b/AGENTS.md
new file mode 100644
index 0000000..31f1205
--- /dev/null
+++ b/AGENTS.md
@@ -0,0 +1,55 @@
1# Agent Instructions for rsplayer
2
3## Overview
4Rust CLI music player daemon for GNU/Linux with shell autocompletion, SQLite library database, Unix socket IPC, and Last.fm/ListenBrainz scrobbling.
5
6## Required Verification Commands
7Run these before completing any task:
8- Lint: `cargo clippy -- -D warnings`
9- Format check: `cargo fmt --check`
10- Test: `cargo test`
11- Build: `cargo build`
12
13## Development Workflow
14- Use `rsp restart` or `rsplayer restart` to kill any running daemon and start a new one (useful during development)
15- Daemon runs in background; restart command handles cleanup automatically
16- After making changes to audio/playback/daemon code, always restart the daemon to test changes
17
18## Code Conventions
19- Use `directories` crate to resolve XDG paths (respect `XDG_CONFIG_HOME` and `XDG_RUNTIME_DIR` environment variables)
20- Follow standard Rust style (enforced by `cargo fmt`)
21- Never commit changes unless explicitly requested by the user
22- Update shell completions when adding/modifying CLI subcommands
23- Use `rand` crate for shuffle/randomization features (added in v0.9)
24
25## Task-Specific Guidelines
26- **CLI changes**: Update clap subcommands (including `rsp scan` and `rsp settings`) and regenerate shell completion scripts
27- **Database changes**: Update SQLite schema and `rsp scan` logic
28- **Playback changes**: Modify daemon audio engine or queue management code
29 - Audio engine uses cpal for output and symphonia for decoding
30 - Queue system implemented in daemon.rs with `Queue` struct
31 - Sample buffering implemented to prevent buffer underruns - uses device default sample rate, not file's sample rate
32 - Pause/resume uses cpal stream `pause()`/`play()` methods
33- **Scrobbling changes**: Update Last.fm/ListenBrainz client implementation
34- **Config/Settings changes**: Update config schema, `rsp settings` subcommands, and scan interval/auto-scan logic
35
36## Completed Features (Phase 2)
37- [x] Unix socket daemon IPC
38- [x] Audio engine with play/pause/stop/volume
39- [x] Queue system with in-memory tracking and auto-advance
40- [x] Shuffle mode: `none`, `all`, and `album` (structure ready) implemented
41- [x] Next/previous track commands with queue navigation
42- [x] Resume CLI subcommand
43- [x] Directory playback - queues all audio files in folder recursively
44- [x] Fixed audio buffer underrun issues by using device default sample rate
45- [x] Queue display with pager support (`rsplayer queue`)
46- [x] Auto-play next track when current track ends
47
48## Remaining Work
49- Album shuffle mode (`ShuffleMode::Album`)
50- Database integration for queue persistence
51- `rsplayer queue` command for queue management
52- Scrobbling (Last.fm/ListenBrainz)
53- Database scanning and schema
54- Shell completion scripts
55- Systemd service unit