# CLAUDE.md
This file provides guidance to Claude Code when working with this codebase.
Generated by [sourcebook](https://github.com/maroondlabs/sourcebook). Review and edit — the best context comes from human + machine together.
## Quick Reference
- **routing:** API endpoints use Gin routes
- **testing:** Tests use Go testing. Test utilities in: test_helpers.go.
## Commands
- **Dev:** `go run .`
- **Build:** `make`
- **Test:** `go test ./...`
## Critical Constraints
## Stack
Go + Gin
## Project Structure
- `docs/` — Documentation
## Conventions & Patterns
- **Go module:** Module path: github.com/gin-gonic/gin. Use this as the import prefix for all internal packages.
- **Go visibility:** internal/ packages cannot be imported by external modules. Keep private code here.
- **Dominant patterns:**
- API endpoints use Gin routes. Follow this pattern for new routes.
- Tests use Go testing. Test utilities in: test_helpers.go.
## Additional Context
- **Go conventions:** Project uses interface-first design (14 interfaces). Define interfaces at the consumer, not the producer.
## Before Making Changes
- **Follow existing patterns.** This project has established conventions (listed above). Match them instead of introducing new approaches.
- **Respect constraints.** Review the Critical Constraints section before making structural changes.
If the sourcebook MCP server is available (`sourcebook serve`), verify before acting:
- `get_blast_radius` — check what breaks if you edit a hub file
- `query_conventions` — confirm the right pattern before adding new code
- `get_pressing_questions` — get a briefing before editing an unfamiliar file
## What to Add Manually
The most valuable context is what only you know. Add:
- Architectural decisions and why they were made
- Past incidents that shaped current conventions
- Deprecated patterns to avoid in new code
- Domain-specific rules or terminology
- Environment setup beyond what .env.example shows