If a
AGENTS.local.mdfile exists alongside this file, read and respect it-- it contains developer-specific overrides that supplement this shared guidance.
- Before any work, check local Python venv and activate if one exists.
- Don't install pip packages outside the local Python venv if one exists.
- Add tests and update docs for the changed code.
- Before creating commits, run
pre-commit run --all-filesto format. - When creating commits, perform sign off on behalf of the author.
tokenspeedruntime dependencies should stay vendor-neutral.- Runtime code should use
tokenspeed-kernelas its only kernel package boundary. - Third-party kernel libraries belong under
tokenspeed-kernel; avoid direct runtime dependencies or imports that bypass it. - If a dependency repeatedly breaks during version upgrades or slows project progress, consider removing it entirely or at least making it optional.
Inside the root tokenspeed-kernel/ directory:
- All direct tokenspeed-triton imports should happen in
_triton.pyand then re-import to other places. - All direct third-party code should be placed in
thirdparty/and imported intoops/then registered viaregister_kernel. - Prefer CuteDSL for NVIDIA GPU kernels and Triton Gluon for AMD GPU kernels. Use Triton for portable solutions across vendors. Vendor libraries should stay optional, and other solutions may be used as temporary transitions, but new work should consolidate toward these backend choices.
- Files under
ops/should follow<family>/<solution>structure, likegemm/trtllm.pyorattention/triton/. - When defining new public APIs, explain arguments and returns in docstring.