This file provides repository-specific instructions to AI coding agents (e.g., OpenAI Codex, GitHub Copilot, Gemini, Claude, Cursor). Human contributors should refer to DEVELOPING.md.
template-python is a production-ready Apache 2.0 template repository for bootstrapping modern software projects.
Primary language: Python 3.10+
Package manager: Hatch
Caution
- Never commit secrets. Do not add API keys, tokens, or credentials anywhere.
- Do not modify
LICENSEorNOTICE. These are legally binding. - Do not modify workflow trigger conditions without human review.
- All new source files must include the Apache 2.0 copyright header.
- Use
{{double_braces}}for template placeholders. Never hard-code them.
.github/workflows/: CI/CD pipelines. Files prefixed with_are reusable templates.docs/: MkDocs Material source.src/: Primary application source code.tests/: Organized intounit/,integration/, ande2e/.
- Linting:
hatch run lint:check(Ruff & mdformat) andhatch run types:check(Mypy) - Pre-commit:
pre-commit run --all-files(Runs formatting and quality checks) - Testing:
hatch run test:all(Pytest) andhatch run test:all-cov(Coverage) - Docs:
hatch run docs:serve/hatch run docs:build - Build:
hatch build
- No magic strings or numbers — define constants.
- Prefer explicit over implicit.
- One responsibility per module.
- Every public function, class, and module must have a docstring.
- Follow Conventional Commits.
- Reusable Templates (
_*.yml): Never trigger directly. Ensure changes are backward-compatible. - Lifecycle:
development.yml: PR open/sync (unit + smoke)main.yml: Push tomain(unit + integration + sanity)nightly.yml,weekly.yml,release.yml: Standard scheduled/release flows.
docs/andmkdocs.ymlcontrol the site. Do not create docs outside thenav:tree.docs/index.mddynamically includesREADME.mdvia MkDocs snippets.- Use
{{placeholder}}variables for templated fields (e.g.,template-python,markurtz).
Add notes here when updating instructions for AI agents.