Skip to content

Add AGENTS.md template#476

Draft
chrisjkuch wants to merge 10 commits into
masterfrom
cjk-agents-md
Draft

Add AGENTS.md template#476
chrisjkuch wants to merge 10 commits into
masterfrom
cjk-agents-md

Conversation

@chrisjkuch
Copy link
Copy Markdown
Contributor

Closes #474

This PR adds an AGENTS.md file that concisely encodes desired agent interaction with the codebase. We incorporate the opinions from the opinions page and dynamically add sections based on the user's selected tooling.

Comment thread {{ cookiecutter.repo_name }}/AGENTS.md Outdated
Comment thread {{ cookiecutter.repo_name }}/AGENTS.md Outdated
Comment thread {{ cookiecutter.repo_name }}/AGENTS.md Outdated
Copy link
Copy Markdown
Member

@pjbull pjbull left a comment

Choose a reason for hiding this comment

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

Great place to start! A few small comments.

Comment thread {{ cookiecutter.repo_name }}/AGENTS.md Outdated
Comment thread {{ cookiecutter.repo_name }}/AGENTS.md Outdated
Comment thread {{ cookiecutter.repo_name }}/AGENTS.md
Comment thread {{ cookiecutter.repo_name }}/AGENTS.md Outdated
Copy link
Copy Markdown

@jdcc jdcc left a comment

Choose a reason for hiding this comment

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

A couple small things, but I don't feel like I know enough to weigh in otherwise. Do we want to flag to folks setting up a project that they can/should fill in project-specific context in here?

Comment thread {{ cookiecutter.repo_name }}/AGENTS.md Outdated
Comment thread {{ cookiecutter.repo_name }}/AGENTS.md Outdated
@chrisjkuch
Copy link
Copy Markdown
Contributor Author

@jdcc @pjbull @jayqi I've responded to feedback, would love you to take another look when you have a chance!

Copy link
Copy Markdown

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

Adds an AGENTS.md file to the generated Cookiecutter project and documents it, with tests to validate the rendered content across configuration combinations.

Changes:

  • Add {{ cookiecutter.repo_name }}/AGENTS.md template describing agent-oriented project conventions and workflow.
  • Extend generation tests to expect AGENTS.md and validate key conditional sections render correctly.
  • Update user-facing docs/README directory-structure listings and add guidance on editing AGENTS.md.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/test_creation.py Adds verify_agents_md and includes AGENTS.md in expected generated files.
README.md Documents AGENTS.md in the example project directory tree.
docs/docs/using-the-template.md Adds a section explaining how/why to update AGENTS.md.
docs/docs/index.md Documents AGENTS.md in the directory tree (contains a typo to fix).
{{ cookiecutter.repo_name }}/README.md Documents AGENTS.md in the generated project’s directory tree.
{{ cookiecutter.repo_name }}/AGENTS.md New template file containing agent instructions with conditional sections.

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

Comment thread tests/test_creation.py
Comment on lines +44 to +47
def verify_agents_md(root, config):
"""Test that AGENTS.md is correctly rendered for the given config."""
agents_md = (root / "AGENTS.md").read_text()

Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

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

AGENTS.md includes non-ASCII characters (e.g., the arrow and em dashes in the new template). Reading it via Path.read_text() without an explicit encoding makes this test locale-dependent and can fail/garble under non-UTF-8 locales. Use read_text(encoding='utf-8') here (and consider doing the same in no_curlies, which also reads files without specifying encoding).

Copilot uses AI. Check for mistakes.
Comment thread docs/docs/index.md Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.

5 participants