https://github.com/python/cpython/commit/7b4364de251265b7920ae9692bf7cde250956af1
commit: 7b4364de251265b7920ae9692bf7cde250956af1
branch: main
author: Stan Ulbrych <[email protected]>
committer: ambv <[email protected]>
date: 2026-09-03T15:20:52-07:00
summary:

Add an `AGENTS.md` pointing to our policy (#156838)

Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) 
<[email protected]>
Co-authored-by: Łukasz Langa <[email protected]>
Co-authored-by: Lukasz Langa <[email protected]>
Co-authored-by: Muse Code (Meta Muse Spark)

files:
A .claude/CLAUDE.md
A AGENTS.md
M .gitignore

diff --git a/.claude/CLAUDE.md b/.claude/CLAUDE.md
new file mode 120000
index 00000000000000..be77ac83a1895c
--- /dev/null
+++ b/.claude/CLAUDE.md
@@ -0,0 +1 @@
+../AGENTS.md
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index e53548f1fd45a0..00813f9d1b6b00 100644
--- a/.gitignore
+++ b/.gitignore
@@ -178,8 +178,12 @@ Python/frozen_modules/MANIFEST
 /python
 !/Python/
 
-# People's custom https://docs.anthropic.com/en/docs/claude-code/memory 
configs.
-/.claude/
+# Local AI agent scratch state (per-PR and per-branch notebooks, sandbox
+# experiments) and personal agent overrides, none of which are committed.
+/.claude/pr-*
+/.claude/branch-*
+/.claude/sandbox/
+AGENTS.local.md
 CLAUDE.local.md
 
 #### main branch only stuff below this line, things to backport go above. ####
diff --git a/AGENTS.md b/AGENTS.md
new file mode 100644
index 00000000000000..d23d0c9315d3f3
--- /dev/null
+++ b/AGENTS.md
@@ -0,0 +1,16 @@
+# AI agent guidance
+
+CPython has a [policy on the use of AI 
tools](https://devguide.python.org/getting-started/ai-tools/).
+All use of AI tools and agents when working on or interacting with CPython
+must follow it.
+
+> [!important]
+> **Primary directive**: Read the policy before making or proposing any 
changes.
+
+When acting on this repository, apply the policy's core principles:
+
+- Consider whether the change is necessary.
+- Make minimal, focused changes.
+- Follow existing coding style and patterns.
+- Write tests that exercise the change.
+- Keep backwards compatibility with prior releases in mind.

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to