diff --git a/CLAUDE.md b/CLAUDE.md index 1e76a2015..6f7935098 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -100,6 +100,8 @@ When sources disagree, the higher one wins: `infrastructure` implements `domain` interfaces, `domain` imports neither. `cmd/` parses flags and calls `app`, nothing else. - Fix invalid state where it is produced, not with checks where it is consumed. +- Errors surface through OpenTelemetry: record them on the request's span + (`trace.SpanFromContext(ctx).RecordError`), never the global `slog`. - If a fix fails twice, throw the block away and rewrite it simply. - Comments say why, briefly. No migration history, phase names or issue narration in code.