-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.aider.conf.yml
More file actions
318 lines (261 loc) · 9.73 KB
/
Copy path.aider.conf.yml
File metadata and controls
318 lines (261 loc) · 9.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
# Aider AI Pair Programmer Configuration
# https://aider.chat/docs/config.html
##############################################################################
# STOP! READ THIS FIRST - MANDATORY SESSION MANAGEMENT
##############################################################################
#
# BEFORE doing ANYTHING in this session, you MUST run:
#
# uv run ai-start-task "Your task description"
#
# If you have NOT run this command yet, STOP NOW and run it!
#
# This is NOT optional. Every Aider session MUST start with ai-start-task.
#
# DURING work:
# uv run ai-log "Progress message"
# uv run ai-update-plan "Completed item"
#
# # Customize your plan (add task-specific steps, remove irrelevant items)
# uv run ai-update-plan --add "Specific task for this feature" --phase "Phase 2"
# uv run ai-update-plan --remove "Generic irrelevant item"
# uv run ai-update-plan --rename "Generic item" --to "Specific detailed item"
#
# WHEN finishing:
# uv run ai-finish-task --summary="What you accomplished"
#
# See AI_DOCS/ai-tools.md for complete workflow and all ai-update-plan features.
#
##############################################################################
##############################################################################
# SHARED DOCUMENTATION (ALWAYS READ THESE)
##############################################################################
# Read these shared documentation files for complete guidelines:
read:
- AI_DOCS/ai-tools.md # Session management (MANDATORY workflow)
- AI_DOCS/ai-skills.md # Specialized skills and agents
- AI_DOCS/tdd-workflow.md # TDD process and testing standards
- AI_DOCS/code-conventions.md # Code style and best practices
- AI_DOCS/project-context.md # Tech stack and architecture
# These files contain the single source of truth for:
# - AI session management workflow (ai-start-task, ai-log, ai-finish-task)
# - Specialized workflows (test-generator, coverage-analyzer, quality-fixer)
# - Test-Driven Development principles and examples
# - Code quality standards and conventions
# - Project structure and dependencies
##############################################################################
# Test-Driven Development (TDD) - MANDATORY
##############################################################################
# Aider Instructions:
# - ALWAYS write tests BEFORE implementation code
# - Use real code from codebase, minimize mocks/fixtures
# - Run `make check` after every code change
# - Maintain minimum 80% test coverage
# - Follow existing test patterns in tests/
# See AI_DOCS/tdd-workflow.md for complete TDD workflow and examples
##############################################################################
# Project Configuration
##############################################################################
# Git integration
auto-commits: true
commit-prompt: |
Generate a concise commit message following conventional commits format.
Include emoji if appropriate.
# Testing
test-cmd: "make test"
# Linting
lint-cmd: "make lint"
# Auto-run tests after changes
auto-test: true
# Auto-run lint after changes
auto-lint: true
##############################################################################
# Code Quality Standards
##############################################################################
# Edit format
edit-format: diff
# Show diffs
show-diffs: true
# Message style
message-file: .aider.instructions.md
##############################################################################
# File Organization
##############################################################################
# Watch these files for context
watch-files:
- "src/**/*.py"
- "tests/**/*.py"
- "pyproject.toml"
- "Makefile"
- "AGENTS.md"
- "AI_DOCS/*.md"
# Read-only files (for context, don't edit)
read-files:
- "README.md"
- "CHANGES.md"
- "PROJECT_STRUCTURE.md"
- "AI_DOCS/tdd-workflow.md"
- "AI_DOCS/ai-tools.md"
- "AI_DOCS/code-conventions.md"
- "AI_DOCS/project-context.md"
##############################################################################
# AI Behavior Settings
##############################################################################
# Show repo map for better context
map-tokens: 2048
# Use repo map
show-repo-map: true
# Cache prompts
cache-prompts: true
# Suggest shell commands for testing
suggest-shell-commands: true
##############################################################################
# Quality Gates
##############################################################################
# These commands will run before committing
# If any fail, the commit is blocked
# pre-commit-hook runs these checks:
# 1. make format - Black + isort formatting
# 2. make lint - Ruff + mypy + Pylint
# 3. make test - All tests with coverage
# 4. Coverage check - Must be ≥ 80%
##############################################################################
# Aider-Specific TDD Workflow
##############################################################################
# When user requests a feature:
# 1. Ask Aider to write tests first: "Write tests for X feature"
# 2. Run tests (they will fail): /test
# 3. Ask Aider to implement: "Implement X to make tests pass"
# 4. Run tests again (should pass): /test
# 5. Run quality check: /run make check
# 6. If all pass, commit: /commit
# See AI_DOCS/tdd-workflow.md for complete TDD examples
##############################################################################
# Example Commands
##############################################################################
# /add src/python_modern_template/feature.py tests/test_feature.py
# - Add files to chat context
#
# /test
# - Run make test
#
# /lint
# - Run make lint
#
# /run make check
# - Run complete quality check (format + lint + test)
#
# /run make coverage
# - Check test coverage
#
# /commit
# - Commit changes if all checks pass
#
# /help
# - Show all Aider commands
##############################################################################
# Instructions for Aider
##############################################################################
# READ THE SHARED DOCUMENTATION ABOVE (automatically included via `read:`)
# - AI_DOCS/ai-tools.md - Session management workflow (MANDATORY)
# - AI_DOCS/ai-skills.md - Specialized skills and agents
# - AI_DOCS/tdd-workflow.md - TDD process with examples
# - AI_DOCS/code-conventions.md - Code standards
# - AI_DOCS/project-context.md - Project architecture
# ALSO READ THESE UNIVERSAL INSTRUCTIONS:
# - AGENTS.md - Universal AI agent guidelines
# - CLAUDE.md - Claude Code examples (good patterns)
# - .cursorrules - Cursor AI rules (comprehensive)
# CORE RULES:
# 1. Tests first, ALWAYS (TDD)
# 2. Minimize mocks - use real code
# 3. Type hints on all functions (mypy strict)
# 4. Run `make check` before committing
# 5. Keep coverage ≥ 80%
# QUALITY GATES (all must pass):
# ✅ Tests written first
# ✅ All tests pass
# ✅ Coverage ≥ 80%
# ✅ Black formatting
# ✅ isort imports
# ✅ Ruff linting
# ✅ mypy type checking (strict)
# ✅ Pylint score 10/10
# ✅ make check passes
##############################################################################
# Project-Specific Patterns
##############################################################################
# Test file pattern
# tests/test_*.py for each src/python_modern_template/*.py
# Import pattern (use package name, not src prefix):
# from python_modern_template import function_name
# Type hints required (mypy strict mode):
# def func(param: str) -> int:
# Docstring style (Google format):
# """Brief description.
#
# Args:
# param: Description
#
# Returns:
# Description
# """
# See AI_DOCS/code-conventions.md for complete code standards
##############################################################################
# When to Mock (ONLY when necessary)
##############################################################################
# Mock these:
# - HTTP requests (requests.get, etc.)
# - Database calls
# - File I/O (destructive operations)
# - Current time (datetime.now)
# - Random values
# DON'T mock these:
# - Internal project functions
# - Pure functions
# - Data transformations
# - Business logic
# See AI_DOCS/tdd-workflow.md for complete mocking guidelines
##############################################################################
# Coverage Requirements
##############################################################################
# Minimum: 80% (enforced)
# Target: 90%+
# Ideal: 100% for new code
# Check with: /run make coverage
# View HTML report: htmlcov/index.html
# See AI_DOCS/tdd-workflow.md for coverage guidelines
##############################################################################
# Example TDD Session with Aider
##############################################################################
# User: "Add a function to parse JSON safely"
#
# You:
# > /add tests/test_utils.py src/python_modern_template/utils.py
# > I'll write tests first following TDD...
#
# [Edit tests/test_utils.py - add test_parse_json_safe]
#
# > /test
# [Tests fail - function doesn't exist]
#
# > Now implementing the function...
# [Edit src/python_modern_template/utils.py - add parse_json_safe]
#
# > /test
# [Tests pass]
#
# > /run make check
# [All quality checks pass]
#
# > /commit
# [Commit with message: "Add safe JSON parsing with tests"]
# See AI_DOCS/tdd-workflow.md for more complete examples
##############################################################################
# For complete guidelines, see:
# - AI_DOCS/ai-tools.md (session management - MANDATORY)
# - AI_DOCS/ai-skills.md (specialized skills and agents)
# - AI_DOCS/tdd-workflow.md (TDD process and testing)
# - AI_DOCS/code-conventions.md (code standards)
# - AI_DOCS/project-context.md (architecture and dependencies)
# - AGENTS.md (universal AI agent instructions)