docs: Update GEMINI.md to strictly enforce make check and 100% coverage

This commit is contained in:
Moritz Graf 2026-01-01 22:20:38 +01:00
parent 2240a32a53
commit bf744b30dc
1 changed files with 11 additions and 12 deletions

View File

@ -11,23 +11,22 @@ This document provides a set of global instructions and principles for the Gemin
## Code Quality & Standards
### 1. Linting, Formatting & Testing
ALWAYS run the full pipeline before completing a task:
- **Command**: `make check`
- **Action**: Fix ALL errors, warnings, and coverage failures before verifying the task.
- **Strictness**: DO NOT run individual linters (e.g., `ruff`, `npm run lint`) in isolation. ALWAYS use `make check` to ensure the entire state is valid.
### 1. Verification & Quality Gates
**Strict Rule:** ALWAYS run `make check` before marking a task as complete. This command performs:
- **Linting & Formatting**: (Ruff, ESLint, Prettier)
- **Testing**: Runs all unit tests.
- **Coverage**: Enforces **100% line coverage** for both backend and frontend.
### 2. Testing
ALWAYS run the full test suite to ensure no regressions:
- **Backend**: `uv run pytest` (in `/backend`)
- **Frontend**: `npm run test` (in `/frontend`)
- **Action**: Every new feature or major refactor MUST include or update relevant tests.
**Action:**
- If `make check` fails, the task is **NOT DONE**. Fix ALL errors, warnings, and coverage drops.
- DO NOT rely on individual commands (like `pytest` or `npm test`) for final verification. `make check` is the single source of truth.
- **New Code**: Must have 100% test coverage and adhere to best practices.
### 3. Error Handling & Logging
### 2. Error Handling & Logging
- **No Print Statements**: Use `logging` in Python and `console.error` (with prefix) in Vue.
- **Fail Fast**: Let exceptions bubble up to the global handler in `backend/src/main.py`.
- **Validation**: Use Pydantic models for all API requests and responses.
### 4. Documentation
### 3. Documentation
- Refer to `CONTRIBUTING.md` for detailed guidelines.
- Keep `task.md` and `implementation_plan.md` updated throughout the task.