Specialized aider configuration for Stock Verification System with SQL Server read-only rules, MongoDB writes, JWT auth, and dual-stack FastAPI + React Native testing.
Configure aider for a dual-database Stock Verification System with strict read-only SQL Server rules, MongoDB writes, JWT authentication, and automated testing.
Sets up aider with:
Create `.aider.conf.yml` in the project root with:
```yaml
model: claude-sonnet-4-20250514
edit-format: diff
weak-model: claude-sonnet-4-20250514
auto-commits: false
dirty-commits: false
attribute-author: true
attribute-committer: true
attribute-commit-message-author: true
attribute-commit-message-committer: true
read:
- README.md
- ARCHITECTURE.md
- API_CONTRACTS.md
- API_REFERENCE.md
- .cursorrules
- .github/copilot-instructions.md
ignore-file:
- .gitignore
- .aiderignore
suggest-shell-commands: true
show-diffs: true
check-update: true
git: true
gitignore: true
lint-cmd:
python: "cd backend && ruff check --fix {fname}"
typescript: "cd frontend && npm run lint -- --fix"
test-cmd: "make test"
map-tokens: 2048
map-refresh: auto
voice-language: en
env-file: .env
```
Add this system prompt section to enforce architectural rules:
```yaml
system-prompt: |
You are working on the Stock Verification System.
CRITICAL RULES:
- SQL Server is READ-ONLY. All writes go to MongoDB.
- Use parameterized queries (?) for SQL - never string concatenation.
- JWT auth required for all /api/* endpoints.
- Follow patterns in existing code.
- Run tests before suggesting changes.
ARCHITECTURE:
- Backend: FastAPI (Python 3.10+) on port 8001
- Frontend: React Native + Expo (TypeScript)
- Primary DB: MongoDB (Motor async driver)
- ERP Source: SQL Server (pyodbc, read-only)
TEST COMMANDS:
- Backend: cd backend && pytest tests/ -v
- Frontend: cd frontend && npm test
- Full CI: make ci
```
After creating the configuration:
1. **Check aider can load config:**
```bash
aider --check-config
```
2. **Verify lint commands work:**
```bash
cd backend && ruff check --fix src/
cd frontend && npm run lint -- --fix
```
3. **Verify test commands work:**
```bash
make test
```
**Start aider with auto-loaded config:**
```bash
aider
```
**Add specific files to context:**
```bash
aider backend/src/api/auth.py backend/tests/test_auth.py
```
**Reference read-only docs:**
The config automatically includes README.md, ARCHITECTURE.md, API_CONTRACTS.md as read-only context.
**Run tests before committing:**
```bash
aider --test-cmd "make test"
```
1. **SQL Server Read-Only:** Never generate SQL INSERT/UPDATE/DELETE statements for SQL Server
2. **MongoDB Writes:** All data modifications go through MongoDB Motor async driver
3. **Parameterized Queries:** Always use `?` placeholders, never string concatenation
4. **JWT Authentication:** All `/api/*` endpoints require JWT token validation
5. **Testing First:** Run `make test` before suggesting code changes
6. **Code Patterns:** Follow existing patterns in codebase (check via `read:` files)
```bash
aider backend/src/api/auth.py backend/tests/test_auth.py
```
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/aider-config-stock-verification-system/raw