Skip to content

Commit fe62475

Browse files
committed
Update AGENTS for interfaces namespace and patching guidance
1 parent b0e4a38 commit fe62475

3 files changed

Lines changed: 9 additions & 5 deletions

File tree

.github/copilot-instructions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Higher-precedence file overrides lower-precedence context.
1919

2020
## Contribution expectations
2121
- Keep changes atomic and single-purpose.
22-
- Preserve `numpy.random` compatibility by default.
22+
- Preserve `numpy.random` compatibility by default, including compatibility aliases during namespace transitions.
2323
- For behavior changes: update/add tests in `mkl_random/tests/` in the same change.
2424
- For bug fixes: include a regression test.
2525
- Run `pre-commit run --all-files` when `.pre-commit-config.yaml` is present.
@@ -36,7 +36,7 @@ Higher-precedence file overrides lower-precedence context.
3636
- Build/config: `pyproject.toml`, `setup.py`
3737
- Dependencies: `pyproject.toml`, `conda-recipe/meta.yaml`, `conda-recipe-cf/meta.yaml`
3838
- CI: `.github/workflows/*.{yml,yaml}`
39-
- API: `mkl_random/__init__.py`, `mkl_random/mklrand.pyx`
39+
- API: `mkl_random/__init__.py`, `mkl_random/mklrand.pyx`, `mkl_random/interfaces/*.py` (when present)
4040
- Tests: `mkl_random/tests/`
4141

4242
## Intel-specific constraints

AGENTS.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ It provides accelerated random sampling with API compatibility goals relative to
99
## Key components
1010
- **Python package:** `mkl_random/`
1111
- **Cython layer:** `mkl_random/mklrand.pyx`
12-
- **C backend/templates:** `mkl_random/src/`
12+
- **C/C++ backend sources:** `mkl_random/src/` (`*.cpp`, `*.h`, support scripts)
1313
- **Tests:** `mkl_random/tests/`
1414
- **Packaging:** `conda-recipe/`, `conda-recipe-cf/`
1515
- **Examples:** `examples/`
@@ -21,15 +21,17 @@ It provides accelerated random sampling with API compatibility goals relative to
2121

2222
## Development guardrails
2323
- Preserve `numpy.random` API compatibility unless change is explicitly requested.
24+
- Keep namespace/API transitions explicit (e.g., `mkl_random.MKLRandomState` with compatibility aliases where applicable).
2425
- RNG changes must preserve statistical correctness and reproducibility expectations.
26+
- If patching/integration entry points are touched, keep patch semantics and rollback behavior explicit.
2527
- Keep diffs minimal and pair behavior changes with tests.
2628
- Avoid hardcoding mutable versions/matrices/channels in docs.
2729

2830
## Where truth lives
2931
- Build/config: `pyproject.toml`, `setup.py`
3032
- Dependencies: `pyproject.toml`, `conda-recipe*/meta.yaml`
3133
- CI matrices/workflows: `.github/workflows/*.{yml,yaml}`
32-
- Public API: `mkl_random/__init__.py`
34+
- Public API: `mkl_random/__init__.py`, `mkl_random/interfaces/*.py` (when present)
3335
- Tests: `mkl_random/tests/`
3436

3537
For behavior policy, see `.github/copilot-instructions.md`.

mkl_random/AGENTS.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ Core package implementation for MKL-backed random functionality.
66
- `__init__.py` — public package exports/API wiring
77
- `mklrand.pyx` — Cython bindings to MKL RNG support
88
- `_init_helper.py` — platform/runtime loading helpers
9-
- `src/` — C-level support and generation assets
9+
- `src/` — C/C++ support sources and headers
1010
- `tests/` — package tests (see local AGENTS in tests)
1111

1212
## Guardrails
1313
- Preserve `numpy.random`-compatible behavior by default.
14+
- Keep namespace compatibility explicit (`MKLRandomState` + compatibility aliases where needed).
1415
- RNG algorithm/distribution changes must preserve statistical correctness.
1516
- Keep BRNG/distribution behavior explicit and test-covered.
17+
- If patching/integration shims are modified, ensure behavior remains reversible and test-covered.
1618
- Prefer minimal, isolated edits around touched API paths.

0 commit comments

Comments
 (0)