When creating a new Python library from this template, follow these rules strictly:
NEVER add AI agents as co-authors in commits.
❌ WRONG:
feat: initial release
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
✅ CORRECT:
feat: initial release
Comprehensive library for X with Y features.
Why: AI co-authorship appears in GitHub contributors and cannot be easily removed.
scripts/setup_repo.py and this file belong to the template repository. A render
contains neither, so there is nothing of the kind to delete from a new library. The
render does contain NEW_LIBRARY_CHECKLIST.md, the operator's checklist; it is deleted
once its steps are done.
When creating a new library repository:
- Generate from template:
uvx --with jinja2-time copier copy --trust gh:bedrock-python/python-library-template my-library
- Make initial commit WITHOUT Co-Authored-By:
git init -b master git add . git commit -m "feat: initial release Comprehensive library for X with: - Feature A - Feature B - Full documentation and tests"
- Create the GitHub repository and push:
gh repo create org/repo-name --public --source . --push - After the first CI pass, run the setup script from the template repository:
python /path/to/python-library-template/scripts/setup_repo.py org/repo-name
.release-please-manifest.jsonstarts at"0.0.0"- First
feat:commit → Release Please creates v0.1.0 - First
fix:commit → Release Please creates v0.0.1
docs/agents.md ships as a skeleton with TODO markers. Fill it in before the initial
commit — it is the page a person hands to a coding assistant instead of the whole site,
so an empty one is a broken promise and a wrong one teaches an API that does not exist.
Write it from the source you just wrote, not from the README: every name, argument, default and return type has to be one that exists, and every name a caller is told to import has to be importable. Check that before committing:
uv run python -c "import <package>; [getattr(<package>, n) for n in ('Name', ...)]"https://bedrock-python.github.io/pg-partsmith/agents/ is the worked example. The
sections that carry the weight are Scope (what it does not do stops a model
inventing features), Rules that hold or break the code and Common mistakes.
Delete a section that has nothing true to say rather than padding it.
Keep the <!-- ... --> guidance comment out of the committed page.
Before pushing the initial commit, verify:
- No
Co-Authored-By:in commit messages - No backup files (e.g.,
.coverage (копия...),file (copy).py) - No cache files (
.mypy_cache,.ruff_cache,__pycache__) - should be in.gitignore -
.release-please-manifest.jsoncontains"0.0.0" -
docs/agents.mdwritten from the real API, noTODOmarkers, guidance comment removed
Before merging the Release Please PR:
-
Configure PyPI Trusted Publisher at https://pypi.org/manage/account/publishing/
- Project name:
library-name - Owner:
org-name - Repository:
repo-name - Workflow:
publish.yml - Environment:
pypi
- Project name:
-
Merge Release Please PR → automatic publication to PyPI
❌ Including AI agents in commits
❌ Starting with version 0.1.0 instead of 0.0.0
❌ Committing backup/cache files
❌ Creating multiple commits before initial push (messy history)
❌ Shipping docs/agents.md with its TODO markers still in it
Clean initial commit = Clean repository forever
- One commit for initial release
- No AI co-authors
- No template-specific files
- Start from version 0.0.0
- Run the setup script from the template repository
Following these rules ensures a clean, professional repository from day one.