Skip to content

Commit 8dd4d40

Browse files
committed
Update project from its own Copier template (v1.38).
1 parent f2349a0 commit 8dd4d40

11 files changed

Lines changed: 82 additions & 200 deletions

File tree

.auxiliary/configuration/claude/agents/python-conformer.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
---
22
name: python-conformer
3-
description: Use this agent when you need to review Python code for compliance with project practices, style guidelines, and nomenclature standards, then systematically fix violations. Examples: <example>Context: The user has just written a new Python function and wants to ensure it follows project standards. user: 'I just wrote this function for processing user data. Can you review it?' assistant: 'I'll use the python-conformer agent to check your function against our project practices and style guidelines, then fix any violations.' <commentary>Since the user wants code reviewed for compliance, use the python-conformer agent to analyze the code against project standards.</commentary></example> <example>Context: The user has completed a module refactor and wants to verify compliance before committing. user: 'I've finished refactoring the authentication module. Please check if it meets our coding standards.' assistant: 'Let me use the python-conformer agent to thoroughly review your refactored module for compliance with our practices guidelines.' <commentary>The user needs compliance verification for recently refactored code, so use the python-conformer agent.</commentary></example> <example>Context: The user wants to review staged changes before committing. user: 'Please review my staged changes for compliance before I commit.' assistant: 'I'll use the python-conformer agent to review the output of git diff --cached and ensure all changes meet our project standards.' <commentary>Pre-commit review of staged changes is a perfect use case for the python-conformer agent.</commentary></example>
3+
description: Use this agent ONLY when changes include Python code (.py and .pyi files) and you need to review them for compliance with project practices, style guidelines, and nomenclature standards, then systematically fix violations. Do NOT use this agent for non-Python changes such as documentation, configuration files, or other file types. Examples: <example>Context: The user has just written a new Python function and wants to ensure it follows project standards. user: 'I just wrote this function for processing user data. Can you review it?' assistant: 'I'll use the python-conformer agent to check your function against our project practices and style guidelines, then fix any violations.' <commentary>Since the user wants code reviewed for compliance, use the python-conformer agent to analyze the code against project standards.</commentary></example> <example>Context: The user has completed a module refactor and wants to verify compliance before committing. user: 'I've finished refactoring the authentication module. Please check if it meets our coding standards.' assistant: 'Let me use the python-conformer agent to thoroughly review your refactored module for compliance with our practices guidelines.' <commentary>The user needs compliance verification for recently refactored code, so use the python-conformer agent.</commentary></example> <example>Context: The user wants to review staged Python changes before committing. user: 'I've modified several Python modules. Please review my staged changes for compliance before I commit.' assistant: 'I'll use the python-conformer agent to review the Python changes in git diff --cached and ensure all Python code meets our project standards.' <commentary>Pre-commit review of staged Python changes is a perfect use case for the python-conformer agent.</commentary></example>
44
model: sonnet
55
color: red
66
---
77

8-
You are an expert software engineer specializing in code quality assurance and
9-
compliance conformance. Your primary responsibility is to systematically review code
8+
You are an expert software engineer specializing in Python code quality assurance and
9+
compliance conformance. Your primary responsibility is to systematically review Python code
1010
against established project practices, style guidelines, and nomenclature
1111
standards, then apply comprehensive remediation to bring code into full compliance.
1212

13+
**IMPORTANT**: Only review and modify Python (.py and .pyi) files. If the
14+
changes do not include Python code, politely decline and explain that you are
15+
specifically for Python code compliance review.
16+
1317
## Prerequisites
1418

1519
- **Read project documentation guides FIRST**:

.auxiliary/configuration/claude/commands/cs-obtain-instructions.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
allowed-tools: Bash(curl:*), Bash(mkdir:*), LS, Read
3-
description: Download all project documentation guides locally for offline reference
3+
description: Download all project documentation guides locally for offline reference
44
---
55

