agentleFS
Chinna95PChinna95P/mpv-anime-build/AGENTS.md

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
  1. Distinctive:

    Prefer minimal, targeted changes over broad rewrites.

    line 13
  2. Distinctive:

    Do not replace customized implementations with upstream code blindly.

    line 15
  3. Distinctive:

    When updating an upstream component, compare the existing customized version with the upstream versions and port customizations …

    line 16
  4. Distinctive:

    Do not make unrelated cleanup/refactoring changes while implementing a requested feature.

    line 19
  5. Distinctive:

    Never reset, checkout, rebase, merge, or modify Git history unless explicitly instructed.

    line 25
  6. Distinctive:

    Never discard the user's uncommitted changes.

    line 26
  7. Distinctive:

    Before significant modifications, inspect Git status and understand the current working tree.

    line 27
  8. Distinctive:

    After modifications, show the user the relevant Git diff and summarize the changed files.

    line 28
  9. Very specific:

    Keep build_info.conf, README, CHANGELOG, website version information, and release metadata synchronized when explicitly performing a …

    line 34
  10. Distinctive:

    Do not infer the application version from git describe output.

    line 35
  11. Very specific:

    Never replace scripts/uosc/main.lua or scripts/uosc/lib/menus.lua with upstream versions without first identifying and preserving MPV Anime …

    line 42
  12. Distinctive:

    When upgrading UOSC, compare:

    line 43
  13. Very specific:

    Treat scripts/uosc/elements/, scripts/uosc/lib/, scripts/uosc/intl/, and script-opts/uosc.conf as part of the UOSC integration and check …

    line 49
  14. Distinctive:

    Do not introduce duplicate UOSC functionality when the upstream version already provides an appropriate mechanism.

    line 50
  15. Distinctive:

    Before changing it, understand its state flow and all callers.

    line 56
  16. Distinctive:

    Do not rename or remove shaders unless explicitly instructed.

    line 63
  17. Distinctive:

    Treat shader ordering as functional.

    line 64
  18. Distinctive:

    Check resolution-specific chains carefully.

    line 65
  19. Distinctive:

    Do not optimize shader chains purely by appearance of the code.

    line 67
  20. Very specific:

    Do not accidentally reset manual_override on file-loaded when moving to next/previous files.

    line 81
  21. Distinctive:

    Do not change the override semantics without explicit instruction.

    line 83
  22. Very specific:

    Default downloads go to ~/ytdl unless changed through youtube-download.conf.

    line 98
  23. Distinctive:

    Do not remove or rename the UOSC download binding without explicit instruction.

    line 100
  24. Very specific:

    Keep general MPV overrides in mpv-*.conf conceptually separate from remembered Anime Build menu settings in user-*.conf.

    line 112
  25. Distinctive:

    Do not rename configuration keys casually.

    line 113
  26. Distinctive:

    When changing a configuration option, check all scripts that read it.

    line 114
  27. Distinctive:

    Do not claim a feature exists unless it is actually implemented.

    line 119
  28. Distinctive:

    When performing a release update, update the relevant user-facing version references consistently.

    line 121
  29. Distinctive:

    Prefer local testing before GitHub commits/pushes.

    line 125
  30. Distinctive:

    After code changes, perform appropriate syntax/configuration checks where possible.

    line 126
  31. Distinctive:

    Before a substantial change:

    line 134
  32. Distinctive:

    Do not commit or push unless explicitly instructed.

    line 141
  33. Distinctive:

    If there is uncertainty about whether a behavior is intentional, ask the user rather than silently changing it.

    line 143

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

MPV Anime Build — Project Instructions

Project

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 describe output.
  • Historical version references in changelogs/comments are not necessarily active version sources.

UOSC rules

  • 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 other custom functionality.
  • Treat scripts/uosc/elements/, scripts/uosc/lib/, scripts/uosc/intl/, and script-opts/uosc.conf as 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.lua is 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.lua uses 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_override on file-loaded when 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.lua detects 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.lua stores 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.lua category colors and UOSC chapter-range colors.

Download rules

  • youtube-download.lua is integrated with the UOSC Download button.
  • Default downloads go to ~/ytdl unless changed through youtube-download.conf.
  • Preserve stream-download functionality.
  • Do not remove or rename the UOSC download binding without explicit instruction.

mpvSockets rules

  • mpvSockets.lua has Windows-specific behavior intended to prevent CMD flashes.
  • Preserve the Windows fix when modifying IPC/socket behavior.

Configuration rules

  • input.conf bindings are coupled to Lua scripts and UOSC script messages.
  • script-opts/*.conf contains important persistent configuration.
  • scripts/custom-config-loader.lua loads exactly one root-level mpv-<custom-name>.conf after the shipped mpv.conf; preserve its Windows/Linux behavior and its safe refusal when multiple matching files exist.
  • Keep general MPV overrides in mpv-*.conf conceptually separate from remembered Anime Build menu settings in user-*.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:

  1. Inspect relevant files and callers.
  2. Explain the intended approach.
  3. Make the smallest safe change.
  4. Validate the result.
  5. Show Git diff/status.
  6. 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.

Download now (ZIP)

  • 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.

  • In this repository2 other files it gives its agents.

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.