Skip to content

docs: enhance AGENTS with project context and performance guardrails#277

Open
napetrov wants to merge 1 commit intointel:mainfrom
napetrov:docs/agents-improvements
Open

docs: enhance AGENTS with project context and performance guardrails#277
napetrov wants to merge 1 commit intointel:mainfrom
napetrov:docs/agents-improvements

Conversation

@napetrov
Copy link
Contributor

Summary

Follow-up to #276 — adds Intel-specific technical detail and performance guardrails based on code review.

Changes

Root AGENTS.md

  • Add project description, tech stack (C++20, MKL, OpenMP, pybind11)
  • Add core principle: performance over simplicity in hot paths
  • Add quick start commands (build/test/Python)
  • Add directory map for navigation

.github/copilot-instructions.md

  • Add concrete authoring rules (e.g. don't refactor full files for 2-line changes)
  • Add contribution expectations: backward compat, pre-commit, regression tests
  • Expand source-of-truth: explicitly list mkl.cmake, multi-arch.cmake, numa.cmake, pyproject.toml
  • Add negative constraint: no std::iostream in perf-critical headers

include/svs/AGENTS.md

  • Add perf constraints: memory alignment, SIMD dispatch rules, hot path rules
  • Add failure modes: template instantiation impact, ABI compat

bindings/python/AGENTS.md

  • Add pybind11 rules: GIL release, dtype/shape validation, memory ownership
  • Add common failure modes: wrapper sync on C++ signature changes, edge cases, lifetime management

cmake/AGENTS.md

  • Document Intel-specific modules: mkl.cmake (threading), multi-arch.cmake (ISA dispatch), numa.cmake, openmp.cmake
  • Add guardrail: no removal of optimization flags without benchmark validation

benchmark/AGENTS.md

  • Add constraints: warmup/iteration stability, dataset provenance, baseline comparisons
  • Add reporting requirements: median/min/max/stddev

include/svs/quantization/AGENTS.md (new)

  • Quantization guardrails: type safety, precision bounds, SIMD alignment, codec compat
  • Common failure modes: float arithmetic in hot paths, misaligned access, codebook sync

Notes

  • No mutable details (versions, flags) hardcoded in instruction files
  • All changes are additive — no policy removed from original PR

Based on multi-agent review (architect, pragmatist, prompt-specialist, perf-expert):

Root AGENTS.md:
- Add project description, tech stack (C++20, MKL, OpenMP, pybind11)
- Add core principle: performance over simplicity
- Add quick start commands (build/test/Python)
- Add directory map

.github/copilot-instructions.md:
- Add concrete authoring rules (no full-file refactors for 2-line changes)
- Add contribution expectations (backward compat, pre-commit, regression tests)
- Expand source-of-truth: explicitly list mkl.cmake, multi-arch.cmake, numa.cmake, pyproject.toml
- Add negative constraint: no std::iostream in perf-critical headers

include/svs/AGENTS.md:
- Add performance-critical constraints: memory alignment, SIMD dispatch, hot path rules
- Add failure modes: template instantiation impact, ABI compat

bindings/python/AGENTS.md:
- Add pybind11 integration rules: GIL release, type validation, memory ownership
- Add common failure modes: wrapper sync, edge case testing, lifetime management
- Explicitly list source-of-truth files

cmake/AGENTS.md:
- Add Intel-specific module docs: mkl.cmake (threading), multi-arch.cmake (ISA dispatch), numa.cmake, openmp.cmake
- Add guardrails: no flag removal without benchmark validation

benchmark/AGENTS.md:
- Add constraints: warmup/iteration stability, dataset provenance, baseline comparisons
- Add reporting requirements: median/min/max/stddev

include/svs/quantization/AGENTS.md (new):
- Add quantization guardrails: type safety, precision bounds, SIMD alignment, codec compat
- Add common failure modes: float in hot paths, misaligned access, codebook sync
Copy link
Member

@mihaic mihaic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Please remove LVQ references according to suggestions.


This file is for AGENTS-aware tools.
## What this project is
High-performance C++ library for vector similarity search at billion scale. Uses Intel MKL, AVX-512/multi-arch SIMD dispatch, LVQ quantization, NUMA-aware memory, OpenMP threading. Python bindings via pybind11. Archetype: **C++** (with Python bindings).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No LVQ in this repo.

Suggested change
High-performance C++ library for vector similarity search at billion scale. Uses Intel MKL, AVX-512/multi-arch SIMD dispatch, LVQ quantization, NUMA-aware memory, OpenMP threading. Python bindings via pybind11. Archetype: **C++** (with Python bindings).
High-performance C++ library for vector similarity search at billion scale. Uses Intel MKL, AVX-512/multi-arch SIMD dispatch, quantization, NUMA-aware memory, OpenMP threading. Python bindings via pybind11. Archetype: **C++** (with Python bindings).

@@ -0,0 +1,13 @@
# AGENTS.md — include/svs/quantization/

Quantization algorithms and data types (LVQ, scalar quantization).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Quantization algorithms and data types (LVQ, scalar quantization).
Quantization algorithms and data types (scalar quantization).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments