Agent and Contributor Rules¶
Stack Identification¶
Before executing any task, audit the active dependency stack. Do not assume the presence of any library.
Parse
pyproject.toml([project.dependencies],[project.optional-dependencies], and[dependency-groups]) anduv.lockto identify the exact versions in use.Use only libraries already declared in those files. Never introduce a conflicting or unlisted package without an explicit instruction to update dependencies.
Apply the following decision matrix when selecting implementation patterns:
Concern |
Source of truth |
Current library |
|---|---|---|
HTTP client |
|
|
Data validation / models |
|
|
CLI framework |
|
standard-library |
Retry logic |
|
|
HTTP mocking in tests |
|
|
Type checking |
|
|
Linting |
|
|
Formatting |
|
|
Immutable Constraints¶
Credential Handling¶
Never log, print, write to disk, or transmit API keys, security keys, tokens, or authorization headers in plaintext under any circumstance.
Mask credential values in all log output and exception messages.
Testing Boundaries¶
Test location |
Network access |
Required mock library |
|---|---|---|
|
Forbidden — no live requests |
|
|
Forbidden — use recorded or in-memory fixtures |
|
|
Permitted — real API calls |
None (guarded by |
All new or modified code must include or update tests in
tests/unit/.Coverage must remain ≥ 90%.
Do not add
tests/live/calls to the defaultpytestrun.
Commit Messages and Pull Requests¶
PR titles must follow Conventional Commits. Permitted prefixes:
feat:,fix:,chore:,docs:,ci:,test:,refactor:,perf:,revert:. TheSemantic PR TitleCI check enforces this.Security updates and CVE remediations must use the
fix:prefix (e.g.fix(deps):orfix(security):), which directly maps to patch releases inrelease-please. Do not use unpermitted prefixes such assecurity:.Merge to
mainvia Squash and merge so the PR title becomes the commit message.Changes that affect the public API, CLI interface, environment variables, or documentation portal (published via GitHub Pages) must be noted in the PR description.
Release Process¶
Do not manually edit package versions in
packages/*/pyproject.toml. Versions are managed automatically byrelease-please(Automated Releaseworkflow).Releases are fully automated and hermetically gated. After merging a Release PR opened by
release-please, theReleaseworkflow (.github/workflows/release.yml) builds impacted workspace distributions with pinnedhatchlingbounds andSHA256SUMS(30-daydist-<package>retention), runs cache-free static/security, Python 3.11–3.13 wheel-modepytest,twine check --strict, andscripts/validate_package_consumption.py --wheel-dir dist --require-prebuiltchecks inverify, publishes verified artifacts to PyPI (skip-existing: true) with 90-daychecksums-<package>artifacts, attachesSHA256SUMSto GitHub Releases in a post-publish job, and supports manualworkflow_dispatchrecovery onmainor release tags.