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 ## Code Quality & Standards
### 1. Linting, Formatting & Testing ### 1. Verification & Quality Gates
ALWAYS run the full pipeline before completing a task: **Strict Rule:** ALWAYS run `make check` before marking a task as complete. This command performs:
- **Command**: `make check` - **Linting & Formatting**: (Ruff, ESLint, Prettier)
- **Action**: Fix ALL errors, warnings, and coverage failures before verifying the task. - **Testing**: Runs all unit tests.
- **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. - **Coverage**: Enforces **100% line coverage** for both backend and frontend.
### 2. Testing **Action:**
ALWAYS run the full test suite to ensure no regressions: - If `make check` fails, the task is **NOT DONE**. Fix ALL errors, warnings, and coverage drops.
- **Backend**: `uv run pytest` (in `/backend`) - DO NOT rely on individual commands (like `pytest` or `npm test`) for final verification. `make check` is the single source of truth.
- **Frontend**: `npm run test` (in `/frontend`) - **New Code**: Must have 100% test coverage and adhere to best practices.
- **Action**: Every new feature or major refactor MUST include or update relevant tests.
### 3. Error Handling & Logging ### 2. Error Handling & Logging
- **No Print Statements**: Use `logging` in Python and `console.error` (with prefix) in Vue. - **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`. - **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. - **Validation**: Use Pydantic models for all API requests and responses.
### 4. Documentation ### 3. Documentation
- Refer to `CONTRIBUTING.md` for detailed guidelines. - Refer to `CONTRIBUTING.md` for detailed guidelines.
- Keep `task.md` and `implementation_plan.md` updated throughout the task. - Keep `task.md` and `implementation_plan.md` updated throughout the task.