nunif / windows_package
AGENTS.md3.5k starsChanged 11 months agoMITView on GitHub
Note: For general coding style, module execution rules, and restricted directories, always follow the primary AGENTS.md (or nunif/AGENTS.md).
- Deletes or force-pushes
- Installs packages
We split this AGENTS.md into the rules it gives an agent
8 rules. About 0 are common, 1 is distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 13
Run Git commands targeting nunif/.
- Very specific: line 16
When modifying these files, always make changes to nunif/windows_package/ so they can be committed to the Git repository.
- Very specific: line 19
Always use .\nunif-cmd.bat <command> (e.g., .\nunif-cmd.bat python -m iw3.cli ...) to run commands in the bundled Python environment.
- Very specific: line 22
Do NOT execute nunif-prompt.bat (it starts an interactive shell and blocks agent execution).
- Very specific: line 23
Do NOT run update.bat arbitrarily during development, as it will run git reset --hard and discard uncommitted changes.
- Very specific: line 28
Caution: Prefer installing specific tools rather than pip install -r requirements-dev.txt.
- Very specific: line 30
Run tests with .\nunif-cmd.bat python -m pytest <test_path> (e.g., .\nunif-cmd.bat python -m pytest waifu2x/tests/test_cli.py).
- Distinctive: line 41
All core development guidelines remain defined in the project root AGENTS.md.
≈ “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
Agent Guidelines for Windows Distribution Package
Note: For general coding style, module execution rules, and restricted directories, always follow the primary
AGENTS.md(ornunif/AGENTS.md).
Scope
This document provides specific instructions when maintaining or working inside the Windows standalone distribution package (the windows_package/ folder in the repository, or the root of the extracted nunif-windows package).
Context-Specific Instructions
1. When workspace root is the distribution package (nunif-windows)
- Git & Source Root:
- The actual Git repository and source code are located in the
nunif/subdirectory. - Run Git commands targeting
nunif/. You can execute.\nunif-cmd.bat git <args>from the package root to automatically use the bundled MinGit insidenunif/.
- The actual Git repository and source code are located in the
- Upstream Source of Root Files:
- Root batch files (
*.bat),docs/, andtorch_compile/are deployed fromnunif/windows_package/. - When modifying these files, always make changes to
nunif/windows_package/so they can be committed to the Git repository. - To test changes locally in the distribution root, copy the modified files from
nunif/windows_package/to the root (or runupdate-installer.bat).
- Root batch files (
- Command Execution:
- Always use
.\nunif-cmd.bat <command>(e.g.,.\nunif-cmd.bat python -m iw3.cli ...) to run commands in the bundled Python environment. nunif-cmd.batis located in the package root and is NOT inPATH. Always invoke it with.\(e.g.,.\nunif-cmd.bat) from the root directory, especially in PowerShell where current directory binaries require explicit paths..\nunif-cmd.batautomatically sets environment variables and switches the working directory tonunif/.- Do NOT execute
nunif-prompt.bat(it starts an interactive shell and blocks agent execution). - Do NOT run
update.batarbitrarily during development, as it will rungit reset --hardand discard uncommitted changes.
- Always use
- Development & Testing Dependencies:
- Development and testing tools (
pytest,ruff,mypy, and type stubs inrequirements-dev.txt) are NOT installed by default in the distribution package. - Install specific tools on demand:
.\nunif-cmd.bat python -m pip install pytest ruff mypy types-pywin32
- Caution: Prefer installing specific tools rather than
pip install -r requirements-dev.txt. Installing unnecessary dev packages may introduce dependency conflicts with bundled packages (such as bundledopencv-pythonrequiringnumpy>=2).
- Development and testing tools (
- Running Tests:
- Run tests with
.\nunif-cmd.bat python -m pytest <test_path>(e.g.,.\nunif-cmd.bat python -m pytest waifu2x/tests/test_cli.py). - Tests work in CPU-only environments without a GPU (execution will take longer).
- Run tests with
- Update Mechanism Architecture:
- Batch files cannot safely overwrite themselves while running on Windows (causes corrupted execution due to cmd.exe offset reading).
- Therefore, the update process is decoupled:
update.batupdates the code and copiesupdate-installer.bat, whileupdate-installer.batupdatesupdate.batand other launcher batch files. Do not merge them into a single self-modifying batch script.
- Directory Restrictions Reminder:
- In addition to the restrictions in
nunif/AGENTS.md, never recursively scan or listtmp/,python/, orgit/in the package root.
- In addition to the restrictions in
2. When workspace root is the main repository (nunif)
- The
windows_package/directory contains templates, packaging scripts, and installers for Windows distribution releases. - Editing files under
windows_package/modifies the source templates for the Windows package. - All core development guidelines remain defined in the project root
AGENTS.md.
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 repositoryOne other file it gives its agents.
- AGENTS.mdAGENTS.md
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.

