From ec932348c63e2712feef2de6a9591be3e3998c0d Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Tue, 1 Dec 2026 14:00:58 +0100 Subject: [PATCH 1/5] Add a CI job that checks the AGENTS.md claims against the tree with dokimi --- .github/AGENTS.md | 3 ++- .github/dependabot.yml | 4 ++++ .github/dokimi/repo.yaml | 7 ++++++ .github/workflows/agent-guidance.yml | 32 ++++++++++++++++++++++++++++ AGENTS.md | 1 + 5 files changed, 46 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 a621290..baf8a39 100644 --- a/.github/AGENTS.md +++ b/.github/AGENTS.md @@ -13,6 +13,7 @@ The conda workflows build and test the Python versions in the `python:` list of - **openssf-scorecard.yml** — security posture scanning - **intel-ci.yml** — Intel CI: builds and tests the conda packages of `conda-recipe` and the wheels, for the platforms and Python versions the recipe and `pyproject.toml` declare (`ci/matrix.py`); see `ci/README.md` - **coverity.yml** — weekly Coverity Scan static analysis of the C/Cython extensions (scan.coverity.com) +- **agent-guidance.yml** — checks the commands and paths named in every `AGENTS.md` against the tree with dokimi's reusable `repo-eval.yml` workflow (manifest `dokimi/repo.yaml`), with no model and no secrets; `repo validate` fails the job only on a broken manifest, and the `repo scan` report goes to the job summary without failing it ## Actions - **actions/conda-python-matrix/** — composite action that reads the `python:` list of a recipe's `conda_build_config.yaml` and outputs the build/test matrix. `action.yml` and `conda_python_matrix.py` (standard library only) refer to nothing outside the directory, so it can move unchanged to a shared repository together with `conda-build-test.yml`. The `variants` job references it as `./.github/actions/conda-python-matrix`, which resolves against the caller's checkout; after the move that line must become `$/.github/actions/conda-python-matrix`, which resolves against the repository of the workflow file itself. It is not `$/` already because actionlint 1.7.12, used by pre-commit, rejects that syntax (rhysd/actionlint#711). Run it locally with `python .github/actions/conda-python-matrix/conda_python_matrix.py conda-recipe/conda_build_config.yaml` @@ -34,7 +35,7 @@ The conda workflows build and test the Python versions in the `python:` list of - OpenSSF Scorecard runs automatically - Coverity Scan runs weekly via `coverity.yml` (project `IntelPython/mkl-service` on scan.coverity.com; needs the `COVERITY_SCAN_TOKEN`/`COVERITY_SCAN_EMAIL` secrets) - CODEOWNERS enforces review policy -- Dependabot monitors dependencies (`.github/dependabot.yml`) +- Dependabot monitors dependencies (`.github/dependabot.yml`). It skips dokimi: bump the `uses:` SHA and `dokimi-ref` in `workflows/agent-guidance.yml` together by hand ## Platform specifics - **Linux:** RTLD_GLOBAL handling for MKL library loading diff --git a/.github/dependabot.yml b/.github/dependabot.yml index b404563..0c452fb 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -12,6 +12,10 @@ updates: groups: github-actions: patterns: ["*"] + # Dependabot would bump `uses:` only, not the `dokimi-ref` input that has to match it; + # both are 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 0000000..b787102 --- /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-service +source: {url: https://github.com/IntelPython/mkl-service} +guidance: + globs: ["**/AGENTS.md"] diff --git a/.github/workflows/agent-guidance.yml b/.github/workflows/agent-guidance.yml new file mode 100644 index 0000000..4a76edf --- /dev/null +++ b/.github/workflows/agent-guidance.yml @@ -0,0 +1,32 @@ +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 + + # Bump both SHAs together, by hand (Dependabot skips dokimi): `uses:` runs the workflow, + # `dokimi-ref` installs the same dokimi + uses: intel/dokimi/.github/workflows/repo-eval.yml@9e41f5e8b2af6e6f445d7eead5d0fbe2dfc8321c # main, 2026-12-01 + with: + dokimi-ref: 9e41f5e8b2af6e6f445d7eead5d0fbe2dfc8321c + manifest: .github/dokimi/repo.yaml diff --git a/AGENTS.md b/AGENTS.md index 53eeb3d..6172489 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -61,6 +61,7 @@ python -m pip install --no-deps --no-build-isolation . - `pre-commit.yml` — code quality checks - `openssf-scorecard.yml` — security scanning - `coverity.yml` — weekly Coverity Scan static analysis + - `agent-guidance.yml` — checks the claims of every `AGENTS.md` against the tree with dokimi (manifest `.github/dokimi/repo.yaml`); the `repo scan` report goes to the job summary and does not fail the job ## Distribution - **Conda:** `conda-forge` and `https://software.repos.intel.com/python/conda` From 4af75c76a8cc4dd3a9fbf3749fb5443ef90fc8c4 Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Tue, 1 Dec 2026 14:04:43 +0100 Subject: [PATCH 2/5] Don't name dokimi's workflow file in .github/AGENTS.md --- .github/AGENTS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/AGENTS.md b/.github/AGENTS.md index baf8a39..5ed9c5e 100644 --- a/.github/AGENTS.md +++ b/.github/AGENTS.md @@ -13,7 +13,7 @@ The conda workflows build and test the Python versions in the `python:` list of - **openssf-scorecard.yml** — security posture scanning - **intel-ci.yml** — Intel CI: builds and tests the conda packages of `conda-recipe` and the wheels, for the platforms and Python versions the recipe and `pyproject.toml` declare (`ci/matrix.py`); see `ci/README.md` - **coverity.yml** — weekly Coverity Scan static analysis of the C/Cython extensions (scan.coverity.com) -- **agent-guidance.yml** — checks the commands and paths named in every `AGENTS.md` against the tree with dokimi's reusable `repo-eval.yml` workflow (manifest `dokimi/repo.yaml`), with no model and no secrets; `repo validate` fails the job only on a broken manifest, and the `repo scan` report goes to the job summary without failing it +- **agent-guidance.yml** — checks the commands and paths named in every `AGENTS.md` against the tree with the reusable workflow of dokimi (manifest `dokimi/repo.yaml`), with no model and no secrets; `repo validate` fails the job only on a broken manifest, and the `repo scan` report goes to the job summary without failing it ## Actions - **actions/conda-python-matrix/** — composite action that reads the `python:` list of a recipe's `conda_build_config.yaml` and outputs the build/test matrix. `action.yml` and `conda_python_matrix.py` (standard library only) refer to nothing outside the directory, so it can move unchanged to a shared repository together with `conda-build-test.yml`. The `variants` job references it as `./.github/actions/conda-python-matrix`, which resolves against the caller's checkout; after the move that line must become `$/.github/actions/conda-python-matrix`, which resolves against the repository of the workflow file itself. It is not `$/` already because actionlint 1.7.12, used by pre-commit, rejects that syntax (rhysd/actionlint#711). Run it locally with `python .github/actions/conda-python-matrix/conda_python_matrix.py conda-recipe/conda_build_config.yaml` From 501f2607bcbf0416e41690e94041e90df00eb237 Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Tue, 1 Dec 2026 15:00:47 +0100 Subject: [PATCH 3/5] Link actions/cache and the feedstock in the AGENTS.md files instead of naming them in backticks --- .github/AGENTS.md | 6 +++--- AGENTS.md | 2 +- conda-recipe/AGENTS.md | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/AGENTS.md b/.github/AGENTS.md index 5ed9c5e..cf169ad 100644 --- a/.github/AGENTS.md +++ b/.github/AGENTS.md @@ -5,7 +5,7 @@ CI/CD workflows, automation, security scanning, and package distribution. ## Workflows The conda workflows build and test the Python versions in the `python:` list of their recipe's `conda_build_config.yaml`; `intel-ci.yml` takes its wheels' versions from the Python classifiers in `pyproject.toml`, and the other build/test workflows list theirs in the workflow file. -- **conda-package-cf.yml** — build/test using only conda-forge channel (Linux/Windows/macOS), set up like `conda-forge/mkl-service-feedstock`: Windows uses `windows-2022` (Visual Studio 2022) +- **conda-package-cf.yml** — build/test using only conda-forge channel (Linux/Windows/macOS), set up like [conda-forge/mkl-service-feedstock](https://github.com/conda-forge/mkl-service-feedstock): Windows uses `windows-2022` (Visual Studio 2022) - **build-with-clang.yml** — Linux Clang compiler compatibility validation - **build-with-standard-clang.yml** — standard Clang compiler compatibility validation - **build_pip.yml** — validates editable build @@ -29,7 +29,7 @@ The conda workflows build and test the Python versions in the `python:` list of - Artifact naming: `$PACKAGE_NAME $OS Python $VERSION`, where `$VERSION` is `python_tag`: the Python version, with a `t` suffix for free-threaded builds (`3.12`, `3.14`, `3.14t`) - Channels: `conda-forge` - Build jobs run `conda build --no-test`; test jobs run `conda build --test` on the built package on a fresh runner, so CI runs the test section of the recipe, as the feedstock does -- `conda-package-cf.yml` and `conda-recipe/` follow `conda-forge/mkl-service-feedstock`. The feedstock's pins are kept only in `conda-recipe/conda_build_config.yaml` (compiler versions, `mkl_devel`, and Python versions in its `python:` list): when the feedstock is re-rendered with new pins, update them there, and don't restate the numbers in the `AGENTS.md` files +- `conda-package-cf.yml` and `conda-recipe/` follow [conda-forge/mkl-service-feedstock](https://github.com/conda-forge/mkl-service-feedstock). The feedstock's pins are kept only in `conda-recipe/conda_build_config.yaml` (compiler versions, `mkl_devel`, and Python versions in its `python:` list): when the feedstock is re-rendered with new pins, update them there, and don't restate the numbers in the `AGENTS.md` files ## Security - OpenSSF Scorecard runs automatically @@ -43,4 +43,4 @@ The conda workflows build and test the Python versions in the `python:` list of ## Notes - Workflow/job renames are breaking for downstream tooling -- Conda jobs do not cache the conda package directory: the channel downloads were faster than restoring the ~1 GB `actions/cache` entries, which were also evicted before the next run +- Conda jobs do not cache the conda package directory: the channel downloads were faster than restoring the ~1 GB [actions/cache](https://github.com/actions/cache) entries, which were also evicted before the next run diff --git a/AGENTS.md b/AGENTS.md index 6172489..230a637 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -53,7 +53,7 @@ python -m pip install --no-deps --no-build-isolation . - **Python 3.14 ABI selection:** conda jobs must request an explicit ABI, `3.14.* *_cp314` (GIL) or `3.14.* *_cp314t` (free-threaded). Once the recipes stopped constraining `python-gil`, a bare `--python 3.14` was observed to resolve to the free-threaded build, so it must not be relied on. - **Python 3.15 ABI selection:** same as 3.14; conda jobs request `3.15.* *_cp315` (GIL) or `3.15.* *_cp315t` (free-threaded) explicitly. - **Workflows:** `.github/workflows/` - - `conda-package-cf.yml` — conda build/test using only conda-forge channel, set up like `conda-forge/mkl-service-feedstock` + - `conda-package-cf.yml` — conda build/test using only conda-forge channel, set up like [conda-forge/mkl-service-feedstock](https://github.com/conda-forge/mkl-service-feedstock) - `intel-ci.yml` — Intel CI: builds and tests the conda packages and the wheels; see `ci/README.md` - `build-with-clang.yml` — Linux Clang compatibility - `build-with-standard-clang.yml` — standard Clang compiler compatibility validation diff --git a/conda-recipe/AGENTS.md b/conda-recipe/AGENTS.md index 82ada56..1239c87 100644 --- a/conda-recipe/AGENTS.md +++ b/conda-recipe/AGENTS.md @@ -1,6 +1,6 @@ # AGENTS.md — conda-recipe/ -The conda recipe, built against `conda-forge` only and set up like `conda-forge/mkl-service-feedstock`. +The conda recipe, built against `conda-forge` only and set up like [conda-forge/mkl-service-feedstock](https://github.com/conda-forge/mkl-service-feedstock). ## Files - **meta.yaml** — package metadata, dependencies, build requirements From f81497b44dc13a48d6af2b3e20af070a13459d7a Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Wed, 2 Dec 2026 15:13:57 +0100 Subject: [PATCH 4/5] Declare the names from outside the repository that the AGENTS.md files use in .dokimi/scan.toml The scan's 10 unresolved claims all name things outside this repository: sibling packages (mkl_umath, mkl_random), the NumPy C API (PyArray_Resize, array_tobytes), CPython buffer flags (PyBUF_*) and a Python builtin (ImportError). An [[ignore]] entry with a reason for each lets a new unresolved claim stand out from them. --- .dokimi/scan.toml | 31 +++++++++++++++++++++++++++++++ .github/AGENTS.md | 2 +- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 .dokimi/scan.toml diff --git a/.dokimi/scan.toml b/.dokimi/scan.toml new file mode 100644 index 0000000..498e148 --- /dev/null +++ b/.dokimi/scan.toml @@ -0,0 +1,31 @@ +# Names the AGENTS.md files use that live outside 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 = "identifier" +pattern = "mkl_umath" +reason = "sibling package, IntelPython/mkl_umath" + +[[ignore]] +kind = "identifier" +pattern = "mkl_random" +reason = "sibling package, IntelPython/mkl_random" + +[[ignore]] +kind = "identifier" +pattern = "PyBUF_*" +reason = "CPython buffer request flags" + +[[ignore]] +kind = "identifier" +pattern = "PyArray_Resize" +reason = "NumPy C API" + +[[ignore]] +kind = "identifier" +pattern = "array_tobytes" +reason = "NumPy internal C function, named from an ASan report" + +[[ignore]] +kind = "identifier" +pattern = "ImportError" +reason = "Python builtin exception" diff --git a/.github/AGENTS.md b/.github/AGENTS.md index cf169ad..aa59400 100644 --- a/.github/AGENTS.md +++ b/.github/AGENTS.md @@ -13,7 +13,7 @@ The conda workflows build and test the Python versions in the `python:` list of - **openssf-scorecard.yml** — security posture scanning - **intel-ci.yml** — Intel CI: builds and tests the conda packages of `conda-recipe` and the wheels, for the platforms and Python versions the recipe and `pyproject.toml` declare (`ci/matrix.py`); see `ci/README.md` - **coverity.yml** — weekly Coverity Scan static analysis of the C/Cython extensions (scan.coverity.com) -- **agent-guidance.yml** — checks the commands and paths named in every `AGENTS.md` against the tree with the reusable workflow of dokimi (manifest `dokimi/repo.yaml`), with no model and no secrets; `repo validate` fails the job only on a broken manifest, and the `repo scan` report goes to the job summary without failing it +- **agent-guidance.yml** — checks the commands and paths named in every `AGENTS.md` against the tree with the reusable workflow of dokimi (manifest `dokimi/repo.yaml`), with no model and no secrets; `repo validate` fails the job only on a broken manifest, and the `repo scan` report goes to the job summary without failing it; names from outside this repository that the scan cannot find are declared, each with its reason, in `.dokimi/scan.toml` at the repository root ## Actions - **actions/conda-python-matrix/** — composite action that reads the `python:` list of a recipe's `conda_build_config.yaml` and outputs the build/test matrix. `action.yml` and `conda_python_matrix.py` (standard library only) refer to nothing outside the directory, so it can move unchanged to a shared repository together with `conda-build-test.yml`. The `variants` job references it as `./.github/actions/conda-python-matrix`, which resolves against the caller's checkout; after the move that line must become `$/.github/actions/conda-python-matrix`, which resolves against the repository of the workflow file itself. It is not `$/` already because actionlint 1.7.12, used by pre-commit, rejects that syntax (rhysd/actionlint#711). Run it locally with `python .github/actions/conda-python-matrix/conda_python_matrix.py conda-recipe/conda_build_config.yaml` From a32206bfcb376c2edbd3bf621cf1e1bdf0fef926 Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Thu, 3 Dec 2026 14:47:11 +0100 Subject: [PATCH 5/5] Bump dokimi to main 599fcad and drop dokimi-ref Since intel/dokimi#1486 the reusable workflow installs the dokimi of its own commit when `dokimi-ref` is empty, so the `uses:` SHA is the only pin left. The new commit also counts an ignored claim apart from unresolved (intel/dokimi#1497). --- .github/AGENTS.md | 2 +- .github/dependabot.yml | 4 ++-- .github/workflows/agent-guidance.yml | 7 +++---- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/AGENTS.md b/.github/AGENTS.md index aa59400..44b75d8 100644 --- a/.github/AGENTS.md +++ b/.github/AGENTS.md @@ -35,7 +35,7 @@ The conda workflows build and test the Python versions in the `python:` list of - OpenSSF Scorecard runs automatically - Coverity Scan runs weekly via `coverity.yml` (project `IntelPython/mkl-service` on scan.coverity.com; needs the `COVERITY_SCAN_TOKEN`/`COVERITY_SCAN_EMAIL` secrets) - CODEOWNERS enforces review policy -- Dependabot monitors dependencies (`.github/dependabot.yml`). It skips dokimi: bump the `uses:` SHA and `dokimi-ref` in `workflows/agent-guidance.yml` together by hand +- Dependabot monitors dependencies (`.github/dependabot.yml`). It skips dokimi: bump the `uses:` SHA in `workflows/agent-guidance.yml` by hand ## Platform specifics - **Linux:** RTLD_GLOBAL handling for MKL library loading diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 0c452fb..5211f0e 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -12,8 +12,8 @@ updates: groups: github-actions: patterns: ["*"] - # Dependabot would bump `uses:` only, not the `dokimi-ref` input that has to match it; - # both are bumped by hand in agent-guidance.yml (a reusable workflow is named by its path) + # dokimi is pinned to a main commit, not a release; the pin is bumped by hand in + # agent-guidance.yml (a reusable workflow is named by its path) ignore: - dependency-name: "intel/dokimi/*" diff --git a/.github/workflows/agent-guidance.yml b/.github/workflows/agent-guidance.yml index 4a76edf..68ff3d8 100644 --- a/.github/workflows/agent-guidance.yml +++ b/.github/workflows/agent-guidance.yml @@ -24,9 +24,8 @@ jobs: permissions: contents: read # needed to clone the repo - # Bump both SHAs together, by hand (Dependabot skips dokimi): `uses:` runs the workflow, - # `dokimi-ref` installs the same dokimi - uses: intel/dokimi/.github/workflows/repo-eval.yml@9e41f5e8b2af6e6f445d7eead5d0fbe2dfc8321c # main, 2026-12-01 + # The only dokimi pin: with no `dokimi-ref`, the workflow installs the dokimi of its own + # commit. Bump it by hand (Dependabot skips dokimi) + uses: intel/dokimi/.github/workflows/repo-eval.yml@599fcadcd31b0088dfb4dd079ca66cde523fa697 # main, 2026-12-03 with: - dokimi-ref: 9e41f5e8b2af6e6f445d7eead5d0fbe2dfc8321c manifest: .github/dokimi/repo.yaml