diff --git a/.context/system-prompt.txt b/.context/system-prompt.txt index f41a623..0fc0d5a 100644 --- a/.context/system-prompt.txt +++ b/.context/system-prompt.txt @@ -88,7 +88,7 @@ These rules apply to every task across every project, regardless of harness. | Containers | Docker Compose (dev), k3s (prod) | — | — | | DB | PostgreSQL + sqlc | SQLite | — | | Search | pgvector (vector), BM25 | Qdrant (when >1M vectors or hybrid retrieval) | — | -| Logging | slog (structured) | — | — | +| Logging | slog (structured) | stdlib `logging` w/ structured `extra=` (or structlog) | — | | Testing | Table-driven, testify | — | — | | Agents (Go) | google.golang.org/adk + pkg/litellm adapter | — | — | @@ -97,7 +97,12 @@ Exploratory: Rust, Zig — I'll tell you when I want these. ## Code conventions - **Go style**: golines, gofumpt, golangci-lint -- **Errors**: `fmt.Errorf("operation: %w", err)` — never naked, never log-and-return +- **Python style** (fallback language): ruff (format+lint, one tool), mypy --strict (non-negotiable, + matches Go's static typing discipline), pytest + pytest-cov (table-driven via + `@pytest.mark.parametrize`), uv (venv+deps+lock, one tool), pydantic-settings (typed env-var config + — same principle as Go's typed structs), src-layout + `pyproject.toml` only (no `setup.py`) +- **Errors**: `fmt.Errorf("operation: %w", err)` — never naked, never log-and-return. + Python: `raise X from e` (exception chaining, same principle) — never bare `except`, never silent `pass` - **Naming**: stdlib conventions, no stuttering - **Architecture**: prefer stdlib over frameworks, constructor injection, env-var config parsed into typed structs - **Git**: conventional commits (`feat:`, `fix:`, `chore:`), commit directly to main, diff --git a/AGENTS.md b/AGENTS.md index 9e19619..92c97db 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -83,7 +83,7 @@ These rules apply to every task across every project, regardless of harness. | Containers | Docker Compose (dev), k3s (prod) | — | — | | DB | PostgreSQL + sqlc | SQLite | — | | Search | pgvector (vector), BM25 | Qdrant (when >1M vectors or hybrid retrieval) | — | -| Logging | slog (structured) | — | — | +| Logging | slog (structured) | stdlib `logging` w/ structured `extra=` (or structlog) | — | | Testing | Table-driven, testify | — | — | | Agents (Go) | google.golang.org/adk + pkg/litellm adapter | — | — | @@ -92,7 +92,12 @@ Exploratory: Rust, Zig — I'll tell you when I want these. ## Code conventions - **Go style**: golines, gofumpt, golangci-lint -- **Errors**: `fmt.Errorf("operation: %w", err)` — never naked, never log-and-return +- **Python style** (fallback language): ruff (format+lint, one tool), mypy --strict (non-negotiable, + matches Go's static typing discipline), pytest + pytest-cov (table-driven via + `@pytest.mark.parametrize`), uv (venv+deps+lock, one tool), pydantic-settings (typed env-var config + — same principle as Go's typed structs), src-layout + `pyproject.toml` only (no `setup.py`) +- **Errors**: `fmt.Errorf("operation: %w", err)` — never naked, never log-and-return. + Python: `raise X from e` (exception chaining, same principle) — never bare `except`, never silent `pass` - **Naming**: stdlib conventions, no stuttering - **Architecture**: prefer stdlib over frameworks, constructor injection, env-var config parsed into typed structs - **Git**: conventional commits (`feat:`, `fix:`, `chore:`), commit directly to main,