Files
chat/AGENTS.md
clawbot 2da7f11484
All checks were successful
check / check (push) Successful in 2m24s
Rename app from chat to neoirc, binary to neoircd (closes #46) (#47)
Complete rename of the application from `chat` to `neoirc` with binary name `neoircd`.

closes #46

## Changes

- **Go module path**: `git.eeqj.de/sneak/chat` → `git.eeqj.de/sneak/neoirc`
- **Server binary**: `chatd` → `neoircd`
- **CLI binary**: `chat-cli` → `neoirc-cli`
- **Cmd directories**: `cmd/chatd` → `cmd/neoircd`, `cmd/chat-cli` → `cmd/neoirc-cli`
- **Go package**: `chatapi` → `neoircapi`
- **Makefile**: binary name, build targets, docker image tag, clean target
- **Dockerfile**: binary paths, user/group names (`chat` → `neoirc`), ENTRYPOINT
- **`.gitignore`/`.dockerignore`**: artifact names
- **All Go imports and doc comments**
- **Default server name**: `chat` → `neoirc`
- **Web client**: localStorage keys (`chat_token`/`chat_channels` → `neoirc_token`/`neoirc_channels`), page title, default server display name
- **Schema files**: all `$id` URLs and example hostnames
- **README.md**: project name, all binary references, examples, directory tree
- **AGENTS.md**: build command reference
- **Test fixtures**: app name and channel names

Docker build passes. All tests pass.

<!-- session: agent:sdlc-manager:subagent:a4b8dbd3-a7c8-4fad-8239-bb5a64a9b3d6 -->

Co-authored-by: clawbot <clawbot@noreply.eeqj.de>
Reviewed-on: #47
Co-authored-by: clawbot <clawbot@noreply.example.org>
Co-committed-by: clawbot <clawbot@noreply.example.org>
2026-03-07 14:43:58 +01:00

2.0 KiB

AGENTS.md — Rules for AI Agents

Before Every Commit

  1. Format: gofmt -s -w . and goimports -w .
  2. Lint: golangci-lint run --config .golangci.yml ./... — zero issues
  3. Test: go test -race ./... — all passing
  4. 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 return statement
  • 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.HandlerFunc using the closure pattern
  • Request/response structs defined inside handler closures
  • Models embed models.Base for database access to relation methods
  • Database migrations in internal/db/schema/ — embedded via go:embed
  • SQLite by default (pure Go driver: modernc.org/sqlite)

Testing

  • Table-driven tests preferred
  • Use testing.T helpers, not assertion libraries
  • Test files live next to the code they test
  • _test.go suffix, 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)