You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -279,6 +279,7 @@ See [AI_POLICY.md](AI_POLICY.md) for the full AI contribution policy.
279
279
- do not add co-author signoff lines — use `Assisted-by:` trailers for AI disclosure instead
280
280
- when the schema is changed, run make generate, do not create a migration explicitly
281
281
- If you are writing go code, adhere to best practices such as the ones in effective-go, or others. This could include, error handling patterns, interface design, package organization, concurrency patterns, etc.
282
+
- avoid unmarshalling JSON/YAML into empty interfaces (`interface{}`/`any`) for data access — prefer typed structs, which give type safety and don't let unexpected fields pass through silently. The one accepted exception is feeding a JSON-Schema validator (e.g. `internal/schemavalidators`), which consumes generically-decoded JSON; decode into `any` only for that call and use a typed struct for everything else.
282
283
- When writing tests, use table-driven tests whenever possible
283
284
- When implementing new functionality, follow TDD: write failing tests first, then implement the code to make them pass
284
285
- do not change previous migrations, they are immutable
0 commit comments