From a3d82f2a72e55933df3e307a5a97c148b780d734 Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Wed, 2 Dec 2026 15:49:08 +0100 Subject: [PATCH 1/5] Add a CI job that checks the AGENTS.md claims against the tree with dokimi The new `Check agent guidance (dokimi)` workflow calls the reusable `repo-eval.yml` workflow of intel/dokimi, pinned to the main commit 00a761c. `repo validate` fails the job only on a broken manifest; `repo scan` checks the claims of every AGENTS.md and writes its report to the job summary without failing the job. The manifest `.github/dokimi/repo.yaml` names the guidance files and has no tasks, so no model, secret or container is used. Dependabot ignores `intel/dokimi/*`, since the pin is a main commit it would not move, and `.github/AGENTS.md` lists the workflow and says the pin is bumped by hand. Signed-off-by: Anton Volkov --- .github/AGENTS.md | 7 ++++++- .github/dependabot.yml | 4 ++++ .github/dokimi/repo.yaml | 7 +++++++ .github/workflows/agent-guidance.yml | 30 ++++++++++++++++++++++++++++ 4 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 .github/dokimi/repo.yaml create mode 100644 .github/workflows/agent-guidance.yml diff --git a/.github/AGENTS.md b/.github/AGENTS.md index 1dc4221e..4ea59241 100644 --- a/.github/AGENTS.md +++ b/.github/AGENTS.md @@ -16,6 +16,9 @@ CI/CD workflows and repo automation. - `coverity.yml` — Coverity static analysis (see `coverity/README.md`) - `openssf-scorecard.yml` — OpenSSF Scorecard - `zizmor.yml` — GitHub Actions security lint +- `agent-guidance.yml` — checks the commands and paths named in every + `AGENTS.md` against the tree with dokimi (manifest `dokimi/repo.yaml`); the + `repo scan` report goes to the job summary and does not fail the job The three pip workflows test the editable install: `build_pip.yml` runs `pytest mkl_random/tests`, the clang workflows `pytest --pyargs mkl_random`. @@ -29,7 +32,9 @@ own and runs the suite with `ci/test.py`. - `ISSUE_TEMPLATE/` — bug report and feature request forms; `config.yml` adds contact links that send security reports to Intel's vulnerability process and usage questions to the docs -- `dependabot.yml` — update schedule for GitHub Actions and pre-commit hooks +- `dependabot.yml` — update schedule for GitHub Actions and pre-commit hooks; + it skips dokimi: bump the `uses:` SHA in `workflows/agent-guidance.yml` by + hand - `CODEOWNERS` — default reviewers ## Policy diff --git a/.github/dependabot.yml b/.github/dependabot.yml index b404563e..8e8843c1 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -12,6 +12,10 @@ updates: groups: github-actions: patterns: ["*"] + # The dokimi pin is a main commit, not a release, so Dependabot would not move it; + # it is bumped by hand in agent-guidance.yml (a reusable workflow is named by its path) + ignore: + - dependency-name: "intel/dokimi/*" - package-ecosystem: "pre-commit" directory: "/" diff --git a/.github/dokimi/repo.yaml b/.github/dokimi/repo.yaml new file mode 100644 index 00000000..f2770425 --- /dev/null +++ b/.github/dokimi/repo.yaml @@ -0,0 +1,7 @@ +# Agent guidance files that dokimi (https://github.com/intel/dokimi) checks in CI, +# see .github/workflows/agent-guidance.yml. +schema: repo_manifest.v1 +id: mkl_random +source: {url: https://github.com/IntelPython/mkl_random} +guidance: + globs: ["**/AGENTS.md"] diff --git a/.github/workflows/agent-guidance.yml b/.github/workflows/agent-guidance.yml new file mode 100644 index 00000000..659dea4e --- /dev/null +++ b/.github/workflows/agent-guidance.yml @@ -0,0 +1,30 @@ +name: Check agent guidance (dokimi) + +# Checks the commands, paths and targets named in every AGENTS.md against the tree, with +# no model and no secrets. `repo validate` fails the job on a broken manifest; the `repo scan` +# report goes to the job summary and does not fail it. + +on: + push: + branches: + - master + pull_request: + workflow_dispatch: + +permissions: {} + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} + cancel-in-progress: true + +jobs: + dokimi: + name: dokimi + + permissions: + contents: read # needed to clone the repo + + # One pin: the workflow installs the dokimi of its own commit. Bump it by hand (Dependabot skips dokimi) + uses: intel/dokimi/.github/workflows/repo-eval.yml@00a761c118c40cb92af62a419c9be6f528cd50d7 # main, 2026-12-02 + with: + manifest: .github/dokimi/repo.yaml From e4fcfdb078a40dec4f5067e0cfd63136e6c4efa1 Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Thu, 3 Dec 2026 15:30:48 +0100 Subject: [PATCH 2/5] Move the dokimi pin to main 599fcad The new pin brings intel/dokimi#1548, which makes `repo scan` name its unresolved claims as info findings in the job summary, and intel/dokimi#1549, which makes `repo validate` check out at depth 1 when the manifest has no tasks. The reusable workflow takes the same inputs and permissions as at 00a761c. Signed-off-by: Anton Volkov --- .github/workflows/agent-guidance.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/agent-guidance.yml b/.github/workflows/agent-guidance.yml index 659dea4e..e4616a85 100644 --- a/.github/workflows/agent-guidance.yml +++ b/.github/workflows/agent-guidance.yml @@ -25,6 +25,6 @@ jobs: contents: read # needed to clone the repo # One pin: the workflow installs the dokimi of its own commit. Bump it by hand (Dependabot skips dokimi) - uses: intel/dokimi/.github/workflows/repo-eval.yml@00a761c118c40cb92af62a419c9be6f528cd50d7 # main, 2026-12-02 + uses: intel/dokimi/.github/workflows/repo-eval.yml@599fcadcd31b0088dfb4dd079ca66cde523fa697 # main, 2026-12-03 with: manifest: .github/dokimi/repo.yaml From 4af2e8992ceb5689b44622114a7823f1830338cb Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Thu, 3 Dec 2026 15:39:14 +0100 Subject: [PATCH 3/5] Name viRngUniformBits32 and viRngUniformBits64 apart in mkl_random/AGENTS.md `repo scan` read `viRngUniformBits32/64` as a path and reported it as unresolved. Naming the two MKL functions apart settles that claim. Signed-off-by: Anton Volkov --- mkl_random/AGENTS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkl_random/AGENTS.md b/mkl_random/AGENTS.md index 2afe926e..cf1997ad 100644 --- a/mkl_random/AGENTS.md +++ b/mkl_random/AGENTS.md @@ -37,7 +37,7 @@ Package sources: the Cython extension, public API, and patching entry points. - the skip-ahead and leap-frog lists in `docs/source/how_to.rst`, if the generator supports either - `_ENGINES` in `benchmarks/benchmarks/_utils.py`, and `_ENGINES_BITS` if - the generator implements `viRngUniformBits32/64` + the generator implements `viRngUniformBits32` and `viRngUniformBits64` - Keep `freethreading_compatible=True` in `mklrand.pyx`. - New `mkl_random/*.py` and `interfaces/*.py` modules must be added to the matching `py.install_sources` call in `meson.build`, or they are not From 7facf126232e4b262c74ff62a230be7e90b1cd84 Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Thu, 3 Dec 2026 15:43:39 +0100 Subject: [PATCH 4/5] Name viRngUniformBits32 and viRngUniformBits64 apart in the benchmarks comment The comment above `_ENGINES_BITS` now names the two MKL functions the way `mkl_random/AGENTS.md` does. Signed-off-by: Anton Volkov --- benchmarks/benchmarks/_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/benchmarks/benchmarks/_utils.py b/benchmarks/benchmarks/_utils.py index 31bf379c..0aba7a12 100644 --- a/benchmarks/benchmarks/_utils.py +++ b/benchmarks/benchmarks/_utils.py @@ -47,8 +47,8 @@ "ARS5", ] -# Generators that implement viRngUniformBits32/64, which full-range integer -# fills and bytes() call directly. +# Generators that implement viRngUniformBits32 and viRngUniformBits64, which +# full-range integer fills and bytes() call directly. _ENGINES_BITS = [ "MT19937", "SFMT19937", From 8c724a4f5ae14f50f56a9899331c0d3605cf17a3 Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Thu, 3 Dec 2026 15:47:51 +0100 Subject: [PATCH 5/5] Ignore the 3 guidance names that are not in the tree in .dokimi/scan.toml `repo scan` reported `.asv/`, `Library/bin` and `numpy/random/tests` as unresolved: they name a gitignored asv results directory, the DLL directory of a Windows conda environment and NumPy's test directory. Each now has a `[[ignore]]` entry with its reason, so the scan lists it as `unresolved_ignored` and no claim is open. `.github/AGENTS.md` says where such names go. Signed-off-by: Anton Volkov --- .dokimi/scan.toml | 16 ++++++++++++++++ .github/AGENTS.md | 4 +++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 .dokimi/scan.toml diff --git a/.dokimi/scan.toml b/.dokimi/scan.toml new file mode 100644 index 00000000..c076982b --- /dev/null +++ b/.dokimi/scan.toml @@ -0,0 +1,16 @@ +# Names the agent guidance uses that are not tracked in this repository. dokimi's repo scan +# lists each one it cannot find as unresolved_ignored, with the reason, and never fails on it. +[[ignore]] +kind = "path" +pattern = ".asv/" +reason = "asv results directory, created by the benchmarks and gitignored" + +[[ignore]] +kind = "path" +pattern = "Library/bin" +reason = "DLL directory of a Windows conda environment, not of this repository" + +[[ignore]] +kind = "path" +pattern = "numpy/random/tests" +reason = "NumPy's test directory, which mkl_random/tests/third_party adapts" diff --git a/.github/AGENTS.md b/.github/AGENTS.md index 4ea59241..a5778245 100644 --- a/.github/AGENTS.md +++ b/.github/AGENTS.md @@ -18,7 +18,9 @@ CI/CD workflows and repo automation. - `zizmor.yml` — GitHub Actions security lint - `agent-guidance.yml` — checks the commands and paths named in every `AGENTS.md` against the tree with dokimi (manifest `dokimi/repo.yaml`); the - `repo scan` report goes to the job summary and does not fail the job + `repo scan` report goes to the job summary and does not fail the job; names + that are not in the tree, such as gitignored or external ones, go in + `.dokimi/scan.toml` with a reason The three pip workflows test the editable install: `build_pip.yml` runs `pytest mkl_random/tests`, the clang workflows `pytest --pyargs mkl_random`.