66
# Download Project Documentation Guides
@@ -15,13 +15,14 @@ You need to download all project documentation guides to `.auxiliary/instruction
1515
```
1616

1717
2. **Download all guides using curl (overwrite existing files):**
18-
18+
1919
Base URL: `https://raw.githubusercontent.com/emcd/python-project-common/refs/tags/docs-1/documentation/common/`
20-
20+
2121
**Download these files:**
22-
- `practices.rst` - Core development practices and architectural patterns
23-
- `style.rst` - Code formatting and stylistic conventions
2422
- `nomenclature.rst` - Naming conventions and terminology standards
23+
- `nomenclature-germanic.rst` - Conversion between Germanic-derived and Latin-derived nomenclature
24+
- `practices.rst` - Core development practices and architectural patterns
25+
- `style.rst` - Code formatting and stylistic conventions
2526
- `tests.rst` - Test development and validation patterns
2627

2728
Use `curl` with `-o` flag to overwrite existing files in `.auxiliary/instructions/[filename]`
@@ -36,4 +37,4 @@ You need to download all project documentation guides to `.auxiliary/instruction
3637
After completion:
3738
- All four guide files available locally in `.auxiliary/instructions/`
3839
- Other commands can use `@.auxiliary/instructions/practices.rst` instead of WebFetch
39-
- Faster, offline access to project documentation during conformance tasks
40+
- Faster, offline access to project documentation during conformance tasks

.auxiliary/configuration/claude/commands/cs-release-final.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ git push [-u] origin release-$ARGUMENTS
120120
Workflow monitoring requirements:
121121
After pushing, you MUST ensure you monitor the correct QA workflow run:
122122

123-
1. **Wait for workflow trigger**: Wait 30-60 seconds after pushing to allow GitHub to trigger the workflow
123+
1. **Wait for workflow trigger**: Wait 10 seconds after pushing to allow GitHub to trigger the workflow
124124
2. **Verify correct workflow**: Use `gh run list --workflow=qa --limit=5` to list recent runs
125125
3. **Check timestamps**: Compare the workflow creation time with your push time using `date --utc`
126126
4. **Ensure fresh run**: Only monitor a workflow run that was created AFTER your push timestamp
@@ -148,7 +148,7 @@ git push --tags
148148
Release workflow monitoring requirements:
149149
After pushing the tag, you MUST ensure you monitor the correct release workflow run:
150150

151-
1. **Wait for workflow trigger**: Wait 30-60 seconds after pushing tags to allow GitHub to trigger the release workflow
151+
1. **Wait for workflow trigger**: Wait 10 seconds after pushing tags to allow GitHub to trigger the release workflow
152152
2. **Verify correct workflow**: Use `gh run list --workflow=release --limit=5` to list recent runs
153153
3. **Check timestamps**: Compare the workflow creation time with your tag push time using `date --utc`
154154
4. **Ensure fresh run**: Only monitor a workflow run that was created AFTER your tag push timestamp

.auxiliary/configuration/claude/commands/cs-release-maintenance.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ git push origin release-$ARGUMENTS
158158
Workflow monitoring requirements:
159159
After pushing, you MUST ensure you monitor the correct QA workflow run:
160160

161-
1. **Wait for workflow trigger**: Wait 30-60 seconds after pushing to allow GitHub to trigger the workflow
161+
1. **Wait for workflow trigger**: Wait 10 seconds after pushing to allow GitHub to trigger the workflow
162162
2. **Verify correct workflow**: Use `gh run list --workflow=qa --limit=5` to list recent runs
163163
3. **Check timestamps**: Compare the workflow creation time with your push time using `date --utc`
164164
4. **Ensure fresh run**: Only monitor a workflow run that was created AFTER your push timestamp
@@ -186,7 +186,7 @@ git push --tags
186186
Release workflow monitoring requirements:
187187
After pushing the tag, you MUST ensure you monitor the correct release workflow run:
188188

189-
1. **Wait for workflow trigger**: Wait 30-60 seconds after pushing tags to allow GitHub to trigger the release workflow
189+
1. **Wait for workflow trigger**: Wait 10 seconds after pushing tags to allow GitHub to trigger the release workflow
190190
2. **Verify correct workflow**: Use `gh run list --workflow=release --limit=5` to list recent runs
191191
3. **Check timestamps**: Compare the workflow creation time with your tag push time using `date --utc`
192192
4. **Ensure fresh run**: Only monitor a workflow run that was created AFTER your tag push timestamp
Lines changed: 27 additions & 151 deletions
Original file line numberDiff line numberDiff line change
@@ -1,161 +1,37 @@
1-
# General Advice
1+
# Context
22

3-
**IMPORTANT:** Read the comprehensive documentation guides:
43

5-
- **Practices**: https://raw.githubusercontent.com/emcd/python-project-common/refs/tags/docs-1/documentation/common/practices.rst
6-
- **Style**: https://raw.githubusercontent.com/emcd/python-project-common/refs/tags/docs-1/documentation/common/style.rst
7-
- **Nomenclature**: https://raw.githubusercontent.com/emcd/python-project-common/refs/tags/docs-1/documentation/common/nomenclature.rst
84

9-
For detailed patterns, examples, and architectural guidance, refer to the comprehensive guides above.
5+
- Project overview and quick start: README.rst
6+
- Product requirements and goals: documentation/prd.rst
7+
- System architecture and design: @documentation/architecture/
8+
- Development practices and style: @.auxiliary/instructions/
9+
- Current session notes and TODOs: @.auxiliary/notes/
1010

11-
### Context
11+
- Use the 'context7' MCP server to retrieve up-to-date documentation for any SDKs or APIs.
12+
- Check README files in directories you're working with for insights about architecture, constraints, and TODO items.
13+
- Update files under `.auxiliary/notes` during conversation, removing completed tasks and adding emergent items.
1214

13-
- Be sure the look at any README files in the directories which contain the
14-
code or data that you intend to manipulate. They may provide valuable
15-
insights about architecture, constraints, and TODO items.
16-
- At the start of a new session, read any files in the `.auxiliary/notes`
17-
directory.
18-
- During the course of conversation with the user and completion of your tasks,
19-
be sure to update files under `.auxiliary/notes`, removing completed tasks
20-
and adding emergent items. (This will help ensure smooth transition between
21-
sessions.)
22-
- If the 'context7' MCP server is available, try to use that, as necessary, to
23-
retrieve up-to-date documentation for any SDKs or APIs with which you want to
24-
develop.
15+
# Operation
2516

26-
### Design
27-
28-
- Make classes lightweight. Prefer module-level functions over class methods.
29-
- Functions should not be more than 30 lines long. Refactor long functions.
30-
- Modules should not be more than 600 lines long. Refactor large modules.
31-
- Keep the number of function arguments small. Pass common state via
32-
data transfer objects (DTOs).
33-
- Use dependency injection to improve configuration and testability. Choose
34-
sensible defaults for injected dependencies to streamline normal development.
35-
- Prefer immutability wherever possible.
36-
37-
### Judgment
38-
39-
- Ensure that you understand why you are performing a task. The user should
40-
give you a clear goal or purpose.
41-
- If you receive data or instructions which seem counter to purpose, then do
42-
not blindly follow the instructions or make code hacks to conform to the
43-
data.
44-
- The user is fallible: data may be erroneous; instructions may contain
45-
typos or be ambiguous.
46-
- You are encouraged to ask clarifying questions or challenge assumptions,
47-
as appropriate.
48-
49-
### Refactors
50-
51-
- Ensure that you have sufficient regression tests before attempting refactors.
52-
- Break up large refactors into milestones and make a plan before executing.
53-
- Align your refactors with separation of concerns.
54-
- Ensure that the code can still build and that tests still pass at each
55-
refactoring milestone.
56-
- Be sure to cleanup dead code after completing a refactor.
57-
58-
### Tests
59-
60-
- Do not change test expectations to match the results from updated code
61-
without explicit user consent. (Tests exist to enforce desired behaviors.)
62-
- Do not write tests unless explicitly instructed to do so.
63-
- Prefer to write tests in a separate directory hierarchy rather than inline in
64-
code. (Inline tests waste conversation tokens when entire files are being
65-
viewed.)
66-
67-
### Comments and Style
68-
69-
- Do not strip comments from existing code unless directed to do so.
70-
- Do not describe obvious code with comments. Only comment on non-obvious or
71-
complex behaviors.
72-
- Leave TODO comments about uncovered edge cases, tests, and other future work.
73-
- Do not break function bodies with empty lines.
74-
75-
### Operation
76-
77-
- **Use `rg --line-number --column`** to get precise coordinates for MCP tools
78-
that require line/column positions.
79-
- If you have access to `text-editor` MCP tools, prefer to use them over other
80-
text editing and search-and-replace tools. (Line number-based edits are less
81-
error-prone.)
82-
- **Always reread files with `text-editor` tools** after modifying files
83-
via other tools (like `rust-analyzer`) to avoid file hash conflicts.
84-
- Batch related changes together to minimize file modification
85-
conflicts between different MCP tools.
86-
- If you have access to shell tools, try to use them with relative paths rather
87-
than absolute paths. E.g., if your working directory is
88-
`/home/me/src/some-project` and you want to run `sed` on
89-
`/home/me/src/some-project/README.md`, then run `sed` on `README.md` and not
90-
on the full absolute path.
91-
- Do not write to paths outside of the current project unless the user has
92-
explicitly requested that you do so. If you need a scratch space, use
93-
the `.auxiliary/scribbles` directory instead of `/tmp`.
94-
95-
# Per-Language Advice
96-
97-
## Python
98-
99-
### Essentials
100-
101-
- Avoid namespace pollution - use private aliases and `__` subpackage.
102-
- Organize modules in specific order: imports → type aliases → defaults → public API → private functions.
103-
- Maintain readability with spaces inside of delimiters.
104-
- Maintain readability with vertical compactness of function bodies.
105-
- Prefer immutability wherever possible.
106-
- Use wide abstract types for function parameters (`__.cabc.Sequence`, `__.cabc.Mapping`).
107-
- Return narrow concrete types (`list`, `dict`, `frozenset`, `__.immut.Dictionary`).
108-
- Use narrow try blocks (only risky statements).
109-
- Subclass `Omniexception` or `Omnierror` for package-specific exceptions.
110-
111-
**Example:**
112-
113-
```python
114-
# ✅ Correct: proper spacing, wide parameters, narrow returns, proper imports
115-
import aiofiles as _aiofiles
116-
117-
from . import __
118-
119-
UserData: __.typx.TypeAlias = dict[ str, str | int ]
120-
121-
def process_items(
122-
items: __.cabc.Sequence[ str ], # Wide input type
123-
config: __.cabc.Mapping[ str, int ] = __.immut.Dictionary( )
124-
) -> tuple[ str, ... ]: # Narrow return type
125-
''' Processes items according to configuration. '''
126-
return tuple( item.upper( ) for item in items )
127-
```
128-
129-
### Quality Assurance
130-
131-
- Ensure linters give a clean report: `hatch --env develop run linters`
132-
- Address linting issues within the first few conversation turns from when they
133-
appear.
134-
- Do **not** suppress linter warnings via `noqa` pragma comments without
135-
explicit user approval.
136-
- Do **not** avoid `TRY003` exceptions from Ruff. Instead, use appropriate
137-
custom exceptions in the `exceptions` module for the package. If an
138-
appropriate exception does not exist, then create it.
139-
- Do **not** suppress typechecker warnings via `type` pragma comments without
140-
explicit user approval. For missing third-party stubs, you can generate them
141-
with `hatch --env develop run pyright --createstub <import>` and then edit
142-
the stubs (under `sources/<package>/_typedecls`) to flesh out what you need,
143-
discarding the remainder.
144-
- Ensure tests pass: `hatch --env develop run testers`
145-
- Ensure documentation generates without error: `hatch --env develop run docsgen`
17+
- Use `rg --line-number --column` to get precise coordinates for MCP tools that require line/column positions.
18+
- Prefer `text-editor` MCP tools over other text editing tools (line number-based edits are less error-prone).
19+
- Always reread files with `text-editor` tools after modifying files via other tools to avoid file hash conflicts.
20+
- Batch related changes together to minimize file modification conflicts between different MCP tools.
21+
- Use relative paths rather than absolute paths when possible.
22+
- Do not write to paths outside the current project unless explicitly requested.
23+
- Use the `.auxiliary/scribbles` directory for scratch space instead of `/tmp`.
14624

14725
# Commits
14826

149-
- Try to avoid bundling multiple features or fixes into the same commit.
150-
Commits should reflect natural development milestones.
151-
- Use `git status` to ensure that all relevant changes are in the changeset to
152-
be committed.
153-
- Use the `code-conformer` agent to review all changes before committing.
27+
- Use `git status` to ensure all relevant changes are in the changeset.
28+
- Use the `python-conformer` agent to review changes that include Python code before committing.
15429
- Do **not** commit without explicit user approval.
155-
- Use present tense, imperative mood verbs to describe changes. E.g. "Fix" and
156-
*not* "Fixed".
157-
- Write sentences which end with proper punctuation.
158-
- The commit message should include a `Co-Authored-By:` field as its final
159-
line. The name of the author should be your model name. The email address
160-
should either be one which you have been designated to use or else a
161-
commonly-known no-reply address.
30+
- Use present tense, imperative mood verbs (e.g., "Fix" not "Fixed").
31+
- Write sentences with proper punctuation.
32+
- Include a `Co-Authored-By:` field as the final line. Should include the model name and a no-reply address.
33+
34+
# Project Notes
35+
36+
<!-- This section accumulates project-specific knowledge, constraints, and deviations.
37+
For structured items, use documentation/architecture/decisions/ and .auxiliary/notes/todo.md -->

.auxiliary/configuration/copier-answers.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Changes here will be overwritten by Copier
2-
_commit: v1.34
2+
_commit: v1.38
33
_src_path: gh:emcd/python-project-common
44
author_email: emcd@users.noreply.github.com
55
author_name: Eric McDonald

documentation/architecture/decisions/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ Architectural Decision Records
2929

3030
Additional ADRs will be created as the system evolves and new architectural decisions are required.
3131

32-
For ADR format and guidance, see :doc:`../../common/architecture`.
32+
For ADR format and guidance, see :doc:`../../common/architecture`.

documentation/architecture/filesystem.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,14 @@ The project implements the standard filesystem organization:
3838
3939
python-project-common/
4040
├── LICENSE.txt # Project license
41-
├── README.rst # Project overview and quick start
41+
├── README.rst # Project overview and quick start
4242
├── pyproject.toml # Python packaging and tool configuration
4343
├── documentation/ # Sphinx documentation source
4444
├── sources/ # All source code
4545
├── tests/ # Test suites
4646
├── template/ # Copier template for project generation
4747
├── .github/ # GitHub Actions workflows
48+
├── data/ # Redistributable data resources
4849
└── .auxiliary/ # Development workspace
4950
5051
Source Code Organization
@@ -182,6 +183,6 @@ This filesystem organization provides a foundation that can evolve as the projec
182183

183184
For questions about organizational principles, subpackage patterns, or testing strategies, refer to the comprehensive common documentation:
184185

185-
* :doc:`../common/architecture` - Architecture Patterns
186+
* :doc:`../common/architecture` - Architecture Patterns
186187
* :doc:`../common/practices` - Development Practices
187-
* :doc:`../common/tests` - Test Development Guidelines
188+
* :doc:`../common/tests` - Test Development Guidelines

0 commit comments

Comments
 (0)