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.