mpv-anime-build
AGENTS.md225 starsChanged 10 months agoMITView on GitHub
- UOSC is currently version 5.13.0. - scripts/uosc/main.lua and scripts/uosc/lib/menus.lua are heavily customized. - Never replace scripts/uosc/main.lua or scripts/uosc/lib/menus.lua with upstream versions without first identifying and preserving MPV Anime Build customizations. - When upgrading UOSC, compare: 1. clean previous upstream UOSC; 2. current customized UOSC; 3. new upstream UOSC; and perform a deliberate three-way port. - Preserve Anime Build UOSC menus, history, denoise controls, shader/profile controls, HDR controls, audio-only controls, subtitle downloader/search behavior, download integration, chapter highlighting, state synchronization, and…
We split this AGENTS.md into the rules it gives an agent
33 rules. About 0 are common, 27 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈27
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Prefer minimal, targeted changes over broad rewrites.
- Distinctive: line 15
Do not replace customized implementations with upstream code blindly.
- Distinctive: line 16
When updating an upstream component, compare the existing customized version with the upstream versions and port customizations …
- Distinctive: line 19
Do not make unrelated cleanup/refactoring changes while implementing a requested feature.
- Distinctive: line 25
Never reset, checkout, rebase, merge, or modify Git history unless explicitly instructed.
- Distinctive: line 26
Never discard the user's uncommitted changes.
- Distinctive: line 27
Before significant modifications, inspect Git status and understand the current working tree.
- Distinctive: line 28
After modifications, show the user the relevant Git diff and summarize the changed files.
- Very specific: line 34
Keep build_info.conf, README, CHANGELOG, website version information, and release metadata synchronized when explicitly performing a …
- Distinctive: line 35
Do not infer the application version from git describe output.
- Very specific: line 42
Never replace scripts/uosc/main.lua or scripts/uosc/lib/menus.lua with upstream versions without first identifying and preserving MPV Anime …
- Distinctive: line 43
When upgrading UOSC, compare:
- Very specific: line 49
Treat scripts/uosc/elements/, scripts/uosc/lib/, scripts/uosc/intl/, and script-opts/uosc.conf as part of the UOSC integration and check …
- Distinctive: line 50
Do not introduce duplicate UOSC functionality when the upstream version already provides an appropriate mechanism.
- Distinctive: line 56
Before changing it, understand its state flow and all callers.
- Distinctive: line 63
Do not rename or remove shaders unless explicitly instructed.
- Distinctive: line 64
Treat shader ordering as functional.
- Distinctive: line 65
Check resolution-specific chains carefully.
- Distinctive: line 67
Do not optimize shader chains purely by appearance of the code.
- Very specific: line 81
Do not accidentally reset manual_override on file-loaded when moving to next/previous files.
- Distinctive: line 83
Do not change the override semantics without explicit instruction.
- Very specific: line 98
Default downloads go to ~/ytdl unless changed through youtube-download.conf.
- Distinctive: line 100
Do not remove or rename the UOSC download binding without explicit instruction.
- Very specific: line 112
Keep general MPV overrides in mpv-*.conf conceptually separate from remembered Anime Build menu settings in user-*.conf.
- Distinctive: line 113
Do not rename configuration keys casually.
- Distinctive: line 114
When changing a configuration option, check all scripts that read it.
- Distinctive: line 119
Do not claim a feature exists unless it is actually implemented.
- Distinctive: line 121
When performing a release update, update the relevant user-facing version references consistently.
- Distinctive: line 125
Prefer local testing before GitHub commits/pushes.
- Distinctive: line 126
After code changes, perform appropriate syntax/configuration checks where possible.
- Distinctive: line 134
Before a substantial change:
- Distinctive: line 141
Do not commit or push unless explicitly instructed.
- Distinctive: line 143
If there is uncertainty about whether a behavior is intentional, ask the user rather than silently changing it.
≈ “Common” is an estimate: at least 1 in 5 of the 36,368 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
MPV Anime Build — Project Instructions
Project
- Project: MPV Anime Build
- Current version: v5.3
- Repository: https://github.com/Chinna95P/mpv-anime-build
General development rules
- This is a heavily customized MPV configuration project.
- Preserve existing functionality unless the user explicitly asks to change it.
- Prefer minimal, targeted changes over broad rewrites.
- Understand existing code and dependencies before modifying it.
- Do not replace customized implementations with upstream code blindly.
- When updating an upstream component, compare the existing customized version with the upstream versions and port customizations deliberately.
- Preserve existing filenames, directory structure, script names, shader names, configuration names, and public script-message interfaces unless explicitly asked to change them.
- Maintain both Linux and Windows compatibility where the affected feature supports both platforms.
- Do not make unrelated cleanup/refactoring changes while implementing a requested feature.
Git rules
- Never commit automatically.
- Never push automatically.
- Never reset, checkout, rebase, merge, or modify Git history unless explicitly instructed.
- Never discard the user's uncommitted changes.
- Before significant modifications, inspect Git status and understand the current working tree.
- After modifications, show the user the relevant Git diff and summarize the changed files.
- The user prefers to test changes locally before committing or pushing to GitHub.
Version rules
- The authoritative application version is
script-opts/build_info.conf. - Keep
build_info.conf, README, CHANGELOG, website version information, and release metadata synchronized when explicitly performing a release/version update. - Do not infer the application version from
git describeoutput. - Historical version references in changelogs/comments are not necessarily active version sources.
UOSC rules
- UOSC is currently version 5.13.0.
scripts/uosc/main.luaandscripts/uosc/lib/menus.luaare heavily customized.- Never replace
scripts/uosc/main.luaorscripts/uosc/lib/menus.luawith upstream versions without first identifying and preserving MPV Anime Build customizations. - When upgrading UOSC, compare:
- clean previous upstream UOSC;
- current customized UOSC;
- new upstream UOSC; and perform a deliberate three-way port.
- Preserve Anime Build UOSC menus, history, denoise controls, shader/profile controls, HDR controls, audio-only controls, subtitle downloader/search behavior, download integration, chapter highlighting, state synchronization, and other custom functionality.
- Treat
scripts/uosc/elements/,scripts/uosc/lib/,scripts/uosc/intl/, andscript-opts/uosc.confas part of the UOSC integration and check compatibility when changing UOSC. - Do not introduce duplicate UOSC functionality when the upstream version already provides an appropriate mechanism.
Anime profile controller
anime_profile_controller.luais a high-risk/core file.- It controls anime/live-action detection, resolution tiers, shader selection/order, persistence, profile switching, UOSC state synchronization, and public script-message interfaces.
- Before changing it, understand its state flow and all callers.
- Preserve existing script-message names and state keys unless explicitly instructed otherwise.
- Changes to shader chains must be checked against the corresponding UI labels, persistence logic, and resolution tiers.
Shader rules
- Preserve existing shader filenames and directory structure.
- Do not rename or remove shaders unless explicitly instructed.
- Treat shader ordering as functional.
- Check resolution-specific chains carefully.
- Changes to Adaptive Sharpen, Anime Line-Thinner, FSRCNNX, NNEDI3, Anime4K, ArtCNN, restoration, downscaling, and related shader stages must be tested at the relevant resolutions.
- Do not optimize shader chains purely by appearance of the code; understand their runtime purpose first.
Audio-only and visualizer rules
- Audio-only mode must avoid unnecessary video processing.
- Preserve existing visualizer lifecycle and style persistence.
- Changes involving
audio-visualizer.lua, audio profiles, equalizer, album art, spatial audio, passthrough, or audio-device selection should be tested together.
Track selector rules
track-selector.luauses smart audio/subtitle selection.- Manual track changes create a manual override.
- Manual override is intended to remain active for the current MPV session/playlist.
- A saved per-video manual override may restore that session-level override when the same video is resumed in a later MPV session.
- Do not accidentally reset
manual_overrideonfile-loadedwhen moving to next/previous files. - Preserve the console message indicating that manual override is active.
- Do not change the override semantics without explicit instruction.
Skip Intro and chapter rules
skip_intro.luadetects OP, ED, PV, and Intro chapters.- UOSC chapter highlighting uses the same category/color mapping.
- Current displayed category colors are Intro =
#FF00FF, OP =#00FF00, PV =#FF9900, and ED =#0080FF. skip_intro.luastores those colors in ASS BGR order: Intro =FF00FF, OP =00FF00, PV =0099FF, and ED =FF8000.- UOSC stores the same displayed colors in RGB/RGBA order.
- UOSC chapter range colors use transparency consistent with the timeline.
- Preserve the relationship between
skip_intro.luacategory colors and UOSC chapter-range colors.
Download rules
youtube-download.luais integrated with the UOSC Download button.- Default downloads go to
~/ytdlunless changed throughyoutube-download.conf. - Preserve stream-download functionality.
- Do not remove or rename the UOSC download binding without explicit instruction.
mpvSockets rules
mpvSockets.luahas Windows-specific behavior intended to prevent CMD flashes.- Preserve the Windows fix when modifying IPC/socket behavior.
Configuration rules
input.confbindings are coupled to Lua scripts and UOSC script messages.script-opts/*.confcontains important persistent configuration.scripts/custom-config-loader.lualoads exactly one root-levelmpv-<custom-name>.confafter the shippedmpv.conf; preserve its Windows/Linux behavior and its safe refusal when multiple matching files exist.- Keep general MPV overrides in
mpv-*.confconceptually separate from remembered Anime Build menu settings inuser-*.conf. - Do not rename configuration keys casually.
- When changing a configuration option, check all scripts that read it.
Documentation rules
README.md,CHANGELOG.md,FAQ.md,index.html, and related website files should remain consistent with the actual implementation.- Do not claim a feature exists unless it is actually implemented.
- Preserve historical changelog entries.
- When performing a release update, update the relevant user-facing version references consistently.
Testing rules
- Prefer local testing before GitHub commits/pushes.
- After code changes, perform appropriate syntax/configuration checks where possible.
- For MPV Lua changes, check Lua syntax and inspect relevant MPV console output.
- For UOSC changes, test both the UI behavior and the underlying script messages.
- For shader changes, test actual playback at representative resolutions.
- For changes involving multiple scripts, test the interaction between them rather than testing only the modified file.
Change process
Before a substantial change:
- Inspect relevant files and callers.
- Explain the intended approach.
- Make the smallest safe change.
- Validate the result.
- Show Git diff/status.
- Do not commit or push unless explicitly instructed.
If there is uncertainty about whether a behavior is intentional, ask the user rather than silently changing it.
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 28,693 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

