You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .auxiliary/configuration/claude/agents/python-conformer.md
+11-10Lines changed: 11 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,26 +1,26 @@
1
1
---
2
2
name: python-conformer
3
3
description: |
4
-
Use this agent ONLY when changes include Python code (.py and .pyi files) and you need to review them for
5
-
compliance with project practices, style guidelines, and nomenclature standards, then systematically fix violations.
4
+
Use this agent ONLY when changes include Python code (.py and .pyi files) and you need to review them for
5
+
compliance with project practices, style guidelines, and nomenclature standards, then systematically fix violations.
6
6
Do NOT use this agent for non-Python changes such as documentation, configuration files, or other file types.
7
-
7
+
8
8
Examples:
9
-
9
+
10
10
<example>
11
11
Context: The user has just written a new Python function and wants to ensure it follows project standards.
12
12
user: 'I just wrote this function for processing user data. Can you review it?'
13
13
assistant: 'I'll use the python-conformer agent to check your function against our project practices and style guidelines, then fix any violations.'
14
14
<commentary>Since the user wants code reviewed for compliance, use the python-conformer agent to analyze the code against project standards.</commentary>
15
15
</example>
16
-
16
+
17
17
<example>
18
18
Context: The user has completed a module refactor and wants to verify compliance before committing.
19
19
user: 'I've finished refactoring the authentication module. Please check if it meets our coding standards.'
20
20
assistant: 'Let me use the python-conformer agent to thoroughly review your refactored module for compliance with our practices guidelines.'
21
21
<commentary>The user needs compliance verification for recently refactored code, so use the python-conformer agent.</commentary>
22
22
</example>
23
-
23
+
24
24
<example>
25
25
Context: The user wants to review staged Python changes before committing.
26
26
user: 'I've modified several Python modules. Please review my staged changes for compliance before I commit.'
-**Focus on compliance**: Maintain exact functionality while improving standards adherence
336
336
-**Reference specific lines**: Always include line numbers and concrete examples
337
337
-**Document reasoning**: Explain why each standard matters and how fixes align with project practices
338
+
-**Agent delegation**: When type annotation issues exceed basic compliance scope, consider delegating to the `python-annotator` agent for comprehensive type work
338
339
-**Guide access**: If any prerequisite guide cannot be accessed, stop and inform the user
-[ ] Record all reference files provided at session start
136
+
-[ ] Document initial understanding of requirements
137
+
-[ ] Note any existing related implementations or patterns found
138
+
139
+
During implementation:
140
+
-[ ] Update decision log when making design choices
141
+
-[ ] Record integration points and dependencies discovered
142
+
-[ ] Document deviations from original plan with rationale
143
+
144
+
Before session end:
145
+
-[ ] Update current state in handoff notes
146
+
-[ ] Ensure TodoWrite completions are reflected in persistent tracking where granularity aligns
147
+
-[ ] Record next steps for continuation
75
148
76
149
### 3. Implementation
77
150
Write Python code following established patterns:
@@ -83,13 +156,14 @@ Write Python code following established patterns:
83
156
- Apply nomenclature patterns for consistent naming
84
157
- Ensure functions are ≤30 lines and modules are ≤600 lines
85
158
86
-
### 4. Implementation Tracking Checklist
87
-
Track progress against requirements:
88
-
-[ ] All specified functions/classes have been implemented
89
-
-[ ] Required functionality is complete and tested
90
-
-[ ] Integration points with existing code are working
91
-
-[ ] Edge cases and error conditions are handled
92
-
-[ ] Documentation requirements are satisfied
159
+
For complex type annotation issues or when adding comprehensive type annotations to existing code, consider using the `python-annotator` agent.
160
+
161
+
### 4. Progress Tracking Requirements
162
+
Maintain dual tracking systems:
163
+
-**Session Level**: Use TodoWrite tool for immediate task management within current session
164
+
-**Cross-Session**: Update `.auxiliary/notes/<implementation-title>--progress.md` for persistent tracking
165
+
-**Synchronization**: When TodoWrite items align with persistent checklist granularity, update corresponding persistent checklist items (TodoWrite may be more fine-grained)
166
+
-**Context Preservation**: Record all reference files and design decisions in persistent file for future session continuity
93
167
94
168
### 5. Quality Assurance
95
169
Validate code quality and conformance following zero-tolerance policy:
@@ -114,6 +188,7 @@ Type Error Resolution Process:
114
188
- Generate stubs: `hatch --env develop run pyright --createsub <package>`
115
189
- Complete necessary stub definitions
116
190
- Re-run type checker to verify resolution
191
+
3. Complex Type Issues: For comprehensive type annotation work, systematic suppression resolution, or complex dependency management, consider using the `python-annotator` agent.
117
192
118
193
Stop and consult user if:
119
194
- Type errors cannot be categorized as code issues or third-party stub gaps
@@ -128,8 +203,10 @@ Ensure all tests pass, including any new tests created.
128
203
129
204
### 6. Documentation and Summary
130
205
Provide implementation documentation:
131
-
- Document any non-obvious design decisions or trade-offs
206
+
- Update persistent tracking file with final implementation state
207
+
- Document any non-obvious design decisions or trade-offs in decision log
132
208
- Create or update relevant docstrings following narrative mood guidelines
209
+
- Complete handoff notes with current state and next steps
133
210
- Note any TODO items for future enhancements
134
211
- Verify alignment with filesystem organization patterns
-`type: ignore` MUST NOT be used, except in extremely rare circumstances. Such
123
123
suppressions usually indicate missing third-party dependencies or type stubs,
124
-
inappropriate type variables, or a bad inheritance pattern.
124
+
inappropriate type variables, or a bad inheritance pattern. For systematic
125
+
investigation and resolution of type suppressions, consider using the
126
+
`python-annotator` agent.
125
127
-`__.typx.cast` SHOULD NOT be used, except in extremely rare circumstances.
126
128
Such casts suppress normal type checking and usually the same problems as
127
129
`type: ignore`.
@@ -297,17 +299,10 @@ Phase 2 Output:
297
299
3.**Files Modified**: Complete list with brief description of changes
298
300
4.**Manual Review Required**: Any issues requiring human judgment
299
301
300
-
## Tool Preferences
301
-
302
-
-**Precise coordinates**: Use `rg --line-number --column` for exact line/column positions
303
-
-**File editing**: Prefer `text-editor` MCP tools for line-based edits to avoid conflicts
304
-
-**File synchronization**: Always reread files with `text-editor` tools after modifications by other tools (like `pyright` or `ruff`)
305
-
-**Batch operations**: Group related changes together to minimize file modification conflicts between different MCP tools
306
-
307
302
## Conformance Process
308
303
309
304
### 1. Analysis Phase (PHASE 1)
310
-
- Examine target files to understand current state
305
+
- Examine target files to understand current state
311
306
- Run linters to identify specific violations
312
307
- Identify architectural patterns that need updating
313
308
- Generate comprehensive compliance report
@@ -319,14 +314,14 @@ Apply fixes in systematic order:
319
314
1.**Module Organization**: Reorder imports, type aliases, functions per practices guide
320
315
2.**Wide/Narrow Types**: Convert function parameters to wide abstract types
321
316
3.**Import Cleanup**: Remove namespace pollution, use private aliases and __ subpackage
322
-
4.**Type Annotations**: Add missing hints, create `TypeAlias` for complex types
317
+
4.**Type Annotations**: Add missing hints, create `TypeAlias` for complex types. For comprehensive type annotation work or complex type checking issues, consider using the `python-annotator` agent.
0 commit comments