Skip to content

Commit 34413b0

Browse files
committed
docs: add agent guidelines via AGENTS.md and CLAUDE.md
1 parent ae09cab commit 34413b0

3 files changed

Lines changed: 43 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Agent Guidelines
2+
3+
## Developer commands
4+
5+
- `devbox run -- uv run -- pytest` – run all tests
6+
- `devbox run -- uv run -- pre-commit run -a` – run all code quality checks
7+
8+
## Code conventions
9+
10+
- ALWAYS write code compatible with Python 3.10+
11+
- ALWAYS use `snake_case` for Python functions/methods and variables, `PascalCase` for
12+
classes, and `UPPER_SNAKE_CASE` for constants
13+
- ALWAYS use full type annotations except for `self` and `cls` parameters
14+
- ALWAYS prefix internal Python modules, packages, and symbols with `_`
15+
- ALWAYS export public Python API symbols via `__all__` in public modules
16+
- ALWAYS use Google-style docstrings with all relevant sections (e.g., `Args`,
17+
`Returns`, `Raises`)
18+
- ALWAYS use single-backticks for inline code in comments and docstrings; NEVER use
19+
double-backticks
20+
- NEVER use comments to describe what the code is doing; ONLY use comments to clarify
21+
invariants and the reasoning behind any unusual/complex implementation decisions
22+
- ALWAYS keep docstrings and comments short and concise
23+
24+
## Test conventions
25+
26+
- ALWAYS attempt to add a test case for changed behavior
27+
- ALWAYS read and copy the style of similar tests when adding new cases
28+
- PREFER running specific tests over running the entire test suite
29+
- PREFER parametrized tests using the `@pytest.mark.parametrize` decorator over
30+
multiple separate test functions when testing the same logic with different inputs
31+
- PREFER tests that assert one clearly defined behavior; split tests that validate
32+
multiple unrelated things into separate focused test functions
33+
- ALWAYS test observable behavior (inputs → outputs, raised exceptions, side effects);
34+
NEVER assert on internal implementation details such as private attributes, call
35+
counts, execution order, etc.
36+
- PREFER tests that create a minimal test template using `build_file_tree` and call
37+
`run_copy`/`run_recopy`/`run_update` to generate/update a test project over using
38+
internal API in isolation

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@AGENTS.md

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,10 @@ ignore-words-list = 'ans'
202202
[tool.rumdl]
203203
flavor = "mkdocs"
204204
line_length = 88
205+
exclude = ["CLAUDE.md"]
206+
207+
[tool.rumdl.per-file-flavor]
208+
"AGENTS.md" = "standard"
205209

206210
[tool.rumdl.MD013]
207211
reflow = true

0 commit comments

Comments
 (0)