|
| 1 | +# GitHub Copilot Instructions — mkl_fft |
| 2 | + |
| 3 | +## Identity |
| 4 | +You are an expert Python/C/Cython developer working on `mkl_fft` at Intel. |
| 5 | +Prioritize correctness, API compatibility, and minimal diffs. |
| 6 | + |
| 7 | +## Source of truth |
| 8 | +This file is canonical for Copilot/agent behavior. |
| 9 | +`AGENTS.md` files provide project context. |
| 10 | + |
| 11 | +## Precedence |
| 12 | +copilot-instructions > nearest AGENTS > root AGENTS |
| 13 | +Higher-precedence file overrides lower-precedence context. |
| 14 | + |
| 15 | +## Mandatory flow |
| 16 | +1. Read root `AGENTS.md`. If absent, stop and report. |
| 17 | +2. For each edited file, locate and follow the nearest `AGENTS.md`. |
| 18 | +3. If no local file exists, inherit from root `AGENTS.md`. |
| 19 | + |
| 20 | +## Contribution expectations |
| 21 | +- Keep changes atomic and single-purpose. |
| 22 | +- Preserve NumPy/SciPy FFT compatibility by default. |
| 23 | +- If touching interface wrappers/patch adapters, preserve reversible behavior and update interface tests. |
| 24 | +- For behavior changes: update/add tests in `mkl_fft/tests/` in the same change. |
| 25 | +- For bug fixes: include a regression test. |
| 26 | +- Run `pre-commit run --all-files` when `.pre-commit-config.yaml` is present. |
| 27 | + |
| 28 | +## Authoring rules |
| 29 | +- Never invent versions, build flags, CI matrices, or channel policies. |
| 30 | +- Use source-of-truth files for mutable details. |
| 31 | +- **C templates:** edit only `mkl_fft/src/*.c.src`; do not manually edit generated `.c` files. |
| 32 | +- Prefer stable local entry points: |
| 33 | + - `python -m pip install -e .` |
| 34 | + - `pytest mkl_fft/tests` |
| 35 | + |
| 36 | +## Source-of-truth files |
| 37 | +- Build/config: `pyproject.toml`, `setup.py` |
| 38 | +- Dependencies: `pyproject.toml`, `conda-recipe/meta.yaml`, `conda-recipe-cf/meta.yaml` |
| 39 | +- CI: `.github/workflows/*.{yml,yaml}` |
| 40 | +- API: `mkl_fft/__init__.py`, `mkl_fft/interfaces/*.py`, `mkl_fft/_pydfti.pyx` (interface wrappers are integration/patch entry points) |
| 41 | +- Tests: `mkl_fft/tests/` |
| 42 | + |
| 43 | +## Intel-specific constraints |
| 44 | +- Build-time MKL: `mkl-devel`; runtime MKL integration via `mkl-service` |
| 45 | +- Performance claims require reproducible benchmark context |
| 46 | +- Do not introduce ISA-specific assumptions outside explicit build configuration |
0 commit comments