From f1c92018069e4821e2e2593b27ad9b3db35778f4 Mon Sep 17 00:00:00 2001 From: Nikolay Petrov Date: Tue, 17 Feb 2026 22:11:49 +0000 Subject: [PATCH 1/5] docs: add hierarchical AGENTS and long-lived Copilot instructions --- .github/AGENTS.md | 8 +++++ .github/copilot-instructions.md | 17 +++++++++++ .../instructions/build-system.instructions.md | 10 +++++++ .github/instructions/general.instructions.md | 26 ++++++++++++++++ .github/instructions/testing.instructions.md | 10 +++++++ AGENTS.md | 30 +++++++++++++++++++ benchmark/AGENTS.md | 7 +++++ bindings/AGENTS.md | 8 +++++ bindings/cpp/AGENTS.md | 7 +++++ bindings/python/AGENTS.md | 8 +++++ cmake/AGENTS.md | 8 +++++ examples/AGENTS.md | 8 +++++ include/svs/AGENTS.md | 8 +++++ tests/AGENTS.md | 8 +++++ tools/AGENTS.md | 7 +++++ utils/AGENTS.md | 7 +++++ 16 files changed, 177 insertions(+) create mode 100644 .github/AGENTS.md create mode 100644 .github/copilot-instructions.md create mode 100644 .github/instructions/build-system.instructions.md create mode 100644 .github/instructions/general.instructions.md create mode 100644 .github/instructions/testing.instructions.md create mode 100644 AGENTS.md create mode 100644 benchmark/AGENTS.md create mode 100644 bindings/AGENTS.md create mode 100644 bindings/cpp/AGENTS.md create mode 100644 bindings/python/AGENTS.md create mode 100644 cmake/AGENTS.md create mode 100644 examples/AGENTS.md create mode 100644 include/svs/AGENTS.md create mode 100644 tests/AGENTS.md create mode 100644 tools/AGENTS.md create mode 100644 utils/AGENTS.md diff --git a/.github/AGENTS.md b/.github/AGENTS.md new file mode 100644 index 000000000..733dfa86a --- /dev/null +++ b/.github/AGENTS.md @@ -0,0 +1,8 @@ +# AGENTS.md — .github/ + +CI/CD workflows, automation, templates, and Copilot instructions. + +- Keep required checks and matrix in workflow files only. +- Keep instruction docs long-lived (no mutable values). +- Treat workflow/job renames as breaking for tooling; change only intentionally. +- When CI behavior changes, align contributor-facing docs. diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md new file mode 100644 index 000000000..93a373a3d --- /dev/null +++ b/.github/copilot-instructions.md @@ -0,0 +1,17 @@ +# GitHub Copilot Instructions — ScalableVectorSearch + +## Mandatory +1. Read root `AGENTS.md` first. +2. Read the nearest directory `AGENTS.md` for edited files. +3. If multiple apply, use the most specific. + +## Authoring rules +- Keep suggestions minimal and scoped. +- Use source-of-truth files for mutable details. +- Do not invent or hardcode versions/flags/matrices. + +## Source-of-truth files +- `CMakeLists.txt`, `cmake/*.cmake` +- `.github/workflows/` +- `.clang-format`, `.pre-commit-config.yaml` +- `include/svs/`, `bindings/python/` diff --git a/.github/instructions/build-system.instructions.md b/.github/instructions/build-system.instructions.md new file mode 100644 index 000000000..f54db4965 --- /dev/null +++ b/.github/instructions/build-system.instructions.md @@ -0,0 +1,10 @@ +--- +applyTo: "{CMakeLists.txt,cmake/**}" +--- + +# Build System Instructions for GitHub Copilot + +- Use existing option/target patterns; avoid introducing parallel build paths. +- Keep configuration values referenced from existing CMake modules. +- Do not hardcode versions/toolchain assumptions in instructions or comments. +- For behavior changes, suggest updating/validating CI workflows in `.github/workflows/`. diff --git a/.github/instructions/general.instructions.md b/.github/instructions/general.instructions.md new file mode 100644 index 000000000..e0e5b7f48 --- /dev/null +++ b/.github/instructions/general.instructions.md @@ -0,0 +1,26 @@ +--- +applyTo: "**" +--- + +# General Instructions for GitHub Copilot + +## Context loading (required) +- Read root `AGENTS.md` first. +- Then read nearest local `AGENTS.md` for touched files. +- If multiple apply, follow the most specific one. + +## Long-lived policy +- Keep this file stable and high-level. +- Put mutable details only in source-of-truth files. +- Reference those files instead of duplicating values. + +## Source-of-truth +- Build/options: `CMakeLists.txt`, `cmake/*.cmake` +- CI/checks: `.github/workflows/` +- Style/lint: `.clang-format`, `.pre-commit-config.yaml` +- API/package contracts: `include/svs/`, `bindings/python/` + +## Change hygiene +- Prefer minimal scoped edits. +- Preserve backward compatibility by default. +- Pair behavior/API changes with tests/docs updates. diff --git a/.github/instructions/testing.instructions.md b/.github/instructions/testing.instructions.md new file mode 100644 index 000000000..593df1f4e --- /dev/null +++ b/.github/instructions/testing.instructions.md @@ -0,0 +1,10 @@ +--- +applyTo: "tests/**" +--- + +# Testing Instructions for GitHub Copilot + +- Add regression tests for bug fixes. +- Keep tests deterministic and scoped to changed behavior. +- Prefer smallest test surface that proves correctness. +- Refer to repository test/build configuration as source of truth rather than duplicating values. diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 000000000..782163be4 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,30 @@ +# AGENTS.md — ScalableVectorSearch + +Entry point for agent context in this repo. + +## Required flow +1. Read this file. +2. Read the nearest `AGENTS.md` for touched files. +3. Keep diffs scoped and minimal. +4. Validate with smallest relevant build/test target. +5. If behavior/API changes, update tests/docs in the same PR. + +## Mutable details: source of truth only +- Build/options: `CMakeLists.txt`, `cmake/*.cmake` +- CI/required checks: `.github/workflows/` +- Style/lint: `.clang-format`, `.pre-commit-config.yaml` +- Public C++ API: `include/svs/` +- Python package/runtime: `bindings/python/` + +Do not duplicate versions, matrices, or flags in instructions. + +## Directory map +- `.github/AGENTS.md` +- `benchmark/AGENTS.md` +- `bindings/AGENTS.md` +- `cmake/AGENTS.md` +- `examples/AGENTS.md` +- `include/svs/AGENTS.md` +- `tests/AGENTS.md` +- `tools/AGENTS.md` +- `utils/AGENTS.md` diff --git a/benchmark/AGENTS.md b/benchmark/AGENTS.md new file mode 100644 index 000000000..cc04677f0 --- /dev/null +++ b/benchmark/AGENTS.md @@ -0,0 +1,7 @@ +# AGENTS.md — benchmark/ + +Benchmark harness and performance-eval code. + +- Keep runs reproducible (inputs/config in repo). +- Separate harness changes from algorithm changes when possible. +- If shared with tests, validate impacted test targets. diff --git a/bindings/AGENTS.md b/bindings/AGENTS.md new file mode 100644 index 000000000..0e2f69b1f --- /dev/null +++ b/bindings/AGENTS.md @@ -0,0 +1,8 @@ +# AGENTS.md — bindings/ + +Interop layer between core C++ and exposed APIs. + +- Read: `bindings/cpp/AGENTS.md`, `bindings/python/AGENTS.md`. +- Keep contracts aligned with `include/svs/`. +- Make ownership/lifetime explicit across boundaries. +- Pair behavior/signature changes with tests (and examples when user-facing). diff --git a/bindings/cpp/AGENTS.md b/bindings/cpp/AGENTS.md new file mode 100644 index 000000000..dda41dfd7 --- /dev/null +++ b/bindings/cpp/AGENTS.md @@ -0,0 +1,7 @@ +# AGENTS.md — bindings/cpp/ + +C++ binding/demo integration code. + +- `include/svs/` is API authority. +- Avoid parallel abstractions that drift from core API. +- Call out ABI-facing changes in PR notes. diff --git a/bindings/python/AGENTS.md b/bindings/python/AGENTS.md new file mode 100644 index 000000000..c44f36205 --- /dev/null +++ b/bindings/python/AGENTS.md @@ -0,0 +1,8 @@ +# AGENTS.md — bindings/python/ + +Python package, extension bindings, and Python-facing behavior. + +- Source of truth: files under `bindings/python/` (+ cross-check with `CMakeLists.txt`). +- Keep API compatibility by default. +- Preserve clear dtype/shape validation and error messages. +- Add tests for every user-visible behavior change. diff --git a/cmake/AGENTS.md b/cmake/AGENTS.md new file mode 100644 index 000000000..71a5fb3a2 --- /dev/null +++ b/cmake/AGENTS.md @@ -0,0 +1,8 @@ +# AGENTS.md — cmake/ + +Build modules, dependency wiring, and feature toggles. + +- `CMakeLists.txt` + `cmake/*.cmake` are authoritative. +- Keep option names/defaults stable unless task requires change. +- Prefer additive options over rewrites. +- Validate option/target changes against CI workflows. diff --git a/examples/AGENTS.md b/examples/AGENTS.md new file mode 100644 index 000000000..1755cf161 --- /dev/null +++ b/examples/AGENTS.md @@ -0,0 +1,8 @@ +# AGENTS.md — examples/ + +User-facing C++/Python examples. + +- Keep examples runnable and minimal. +- Prefer clarity over micro-optimization. +- Update examples when public APIs change. +- Do not embed mutable version/environment details. diff --git a/include/svs/AGENTS.md b/include/svs/AGENTS.md new file mode 100644 index 000000000..36664a20c --- /dev/null +++ b/include/svs/AGENTS.md @@ -0,0 +1,8 @@ +# AGENTS.md — include/svs/ + +Public C++ headers and API contracts. + +- Backward compatibility is default. +- Prefer additive API evolution. +- Keep headers self-contained and aligned with CMake C++ standard. +- Pair public API changes with tests and docs. diff --git a/tests/AGENTS.md b/tests/AGENTS.md new file mode 100644 index 000000000..bee317116 --- /dev/null +++ b/tests/AGENTS.md @@ -0,0 +1,8 @@ +# AGENTS.md — tests/ + +Unit/integration/benchmark-adjacent tests. + +- Add regressions for bug fixes. +- Keep tests deterministic and scoped. +- Match test scope to changed surface area. +- Gate assertions for arch/feature-specific behavior. diff --git a/tools/AGENTS.md b/tools/AGENTS.md new file mode 100644 index 000000000..081b452bb --- /dev/null +++ b/tools/AGENTS.md @@ -0,0 +1,7 @@ +# AGENTS.md — tools/ + +Developer and maintenance tools/scripts. + +- Keep tools deterministic and automation-friendly. +- Avoid local-machine assumptions. +- If outputs feed tests/benchmarks, preserve output contract. diff --git a/utils/AGENTS.md b/utils/AGENTS.md new file mode 100644 index 000000000..86f5a82b8 --- /dev/null +++ b/utils/AGENTS.md @@ -0,0 +1,7 @@ +# AGENTS.md — utils/ + +Utility binaries/helpers for benchmarking and characterization. + +- Keep behavior explicit (comments/CLI help). +- Keep utility code separate from core library logic. +- Preserve output format when consumed by scripts. From c379c0ddab7866915c65c5f760abf1d3ada205a1 Mon Sep 17 00:00:00 2001 From: Nikolay Petrov Date: Tue, 17 Feb 2026 22:16:56 +0000 Subject: [PATCH 2/5] docs: add Apache headers to instruction files --- .github/AGENTS.md | 16 ++++++++++++++++ .github/copilot-instructions.md | 16 ++++++++++++++++ .../instructions/build-system.instructions.md | 16 ++++++++++++++++ .github/instructions/general.instructions.md | 16 ++++++++++++++++ .github/instructions/testing.instructions.md | 16 ++++++++++++++++ AGENTS.md | 16 ++++++++++++++++ benchmark/AGENTS.md | 16 ++++++++++++++++ bindings/AGENTS.md | 16 ++++++++++++++++ bindings/cpp/AGENTS.md | 16 ++++++++++++++++ bindings/python/AGENTS.md | 16 ++++++++++++++++ cmake/AGENTS.md | 16 ++++++++++++++++ examples/AGENTS.md | 16 ++++++++++++++++ include/svs/AGENTS.md | 16 ++++++++++++++++ tests/AGENTS.md | 16 ++++++++++++++++ tools/AGENTS.md | 16 ++++++++++++++++ utils/AGENTS.md | 16 ++++++++++++++++ 16 files changed, 256 insertions(+) diff --git a/.github/AGENTS.md b/.github/AGENTS.md index 733dfa86a..88ad7db2a 100644 --- a/.github/AGENTS.md +++ b/.github/AGENTS.md @@ -1,3 +1,19 @@ + + # AGENTS.md — .github/ CI/CD workflows, automation, templates, and Copilot instructions. diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 93a373a3d..4d80a6f22 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -1,3 +1,19 @@ + + # GitHub Copilot Instructions — ScalableVectorSearch ## Mandatory diff --git a/.github/instructions/build-system.instructions.md b/.github/instructions/build-system.instructions.md index f54db4965..913ef9175 100644 --- a/.github/instructions/build-system.instructions.md +++ b/.github/instructions/build-system.instructions.md @@ -1,3 +1,19 @@ + + --- applyTo: "{CMakeLists.txt,cmake/**}" --- diff --git a/.github/instructions/general.instructions.md b/.github/instructions/general.instructions.md index e0e5b7f48..8199e3669 100644 --- a/.github/instructions/general.instructions.md +++ b/.github/instructions/general.instructions.md @@ -1,3 +1,19 @@ + + --- applyTo: "**" --- diff --git a/.github/instructions/testing.instructions.md b/.github/instructions/testing.instructions.md index 593df1f4e..42ee23266 100644 --- a/.github/instructions/testing.instructions.md +++ b/.github/instructions/testing.instructions.md @@ -1,3 +1,19 @@ + + --- applyTo: "tests/**" --- diff --git a/AGENTS.md b/AGENTS.md index 782163be4..46f050806 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,3 +1,19 @@ + + # AGENTS.md — ScalableVectorSearch Entry point for agent context in this repo. diff --git a/benchmark/AGENTS.md b/benchmark/AGENTS.md index cc04677f0..1a802ecfc 100644 --- a/benchmark/AGENTS.md +++ b/benchmark/AGENTS.md @@ -1,3 +1,19 @@ + + # AGENTS.md — benchmark/ Benchmark harness and performance-eval code. diff --git a/bindings/AGENTS.md b/bindings/AGENTS.md index 0e2f69b1f..3e8eb561c 100644 --- a/bindings/AGENTS.md +++ b/bindings/AGENTS.md @@ -1,3 +1,19 @@ + + # AGENTS.md — bindings/ Interop layer between core C++ and exposed APIs. diff --git a/bindings/cpp/AGENTS.md b/bindings/cpp/AGENTS.md index dda41dfd7..4f32072b7 100644 --- a/bindings/cpp/AGENTS.md +++ b/bindings/cpp/AGENTS.md @@ -1,3 +1,19 @@ + + # AGENTS.md — bindings/cpp/ C++ binding/demo integration code. diff --git a/bindings/python/AGENTS.md b/bindings/python/AGENTS.md index c44f36205..151900c82 100644 --- a/bindings/python/AGENTS.md +++ b/bindings/python/AGENTS.md @@ -1,3 +1,19 @@ + + # AGENTS.md — bindings/python/ Python package, extension bindings, and Python-facing behavior. diff --git a/cmake/AGENTS.md b/cmake/AGENTS.md index 71a5fb3a2..1e8706fab 100644 --- a/cmake/AGENTS.md +++ b/cmake/AGENTS.md @@ -1,3 +1,19 @@ + + # AGENTS.md — cmake/ Build modules, dependency wiring, and feature toggles. diff --git a/examples/AGENTS.md b/examples/AGENTS.md index 1755cf161..2d44a5f9e 100644 --- a/examples/AGENTS.md +++ b/examples/AGENTS.md @@ -1,3 +1,19 @@ + + # AGENTS.md — examples/ User-facing C++/Python examples. diff --git a/include/svs/AGENTS.md b/include/svs/AGENTS.md index 36664a20c..53e119808 100644 --- a/include/svs/AGENTS.md +++ b/include/svs/AGENTS.md @@ -1,3 +1,19 @@ + + # AGENTS.md — include/svs/ Public C++ headers and API contracts. diff --git a/tests/AGENTS.md b/tests/AGENTS.md index bee317116..24df40c2a 100644 --- a/tests/AGENTS.md +++ b/tests/AGENTS.md @@ -1,3 +1,19 @@ + + # AGENTS.md — tests/ Unit/integration/benchmark-adjacent tests. diff --git a/tools/AGENTS.md b/tools/AGENTS.md index 081b452bb..12040e69a 100644 --- a/tools/AGENTS.md +++ b/tools/AGENTS.md @@ -1,3 +1,19 @@ + + # AGENTS.md — tools/ Developer and maintenance tools/scripts. diff --git a/utils/AGENTS.md b/utils/AGENTS.md index 86f5a82b8..7f77de4d2 100644 --- a/utils/AGENTS.md +++ b/utils/AGENTS.md @@ -1,3 +1,19 @@ + + # AGENTS.md — utils/ Utility binaries/helpers for benchmarking and characterization. From 44a2848db1c41ec8be0a1bab6c2c0a10d6370ff1 Mon Sep 17 00:00:00 2001 From: Nikolay Petrov Date: Wed, 18 Feb 2026 02:40:58 +0000 Subject: [PATCH 3/5] ci: exclude agent instruction docs from license header check --- .github/.licenserc.yaml | 4 ++++ .github/AGENTS.md | 16 ---------------- .github/copilot-instructions.md | 16 ---------------- .../instructions/build-system.instructions.md | 16 ---------------- .github/instructions/general.instructions.md | 16 ---------------- .github/instructions/testing.instructions.md | 16 ---------------- AGENTS.md | 16 ---------------- benchmark/AGENTS.md | 16 ---------------- bindings/AGENTS.md | 16 ---------------- bindings/cpp/AGENTS.md | 16 ---------------- bindings/python/AGENTS.md | 16 ---------------- cmake/AGENTS.md | 16 ---------------- examples/AGENTS.md | 16 ---------------- include/svs/AGENTS.md | 16 ---------------- tests/AGENTS.md | 16 ---------------- tools/AGENTS.md | 16 ---------------- utils/AGENTS.md | 16 ---------------- 17 files changed, 4 insertions(+), 256 deletions(-) diff --git a/.github/.licenserc.yaml b/.github/.licenserc.yaml index 9bfb216ea..0b1b372d5 100644 --- a/.github/.licenserc.yaml +++ b/.github/.licenserc.yaml @@ -51,6 +51,10 @@ header: - docker/x86_64/manylinux2014/oneAPI.repo - docs/cpp/index/loader-compatibility.csv - docs/requirements.txt + - AGENTS.md + - '**/AGENTS.md' + - .github/copilot-instructions.md + - .github/instructions/*.instructions.md comment: never diff --git a/.github/AGENTS.md b/.github/AGENTS.md index 88ad7db2a..733dfa86a 100644 --- a/.github/AGENTS.md +++ b/.github/AGENTS.md @@ -1,19 +1,3 @@ - - # AGENTS.md — .github/ CI/CD workflows, automation, templates, and Copilot instructions. diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 4d80a6f22..93a373a3d 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -1,19 +1,3 @@ - - # GitHub Copilot Instructions — ScalableVectorSearch ## Mandatory diff --git a/.github/instructions/build-system.instructions.md b/.github/instructions/build-system.instructions.md index 913ef9175..f54db4965 100644 --- a/.github/instructions/build-system.instructions.md +++ b/.github/instructions/build-system.instructions.md @@ -1,19 +1,3 @@ - - --- applyTo: "{CMakeLists.txt,cmake/**}" --- diff --git a/.github/instructions/general.instructions.md b/.github/instructions/general.instructions.md index 8199e3669..e0e5b7f48 100644 --- a/.github/instructions/general.instructions.md +++ b/.github/instructions/general.instructions.md @@ -1,19 +1,3 @@ - - --- applyTo: "**" --- diff --git a/.github/instructions/testing.instructions.md b/.github/instructions/testing.instructions.md index 42ee23266..593df1f4e 100644 --- a/.github/instructions/testing.instructions.md +++ b/.github/instructions/testing.instructions.md @@ -1,19 +1,3 @@ - - --- applyTo: "tests/**" --- diff --git a/AGENTS.md b/AGENTS.md index 46f050806..782163be4 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,19 +1,3 @@ - - # AGENTS.md — ScalableVectorSearch Entry point for agent context in this repo. diff --git a/benchmark/AGENTS.md b/benchmark/AGENTS.md index 1a802ecfc..cc04677f0 100644 --- a/benchmark/AGENTS.md +++ b/benchmark/AGENTS.md @@ -1,19 +1,3 @@ - - # AGENTS.md — benchmark/ Benchmark harness and performance-eval code. diff --git a/bindings/AGENTS.md b/bindings/AGENTS.md index 3e8eb561c..0e2f69b1f 100644 --- a/bindings/AGENTS.md +++ b/bindings/AGENTS.md @@ -1,19 +1,3 @@ - - # AGENTS.md — bindings/ Interop layer between core C++ and exposed APIs. diff --git a/bindings/cpp/AGENTS.md b/bindings/cpp/AGENTS.md index 4f32072b7..dda41dfd7 100644 --- a/bindings/cpp/AGENTS.md +++ b/bindings/cpp/AGENTS.md @@ -1,19 +1,3 @@ - - # AGENTS.md — bindings/cpp/ C++ binding/demo integration code. diff --git a/bindings/python/AGENTS.md b/bindings/python/AGENTS.md index 151900c82..c44f36205 100644 --- a/bindings/python/AGENTS.md +++ b/bindings/python/AGENTS.md @@ -1,19 +1,3 @@ - - # AGENTS.md — bindings/python/ Python package, extension bindings, and Python-facing behavior. diff --git a/cmake/AGENTS.md b/cmake/AGENTS.md index 1e8706fab..71a5fb3a2 100644 --- a/cmake/AGENTS.md +++ b/cmake/AGENTS.md @@ -1,19 +1,3 @@ - - # AGENTS.md — cmake/ Build modules, dependency wiring, and feature toggles. diff --git a/examples/AGENTS.md b/examples/AGENTS.md index 2d44a5f9e..1755cf161 100644 --- a/examples/AGENTS.md +++ b/examples/AGENTS.md @@ -1,19 +1,3 @@ - - # AGENTS.md — examples/ User-facing C++/Python examples. diff --git a/include/svs/AGENTS.md b/include/svs/AGENTS.md index 53e119808..36664a20c 100644 --- a/include/svs/AGENTS.md +++ b/include/svs/AGENTS.md @@ -1,19 +1,3 @@ - - # AGENTS.md — include/svs/ Public C++ headers and API contracts. diff --git a/tests/AGENTS.md b/tests/AGENTS.md index 24df40c2a..bee317116 100644 --- a/tests/AGENTS.md +++ b/tests/AGENTS.md @@ -1,19 +1,3 @@ - - # AGENTS.md — tests/ Unit/integration/benchmark-adjacent tests. diff --git a/tools/AGENTS.md b/tools/AGENTS.md index 12040e69a..081b452bb 100644 --- a/tools/AGENTS.md +++ b/tools/AGENTS.md @@ -1,19 +1,3 @@ - - # AGENTS.md — tools/ Developer and maintenance tools/scripts. diff --git a/utils/AGENTS.md b/utils/AGENTS.md index 7f77de4d2..86f5a82b8 100644 --- a/utils/AGENTS.md +++ b/utils/AGENTS.md @@ -1,19 +1,3 @@ - - # AGENTS.md — utils/ Utility binaries/helpers for benchmarking and characterization. From 54d21fb3046f6343b3e4263e40d8cc0ae0d7fdc5 Mon Sep 17 00:00:00 2001 From: Nikolay Petrov Date: Wed, 18 Feb 2026 02:50:31 +0000 Subject: [PATCH 4/5] docs: deduplicate AGENTS vs Copilot instructions --- .github/copilot-instructions.md | 7 ++++ .github/instructions/general.instructions.md | 26 --------------- AGENTS.md | 34 +++++--------------- 3 files changed, 15 insertions(+), 52 deletions(-) delete mode 100644 .github/instructions/general.instructions.md diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 93a373a3d..748501dae 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -1,5 +1,12 @@ # GitHub Copilot Instructions — ScalableVectorSearch +## Source of truth +This file is the canonical instruction set for Copilot behavior in this repository +(required flow, precedence, and fallback rules). + +`AGENTS.md` is reserved for AGENTS-aware tooling context and should not duplicate +Copilot policy text. + ## Mandatory 1. Read root `AGENTS.md` first. 2. Read the nearest directory `AGENTS.md` for edited files. diff --git a/.github/instructions/general.instructions.md b/.github/instructions/general.instructions.md deleted file mode 100644 index e0e5b7f48..000000000 --- a/.github/instructions/general.instructions.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -applyTo: "**" ---- - -# General Instructions for GitHub Copilot - -## Context loading (required) -- Read root `AGENTS.md` first. -- Then read nearest local `AGENTS.md` for touched files. -- If multiple apply, follow the most specific one. - -## Long-lived policy -- Keep this file stable and high-level. -- Put mutable details only in source-of-truth files. -- Reference those files instead of duplicating values. - -## Source-of-truth -- Build/options: `CMakeLists.txt`, `cmake/*.cmake` -- CI/checks: `.github/workflows/` -- Style/lint: `.clang-format`, `.pre-commit-config.yaml` -- API/package contracts: `include/svs/`, `bindings/python/` - -## Change hygiene -- Prefer minimal scoped edits. -- Preserve backward compatibility by default. -- Pair behavior/API changes with tests/docs updates. diff --git a/AGENTS.md b/AGENTS.md index 782163be4..7d556c957 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,30 +1,12 @@ -# AGENTS.md — ScalableVectorSearch +# AGENTS.md -Entry point for agent context in this repo. +This file is for AGENTS-aware tools. -## Required flow -1. Read this file. -2. Read the nearest `AGENTS.md` for touched files. -3. Keep diffs scoped and minimal. -4. Validate with smallest relevant build/test target. -5. If behavior/API changes, update tests/docs in the same PR. +Scope: +- Tool-specific guidance for AGENTS-aware agents. +- Repository context that is not Copilot-specific. -## Mutable details: source of truth only -- Build/options: `CMakeLists.txt`, `cmake/*.cmake` -- CI/required checks: `.github/workflows/` -- Style/lint: `.clang-format`, `.pre-commit-config.yaml` -- Public C++ API: `include/svs/` -- Python package/runtime: `bindings/python/` +For Copilot policy (required flow, source-of-truth, fallback rules), see: +- `.github/copilot-instructions.md` (canonical for Copilot behavior) -Do not duplicate versions, matrices, or flags in instructions. - -## Directory map -- `.github/AGENTS.md` -- `benchmark/AGENTS.md` -- `bindings/AGENTS.md` -- `cmake/AGENTS.md` -- `examples/AGENTS.md` -- `include/svs/AGENTS.md` -- `tests/AGENTS.md` -- `tools/AGENTS.md` -- `utils/AGENTS.md` +Do not duplicate Copilot policy here. From 072b663900d755d92afd6369a026372d3b872076 Mon Sep 17 00:00:00 2001 From: Nikolay Petrov Date: Thu, 19 Feb 2026 20:13:53 +0000 Subject: [PATCH 5/5] Remove duplicate 'Source of truth' heading Per mihaic review comment: top-level intro text doesn't need a heading since there's already a 'Source-of-truth files' section below. --- .github/copilot-instructions.md | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 748501dae..8a7cc3acc 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -1,6 +1,5 @@ # GitHub Copilot Instructions — ScalableVectorSearch -## Source of truth This file is the canonical instruction set for Copilot behavior in this repository (required flow, precedence, and fallback rules).