agentleFS
Hugging FaceKnown publisherhuggingface/xet-core/hf_xet/AGENTS.md

xet-core / hf_xet

AGENTS.md625 starsChanged 15 days agoApache-2.0View on GitHub

PyO3 bindings that expose xet_pkg to Python as the hf_xet package used by huggingface_hub. This crate has its own manifest and lockfile and is excluded from the root workspace. Shared conventions are in the root guide. Run from the repository root unless noted. Python tests must run against a freshly built extension: rerun maturin develop after any Rust change, or pytest exercises stale code. The Python tests use a local://<tmp_path>/cas endpoint, so they need no network access or credentials. Fixtures…

  • Installs packages
  • 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 31,542 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 repository3 other files it gives its agents.

The file

We split this AGENTS.md into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 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.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run from the repository root unless noted.

    line 13

≈ “Common” is an estimate: at least 1 in 5 of the 40,246 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

Agent Guide for hf_xet

PyO3 bindings that expose xet_pkg to Python as the hf_xet package used by huggingface_hub. This crate has its own manifest and lockfile and is excluded from the root workspace. Shared conventions are in the root guide.

Setup

  • Activate a virtualenv, then pip install maturin pytest.
  • Rust unit tests link against libpython, so a Python development install must be available (CI installs libpython<ver>-dev).
  • pyo3's auto-initialize feature belongs in [dev-dependencies] only; tests/pyo3_features.rs enforces this. Do not add it to the regular dependency.

Build and test

Run from the repository root unless noted.

CommandPurpose
cargo +nightly fmt --manifest-path hf_xet/Cargo.toml --all -- --checkFormat check
cargo clippy -r --verbose --manifest-path hf_xet/Cargo.toml -- -D warningsLint
cargo test --manifest-path hf_xet/Cargo.toml --verbose --no-fail-fastRust unit tests and manifest invariants
(cd hf_xet && maturin develop)Build and install the extension into the active virtualenv
pytest hf_xet/tests/ -vPython integration tests against the rebuilt extension
(cd hf_xet && maturin build)Produce a wheel

Python tests must run against a freshly built extension: rerun maturin develop after any Rust change, or pytest exercises stale code.

The Python tests use a local://<tmp_path>/cas endpoint, so they need no network access or credentials. Fixtures and upload helpers live in tests/conftest.py; add new tests as test_... functions or Test... classes using tmp_path and the endpoint fixture.

hf_xet/Cargo.lock is committed. Commit it when dependency changes update it; CI fails otherwise.

Downstream tests

The hf-xet-tests workflow builds this crate and runs huggingface_hub's tests/test_xet_*.py against it. For changes to the Python API surface, run those tests locally against a checkout of huggingface_hub installed with pip install -e 'huggingface_hub[testing]'.

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.