agentleFS
MicrosoftKnown publishermicrosoft/winml-cli/CLAUDE.md

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…

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

    Never hardcode model architecture names, node/operator names, input/output tensor names, layer naming patterns, or any model-specific logic.

    line 7
  2. Distinctive:

    All testing uses pytest with code-generated results.

    line 11
  3. Very specific:

    Run the necessary pytest scope after every implementation or test revision (for example, affected test files/modules/cases).

    line 15
  4. Very specific:

    Run full suite uv run pytest tests/ only when explicitly requested, before merge/release, or when impact is broad/unclear.

    line 16
  5. Distinctive:

    Never assume tests pass without verification.

    line 17
  6. Very specific:

    Python: Always use uv run or activate venv first.

    line 25
  7. Very specific:

    Temp files: Use temp/ folder in project root.

    line 26
  8. Very specific:

    Never use absolute from winml.modelkit.* paths in source code

    line 35
  9. Very specific:

    Never reach into internal submodules for symbols exported by __init__.py

    line 40
  10. Very specific:

    Every symbol that external code needs must be exported in the package's __init__.py

    line 45
  11. Very specific:

    When adding new public classes/functions, add them to both the import and __all__

    line 46
  12. Very specific:

    Run uv run ruff check --fix after revising Python code

    line 51
  13. Very specific:

    Follow naming rules in /docs/naming-convention.md (ONNX, EP, QDQ, Op acronym casing)

    line 52
  14. Distinctive:

    Always ask clarifying questions before planning if requirements are ambiguous

    line 53
  15. Very specific:

    Never add Co-Authored-By when doing git commit

    line 58
  16. Distinctive:

    Do not include "Test plan" section in PR descriptions

    line 59

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

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

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 run or 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 (not from 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 --fix after 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-By when doing git commit
  • Do not include "Test plan" section in PR descriptions

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.