Skip to content

Commit 22d45d7

Browse files
committed
bit more forceful about running precommit checks
Signed-off-by: Paul S. Schweigert <paul@paulschweigert.com>
1 parent 3018c28 commit 22d45d7

1 file changed

Lines changed: 22 additions & 15 deletions

File tree

AGENTS.md

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -42,36 +42,39 @@ uv run ruff format . && uv run ruff check . # Lint & format
4242
## 3. Configuration Files
4343
Mellea supports TOML configuration files for setting default backends, models, and credentials.
4444

45-
**Config Locations (precedence order):**
46-
1. Project config: `./mellea.toml` (current dir and parents)
47-
2. User config: `~/.config/mellea/config.toml` (Linux/macOS) or `%APPDATA%\mellea\config.toml` (Windows)
45+
**Config Location:** `./mellea.toml` (searched in current dir and parents)
4846

49-
**Value Precedence:** Explicit params > Project config > User config > Defaults
47+
**Value Precedence:** Explicit params > Project config > Defaults
5048

5149
**CLI Commands:**
5250
```bash
53-
m config init # Create user config
54-
m config init-project # Create project config
51+
m config init # Create project config
5552
m config show # Display effective config
5653
m config path # Show loaded config file
57-
m config where # Show all config locations
54+
m config where # Show config location
5855
```
5956

6057
**Development Usage:**
61-
- Set your preferred backend/model in user config for convenience
62-
- Use project config for project-specific settings (safe to commit without credentials)
63-
- Store credentials in user config or environment variables (never commit)
64-
- Config files with credentials are git-ignored by default (`mellea.toml`, `.mellea.toml`)
58+
- If `mellea.toml` exists, it will be used; if not, defaults apply
59+
- Store credentials in environment variables (never commit credentials)
60+
- Config files are git-ignored by default (`mellea.toml`, `.mellea.toml`)
6561

66-
**Example User Config** (`~/.config/mellea/config.toml`):
62+
**Example Project Config** (`./mellea.toml`):
6763
```toml
6864
[backend]
6965
name = "ollama"
7066
model_id = "llama3.2:1b"
7167

68+
# Generic model options (apply to all backends)
7269
[backend.model_options]
7370
temperature = 0.7
74-
max_tokens = 2048
71+
72+
# Per-backend model options (override generic for that backend)
73+
[backend.model_options.ollama]
74+
num_ctx = 4096
75+
76+
[backend.model_options.openai]
77+
presence_penalty = 0.5
7578

7679
[credentials]
7780
# openai_api_key = "sk-..." # Better: use env vars
@@ -145,12 +148,16 @@ Pre-commit runs: ruff, mypy, uv-lock, codespell
145148
| Ollama refused | Run `ollama serve` |
146149

147150
## 8. Self-Review (before notifying user)
148-
1. `uv run pytest -m "not qualitative"` passes?
149-
2. `ruff format` and `ruff check` clean?
151+
1. **Pre-commit checks pass?** Run `uv run pre-commit run --all-files` or at minimum:
152+
- `uv run ruff format . && uv run ruff check .` (formatting & linting)
153+
- `uv run mypy <changed-files>` (type checking)
154+
2. `uv run pytest -m "not qualitative"` passes?
150155
3. New functions typed with concise docstrings?
151156
4. Unit tests added for new functionality?
152157
5. Avoided over-engineering?
153158

159+
**Note:** All pre-commit hooks (ruff, mypy, codespell, uv-lock) must pass before a task is considered complete.
160+
154161
## 9. Writing Tests
155162
- Place tests in `test/` mirroring source structure
156163
- Name files `test_*.py` (required for pydocstyle)

0 commit comments

Comments
 (0)