tree: add AGENTS.md router and improve AI instruction files

Add AGENTS.md as a minimal router that directs AI agents to the
relevant instruction files based on what they are editing.

Improve the instruction files:

- cpp.instructions.md: clarify seastarx.hh scope (headers, not
  "many files"), explain std::atomic restriction (single-shard
  model, not "blocking"), scope macros prohibition to new ad-hoc
  only, add coroutine exception propagation pattern, add invariant
  checking section preferring throwing_assert() over SCYLLA_ASSERT
  (issue #7871)
- python.instructions.md: demote PEP 8 to fallback after local
  style, clarify that only wildcard imports are prohibited
- copilot-instructions.md: show configure.py defaults to dev mode,
  add frozen toolchain section, clarify --no-gather-metrics applies
  to test.py, fix Python test paths to use .py extension, add
  license header guidance for new files

Closes scylladb/scylladb#29023
This commit is contained in:
Piotr Szymaniak
2026-04-01 21:19:05 +02:00
committed by Avi Kivity
parent f77ff28081
commit 378bcd69e3
4 changed files with 46 additions and 21 deletions

View File

@@ -7,7 +7,7 @@ applyTo: "**/*.py"
**Important:** Match existing code style. Some directories (like `test/cqlpy` and `test/alternator`) prefer simplicity over type hints and docstrings.
## Style
- Follow PEP 8
- Match style of the file and directory you are editing; fall back to PEP 8 if unclear
- Use type hints for function signatures (unless directory style omits them)
- Use f-strings for formatting
- Line length: 160 characters max
@@ -25,7 +25,7 @@ from cassandra.cluster import Cluster
from test.utils import setup_keyspace
```
Never use `from module import *`
Avoid wildcard imports (`from module import *`).
## Documentation
All public functions/classes need docstrings (unless the current directory conventions omit them):