Skip to content

Add .github/copilot-instructions.md to configure Copilot coding agent#199

Draft
Copilot wants to merge 2 commits intomasterfrom
copilot/set-up-copilot-instructions
Draft

Add .github/copilot-instructions.md to configure Copilot coding agent#199
Copilot wants to merge 2 commits intomasterfrom
copilot/set-up-copilot-instructions

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 30, 2026

Adds repository-specific instructions for the GitHub Copilot coding agent as recommended in the best practices guide.

Description

New file: .github/copilot-instructions.md covering:

  • Project overview — electrostatic forward modeling library; core get_transformation_matrix() pattern returning M such that Y = M @ I
  • Repository structure — annotated directory tree mapping source, tests, docs, examples, and workflows
  • Architecture patternsCellGeometry, LinearModel base class, subclassing contract, EEG/MEG dipole-moment pipeline
  • Physical units table — nA (currents), µm (space), mV (potentials), S/m (conductivity), nA·µm (dipole moment), nA/µm (B-field)
  • Coding conventions — PEP 8, 127-char line limit, NumPy docstrings, import ordering
  • Dev commands — install, flake8 lint invocations matching CI, py.test -v test runner
  • Dependencies — numpy, scipy, sympy, MEAutility
  • Contributing pointers — CONTRIBUTING.md, PR template, pre-PR checklist

Related Issue

Closes # (set up Copilot instructions)

Motivation and Context

Without a copilot-instructions.md, Copilot has no project-specific context: it doesn't know the unit conventions, the mandatory get_transformation_matrix() contract, the flake8 line-length setting, or how to run tests. This file gives the agent enough domain knowledge to generate consistent, correct contributions.

How Has This Been Tested

Documentation-only change; no executable code modified.

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • gh.io
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI linked an issue Mar 30, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Configure instructions for Copilot coding agent Add .github/copilot-instructions.md to configure Copilot coding agent Mar 30, 2026
Copilot AI requested a review from espenhgn March 30, 2026 10:55
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.

✨ Set up Copilot instructions

2 participants