Skip to content

Comments

Add AGENTS.md and GitHub Copilot instructions#276

Open
napetrov wants to merge 1 commit intomasterfrom
add-agents-instructions
Open

Add AGENTS.md and GitHub Copilot instructions#276
napetrov wants to merge 1 commit intomasterfrom
add-agents-instructions

Conversation

@napetrov
Copy link

What

Add structured AI agent instructions following Intel's AGENTS spec v4:

  • AGENTS.md — project context for agents (archetype, structure, source-of-truth mapping)
  • .github/copilot-instructions.md — agent behavior policy (precedence, contribution expectations, Intel-specific constraints)

Why

Standardizes how AI coding assistants (GitHub Copilot, Claude, etc.) understand and work with this repo, reducing hallucinations and enforcing Intel engineering standards automatically.

Key guidance added

  • Preserve NumPy/SciPy FFT API compatibility by default
  • Edit only .c.src templates; generated .c files are ephemeral
  • Release GIL (with nogil:) for performance-critical MKL calls
  • No hardcoded versions, flags, or ISA-specific directives outside setup.py
  • Run pre-commit run --all-files before proposing changes
  • Local dev: conda create -n dev python numpy cython mkl-devel pytest && pip install -e .

Token budget

  • AGENTS.md: 205 words (limit 220)
  • Reviewed by: architect + pragmatist sub-agents

Checklist

  • AGENTS.md exists at repo root
  • .github/copilot-instructions.md exists
  • Required headings present
  • No placeholder text
  • No mutable details hardcoded
  • Precedence hierarchy documented
  • Word count within limits

Introduce structured AI agent instructions following Intel's AGENTS spec v4:

- AGENTS.md: project context (archetype, structure, source-of-truth)
- .github/copilot-instructions.md: agent behavior policy

Key guidance:
- Preserve NumPy/SciPy FFT API compatibility
- C templates: edit only .c.src files
- Cython: release GIL for MKL calls
- Local dev: conda env + pip install -e .
- Pre-commit hooks required

Token budget: 205 words (AGENTS.md) + copilot-instructions
Reviewed by: architect + pragmatist agents
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds structured AI agent instructions following Intel's AGENTS spec v4 to standardize how AI coding assistants (GitHub Copilot, Claude, etc.) understand and interact with the mkl_fft repository. The documentation provides project context, source-of-truth mappings, and behavioral policies to reduce AI hallucinations and enforce Intel engineering standards.

Changes:

  • Added AGENTS.md with project archetype, structure, development workflow, and source-of-truth file mappings
  • Added .github/copilot-instructions.md with AI agent identity, precedence hierarchy, contribution expectations, and Intel-specific constraints
  • Established guidelines for C template editing, API compatibility, testing requirements, and build/style conventions

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
AGENTS.md Root-level project context file defining mkl_fft's structure, development practices, and source-of-truth locations per Intel's AGENTS spec v4
.github/copilot-instructions.md AI agent behavior policy establishing precedence rules, contribution expectations, authoring rules, and Intel-specific constraints for automated coding assistants
Comments suppressed due to low confidence (1)

.github/copilot-instructions.md:33

  • For consistency with source-of-truth file references elsewhere in this document (lines 39-44), the path should be mkl_fft/src/*.c.src instead of src/*.c.src. This makes the path unambiguous from the repository root.
- **C templates:** Edit only `src/*.c.src`; do not manually edit generated `.c` files.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- Use stable entry points: `pip install -e .` (dev), `pytest mkl_fft/tests` (test).
- Never include sensitive data in any file.
- **C templates:** Edit only `src/*.c.src`; do not manually edit generated `.c` files.
- **Cython/MKL calls:** Release GIL with `with nogil:` blocks for performance-critical MKL functions.
Copy link

Copilot AI Feb 19, 2026

Choose a reason for hiding this comment

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

The instruction to release GIL with with nogil: blocks is not reflected in the current codebase, which does not use nogil blocks. Since MKL internally manages threading, verify whether this guidance is appropriate. If this is intended as prescriptive guidance for future contributions, consider clarifying that context or verifying with domain experts that GIL release is beneficial for MKL FFT operations.

Suggested change
- **Cython/MKL calls:** Release GIL with `with nogil:` blocks for performance-critical MKL functions.
- **Cython/MKL calls:** For new or refactored performance-critical MKL calls, consider releasing the GIL with `with nogil:` around long-running sections, but only after verifying (with benchmarks or domain experts) that this is safe and beneficial given MKL's internal threading.

Copilot uses AI. Check for mistakes.
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.

1 participant