@@ -40,36 +40,39 @@ uv run ruff format . && uv run ruff check . # Lint & format
4040## 3. Configuration Files
4141Mellea supports TOML configuration files for setting default backends, models, and credentials.
4242
43- ** Config Locations (precedence order):**
44- 1 . Project config: ` ./mellea.toml ` (current dir and parents)
45- 2 . User config: ` ~/.config/mellea/config.toml ` (Linux/macOS) or ` %APPDATA%\mellea\config.toml ` (Windows)
43+ ** Config Location:** ` ./mellea.toml ` (searched in current dir and parents)
4644
47- ** Value Precedence:** Explicit params > Project config > User config > Defaults
45+ ** Value Precedence:** Explicit params > Project config > Defaults
4846
4947** CLI Commands:**
5048``` bash
51- m config init # Create user config
52- m config init-project # Create project config
49+ m config init # Create project config
5350m config show # Display effective config
5451m config path # Show loaded config file
55- m config where # Show all config locations
52+ m config where # Show config location
5653```
5754
5855** Development Usage:**
59- - Set your preferred backend/model in user config for convenience
60- - Use project config for project-specific settings (safe to commit without credentials)
61- - Store credentials in user config or environment variables (never commit)
62- - Config files with credentials are git-ignored by default (` mellea.toml ` , ` .mellea.toml ` )
56+ - If ` mellea.toml ` exists, it will be used; if not, defaults apply
57+ - Store credentials in environment variables (never commit credentials)
58+ - Config files are git-ignored by default (` mellea.toml ` , ` .mellea.toml ` )
6359
64- ** Example User Config** (` ~/.config /mellea/config .toml` ):
60+ ** Example Project Config** (` . /mellea.toml` ):
6561``` toml
6662[backend ]
6763name = " ollama"
6864model_id = " llama3.2:1b"
6965
66+ # Generic model options (apply to all backends)
7067[backend .model_options ]
7168temperature = 0.7
72- max_tokens = 2048
69+
70+ # Per-backend model options (override generic for that backend)
71+ [backend .model_options .ollama ]
72+ num_ctx = 4096
73+
74+ [backend .model_options .openai ]
75+ presence_penalty = 0.5
7376
7477[credentials ]
7578# openai_api_key = "sk-..." # Better: use env vars
@@ -143,12 +146,16 @@ Pre-commit runs: ruff, mypy, uv-lock, codespell
143146| Ollama refused | Run ` ollama serve ` |
144147
145148## 8. Self-Review (before notifying user)
146- 1 . ` uv run pytest -m "not qualitative" ` passes?
147- 2 . ` ruff format ` and ` ruff check ` clean?
149+ 1 . ** Pre-commit checks pass?** Run ` uv run pre-commit run --all-files ` or at minimum:
150+ - ` uv run ruff format . && uv run ruff check . ` (formatting & linting)
151+ - ` uv run mypy <changed-files> ` (type checking)
152+ 2 . ` uv run pytest -m "not qualitative" ` passes?
1481533 . New functions typed with concise docstrings?
1491544 . Unit tests added for new functionality?
1501555 . Avoided over-engineering?
151156
157+ ** Note:** All pre-commit hooks (ruff, mypy, codespell, uv-lock) must pass before a task is considered complete.
158+
152159## 9. Writing Tests
153160- Place tests in ` test/ ` mirroring source structure
154161- Name files ` test_*.py ` (required for pydocstyle)
0 commit comments