|
| 1 | +# AGENTS.md |
| 2 | + |
| 3 | +Instructions for AI coding agents working in this repository. |
| 4 | + |
| 5 | +## Environment |
| 6 | + |
| 7 | +Use `uv` for dependency management. The project configuration is in `pyproject.toml`. Run commands |
| 8 | +from the repository root using the Makefile. |
| 9 | + |
| 10 | +## Key commands |
| 11 | + |
| 12 | +- `make test`: Core tests (parallel, with coverage). Excludes synthetic and integration tests. |
| 13 | +- `make test-synthetic`: Synthetic package tests. Run when changes affect rendering, site |
| 14 | + generation, or test-package specs. |
| 15 | +- `make test-integration`: Integration tests with external packages. Run when changes affect |
| 16 | + package discovery, interlinks, or external API consumption. |
| 17 | +- `make lint`: Run ruff formatter and linter with auto-fix. |
| 18 | +- `make format`: Format code with ruff (formatting only, no lint fixes). |
| 19 | +- `make check`: Lint + core tests combined. |
| 20 | +- `make type-check`: Run mypy across multiple Python versions. |
| 21 | +- `make type-check-renderer`: Run pyright on the API reference renderer. |
| 22 | + |
| 23 | +Default to `make test` during iteration. Run `make test-synthetic` or `make test-integration` |
| 24 | +when your changes touch areas those suites cover. |
| 25 | + |
| 26 | +## Code style |
| 27 | + |
| 28 | +Ruff handles formatting and linting. No manual style enforcement needed beyond what ruff checks. |
| 29 | + |
| 30 | +Internal modules use a leading underscore (e.g., `_renderer`, `_apiref`, `_builtin`). |
| 31 | +Public modules do not. Follow this convention when creating new modules. |
| 32 | + |
| 33 | +Match the type annotation level of surrounding code. Both mypy (strict) and pyright (strict) are |
| 34 | +configured, but not all code is fully annotated yet. |
| 35 | + |
| 36 | +## Docstrings |
| 37 | + |
| 38 | +Docstrings use a mixture of NumPy style and Quarto conventions: |
| 39 | + |
| 40 | +- use Quarto-style markup, not reStructuredText. |
| 41 | +- use single backticks for inline code (`` `value` ``), never double backticks (``` ``value`` ```). |
| 42 | +- code cells in docstrings can be executed by Quarto, inserting output after them. |
| 43 | + |
| 44 | +## CLI |
| 45 | + |
| 46 | +The CLI is Click-based with its entry point in `cli.py`. CLI commands and their options are public |
| 47 | +API. Do not rename, remove, or change command signatures without explicit discussion. |
| 48 | + |
| 49 | +## Do not edit |
| 50 | + |
| 51 | +These directories contain generated output. Do not hand-edit files in them: |
| 52 | + |
| 53 | +- `_freeze/`: Quarto freeze directory |
| 54 | +- `build/`, `dist/`: Python build artifacts |
| 55 | +- `great-docs/`, `great-docs-dev/`, and other `great-docs-*` directories: rendered site output |
| 56 | + |
| 57 | +Do not edit generated Quarto output. If rendered output looks wrong, fix the source and rebuild. |
| 58 | + |
| 59 | +## Git |
| 60 | + |
| 61 | +Do not create branches, stage files, commit, or push unless explicitly asked. Leave git history |
| 62 | +alone (inspecting status and logs is fine). |
0 commit comments