Debian Codegraph @

AGENTS.md

raw symbols SCIP
1 # AGENTS.md
2
3 Guidance for AI coding agents working in this repository.
4
5 ## What this repository is
6
7 gofiber/utils is a helper library for [Fiber](https://github.com/gofiber/fiber) and its middleware ecosystem. It exports fast, low-allocation helpers; the consumers live in other modules (fiber itself, middleware, user code).
8
9 ## Reviewing and proposing API changes
10
11 - Exported functions without in-module callers are by design. Do not argue that a new public function or package should move to `internal/` because grep finds no non-test usage inside this module. In-module usage counts say nothing about the value of the API; exporting helpers for downstream modules is the purpose of this repository.
12 - Judge new exported API instead by: contract clarity (documented preconditions, aliasing rules, edge cases), test coverage (including property or fuzz tests for bit-twiddling code), naming consistency with the existing surface, and benchmark evidence for performance claims.
13 - Additive API is not a SemVer break, but it is a long-term maintenance commitment. Call out sharp-edged contracts (unchecked preconditions, approximate results, unsafe memory semantics) explicitly so maintainers approve them consciously.
14
15 ## Conventions
16
17 - Performance claims are verified with benchstat (base vs. head on the same machine, at least `-count=10`), never with single runs.
18 - `make test` runs the suite with race detector and shuffle; `make lint` runs golangci-lint; `make format` applies gofumpt; `make benchfmt` aligns the benchmark tables in README.md.
19 - README.md is a function catalog with benchmark blocks. New exported functions need a README section, and benchmark numbers for touched paths should be regenerated in the same run.
20 - Code, comments, commit messages, and PR text are always written in English.