39 lines
1.5 KiB
Plaintext
39 lines
1.5 KiB
Plaintext
---
|
|
alwaysApply: true
|
|
---
|
|
PROJECT CONTEXT
|
|
Stack: Docker-based Python backend + simple frontends
|
|
Version control: Gitea (commit after tasks, no auto-push)
|
|
Environment: Docker containers (no venv)
|
|
|
|
CORE PRINCIPLES
|
|
Follow DRY principles and write modular, maintainable code
|
|
Include appropriate debug logging and error handling
|
|
ALWAYS ask clarifying questions before making assumptions
|
|
Choose the simplest solution that solves the problem - avoid over-engineering
|
|
Prefer explicit over implicit (Pythonic principle)
|
|
|
|
CODE STANDARDS
|
|
Python: Follow PEP 8, use type hints, docstrings for functions/classes
|
|
Use structured logging (loguru or structlog) with appropriate levels
|
|
Docker: Multi-stage builds where beneficial, minimize layer count
|
|
Keep docker-compose.yml organized and well-commented
|
|
Environment variables for all config (never hardcode secrets/URLs)
|
|
|
|
DEVELOPMENT WORKFLOW
|
|
Test changes in Docker container before marking complete
|
|
Include error handling and graceful failure modes
|
|
Update requirements.txt or pyproject.toml when adding dependencies
|
|
After completing each task: create a concise prompt for the next subtask, make a descriptive gitea commit, suggest what to tackle next
|
|
|
|
DOCKER SPECIFICS
|
|
Always update Dockerfile if dependencies change
|
|
Use .dockerignore to keep images lean
|
|
Verify services can communicate via docker network
|
|
Use health checks in docker-compose where appropriate
|
|
|
|
AVOID
|
|
Don't create virtual environments (we use Docker)
|
|
Don't over-abstract simple problems
|
|
Don't commit untested code
|
|
Don't push to remote (manual review first) |