Skip to content

Commit b01c43d

Browse files
committed
docs: add hierarchical AGENTS and copilot instructions
1 parent 30f5fd1 commit b01c43d

11 files changed

Lines changed: 108 additions & 0 deletions

File tree

.github/AGENTS.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# AGENTS.md — .github/
2+
3+
CI workflows, automation, and templates.
4+
5+
- Keep required checks and matrix in workflow files only.
6+
- Keep instruction docs long-lived (no mutable values).
7+
- Treat workflow/job renames as breaking for tooling.

.github/copilot-instructions.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# GitHub Copilot Instructions — dpnp
2+
3+
## Source of truth
4+
This file is canonical for Copilot behavior in this repository.
5+
6+
`AGENTS.md` files provide directory scope/guardrails for AGENTS-aware tools and
7+
should not duplicate Copilot policy text.
8+
9+
## Mandatory flow
10+
Read root `AGENTS.md`, then nearest local `AGENTS.md` for edited files; most specific wins.
11+
12+
## Authoring rules
13+
- Keep suggestions minimal and scoped.
14+
- Use source-of-truth files for mutable details.
15+
- Do not invent or hardcode versions, flags, or matrix values.
16+
17+
## Source-of-truth files
18+
- Build/config: `CMakeLists.txt`, `pyproject.toml`, `setup.py`, `setup.cfg`
19+
- CI/checks: `.github/workflows/`
20+
- Style/lint: `.pre-commit-config.yaml`, `.clang-format`, `.flake8`
21+
- API/package paths: `dpnp/`, `doc/`
22+
- Examples/benchmarks context: `examples/`, `benchmarks/`
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
applyTo: "{CMakeLists.txt,pyproject.toml,setup.py,setup.cfg,**/CMakeLists.txt}"
3+
---
4+
5+
# Build Instructions for GitHub Copilot
6+
7+
- Reuse existing build/config patterns.
8+
- Keep mutable build details in source-of-truth files.
9+
- Avoid introducing parallel build paths unless requested.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
applyTo: "{dpnp/tests/**,tests_external/**}"
3+
---
4+
5+
# Testing Instructions for GitHub Copilot
6+
7+
- Add regression tests for bug fixes.
8+
- Keep tests deterministic and scoped to changed behavior.
9+
- Prefer smallest test surface proving correctness.

AGENTS.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# AGENTS.md
2+
3+
This file is for AGENTS-aware tools.
4+
5+
Scope:
6+
- Repository context for AGENTS-aware agents.
7+
- Directory routing to local AGENTS files.
8+
9+
For Copilot policy (flow, source-of-truth, edit hygiene), see:
10+
- `.github/copilot-instructions.md` (canonical for Copilot behavior)
11+
12+
Directory map:
13+
- `.github/AGENTS.md`
14+
- `dpnp/AGENTS.md`
15+
- `doc/AGENTS.md`
16+
- `examples/AGENTS.md`
17+
- `benchmarks/AGENTS.md`
18+
- `scripts/AGENTS.md`
19+
- `tests_external/AGENTS.md`

benchmarks/AGENTS.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# AGENTS.md — benchmarks/
2+
3+
Benchmark scripts and performance evaluation.
4+
5+
- Keep runs reproducible and inputs explicit.
6+
- Separate harness changes from algorithm changes.
7+
- Preserve output contracts used by downstream analysis.

doc/AGENTS.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# AGENTS.md — doc/
2+
3+
Documentation sources and build artifacts.
4+
5+
- Keep docs aligned with current public behavior.
6+
- Prefer concise examples; avoid stale version-specific claims.
7+
- Update docs when user-visible behavior changes.

dpnp/AGENTS.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# AGENTS.md — dpnp/
2+
3+
Core package implementation and Python/Cython-facing behavior.
4+
5+
- Preserve API behavior and compatibility by default.
6+
- Keep dtype/shape/error behavior explicit.
7+
- For test policy, follow `.github/instructions/testing.instructions.md`.

examples/AGENTS.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# AGENTS.md — examples/
2+
3+
User-facing usage examples.
4+
5+
- Keep examples runnable and minimal.
6+
- Prefer clarity over micro-optimization.
7+
- Reflect current public APIs.

scripts/AGENTS.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# AGENTS.md — scripts/
2+
3+
Developer and maintenance scripts.
4+
5+
- Keep scripts automation-friendly and deterministic.
6+
- Avoid local-machine assumptions.
7+
- Document required env vars/inputs in-script.

0 commit comments

Comments
 (0)