1 Commits
Author SHA1 Message Date
clawbot 2f00ed18fd Rewrite AGENTS.md sentence by sentence
check / check (push) Canceled after 0s
Rewrite the agent rules from scratch, as a newcomer would read them,
with one idea per sentence and every file name and command in
backticks. Drop the rule that models embed `models.Base`, which no
package in the repository has, and the statement that tests share
their package: nearly every test is in an external test package with
an `export_test.go` beside it. State the branch workflow in use: pull
requests target `next` and only the owner merges `next` into `main`.
Record the three snake_case JSON tags the HTTP API keeps.

Part of #190.

Model: fable-5-1
2026-10-27 12:51:02 +00:00
+8 -9
View File
@@ -10,8 +10,8 @@ shared documents and are not edited here.
2. Run `make check`. It runs the tests and the linter in Docker, then the format
check. All three must pass with no findings.
Never run `go test`, `golangci-lint` or `gofmt` directly. The scripts in
`script/` hold the flags and the Docker setup.
Never run `go test`, `golangci-lint` or `gofmt` directly. The `make` targets
hold the flags and the Docker setup.
## Branches and pull requests
@@ -38,14 +38,14 @@ Never run `go test`, `golangci-lint` or `gofmt` directly. The scripts in
## Architecture
- The server uses `go.uber.org/fx` for dependency injection. Each of its
components is an `fx` provider, wired together in `cmd/neoircd/main.go`.
- Dependency injection uses Uber `fx`. Every component is an `fx` provider,
wired together in `cmd/neoircd/main.go`.
- Application packages live under `internal/`, one package per concern.
`pkg/irc` holds the IRC command names and numeric reply codes.
- A handler method returns an `http.HandlerFunc`.
- A request struct is defined inside the handler that decodes it.
- Database access goes through the methods of `db.Database`.
- The database migrations live in `internal/db/schema/` and are embedded with
- The database schema lives in `internal/db/schema/` and is embedded with
`go:embed`.
- The database is SQLite, through the pure Go driver `modernc.org/sqlite`.
@@ -54,12 +54,11 @@ Never run `go test`, `golangci-lint` or `gofmt` directly. The scripts in
- Prefer table-driven tests.
- Use `testing.T` helpers, not assertion libraries.
- A test file lives next to the code it tests and ends in `_test.go`.
- Tests are in the package's external test package, such as `handlers_test`.
When a test needs an unexported name, an `export_test.go` file in the package
exposes it.
- Tests are in the package's external test package, such as `handlers_test`. An
`export_test.go` file in the package itself exposes what the tests need.
## Dependencies
- The required libraries are listed in `CONVENTIONS.md` §1.
- No new dependency without a reason given in the pull request.
- Prefer dependencies written in pure Go, which build without cgo.
- Prefer pure Go. No cgo.