All checks were successful
check / check (push) Successful in 4s
- Rename Go module path: git.eeqj.de/sneak/chat -> git.eeqj.de/sneak/neoirc - Rename binary: chatd -> neoircd, chat-cli -> neoirc-cli - Rename cmd directories: cmd/chatd -> cmd/neoircd, cmd/chat-cli -> cmd/neoirc-cli - Rename Go package: chatapi -> neoircapi - Update Makefile: binary name, build targets, docker image tag, clean target - Update Dockerfile: binary paths, user/group names, ENTRYPOINT - Update .gitignore and .dockerignore - Update all Go imports and doc comments - Update default server name fallback: chat -> neoirc - Update web client: localStorage keys, page title, default server name - Update all schema $id URLs and example hostnames - Update README.md: project name, binary references, examples, directory tree - Update AGENTS.md: build command reference - Update test fixtures: app name and channel names
2.0 KiB
2.0 KiB
AGENTS.md — Rules for AI Agents
Before Every Commit
- Format:
gofmt -s -w .andgoimports -w . - Lint:
golangci-lint run --config .golangci.yml ./...— zero issues - Test:
go test -race ./...— all passing - Build:
go build ./cmd/neoircd— compiles clean
No commit lands on main with lint errors, test failures, or formatting issues.
Code Style
- Follow CONVENTIONS.md exactly — it defines the architecture
- All exported types, functions, methods, and vars must have doc comments
- All packages must have a package doc comment
- JSON tags use camelCase (not snake_case)
- No magic numbers — use named constants
- No inline error handling (
if err := ...; err != nil) — use plain assignment - Blank line before every
returnstatement - Blank line separating embedded fields from regular fields in structs
- Blank imports must have a justification comment
Git Workflow
- Never commit directly to main — all changes go on feature branches
- Merge to main only when ready and passing all checks
- PR titles:
Description (closes #N)when closing an issue - One logical change per commit
- Commit messages: imperative mood, concise
Architecture
- Dependency injection via Uber fx — all components are fx providers
internal/for all application packages — one package per concern- Handlers return
http.HandlerFuncusing the closure pattern - Request/response structs defined inside handler closures
- Models embed
models.Basefor database access to relation methods - Database migrations in
internal/db/schema/— embedded viago:embed - SQLite by default (pure Go driver: modernc.org/sqlite)
Testing
- Table-driven tests preferred
- Use
testing.Thelpers, not assertion libraries - Test files live next to the code they test
_test.gosuffix, same package for white-box testing
Dependencies
- Required libraries are listed in CONVENTIONS.md §1
- No new dependencies without justification
- Pure Go preferred (no CGO)