Summary
Import the corrected python-pyproject.md agent rule from the downstream cuprum copy. The current template/.rules/python-pyproject.md gives incorrect guidance on where development dependencies belong: its "Optional and Development Dependencies" section places dev tooling (pytest, linters, etc.) under [project.optional-dependencies] and references a non-existent uv sync --include dev invocation.
Modern uv uses PEP 735 [dependency-groups] for development-only dependencies, and installs the dev group automatically by default. The rule file should teach that distinction.
What changed downstream
The fix landed in cuprum via leynos/cuprum#222 (file .rules/python-pyproject.md). It rewrites the dependency section to differentiate three fields:
| Field |
Installed for |
Use for |
project.dependencies |
Every consumer |
Required runtime libraries the shipped code imports |
project.optional-dependencies |
End users who opt into an extra |
Optional runtime features (package[extra]) |
dependency-groups (PEP 735) |
Local development only |
Test, lint, type-check, docs tooling — never published |
Key corrections:
- Development tooling belongs in
[dependency-groups], not [project.optional-dependencies].
uv run / uv sync install the dev group by default; documents --no-dev / --no-default-groups / --group / [tool.uv].default-groups.
[project.optional-dependencies] is reserved for opt-in runtime features (extras), requested via package[extra].
- The Section 7 worked example and Section 9 summary were updated to match, and the uv dependencies guide (https://docs.astral.sh/uv/concepts/projects/dependencies/) added as a citation.
Requested change
Context
cuprum adopts this template's rule set (see ADR-002 / ADR-003 in this repo), so the template is the upstream source of truth for these shared rules; the correction should flow back here to reach every generated project.
Summary
Import the corrected
python-pyproject.mdagent rule from the downstreamcuprumcopy. The currenttemplate/.rules/python-pyproject.mdgives incorrect guidance on where development dependencies belong: its "Optional and Development Dependencies" section places dev tooling (pytest, linters, etc.) under[project.optional-dependencies]and references a non-existentuv sync --include devinvocation.Modern
uvuses PEP 735[dependency-groups]for development-only dependencies, and installs thedevgroup automatically by default. The rule file should teach that distinction.What changed downstream
The fix landed in
cuprumvia leynos/cuprum#222 (file.rules/python-pyproject.md). It rewrites the dependency section to differentiate three fields:project.dependenciesproject.optional-dependenciespackage[extra])dependency-groups(PEP 735)Key corrections:
[dependency-groups], not[project.optional-dependencies].uv run/uv syncinstall thedevgroup by default; documents--no-dev/--no-default-groups/--group/[tool.uv].default-groups.[project.optional-dependencies]is reserved for opt-in runtime features (extras), requested viapackage[extra].Requested change
template/.rules/python-pyproject.mdto match the correctedcuprumcopy (adjusting any Copier/Jinja templating as needed — the cuprum copy is plain Markdown).typosgate.[project.optional-dependencies].Context
cuprumadopts this template's rule set (see ADR-002 / ADR-003 in this repo), so the template is the upstream source of truth for these shared rules; the correction should flow back here to reach every generated project.