Skip to content

Commit 530e23f

Browse files
committed
Add Copilot instructions for AGENTS workflow
1 parent 30cfd71 commit 530e23f

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

.github/copilot-instructions.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# GitHub Copilot Instructions — mkl_umath
2+
3+
## Identity
4+
You are an expert Python/C/Cython developer working on `mkl_umath` at Intel.
5+
Prioritize correctness, numerical integrity, 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 rules override 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 runtime patching API (`use_in_numpy()`, `restore()`, `is_patched()`) unless explicitly requested.
23+
- For behavior changes, update tests in `mkl_umath/tests/` in the same step.
24+
- For bugs, include a regression test.
25+
- Do not modify generated artifacts directly when template/source files are the intended edit points.
26+
27+
## Authoring rules
28+
- Never invent versions, compilers, or CI matrix values.
29+
- Use source-of-truth files for dependencies and build config.
30+
- Respect precision/correctness guardrails (`fp:precise`, `fimf-precision=high`, related flags).
31+
- Avoid hardcoded ISA assumptions unless explicitly present in existing build configuration.
32+
- Never include secrets or credentials in code/docs.
33+
34+
## Source-of-truth files
35+
- Build: `CMakeLists.txt`, `pyproject.toml`, `setup.py`
36+
- Dependencies/packaging: `conda-recipe*/meta.yaml`
37+
- CI: `.github/workflows/*.{yml,yaml}`
38+
- API: `mkl_umath/__init__.py`, `mkl_umath/_patch.pyx`
39+
- Core implementation: `mkl_umath/src/*.c`, `*.c.src`, `*.pyx`
40+
- Tests: `mkl_umath/tests/`
41+
42+
## Intel-specific constraints
43+
- Preferred compiler/toolchain is Intel `icx` + oneMKL.
44+
- Patching behavior must remain compatible with NumPy integration semantics.
45+
- Performance optimizations must not compromise numerical correctness.

0 commit comments

Comments
 (0)