# AGENTS.md — Coding Policy ## Error Handling - **No `panic`, `log.Fatal`, or `os.Exit` in library code.** Always return errors. - Constructors return `(*T, error)`, not just `*T`. - Wrap errors with `fmt.Errorf("context: %w", err)` for debuggability. - `t.Fatalf` in tests is fine. `panic` in production code is not. ## Code Quality - **All PRs must pass `make check` with zero failures.** No exceptions. - Never modify linter config (`.golangci.yml`) to suppress findings — fix the code. - Run `go vet`, `golangci-lint`, and `go test ./...` before pushing. ## Dependencies - Pin external dependencies by commit hash, not mutable tags. ## Style - `go fmt` all code. - Keep functions short and focused. - No dead code, no commented-out code in commits.