Skip to content

Conversation

jzwick
Copy link

@jzwick jzwick commented Oct 1, 2025

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Tests added and passed if fixing a bug or adding a new feature
  • All code checks passed.
  • Added type annotations to new arguments/methods/functions.
  • Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.

This PR adds as AGENTS.md file, which is like "a README for agents: a dedicated, predictable place to provide the context and instructions to help AI coding agents work on your project." (more on AGENTS.md here)

This PR started as a copilot-instructions.md(see more on copilot-instrucitons.md files here) but the more generic AGENTS.md was suggested, which is supported not only by Copilot but also many other AI agents.

I have initially populated the file with some simple guidance on Decision Heuristics, Type Hints and Docstrings, based on the existing guidance in the "Contributing" section of the project documentation. The expectation is that the content in this file would grow and become more comprehensive over subsequent PRs.

@WillAyd
Copy link
Member

WillAyd commented Oct 2, 2025

Thanks for the PR. I don't have any experience with this so am open to experiences from other projects.

The github link provides an example of an instructions file that is much more compact than what is provided here:

https://docs.github.com/en/copilot/how-tos/configure-custom-instructions/add-repository-instructions#writing-effective-repository-custom-instructions

Is there an advantage to this text copied from the guide versus something that would be more bulleted like the example?

@jzwick
Copy link
Author

jzwick commented Oct 2, 2025

Thanks for the PR. I don't have any experience with this so am open to experiences from other projects.

The github link provides an example of an instructions file that is much more compact than what is provided here:

https://docs.github.com/en/copilot/how-tos/configure-custom-instructions/add-repository-instructions#writing-effective-repository-custom-instructions

Is there an advantage to this text copied from the guide versus something that would be more bulleted like the example?

Thanks Will. My goal with the copy-paste was to avoid any controversy over wording. I'll ask copilot to re-write it in a way that is better suited for a copilot-instructions.md and update the PR with what it gives me ;)

Separately, on Slack someone made me aware of AGENTS.md which is now natively supported by Github Copilot (among many other agents) so I will update this to be an agents.md instead.

@jzwick jzwick changed the title DOC: Add copilot-instructions.md with type hints DOC: Add AGENTS.md with basic type and docstring guidelines Oct 3, 2025
Copy link
Contributor

@Alvaro-Kothe Alvaro-Kothe left a comment

Choose a reason for hiding this comment

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

I am neutral to these changes. But I think this file needs to be improved. I think the one from openai/agents.md is a great example.

Copy link
Contributor

Choose a reason for hiding this comment

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

Create an AGENTS.md file at the root of the repository. Most coding agents can even scaffold one for you if you ask nicely.

AGENTS.md should go to the project root and not .github/

@@ -0,0 +1,33 @@
# pandas Agent Instructions (Copilot etc)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# pandas Agent Instructions (Copilot etc)
# pandas Agent Instructions

- doc/source/development/contributing_docstring.rst
- doc/source/development/contributing_documentation.rst
- doc/source/development/contributing.rst

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
+ doc/source/development/contributing_environment.rst

It needs instructions on how to build pandas from source. I am not sure if the model will be reliable if it reads all these files. I think it's best to create sections focusing on some aspects and link to the .rst files for additional information. The agents.md highlights:

  • Project overview
  • Build and test commands
  • Code style guidelines
  • Testing instructions
  • Security considerations

@jbrockmendel
Copy link
Member

Is the idea to encourage AI PRs? That’s the opposite of what we want.

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.

4 participants