diff --git a/.gitignore b/.gitignore index 501be1e7..28316280 100644 --- a/.gitignore +++ b/.gitignore @@ -45,6 +45,12 @@ docs/* !docs/rfcs/ !docs/rfcs/** +# Local-only AI assistant context — never committed even under docs/. +docs/AGENTS.md +docs/CLAUDE.md +docs/.cursorrules +docs/.windsurfrules + # Local-only PR review harness: rendering drivers, sample bank, fixtures. # Used by Claude during deep reviews; never shared in the repo. .local-review/ diff --git a/tests/test_docs_gitignore_policy.py b/tests/test_docs_gitignore_policy.py index b040aac5..a2729fae 100644 --- a/tests/test_docs_gitignore_policy.py +++ b/tests/test_docs_gitignore_policy.py @@ -23,3 +23,11 @@ def test_new_top_level_markdown_docs_are_trackable(): def test_docs_scratch_files_remain_ignored(): """The broad docs/* ignore rule should still keep arbitrary scratch files out.""" assert _git_check_ignore("docs/local-scratch.tmp").returncode == 0 + + +def test_local_only_ai_context_files_remain_ignored_under_docs(): + """Local AI assistant context files must stay out of commits under docs/.""" + assert _git_check_ignore("docs/AGENTS.md").returncode == 0 + assert _git_check_ignore("docs/CLAUDE.md").returncode == 0 + assert _git_check_ignore("docs/.cursorrules").returncode == 0 + assert _git_check_ignore("docs/.windsurfrules").returncode == 0