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