This file is the auto-loaded entry point for AI agents working on the commitizen repository. It holds the rules an agent needs in every session. Deeper guidance lives in:
- Contributing — setup, dev workflow, PR lifecycle.
- Contributing TL;DR — poe command cheat sheet.
- Pull Request Guidelines — PR etiquette and AI-assisted policy.
- Architecture Overview — codebase topology and extension points.
- For AI Agents — agent-shaped recipes, validation map, playbooks.
Follow these instructions in addition to any higher-level tool or system rules.
- Project:
commitizen— Python CLI for enforcing Conventional Commits, automating version bumps, and generating changelogs. - Library + CLI: code is reachable both via
czandimport commitizen. - Cross-platform: tests run on Linux/macOS/Windows × Python 3.10–3.14. Avoid POSIX-only assumptions (paths, subprocesses, line endings).
- Key entrypoints:
commitizen/cli.py— CLI definition (decli + argparse).commitizen/commands/— one module perczsubcommand.commitizen/config/— configuration discovery and parsing.commitizen/providers/— version providers.commitizen/changelog_formats/— changelog file formats.
| Changing... | Read first |
|---|---|
| CLI flags/arguments | commitizen/cli.py, docs/commands/<cmd>.md, tests/test_cli/ |
| Bump logic | commitizen/bump.py, commitizen/commands/bump.py, docs/commands/bump.md |
| Changelog generation | commitizen/changelog.py, commitizen/changelog_formats/, docs/commands/changelog.md |
| Version schemes | commitizen/version_schemes.py, tests/test_version_schemes.py |
| Version providers | commitizen/providers/, tests/providers/, docs/config/version_provider.md |
| Config resolution | commitizen/config/, tests/test_conf.py, docs/config/ |
| Tag handling | commitizen/tags.py, tests/test_tags.py |
| Pre-commit / CI | .pre-commit-config.yaml, .github/workflows/, pyproject.toml (poe tasks) |
For recurring task types (add a provider, deprecate an API, regenerate snapshots, ...), use the matching playbook in For AI Agents § Playbooks instead of reinventing the workflow.
These files are regenerated by Commitizen-specific tooling, so hand-edits get reverted on the next release or doc rebuild:
CHANGELOG.md— produced bycz changelog. Hand-edits will be overwritten on the next release.commitizen/__version__.py— bumped bycz bumpvia the configured version provider..pre-commit-config.yaml:rev:lines under theCommitizenrepo — bumped bycz bump(version_filesinpyproject.toml).docs/images/cli_help/*.svganddocs/images/cli_interactive/*.gif— regenerated byuv run poe doc:screenshots. See the update-snapshots playbook.tests/**/*snapshot files used bypytest-regressions— regenerated viauv run poe test:regen.
These are easy to miss when working from an agent and are required by the PR template:
- Complete the AI disclosure. Check "Was generative AI tooling used to co-author this PR?" and fill in the
Generated-by:trailer with the tool name. Details: Pull Request Guidelines § AI-Assisted Contributions. - Run
uv run poe allbefore pushing. This is the command named in the PR template; it auto-formats then runs the same lint/check/test pipeline as CI. To mirror CI exactly afterwards, runuv run poe ci(usesprek, does not auto-format). - Fill in "Steps to Test This Pull Request" with the exact commands you ran locally — the maintainers re-run them.
When behavior is ambiguous, assume backward compatibility with current tests and docs is required. Add a deprecation window instead of breaking it; see the deprecate-public-api playbook.