This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
pytest-agent-digest is a pytest plugin (in early development) that generates Markdown reports for AI agents. The plugin hooks into pytest to capture test results and produce structured Markdown output suitable for AI agent consumption.
Use uv for all dependency management. Install all dependency groups with:
uv sync
uv run pytest # Run all tests with coverage
uv run pytest tests/test_foo.py # Run a single test file
uv run pytest tests/test_foo.py::test_bar # Run a single test
uv run pytest -x # Stop on first failureuv run ruff check . # Lint
uv run ruff check --fix . # Lint with auto-fix
uv run ruff format . # Format code
uv run mypy pytest_agent_digest/ # Type checking
uv run interrogate pytest_agent_digest/ # Check docstring coverage (must be ≥90%)uv run pre-commit install # Install hooks (run once after setup)
uv run pre-commit run --all-files # Run all hooks manuallyuv run zensical serve # Serve docs locally
uv run zensical build # Build docsuv run bump-my-version bump patch # Bump patch version
uv run bump-my-version bump minor # Bump minor version- Line length: 119 characters
- Docstrings: Google style (enforced by ruff
Drules and pydoclint) - Docstring coverage: ≥90% required (interrogate)
- Type annotations: Required on all public functions (ANN rules enabled)
- Tests are in
tests/and are exempt from annotation and some complexity rules
The plugin is in early scaffold phase. The intended architecture for a pytest plugin:
pytest_agent_digest/__init__.py— Package version; pytest plugin entry point will be registered viaproject.entry-points."pytest11"inpyproject.tomlwhen implemented- Plugin hooks (
pytest_configure,pytest_runtest_logreport,pytest_sessionfinish, etc.) should be implemented here or in a dedicatedplugin.pymodule - The plugin captures test outcomes, metadata, and generates a Markdown report at session end
Version is stored in pytest_agent_digest/__init__.py as __version__ and managed by bump-my-version. The CHANGELOG.md is updated automatically during version bumps.