winml-cli
CLAUDE.md41 starsChanged 6 months agoMITView on GitHub
Never hardcode model architecture names, node/operator names, input/output tensor names, layer naming patterns, or any model-specific logic. All solutions must be universal and architecture-agnostic. All testing uses pytest with code-generated results. Never create standalone test scripts, use LLM-generated expectations, or generate test data manually. Run the necessary pytest scope after every implementation or test revision (for example, affected test files/modules/cases). Run full suite uv run pytest tests/ only when explicitly requested, before merge/release, or when impact is broad/unclear. Never assume…
In this repository4 other files it gives its agents.
- tests/CLAUDE.mdCLAUDE.md
- adding-model-supportSkill
- auto-optimizeSkill
- use-winml-cliSkill
The file
Show its rules and text
We split this CLAUDE.md into the rules it gives an agent
16 rules. About 0 are common, 5 are distinctive, and 11 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
11
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 7
Never hardcode model architecture names, node/operator names, input/output tensor names, layer naming patterns, or any model-specific logic.
- Distinctive: line 11
All testing uses pytest with code-generated results.
- Very specific: line 15
Run the necessary pytest scope after every implementation or test revision (for example, affected test files/modules/cases).
- Very specific: line 16
Run full suite uv run pytest tests/ only when explicitly requested, before merge/release, or when impact is broad/unclear.
- Distinctive: line 17
Never assume tests pass without verification.
- Very specific: line 25
Python: Always use uv run or activate venv first.
- Very specific: line 26
Temp files: Use temp/ folder in project root.
- Very specific: line 35
Never use absolute from winml.modelkit.* paths in source code
- Very specific: line 40
Never reach into internal submodules for symbols exported by __init__.py
- Very specific: line 45
Every symbol that external code needs must be exported in the package's __init__.py
- Very specific: line 46
When adding new public classes/functions, add them to both the import and __all__
- Very specific: line 51
Run uv run ruff check --fix after revising Python code
- Very specific: line 52
Follow naming rules in /docs/naming-convention.md (ONNX, EP, QDQ, Op acronym casing)
- Distinctive: line 53
Always ask clarifying questions before planning if requirements are ambiguous
- Very specific: line 58
Never add Co-Authored-By when doing git commit
- Distinctive: line 59
Do not include "Test plan" section in PR descriptions
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.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
CLAUDE.md
Cardinal Rules
1. No Hardcoded Logic
Never hardcode model architecture names, node/operator names, input/output tensor names, layer naming patterns, or any model-specific logic. All solutions must be universal and architecture-agnostic.
2. Pytest Only
All testing uses pytest with code-generated results. Never create standalone test scripts, use LLM-generated expectations, or generate test data manually.
3. Mandatory Test Verification
Run the necessary pytest scope after every implementation or test revision (for example, affected test files/modules/cases).
Run full suite uv run pytest tests/ only when explicitly requested, before merge/release, or when impact is broad/unclear.
Never assume tests pass without verification.
4. Never Skip Failing Tests
Investigate root cause and fix the underlying issue. Never use pytest.mark.skip or xfail to hide failures. Skips are only acceptable for hardware/EP requirements (CUDA, Dml, AVX).
Development Commands
- Python: Always use
uv runor activate venv first. Never run bare python commands. - Temp files: Use
temp/folder in project root. - Node.js: Available via fnm. Use
eval "$(fnm env)"before npm/npx commands.
Import Rules
Source code (src/)
- Relative imports through
__init__.py:from ..onnx import ONNXDomain(notfrom winml.modelkit.onnx.domains import ONNXDomain) - Within the same package, sibling-relative is fine:
from .utils import EXTERNAL_DATA_THRESHOLD - Never use absolute
from winml.modelkit.*paths in source code
Test code (tests/)
- Absolute imports from package level:
from winml.modelkit.onnx import ONNXDomain - Never reach into internal submodules for symbols exported by
__init__.py - Exception: private
_-prefixed functions may use internal imports for testing implementation details
__init__.py public API
- Every symbol that external code needs must be exported in the package's
__init__.py - When adding new public classes/functions, add them to both the import and
__all__ - Private (
_-prefixed) symbols are never added to__init__.py
Code Quality
- Run
uv run ruff check --fixafter revising Python code - Follow naming rules in
/docs/naming-convention.md(ONNX, EP, QDQ, Op acronym casing) - Always ask clarifying questions before planning if requirements are ambiguous
- Critically evaluate proposals — challenge design decisions when warranted
Git
- Never add
Co-Authored-Bywhen doing git commit - Do not include "Test plan" section in PR descriptions
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
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.

