Agent instructions and quick start guide with RouteGroup example. Co-Authored-By: Virgil <virgil@lethean.io>
32 lines
1.3 KiB
Markdown
32 lines
1.3 KiB
Markdown
# CLAUDE.md
|
|
|
|
This file provides guidance to Claude Code when working with the go-api repository.
|
|
|
|
## Project Overview
|
|
|
|
**go-api** is the REST framework for the Lethean Go ecosystem. It provides a Gin-based HTTP engine with middleware, response envelopes, WebSocket integration, and OpenAPI generation. Subsystems implement the `RouteGroup` interface to register their own endpoints.
|
|
|
|
- **Module path**: `forge.lthn.ai/core/go-api`
|
|
- **Language**: Go 1.25
|
|
- **Licence**: EUPL-1.2
|
|
|
|
See `docs/` for architecture, tool reference, and development guide.
|
|
|
|
## Build & Test Commands
|
|
|
|
```bash
|
|
go test ./... # Run all tests
|
|
go test -run TestName ./... # Run a single test
|
|
go test -v -race ./... # Verbose with race detector
|
|
go build ./... # Build (library — no main package)
|
|
go vet ./... # Vet
|
|
```
|
|
|
|
## Coding Standards
|
|
|
|
- **UK English** in comments and user-facing strings (colour, organisation, unauthorised)
|
|
- **Conventional commits**: `type(scope): description`
|
|
- **Co-Author**: `Co-Authored-By: Virgil <virgil@lethean.io>`
|
|
- **Error handling**: Return wrapped errors with context, never panic
|
|
- **Test naming**: `_Good` (happy path), `_Bad` (expected errors), `_Ugly` (panics/edge cases)
|
|
- **Licence**: EUPL-1.2
|